From xen-changelog-bounces@lists.xen.org Wed Jan 08 18:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xlY-000455-At; Wed, 08 Jan 2014 18:22: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 1W0xlW-00044r-Ja
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:06 +0000
Received: from [85.158.143.35:15736] by server-2.bemta-4.messagelabs.com id
	9F/2F-11386-E479DC25; Wed, 08 Jan 2014 18:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1389205324!9211782!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18098 invoked from network); 8 Jan 2014 18:22:05 -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;
	8 Jan 2014 18: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 1W0xlT-00085k-OS
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xlT-0007sy-Ky
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:03 +0000
Date: Wed, 08 Jan 2014 18:22:03 +0000
Message-Id: <E1W0xlT-0007sy-Ky@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] IOMMU: make page table population
	preemptible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3e06b9890c0a691388ace5a6636728998b237b90
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 7 14:21:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:21:48 2014 +0100

    IOMMU: make page table population preemptible
    
    Since this can take an arbitrary amount of time, the rooting domctl as
    well as all involved code must become aware of this requiring a
    continuation.
    
    The subject domain's rel_mem_list is being (ab)used for this, in a way
    similar to and compatible with broken page offlining.
    
    Further, operations get slightly re-ordered in assign_device(): IOMMU
    page tables now get set up _before_ the first device gets assigned, at
    once closing a small timing window in which the guest may already see
    the device but wouldn't be able to access it.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 xen/arch/x86/domain.c           |    6 +++
 xen/arch/x86/mm/p2m-pod.c       |    3 +-
 xen/drivers/passthrough/iommu.c |   74 +++++++++++++++++++++++++++++++++------
 xen/include/xen/sched.h         |    4 +-
 4 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index da8e522..ae2d246 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1921,6 +1921,12 @@ int domain_relinquish_resources(struct domain *d)
         }
 
         d->arch.relmem = RELMEM_xen;
+
+        spin_lock(&d->page_alloc_lock);
+        page_list_splice(&d->arch.relmem_list, &d->page_list);
+        INIT_PAGE_LIST_HEAD(&d->arch.relmem_list);
+        spin_unlock(&d->page_alloc_lock);
+
         /* Fallthrough. Relinquish every page of memory. */
     case RELMEM_xen:
         ret = relinquish_memory(d, &d->xenpage_list, ~0UL);
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 04ffbcb..81645c4 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -459,7 +459,8 @@ p2m_pod_offline_or_broken_hit(struct page_info *p)
 
 pod_hit:
     lock_page_alloc(p2m);
-    page_list_add_tail(p, &d->arch.relmem_list);
+    /* Insertion must be at list head (see iommu_populate_page_table()). */
+    page_list_add(p, &d->arch.relmem_list);
     unlock_page_alloc(p2m);
     pod_unlock(p2m);
     return 1;
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index d3dd683..e3b84f4 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -18,6 +18,7 @@
 #include <asm/hvm/iommu.h>
 #include <xen/paging.h>
 #include <xen/guest_access.h>
+#include <xen/event.h>
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
 #include <xsm/xsm.h>
@@ -281,7 +282,23 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
              d->mem_event->paging.ring_page)) )
         return -EXDEV;
 
-    spin_lock(&pcidevs_lock);
+    if ( !spin_trylock(&pcidevs_lock) )
+        return -ERESTART;
+
+    if ( need_iommu(d) <= 0 )
+    {
+        if ( !iommu_use_hap_pt(d) )
+        {
+            rc = iommu_populate_page_table(d);
+            if ( rc )
+            {
+                spin_unlock(&pcidevs_lock);
+                return rc;
+            }
+        }
+        d->need_iommu = 1;
+    }
+
     pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
     if ( !pdev )
     {
@@ -306,15 +323,14 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
                    rc);
     }
 
-    if ( has_arch_pdevs(d) && !need_iommu(d) )
+ done:
+    if ( !has_arch_pdevs(d) && need_iommu(d) )
     {
-        d->need_iommu = 1;
-        if ( !iommu_use_hap_pt(d) )
-            rc = iommu_populate_page_table(d);
-        goto done;
+        d->need_iommu = 0;
+        hd->platform_ops->teardown(d);
     }
-done:
     spin_unlock(&pcidevs_lock);
+
     return rc;
 }
 
@@ -322,12 +338,17 @@ static int iommu_populate_page_table(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
     struct page_info *page;
-    int rc = 0;
+    int rc = 0, n = 0;
+
+    d->need_iommu = -1;
 
     this_cpu(iommu_dont_flush_iotlb) = 1;
     spin_lock(&d->page_alloc_lock);
 
-    page_list_for_each ( page, &d->page_list )
+    if ( unlikely(d->is_dying) )
+        rc = -ESRCH;
+
+    while ( !rc && (page = page_list_remove_head(&d->page_list)) )
     {
         if ( is_hvm_domain(d) ||
             (page->u.inuse.type_info & PGT_type_mask) == PGT_writable_page )
@@ -337,7 +358,32 @@ static int iommu_populate_page_table(struct domain *d)
                 d, mfn_to_gmfn(d, page_to_mfn(page)), page_to_mfn(page),
                 IOMMUF_readable|IOMMUF_writable);
             if ( rc )
+            {
+                page_list_add(page, &d->page_list);
                 break;
+            }
+        }
+        page_list_add_tail(page, &d->arch.relmem_list);
+        if ( !(++n & 0xff) && !page_list_empty(&d->page_list) &&
+             hypercall_preempt_check() )
+            rc = -ERESTART;
+    }
+
+    if ( !rc )
+    {
+        /*
+         * The expectation here is that generally there are many normal pages
+         * on relmem_list (the ones we put there) and only few being in an
+         * offline/broken state. The latter ones are always at the head of the
+         * list. Hence we first move the whole list, and then move back the
+         * first few entries.
+         */
+        page_list_move(&d->page_list, &d->arch.relmem_list);
+        while ( (page = page_list_first(&d->page_list)) != NULL &&
+                (page->count_info & (PGC_state|PGC_broken)) )
+        {
+            page_list_del(page, &d->page_list);
+            page_list_add_tail(page, &d->arch.relmem_list);
         }
     }
 
@@ -346,8 +392,11 @@ static int iommu_populate_page_table(struct domain *d)
 
     if ( !rc )
         iommu_iotlb_flush_all(d);
-    else
+    else if ( rc != -ERESTART )
+    {
+        d->need_iommu = 0;
         hd->platform_ops->teardown(d);
+    }
 
     return rc;
 }
@@ -704,7 +753,10 @@ int iommu_do_domctl(
 
         ret = device_assigned(seg, bus, devfn) ?:
               assign_device(d, seg, bus, devfn);
-        if ( ret )
+        if ( ret == -ERESTART )
+            ret = hypercall_create_continuation(__HYPERVISOR_domctl,
+                                                "h", u_domctl);
+        else if ( ret )
             printk(XENLOG_G_ERR "XEN_DOMCTL_assign_device: "
                    "assign %04x:%02x:%02x.%u to dom%d failed (%d)\n",
                    seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index cbdf377..b173e65 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -322,8 +322,8 @@ struct domain
     enum guest_type guest_type;
 
 #ifdef HAS_PASSTHROUGH
-    /* Does this guest need iommu mappings? */
-    bool_t           need_iommu;
+    /* Does this guest need iommu mappings (-1 meaning "being set up")? */
+    s8               need_iommu;
 #endif
     /* is node-affinity automatically computed? */
     bool_t           auto_node_affinity;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xlY-000455-At; Wed, 08 Jan 2014 18:22: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 1W0xlW-00044r-Ja
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:06 +0000
Received: from [85.158.143.35:15736] by server-2.bemta-4.messagelabs.com id
	9F/2F-11386-E479DC25; Wed, 08 Jan 2014 18:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1389205324!9211782!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18098 invoked from network); 8 Jan 2014 18:22:05 -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;
	8 Jan 2014 18: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 1W0xlT-00085k-OS
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xlT-0007sy-Ky
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:03 +0000
Date: Wed, 08 Jan 2014 18:22:03 +0000
Message-Id: <E1W0xlT-0007sy-Ky@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] IOMMU: make page table population
	preemptible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3e06b9890c0a691388ace5a6636728998b237b90
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 7 14:21:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:21:48 2014 +0100

    IOMMU: make page table population preemptible
    
    Since this can take an arbitrary amount of time, the rooting domctl as
    well as all involved code must become aware of this requiring a
    continuation.
    
    The subject domain's rel_mem_list is being (ab)used for this, in a way
    similar to and compatible with broken page offlining.
    
    Further, operations get slightly re-ordered in assign_device(): IOMMU
    page tables now get set up _before_ the first device gets assigned, at
    once closing a small timing window in which the guest may already see
    the device but wouldn't be able to access it.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 xen/arch/x86/domain.c           |    6 +++
 xen/arch/x86/mm/p2m-pod.c       |    3 +-
 xen/drivers/passthrough/iommu.c |   74 +++++++++++++++++++++++++++++++++------
 xen/include/xen/sched.h         |    4 +-
 4 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index da8e522..ae2d246 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1921,6 +1921,12 @@ int domain_relinquish_resources(struct domain *d)
         }
 
         d->arch.relmem = RELMEM_xen;
+
+        spin_lock(&d->page_alloc_lock);
+        page_list_splice(&d->arch.relmem_list, &d->page_list);
+        INIT_PAGE_LIST_HEAD(&d->arch.relmem_list);
+        spin_unlock(&d->page_alloc_lock);
+
         /* Fallthrough. Relinquish every page of memory. */
     case RELMEM_xen:
         ret = relinquish_memory(d, &d->xenpage_list, ~0UL);
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 04ffbcb..81645c4 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -459,7 +459,8 @@ p2m_pod_offline_or_broken_hit(struct page_info *p)
 
 pod_hit:
     lock_page_alloc(p2m);
-    page_list_add_tail(p, &d->arch.relmem_list);
+    /* Insertion must be at list head (see iommu_populate_page_table()). */
+    page_list_add(p, &d->arch.relmem_list);
     unlock_page_alloc(p2m);
     pod_unlock(p2m);
     return 1;
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index d3dd683..e3b84f4 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -18,6 +18,7 @@
 #include <asm/hvm/iommu.h>
 #include <xen/paging.h>
 #include <xen/guest_access.h>
+#include <xen/event.h>
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
 #include <xsm/xsm.h>
@@ -281,7 +282,23 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
              d->mem_event->paging.ring_page)) )
         return -EXDEV;
 
-    spin_lock(&pcidevs_lock);
+    if ( !spin_trylock(&pcidevs_lock) )
+        return -ERESTART;
+
+    if ( need_iommu(d) <= 0 )
+    {
+        if ( !iommu_use_hap_pt(d) )
+        {
+            rc = iommu_populate_page_table(d);
+            if ( rc )
+            {
+                spin_unlock(&pcidevs_lock);
+                return rc;
+            }
+        }
+        d->need_iommu = 1;
+    }
+
     pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
     if ( !pdev )
     {
@@ -306,15 +323,14 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
                    rc);
     }
 
-    if ( has_arch_pdevs(d) && !need_iommu(d) )
+ done:
+    if ( !has_arch_pdevs(d) && need_iommu(d) )
     {
-        d->need_iommu = 1;
-        if ( !iommu_use_hap_pt(d) )
-            rc = iommu_populate_page_table(d);
-        goto done;
+        d->need_iommu = 0;
+        hd->platform_ops->teardown(d);
     }
-done:
     spin_unlock(&pcidevs_lock);
+
     return rc;
 }
 
@@ -322,12 +338,17 @@ static int iommu_populate_page_table(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
     struct page_info *page;
-    int rc = 0;
+    int rc = 0, n = 0;
+
+    d->need_iommu = -1;
 
     this_cpu(iommu_dont_flush_iotlb) = 1;
     spin_lock(&d->page_alloc_lock);
 
-    page_list_for_each ( page, &d->page_list )
+    if ( unlikely(d->is_dying) )
+        rc = -ESRCH;
+
+    while ( !rc && (page = page_list_remove_head(&d->page_list)) )
     {
         if ( is_hvm_domain(d) ||
             (page->u.inuse.type_info & PGT_type_mask) == PGT_writable_page )
@@ -337,7 +358,32 @@ static int iommu_populate_page_table(struct domain *d)
                 d, mfn_to_gmfn(d, page_to_mfn(page)), page_to_mfn(page),
                 IOMMUF_readable|IOMMUF_writable);
             if ( rc )
+            {
+                page_list_add(page, &d->page_list);
                 break;
+            }
+        }
+        page_list_add_tail(page, &d->arch.relmem_list);
+        if ( !(++n & 0xff) && !page_list_empty(&d->page_list) &&
+             hypercall_preempt_check() )
+            rc = -ERESTART;
+    }
+
+    if ( !rc )
+    {
+        /*
+         * The expectation here is that generally there are many normal pages
+         * on relmem_list (the ones we put there) and only few being in an
+         * offline/broken state. The latter ones are always at the head of the
+         * list. Hence we first move the whole list, and then move back the
+         * first few entries.
+         */
+        page_list_move(&d->page_list, &d->arch.relmem_list);
+        while ( (page = page_list_first(&d->page_list)) != NULL &&
+                (page->count_info & (PGC_state|PGC_broken)) )
+        {
+            page_list_del(page, &d->page_list);
+            page_list_add_tail(page, &d->arch.relmem_list);
         }
     }
 
@@ -346,8 +392,11 @@ static int iommu_populate_page_table(struct domain *d)
 
     if ( !rc )
         iommu_iotlb_flush_all(d);
-    else
+    else if ( rc != -ERESTART )
+    {
+        d->need_iommu = 0;
         hd->platform_ops->teardown(d);
+    }
 
     return rc;
 }
@@ -704,7 +753,10 @@ int iommu_do_domctl(
 
         ret = device_assigned(seg, bus, devfn) ?:
               assign_device(d, seg, bus, devfn);
-        if ( ret )
+        if ( ret == -ERESTART )
+            ret = hypercall_create_continuation(__HYPERVISOR_domctl,
+                                                "h", u_domctl);
+        else if ( ret )
             printk(XENLOG_G_ERR "XEN_DOMCTL_assign_device: "
                    "assign %04x:%02x:%02x.%u to dom%d failed (%d)\n",
                    seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index cbdf377..b173e65 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -322,8 +322,8 @@ struct domain
     enum guest_type guest_type;
 
 #ifdef HAS_PASSTHROUGH
-    /* Does this guest need iommu mappings? */
-    bool_t           need_iommu;
+    /* Does this guest need iommu mappings (-1 meaning "being set up")? */
+    s8               need_iommu;
 #endif
     /* is node-affinity automatically computed? */
     bool_t           auto_node_affinity;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W0xli-00046L-Dm; Wed, 08 Jan 2014 18:22: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 1W0xlh-00046B-Er
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:17 +0000
Received: from [85.158.137.68:14239] by server-11.bemta-3.messagelabs.com id
	55/B7-19379-8579DC25; Wed, 08 Jan 2014 18:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389205334!7960008!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22415 invoked from network); 8 Jan 2014 18:22:15 -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;
	8 Jan 2014 18:22: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 1W0xle-00085q-CH
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xld-0007tM-TS
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:14 +0000
Date: Wed, 08 Jan 2014 18:22:13 +0000
Message-Id: <E1W0xld-0007tM-TS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Allow ballooning working with
	1:1 memory mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 36a31eb693774e61cdc119c276be90d67b675563
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Dec 17 14:28:19 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:19 2014 +0000

    xen/arm: Allow ballooning working with 1:1 memory mapping
    
    With the lack of iommu, dom0 must have a 1:1 memory mapping for all
    these guest physical address. When the balloon decides to give back a
    page to the kernel, this page must have the same address as previously.
    Otherwise, we will loose the 1:1 mapping and will break DMA-capable
    devices.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c  |    2 +-
 xen/common/memory.c          |   35 ++++++++++++++++++++++++++++++++++-
 xen/include/asm-arm/domain.h |    3 +++
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index faff88e..47b781b 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -22,7 +22,7 @@
 static unsigned int __initdata opt_dom0_max_vcpus;
 integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
 
-static int dom0_11_mapping = 1;
+int dom0_11_mapping = 1;
 
 #define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
 static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
diff --git a/xen/common/memory.c b/xen/common/memory.c
index d5192b8..9aa65a8 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -29,6 +29,10 @@
 #include <xsm/xsm.h>
 #include <xen/trace.h>
 
+#ifndef is_domain_direct_mapped
+# define is_domain_direct_mapped(d) ((void)(d), 0)
+#endif
+
 struct memop_args {
     /* INPUT */
     struct domain *domain;     /* Domain to be affected. */
@@ -122,7 +126,29 @@ static void populate_physmap(struct memop_args *a)
         }
         else
         {
-            page = alloc_domheap_pages(d, a->extent_order, a->memflags);
+            if ( is_domain_direct_mapped(d) )
+            {
+                mfn = gpfn;
+                if ( !mfn_valid(mfn) )
+                {
+                    gdprintk(XENLOG_INFO, "Invalid mfn %#"PRI_xen_pfn"\n",
+                             mfn);
+                    goto out;
+                }
+
+                page = mfn_to_page(mfn);
+                if ( !get_page(page, d) )
+                {
+                    gdprintk(XENLOG_INFO,
+                             "mfn %#"PRI_xen_pfn" doesn't belong to the"
+                             " domain\n", mfn);
+                    goto out;
+                }
+                put_page(page);
+            }
+            else
+                page = alloc_domheap_pages(d, a->extent_order, a->memflags);
+
             if ( unlikely(page == NULL) ) 
             {
                 if ( !opt_tmem || (a->extent_order != 0) )
@@ -270,6 +296,13 @@ static void decrease_reservation(struct memop_args *a)
              && p2m_pod_decrease_reservation(a->domain, gmfn, a->extent_order) )
             continue;
 
+        /* With the lack for iommu on some ARM platform, domain with DMA-capable
+         * device must retrieve the same pfn when the hypercall
+         * populate_physmap is called.
+         */
+        if ( is_domain_direct_mapped(a->domain) )
+            continue;
+
         for ( j = 0; j < (1 << a->extent_order); j++ )
             if ( !guest_remove_page(a->domain, gmfn + j) )
                 goto out;
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 28d39a0..e2202a6 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -86,6 +86,9 @@ enum domain_type {
 #define is_pv64_domain(d) (0)
 #endif
 
+extern int dom0_11_mapping;
+#define is_domain_direct_mapped(d) ((d) == dom0 && dom0_11_mapping)
+
 struct vtimer {
         struct vcpu *v;
         int irq;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W0xli-00046L-Dm; Wed, 08 Jan 2014 18:22: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 1W0xlh-00046B-Er
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:17 +0000
Received: from [85.158.137.68:14239] by server-11.bemta-3.messagelabs.com id
	55/B7-19379-8579DC25; Wed, 08 Jan 2014 18:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389205334!7960008!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22415 invoked from network); 8 Jan 2014 18:22:15 -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;
	8 Jan 2014 18:22: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 1W0xle-00085q-CH
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xld-0007tM-TS
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:14 +0000
Date: Wed, 08 Jan 2014 18:22:13 +0000
Message-Id: <E1W0xld-0007tM-TS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Allow ballooning working with
	1:1 memory mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 36a31eb693774e61cdc119c276be90d67b675563
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Dec 17 14:28:19 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:19 2014 +0000

    xen/arm: Allow ballooning working with 1:1 memory mapping
    
    With the lack of iommu, dom0 must have a 1:1 memory mapping for all
    these guest physical address. When the balloon decides to give back a
    page to the kernel, this page must have the same address as previously.
    Otherwise, we will loose the 1:1 mapping and will break DMA-capable
    devices.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c  |    2 +-
 xen/common/memory.c          |   35 ++++++++++++++++++++++++++++++++++-
 xen/include/asm-arm/domain.h |    3 +++
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index faff88e..47b781b 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -22,7 +22,7 @@
 static unsigned int __initdata opt_dom0_max_vcpus;
 integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
 
-static int dom0_11_mapping = 1;
+int dom0_11_mapping = 1;
 
 #define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
 static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
diff --git a/xen/common/memory.c b/xen/common/memory.c
index d5192b8..9aa65a8 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -29,6 +29,10 @@
 #include <xsm/xsm.h>
 #include <xen/trace.h>
 
+#ifndef is_domain_direct_mapped
+# define is_domain_direct_mapped(d) ((void)(d), 0)
+#endif
+
 struct memop_args {
     /* INPUT */
     struct domain *domain;     /* Domain to be affected. */
@@ -122,7 +126,29 @@ static void populate_physmap(struct memop_args *a)
         }
         else
         {
-            page = alloc_domheap_pages(d, a->extent_order, a->memflags);
+            if ( is_domain_direct_mapped(d) )
+            {
+                mfn = gpfn;
+                if ( !mfn_valid(mfn) )
+                {
+                    gdprintk(XENLOG_INFO, "Invalid mfn %#"PRI_xen_pfn"\n",
+                             mfn);
+                    goto out;
+                }
+
+                page = mfn_to_page(mfn);
+                if ( !get_page(page, d) )
+                {
+                    gdprintk(XENLOG_INFO,
+                             "mfn %#"PRI_xen_pfn" doesn't belong to the"
+                             " domain\n", mfn);
+                    goto out;
+                }
+                put_page(page);
+            }
+            else
+                page = alloc_domheap_pages(d, a->extent_order, a->memflags);
+
             if ( unlikely(page == NULL) ) 
             {
                 if ( !opt_tmem || (a->extent_order != 0) )
@@ -270,6 +296,13 @@ static void decrease_reservation(struct memop_args *a)
              && p2m_pod_decrease_reservation(a->domain, gmfn, a->extent_order) )
             continue;
 
+        /* With the lack for iommu on some ARM platform, domain with DMA-capable
+         * device must retrieve the same pfn when the hypercall
+         * populate_physmap is called.
+         */
+        if ( is_domain_direct_mapped(a->domain) )
+            continue;
+
         for ( j = 0; j < (1 << a->extent_order); j++ )
             if ( !guest_remove_page(a->domain, gmfn + j) )
                 goto out;
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 28d39a0..e2202a6 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -86,6 +86,9 @@ enum domain_type {
 #define is_pv64_domain(d) (0)
 #endif
 
+extern int dom0_11_mapping;
+#define is_domain_direct_mapped(d) ((d) == dom0 && dom0_11_mapping)
+
 struct vtimer {
         struct vcpu *v;
         int irq;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xls-00047s-HM; Wed, 08 Jan 2014 18:22: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 1W0xlr-00047Z-9M
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:27 +0000
Received: from [193.109.254.147:30120] by server-3.bemta-14.messagelabs.com id
	E1/E1-11000-2679DC25; Wed, 08 Jan 2014 18:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389205344!9669998!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13515 invoked from network); 8 Jan 2014 18:22:25 -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;
	8 Jan 2014 18: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 1W0xlo-00085w-Kj
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xlo-0007tj-I8
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:24 +0000
Date: Wed, 08 Jan 2014 18:22:24 +0000
Message-Id: <E1W0xlo-0007tj-I8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: Document XEN_DOMCTL_subscribe
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f63b6c6ddcb44b5551e2f7748b0f5de6d73b35e5
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:15 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:19 2014 +0000

    xen: Document XEN_DOMCTL_subscribe
    
    Arguably this domctl is misnamed.  But, for now, document its actual
    behaviour (reverse-engineered from the code and found in the commit
    message for 4539594d46f9) under its actual name.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
    CC: Jan Beulich <JBeulich@suse.com>
---
 tools/libxc/xenctrl.h       |    4 +++-
 xen/include/public/domctl.h |   16 ++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 6e58ebe..096a590 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1452,8 +1452,10 @@ int xc_version(xc_interface *xch, int cmd, void *arg);
 int xc_flask_op(xc_interface *xch, xen_flask_op_t *op);
 
 /*
- * Subscribe to state changes in a domain via evtchn.
+ * Subscribe to domain suspend via evtchn.
  * Returns -1 on failure, in which case errno will be set appropriately.
+ * Just calls XEN_DOMCTL_subscribe - see the caveats for that domctl
+ * (in its doc comment in domctl.h).
  */
 int xc_domain_subscribe_for_suspend(
     xc_interface *xch, domid_t domid, evtchn_port_t port);
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 01a3652..91f01fa 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -619,6 +619,22 @@ typedef struct xen_domctl_cpuid xen_domctl_cpuid_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
 #endif
 
+/*
+ * Arranges that if the domain suspends (specifically, if it shuts
+ * down with code SHUTDOWN_suspend), this event channel will be
+ * notified.
+ *
+ * This is _instead of_ the usual notification to the global
+ * VIRQ_DOM_EXC.  (In most systems that pirq is owned by xenstored.)
+ *
+ * Only one subscription per domain is possible.  Last subscriber
+ * wins; others are silently displaced.
+ *
+ * NB that contrary to the rather general name, it only applies to
+ * domain shutdown with code suspend.  Shutdown for other reasons
+ * (including crash), and domain death, are notified to VIRQ_DOM_EXC
+ * regardless.
+ */
 /* XEN_DOMCTL_subscribe */
 struct xen_domctl_subscribe {
     uint32_t port; /* 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 Jan 08 18:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xls-00047s-HM; Wed, 08 Jan 2014 18:22: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 1W0xlr-00047Z-9M
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:27 +0000
Received: from [193.109.254.147:30120] by server-3.bemta-14.messagelabs.com id
	E1/E1-11000-2679DC25; Wed, 08 Jan 2014 18:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389205344!9669998!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13515 invoked from network); 8 Jan 2014 18:22:25 -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;
	8 Jan 2014 18: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 1W0xlo-00085w-Kj
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xlo-0007tj-I8
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:24 +0000
Date: Wed, 08 Jan 2014 18:22:24 +0000
Message-Id: <E1W0xlo-0007tj-I8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: Document XEN_DOMCTL_subscribe
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f63b6c6ddcb44b5551e2f7748b0f5de6d73b35e5
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:15 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:19 2014 +0000

    xen: Document XEN_DOMCTL_subscribe
    
    Arguably this domctl is misnamed.  But, for now, document its actual
    behaviour (reverse-engineered from the code and found in the commit
    message for 4539594d46f9) under its actual name.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
    CC: Jan Beulich <JBeulich@suse.com>
---
 tools/libxc/xenctrl.h       |    4 +++-
 xen/include/public/domctl.h |   16 ++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 6e58ebe..096a590 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1452,8 +1452,10 @@ int xc_version(xc_interface *xch, int cmd, void *arg);
 int xc_flask_op(xc_interface *xch, xen_flask_op_t *op);
 
 /*
- * Subscribe to state changes in a domain via evtchn.
+ * Subscribe to domain suspend via evtchn.
  * Returns -1 on failure, in which case errno will be set appropriately.
+ * Just calls XEN_DOMCTL_subscribe - see the caveats for that domctl
+ * (in its doc comment in domctl.h).
  */
 int xc_domain_subscribe_for_suspend(
     xc_interface *xch, domid_t domid, evtchn_port_t port);
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 01a3652..91f01fa 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -619,6 +619,22 @@ typedef struct xen_domctl_cpuid xen_domctl_cpuid_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
 #endif
 
+/*
+ * Arranges that if the domain suspends (specifically, if it shuts
+ * down with code SHUTDOWN_suspend), this event channel will be
+ * notified.
+ *
+ * This is _instead of_ the usual notification to the global
+ * VIRQ_DOM_EXC.  (In most systems that pirq is owned by xenstored.)
+ *
+ * Only one subscription per domain is possible.  Last subscriber
+ * wins; others are silently displaced.
+ *
+ * NB that contrary to the rather general name, it only applies to
+ * domain shutdown with code suspend.  Shutdown for other reasons
+ * (including crash), and domain death, are notified to VIRQ_DOM_EXC
+ * regardless.
+ */
 /* XEN_DOMCTL_subscribe */
 struct xen_domctl_subscribe {
     uint32_t port; /* 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 Jan 08 18:22:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xm2-00049l-Nr; Wed, 08 Jan 2014 18:22: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 1W0xm1-00049Z-Iu
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:37 +0000
Received: from [85.158.137.68:19577] by server-17.bemta-3.messagelabs.com id
	C7/D9-15965-C679DC25; Wed, 08 Jan 2014 18:22:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1389205355!7995002!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27590 invoked from network); 8 Jan 2014 18:22:36 -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 Jan 2014 18: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 1W0xly-000864-Rp
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xly-0007uY-Q4
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:34 +0000
Date: Wed, 08 Jan 2014 18:22:34 +0000
Message-Id: <E1W0xly-0007uY-Q4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: Document that
	EVTCHNOP_bind_interdomain signals
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 340702fd894add8adcdfd6c5742f41f89aa1fed2
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:16 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen: Document that EVTCHNOP_bind_interdomain signals
    
    EVTCHNOP_bind_interdomain signals the event channel.  Document this.
    
    Also explain the usual use pattern.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
---
 xen/include/public/event_channel.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h
index b78ee32..49ac8cc 100644
--- a/xen/include/public/event_channel.h
+++ b/xen/include/public/event_channel.h
@@ -101,6 +101,17 @@ typedef struct evtchn_alloc_unbound evtchn_alloc_unbound_t;
  * a port that is unbound and marked as accepting bindings from the calling
  * domain. A fresh port is allocated in the calling domain and returned as
  * <local_port>.
+ *
+ * In case the peer domain has already tried to set our event channel
+ * pending, before it was bound, EVTCHNOP_bind_interdomain always sets
+ * the local event channel pending.
+ *
+ * The usual pattern of use, in the guest's upcall (or subsequent
+ * handler) is as follows: (Re-enable the event channel for subsequent
+ * signalling and then) check for the existence of whatever condition
+ * is being waited for by other means, and take whatever action is
+ * needed (if any).
+ *
  * NOTES:
  *  1. <remote_dom> may be DOMID_SELF, allowing loopback connections.
  */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xm2-00049l-Nr; Wed, 08 Jan 2014 18:22: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 1W0xm1-00049Z-Iu
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:37 +0000
Received: from [85.158.137.68:19577] by server-17.bemta-3.messagelabs.com id
	C7/D9-15965-C679DC25; Wed, 08 Jan 2014 18:22:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1389205355!7995002!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27590 invoked from network); 8 Jan 2014 18:22:36 -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 Jan 2014 18: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 1W0xly-000864-Rp
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xly-0007uY-Q4
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:34 +0000
Date: Wed, 08 Jan 2014 18:22:34 +0000
Message-Id: <E1W0xly-0007uY-Q4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: Document that
	EVTCHNOP_bind_interdomain signals
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 340702fd894add8adcdfd6c5742f41f89aa1fed2
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:16 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen: Document that EVTCHNOP_bind_interdomain signals
    
    EVTCHNOP_bind_interdomain signals the event channel.  Document this.
    
    Also explain the usual use pattern.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
---
 xen/include/public/event_channel.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h
index b78ee32..49ac8cc 100644
--- a/xen/include/public/event_channel.h
+++ b/xen/include/public/event_channel.h
@@ -101,6 +101,17 @@ typedef struct evtchn_alloc_unbound evtchn_alloc_unbound_t;
  * a port that is unbound and marked as accepting bindings from the calling
  * domain. A fresh port is allocated in the calling domain and returned as
  * <local_port>.
+ *
+ * In case the peer domain has already tried to set our event channel
+ * pending, before it was bound, EVTCHNOP_bind_interdomain always sets
+ * the local event channel pending.
+ *
+ * The usual pattern of use, in the guest's upcall (or subsequent
+ * handler) is as follows: (Re-enable the event channel for subsequent
+ * signalling and then) check for the existence of whatever condition
+ * is being waited for by other means, and take whatever action is
+ * needed (if any).
+ *
  * NOTES:
  *  1. <remote_dom> may be DOMID_SELF, allowing loopback connections.
  */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xmC-0004Bd-Qn; Wed, 08 Jan 2014 18:22: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 1W0xmB-0004BJ-O6
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:47 +0000
Received: from [85.158.139.211:39226] by server-13.bemta-5.messagelabs.com id
	8B/D6-11357-6779DC25; Wed, 08 Jan 2014 18:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1389205365!8617937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15378 invoked from network); 8 Jan 2014 18:22: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;
	8 Jan 2014 18: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 1W0xm9-00086D-30
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xm9-0007vd-0C
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:45 +0000
Date: Wed, 08 Jan 2014 18:22:45 +0000
Message-Id: <E1W0xm9-0007vd-0C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: Document event-channel-based
	suspend protocol
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a8da8249506b55fe9314462e90cc6749fd50a5fa
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:17 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    docs: Document event-channel-based suspend protocol
    
    Document the event channel protocol in xenstore-paths.markdown, in the
    section for ~/device/suspend/event-channel.
    
    Protocol reverse-engineered from commentary and commit messages of
      4539594d46f9  Add facility to get notification of domain suspend ...
      17636f47a474  Teach xc_save to use event-channel-based ...
    and implementations in
      xc_save (current version)
      libxl (current version)
      linux-2.6.18-xen (mercurial 1241:2993033a77ca)
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
---
 docs/misc/xenstore-paths.markdown |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
index a0fc003..70ab7f4 100644
--- a/docs/misc/xenstore-paths.markdown
+++ b/docs/misc/xenstore-paths.markdown
@@ -143,10 +143,29 @@ The size of the video RAM this domain is configured with.
 
 #### ~/device/suspend/event-channel = ""|EVTCHN [w]
 
-The domain's suspend event channel. The use of a suspend event channel
-is optional at the domain's discretion. The toolstack will create this
+The domain's suspend event channel. The toolstack will create this
 path with an empty value which the guest may choose to overwrite.
 
+If the guest overwrites this, it will be with the number of an unbound
+event channel port it has acquired.  The toolstack is expected to use
+an interdomain bind, and then, when it wishes to ask the guest to
+suspend, to signal the event channel.
+
+The guest does not need to explicitly acknowledge the request; indeed,
+there is no explicit signalling by the guest in the reverse direction.
+The guest, when it is ready, simply shuts down (`SCHEDOP_shutdown`)
+with reason code `SHUTDOWN_suspend`.  The toolstack is expected to use
+`XEN_DOMCTL_subscribe` to be alerted to guest state changes, and
+`XEN_SYSCTL_getdomaininfolist` to verify that the domain has
+suspended.
+
+Note that the use of this event channel suspend protocol is optional
+for both sides.  By writing a non-empty string to the node, the guest
+is advertising its support.  However, the toolstack is at liberty to
+use the xenstore-based protocol instead (see ~/control/shutdown,
+below) even if the guest has advertised support for the event channel
+protocol.
+
 #### ~/hvmloader/generation-id-address = ADDRESS [r,HVM,INTERNAL]
 
 The hexadecimal representation of the address of the domain's
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xmC-0004Bd-Qn; Wed, 08 Jan 2014 18:22: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 1W0xmB-0004BJ-O6
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:47 +0000
Received: from [85.158.139.211:39226] by server-13.bemta-5.messagelabs.com id
	8B/D6-11357-6779DC25; Wed, 08 Jan 2014 18:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1389205365!8617937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15378 invoked from network); 8 Jan 2014 18:22: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;
	8 Jan 2014 18: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 1W0xm9-00086D-30
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xm9-0007vd-0C
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:45 +0000
Date: Wed, 08 Jan 2014 18:22:45 +0000
Message-Id: <E1W0xm9-0007vd-0C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: Document event-channel-based
	suspend protocol
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a8da8249506b55fe9314462e90cc6749fd50a5fa
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:17 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    docs: Document event-channel-based suspend protocol
    
    Document the event channel protocol in xenstore-paths.markdown, in the
    section for ~/device/suspend/event-channel.
    
    Protocol reverse-engineered from commentary and commit messages of
      4539594d46f9  Add facility to get notification of domain suspend ...
      17636f47a474  Teach xc_save to use event-channel-based ...
    and implementations in
      xc_save (current version)
      libxl (current version)
      linux-2.6.18-xen (mercurial 1241:2993033a77ca)
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
---
 docs/misc/xenstore-paths.markdown |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
index a0fc003..70ab7f4 100644
--- a/docs/misc/xenstore-paths.markdown
+++ b/docs/misc/xenstore-paths.markdown
@@ -143,10 +143,29 @@ The size of the video RAM this domain is configured with.
 
 #### ~/device/suspend/event-channel = ""|EVTCHN [w]
 
-The domain's suspend event channel. The use of a suspend event channel
-is optional at the domain's discretion. The toolstack will create this
+The domain's suspend event channel. The toolstack will create this
 path with an empty value which the guest may choose to overwrite.
 
+If the guest overwrites this, it will be with the number of an unbound
+event channel port it has acquired.  The toolstack is expected to use
+an interdomain bind, and then, when it wishes to ask the guest to
+suspend, to signal the event channel.
+
+The guest does not need to explicitly acknowledge the request; indeed,
+there is no explicit signalling by the guest in the reverse direction.
+The guest, when it is ready, simply shuts down (`SCHEDOP_shutdown`)
+with reason code `SHUTDOWN_suspend`.  The toolstack is expected to use
+`XEN_DOMCTL_subscribe` to be alerted to guest state changes, and
+`XEN_SYSCTL_getdomaininfolist` to verify that the domain has
+suspended.
+
+Note that the use of this event channel suspend protocol is optional
+for both sides.  By writing a non-empty string to the node, the guest
+is advertising its support.  However, the toolstack is at liberty to
+use the xenstore-based protocol instead (see ~/control/shutdown,
+below) even if the guest has advertised support for the event channel
+protocol.
+
 #### ~/hvmloader/generation-id-address = ADDRESS [r,HVM,INTERNAL]
 
 The hexadecimal representation of the address of the domain's
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xmN-0004Du-U7; Wed, 08 Jan 2014 18:22: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 1W0xmM-0004Dc-2V
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:58 +0000
Received: from [85.158.137.68:26397] by server-17.bemta-3.messagelabs.com id
	89/1A-15965-1879DC25; Wed, 08 Jan 2014 18:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389205375!8004253!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13916 invoked from network); 8 Jan 2014 18:22:56 -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 Jan 2014 18: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 1W0xmJ-00086M-Bb
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmJ-0007vz-9m
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:55 +0000
Date: Wed, 08 Jan 2014 18:22:55 +0000
Message-Id: <E1W0xmJ-0007vz-9m@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc: Document xenctrl.h event
	channel calls
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8a91554484ad6977f641b308af38f337c20e97cc
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:18 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    libxc: Document xenctrl.h event channel calls
    
    Provide semantic documentation for how the libxc calls relate to the
    hypervisor interface, and how they are to be used.
    
    Also document the bug (present at least in Linux 3.12) that setting
    the evtchn fd to nonblocking doesn't in fact make xc_evtchn_pending
    nonblocking, and describe the appropriate workaround.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Jan Beulich <JBeulich@suse.com>
    CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 tools/libxc/xenctrl.h |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 096a590..13f816b 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1043,6 +1043,18 @@ int xc_evtchn_close(xc_evtchn *xce);
 
 /*
  * Return an fd that can be select()ed on.
+ *
+ * Note that due to bugs, setting this fd to non blocking may not
+ * work: you would hope that it would result in xc_evtchn_pending
+ * failing with EWOULDBLOCK if there are no events signaled, but in
+ * fact it may block.  (Bug is present in at least Linux 3.12, and
+ * perhaps on other platforms or later version.)
+ *
+ * To be safe, you must use poll() or select() before each call to
+ * xc_evtchn_pending.  If you have multiple threads (or processes)
+ * sharing a single xce handle this will not work, and there is no
+ * straightforward workaround.  Please design your program some other
+ * way.
  */
 int xc_evtchn_fd(xc_evtchn *xce);
 
@@ -1082,7 +1094,20 @@ int xc_evtchn_unbind(xc_evtchn *xce, evtchn_port_t port);
 
 /*
  * Return the next event channel to become pending, or -1 on failure, in which
- * case errno will be set appropriately.  
+ * case errno will be set appropriately.
+ *
+ * At the hypervisor level the event channel will have been masked,
+ * and then cleared, by the underlying machinery (evtchn kernel
+ * driver, or equivalent).  So if the event channel is signaled again
+ * after it is returned here, it will be queued up, and delivered
+ * again after you unmask it.  (See the documentation in the Xen
+ * public header event_channel.h.)
+ *
+ * On receiving the notification from xc_evtchn_pending, you should
+ * normally: check (by other means) what work needs doing; do the
+ * necessary work (if any); unmask the event channel with
+ * xc_evtchn_unmask (if you want to receive any further
+ * notifications).
  */
 evtchn_port_or_error_t
 xc_evtchn_pending(xc_evtchn *xce);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:22: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 1W0xmN-0004Du-U7; Wed, 08 Jan 2014 18:22: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 1W0xmM-0004Dc-2V
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:58 +0000
Received: from [85.158.137.68:26397] by server-17.bemta-3.messagelabs.com id
	89/1A-15965-1879DC25; Wed, 08 Jan 2014 18:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389205375!8004253!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13916 invoked from network); 8 Jan 2014 18:22:56 -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 Jan 2014 18: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 1W0xmJ-00086M-Bb
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmJ-0007vz-9m
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:22:55 +0000
Date: Wed, 08 Jan 2014 18:22:55 +0000
Message-Id: <E1W0xmJ-0007vz-9m@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc: Document xenctrl.h event
	channel calls
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8a91554484ad6977f641b308af38f337c20e97cc
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Dec 17 18:35:18 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    libxc: Document xenctrl.h event channel calls
    
    Provide semantic documentation for how the libxc calls relate to the
    hypervisor interface, and how they are to be used.
    
    Also document the bug (present at least in Linux 3.12) that setting
    the evtchn fd to nonblocking doesn't in fact make xc_evtchn_pending
    nonblocking, and describe the appropriate workaround.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    CC: Jan Beulich <JBeulich@suse.com>
    CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 tools/libxc/xenctrl.h |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 096a590..13f816b 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1043,6 +1043,18 @@ int xc_evtchn_close(xc_evtchn *xce);
 
 /*
  * Return an fd that can be select()ed on.
+ *
+ * Note that due to bugs, setting this fd to non blocking may not
+ * work: you would hope that it would result in xc_evtchn_pending
+ * failing with EWOULDBLOCK if there are no events signaled, but in
+ * fact it may block.  (Bug is present in at least Linux 3.12, and
+ * perhaps on other platforms or later version.)
+ *
+ * To be safe, you must use poll() or select() before each call to
+ * xc_evtchn_pending.  If you have multiple threads (or processes)
+ * sharing a single xce handle this will not work, and there is no
+ * straightforward workaround.  Please design your program some other
+ * way.
  */
 int xc_evtchn_fd(xc_evtchn *xce);
 
@@ -1082,7 +1094,20 @@ int xc_evtchn_unbind(xc_evtchn *xce, evtchn_port_t port);
 
 /*
  * Return the next event channel to become pending, or -1 on failure, in which
- * case errno will be set appropriately.  
+ * case errno will be set appropriately.
+ *
+ * At the hypervisor level the event channel will have been masked,
+ * and then cleared, by the underlying machinery (evtchn kernel
+ * driver, or equivalent).  So if the event channel is signaled again
+ * after it is returned here, it will be queued up, and delivered
+ * again after you unmask it.  (See the documentation in the Xen
+ * public header event_channel.h.)
+ *
+ * On receiving the notification from xc_evtchn_pending, you should
+ * normally: check (by other means) what work needs doing; do the
+ * necessary work (if any); unmask the event channel with
+ * xc_evtchn_unmask (if you want to receive any further
+ * notifications).
  */
 evtchn_port_or_error_t
 xc_evtchn_pending(xc_evtchn *xce);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:23:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xmY-0004Gb-3O; Wed, 08 Jan 2014 18:23:10 +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 1W0xmW-0004G4-4s
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:08 +0000
Received: from [85.158.139.211:44300] by server-11.bemta-5.messagelabs.com id
	E2/9A-23268-B879DC25; Wed, 08 Jan 2014 18:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389205385!8616634!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15053 invoked from network); 8 Jan 2014 18:23:06 -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 Jan 2014 18: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 1W0xmT-00086v-Ip
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmT-0007wc-Fn
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:05 +0000
Date: Wed, 08 Jan 2014 18:23:05 +0000
Message-Id: <E1W0xmT-0007wc-Fn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/dts: specific bad cell count 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 7dde263e6cbe2b58dbff368f8a63dfc6152a70ef
Author:     Tsahee Zidenberg <tsahee@gmx.com>
AuthorDate: Sun Dec 22 13:01:31 2013 +0200
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen/dts: specific bad cell count error
    
    Specify in the error message if bad cell count is in device or parent.
    
    Signed-off-by: Tsahee Zidenberg <tsahee@gmx.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/common/device_tree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 84e709d..a29d9f2 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -999,7 +999,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 %s\n",
+        dt_printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
                   dev->full_name);
         goto bail;
     }
@@ -1029,7 +1029,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
         pbus->count_cells(dev, &pna, &pns);
         if ( !DT_CHECK_COUNTS(pna, pns) )
         {
-            printk(XENLOG_ERR "dt_parse: Bad cell count for %s\n",
+            printk(XENLOG_ERR "dt_parse: Bad cell count for parent %s\n",
                    dev->full_name);
             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 Jan 08 18:23:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xmY-0004Gb-3O; Wed, 08 Jan 2014 18:23:10 +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 1W0xmW-0004G4-4s
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:08 +0000
Received: from [85.158.139.211:44300] by server-11.bemta-5.messagelabs.com id
	E2/9A-23268-B879DC25; Wed, 08 Jan 2014 18:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389205385!8616634!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15053 invoked from network); 8 Jan 2014 18:23:06 -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 Jan 2014 18: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 1W0xmT-00086v-Ip
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmT-0007wc-Fn
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:05 +0000
Date: Wed, 08 Jan 2014 18:23:05 +0000
Message-Id: <E1W0xmT-0007wc-Fn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/dts: specific bad cell count 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 7dde263e6cbe2b58dbff368f8a63dfc6152a70ef
Author:     Tsahee Zidenberg <tsahee@gmx.com>
AuthorDate: Sun Dec 22 13:01:31 2013 +0200
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen/dts: specific bad cell count error
    
    Specify in the error message if bad cell count is in device or parent.
    
    Signed-off-by: Tsahee Zidenberg <tsahee@gmx.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/common/device_tree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 84e709d..a29d9f2 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -999,7 +999,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 %s\n",
+        dt_printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
                   dev->full_name);
         goto bail;
     }
@@ -1029,7 +1029,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
         pbus->count_cells(dev, &pna, &pns);
         if ( !DT_CHECK_COUNTS(pna, pns) )
         {
-            printk(XENLOG_ERR "dt_parse: Bad cell count for %s\n",
+            printk(XENLOG_ERR "dt_parse: Bad cell count for parent %s\n",
                    dev->full_name);
             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 Jan 08 18:23:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xmi-0004IY-60; Wed, 08 Jan 2014 18:23: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 1W0xmg-0004II-8q
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:18 +0000
Received: from [85.158.143.35:60005] by server-1.bemta-4.messagelabs.com id
	07/8F-02132-5979DC25; Wed, 08 Jan 2014 18:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389205395!10444503!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29078 invoked from network); 8 Jan 2014 18:23: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 Jan 2014 18:23: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 1W0xmd-000871-Pk
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmd-0007x6-MC
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:15 +0000
Date: Wed, 08 Jan 2014 18:23:15 +0000
Message-Id: <E1W0xmd-0007x6-MC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: support ns16550a
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dd3ab3881494136999138d70f4fe28ebabe8660c
Author:     Tsahee Zidenberg <tsahee@gmx.com>
AuthorDate: Sun Dec 22 12:59:57 2013 +0200
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    ns16550: support ns16550a
    
    Ns16550a devices are Ns16550 devices with additional capabilities.
    Decare XEN is compatible with this device, to be able to use unmodified
    devicetrees.
    
    Signed-off-by: Tsahee Zidenberg <tsahee@gmx.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/drivers/char/ns16550.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 9c2cded..a947c68 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -817,6 +817,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
 static const char const *ns16550_dt_compat[] __initconst =
 {
     "ns16550",
+    "ns16550a",
     "snps,dw-apb-uart",
     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 Wed Jan 08 18:23:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xmi-0004IY-60; Wed, 08 Jan 2014 18:23: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 1W0xmg-0004II-8q
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:18 +0000
Received: from [85.158.143.35:60005] by server-1.bemta-4.messagelabs.com id
	07/8F-02132-5979DC25; Wed, 08 Jan 2014 18:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389205395!10444503!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29078 invoked from network); 8 Jan 2014 18:23: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 Jan 2014 18:23: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 1W0xmd-000871-Pk
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmd-0007x6-MC
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:15 +0000
Date: Wed, 08 Jan 2014 18:23:15 +0000
Message-Id: <E1W0xmd-0007x6-MC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: support ns16550a
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dd3ab3881494136999138d70f4fe28ebabe8660c
Author:     Tsahee Zidenberg <tsahee@gmx.com>
AuthorDate: Sun Dec 22 12:59:57 2013 +0200
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    ns16550: support ns16550a
    
    Ns16550a devices are Ns16550 devices with additional capabilities.
    Decare XEN is compatible with this device, to be able to use unmodified
    devicetrees.
    
    Signed-off-by: Tsahee Zidenberg <tsahee@gmx.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/drivers/char/ns16550.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 9c2cded..a947c68 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -817,6 +817,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
 static const char const *ns16550_dt_compat[] __initconst =
 {
     "ns16550",
+    "ns16550a",
     "snps,dw-apb-uart",
     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 Wed Jan 08 18:23:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xms-0004KR-8e; Wed, 08 Jan 2014 18:23: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 1W0xmq-0004KB-TJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:29 +0000
Received: from [85.158.137.68:32254] by server-16.bemta-3.messagelabs.com id
	D1/49-26128-0A79DC25; Wed, 08 Jan 2014 18:23:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389205406!7960155!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28860 invoked from network); 8 Jan 2014 18:23:27 -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;
	8 Jan 2014 18:23: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 1W0xmo-000877-2z
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmo-0007xS-1A
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:26 +0000
Date: Wed, 08 Jan 2014 18:23:26 +0000
Message-Id: <E1W0xmo-0007xS-1A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: driver/char: fix const
	declaration of DT compatible 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 57a45785584e651b807eed08f3a6950d4ade0156
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Dec 24 11:28:47 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen: driver/char: fix const declaration of DT compatible list
    
    The data type for DT compatible list should be:
        const char * const[]  __initconst
    
    Fix every serial drivers which support device tree.
    
    Spotted-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/drivers/char/exynos4210-uart.c |    2 +-
 xen/drivers/char/ns16550.c         |    2 +-
 xen/drivers/char/omap-uart.c       |    2 +-
 xen/drivers/char/pl011.c           |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 0a2ac17..0619575 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -361,7 +361,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *exynos4210_dt_compat[] __initdata =
+static const char * const exynos4210_dt_compat[] __initconst =
 {
     "samsung,exynos4210-uart",
     NULL
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index a947c68..e7cb0ba 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -814,7 +814,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *ns16550_dt_compat[] __initconst =
+static const char * const ns16550_dt_compat[] __initconst =
 {
     "ns16550",
     "ns16550a",
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index 321e636..c1580ef 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -354,7 +354,7 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char * const omap_uart_dt_compat[] __initdata =
+static const char * const omap_uart_dt_compat[] __initconst =
 {
     "ti,omap4-uart",
     NULL
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index 613b9eb..fd82511 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -277,7 +277,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *pl011_dt_compat[] __initdata =
+static const char * const pl011_dt_compat[] __initconst =
 {
     "arm,pl011",
     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 Wed Jan 08 18:23:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xms-0004KR-8e; Wed, 08 Jan 2014 18:23: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 1W0xmq-0004KB-TJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:29 +0000
Received: from [85.158.137.68:32254] by server-16.bemta-3.messagelabs.com id
	D1/49-26128-0A79DC25; Wed, 08 Jan 2014 18:23:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389205406!7960155!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28860 invoked from network); 8 Jan 2014 18:23:27 -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;
	8 Jan 2014 18:23: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 1W0xmo-000877-2z
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmo-0007xS-1A
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:26 +0000
Date: Wed, 08 Jan 2014 18:23:26 +0000
Message-Id: <E1W0xmo-0007xS-1A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: driver/char: fix const
	declaration of DT compatible 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 57a45785584e651b807eed08f3a6950d4ade0156
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Dec 24 11:28:47 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:31:20 2014 +0000

    xen: driver/char: fix const declaration of DT compatible list
    
    The data type for DT compatible list should be:
        const char * const[]  __initconst
    
    Fix every serial drivers which support device tree.
    
    Spotted-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/drivers/char/exynos4210-uart.c |    2 +-
 xen/drivers/char/ns16550.c         |    2 +-
 xen/drivers/char/omap-uart.c       |    2 +-
 xen/drivers/char/pl011.c           |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 0a2ac17..0619575 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -361,7 +361,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *exynos4210_dt_compat[] __initdata =
+static const char * const exynos4210_dt_compat[] __initconst =
 {
     "samsung,exynos4210-uart",
     NULL
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index a947c68..e7cb0ba 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -814,7 +814,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *ns16550_dt_compat[] __initconst =
+static const char * const ns16550_dt_compat[] __initconst =
 {
     "ns16550",
     "ns16550a",
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index 321e636..c1580ef 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -354,7 +354,7 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char * const omap_uart_dt_compat[] __initdata =
+static const char * const omap_uart_dt_compat[] __initconst =
 {
     "ti,omap4-uart",
     NULL
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index 613b9eb..fd82511 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -277,7 +277,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
     return 0;
 }
 
-static const char const *pl011_dt_compat[] __initdata =
+static const char * const pl011_dt_compat[] __initconst =
 {
     "arm,pl011",
     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 Wed Jan 08 18:23:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xn3-0004MP-BX; Wed, 08 Jan 2014 18:23:41 +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 1W0xn1-0004M0-40
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:39 +0000
Received: from [193.109.254.147:32002] by server-5.bemta-14.messagelabs.com id
	8D/CD-03510-AA79DC25; Wed, 08 Jan 2014 18:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1389205416!9636111!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26733 invoked from network); 8 Jan 2014 18:23:37 -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;
	8 Jan 2014 18: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 1W0xmy-00087F-JF
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmy-0007yB-FJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:36 +0000
Date: Wed, 08 Jan 2014 18:23:36 +0000
Message-Id: <E1W0xmy-0007yB-FJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX,
	apicv: Set "NMI-window exiting" for NMI
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 185e83591ce420e0b004646b55c5e4783e388531
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Tue Jan 7 14:30:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:30:21 2014 +0100

    VMX,apicv: Set "NMI-window exiting" for NMI
    
    Enable NMI-window exiting if interrupt is blocked by NMI under apicv enabled
    platform.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
---
 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index 7757910..8507432 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -252,10 +252,11 @@ void vmx_intr_assist(void)
         intblk = hvm_interrupt_blocked(v, intack);
         if ( cpu_has_vmx_virtual_intr_delivery )
         {
-            /* Set "Interrupt-window exiting" for ExtINT */
+            /* Set "Interrupt-window exiting" for ExtINT and NMI. */
             if ( (intblk != hvm_intblk_none) &&
-                 ( (intack.source == hvm_intsrc_pic) ||
-                 ( intack.source == hvm_intsrc_vector) ) )
+                 (intack.source == hvm_intsrc_pic ||
+                  intack.source == hvm_intsrc_vector ||
+                  intack.source == hvm_intsrc_nmi) )
             {
                 enable_intr_window(v, intack);
                 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 Jan 08 18:23:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xn3-0004MP-BX; Wed, 08 Jan 2014 18:23:41 +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 1W0xn1-0004M0-40
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:39 +0000
Received: from [193.109.254.147:32002] by server-5.bemta-14.messagelabs.com id
	8D/CD-03510-AA79DC25; Wed, 08 Jan 2014 18:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1389205416!9636111!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26733 invoked from network); 8 Jan 2014 18:23:37 -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;
	8 Jan 2014 18: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 1W0xmy-00087F-JF
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xmy-0007yB-FJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:36 +0000
Date: Wed, 08 Jan 2014 18:23:36 +0000
Message-Id: <E1W0xmy-0007yB-FJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX,
	apicv: Set "NMI-window exiting" for NMI
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 185e83591ce420e0b004646b55c5e4783e388531
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Tue Jan 7 14:30:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:30:21 2014 +0100

    VMX,apicv: Set "NMI-window exiting" for NMI
    
    Enable NMI-window exiting if interrupt is blocked by NMI under apicv enabled
    platform.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
---
 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index 7757910..8507432 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -252,10 +252,11 @@ void vmx_intr_assist(void)
         intblk = hvm_interrupt_blocked(v, intack);
         if ( cpu_has_vmx_virtual_intr_delivery )
         {
-            /* Set "Interrupt-window exiting" for ExtINT */
+            /* Set "Interrupt-window exiting" for ExtINT and NMI. */
             if ( (intblk != hvm_intblk_none) &&
-                 ( (intack.source == hvm_intsrc_pic) ||
-                 ( intack.source == hvm_intsrc_vector) ) )
+                 (intack.source == hvm_intsrc_pic ||
+                  intack.source == hvm_intsrc_vector ||
+                  intack.source == hvm_intsrc_nmi) )
             {
                 enable_intr_window(v, intack);
                 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 Jan 08 18:23:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xnD-0004OU-EW; Wed, 08 Jan 2014 18:23: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 1W0xnC-0004OE-Ki
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:50 +0000
Received: from [193.109.254.147:59065] by server-10.bemta-14.messagelabs.com
	id 62/E4-20752-5B79DC25; Wed, 08 Jan 2014 18:23:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1389205427!9631533!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29811 invoked from network); 8 Jan 2014 18:23:47 -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;
	8 Jan 2014 18: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 1W0xn8-00087L-RP
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xn8-0007z3-NR
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:46 +0000
Date: Wed, 08 Jan 2014 18:23:46 +0000
Message-Id: <E1W0xn8-0007z3-NR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX: Eliminate cr3 save/loading
	exiting when UG enabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f4fed540e78ac8a2bd3b1dee53a5206dde25f613
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Tue Jan 7 14:30:47 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:30:47 2014 +0100

    VMX: Eliminate cr3 save/loading exiting when UG enabled
    
    With the feature of unrestricted guest, there should be no vmexit
    be triggered when guest accesses the cr3 in non-paging mode. This
    patch will clear the cr3 save/loading bit in vmcs control filed to
    eliminate cr3 access vmexit on UG avaliable hardware.
    
    The previous patch (commit c9efe34c119418a5ac776e5d91aeefcce4576518)
    did the same thing compare to this one. But it will cause guest fail
    to boot up on non-UG hardware which is repoted by Jan and it has been
    reverted (commit 1e2bf05ec37cf04b0e01585eae524509179f165e).
    
    This patch incorporate the fixing and guest are working well both in
    UG and non-UG platform with this patch.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/vmx/vmx.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index dfff628..f6409d6 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1157,7 +1157,7 @@ static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr)
             uint32_t cr3_ctls = (CPU_BASED_CR3_LOAD_EXITING |
                                  CPU_BASED_CR3_STORE_EXITING);
             v->arch.hvm_vmx.exec_control &= ~cr3_ctls;
-            if ( !hvm_paging_enabled(v) )
+            if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm_vmx.exec_control |= cr3_ctls;
 
             /* Trap CR3 updates if CR3 memory events are enabled. */
@@ -1231,7 +1231,7 @@ static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr)
     case 3:
         if ( paging_mode_hap(v->domain) )
         {
-            if ( !hvm_paging_enabled(v) )
+            if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm_vcpu.hw_cr[3] =
                     v->domain->arch.hvm_domain.params[HVM_PARAM_IDENT_PT];
             vmx_load_pdptrs(v);
@@ -2487,10 +2487,11 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
 
     hvm_invalidate_regs_fields(regs);
 
-    if ( paging_mode_hap(v->domain) && hvm_paging_enabled(v) )
+    if ( paging_mode_hap(v->domain) )
     {
         __vmread(GUEST_CR3, &v->arch.hvm_vcpu.hw_cr[3]);
-        v->arch.hvm_vcpu.guest_cr[3] = v->arch.hvm_vcpu.hw_cr[3];
+        if ( vmx_unrestricted_guest(v) || hvm_paging_enabled(v) )
+            v->arch.hvm_vcpu.guest_cr[3] = v->arch.hvm_vcpu.hw_cr[3];
     }
 
     __vmread(VM_EXIT_REASON, &exit_reason);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:23:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:23: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 1W0xnD-0004OU-EW; Wed, 08 Jan 2014 18:23: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 1W0xnC-0004OE-Ki
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:50 +0000
Received: from [193.109.254.147:59065] by server-10.bemta-14.messagelabs.com
	id 62/E4-20752-5B79DC25; Wed, 08 Jan 2014 18:23:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1389205427!9631533!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29811 invoked from network); 8 Jan 2014 18:23:47 -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;
	8 Jan 2014 18: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 1W0xn8-00087L-RP
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xn8-0007z3-NR
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:46 +0000
Date: Wed, 08 Jan 2014 18:23:46 +0000
Message-Id: <E1W0xn8-0007z3-NR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX: Eliminate cr3 save/loading
	exiting when UG enabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f4fed540e78ac8a2bd3b1dee53a5206dde25f613
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Tue Jan 7 14:30:47 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:30:47 2014 +0100

    VMX: Eliminate cr3 save/loading exiting when UG enabled
    
    With the feature of unrestricted guest, there should be no vmexit
    be triggered when guest accesses the cr3 in non-paging mode. This
    patch will clear the cr3 save/loading bit in vmcs control filed to
    eliminate cr3 access vmexit on UG avaliable hardware.
    
    The previous patch (commit c9efe34c119418a5ac776e5d91aeefcce4576518)
    did the same thing compare to this one. But it will cause guest fail
    to boot up on non-UG hardware which is repoted by Jan and it has been
    reverted (commit 1e2bf05ec37cf04b0e01585eae524509179f165e).
    
    This patch incorporate the fixing and guest are working well both in
    UG and non-UG platform with this patch.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/vmx/vmx.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index dfff628..f6409d6 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1157,7 +1157,7 @@ static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr)
             uint32_t cr3_ctls = (CPU_BASED_CR3_LOAD_EXITING |
                                  CPU_BASED_CR3_STORE_EXITING);
             v->arch.hvm_vmx.exec_control &= ~cr3_ctls;
-            if ( !hvm_paging_enabled(v) )
+            if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm_vmx.exec_control |= cr3_ctls;
 
             /* Trap CR3 updates if CR3 memory events are enabled. */
@@ -1231,7 +1231,7 @@ static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr)
     case 3:
         if ( paging_mode_hap(v->domain) )
         {
-            if ( !hvm_paging_enabled(v) )
+            if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm_vcpu.hw_cr[3] =
                     v->domain->arch.hvm_domain.params[HVM_PARAM_IDENT_PT];
             vmx_load_pdptrs(v);
@@ -2487,10 +2487,11 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
 
     hvm_invalidate_regs_fields(regs);
 
-    if ( paging_mode_hap(v->domain) && hvm_paging_enabled(v) )
+    if ( paging_mode_hap(v->domain) )
     {
         __vmread(GUEST_CR3, &v->arch.hvm_vcpu.hw_cr[3]);
-        v->arch.hvm_vcpu.guest_cr[3] = v->arch.hvm_vcpu.hw_cr[3];
+        if ( vmx_unrestricted_guest(v) || hvm_paging_enabled(v) )
+            v->arch.hvm_vcpu.guest_cr[3] = v->arch.hvm_vcpu.hw_cr[3];
     }
 
     __vmread(VM_EXIT_REASON, &exit_reason);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xnM-0004QI-HS; Wed, 08 Jan 2014 18:24: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 1W0xnL-0004Q6-Mn
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:59 +0000
Received: from [85.158.137.68:33546] by server-1.bemta-3.messagelabs.com id
	8A/FC-29598-EB79DC25; Wed, 08 Jan 2014 18:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1389205437!8008978!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18344 invoked from network); 8 Jan 2014 18:23:58 -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 Jan 2014 18:23: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 1W0xnJ-00087U-05
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnI-0007zP-VM
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:56 +0000
Date: Wed, 08 Jan 2014 18:23:56 +0000
Message-Id: <E1W0xnI-0007zP-VM@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 b764615c391fdc2648d460245c748a3a319a296e
Merge: 57a45785584e651b807eed08f3a6950d4ade0156 f4fed540e78ac8a2bd3b1dee53a5206dde25f613
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 13:50:35 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:50:35 2014 +0000

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

 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 xen/arch/x86/hvm/vmx/vmx.c  |    9 +++++----
 2 files changed, 9 insertions(+), 7 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 Jan 08 18:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xnM-0004QI-HS; Wed, 08 Jan 2014 18:24: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 1W0xnL-0004Q6-Mn
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:59 +0000
Received: from [85.158.137.68:33546] by server-1.bemta-3.messagelabs.com id
	8A/FC-29598-EB79DC25; Wed, 08 Jan 2014 18:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1389205437!8008978!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18344 invoked from network); 8 Jan 2014 18:23:58 -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 Jan 2014 18:23: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 1W0xnJ-00087U-05
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnI-0007zP-VM
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:23:56 +0000
Date: Wed, 08 Jan 2014 18:23:56 +0000
Message-Id: <E1W0xnI-0007zP-VM@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 b764615c391fdc2648d460245c748a3a319a296e
Merge: 57a45785584e651b807eed08f3a6950d4ade0156 f4fed540e78ac8a2bd3b1dee53a5206dde25f613
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 13:50:35 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 13:50:35 2014 +0000

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

 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 xen/arch/x86/hvm/vmx/vmx.c  |    9 +++++----
 2 files changed, 9 insertions(+), 7 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 Jan 08 18:24:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xnZ-0004Sd-Nf; Wed, 08 Jan 2014 18:24: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 1W0xnY-0004SL-BI
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:12 +0000
Received: from [85.158.137.68:23060] by server-5.bemta-3.messagelabs.com id
	F2/85-25188-BC79DC25; Wed, 08 Jan 2014 18:24:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389205449!7991981!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23959 invoked from network); 8 Jan 2014 18:24:10 -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;
	8 Jan 2014 18:24: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 1W0xnT-000883-6o
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnT-0007zv-4W
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:07 +0000
Date: Wed, 08 Jan 2014 18:24:07 +0000
Message-Id: <E1W0xnT-0007zv-4W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: context switch the aux
	memory attribute registers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4746b5adc396bb2fc963b3156eab7267c6e7e541
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Dec 20 15:08:08 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 14:25:30 2014 +0000

    xen: arm: context switch the aux memory attribute registers
    
    We appear to have somehow missed these. Linux doesn't actually use them and
    none of the processors I've looked at actually define any bits in them (so
    they are UNK/SBZP) but it is good form to context switch them anyway.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain.c        |    6 ++++++
 xen/include/asm-arm/cpregs.h |    2 ++
 xen/include/asm-arm/domain.h |    2 ++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 4099e88..124cccf 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -98,8 +98,11 @@ static void ctxt_switch_from(struct vcpu *p)
 #if defined(CONFIG_ARM_32)
     p->arch.mair0 = READ_CP32(MAIR0);
     p->arch.mair1 = READ_CP32(MAIR1);
+    p->arch.amair0 = READ_CP32(AMAIR0);
+    p->arch.amair1 = READ_CP32(AMAIR1);
 #else
     p->arch.mair = READ_SYSREG64(MAIR_EL1);
+    p->arch.amair = READ_SYSREG64(AMAIR_EL1);
 #endif
 
     /* Fault Status */
@@ -177,8 +180,11 @@ static void ctxt_switch_to(struct vcpu *n)
 #if defined(CONFIG_ARM_32)
     WRITE_CP32(n->arch.mair0, MAIR0);
     WRITE_CP32(n->arch.mair1, MAIR1);
+    WRITE_CP32(n->arch.amair0, AMAIR0);
+    WRITE_CP32(n->arch.amair1, AMAIR1);
 #elif defined(CONFIG_ARM_64)
     WRITE_SYSREG64(n->arch.mair, MAIR_EL1);
+    WRITE_SYSREG64(n->arch.amair, AMAIR_EL1);
 #endif
     isb();
 
diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index d5f138a..f0f1d53 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -200,6 +200,8 @@
 #define MAIR1           p15,0,c10,c2,1  /* Memory Attribute Indirection Register 1 AKA NMRR */
 #define HMAIR0          p15,4,c10,c2,0  /* Hyp. Memory Attribute Indirection Register 0 */
 #define HMAIR1          p15,4,c10,c2,1  /* Hyp. Memory Attribute Indirection Register 1 */
+#define AMAIR0          p15,0,c10,c3,0  /* Aux. Memory Attribute Indirection Register 0 */
+#define AMAIR1          p15,0,c10,c3,1  /* Aux. Memory Attribute Indirection Register 1 */
 
 /* CP15 CR11: DMA Operations for TCM Access */
 
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index e2202a6..bc20a15 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -221,8 +221,10 @@ struct arch_vcpu
     uint64_t par;
 #ifdef CONFIG_ARM_32
     uint32_t mair0, mair1;
+    uint32_t amair0, amair1;
 #else
     uint64_t mair;
+    uint64_t amair;
 #endif
 
     /* Control Registers */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xnZ-0004Sd-Nf; Wed, 08 Jan 2014 18:24: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 1W0xnY-0004SL-BI
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:12 +0000
Received: from [85.158.137.68:23060] by server-5.bemta-3.messagelabs.com id
	F2/85-25188-BC79DC25; Wed, 08 Jan 2014 18:24:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389205449!7991981!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23959 invoked from network); 8 Jan 2014 18:24:10 -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;
	8 Jan 2014 18:24: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 1W0xnT-000883-6o
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnT-0007zv-4W
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:07 +0000
Date: Wed, 08 Jan 2014 18:24:07 +0000
Message-Id: <E1W0xnT-0007zv-4W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: context switch the aux
	memory attribute registers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4746b5adc396bb2fc963b3156eab7267c6e7e541
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Dec 20 15:08:08 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 14:25:30 2014 +0000

    xen: arm: context switch the aux memory attribute registers
    
    We appear to have somehow missed these. Linux doesn't actually use them and
    none of the processors I've looked at actually define any bits in them (so
    they are UNK/SBZP) but it is good form to context switch them anyway.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain.c        |    6 ++++++
 xen/include/asm-arm/cpregs.h |    2 ++
 xen/include/asm-arm/domain.h |    2 ++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 4099e88..124cccf 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -98,8 +98,11 @@ static void ctxt_switch_from(struct vcpu *p)
 #if defined(CONFIG_ARM_32)
     p->arch.mair0 = READ_CP32(MAIR0);
     p->arch.mair1 = READ_CP32(MAIR1);
+    p->arch.amair0 = READ_CP32(AMAIR0);
+    p->arch.amair1 = READ_CP32(AMAIR1);
 #else
     p->arch.mair = READ_SYSREG64(MAIR_EL1);
+    p->arch.amair = READ_SYSREG64(AMAIR_EL1);
 #endif
 
     /* Fault Status */
@@ -177,8 +180,11 @@ static void ctxt_switch_to(struct vcpu *n)
 #if defined(CONFIG_ARM_32)
     WRITE_CP32(n->arch.mair0, MAIR0);
     WRITE_CP32(n->arch.mair1, MAIR1);
+    WRITE_CP32(n->arch.amair0, AMAIR0);
+    WRITE_CP32(n->arch.amair1, AMAIR1);
 #elif defined(CONFIG_ARM_64)
     WRITE_SYSREG64(n->arch.mair, MAIR_EL1);
+    WRITE_SYSREG64(n->arch.amair, AMAIR_EL1);
 #endif
     isb();
 
diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index d5f138a..f0f1d53 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -200,6 +200,8 @@
 #define MAIR1           p15,0,c10,c2,1  /* Memory Attribute Indirection Register 1 AKA NMRR */
 #define HMAIR0          p15,4,c10,c2,0  /* Hyp. Memory Attribute Indirection Register 0 */
 #define HMAIR1          p15,4,c10,c2,1  /* Hyp. Memory Attribute Indirection Register 1 */
+#define AMAIR0          p15,0,c10,c3,0  /* Aux. Memory Attribute Indirection Register 0 */
+#define AMAIR1          p15,0,c10,c3,1  /* Aux. Memory Attribute Indirection Register 1 */
 
 /* CP15 CR11: DMA Operations for TCM Access */
 
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index e2202a6..bc20a15 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -221,8 +221,10 @@ struct arch_vcpu
     uint64_t par;
 #ifdef CONFIG_ARM_32
     uint32_t mair0, mair1;
+    uint32_t amair0, amair1;
 #else
     uint64_t mair;
+    uint64_t amair;
 #endif
 
     /* Control Registers */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xng-0004UK-SQ; Wed, 08 Jan 2014 18:24: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 1W0xng-0004U2-3K
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:20 +0000
Received: from [85.158.143.35:64745] by server-2.bemta-4.messagelabs.com id
	03/A0-11386-3D79DC25; Wed, 08 Jan 2014 18:24:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1389205457!3362608!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26295 invoked from network); 8 Jan 2014 18:24:18 -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 Jan 2014 18: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 1W0xnd-00088O-NY
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnd-00080q-K1
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:17 +0000
Date: Wed, 08 Jan 2014 18:24:17 +0000
Message-Id: <E1W0xnd-00080q-K1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/iommu_detect: don't leak iommu
	structure on error paths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2af30e62c4e562d7a4ec4185fdab20fb29354fd8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:57:15 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:57:15 2014 +0100

    AMD/iommu_detect: don't leak iommu structure on error paths
    
    Tweak the logic slightly to return the real errors from
    get_iommu_{,msi_}capabilities(), which at the moment is no functional change.
    
    Coverity-ID: 1146950
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu_detect.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_detect.c b/xen/drivers/passthrough/amd/iommu_detect.c
index 6c10885..be1b761 100644
--- a/xen/drivers/passthrough/amd/iommu_detect.c
+++ b/xen/drivers/passthrough/amd/iommu_detect.c
@@ -145,11 +145,11 @@ int __init amd_iommu_detect_one_acpi(
     rt = get_iommu_capabilities(iommu->seg, bus, dev, func,
                                 iommu->cap_offset, iommu);
     if ( rt )
-        return -ENODEV;
+        goto out;
 
     rt = get_iommu_msi_capabilities(iommu->seg, bus, dev, func, iommu);
     if ( rt )
-        return -ENODEV;
+        goto out;
 
     rt = pci_ro_device(iommu->seg, bus, PCI_DEVFN(dev, func));
     if ( rt )
@@ -158,6 +158,11 @@ int __init amd_iommu_detect_one_acpi(
                iommu->seg, bus, dev, func, rt);
 
     list_add_tail(&iommu->list, &amd_iommu_head);
+    rt = 0;
 
-    return 0;
+ out:
+    if ( rt )
+        xfree(iommu);
+
+    return rt;
 }
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xng-0004UK-SQ; Wed, 08 Jan 2014 18:24: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 1W0xng-0004U2-3K
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:20 +0000
Received: from [85.158.143.35:64745] by server-2.bemta-4.messagelabs.com id
	03/A0-11386-3D79DC25; Wed, 08 Jan 2014 18:24:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1389205457!3362608!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26295 invoked from network); 8 Jan 2014 18:24:18 -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 Jan 2014 18: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 1W0xnd-00088O-NY
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnd-00080q-K1
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:17 +0000
Date: Wed, 08 Jan 2014 18:24:17 +0000
Message-Id: <E1W0xnd-00080q-K1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/iommu_detect: don't leak iommu
	structure on error paths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2af30e62c4e562d7a4ec4185fdab20fb29354fd8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:57:15 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:57:15 2014 +0100

    AMD/iommu_detect: don't leak iommu structure on error paths
    
    Tweak the logic slightly to return the real errors from
    get_iommu_{,msi_}capabilities(), which at the moment is no functional change.
    
    Coverity-ID: 1146950
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu_detect.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_detect.c b/xen/drivers/passthrough/amd/iommu_detect.c
index 6c10885..be1b761 100644
--- a/xen/drivers/passthrough/amd/iommu_detect.c
+++ b/xen/drivers/passthrough/amd/iommu_detect.c
@@ -145,11 +145,11 @@ int __init amd_iommu_detect_one_acpi(
     rt = get_iommu_capabilities(iommu->seg, bus, dev, func,
                                 iommu->cap_offset, iommu);
     if ( rt )
-        return -ENODEV;
+        goto out;
 
     rt = get_iommu_msi_capabilities(iommu->seg, bus, dev, func, iommu);
     if ( rt )
-        return -ENODEV;
+        goto out;
 
     rt = pci_ro_device(iommu->seg, bus, PCI_DEVFN(dev, func));
     if ( rt )
@@ -158,6 +158,11 @@ int __init amd_iommu_detect_one_acpi(
                iommu->seg, bus, dev, func, rt);
 
     list_add_tail(&iommu->list, &amd_iommu_head);
+    rt = 0;
 
-    return 0;
+ out:
+    if ( rt )
+        xfree(iommu);
+
+    return rt;
 }
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xns-0004Wc-2G; Wed, 08 Jan 2014 18:24: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 1W0xnq-0004WI-DZ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:30 +0000
Received: from [85.158.139.211:34729] by server-4.bemta-5.messagelabs.com id
	E1/21-26791-DD79DC25; Wed, 08 Jan 2014 18:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1389205468!8625555!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11714 invoked from network); 8 Jan 2014 18:24:29 -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;
	8 Jan 2014 18:24: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 1W0xnn-00088W-T1
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnn-00081F-Rt
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:27 +0000
Date: Wed, 08 Jan 2014 18:24:27 +0000
Message-Id: <E1W0xnn-00081F-Rt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/microcode: avoid use-after-free
	for the microcode buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a9fe8c7dda440b84e178d65dcd64c0173b0a4b5d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:58:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:58:35 2014 +0100

    AMD/microcode: avoid use-after-free for the microcode buffer
    
    It is possible to free the mc_old buffer and then store it for use in the case
    of resume.
    
    This keeps the old semantics of being able to return an error even after a
    successful microcode application.
    
    Coverity-ID 1146953
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 xen/arch/x86/microcode_amd.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index a3ceef8..3014245 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -275,7 +275,7 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
     struct microcode_amd *mc_amd, *mc_old;
     size_t offset = bufsize;
     size_t last_offset, applied_offset = 0;
-    int error = 0;
+    int error = 0, save_error = 1;
     struct ucode_cpu_info *uci = &per_cpu(ucode_cpu_info, cpu);
 
     /* We should bind the task to the CPU */
@@ -338,19 +338,20 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
      */
     if ( applied_offset )
     {
-        int ret = get_ucode_from_buffer_amd(mc_amd, buf, bufsize,
-                                            &applied_offset);
-        if ( ret == 0 )
-            xfree(mc_old);
-        else
-            error = ret;
+        save_error = get_ucode_from_buffer_amd(
+            mc_amd, buf, bufsize, &applied_offset);
+
+        if ( save_error )
+            error = save_error;
     }
 
-    if ( !applied_offset || error )
+    if ( save_error )
     {
         xfree(mc_amd);
         uci->mc.mc_amd = mc_old;
     }
+    else
+        xfree(mc_old);
 
   out:
     svm_host_osvw_init();
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:24: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 1W0xns-0004Wc-2G; Wed, 08 Jan 2014 18:24: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 1W0xnq-0004WI-DZ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:30 +0000
Received: from [85.158.139.211:34729] by server-4.bemta-5.messagelabs.com id
	E1/21-26791-DD79DC25; Wed, 08 Jan 2014 18:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1389205468!8625555!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11714 invoked from network); 8 Jan 2014 18:24:29 -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;
	8 Jan 2014 18:24: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 1W0xnn-00088W-T1
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xnn-00081F-Rt
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:27 +0000
Date: Wed, 08 Jan 2014 18:24:27 +0000
Message-Id: <E1W0xnn-00081F-Rt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/microcode: avoid use-after-free
	for the microcode buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a9fe8c7dda440b84e178d65dcd64c0173b0a4b5d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:58:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:58:35 2014 +0100

    AMD/microcode: avoid use-after-free for the microcode buffer
    
    It is possible to free the mc_old buffer and then store it for use in the case
    of resume.
    
    This keeps the old semantics of being able to return an error even after a
    successful microcode application.
    
    Coverity-ID 1146953
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 xen/arch/x86/microcode_amd.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index a3ceef8..3014245 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -275,7 +275,7 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
     struct microcode_amd *mc_amd, *mc_old;
     size_t offset = bufsize;
     size_t last_offset, applied_offset = 0;
-    int error = 0;
+    int error = 0, save_error = 1;
     struct ucode_cpu_info *uci = &per_cpu(ucode_cpu_info, cpu);
 
     /* We should bind the task to the CPU */
@@ -338,19 +338,20 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
      */
     if ( applied_offset )
     {
-        int ret = get_ucode_from_buffer_amd(mc_amd, buf, bufsize,
-                                            &applied_offset);
-        if ( ret == 0 )
-            xfree(mc_old);
-        else
-            error = ret;
+        save_error = get_ucode_from_buffer_amd(
+            mc_amd, buf, bufsize, &applied_offset);
+
+        if ( save_error )
+            error = save_error;
     }
 
-    if ( !applied_offset || error )
+    if ( save_error )
     {
         xfree(mc_amd);
         uci->mc.mc_amd = mc_old;
     }
+    else
+        xfree(mc_old);
 
   out:
     svm_host_osvw_init();
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xo2-0004Yn-54; Wed, 08 Jan 2014 18:24:42 +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 1W0xo0-0004YU-Uu
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:41 +0000
Received: from [85.158.139.211:35189] by server-8.bemta-5.messagelabs.com id
	61/E8-29838-8E79DC25; Wed, 08 Jan 2014 18:24:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389205478!8436164!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17877 invoked from network); 8 Jan 2014 18:24:39 -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;
	8 Jan 2014 18: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 1W0xny-00088c-5z
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xny-00081g-0f
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:38 +0000
Date: Wed, 08 Jan 2014 18:24:38 +0000
Message-Id: <E1W0xny-00081g-0f@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VTD/DMAR: free() correct pointer on
	error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 62d33ca1048f4e08eaeb026c7b79239b4605b636
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:59:31 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:59:31 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/vtd/dmar.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8e162ff..cb998e2 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -312,7 +312,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_pci_path *path;
     struct acpi_drhd_unit *drhd = type == DMAR_TYPE ?
         container_of(scope, struct acpi_drhd_unit, scope) : NULL;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -364,9 +364,10 @@ static int __init acpi_parse_dev_scope(
             {
                 struct acpi_hpet_unit *acpi_hpet_unit;
 
+                ret = -ENOMEM;
                 acpi_hpet_unit = xmalloc(struct acpi_hpet_unit);
                 if ( !acpi_hpet_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_hpet_unit->id = acpi_scope->enumeration_id;
                 acpi_hpet_unit->bus = bus;
                 acpi_hpet_unit->dev = path->dev;
@@ -397,9 +398,10 @@ static int __init acpi_parse_dev_scope(
 
             if ( drhd )
             {
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -420,7 +422,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -708,7 +716,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return 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 Jan 08 18:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xo2-0004Yn-54; Wed, 08 Jan 2014 18:24:42 +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 1W0xo0-0004YU-Uu
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:41 +0000
Received: from [85.158.139.211:35189] by server-8.bemta-5.messagelabs.com id
	61/E8-29838-8E79DC25; Wed, 08 Jan 2014 18:24:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389205478!8436164!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17877 invoked from network); 8 Jan 2014 18:24:39 -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;
	8 Jan 2014 18: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 1W0xny-00088c-5z
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xny-00081g-0f
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:38 +0000
Date: Wed, 08 Jan 2014 18:24:38 +0000
Message-Id: <E1W0xny-00081g-0f@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VTD/DMAR: free() correct pointer on
	error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 62d33ca1048f4e08eaeb026c7b79239b4605b636
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 14:59:31 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 14:59:31 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/vtd/dmar.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8e162ff..cb998e2 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -312,7 +312,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_pci_path *path;
     struct acpi_drhd_unit *drhd = type == DMAR_TYPE ?
         container_of(scope, struct acpi_drhd_unit, scope) : NULL;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -364,9 +364,10 @@ static int __init acpi_parse_dev_scope(
             {
                 struct acpi_hpet_unit *acpi_hpet_unit;
 
+                ret = -ENOMEM;
                 acpi_hpet_unit = xmalloc(struct acpi_hpet_unit);
                 if ( !acpi_hpet_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_hpet_unit->id = acpi_scope->enumeration_id;
                 acpi_hpet_unit->bus = bus;
                 acpi_hpet_unit->dev = path->dev;
@@ -397,9 +398,10 @@ static int __init acpi_parse_dev_scope(
 
             if ( drhd )
             {
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -420,7 +422,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -708,7 +716,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return 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 Jan 08 18:24:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xoC-0004aR-7t; Wed, 08 Jan 2014 18:24:52 +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 1W0xoB-0004aB-3f
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:51 +0000
Received: from [85.158.137.68:42865] by server-5.bemta-3.messagelabs.com id
	47/F5-25188-2F79DC25; Wed, 08 Jan 2014 18:24:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1389205488!7987590!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27140 invoked from network); 8 Jan 2014 18:24:49 -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;
	8 Jan 2014 18:24: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 1W0xo8-00088i-AV
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xo8-00082m-9G
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:48 +0000
Date: Wed, 08 Jan 2014 18:24:48 +0000
Message-Id: <E1W0xo8-00082m-9G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/IOMMU: fix infinite loop due to
	ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 81b1c7de2339d2788352b162057e70130803f3cf
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Tue Jan 7 15:09:42 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 15:09:42 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index fca2037..9d05f7b 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -159,7 +159,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -237,7 +237,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -292,7 +293,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -430,7 +431,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -511,7 +512,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -590,7 +591,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index b431d16..4686813 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -524,7 +524,8 @@ static hw_irq_controller iommu_maskable_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, flags;
+    u16 domain_id, device_id, flags;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1103,7 +1104,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1118,7 +1119,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1156,7 +1157,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1306,7 +1307,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf; 
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:24:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18: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 1W0xoC-0004aR-7t; Wed, 08 Jan 2014 18:24:52 +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 1W0xoB-0004aB-3f
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:51 +0000
Received: from [85.158.137.68:42865] by server-5.bemta-3.messagelabs.com id
	47/F5-25188-2F79DC25; Wed, 08 Jan 2014 18:24:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1389205488!7987590!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27140 invoked from network); 8 Jan 2014 18:24:49 -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;
	8 Jan 2014 18:24: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 1W0xo8-00088i-AV
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xo8-00082m-9G
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:48 +0000
Date: Wed, 08 Jan 2014 18:24:48 +0000
Message-Id: <E1W0xo8-00082m-9G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] AMD/IOMMU: fix infinite loop due to
	ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 81b1c7de2339d2788352b162057e70130803f3cf
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Tue Jan 7 15:09:42 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 15:09:42 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index fca2037..9d05f7b 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -159,7 +159,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -237,7 +237,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -292,7 +293,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -430,7 +431,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -511,7 +512,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -590,7 +591,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index b431d16..4686813 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -524,7 +524,8 @@ static hw_irq_controller iommu_maskable_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, flags;
+    u16 domain_id, device_id, flags;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1103,7 +1104,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1118,7 +1119,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1156,7 +1157,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1306,7 +1307,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf; 
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 08 18:25:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:25: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 1W0xoM-0004cb-Ai; Wed, 08 Jan 2014 18:25:02 +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 1W0xoL-0004cL-Ac
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:01 +0000
Received: from [85.158.137.68:40047] by server-7.bemta-3.messagelabs.com id
	20/30-27599-CF79DC25; Wed, 08 Jan 2014 18:25:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1389205498!4339346!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6642 invoked from network); 8 Jan 2014 18:24:59 -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 Jan 2014 18: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 1W0xoI-00088r-HJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xoI-000838-FR
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:58 +0000
Date: Wed, 08 Jan 2014 18:24:58 +0000
Message-Id: <E1W0xoI-000838-FR@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 cc0a6c6c749a8693dc0e201773c10cd97e5e6ce0
Merge: 4746b5adc396bb2fc963b3156eab7267c6e7e541 81b1c7de2339d2788352b162057e70130803f3cf
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 14:32:45 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 14:32:45 2014 +0000

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

 xen/arch/x86/microcode_amd.c               |   17 +++++++++--------
 xen/drivers/passthrough/amd/iommu_acpi.c   |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_detect.c |   11 ++++++++---
 xen/drivers/passthrough/amd/iommu_init.c   |   12 +++++++-----
 xen/drivers/passthrough/vtd/dmar.c         |   18 +++++++++++++-----
 5 files changed, 44 insertions(+), 27 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 Jan 08 18:25:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:25: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 1W0xoM-0004cb-Ai; Wed, 08 Jan 2014 18:25:02 +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 1W0xoL-0004cL-Ac
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:01 +0000
Received: from [85.158.137.68:40047] by server-7.bemta-3.messagelabs.com id
	20/30-27599-CF79DC25; Wed, 08 Jan 2014 18:25:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1389205498!4339346!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6642 invoked from network); 8 Jan 2014 18:24:59 -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 Jan 2014 18: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 1W0xoI-00088r-HJ
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xoI-000838-FR
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:24:58 +0000
Date: Wed, 08 Jan 2014 18:24:58 +0000
Message-Id: <E1W0xoI-000838-FR@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 cc0a6c6c749a8693dc0e201773c10cd97e5e6ce0
Merge: 4746b5adc396bb2fc963b3156eab7267c6e7e541 81b1c7de2339d2788352b162057e70130803f3cf
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 14:32:45 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 7 14:32:45 2014 +0000

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

 xen/arch/x86/microcode_amd.c               |   17 +++++++++--------
 xen/drivers/passthrough/amd/iommu_acpi.c   |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_detect.c |   11 ++++++++---
 xen/drivers/passthrough/amd/iommu_init.c   |   12 +++++++-----
 xen/drivers/passthrough/vtd/dmar.c         |   18 +++++++++++++-----
 5 files changed, 44 insertions(+), 27 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 Jan 08 18:25:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:25:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W0xoW-0004eT-EF; Wed, 08 Jan 2014 18:25: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 1W0xoV-0004eH-Ie
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:11 +0000
Received: from [193.109.254.147:40867] by server-1.bemta-14.messagelabs.com id
	59/6D-15600-6089DC25; Wed, 08 Jan 2014 18:25:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389205508!9643245!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23322 invoked from network); 8 Jan 2014 18:25:09 -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 Jan 2014 18:25: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 1W0xoS-00089Q-O5
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xoS-00083h-Lh
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:08 +0000
Date: Wed, 08 Jan 2014 18:25:08 +0000
Message-Id: <E1W0xoS-00083h-Lh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] IOMMU: make page table deallocation
	preemptible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cedfdd43a9798e535a05690bb6f01394490d26bb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 7 16:01:14 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 16:01:14 2014 +0100

    IOMMU: make page table deallocation preemptible
    
    This too can take an arbitrary amount of time.
    
    In fact, the bulk of the work is being moved to a tasklet, as handling
    the necessary preemption logic in line seems close to impossible given
    that the teardown may also be invoked on error paths.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 xen/drivers/passthrough/amd/pci_amd_iommu.c |   15 +++++++-
 xen/drivers/passthrough/iommu.c             |   51 ++++++++++++++++++--------
 xen/drivers/passthrough/vtd/iommu.c         |   18 ++++++++--
 xen/include/xen/iommu.h                     |    5 +++
 4 files changed, 68 insertions(+), 21 deletions(-)

diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 7241aad..c26aabc 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -405,11 +405,21 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
     return reassign_device(dom0, d, devfn, pdev);
 }
 
-static void deallocate_next_page_table(struct page_info* pg, int level)
+static void deallocate_next_page_table(struct page_info *pg, int level)
+{
+    PFN_ORDER(pg) = level;
+    spin_lock(&iommu_pt_cleanup_lock);
+    page_list_add_tail(pg, &iommu_pt_cleanup_list);
+    spin_unlock(&iommu_pt_cleanup_lock);
+}
+
+static void deallocate_page_table(struct page_info *pg)
 {
     void *table_vaddr, *pde;
     u64 next_table_maddr;
-    int index, next_level;
+    unsigned int index, level = PFN_ORDER(pg), next_level;
+
+    PFN_ORDER(pg) = 0;
 
     if ( level <= 1 )
     {
@@ -599,6 +609,7 @@ const struct iommu_ops amd_iommu_ops = {
     .teardown = amd_iommu_domain_destroy,
     .map_page = amd_iommu_map_page,
     .unmap_page = amd_iommu_unmap_page,
+    .free_page_table = deallocate_page_table,
     .reassign_device = reassign_device,
     .get_device_group_id = amd_iommu_group_id,
     .update_ire_from_apic = amd_iommu_ioapic_update_ire,
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index e3b84f4..19b0e23 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -58,6 +58,10 @@ bool_t __read_mostly amd_iommu_perdev_intremap = 1;
 
 DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+DEFINE_SPINLOCK(iommu_pt_cleanup_lock);
+PAGE_LIST_HEAD(iommu_pt_cleanup_list);
+static struct tasklet iommu_pt_cleanup_tasklet;
+
 static struct keyhandler iommu_p2m_table = {
     .diagnostic = 0,
     .u.fn = iommu_dump_p2m_table,
@@ -251,6 +255,15 @@ int iommu_remove_device(struct pci_dev *pdev)
     return hd->platform_ops->remove_device(pdev->devfn, pdev);
 }
 
+static void iommu_teardown(struct domain *d)
+{
+    const struct hvm_iommu *hd = domain_hvm_iommu(d);
+
+    d->need_iommu = 0;
+    hd->platform_ops->teardown(d);
+    tasklet_schedule(&iommu_pt_cleanup_tasklet);
+}
+
 /*
  * If the device isn't owned by dom0, it means it already
  * has been assigned to other domain, or it doesn't exist.
@@ -325,10 +338,7 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
 
  done:
     if ( !has_arch_pdevs(d) && need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
     spin_unlock(&pcidevs_lock);
 
     return rc;
@@ -393,10 +403,7 @@ static int iommu_populate_page_table(struct domain *d)
     if ( !rc )
         iommu_iotlb_flush_all(d);
     else if ( rc != -ERESTART )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     return rc;
 }
@@ -413,10 +420,7 @@ void iommu_domain_destroy(struct domain *d)
         return;
 
     if ( need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     list_for_each_safe ( ioport_list, tmp, &hd->g2m_ioport_list )
     {
@@ -454,6 +458,23 @@ int iommu_unmap_page(struct domain *d, unsigned long gfn)
     return hd->platform_ops->unmap_page(d, gfn);
 }
 
+static void iommu_free_pagetables(unsigned long unused)
+{
+    do {
+        struct page_info *pg;
+
+        spin_lock(&iommu_pt_cleanup_lock);
+        pg = page_list_remove_head(&iommu_pt_cleanup_list);
+        spin_unlock(&iommu_pt_cleanup_lock);
+        if ( !pg )
+            return;
+        iommu_get_ops()->free_page_table(pg);
+    } while ( !softirq_pending(smp_processor_id()) );
+
+    tasklet_schedule_on_cpu(&iommu_pt_cleanup_tasklet,
+                            cpumask_cycle(smp_processor_id(), &cpu_online_map));
+}
+
 void iommu_iotlb_flush(struct domain *d, unsigned long gfn, unsigned int page_count)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
@@ -516,10 +537,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
     pdev->fault.count = 0;
 
     if ( !has_arch_pdevs(d) && need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     return ret;
 }
@@ -558,6 +576,7 @@ int __init iommu_setup(void)
                iommu_passthrough ? "Passthrough" :
                iommu_dom0_strict ? "Strict" : "Relaxed");
         printk("Interrupt remapping %sabled\n", iommu_intremap ? "en" : "dis");
+        tasklet_init(&iommu_pt_cleanup_tasklet, iommu_free_pagetables, 0);
     }
 
     return rc;
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index b6b48e2..5f10034 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -668,13 +668,24 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
 {
-    int i;
-    struct dma_pte *pt_vaddr, *pte;
-    int next_level = level - 1;
+    struct page_info *pg = maddr_to_page(pt_maddr);
 
     if ( pt_maddr == 0 )
         return;
 
+    PFN_ORDER(pg) = level;
+    spin_lock(&iommu_pt_cleanup_lock);
+    page_list_add_tail(pg, &iommu_pt_cleanup_list);
+    spin_unlock(&iommu_pt_cleanup_lock);
+}
+
+static void iommu_free_page_table(struct page_info *pg)
+{
+    unsigned int i, next_level = PFN_ORDER(pg) - 1;
+    u64 pt_maddr = page_to_maddr(pg);
+    struct dma_pte *pt_vaddr, *pte;
+
+    PFN_ORDER(pg) = 0;
     pt_vaddr = (struct dma_pte *)map_vtd_domain_page(pt_maddr);
 
     for ( i = 0; i < PTE_NUM; i++ )
@@ -2430,6 +2441,7 @@ const struct iommu_ops intel_iommu_ops = {
     .teardown = iommu_domain_teardown,
     .map_page = intel_iommu_map_page,
     .unmap_page = intel_iommu_unmap_page,
+    .free_page_table = iommu_free_page_table,
     .reassign_device = reassign_device_ownership,
     .get_device_group_id = intel_iommu_group_id,
     .update_ire_from_apic = io_apic_write_remap_rte,
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 6f0ff9d..8bb0a1d 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -88,6 +88,7 @@ bool_t pt_irq_need_timer(uint32_t flags);
 
 struct msi_desc;
 struct msi_msg;
+struct page_info;
 
 struct iommu_ops {
     int (*init)(struct domain *d);
@@ -100,6 +101,7 @@ struct iommu_ops {
     int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
                     unsigned int flags);
     int (*unmap_page)(struct domain *d, unsigned long gfn);
+    void (*free_page_table)(struct page_info *);
     int (*reassign_device)(struct domain *s, struct domain *t,
 			   u8 devfn, struct pci_dev *);
     int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn);
@@ -151,4 +153,7 @@ int adjust_vtd_irq_affinities(void);
  */
 DECLARE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+extern struct spinlock iommu_pt_cleanup_lock;
+extern struct page_list_head iommu_pt_cleanup_list;
+
 #endif /* _IOMMU_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 Jan 08 18:25:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Jan 2014 18:25:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W0xoW-0004eT-EF; Wed, 08 Jan 2014 18:25: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 1W0xoV-0004eH-Ie
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:11 +0000
Received: from [193.109.254.147:40867] by server-1.bemta-14.messagelabs.com id
	59/6D-15600-6089DC25; Wed, 08 Jan 2014 18:25:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389205508!9643245!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23322 invoked from network); 8 Jan 2014 18:25:09 -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 Jan 2014 18:25: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 1W0xoS-00089Q-O5
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W0xoS-00083h-Lh
	for xen-changelog@lists.xensource.com; Wed, 08 Jan 2014 18:25:08 +0000
Date: Wed, 08 Jan 2014 18:25:08 +0000
Message-Id: <E1W0xoS-00083h-Lh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] IOMMU: make page table deallocation
	preemptible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cedfdd43a9798e535a05690bb6f01394490d26bb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 7 16:01:14 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 7 16:01:14 2014 +0100

    IOMMU: make page table deallocation preemptible
    
    This too can take an arbitrary amount of time.
    
    In fact, the bulk of the work is being moved to a tasklet, as handling
    the necessary preemption logic in line seems close to impossible given
    that the teardown may also be invoked on error paths.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 xen/drivers/passthrough/amd/pci_amd_iommu.c |   15 +++++++-
 xen/drivers/passthrough/iommu.c             |   51 ++++++++++++++++++--------
 xen/drivers/passthrough/vtd/iommu.c         |   18 ++++++++--
 xen/include/xen/iommu.h                     |    5 +++
 4 files changed, 68 insertions(+), 21 deletions(-)

diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 7241aad..c26aabc 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -405,11 +405,21 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
     return reassign_device(dom0, d, devfn, pdev);
 }
 
-static void deallocate_next_page_table(struct page_info* pg, int level)
+static void deallocate_next_page_table(struct page_info *pg, int level)
+{
+    PFN_ORDER(pg) = level;
+    spin_lock(&iommu_pt_cleanup_lock);
+    page_list_add_tail(pg, &iommu_pt_cleanup_list);
+    spin_unlock(&iommu_pt_cleanup_lock);
+}
+
+static void deallocate_page_table(struct page_info *pg)
 {
     void *table_vaddr, *pde;
     u64 next_table_maddr;
-    int index, next_level;
+    unsigned int index, level = PFN_ORDER(pg), next_level;
+
+    PFN_ORDER(pg) = 0;
 
     if ( level <= 1 )
     {
@@ -599,6 +609,7 @@ const struct iommu_ops amd_iommu_ops = {
     .teardown = amd_iommu_domain_destroy,
     .map_page = amd_iommu_map_page,
     .unmap_page = amd_iommu_unmap_page,
+    .free_page_table = deallocate_page_table,
     .reassign_device = reassign_device,
     .get_device_group_id = amd_iommu_group_id,
     .update_ire_from_apic = amd_iommu_ioapic_update_ire,
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index e3b84f4..19b0e23 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -58,6 +58,10 @@ bool_t __read_mostly amd_iommu_perdev_intremap = 1;
 
 DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+DEFINE_SPINLOCK(iommu_pt_cleanup_lock);
+PAGE_LIST_HEAD(iommu_pt_cleanup_list);
+static struct tasklet iommu_pt_cleanup_tasklet;
+
 static struct keyhandler iommu_p2m_table = {
     .diagnostic = 0,
     .u.fn = iommu_dump_p2m_table,
@@ -251,6 +255,15 @@ int iommu_remove_device(struct pci_dev *pdev)
     return hd->platform_ops->remove_device(pdev->devfn, pdev);
 }
 
+static void iommu_teardown(struct domain *d)
+{
+    const struct hvm_iommu *hd = domain_hvm_iommu(d);
+
+    d->need_iommu = 0;
+    hd->platform_ops->teardown(d);
+    tasklet_schedule(&iommu_pt_cleanup_tasklet);
+}
+
 /*
  * If the device isn't owned by dom0, it means it already
  * has been assigned to other domain, or it doesn't exist.
@@ -325,10 +338,7 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
 
  done:
     if ( !has_arch_pdevs(d) && need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
     spin_unlock(&pcidevs_lock);
 
     return rc;
@@ -393,10 +403,7 @@ static int iommu_populate_page_table(struct domain *d)
     if ( !rc )
         iommu_iotlb_flush_all(d);
     else if ( rc != -ERESTART )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     return rc;
 }
@@ -413,10 +420,7 @@ void iommu_domain_destroy(struct domain *d)
         return;
 
     if ( need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     list_for_each_safe ( ioport_list, tmp, &hd->g2m_ioport_list )
     {
@@ -454,6 +458,23 @@ int iommu_unmap_page(struct domain *d, unsigned long gfn)
     return hd->platform_ops->unmap_page(d, gfn);
 }
 
+static void iommu_free_pagetables(unsigned long unused)
+{
+    do {
+        struct page_info *pg;
+
+        spin_lock(&iommu_pt_cleanup_lock);
+        pg = page_list_remove_head(&iommu_pt_cleanup_list);
+        spin_unlock(&iommu_pt_cleanup_lock);
+        if ( !pg )
+            return;
+        iommu_get_ops()->free_page_table(pg);
+    } while ( !softirq_pending(smp_processor_id()) );
+
+    tasklet_schedule_on_cpu(&iommu_pt_cleanup_tasklet,
+                            cpumask_cycle(smp_processor_id(), &cpu_online_map));
+}
+
 void iommu_iotlb_flush(struct domain *d, unsigned long gfn, unsigned int page_count)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
@@ -516,10 +537,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
     pdev->fault.count = 0;
 
     if ( !has_arch_pdevs(d) && need_iommu(d) )
-    {
-        d->need_iommu = 0;
-        hd->platform_ops->teardown(d);
-    }
+        iommu_teardown(d);
 
     return ret;
 }
@@ -558,6 +576,7 @@ int __init iommu_setup(void)
                iommu_passthrough ? "Passthrough" :
                iommu_dom0_strict ? "Strict" : "Relaxed");
         printk("Interrupt remapping %sabled\n", iommu_intremap ? "en" : "dis");
+        tasklet_init(&iommu_pt_cleanup_tasklet, iommu_free_pagetables, 0);
     }
 
     return rc;
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index b6b48e2..5f10034 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -668,13 +668,24 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
 {
-    int i;
-    struct dma_pte *pt_vaddr, *pte;
-    int next_level = level - 1;
+    struct page_info *pg = maddr_to_page(pt_maddr);
 
     if ( pt_maddr == 0 )
         return;
 
+    PFN_ORDER(pg) = level;
+    spin_lock(&iommu_pt_cleanup_lock);
+    page_list_add_tail(pg, &iommu_pt_cleanup_list);
+    spin_unlock(&iommu_pt_cleanup_lock);
+}
+
+static void iommu_free_page_table(struct page_info *pg)
+{
+    unsigned int i, next_level = PFN_ORDER(pg) - 1;
+    u64 pt_maddr = page_to_maddr(pg);
+    struct dma_pte *pt_vaddr, *pte;
+
+    PFN_ORDER(pg) = 0;
     pt_vaddr = (struct dma_pte *)map_vtd_domain_page(pt_maddr);
 
     for ( i = 0; i < PTE_NUM; i++ )
@@ -2430,6 +2441,7 @@ const struct iommu_ops intel_iommu_ops = {
     .teardown = iommu_domain_teardown,
     .map_page = intel_iommu_map_page,
     .unmap_page = intel_iommu_unmap_page,
+    .free_page_table = iommu_free_page_table,
     .reassign_device = reassign_device_ownership,
     .get_device_group_id = intel_iommu_group_id,
     .update_ire_from_apic = io_apic_write_remap_rte,
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 6f0ff9d..8bb0a1d 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -88,6 +88,7 @@ bool_t pt_irq_need_timer(uint32_t flags);
 
 struct msi_desc;
 struct msi_msg;
+struct page_info;
 
 struct iommu_ops {
     int (*init)(struct domain *d);
@@ -100,6 +101,7 @@ struct iommu_ops {
     int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
                     unsigned int flags);
     int (*unmap_page)(struct domain *d, unsigned long gfn);
+    void (*free_page_table)(struct page_info *);
     int (*reassign_device)(struct domain *s, struct domain *t,
 			   u8 devfn, struct pci_dev *);
     int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn);
@@ -151,4 +153,7 @@ int adjust_vtd_irq_affinities(void);
  */
 DECLARE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+extern struct spinlock iommu_pt_cleanup_lock;
+extern struct page_list_head iommu_pt_cleanup_list;
+
 #endif /* _IOMMU_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 Thu Jan 09 10:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1CkZ-0004EY-RE; Thu, 09 Jan 2014 10:22: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 1W1CkY-0004EN-O4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:06 +0000
Received: from [85.158.143.35:20534] by server-3.bemta-4.messagelabs.com id
	B2/28-32360-E487EC25; Thu, 09 Jan 2014 10:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389262924!10592565!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13890 invoked from network); 9 Jan 2014 10:22:05 -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 Jan 2014 10: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 1W1CkW-0000wl-34
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CkV-000217-S5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:04 +0000
Date: Thu, 09 Jan 2014 10:22:03 +0000
Message-Id: <E1W1CkV-000217-S5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn/fifo: initialize priority when
	events are bound
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 470a160402656e62e206a3f19edd4dcd7630cb22
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Wed Jan 8 08:43:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:43:36 2014 +0100

    evtchn/fifo: initialize priority when events are bound
    
    Event channel ports that are reused or that were not in the initial
    bucket would have a non-default priority.
    
    Add an init evtchn_port_op hook and use this to set the priority when
    an event channel is bound.
    
    Within this new evtchn_fifo_init() call, also check if the event is
    already on a queue and print a warning, as this event may have its
    first event delivered on a queue with the wrong VCPU or priority.
    This guest is expected to prevent this (if it cares) by not unbinding
    events that are still linked.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    5 +++++
 xen/common/event_fifo.c    |   17 +++++++++++++++++
 xen/include/xen/event.h    |    7 +++++++
 3 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 34efd24..db952af 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -220,6 +220,7 @@ static long evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc)
     chn->state = ECS_UNBOUND;
     if ( (chn->u.unbound.remote_domid = alloc->remote_dom) == DOMID_SELF )
         chn->u.unbound.remote_domid = current->domain->domain_id;
+    evtchn_port_init(d, chn);
 
     alloc->port = port;
 
@@ -276,6 +277,7 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
     lchn->u.interdomain.remote_dom  = rd;
     lchn->u.interdomain.remote_port = (u16)rport;
     lchn->state                     = ECS_INTERDOMAIN;
+    evtchn_port_init(ld, lchn);
     
     rchn->u.interdomain.remote_dom  = ld;
     rchn->u.interdomain.remote_port = (u16)lport;
@@ -330,6 +332,7 @@ static long evtchn_bind_virq(evtchn_bind_virq_t *bind)
     chn->state          = ECS_VIRQ;
     chn->notify_vcpu_id = vcpu;
     chn->u.virq         = virq;
+    evtchn_port_init(d, chn);
 
     v->virq_to_evtchn[virq] = bind->port = port;
 
@@ -359,6 +362,7 @@ static long evtchn_bind_ipi(evtchn_bind_ipi_t *bind)
     chn = evtchn_from_port(d, port);
     chn->state          = ECS_IPI;
     chn->notify_vcpu_id = vcpu;
+    evtchn_port_init(d, chn);
 
     bind->port = port;
 
@@ -437,6 +441,7 @@ static long evtchn_bind_pirq(evtchn_bind_pirq_t *bind)
     chn->state  = ECS_PIRQ;
     chn->u.pirq.irq = pirq;
     link_pirq_port(port, chn, v);
+    evtchn_port_init(d, chn);
 
     bind->port = port;
 
diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index b0d3fc2..4f8a877 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -34,6 +34,22 @@ static inline event_word_t *evtchn_fifo_word_from_port(struct domain *d,
     return d->evtchn_fifo->event_array[p] + w;
 }
 
+static void evtchn_fifo_init(struct domain *d, struct evtchn *evtchn)
+{
+    event_word_t *word;
+
+    evtchn->priority = EVTCHN_FIFO_PRIORITY_DEFAULT;
+
+    /*
+     * If this event is still linked, the first event may be delivered
+     * on the wrong VCPU or with an unexpected priority.
+     */
+    word = evtchn_fifo_word_from_port(d, evtchn->port);
+    if ( word && test_bit(EVTCHN_FIFO_LINKED, word) )
+        gdprintk(XENLOG_WARNING, "domain %d, port %d already on a queue\n",
+                 d->domain_id, evtchn->port);
+}
+
 static int try_set_link(event_word_t *word, event_word_t *w, uint32_t link)
 {
     event_word_t new, old;
@@ -261,6 +277,7 @@ static void evtchn_fifo_print_state(struct domain *d,
 
 static const struct evtchn_port_ops evtchn_port_ops_fifo =
 {
+    .init          = evtchn_fifo_init,
     .set_pending   = evtchn_fifo_set_pending,
     .clear_pending = evtchn_fifo_clear_pending,
     .unmask        = evtchn_fifo_unmask,
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 70fc271..06c0654 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -132,6 +132,7 @@ void evtchn_2l_init(struct domain *d);
  * Low-level event channel port ops.
  */
 struct evtchn_port_ops {
+    void (*init)(struct domain *d, struct evtchn *evtchn);
     void (*set_pending)(struct vcpu *v, struct evtchn *evtchn);
     void (*clear_pending)(struct domain *d, struct evtchn *evtchn);
     void (*unmask)(struct domain *d, struct evtchn *evtchn);
@@ -142,6 +143,12 @@ struct evtchn_port_ops {
     void (*print_state)(struct domain *d, const struct evtchn *evtchn);
 };
 
+static inline void evtchn_port_init(struct domain *d, struct evtchn *evtchn)
+{
+    if ( d->evtchn_port_ops->init )
+        d->evtchn_port_ops->init(d, evtchn);
+}
+
 static inline void evtchn_port_set_pending(struct vcpu *v,
                                            struct evtchn *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 Thu Jan 09 10:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1CkZ-0004EY-RE; Thu, 09 Jan 2014 10:22: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 1W1CkY-0004EN-O4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:06 +0000
Received: from [85.158.143.35:20534] by server-3.bemta-4.messagelabs.com id
	B2/28-32360-E487EC25; Thu, 09 Jan 2014 10:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389262924!10592565!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13890 invoked from network); 9 Jan 2014 10:22:05 -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 Jan 2014 10: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 1W1CkW-0000wl-34
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CkV-000217-S5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:04 +0000
Date: Thu, 09 Jan 2014 10:22:03 +0000
Message-Id: <E1W1CkV-000217-S5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn/fifo: initialize priority when
	events are bound
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 470a160402656e62e206a3f19edd4dcd7630cb22
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Wed Jan 8 08:43:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:43:36 2014 +0100

    evtchn/fifo: initialize priority when events are bound
    
    Event channel ports that are reused or that were not in the initial
    bucket would have a non-default priority.
    
    Add an init evtchn_port_op hook and use this to set the priority when
    an event channel is bound.
    
    Within this new evtchn_fifo_init() call, also check if the event is
    already on a queue and print a warning, as this event may have its
    first event delivered on a queue with the wrong VCPU or priority.
    This guest is expected to prevent this (if it cares) by not unbinding
    events that are still linked.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    5 +++++
 xen/common/event_fifo.c    |   17 +++++++++++++++++
 xen/include/xen/event.h    |    7 +++++++
 3 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 34efd24..db952af 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -220,6 +220,7 @@ static long evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc)
     chn->state = ECS_UNBOUND;
     if ( (chn->u.unbound.remote_domid = alloc->remote_dom) == DOMID_SELF )
         chn->u.unbound.remote_domid = current->domain->domain_id;
+    evtchn_port_init(d, chn);
 
     alloc->port = port;
 
@@ -276,6 +277,7 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
     lchn->u.interdomain.remote_dom  = rd;
     lchn->u.interdomain.remote_port = (u16)rport;
     lchn->state                     = ECS_INTERDOMAIN;
+    evtchn_port_init(ld, lchn);
     
     rchn->u.interdomain.remote_dom  = ld;
     rchn->u.interdomain.remote_port = (u16)lport;
@@ -330,6 +332,7 @@ static long evtchn_bind_virq(evtchn_bind_virq_t *bind)
     chn->state          = ECS_VIRQ;
     chn->notify_vcpu_id = vcpu;
     chn->u.virq         = virq;
+    evtchn_port_init(d, chn);
 
     v->virq_to_evtchn[virq] = bind->port = port;
 
@@ -359,6 +362,7 @@ static long evtchn_bind_ipi(evtchn_bind_ipi_t *bind)
     chn = evtchn_from_port(d, port);
     chn->state          = ECS_IPI;
     chn->notify_vcpu_id = vcpu;
+    evtchn_port_init(d, chn);
 
     bind->port = port;
 
@@ -437,6 +441,7 @@ static long evtchn_bind_pirq(evtchn_bind_pirq_t *bind)
     chn->state  = ECS_PIRQ;
     chn->u.pirq.irq = pirq;
     link_pirq_port(port, chn, v);
+    evtchn_port_init(d, chn);
 
     bind->port = port;
 
diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index b0d3fc2..4f8a877 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -34,6 +34,22 @@ static inline event_word_t *evtchn_fifo_word_from_port(struct domain *d,
     return d->evtchn_fifo->event_array[p] + w;
 }
 
+static void evtchn_fifo_init(struct domain *d, struct evtchn *evtchn)
+{
+    event_word_t *word;
+
+    evtchn->priority = EVTCHN_FIFO_PRIORITY_DEFAULT;
+
+    /*
+     * If this event is still linked, the first event may be delivered
+     * on the wrong VCPU or with an unexpected priority.
+     */
+    word = evtchn_fifo_word_from_port(d, evtchn->port);
+    if ( word && test_bit(EVTCHN_FIFO_LINKED, word) )
+        gdprintk(XENLOG_WARNING, "domain %d, port %d already on a queue\n",
+                 d->domain_id, evtchn->port);
+}
+
 static int try_set_link(event_word_t *word, event_word_t *w, uint32_t link)
 {
     event_word_t new, old;
@@ -261,6 +277,7 @@ static void evtchn_fifo_print_state(struct domain *d,
 
 static const struct evtchn_port_ops evtchn_port_ops_fifo =
 {
+    .init          = evtchn_fifo_init,
     .set_pending   = evtchn_fifo_set_pending,
     .clear_pending = evtchn_fifo_clear_pending,
     .unmask        = evtchn_fifo_unmask,
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 70fc271..06c0654 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -132,6 +132,7 @@ void evtchn_2l_init(struct domain *d);
  * Low-level event channel port ops.
  */
 struct evtchn_port_ops {
+    void (*init)(struct domain *d, struct evtchn *evtchn);
     void (*set_pending)(struct vcpu *v, struct evtchn *evtchn);
     void (*clear_pending)(struct domain *d, struct evtchn *evtchn);
     void (*unmask)(struct domain *d, struct evtchn *evtchn);
@@ -142,6 +143,12 @@ struct evtchn_port_ops {
     void (*print_state)(struct domain *d, const struct evtchn *evtchn);
 };
 
+static inline void evtchn_port_init(struct domain *d, struct evtchn *evtchn)
+{
+    if ( d->evtchn_port_ops->init )
+        d->evtchn_port_ops->init(d, evtchn);
+}
+
 static inline void evtchn_port_set_pending(struct vcpu *v,
                                            struct evtchn *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 Thu Jan 09 10:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10: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 1W1Ckk-0004GT-W4; Thu, 09 Jan 2014 10:22: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 1W1Ckj-0004GD-4q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:17 +0000
Received: from [85.158.143.35:34788] by server-3.bemta-4.messagelabs.com id
	7D/78-32360-8587EC25; Thu, 09 Jan 2014 10:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1389262934!10645231!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26583 invoked from network); 9 Jan 2014 10:22:15 -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;
	9 Jan 2014 10:22: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 1W1Ckg-0000wr-9e
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Ckg-00021V-6j
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:14 +0000
Date: Thu, 09 Jan 2014 10:22:14 +0000
Message-Id: <E1W1Ckg-00021V-6j@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn/fifo: don't corrupt queues if
	an old tail is linked
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e33d4257fc64a0ba3fe82a5327f6ee42b8818955
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Wed Jan 8 08:44:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:44:23 2014 +0100

    evtchn/fifo: don't corrupt queues if an old tail is linked
    
    An event may still be the tail of a queue even if the queue is now
    empty (an 'old tail' event).  There is logic to handle the case when
    this old tail event needs to be added to the now empty queue (by
    checking for q->tail == port).
    
    However, this does not cover all cases.
    
    1. An old tail may be re-added simultaneously with another event.
       LINKED is set on the old tail, and the other CPU may misinterpret
       this as the old tail still being valid and set LINK instead of
       HEAD.  All events on this queue will then be lost.
    
    2. If the old tail event on queue A is moved to a different queue B
       (by changing its VCPU or priority), the event may then be linked
       onto queue B.  When another event is linked onto queue A it will
       check the old tail, see that it is linked (but on queue B) and
       overwrite the LINK field, corrupting both queues.
    
    When an event is linked, save the vcpu id and priority of the queue it
    is being linked onto.  Use this when linking an event to check if it
    is an unlinked old tail event.  If it is an old tail event, the old
    queue is empty and old_q->tail is invalidated to ensure adding another
    event to old_q will update HEAD.  The tail is invalidated by setting
    it to 0 since the event 0 is never linked.
    
    The old_q->lock is held while setting LINKED to avoid the race with
    the test of LINKED in evtchn_fifo_set_link().
    
    Since a event channel may move queues after old_q->lock is acquired,
    we must check that we have the correct lock and retry if not.  Since
    changing VCPUs or priority is expected to be rare events that are
    serialized in the guest, we try at most 3 times before dropping the
    event.  This prevents a malicious guest from repeatedly adjusting
    priority to prevent another domain from acquiring old_q->lock.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_fifo.c |   80 ++++++++++++++++++++++++++++++++++++++++-------
 xen/include/xen/sched.h |    2 +
 2 files changed, 70 insertions(+), 12 deletions(-)

diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index 4f8a877..1fce3f1 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -50,6 +50,36 @@ static void evtchn_fifo_init(struct domain *d, struct evtchn *evtchn)
                  d->domain_id, evtchn->port);
 }
 
+static struct evtchn_fifo_queue *lock_old_queue(const struct domain *d,
+                                                struct evtchn *evtchn,
+                                                unsigned long *flags)
+{
+    struct vcpu *v;
+    struct evtchn_fifo_queue *q, *old_q;
+    unsigned int try;
+
+    for ( try = 0; try < 3; try++ )
+    {
+        v = d->vcpu[evtchn->last_vcpu_id];
+        old_q = &v->evtchn_fifo->queue[evtchn->last_priority];
+
+        spin_lock_irqsave(&old_q->lock, *flags);
+
+        v = d->vcpu[evtchn->last_vcpu_id];
+        q = &v->evtchn_fifo->queue[evtchn->last_priority];
+
+        if ( old_q == q )
+            return old_q;
+
+        spin_unlock_irqrestore(&old_q->lock, *flags);
+    }
+
+    gdprintk(XENLOG_WARNING,
+             "domain %d, port %d lost event (too many queue changes)\n",
+             d->domain_id, evtchn->port);
+    return NULL;
+}          
+
 static int try_set_link(event_word_t *word, event_word_t *w, uint32_t link)
 {
     event_word_t new, old;
@@ -119,7 +149,6 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
     struct domain *d = v->domain;
     unsigned int port;
     event_word_t *word;
-    struct evtchn_fifo_queue *q;
     unsigned long flags;
     bool_t was_pending;
 
@@ -136,25 +165,52 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
         return;
     }
 
-    /*
-     * No locking around getting the queue. This may race with
-     * changing the priority but we are allowed to signal the event
-     * once on the old priority.
-     */
-    q = &v->evtchn_fifo->queue[evtchn->priority];
-
     was_pending = test_and_set_bit(EVTCHN_FIFO_PENDING, word);
 
     /*
      * Link the event if it unmasked and not already linked.
      */
     if ( !test_bit(EVTCHN_FIFO_MASKED, word)
-         && !test_and_set_bit(EVTCHN_FIFO_LINKED, word) )
+         && !test_bit(EVTCHN_FIFO_LINKED, word) )
     {
+        struct evtchn_fifo_queue *q, *old_q;
         event_word_t *tail_word;
         bool_t linked = 0;
 
-        spin_lock_irqsave(&q->lock, flags);
+        /*
+         * No locking around getting the queue. This may race with
+         * changing the priority but we are allowed to signal the
+         * event once on the old priority.
+         */
+        q = &v->evtchn_fifo->queue[evtchn->priority];
+
+        old_q = lock_old_queue(d, evtchn, &flags);
+        if ( !old_q )
+            goto done;
+
+        if ( test_and_set_bit(EVTCHN_FIFO_LINKED, word) )
+        {
+            spin_unlock_irqrestore(&old_q->lock, flags);
+            goto done;
+        }
+
+        /*
+         * If this event was a tail, the old queue is now empty and
+         * its tail must be invalidated to prevent adding an event to
+         * the old queue from corrupting the new queue.
+         */
+        if ( old_q->tail == port )
+            old_q->tail = 0;
+
+        /* Moved to a different queue? */
+        if ( old_q != q )
+        {
+            evtchn->last_vcpu_id = evtchn->notify_vcpu_id;
+            evtchn->last_priority = evtchn->priority;
+
+            spin_unlock_irqrestore(&old_q->lock, flags);
+            spin_lock_irqsave(&q->lock, flags);
+        }
 
         /*
          * Atomically link the tail to port iff the tail is linked.
@@ -166,7 +222,7 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
          * If the queue is empty (i.e., we haven't linked to the new
          * event), head must be updated.
          */
-        if ( port != q->tail )
+        if ( q->tail )
         {
             tail_word = evtchn_fifo_word_from_port(d, q->tail);
             linked = evtchn_fifo_set_link(d, tail_word, port);
@@ -182,7 +238,7 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
                                   &v->evtchn_fifo->control_block->ready) )
             vcpu_mark_events_pending(v);
     }
-
+ done:
     if ( !was_pending )
         evtchn_check_pollers(d, port);
 }
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b173e65..7bcac31 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -98,6 +98,8 @@ struct evtchn
     } u;
     u8 priority;
     u8 pending:1;
+    u16 last_vcpu_id;
+    u8 last_priority;
 #ifdef FLASK_ENABLE
     void *ssid;
 #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 Thu Jan 09 10:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10: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 1W1Ckk-0004GT-W4; Thu, 09 Jan 2014 10:22: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 1W1Ckj-0004GD-4q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:17 +0000
Received: from [85.158.143.35:34788] by server-3.bemta-4.messagelabs.com id
	7D/78-32360-8587EC25; Thu, 09 Jan 2014 10:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1389262934!10645231!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26583 invoked from network); 9 Jan 2014 10:22:15 -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;
	9 Jan 2014 10:22: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 1W1Ckg-0000wr-9e
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Ckg-00021V-6j
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:14 +0000
Date: Thu, 09 Jan 2014 10:22:14 +0000
Message-Id: <E1W1Ckg-00021V-6j@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn/fifo: don't corrupt queues if
	an old tail is linked
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e33d4257fc64a0ba3fe82a5327f6ee42b8818955
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Wed Jan 8 08:44:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:44:23 2014 +0100

    evtchn/fifo: don't corrupt queues if an old tail is linked
    
    An event may still be the tail of a queue even if the queue is now
    empty (an 'old tail' event).  There is logic to handle the case when
    this old tail event needs to be added to the now empty queue (by
    checking for q->tail == port).
    
    However, this does not cover all cases.
    
    1. An old tail may be re-added simultaneously with another event.
       LINKED is set on the old tail, and the other CPU may misinterpret
       this as the old tail still being valid and set LINK instead of
       HEAD.  All events on this queue will then be lost.
    
    2. If the old tail event on queue A is moved to a different queue B
       (by changing its VCPU or priority), the event may then be linked
       onto queue B.  When another event is linked onto queue A it will
       check the old tail, see that it is linked (but on queue B) and
       overwrite the LINK field, corrupting both queues.
    
    When an event is linked, save the vcpu id and priority of the queue it
    is being linked onto.  Use this when linking an event to check if it
    is an unlinked old tail event.  If it is an old tail event, the old
    queue is empty and old_q->tail is invalidated to ensure adding another
    event to old_q will update HEAD.  The tail is invalidated by setting
    it to 0 since the event 0 is never linked.
    
    The old_q->lock is held while setting LINKED to avoid the race with
    the test of LINKED in evtchn_fifo_set_link().
    
    Since a event channel may move queues after old_q->lock is acquired,
    we must check that we have the correct lock and retry if not.  Since
    changing VCPUs or priority is expected to be rare events that are
    serialized in the guest, we try at most 3 times before dropping the
    event.  This prevents a malicious guest from repeatedly adjusting
    priority to prevent another domain from acquiring old_q->lock.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_fifo.c |   80 ++++++++++++++++++++++++++++++++++++++++-------
 xen/include/xen/sched.h |    2 +
 2 files changed, 70 insertions(+), 12 deletions(-)

diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index 4f8a877..1fce3f1 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -50,6 +50,36 @@ static void evtchn_fifo_init(struct domain *d, struct evtchn *evtchn)
                  d->domain_id, evtchn->port);
 }
 
+static struct evtchn_fifo_queue *lock_old_queue(const struct domain *d,
+                                                struct evtchn *evtchn,
+                                                unsigned long *flags)
+{
+    struct vcpu *v;
+    struct evtchn_fifo_queue *q, *old_q;
+    unsigned int try;
+
+    for ( try = 0; try < 3; try++ )
+    {
+        v = d->vcpu[evtchn->last_vcpu_id];
+        old_q = &v->evtchn_fifo->queue[evtchn->last_priority];
+
+        spin_lock_irqsave(&old_q->lock, *flags);
+
+        v = d->vcpu[evtchn->last_vcpu_id];
+        q = &v->evtchn_fifo->queue[evtchn->last_priority];
+
+        if ( old_q == q )
+            return old_q;
+
+        spin_unlock_irqrestore(&old_q->lock, *flags);
+    }
+
+    gdprintk(XENLOG_WARNING,
+             "domain %d, port %d lost event (too many queue changes)\n",
+             d->domain_id, evtchn->port);
+    return NULL;
+}          
+
 static int try_set_link(event_word_t *word, event_word_t *w, uint32_t link)
 {
     event_word_t new, old;
@@ -119,7 +149,6 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
     struct domain *d = v->domain;
     unsigned int port;
     event_word_t *word;
-    struct evtchn_fifo_queue *q;
     unsigned long flags;
     bool_t was_pending;
 
@@ -136,25 +165,52 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
         return;
     }
 
-    /*
-     * No locking around getting the queue. This may race with
-     * changing the priority but we are allowed to signal the event
-     * once on the old priority.
-     */
-    q = &v->evtchn_fifo->queue[evtchn->priority];
-
     was_pending = test_and_set_bit(EVTCHN_FIFO_PENDING, word);
 
     /*
      * Link the event if it unmasked and not already linked.
      */
     if ( !test_bit(EVTCHN_FIFO_MASKED, word)
-         && !test_and_set_bit(EVTCHN_FIFO_LINKED, word) )
+         && !test_bit(EVTCHN_FIFO_LINKED, word) )
     {
+        struct evtchn_fifo_queue *q, *old_q;
         event_word_t *tail_word;
         bool_t linked = 0;
 
-        spin_lock_irqsave(&q->lock, flags);
+        /*
+         * No locking around getting the queue. This may race with
+         * changing the priority but we are allowed to signal the
+         * event once on the old priority.
+         */
+        q = &v->evtchn_fifo->queue[evtchn->priority];
+
+        old_q = lock_old_queue(d, evtchn, &flags);
+        if ( !old_q )
+            goto done;
+
+        if ( test_and_set_bit(EVTCHN_FIFO_LINKED, word) )
+        {
+            spin_unlock_irqrestore(&old_q->lock, flags);
+            goto done;
+        }
+
+        /*
+         * If this event was a tail, the old queue is now empty and
+         * its tail must be invalidated to prevent adding an event to
+         * the old queue from corrupting the new queue.
+         */
+        if ( old_q->tail == port )
+            old_q->tail = 0;
+
+        /* Moved to a different queue? */
+        if ( old_q != q )
+        {
+            evtchn->last_vcpu_id = evtchn->notify_vcpu_id;
+            evtchn->last_priority = evtchn->priority;
+
+            spin_unlock_irqrestore(&old_q->lock, flags);
+            spin_lock_irqsave(&q->lock, flags);
+        }
 
         /*
          * Atomically link the tail to port iff the tail is linked.
@@ -166,7 +222,7 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
          * If the queue is empty (i.e., we haven't linked to the new
          * event), head must be updated.
          */
-        if ( port != q->tail )
+        if ( q->tail )
         {
             tail_word = evtchn_fifo_word_from_port(d, q->tail);
             linked = evtchn_fifo_set_link(d, tail_word, port);
@@ -182,7 +238,7 @@ static void evtchn_fifo_set_pending(struct vcpu *v, struct evtchn *evtchn)
                                   &v->evtchn_fifo->control_block->ready) )
             vcpu_mark_events_pending(v);
     }
-
+ done:
     if ( !was_pending )
         evtchn_check_pollers(d, port);
 }
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b173e65..7bcac31 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -98,6 +98,8 @@ struct evtchn
     } u;
     u8 priority;
     u8 pending:1;
+    u16 last_vcpu_id;
+    u8 last_priority;
 #ifdef FLASK_ENABLE
     void *ssid;
 #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 Thu Jan 09 10:22:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1Ckv-0004I5-2t; Thu, 09 Jan 2014 10:22: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 1W1Ckt-0004Hl-7A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:27 +0000
Received: from [85.158.137.68:63162] by server-13.bemta-3.messagelabs.com id
	EC/B2-28603-2687EC25; Thu, 09 Jan 2014 10:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389262944!4447731!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7089 invoked from network); 9 Jan 2014 10:22:25 -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;
	9 Jan 2014 10: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 1W1Ckq-0000wx-EN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Ckq-00021r-D8
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:24 +0000
Date: Thu, 09 Jan 2014 10:22:24 +0000
Message-Id: <E1W1Ckq-00021r-D8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop unused sub command
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dcbc050b697f95e9b03303e3fd9d2d51fd29d0e9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:01 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop unused sub command
    
    TMEM_READ/TMEM_WRITE/TMEM_XCHG/TMEM_NEW_PAGE are never used, drop them to make
    things simple and clean.
    
    To be clear - we are bit lucky here - as none of the other implementors
    of the tmem API are using it (Windows GPLPV code, SLES11, Linux upstream).
    
    The spec says that the operations can return an error code (-ENOSYS for
    example) so we are OK doing that.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c         |   23 +----------------------
 xen/include/public/tmem.h |    4 +++-
 2 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 3d15ead..0991eeb 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2753,11 +2753,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         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_NEW_PAGE:
-        tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0, 0,
-                         tmem_cli_buf_null);
-        break;
     case TMEM_PUT_PAGE:
         tmem_ensure_avail_pages();
         rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0,
@@ -2783,25 +2778,9 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         flush = 1;
         rc = do_tmem_destroy_pool(op.pool_id);
         break;
-    case TMEM_READ:
-        rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                         op.u.gen.tmem_offset, op.u.gen.pfn_offset,
-                         op.u.gen.len, tmem_cli_buf_null);
-        break;
-    case TMEM_WRITE:
-        rc = do_tmem_put(pool, oidp,
-                         op.u.gen.index, op.u.gen.cmfn,
-                         op.u.gen.tmem_offset, op.u.gen.pfn_offset,
-                         op.u.gen.len, tmem_cli_buf_null);
-        break;
-    case TMEM_XCHG:
-        /* need to hold global lock to ensure xchg is atomic */
-        tmem_client_warn("tmem_xchg op not implemented yet\n");
-        rc = 0;
-        break;
     default:
         tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
-        rc = 0;
+        rc = -ENOSYS;
         break;
     }
 
diff --git a/xen/include/public/tmem.h b/xen/include/public/tmem.h
index 5eb2fb4..4fd2fc6 100644
--- a/xen/include/public/tmem.h
+++ b/xen/include/public/tmem.h
@@ -36,14 +36,16 @@
 #define TMEM_CONTROL               0
 #define TMEM_NEW_POOL              1
 #define TMEM_DESTROY_POOL          2
-#define TMEM_NEW_PAGE              3
 #define TMEM_PUT_PAGE              4
 #define TMEM_GET_PAGE              5
 #define TMEM_FLUSH_PAGE            6
 #define TMEM_FLUSH_OBJECT          7
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define TMEM_NEW_PAGE              3
 #define TMEM_READ                  8
 #define TMEM_WRITE                 9
 #define TMEM_XCHG                 10
+#endif
 
 /* Privileged commands to HYPERVISOR_tmem_op() */
 #define TMEM_AUTH                 101 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:22:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1Ckv-0004I5-2t; Thu, 09 Jan 2014 10:22: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 1W1Ckt-0004Hl-7A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:27 +0000
Received: from [85.158.137.68:63162] by server-13.bemta-3.messagelabs.com id
	EC/B2-28603-2687EC25; Thu, 09 Jan 2014 10:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389262944!4447731!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7089 invoked from network); 9 Jan 2014 10:22:25 -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;
	9 Jan 2014 10: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 1W1Ckq-0000wx-EN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Ckq-00021r-D8
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:24 +0000
Date: Thu, 09 Jan 2014 10:22:24 +0000
Message-Id: <E1W1Ckq-00021r-D8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop unused sub command
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dcbc050b697f95e9b03303e3fd9d2d51fd29d0e9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:01 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop unused sub command
    
    TMEM_READ/TMEM_WRITE/TMEM_XCHG/TMEM_NEW_PAGE are never used, drop them to make
    things simple and clean.
    
    To be clear - we are bit lucky here - as none of the other implementors
    of the tmem API are using it (Windows GPLPV code, SLES11, Linux upstream).
    
    The spec says that the operations can return an error code (-ENOSYS for
    example) so we are OK doing that.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c         |   23 +----------------------
 xen/include/public/tmem.h |    4 +++-
 2 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 3d15ead..0991eeb 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2753,11 +2753,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         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_NEW_PAGE:
-        tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0, 0,
-                         tmem_cli_buf_null);
-        break;
     case TMEM_PUT_PAGE:
         tmem_ensure_avail_pages();
         rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0,
@@ -2783,25 +2778,9 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         flush = 1;
         rc = do_tmem_destroy_pool(op.pool_id);
         break;
-    case TMEM_READ:
-        rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                         op.u.gen.tmem_offset, op.u.gen.pfn_offset,
-                         op.u.gen.len, tmem_cli_buf_null);
-        break;
-    case TMEM_WRITE:
-        rc = do_tmem_put(pool, oidp,
-                         op.u.gen.index, op.u.gen.cmfn,
-                         op.u.gen.tmem_offset, op.u.gen.pfn_offset,
-                         op.u.gen.len, tmem_cli_buf_null);
-        break;
-    case TMEM_XCHG:
-        /* need to hold global lock to ensure xchg is atomic */
-        tmem_client_warn("tmem_xchg op not implemented yet\n");
-        rc = 0;
-        break;
     default:
         tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
-        rc = 0;
+        rc = -ENOSYS;
         break;
     }
 
diff --git a/xen/include/public/tmem.h b/xen/include/public/tmem.h
index 5eb2fb4..4fd2fc6 100644
--- a/xen/include/public/tmem.h
+++ b/xen/include/public/tmem.h
@@ -36,14 +36,16 @@
 #define TMEM_CONTROL               0
 #define TMEM_NEW_POOL              1
 #define TMEM_DESTROY_POOL          2
-#define TMEM_NEW_PAGE              3
 #define TMEM_PUT_PAGE              4
 #define TMEM_GET_PAGE              5
 #define TMEM_FLUSH_PAGE            6
 #define TMEM_FLUSH_OBJECT          7
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define TMEM_NEW_PAGE              3
 #define TMEM_READ                  8
 #define TMEM_WRITE                 9
 #define TMEM_XCHG                 10
+#endif
 
 /* Privileged commands to HYPERVISOR_tmem_op() */
 #define TMEM_AUTH                 101 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:22:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1Cl6-0004KG-5r; Thu, 09 Jan 2014 10:22: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 1W1Cl4-0004Jo-Ao
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:38 +0000
Received: from [193.109.254.147:27073] by server-16.bemta-14.messagelabs.com
	id 52/46-20600-D687EC25; Thu, 09 Jan 2014 10:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389262954!9797305!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21921 invoked from network); 9 Jan 2014 10:22:35 -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;
	9 Jan 2014 10:22: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 1W1Cl0-0000x8-Jn
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cl0-00022H-I2
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:34 +0000
Date: Thu, 09 Jan 2014 10:22:34 +0000
Message-Id: <E1W1Cl0-00022H-I2@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop some 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 5dff5a2af19e35b58f9776b0175be92c231c659e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:02 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop some debug code
    
    "SENTINELS" and "DECL_CYC_COUNTER" are hacky code for debugging, there are not
    suitable exist in upstream code.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  192 ++++++++-----------------------------------
 xen/common/tmem_xen.c      |    5 -
 xen/include/xen/tmem_xen.h |   51 ------------
 3 files changed, 36 insertions(+), 212 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 0991eeb..cdc8826 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -29,39 +29,6 @@
 
 #define TMEM_SPEC_VERSION 1
 
-/************ DEBUG and STATISTICS (+ some compression testing) *******/
-
-#ifndef NDEBUG
-#define SENTINELS
-#define NOINLINE noinline
-#else
-#define NOINLINE
-#endif
-
-#ifdef SENTINELS
-#define DECL_SENTINEL unsigned long sentinel;
-#define SET_SENTINEL(_x,_y) _x->sentinel = _y##_SENTINEL
-#define INVERT_SENTINEL(_x,_y) _x->sentinel = ~_y##_SENTINEL
-#define ASSERT_SENTINEL(_x,_y) \
-    ASSERT(_x->sentinel != ~_y##_SENTINEL);ASSERT(_x->sentinel == _y##_SENTINEL)
-#if defined(CONFIG_ARM)
-#define POOL_SENTINEL 0x87658765
-#define OBJ_SENTINEL 0x12345678
-#define OBJNODE_SENTINEL 0xfedcba09
-#define PGD_SENTINEL  0x43214321
-#else
-#define POOL_SENTINEL 0x8765876587658765
-#define OBJ_SENTINEL 0x1234567812345678
-#define OBJNODE_SENTINEL 0xfedcba0987654321
-#define PGD_SENTINEL  0x4321432143214321
-#endif
-#else
-#define DECL_SENTINEL
-#define SET_SENTINEL(_x,_y) do { } while (0)
-#define ASSERT_SENTINEL(_x,_y) do { } while (0)
-#define INVERT_SENTINEL(_x,_y) do { } while (0)
-#endif
-
 /* global statistics (none need to be locked) */
 static unsigned long total_tmem_ops = 0;
 static unsigned long errored_tmem_ops = 0;
@@ -83,16 +50,6 @@ static unsigned long failed_copies;
 static unsigned long pcd_tot_tze_size = 0;
 static unsigned long pcd_tot_csize = 0;
 
-DECL_CYC_COUNTER(succ_get);
-DECL_CYC_COUNTER(succ_put);
-DECL_CYC_COUNTER(non_succ_get);
-DECL_CYC_COUNTER(non_succ_put);
-DECL_CYC_COUNTER(flush);
-DECL_CYC_COUNTER(flush_obj);
-EXTERN_CYC_COUNTER(pg_copy);
-DECL_CYC_COUNTER(compress);
-DECL_CYC_COUNTER(decompress);
-
 /************ CORE DATA STRUCTURES ************************************/
 
 #define MAX_POOLS_PER_DOMAIN 16
@@ -166,7 +123,6 @@ struct tmem_pool {
     unsigned long gets, found_gets;
     unsigned long flushs, flushs_found;
     unsigned long flush_objs, flush_objs_found;
-    DECL_SENTINEL
 };
 
 #define is_persistent(_p)  (_p->persistent)
@@ -179,7 +135,6 @@ struct oid {
 };
 
 struct tmem_object_root {
-    DECL_SENTINEL
     struct oid oid;
     struct rb_node rb_tree_node; /* protected by pool->pool_rwlock */
     unsigned long objnode_count; /* atomicity depends on obj_spinlock */
@@ -193,7 +148,6 @@ struct tmem_object_root {
 
 struct tmem_object_node {
     struct tmem_object_root *obj;
-    DECL_SENTINEL
     struct radix_tree_node rtn;
 };
 
@@ -228,7 +182,6 @@ struct tmem_page_descriptor {
         uint64_t timestamp;
         uint32_t pool_id;  /* used for invalid list only */
     };
-    DECL_SENTINEL
 };
 
 #define PCD_TZE_MAX_SIZE (PAGE_SIZE - (PAGE_SIZE/64))
@@ -299,7 +252,7 @@ static atomic_t global_rtree_node_count = ATOMIC_INIT(0);
 
 
 /************ MEMORY ALLOCATION INTERFACE *****************************/
-static NOINLINE void *tmem_malloc(size_t size, struct tmem_pool *pool)
+static void *tmem_malloc(size_t size, struct tmem_pool *pool)
 {
     void *v = NULL;
 
@@ -318,7 +271,7 @@ static NOINLINE void *tmem_malloc(size_t size, struct tmem_pool *pool)
     return v;
 }
 
-static NOINLINE void tmem_free(void *p, struct tmem_pool *pool)
+static void tmem_free(void *p, struct tmem_pool *pool)
 {
     if ( pool == NULL || !is_persistent(pool) )
     {
@@ -332,7 +285,7 @@ static NOINLINE void tmem_free(void *p, struct tmem_pool *pool)
     }
 }
 
-static NOINLINE struct page_info *tmem_page_alloc(struct tmem_pool *pool)
+static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
 {
     struct page_info *pfp = NULL;
 
@@ -347,7 +300,7 @@ static NOINLINE struct page_info *tmem_page_alloc(struct tmem_pool *pool)
     return pfp;
 }
 
-static NOINLINE void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
+static void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
 {
     ASSERT(pfp);
     if ( pool == NULL || !is_persistent(pool) )
@@ -361,7 +314,7 @@ static NOINLINE void tmem_page_free(struct tmem_pool *pool, struct page_info *pf
 
 #define NOT_SHAREABLE ((uint16_t)-1UL)
 
-static NOINLINE int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
+static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
 {
     uint8_t firstbyte = pgp->firstbyte;
     struct tmem_page_content_descriptor *pcd;
@@ -385,7 +338,7 @@ static NOINLINE int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descript
 
 /* ensure pgp no longer points to pcd, nor vice-versa */
 /* take pcd rwlock unless have_pcd_rwlock is set, always unlock when done */
-static NOINLINE void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool *pool, bool_t have_pcd_rwlock)
+static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool *pool, bool_t have_pcd_rwlock)
 {
     struct tmem_page_content_descriptor *pcd = pgp->pcd;
     struct page_info *pfp = pgp->pcd->pfp;
@@ -448,7 +401,7 @@ static NOINLINE void pcd_disassociate(struct tmem_page_descriptor *pgp, struct t
 }
 
 
-static NOINLINE int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize_t csize)
+static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize_t csize)
 {
     struct rb_node **new, *parent = NULL;
     struct rb_root *root;
@@ -585,7 +538,7 @@ unlock:
 /************ PAGE DESCRIPTOR MANIPULATION ROUTINES *******************/
 
 /* allocate a struct tmem_page_descriptor and associate it with an object */
-static NOINLINE struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *obj)
+static struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *obj)
 {
     struct tmem_page_descriptor *pgp;
     struct tmem_pool *pool;
@@ -608,7 +561,6 @@ static NOINLINE struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *
     pgp->size = -1;
     pgp->index = -1;
     pgp->timestamp = get_cycles();
-    SET_SENTINEL(pgp,PGD);
     atomic_inc_and_max(global_pgp_count);
     atomic_inc_and_max(pool->pgp_count);
     return pgp;
@@ -618,13 +570,11 @@ static struct tmem_page_descriptor *pgp_lookup_in_obj(struct tmem_object_root *o
 {
     ASSERT(obj != NULL);
     ASSERT_SPINLOCK(&obj->obj_spinlock);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     return radix_tree_lookup(&obj->tree_root, index);
 }
 
-static NOINLINE void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
+static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
 {
     pagesize_t pgp_size = pgp->size;
 
@@ -645,14 +595,11 @@ static NOINLINE void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem
     pgp->size = -1;
 }
 
-static NOINLINE void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
+static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
 {
     struct tmem_pool *pool = NULL;
 
-    ASSERT_SENTINEL(pgp,PGD);
     ASSERT(pgp->us.obj != NULL);
-    ASSERT_SENTINEL(pgp->us.obj,OBJ);
-    ASSERT_SENTINEL(pgp->us.obj->pool,POOL);
     ASSERT(pgp->us.obj->pool->client != NULL);
     if ( from_delete )
         ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
@@ -673,19 +620,15 @@ static NOINLINE void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
         pgp->pool_id = pool->pool_id;
         return;
     }
-    INVERT_SENTINEL(pgp,PGD);
     pgp->us.obj = NULL;
     pgp->index = -1;
     tmem_free(pgp, pool);
 }
 
-static NOINLINE void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
+static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = client->pools[pgp->pool_id];
 
-    ASSERT_SENTINEL(pool,POOL);
-    ASSERT_SENTINEL(pgp,PGD);
-    INVERT_SENTINEL(pgp,PGD);
     pgp->us.obj = NULL;
     pgp->index = -1;
     tmem_free(pgp, pool);
@@ -733,7 +676,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 NOINLINE void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
 {
     uint64_t life;
 
@@ -747,7 +690,7 @@ static NOINLINE void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_
 }
 
 /* called only indirectly by radix_tree_destroy */
-static NOINLINE void pgp_destroy(void *v)
+static void pgp_destroy(void *v)
 {
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
@@ -770,15 +713,13 @@ static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct t
     return ret;
 }
 
-static NOINLINE struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_object_root *obj, uint32_t index)
+static struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_object_root *obj, uint32_t index)
 {
     struct tmem_page_descriptor *pgp;
 
     ASSERT(obj != NULL);
     ASSERT_SPINLOCK(&obj->obj_spinlock);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     pgp = radix_tree_delete(&obj->tree_root, index);
     if ( pgp != NULL )
         obj->pgp_count--;
@@ -790,19 +731,16 @@ static NOINLINE struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_obj
 /************ RADIX TREE NODE MANIPULATION ROUTINES *******************/
 
 /* called only indirectly from radix_tree_insert */
-static NOINLINE struct radix_tree_node *rtn_alloc(void *arg)
+static struct radix_tree_node *rtn_alloc(void *arg)
 {
     struct tmem_object_node *objnode;
     struct tmem_object_root *obj = (struct tmem_object_root *)arg;
 
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     objnode = tmem_malloc(sizeof(struct tmem_object_node),obj->pool);
     if (objnode == NULL)
         return NULL;
     objnode->obj = obj;
-    SET_SENTINEL(objnode,OBJNODE);
     memset(&objnode->rtn, 0, sizeof(struct radix_tree_node));
     if (++obj->pool->objnode_count > obj->pool->objnode_count_max)
         obj->pool->objnode_count_max = obj->pool->objnode_count;
@@ -819,14 +757,10 @@ static void rtn_free(struct radix_tree_node *rtn, void *arg)
 
     ASSERT(rtn != NULL);
     objnode = container_of(rtn,struct tmem_object_node,rtn);
-    ASSERT_SENTINEL(objnode,OBJNODE);
-    INVERT_SENTINEL(objnode,OBJNODE);
     ASSERT(objnode->obj != NULL);
     ASSERT_SPINLOCK(&objnode->obj->obj_spinlock);
-    ASSERT_SENTINEL(objnode->obj,OBJ);
     pool = objnode->obj->pool;
     ASSERT(pool != NULL);
-    ASSERT_SENTINEL(pool,POOL);
     pool->objnode_count--;
     objnode->obj->objnode_count--;
     objnode->obj = NULL;
@@ -872,7 +806,7 @@ unsigned oid_hash(struct oid *oidp)
 }
 
 /* searches for object==oid in pool, returns locked object if found */
-static NOINLINE struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oidp)
 {
     struct rb_node *node;
     struct tmem_object_root *obj;
@@ -910,14 +844,13 @@ restart_find:
 }
 
 /* free an object that has no more pgps in it */
-static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
+static void obj_free(struct tmem_object_root *obj, int no_rebalance)
 {
     struct tmem_pool *pool;
     struct oid old_oid;
 
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     ASSERT(obj != NULL);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pgp_count == 0);
     pool = obj->pool;
     ASSERT(pool != NULL);
@@ -929,7 +862,6 @@ static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
     ASSERT(obj->tree_root.rnode == NULL);
     pool->obj_count--;
     ASSERT(pool->obj_count >= 0);
-    INVERT_SENTINEL(obj,OBJ);
     obj->pool = NULL;
     old_oid = obj->oid;
     oid_set_invalid(&obj->oid);
@@ -942,7 +874,7 @@ static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
     tmem_free(obj, pool);
 }
 
-static NOINLINE int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
+static int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
 {
     struct rb_node **new, *parent = NULL;
     struct tmem_object_root *this;
@@ -973,7 +905,7 @@ static NOINLINE int obj_rb_insert(struct rb_root *root, struct tmem_object_root
  * allocate, initialize, and insert an tmem_object_root
  * (should be called only if find failed)
  */
-static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
@@ -993,7 +925,6 @@ static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct
     obj->objnode_count = 0;
     obj->pgp_count = 0;
     obj->last_client = TMEM_CLI_ID_NULL;
-    SET_SENTINEL(obj,OBJ);
     tmem_spin_lock(&obj->obj_spinlock);
     obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
     obj->no_evict = 1;
@@ -1002,7 +933,7 @@ static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct
 }
 
 /* free an object after destroying any pgps in it */
-static NOINLINE void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
+static void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
 {
     ASSERT_WRITELOCK(&obj->pool->pool_rwlock);
     radix_tree_destroy(&obj->tree_root, pgp_destroy);
@@ -1066,14 +997,11 @@ static struct tmem_pool * pool_alloc(void)
     pool->flushs_found = pool->flushs = 0;
     pool->flush_objs_found = pool->flush_objs = 0;
     pool->is_dying = 0;
-    SET_SENTINEL(pool,POOL);
     return pool;
 }
 
-static NOINLINE void pool_free(struct tmem_pool *pool)
+static void pool_free(struct tmem_pool *pool)
 {
-    ASSERT_SENTINEL(pool,POOL);
-    INVERT_SENTINEL(pool,POOL);
     pool->client = NULL;
     list_del(&pool->pool_list);
     xfree(pool);
@@ -1097,7 +1025,7 @@ static int shared_pool_join(struct tmem_pool *pool, struct client *new_client)
 }
 
 /* reassign "ownership" of the pool to another client that shares this pool */
-static NOINLINE void shared_pool_reassign(struct tmem_pool *pool)
+static void shared_pool_reassign(struct tmem_pool *pool)
 {
     struct share_list *sl;
     int poolid;
@@ -1128,7 +1056,7 @@ static NOINLINE void shared_pool_reassign(struct tmem_pool *pool)
 
 /* destroy all objects with last_client same as passed cli_id,
    remove pool's cli_id from list of sharers of this pool */
-static NOINLINE int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
+static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
 {
     struct share_list *sl;
     int s_poolid;
@@ -1374,12 +1302,10 @@ static int tmem_evict(void)
 
 found:
     ASSERT(pgp != NULL);
-    ASSERT_SENTINEL(pgp,PGD);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
     ASSERT(obj->no_evict == 0);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj,OBJ);
     pool = obj->pool;
 
     ASSERT_SPINLOCK(&obj->obj_spinlock);
@@ -1454,13 +1380,12 @@ static inline void tmem_ensure_avail_pages(void)
 
 /************ TMEM CORE OPERATIONS ************************************/
 
-static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
+static int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
                                          tmem_cli_va_param_t clibuf)
 {
     void *dst, *p;
     size_t size;
     int ret = 0;
-    DECL_LOCAL_CYC_COUNTER(compress);
     
     ASSERT(pgp != NULL);
     ASSERT(pgp->us.obj != NULL);
@@ -1470,7 +1395,6 @@ static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_p
 
     if ( pgp->pfp != NULL )
         pgp_free_data(pgp, pgp->us.obj->pool);
-    START_CYC_COUNTER(compress);
     ret = tmem_compress_from_client(cmfn, &dst, &size, clibuf);
     if ( ret <= 0 )
         goto out;
@@ -1493,11 +1417,10 @@ static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_p
     ret = 1;
 
 out:
-    END_CYC_COUNTER(compress);
     return ret;
 }
 
-static NOINLINE int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
+static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
        pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
        tmem_cli_va_param_t clibuf)
 {
@@ -1587,7 +1510,7 @@ cleanup:
 }
 
 
-static NOINLINE int do_tmem_put(struct tmem_pool *pool,
+static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, pagesize_t tmem_offset,
               pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
@@ -1731,14 +1654,13 @@ free:
     return ret;
 }
 
-static NOINLINE int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
+static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, pagesize_t tmem_offset,
               pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
     struct client *client = pool->client;
-    DECL_LOCAL_CYC_COUNTER(decompress);
     int rc;
 
     if ( !_atomic_read(pool->pgp_count) )
@@ -1766,10 +1688,8 @@ static NOINLINE int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32
         rc = pcd_copy_to_client(cmfn, pgp);
     else if ( pgp->size != 0 )
     {
-        START_CYC_COUNTER(decompress);
         rc = tmem_decompress_to_client(cmfn, pgp->cdata,
                                       pgp->size, clibuf);
-        END_CYC_COUNTER(decompress);
     }
     else
         rc = tmem_copy_to_client(cmfn, pgp->pfp, tmem_offset,
@@ -1818,7 +1738,7 @@ bad_copy:
     return rc;
 }
 
-static NOINLINE int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t index)
+static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t index)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
@@ -1853,7 +1773,7 @@ out:
         return 1;
 }
 
-static NOINLINE int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
+static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
@@ -1873,7 +1793,7 @@ out:
         return 1;
 }
 
-static NOINLINE int do_tmem_destroy_pool(uint32_t pool_id)
+static int do_tmem_destroy_pool(uint32_t pool_id)
 {
     struct client *client = tmem_client_from_current();
     struct tmem_pool *pool;
@@ -1889,7 +1809,7 @@ static NOINLINE int do_tmem_destroy_pool(uint32_t pool_id)
     return 1;
 }
 
-static NOINLINE int do_tmem_new_pool(domid_t this_cli_id,
+static int do_tmem_new_pool(domid_t this_cli_id,
                                      uint32_t d_poolid, uint32_t flags,
                                      uint64_t uuid_lo, uint64_t uuid_hi)
 {
@@ -2169,7 +2089,6 @@ static int tmemc_list_shared(tmem_cli_va_param_t buf, int off, uint32_t len,
     return sum;
 }
 
-#ifdef TMEM_PERF
 static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
                                   uint32_t len, bool_t use_long)
 {
@@ -2177,15 +2096,6 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     int n = 0, sum = 0;
 
     n = scnprintf(info+n,BSIZE-n,"T=");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,succ_get,"G");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,succ_put,"P");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,non_succ_get,"g");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,non_succ_put,"p");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush,"F");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush_obj,"O");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy,"C");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,compress,"c");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,decompress,"d");
     n--; /* overwrite trailing comma */
     n += scnprintf(info+n,BSIZE-n,"\n");
     if ( sum + n >= len )
@@ -2194,9 +2104,6 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     sum += n;
     return sum;
 }
-#else
-#define tmemc_list_global_perf(_buf,_off,_len,_use) (0)
-#endif
 
 static int tmemc_list_global(tmem_cli_va_param_t buf, int off, uint32_t len,
                               bool_t use_long)
@@ -2304,7 +2211,7 @@ static int tmemc_set_var(domid_t cli_id, uint32_t subop, uint32_t arg1)
     return 0;
 }
 
-static NOINLINE int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
+static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
                                   uint64_t uuid_hi, bool_t auth)
 {
     struct client *client;
@@ -2341,7 +2248,7 @@ static NOINLINE int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
     return 1;
 }
 
-static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id,
+static int tmemc_save_subop(int cli_id, uint32_t pool_id,
                         uint32_t subop, tmem_cli_va_param_t buf, uint32_t arg1)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2430,7 +2337,7 @@ static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id,
     return rc;
 }
 
-static NOINLINE int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
+static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
                         tmem_cli_va_param_t buf, uint32_t bufsize)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2485,7 +2392,7 @@ out:
     return ret;
 }
 
-static NOINLINE int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
+static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
                         uint32_t bufsize)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2551,7 +2458,7 @@ static int tmemc_restore_flush_page(int cli_id, uint32_t pool_id, struct oid *oi
     return do_tmem_flush_page(pool,oidp,index);
 }
 
-static NOINLINE int do_tmem_control(struct tmem_op *op)
+static int do_tmem_control(struct tmem_op *op)
 {
     int ret;
     uint32_t pool_id = op->pool_id;
@@ -2638,12 +2545,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
     bool_t non_succ_get = 0, non_succ_put = 0;
     bool_t flush = 0, flush_obj = 0;
     bool_t tmem_write_lock_set = 0, tmem_read_lock_set = 0;
-    DECL_LOCAL_CYC_COUNTER(succ_get);
-    DECL_LOCAL_CYC_COUNTER(succ_put);
-    DECL_LOCAL_CYC_COUNTER(non_succ_get);
-    DECL_LOCAL_CYC_COUNTER(non_succ_put);
-    DECL_LOCAL_CYC_COUNTER(flush);
-    DECL_LOCAL_CYC_COUNTER(flush_obj);
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2661,13 +2562,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
             spin_lock(&tmem_spinlock);
     }
 
-    START_CYC_COUNTER(succ_get);
-    DUP_START_CYC_COUNTER(succ_put,succ_get);
-    DUP_START_CYC_COUNTER(non_succ_get,succ_get);
-    DUP_START_CYC_COUNTER(non_succ_put,succ_get);
-    DUP_START_CYC_COUNTER(flush,succ_get);
-    DUP_START_CYC_COUNTER(flush_obj,succ_get);
-
     if ( client != NULL && tmem_client_is_dying(client) )
     {
         rc = -ENODEV;
@@ -2743,7 +2637,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
             rc = -ENODEV;
             goto out;
         }
-        ASSERT_SENTINEL(pool,POOL);
     }
 
     oidp = (struct oid *)&op.u.gen.oid[0];
@@ -2787,19 +2680,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
 out:
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( succ_get )
-        END_CYC_COUNTER_CLI(succ_get,client);
-    else if ( succ_put )
-        END_CYC_COUNTER_CLI(succ_put,client);
-    else if ( non_succ_get )
-        END_CYC_COUNTER_CLI(non_succ_get,client);
-    else if ( non_succ_put )
-        END_CYC_COUNTER_CLI(non_succ_put,client);
-    else if ( flush )
-        END_CYC_COUNTER_CLI(flush,client);
-    else if ( flush_obj )
-        END_CYC_COUNTER_CLI(flush_obj,client);
-
     if ( tmem_lock_all )
     {
         if ( tmem_lock_all > 1 )
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index d6e2e0d..1e002ae 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -36,8 +36,6 @@ integer_param("tmem_lock", opt_tmem_lock);
 
 EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
 
-DECL_CYC_COUNTER(pg_copy);
-
 /* these are a concurrency bottleneck, could be percpu and dynamically
  * allocated iff opt_tmem_compress */
 #define LZO_WORKMEM_BYTES LZO1X_1_MEM_COMPRESS
@@ -48,10 +46,7 @@ static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 
 void tmem_copy_page(char *to, char*from)
 {
-    DECL_LOCAL_CYC_COUNTER(pg_copy);
-    START_CYC_COUNTER(pg_copy);
     memcpy(to, from, PAGE_SIZE);
-    END_CYC_COUNTER(pg_copy);
 }
 
 #if defined(CONFIG_ARM)
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index cccc98e..a477960 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -401,55 +401,4 @@ extern void tmem_persistent_pool_page_put(void *page_va);
 #define tmem_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##args)
 #define tmem_client_info(fmt, args...) printk(XENLOG_G_INFO fmt, ##args)
 
-#define TMEM_PERF
-#ifdef TMEM_PERF
-#define DECL_CYC_COUNTER(x) \
-    uint64_t x##_sum_cycles = 0, x##_count = 0; \
-    uint32_t x##_min_cycles = 0x7fffffff, x##_max_cycles = 0;
-#define EXTERN_CYC_COUNTER(x) \
-    extern uint64_t x##_sum_cycles, x##_count; \
-    extern uint32_t x##_min_cycles, x##_max_cycles;
-#define DECL_LOCAL_CYC_COUNTER(x) \
-    int64_t x##_start = 0
-#define START_CYC_COUNTER(x) x##_start = get_cycles()
-#define DUP_START_CYC_COUNTER(x,y) x##_start = y##_start
-/* following might race, but since its advisory only, don't care */
-#define END_CYC_COUNTER(x) \
-    do { \
-      x##_start = get_cycles() - x##_start; \
-      if (x##_start > 0 && x##_start < 1000000000) { \
-       x##_sum_cycles += x##_start; x##_count++; \
-       if ((uint32_t)x##_start < x##_min_cycles) x##_min_cycles = x##_start; \
-       if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \
-      } \
-    } while (0)
-#define END_CYC_COUNTER_CLI(x,y) \
-    do { \
-      x##_start = get_cycles() - x##_start; \
-      if (x##_start > 0 && x##_start < 1000000000) { \
-       x##_sum_cycles += x##_start; x##_count++; \
-       if ((uint32_t)x##_start < x##_min_cycles) x##_min_cycles = x##_start; \
-       if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \
-       y->total_cycles += x##_start; \
-      } \
-    } while (0)
-#define RESET_CYC_COUNTER(x) { x##_sum_cycles = 0, x##_count = 0; \
-  x##_min_cycles = 0x7fffffff, x##_max_cycles = 0; }
-#define SCNPRINTF_CYC_COUNTER(buf,size,x,tag) \
-  scnprintf(buf,size, \
-  tag"n:%"PRIu64","tag"t:%"PRIu64","tag"x:%"PRId32","tag"m:%"PRId32",", \
-  x##_count,x##_sum_cycles,x##_max_cycles,x##_min_cycles)
-#else
-#define DECL_CYC_COUNTER(x)
-#define EXTERN_CYC_COUNTER(x) \
-    extern uint64_t x##_sum_cycles, x##_count; \
-    extern uint32_t x##_min_cycles, x##_max_cycles;
-#define DECL_LOCAL_CYC_COUNTER(x) do { } while (0)
-#define START_CYC_COUNTER(x) do { } while (0)
-#define DUP_START_CYC_COUNTER(x) do { } while (0)
-#define END_CYC_COUNTER(x) do { } while (0)
-#define SCNPRINTF_CYC_COUNTER(buf,size,x,tag) (0)
-#define RESET_CYC_COUNTER(x) do { } while (0)
-#endif
-
 #endif /* __XEN_TMEM_XEN_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 Thu Jan 09 10:22:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1Cl6-0004KG-5r; Thu, 09 Jan 2014 10:22: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 1W1Cl4-0004Jo-Ao
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:38 +0000
Received: from [193.109.254.147:27073] by server-16.bemta-14.messagelabs.com
	id 52/46-20600-D687EC25; Thu, 09 Jan 2014 10:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389262954!9797305!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21921 invoked from network); 9 Jan 2014 10:22:35 -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;
	9 Jan 2014 10:22: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 1W1Cl0-0000x8-Jn
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cl0-00022H-I2
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:34 +0000
Date: Thu, 09 Jan 2014 10:22:34 +0000
Message-Id: <E1W1Cl0-00022H-I2@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop some 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 5dff5a2af19e35b58f9776b0175be92c231c659e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:02 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop some debug code
    
    "SENTINELS" and "DECL_CYC_COUNTER" are hacky code for debugging, there are not
    suitable exist in upstream code.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  192 ++++++++-----------------------------------
 xen/common/tmem_xen.c      |    5 -
 xen/include/xen/tmem_xen.h |   51 ------------
 3 files changed, 36 insertions(+), 212 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 0991eeb..cdc8826 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -29,39 +29,6 @@
 
 #define TMEM_SPEC_VERSION 1
 
-/************ DEBUG and STATISTICS (+ some compression testing) *******/
-
-#ifndef NDEBUG
-#define SENTINELS
-#define NOINLINE noinline
-#else
-#define NOINLINE
-#endif
-
-#ifdef SENTINELS
-#define DECL_SENTINEL unsigned long sentinel;
-#define SET_SENTINEL(_x,_y) _x->sentinel = _y##_SENTINEL
-#define INVERT_SENTINEL(_x,_y) _x->sentinel = ~_y##_SENTINEL
-#define ASSERT_SENTINEL(_x,_y) \
-    ASSERT(_x->sentinel != ~_y##_SENTINEL);ASSERT(_x->sentinel == _y##_SENTINEL)
-#if defined(CONFIG_ARM)
-#define POOL_SENTINEL 0x87658765
-#define OBJ_SENTINEL 0x12345678
-#define OBJNODE_SENTINEL 0xfedcba09
-#define PGD_SENTINEL  0x43214321
-#else
-#define POOL_SENTINEL 0x8765876587658765
-#define OBJ_SENTINEL 0x1234567812345678
-#define OBJNODE_SENTINEL 0xfedcba0987654321
-#define PGD_SENTINEL  0x4321432143214321
-#endif
-#else
-#define DECL_SENTINEL
-#define SET_SENTINEL(_x,_y) do { } while (0)
-#define ASSERT_SENTINEL(_x,_y) do { } while (0)
-#define INVERT_SENTINEL(_x,_y) do { } while (0)
-#endif
-
 /* global statistics (none need to be locked) */
 static unsigned long total_tmem_ops = 0;
 static unsigned long errored_tmem_ops = 0;
@@ -83,16 +50,6 @@ static unsigned long failed_copies;
 static unsigned long pcd_tot_tze_size = 0;
 static unsigned long pcd_tot_csize = 0;
 
-DECL_CYC_COUNTER(succ_get);
-DECL_CYC_COUNTER(succ_put);
-DECL_CYC_COUNTER(non_succ_get);
-DECL_CYC_COUNTER(non_succ_put);
-DECL_CYC_COUNTER(flush);
-DECL_CYC_COUNTER(flush_obj);
-EXTERN_CYC_COUNTER(pg_copy);
-DECL_CYC_COUNTER(compress);
-DECL_CYC_COUNTER(decompress);
-
 /************ CORE DATA STRUCTURES ************************************/
 
 #define MAX_POOLS_PER_DOMAIN 16
@@ -166,7 +123,6 @@ struct tmem_pool {
     unsigned long gets, found_gets;
     unsigned long flushs, flushs_found;
     unsigned long flush_objs, flush_objs_found;
-    DECL_SENTINEL
 };
 
 #define is_persistent(_p)  (_p->persistent)
@@ -179,7 +135,6 @@ struct oid {
 };
 
 struct tmem_object_root {
-    DECL_SENTINEL
     struct oid oid;
     struct rb_node rb_tree_node; /* protected by pool->pool_rwlock */
     unsigned long objnode_count; /* atomicity depends on obj_spinlock */
@@ -193,7 +148,6 @@ struct tmem_object_root {
 
 struct tmem_object_node {
     struct tmem_object_root *obj;
-    DECL_SENTINEL
     struct radix_tree_node rtn;
 };
 
@@ -228,7 +182,6 @@ struct tmem_page_descriptor {
         uint64_t timestamp;
         uint32_t pool_id;  /* used for invalid list only */
     };
-    DECL_SENTINEL
 };
 
 #define PCD_TZE_MAX_SIZE (PAGE_SIZE - (PAGE_SIZE/64))
@@ -299,7 +252,7 @@ static atomic_t global_rtree_node_count = ATOMIC_INIT(0);
 
 
 /************ MEMORY ALLOCATION INTERFACE *****************************/
-static NOINLINE void *tmem_malloc(size_t size, struct tmem_pool *pool)
+static void *tmem_malloc(size_t size, struct tmem_pool *pool)
 {
     void *v = NULL;
 
@@ -318,7 +271,7 @@ static NOINLINE void *tmem_malloc(size_t size, struct tmem_pool *pool)
     return v;
 }
 
-static NOINLINE void tmem_free(void *p, struct tmem_pool *pool)
+static void tmem_free(void *p, struct tmem_pool *pool)
 {
     if ( pool == NULL || !is_persistent(pool) )
     {
@@ -332,7 +285,7 @@ static NOINLINE void tmem_free(void *p, struct tmem_pool *pool)
     }
 }
 
-static NOINLINE struct page_info *tmem_page_alloc(struct tmem_pool *pool)
+static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
 {
     struct page_info *pfp = NULL;
 
@@ -347,7 +300,7 @@ static NOINLINE struct page_info *tmem_page_alloc(struct tmem_pool *pool)
     return pfp;
 }
 
-static NOINLINE void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
+static void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
 {
     ASSERT(pfp);
     if ( pool == NULL || !is_persistent(pool) )
@@ -361,7 +314,7 @@ static NOINLINE void tmem_page_free(struct tmem_pool *pool, struct page_info *pf
 
 #define NOT_SHAREABLE ((uint16_t)-1UL)
 
-static NOINLINE int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
+static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
 {
     uint8_t firstbyte = pgp->firstbyte;
     struct tmem_page_content_descriptor *pcd;
@@ -385,7 +338,7 @@ static NOINLINE int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descript
 
 /* ensure pgp no longer points to pcd, nor vice-versa */
 /* take pcd rwlock unless have_pcd_rwlock is set, always unlock when done */
-static NOINLINE void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool *pool, bool_t have_pcd_rwlock)
+static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool *pool, bool_t have_pcd_rwlock)
 {
     struct tmem_page_content_descriptor *pcd = pgp->pcd;
     struct page_info *pfp = pgp->pcd->pfp;
@@ -448,7 +401,7 @@ static NOINLINE void pcd_disassociate(struct tmem_page_descriptor *pgp, struct t
 }
 
 
-static NOINLINE int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize_t csize)
+static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize_t csize)
 {
     struct rb_node **new, *parent = NULL;
     struct rb_root *root;
@@ -585,7 +538,7 @@ unlock:
 /************ PAGE DESCRIPTOR MANIPULATION ROUTINES *******************/
 
 /* allocate a struct tmem_page_descriptor and associate it with an object */
-static NOINLINE struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *obj)
+static struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *obj)
 {
     struct tmem_page_descriptor *pgp;
     struct tmem_pool *pool;
@@ -608,7 +561,6 @@ static NOINLINE struct tmem_page_descriptor *pgp_alloc(struct tmem_object_root *
     pgp->size = -1;
     pgp->index = -1;
     pgp->timestamp = get_cycles();
-    SET_SENTINEL(pgp,PGD);
     atomic_inc_and_max(global_pgp_count);
     atomic_inc_and_max(pool->pgp_count);
     return pgp;
@@ -618,13 +570,11 @@ static struct tmem_page_descriptor *pgp_lookup_in_obj(struct tmem_object_root *o
 {
     ASSERT(obj != NULL);
     ASSERT_SPINLOCK(&obj->obj_spinlock);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     return radix_tree_lookup(&obj->tree_root, index);
 }
 
-static NOINLINE void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
+static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
 {
     pagesize_t pgp_size = pgp->size;
 
@@ -645,14 +595,11 @@ static NOINLINE void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem
     pgp->size = -1;
 }
 
-static NOINLINE void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
+static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
 {
     struct tmem_pool *pool = NULL;
 
-    ASSERT_SENTINEL(pgp,PGD);
     ASSERT(pgp->us.obj != NULL);
-    ASSERT_SENTINEL(pgp->us.obj,OBJ);
-    ASSERT_SENTINEL(pgp->us.obj->pool,POOL);
     ASSERT(pgp->us.obj->pool->client != NULL);
     if ( from_delete )
         ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
@@ -673,19 +620,15 @@ static NOINLINE void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
         pgp->pool_id = pool->pool_id;
         return;
     }
-    INVERT_SENTINEL(pgp,PGD);
     pgp->us.obj = NULL;
     pgp->index = -1;
     tmem_free(pgp, pool);
 }
 
-static NOINLINE void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
+static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = client->pools[pgp->pool_id];
 
-    ASSERT_SENTINEL(pool,POOL);
-    ASSERT_SENTINEL(pgp,PGD);
-    INVERT_SENTINEL(pgp,PGD);
     pgp->us.obj = NULL;
     pgp->index = -1;
     tmem_free(pgp, pool);
@@ -733,7 +676,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 NOINLINE void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
 {
     uint64_t life;
 
@@ -747,7 +690,7 @@ static NOINLINE void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_
 }
 
 /* called only indirectly by radix_tree_destroy */
-static NOINLINE void pgp_destroy(void *v)
+static void pgp_destroy(void *v)
 {
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
@@ -770,15 +713,13 @@ static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct t
     return ret;
 }
 
-static NOINLINE struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_object_root *obj, uint32_t index)
+static struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_object_root *obj, uint32_t index)
 {
     struct tmem_page_descriptor *pgp;
 
     ASSERT(obj != NULL);
     ASSERT_SPINLOCK(&obj->obj_spinlock);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     pgp = radix_tree_delete(&obj->tree_root, index);
     if ( pgp != NULL )
         obj->pgp_count--;
@@ -790,19 +731,16 @@ static NOINLINE struct tmem_page_descriptor *pgp_delete_from_obj(struct tmem_obj
 /************ RADIX TREE NODE MANIPULATION ROUTINES *******************/
 
 /* called only indirectly from radix_tree_insert */
-static NOINLINE struct radix_tree_node *rtn_alloc(void *arg)
+static struct radix_tree_node *rtn_alloc(void *arg)
 {
     struct tmem_object_node *objnode;
     struct tmem_object_root *obj = (struct tmem_object_root *)arg;
 
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj->pool,POOL);
     objnode = tmem_malloc(sizeof(struct tmem_object_node),obj->pool);
     if (objnode == NULL)
         return NULL;
     objnode->obj = obj;
-    SET_SENTINEL(objnode,OBJNODE);
     memset(&objnode->rtn, 0, sizeof(struct radix_tree_node));
     if (++obj->pool->objnode_count > obj->pool->objnode_count_max)
         obj->pool->objnode_count_max = obj->pool->objnode_count;
@@ -819,14 +757,10 @@ static void rtn_free(struct radix_tree_node *rtn, void *arg)
 
     ASSERT(rtn != NULL);
     objnode = container_of(rtn,struct tmem_object_node,rtn);
-    ASSERT_SENTINEL(objnode,OBJNODE);
-    INVERT_SENTINEL(objnode,OBJNODE);
     ASSERT(objnode->obj != NULL);
     ASSERT_SPINLOCK(&objnode->obj->obj_spinlock);
-    ASSERT_SENTINEL(objnode->obj,OBJ);
     pool = objnode->obj->pool;
     ASSERT(pool != NULL);
-    ASSERT_SENTINEL(pool,POOL);
     pool->objnode_count--;
     objnode->obj->objnode_count--;
     objnode->obj = NULL;
@@ -872,7 +806,7 @@ unsigned oid_hash(struct oid *oidp)
 }
 
 /* searches for object==oid in pool, returns locked object if found */
-static NOINLINE struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oidp)
 {
     struct rb_node *node;
     struct tmem_object_root *obj;
@@ -910,14 +844,13 @@ restart_find:
 }
 
 /* free an object that has no more pgps in it */
-static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
+static void obj_free(struct tmem_object_root *obj, int no_rebalance)
 {
     struct tmem_pool *pool;
     struct oid old_oid;
 
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     ASSERT(obj != NULL);
-    ASSERT_SENTINEL(obj,OBJ);
     ASSERT(obj->pgp_count == 0);
     pool = obj->pool;
     ASSERT(pool != NULL);
@@ -929,7 +862,6 @@ static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
     ASSERT(obj->tree_root.rnode == NULL);
     pool->obj_count--;
     ASSERT(pool->obj_count >= 0);
-    INVERT_SENTINEL(obj,OBJ);
     obj->pool = NULL;
     old_oid = obj->oid;
     oid_set_invalid(&obj->oid);
@@ -942,7 +874,7 @@ static NOINLINE void obj_free(struct tmem_object_root *obj, int no_rebalance)
     tmem_free(obj, pool);
 }
 
-static NOINLINE int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
+static int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
 {
     struct rb_node **new, *parent = NULL;
     struct tmem_object_root *this;
@@ -973,7 +905,7 @@ static NOINLINE int obj_rb_insert(struct rb_root *root, struct tmem_object_root
  * allocate, initialize, and insert an tmem_object_root
  * (should be called only if find failed)
  */
-static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
@@ -993,7 +925,6 @@ static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct
     obj->objnode_count = 0;
     obj->pgp_count = 0;
     obj->last_client = TMEM_CLI_ID_NULL;
-    SET_SENTINEL(obj,OBJ);
     tmem_spin_lock(&obj->obj_spinlock);
     obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
     obj->no_evict = 1;
@@ -1002,7 +933,7 @@ static NOINLINE struct tmem_object_root * obj_new(struct tmem_pool *pool, struct
 }
 
 /* free an object after destroying any pgps in it */
-static NOINLINE void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
+static void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
 {
     ASSERT_WRITELOCK(&obj->pool->pool_rwlock);
     radix_tree_destroy(&obj->tree_root, pgp_destroy);
@@ -1066,14 +997,11 @@ static struct tmem_pool * pool_alloc(void)
     pool->flushs_found = pool->flushs = 0;
     pool->flush_objs_found = pool->flush_objs = 0;
     pool->is_dying = 0;
-    SET_SENTINEL(pool,POOL);
     return pool;
 }
 
-static NOINLINE void pool_free(struct tmem_pool *pool)
+static void pool_free(struct tmem_pool *pool)
 {
-    ASSERT_SENTINEL(pool,POOL);
-    INVERT_SENTINEL(pool,POOL);
     pool->client = NULL;
     list_del(&pool->pool_list);
     xfree(pool);
@@ -1097,7 +1025,7 @@ static int shared_pool_join(struct tmem_pool *pool, struct client *new_client)
 }
 
 /* reassign "ownership" of the pool to another client that shares this pool */
-static NOINLINE void shared_pool_reassign(struct tmem_pool *pool)
+static void shared_pool_reassign(struct tmem_pool *pool)
 {
     struct share_list *sl;
     int poolid;
@@ -1128,7 +1056,7 @@ static NOINLINE void shared_pool_reassign(struct tmem_pool *pool)
 
 /* destroy all objects with last_client same as passed cli_id,
    remove pool's cli_id from list of sharers of this pool */
-static NOINLINE int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
+static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
 {
     struct share_list *sl;
     int s_poolid;
@@ -1374,12 +1302,10 @@ static int tmem_evict(void)
 
 found:
     ASSERT(pgp != NULL);
-    ASSERT_SENTINEL(pgp,PGD);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
     ASSERT(obj->no_evict == 0);
     ASSERT(obj->pool != NULL);
-    ASSERT_SENTINEL(obj,OBJ);
     pool = obj->pool;
 
     ASSERT_SPINLOCK(&obj->obj_spinlock);
@@ -1454,13 +1380,12 @@ static inline void tmem_ensure_avail_pages(void)
 
 /************ TMEM CORE OPERATIONS ************************************/
 
-static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
+static int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
                                          tmem_cli_va_param_t clibuf)
 {
     void *dst, *p;
     size_t size;
     int ret = 0;
-    DECL_LOCAL_CYC_COUNTER(compress);
     
     ASSERT(pgp != NULL);
     ASSERT(pgp->us.obj != NULL);
@@ -1470,7 +1395,6 @@ static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_p
 
     if ( pgp->pfp != NULL )
         pgp_free_data(pgp, pgp->us.obj->pool);
-    START_CYC_COUNTER(compress);
     ret = tmem_compress_from_client(cmfn, &dst, &size, clibuf);
     if ( ret <= 0 )
         goto out;
@@ -1493,11 +1417,10 @@ static NOINLINE int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_p
     ret = 1;
 
 out:
-    END_CYC_COUNTER(compress);
     return ret;
 }
 
-static NOINLINE int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
+static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
        pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
        tmem_cli_va_param_t clibuf)
 {
@@ -1587,7 +1510,7 @@ cleanup:
 }
 
 
-static NOINLINE int do_tmem_put(struct tmem_pool *pool,
+static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, pagesize_t tmem_offset,
               pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
@@ -1731,14 +1654,13 @@ free:
     return ret;
 }
 
-static NOINLINE int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
+static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, pagesize_t tmem_offset,
               pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
     struct client *client = pool->client;
-    DECL_LOCAL_CYC_COUNTER(decompress);
     int rc;
 
     if ( !_atomic_read(pool->pgp_count) )
@@ -1766,10 +1688,8 @@ static NOINLINE int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32
         rc = pcd_copy_to_client(cmfn, pgp);
     else if ( pgp->size != 0 )
     {
-        START_CYC_COUNTER(decompress);
         rc = tmem_decompress_to_client(cmfn, pgp->cdata,
                                       pgp->size, clibuf);
-        END_CYC_COUNTER(decompress);
     }
     else
         rc = tmem_copy_to_client(cmfn, pgp->pfp, tmem_offset,
@@ -1818,7 +1738,7 @@ bad_copy:
     return rc;
 }
 
-static NOINLINE int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t index)
+static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t index)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
@@ -1853,7 +1773,7 @@ out:
         return 1;
 }
 
-static NOINLINE int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
+static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
@@ -1873,7 +1793,7 @@ out:
         return 1;
 }
 
-static NOINLINE int do_tmem_destroy_pool(uint32_t pool_id)
+static int do_tmem_destroy_pool(uint32_t pool_id)
 {
     struct client *client = tmem_client_from_current();
     struct tmem_pool *pool;
@@ -1889,7 +1809,7 @@ static NOINLINE int do_tmem_destroy_pool(uint32_t pool_id)
     return 1;
 }
 
-static NOINLINE int do_tmem_new_pool(domid_t this_cli_id,
+static int do_tmem_new_pool(domid_t this_cli_id,
                                      uint32_t d_poolid, uint32_t flags,
                                      uint64_t uuid_lo, uint64_t uuid_hi)
 {
@@ -2169,7 +2089,6 @@ static int tmemc_list_shared(tmem_cli_va_param_t buf, int off, uint32_t len,
     return sum;
 }
 
-#ifdef TMEM_PERF
 static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
                                   uint32_t len, bool_t use_long)
 {
@@ -2177,15 +2096,6 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     int n = 0, sum = 0;
 
     n = scnprintf(info+n,BSIZE-n,"T=");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,succ_get,"G");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,succ_put,"P");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,non_succ_get,"g");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,non_succ_put,"p");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush,"F");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush_obj,"O");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy,"C");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,compress,"c");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,decompress,"d");
     n--; /* overwrite trailing comma */
     n += scnprintf(info+n,BSIZE-n,"\n");
     if ( sum + n >= len )
@@ -2194,9 +2104,6 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     sum += n;
     return sum;
 }
-#else
-#define tmemc_list_global_perf(_buf,_off,_len,_use) (0)
-#endif
 
 static int tmemc_list_global(tmem_cli_va_param_t buf, int off, uint32_t len,
                               bool_t use_long)
@@ -2304,7 +2211,7 @@ static int tmemc_set_var(domid_t cli_id, uint32_t subop, uint32_t arg1)
     return 0;
 }
 
-static NOINLINE int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
+static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
                                   uint64_t uuid_hi, bool_t auth)
 {
     struct client *client;
@@ -2341,7 +2248,7 @@ static NOINLINE int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
     return 1;
 }
 
-static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id,
+static int tmemc_save_subop(int cli_id, uint32_t pool_id,
                         uint32_t subop, tmem_cli_va_param_t buf, uint32_t arg1)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2430,7 +2337,7 @@ static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id,
     return rc;
 }
 
-static NOINLINE int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
+static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
                         tmem_cli_va_param_t buf, uint32_t bufsize)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2485,7 +2392,7 @@ out:
     return ret;
 }
 
-static NOINLINE int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
+static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
                         uint32_t bufsize)
 {
     struct client *client = tmem_client_from_cli_id(cli_id);
@@ -2551,7 +2458,7 @@ static int tmemc_restore_flush_page(int cli_id, uint32_t pool_id, struct oid *oi
     return do_tmem_flush_page(pool,oidp,index);
 }
 
-static NOINLINE int do_tmem_control(struct tmem_op *op)
+static int do_tmem_control(struct tmem_op *op)
 {
     int ret;
     uint32_t pool_id = op->pool_id;
@@ -2638,12 +2545,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
     bool_t non_succ_get = 0, non_succ_put = 0;
     bool_t flush = 0, flush_obj = 0;
     bool_t tmem_write_lock_set = 0, tmem_read_lock_set = 0;
-    DECL_LOCAL_CYC_COUNTER(succ_get);
-    DECL_LOCAL_CYC_COUNTER(succ_put);
-    DECL_LOCAL_CYC_COUNTER(non_succ_get);
-    DECL_LOCAL_CYC_COUNTER(non_succ_put);
-    DECL_LOCAL_CYC_COUNTER(flush);
-    DECL_LOCAL_CYC_COUNTER(flush_obj);
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2661,13 +2562,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
             spin_lock(&tmem_spinlock);
     }
 
-    START_CYC_COUNTER(succ_get);
-    DUP_START_CYC_COUNTER(succ_put,succ_get);
-    DUP_START_CYC_COUNTER(non_succ_get,succ_get);
-    DUP_START_CYC_COUNTER(non_succ_put,succ_get);
-    DUP_START_CYC_COUNTER(flush,succ_get);
-    DUP_START_CYC_COUNTER(flush_obj,succ_get);
-
     if ( client != NULL && tmem_client_is_dying(client) )
     {
         rc = -ENODEV;
@@ -2743,7 +2637,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
             rc = -ENODEV;
             goto out;
         }
-        ASSERT_SENTINEL(pool,POOL);
     }
 
     oidp = (struct oid *)&op.u.gen.oid[0];
@@ -2787,19 +2680,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
 out:
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( succ_get )
-        END_CYC_COUNTER_CLI(succ_get,client);
-    else if ( succ_put )
-        END_CYC_COUNTER_CLI(succ_put,client);
-    else if ( non_succ_get )
-        END_CYC_COUNTER_CLI(non_succ_get,client);
-    else if ( non_succ_put )
-        END_CYC_COUNTER_CLI(non_succ_put,client);
-    else if ( flush )
-        END_CYC_COUNTER_CLI(flush,client);
-    else if ( flush_obj )
-        END_CYC_COUNTER_CLI(flush_obj,client);
-
     if ( tmem_lock_all )
     {
         if ( tmem_lock_all > 1 )
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index d6e2e0d..1e002ae 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -36,8 +36,6 @@ integer_param("tmem_lock", opt_tmem_lock);
 
 EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
 
-DECL_CYC_COUNTER(pg_copy);
-
 /* these are a concurrency bottleneck, could be percpu and dynamically
  * allocated iff opt_tmem_compress */
 #define LZO_WORKMEM_BYTES LZO1X_1_MEM_COMPRESS
@@ -48,10 +46,7 @@ static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 
 void tmem_copy_page(char *to, char*from)
 {
-    DECL_LOCAL_CYC_COUNTER(pg_copy);
-    START_CYC_COUNTER(pg_copy);
     memcpy(to, from, PAGE_SIZE);
-    END_CYC_COUNTER(pg_copy);
 }
 
 #if defined(CONFIG_ARM)
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index cccc98e..a477960 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -401,55 +401,4 @@ extern void tmem_persistent_pool_page_put(void *page_va);
 #define tmem_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##args)
 #define tmem_client_info(fmt, args...) printk(XENLOG_G_INFO fmt, ##args)
 
-#define TMEM_PERF
-#ifdef TMEM_PERF
-#define DECL_CYC_COUNTER(x) \
-    uint64_t x##_sum_cycles = 0, x##_count = 0; \
-    uint32_t x##_min_cycles = 0x7fffffff, x##_max_cycles = 0;
-#define EXTERN_CYC_COUNTER(x) \
-    extern uint64_t x##_sum_cycles, x##_count; \
-    extern uint32_t x##_min_cycles, x##_max_cycles;
-#define DECL_LOCAL_CYC_COUNTER(x) \
-    int64_t x##_start = 0
-#define START_CYC_COUNTER(x) x##_start = get_cycles()
-#define DUP_START_CYC_COUNTER(x,y) x##_start = y##_start
-/* following might race, but since its advisory only, don't care */
-#define END_CYC_COUNTER(x) \
-    do { \
-      x##_start = get_cycles() - x##_start; \
-      if (x##_start > 0 && x##_start < 1000000000) { \
-       x##_sum_cycles += x##_start; x##_count++; \
-       if ((uint32_t)x##_start < x##_min_cycles) x##_min_cycles = x##_start; \
-       if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \
-      } \
-    } while (0)
-#define END_CYC_COUNTER_CLI(x,y) \
-    do { \
-      x##_start = get_cycles() - x##_start; \
-      if (x##_start > 0 && x##_start < 1000000000) { \
-       x##_sum_cycles += x##_start; x##_count++; \
-       if ((uint32_t)x##_start < x##_min_cycles) x##_min_cycles = x##_start; \
-       if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \
-       y->total_cycles += x##_start; \
-      } \
-    } while (0)
-#define RESET_CYC_COUNTER(x) { x##_sum_cycles = 0, x##_count = 0; \
-  x##_min_cycles = 0x7fffffff, x##_max_cycles = 0; }
-#define SCNPRINTF_CYC_COUNTER(buf,size,x,tag) \
-  scnprintf(buf,size, \
-  tag"n:%"PRIu64","tag"t:%"PRIu64","tag"x:%"PRId32","tag"m:%"PRId32",", \
-  x##_count,x##_sum_cycles,x##_max_cycles,x##_min_cycles)
-#else
-#define DECL_CYC_COUNTER(x)
-#define EXTERN_CYC_COUNTER(x) \
-    extern uint64_t x##_sum_cycles, x##_count; \
-    extern uint32_t x##_min_cycles, x##_max_cycles;
-#define DECL_LOCAL_CYC_COUNTER(x) do { } while (0)
-#define START_CYC_COUNTER(x) do { } while (0)
-#define DUP_START_CYC_COUNTER(x) do { } while (0)
-#define END_CYC_COUNTER(x) do { } while (0)
-#define SCNPRINTF_CYC_COUNTER(buf,size,x,tag) (0)
-#define RESET_CYC_COUNTER(x) do { } while (0)
-#endif
-
 #endif /* __XEN_TMEM_XEN_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 Thu Jan 09 10:22:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1ClE-0004Mj-CV; Thu, 09 Jan 2014 10:22: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 1W1ClD-0004MD-2N
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:47 +0000
Received: from [85.158.143.35:40485] by server-2.bemta-4.messagelabs.com id
	22/97-11386-6787EC25; Thu, 09 Jan 2014 10:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389262964!10556706!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20356 invoked from network); 9 Jan 2014 10:22:45 -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 Jan 2014 10:22: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 1W1ClA-0000xH-On
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClA-00022g-N0
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:44 +0000
Date: Thu, 09 Jan 2014 10:22:44 +0000
Message-Id: <E1W1ClA-00022g-N0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless function
	'tmem_copy_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 2b254bd576b358bc6a5eeeb638b79a2bc5f4e95e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:03 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop useless function 'tmem_copy_page'
    
    Use memcpy directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem_xen.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index 1e002ae..af67703 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -44,11 +44,6 @@ static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, workmem);
 static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, dstmem);
 static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 
-void tmem_copy_page(char *to, char*from)
-{
-    memcpy(to, from, PAGE_SIZE);
-}
-
 #if defined(CONFIG_ARM)
 static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn,
                                  struct page_info **pcli_pfp, bool_t cli_write)
@@ -135,7 +130,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
     }
     smp_mb();
     if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        tmem_copy_page(tmem_va, cli_va);
+        memcpy(tmem_va, cli_va, PAGE_SIZE);
     else if ( (tmem_offset+len <= PAGE_SIZE) &&
               (pfn_offset+len <= PAGE_SIZE) )
     {
@@ -206,7 +201,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
     if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        tmem_copy_page(cli_va, tmem_va);
+        memcpy(cli_va, tmem_va, PAGE_SIZE);
     else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) )
     {
         if ( cli_va )
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:22:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1ClE-0004Mj-CV; Thu, 09 Jan 2014 10:22: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 1W1ClD-0004MD-2N
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:47 +0000
Received: from [85.158.143.35:40485] by server-2.bemta-4.messagelabs.com id
	22/97-11386-6787EC25; Thu, 09 Jan 2014 10:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389262964!10556706!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20356 invoked from network); 9 Jan 2014 10:22:45 -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 Jan 2014 10:22: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 1W1ClA-0000xH-On
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClA-00022g-N0
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:44 +0000
Date: Thu, 09 Jan 2014 10:22:44 +0000
Message-Id: <E1W1ClA-00022g-N0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless function
	'tmem_copy_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 2b254bd576b358bc6a5eeeb638b79a2bc5f4e95e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:03 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop useless function 'tmem_copy_page'
    
    Use memcpy directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem_xen.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index 1e002ae..af67703 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -44,11 +44,6 @@ static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, workmem);
 static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, dstmem);
 static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 
-void tmem_copy_page(char *to, char*from)
-{
-    memcpy(to, from, PAGE_SIZE);
-}
-
 #if defined(CONFIG_ARM)
 static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn,
                                  struct page_info **pcli_pfp, bool_t cli_write)
@@ -135,7 +130,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
     }
     smp_mb();
     if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        tmem_copy_page(tmem_va, cli_va);
+        memcpy(tmem_va, cli_va, PAGE_SIZE);
     else if ( (tmem_offset+len <= PAGE_SIZE) &&
               (pfn_offset+len <= PAGE_SIZE) )
     {
@@ -206,7 +201,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
     if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        tmem_copy_page(cli_va, tmem_va);
+        memcpy(cli_va, tmem_va, PAGE_SIZE);
     else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) )
     {
         if ( cli_va )
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1ClP-0004P1-GU; Thu, 09 Jan 2014 10:22: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 1W1ClO-0004Oj-GK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:58 +0000
Received: from [85.158.137.68:8778] by server-15.bemta-3.messagelabs.com id
	5D/08-11556-1887EC25; Thu, 09 Jan 2014 10:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389262975!7330334!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9215 invoked from network); 9 Jan 2014 10:22:56 -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;
	9 Jan 2014 10: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 1W1ClK-0000xQ-Vy
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClK-000239-T7
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:54 +0000
Date: Thu, 09 Jan 2014 10:22:54 +0000
Message-Id: <E1W1ClK-000239-T7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless parameters
	from put/get 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 751a77c9d55ee78bf0d4b7f321798e785f990add
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:04 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop useless parameters from put/get page
    
    Tmem only takes page as a unit, so parameters tmem_offset, pfn_offset and len in
    do_tmem_put/get() are meaningless. All of the callers are using the same
    value(tmem_offset=0, pfn_offset=0, len=PAGE_SIZE).
    
    This patch simplifies tmem ignoring those useless parameters and use the default
    value directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   47 ++++++++++++++++++-------------------------
 xen/common/tmem_xen.c      |   45 ++++++++---------------------------------
 xen/include/xen/tmem_xen.h |    6 +---
 3 files changed, 31 insertions(+), 67 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index cdc8826..da2326b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -330,8 +330,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
     else if ( tmem_tze_enabled() && pcd->size < PAGE_SIZE )
         ret = tmem_copy_tze_to_client(cmfn, pcd->tze, pcd->size);
     else
-        ret = tmem_copy_to_client(cmfn, pcd->pfp, 0, 0, PAGE_SIZE,
-                                 tmem_cli_buf_null);
+        ret = tmem_copy_to_client(cmfn, pcd->pfp, tmem_cli_buf_null);
     tmem_read_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
@@ -1421,7 +1420,6 @@ out:
 }
 
 static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
-       pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
        tmem_cli_va_param_t clibuf)
 {
     struct tmem_pool *pool;
@@ -1442,7 +1440,7 @@ static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
     if ( client->live_migrating )
         goto failed_dup; /* no dups allowed when migrating */
     /* can we successfully manipulate pgp to change out the data? */
-    if ( len != 0 && client->compress && pgp->size != 0 )
+    if ( client->compress && pgp->size != 0 )
     {
         ret = do_tmem_put_compress(pgp, cmfn, clibuf);
         if ( ret == 1 )
@@ -1461,9 +1459,7 @@ copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
         goto failed_dup;
     pgp->size = 0;
-    /* tmem_copy_from_client properly handles len==0 and offsets != 0 */
-    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_offset, pfn_offset, len,
-                               tmem_cli_buf_null);
+    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_cli_buf_null);
     if ( ret < 0 )
         goto bad_copy;
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
@@ -1509,11 +1505,9 @@ cleanup:
     return ret;
 }
 
-
 static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
-              xen_pfn_t cmfn, pagesize_t tmem_offset,
-              pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+              xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj = NULL, *objfound = NULL, *objnew = NULL;
     struct tmem_page_descriptor *pgp = NULL, *pgpdel = NULL;
@@ -1527,8 +1521,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     {
         ASSERT_SPINLOCK(&objfound->obj_spinlock);
         if ((pgp = pgp_lookup_in_obj(objfound, index)) != NULL)
-            return do_tmem_dup_put(pgp, cmfn, tmem_offset, pfn_offset, len,
-                                   clibuf);
+            return do_tmem_dup_put(pgp, cmfn, clibuf);
     }
 
     /* no puts allowed into a frozen pool (except dup puts) */
@@ -1560,7 +1553,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     pgp->index = index;
     pgp->size = 0;
 
-    if ( len != 0 && client->compress )
+    if ( client->compress )
     {
         ASSERT(pgp->pfp == NULL);
         ret = do_tmem_put_compress(pgp, cmfn, clibuf);
@@ -1586,9 +1579,7 @@ copy_uncompressed:
         ret = -ENOMEM;
         goto delete_and_free;
     }
-    /* tmem_copy_from_client properly handles len==0 (TMEM_NEW_PAGE) */
-    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_offset, pfn_offset, len,
-                               clibuf);
+    ret = tmem_copy_from_client(pgp->pfp, cmfn, clibuf);
     if ( ret < 0 )
         goto bad_copy;
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
@@ -1655,8 +1646,7 @@ free:
 }
 
 static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
-              xen_pfn_t cmfn, pagesize_t tmem_offset,
-              pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+              xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
@@ -1688,12 +1678,10 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         rc = pcd_copy_to_client(cmfn, pgp);
     else if ( pgp->size != 0 )
     {
-        rc = tmem_decompress_to_client(cmfn, pgp->cdata,
-                                      pgp->size, clibuf);
+        rc = tmem_decompress_to_client(cmfn, pgp->cdata, pgp->size, clibuf);
     }
     else
-        rc = tmem_copy_to_client(cmfn, pgp->pfp, tmem_offset,
-                                pfn_offset, len, clibuf);
+        rc = tmem_copy_to_client(cmfn, pgp->pfp, clibuf);
     if ( rc <= 0 )
         goto bad_copy;
 
@@ -2385,7 +2373,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     h.index = pgp->index;
     tmem_copy_to_client_buf(buf, &h, 1);
     tmem_client_buf_add(buf, sizeof(h));
-    ret = do_tmem_get(pool, &oid, pgp->index, 0, 0, 0, pagesize, buf);
+    ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
     tmem_spin_unlock(&pers_lists_spinlock);
@@ -2443,7 +2431,12 @@ static int tmemc_restore_put_page(int cli_id, uint32_t pool_id, struct oid *oidp
 
     if ( pool == NULL )
         return -1;
-    return do_tmem_put(pool, oidp, index, 0, 0, 0, bufsize, buf);
+    if (bufsize != PAGE_SIZE) {
+        tmem_client_err("tmem: %s: invalid parameter bufsize(%d) != (%ld)\n",
+                __func__, bufsize, PAGE_SIZE);
+	return -EINVAL;
+    }
+    return do_tmem_put(pool, oidp, index, 0, buf);
 }
 
 static int tmemc_restore_flush_page(int cli_id, uint32_t pool_id, struct oid *oidp,
@@ -2648,14 +2641,14 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         break;
     case TMEM_PUT_PAGE:
         tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0,
-                         PAGE_SIZE, tmem_cli_buf_null);
+        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                        tmem_cli_buf_null);
         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,
-                         0, 0, PAGE_SIZE, tmem_cli_buf_null);
+                        tmem_cli_buf_null);
         if (rc == 1) succ_get = 1;
         else non_succ_get = 1;
         break;
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index af67703..efc2259 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -100,25 +100,16 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
 #endif
 
 EXPORT int tmem_copy_from_client(struct page_info *pfp,
-    xen_pfn_t cmfn, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+    xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
     char *tmem_va, *cli_va = NULL;
     struct page_info *cli_pfp = NULL;
     int rc = 1;
 
-    if ( tmem_offset > PAGE_SIZE || pfn_offset > PAGE_SIZE || len > PAGE_SIZE )
-        return -EINVAL;
     ASSERT(pfp != NULL);
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
-    if ( tmem_offset == 0 && pfn_offset == 0 && len == 0 )
-    {
-        memset(tmem_va, 0, PAGE_SIZE);
-        unmap_domain_page(tmem_va);
-        return 1;
-    }
     if ( guest_handle_is_null(clibuf) )
     {
         cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 0);
@@ -129,21 +120,13 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
         }
     }
     smp_mb();
-    if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        memcpy(tmem_va, cli_va, PAGE_SIZE);
-    else if ( (tmem_offset+len <= PAGE_SIZE) &&
-              (pfn_offset+len <= PAGE_SIZE) )
+    if ( cli_va )
     {
-        if ( cli_va )
-            memcpy(tmem_va + tmem_offset, cli_va + pfn_offset, len);
-        else if ( copy_from_guest_offset(tmem_va + tmem_offset, clibuf,
-                                         pfn_offset, len) )
-            rc = -EFAULT;
+        memcpy(tmem_va, cli_va, PAGE_SIZE);
+        cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
     }
-    else if ( len )
+    else
         rc = -EINVAL;
-    if ( cli_va )
-        cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
     unmap_domain_page(tmem_va);
     return rc;
 }
@@ -181,7 +164,6 @@ EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
 }
 
 EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
-    pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
     tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -189,8 +171,6 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     struct page_info *cli_pfp = NULL;
     int rc = 1;
 
-    if ( tmem_offset > PAGE_SIZE || pfn_offset > PAGE_SIZE || len > PAGE_SIZE )
-        return -EINVAL;
     ASSERT(pfp != NULL);
     if ( guest_handle_is_null(clibuf) )
     {
@@ -200,21 +180,14 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     }
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
-    if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        memcpy(cli_va, tmem_va, PAGE_SIZE);
-    else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) )
+    if ( cli_va )
     {
-        if ( cli_va )
-            memcpy(cli_va + pfn_offset, tmem_va + tmem_offset, len);
-        else if ( copy_to_guest_offset(clibuf, pfn_offset,
-                                       tmem_va + tmem_offset, len) )
-            rc = -EFAULT;
+        memcpy(cli_va, tmem_va, PAGE_SIZE);
+        cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
     }
-    else if ( len )
+    else
         rc = -EINVAL;
     unmap_domain_page(tmem_va);
-    if ( cli_va )
-        cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
     smp_mb();
     return rc;
 }
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index a477960..d842374 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -387,11 +387,9 @@ int tmem_decompress_to_client(xen_pfn_t, void *, size_t,
 int tmem_compress_from_client(xen_pfn_t, void **, size_t *,
 			     tmem_cli_va_param_t);
 
-int tmem_copy_from_client(struct page_info *, xen_pfn_t, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
+int tmem_copy_from_client(struct page_info *, xen_pfn_t, tmem_cli_va_param_t);
 
-int tmem_copy_to_client(xen_pfn_t, struct page_info *, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
+int tmem_copy_to_client(xen_pfn_t, struct page_info *, tmem_cli_va_param_t);
 
 extern int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
 extern void *tmem_persistent_pool_page_get(unsigned long size);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:22: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 1W1ClP-0004P1-GU; Thu, 09 Jan 2014 10:22: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 1W1ClO-0004Oj-GK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:58 +0000
Received: from [85.158.137.68:8778] by server-15.bemta-3.messagelabs.com id
	5D/08-11556-1887EC25; Thu, 09 Jan 2014 10:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389262975!7330334!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9215 invoked from network); 9 Jan 2014 10:22:56 -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;
	9 Jan 2014 10: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 1W1ClK-0000xQ-Vy
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClK-000239-T7
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:22:54 +0000
Date: Thu, 09 Jan 2014 10:22:54 +0000
Message-Id: <E1W1ClK-000239-T7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless parameters
	from put/get 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 751a77c9d55ee78bf0d4b7f321798e785f990add
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:04 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: drop useless parameters from put/get page
    
    Tmem only takes page as a unit, so parameters tmem_offset, pfn_offset and len in
    do_tmem_put/get() are meaningless. All of the callers are using the same
    value(tmem_offset=0, pfn_offset=0, len=PAGE_SIZE).
    
    This patch simplifies tmem ignoring those useless parameters and use the default
    value directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   47 ++++++++++++++++++-------------------------
 xen/common/tmem_xen.c      |   45 ++++++++---------------------------------
 xen/include/xen/tmem_xen.h |    6 +---
 3 files changed, 31 insertions(+), 67 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index cdc8826..da2326b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -330,8 +330,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
     else if ( tmem_tze_enabled() && pcd->size < PAGE_SIZE )
         ret = tmem_copy_tze_to_client(cmfn, pcd->tze, pcd->size);
     else
-        ret = tmem_copy_to_client(cmfn, pcd->pfp, 0, 0, PAGE_SIZE,
-                                 tmem_cli_buf_null);
+        ret = tmem_copy_to_client(cmfn, pcd->pfp, tmem_cli_buf_null);
     tmem_read_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
@@ -1421,7 +1420,6 @@ out:
 }
 
 static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
-       pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
        tmem_cli_va_param_t clibuf)
 {
     struct tmem_pool *pool;
@@ -1442,7 +1440,7 @@ static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
     if ( client->live_migrating )
         goto failed_dup; /* no dups allowed when migrating */
     /* can we successfully manipulate pgp to change out the data? */
-    if ( len != 0 && client->compress && pgp->size != 0 )
+    if ( client->compress && pgp->size != 0 )
     {
         ret = do_tmem_put_compress(pgp, cmfn, clibuf);
         if ( ret == 1 )
@@ -1461,9 +1459,7 @@ copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
         goto failed_dup;
     pgp->size = 0;
-    /* tmem_copy_from_client properly handles len==0 and offsets != 0 */
-    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_offset, pfn_offset, len,
-                               tmem_cli_buf_null);
+    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_cli_buf_null);
     if ( ret < 0 )
         goto bad_copy;
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
@@ -1509,11 +1505,9 @@ cleanup:
     return ret;
 }
 
-
 static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
-              xen_pfn_t cmfn, pagesize_t tmem_offset,
-              pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+              xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj = NULL, *objfound = NULL, *objnew = NULL;
     struct tmem_page_descriptor *pgp = NULL, *pgpdel = NULL;
@@ -1527,8 +1521,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     {
         ASSERT_SPINLOCK(&objfound->obj_spinlock);
         if ((pgp = pgp_lookup_in_obj(objfound, index)) != NULL)
-            return do_tmem_dup_put(pgp, cmfn, tmem_offset, pfn_offset, len,
-                                   clibuf);
+            return do_tmem_dup_put(pgp, cmfn, clibuf);
     }
 
     /* no puts allowed into a frozen pool (except dup puts) */
@@ -1560,7 +1553,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     pgp->index = index;
     pgp->size = 0;
 
-    if ( len != 0 && client->compress )
+    if ( client->compress )
     {
         ASSERT(pgp->pfp == NULL);
         ret = do_tmem_put_compress(pgp, cmfn, clibuf);
@@ -1586,9 +1579,7 @@ copy_uncompressed:
         ret = -ENOMEM;
         goto delete_and_free;
     }
-    /* tmem_copy_from_client properly handles len==0 (TMEM_NEW_PAGE) */
-    ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_offset, pfn_offset, len,
-                               clibuf);
+    ret = tmem_copy_from_client(pgp->pfp, cmfn, clibuf);
     if ( ret < 0 )
         goto bad_copy;
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
@@ -1655,8 +1646,7 @@ free:
 }
 
 static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
-              xen_pfn_t cmfn, pagesize_t tmem_offset,
-              pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+              xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     struct tmem_object_root *obj;
     struct tmem_page_descriptor *pgp;
@@ -1688,12 +1678,10 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         rc = pcd_copy_to_client(cmfn, pgp);
     else if ( pgp->size != 0 )
     {
-        rc = tmem_decompress_to_client(cmfn, pgp->cdata,
-                                      pgp->size, clibuf);
+        rc = tmem_decompress_to_client(cmfn, pgp->cdata, pgp->size, clibuf);
     }
     else
-        rc = tmem_copy_to_client(cmfn, pgp->pfp, tmem_offset,
-                                pfn_offset, len, clibuf);
+        rc = tmem_copy_to_client(cmfn, pgp->pfp, clibuf);
     if ( rc <= 0 )
         goto bad_copy;
 
@@ -2385,7 +2373,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     h.index = pgp->index;
     tmem_copy_to_client_buf(buf, &h, 1);
     tmem_client_buf_add(buf, sizeof(h));
-    ret = do_tmem_get(pool, &oid, pgp->index, 0, 0, 0, pagesize, buf);
+    ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
     tmem_spin_unlock(&pers_lists_spinlock);
@@ -2443,7 +2431,12 @@ static int tmemc_restore_put_page(int cli_id, uint32_t pool_id, struct oid *oidp
 
     if ( pool == NULL )
         return -1;
-    return do_tmem_put(pool, oidp, index, 0, 0, 0, bufsize, buf);
+    if (bufsize != PAGE_SIZE) {
+        tmem_client_err("tmem: %s: invalid parameter bufsize(%d) != (%ld)\n",
+                __func__, bufsize, PAGE_SIZE);
+	return -EINVAL;
+    }
+    return do_tmem_put(pool, oidp, index, 0, buf);
 }
 
 static int tmemc_restore_flush_page(int cli_id, uint32_t pool_id, struct oid *oidp,
@@ -2648,14 +2641,14 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
         break;
     case TMEM_PUT_PAGE:
         tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0,
-                         PAGE_SIZE, tmem_cli_buf_null);
+        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                        tmem_cli_buf_null);
         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,
-                         0, 0, PAGE_SIZE, tmem_cli_buf_null);
+                        tmem_cli_buf_null);
         if (rc == 1) succ_get = 1;
         else non_succ_get = 1;
         break;
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index af67703..efc2259 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -100,25 +100,16 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
 #endif
 
 EXPORT int tmem_copy_from_client(struct page_info *pfp,
-    xen_pfn_t cmfn, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
+    xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
     char *tmem_va, *cli_va = NULL;
     struct page_info *cli_pfp = NULL;
     int rc = 1;
 
-    if ( tmem_offset > PAGE_SIZE || pfn_offset > PAGE_SIZE || len > PAGE_SIZE )
-        return -EINVAL;
     ASSERT(pfp != NULL);
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
-    if ( tmem_offset == 0 && pfn_offset == 0 && len == 0 )
-    {
-        memset(tmem_va, 0, PAGE_SIZE);
-        unmap_domain_page(tmem_va);
-        return 1;
-    }
     if ( guest_handle_is_null(clibuf) )
     {
         cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 0);
@@ -129,21 +120,13 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
         }
     }
     smp_mb();
-    if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        memcpy(tmem_va, cli_va, PAGE_SIZE);
-    else if ( (tmem_offset+len <= PAGE_SIZE) &&
-              (pfn_offset+len <= PAGE_SIZE) )
+    if ( cli_va )
     {
-        if ( cli_va )
-            memcpy(tmem_va + tmem_offset, cli_va + pfn_offset, len);
-        else if ( copy_from_guest_offset(tmem_va + tmem_offset, clibuf,
-                                         pfn_offset, len) )
-            rc = -EFAULT;
+        memcpy(tmem_va, cli_va, PAGE_SIZE);
+        cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
     }
-    else if ( len )
+    else
         rc = -EINVAL;
-    if ( cli_va )
-        cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
     unmap_domain_page(tmem_va);
     return rc;
 }
@@ -181,7 +164,6 @@ EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
 }
 
 EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
-    pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
     tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -189,8 +171,6 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     struct page_info *cli_pfp = NULL;
     int rc = 1;
 
-    if ( tmem_offset > PAGE_SIZE || pfn_offset > PAGE_SIZE || len > PAGE_SIZE )
-        return -EINVAL;
     ASSERT(pfp != NULL);
     if ( guest_handle_is_null(clibuf) )
     {
@@ -200,21 +180,14 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     }
     tmem_mfn = page_to_mfn(pfp);
     tmem_va = map_domain_page(tmem_mfn);
-    if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va )
-        memcpy(cli_va, tmem_va, PAGE_SIZE);
-    else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) )
+    if ( cli_va )
     {
-        if ( cli_va )
-            memcpy(cli_va + pfn_offset, tmem_va + tmem_offset, len);
-        else if ( copy_to_guest_offset(clibuf, pfn_offset,
-                                       tmem_va + tmem_offset, len) )
-            rc = -EFAULT;
+        memcpy(cli_va, tmem_va, PAGE_SIZE);
+        cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
     }
-    else if ( len )
+    else
         rc = -EINVAL;
     unmap_domain_page(tmem_va);
-    if ( cli_va )
-        cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
     smp_mb();
     return rc;
 }
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index a477960..d842374 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -387,11 +387,9 @@ int tmem_decompress_to_client(xen_pfn_t, void *, size_t,
 int tmem_compress_from_client(xen_pfn_t, void **, size_t *,
 			     tmem_cli_va_param_t);
 
-int tmem_copy_from_client(struct page_info *, xen_pfn_t, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
+int tmem_copy_from_client(struct page_info *, xen_pfn_t, tmem_cli_va_param_t);
 
-int tmem_copy_to_client(xen_pfn_t, struct page_info *, pagesize_t tmem_offset,
-    pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
+int tmem_copy_to_client(xen_pfn_t, struct page_info *, tmem_cli_va_param_t);
 
 extern int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
 extern void *tmem_persistent_pool_page_get(unsigned long size);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1ClZ-0004R8-JJ; Thu, 09 Jan 2014 10:23: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 1W1ClY-0004Qm-3n
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:08 +0000
Received: from [85.158.139.211:47182] by server-1.bemta-5.messagelabs.com id
	CA/3F-21065-B887EC25; Thu, 09 Jan 2014 10:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1389262985!8702513!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26208 invoked from network); 9 Jan 2014 10:23:06 -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;
	9 Jan 2014 10: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 1W1ClV-0000xz-62
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClV-00024L-31
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:05 +0000
Date: Thu, 09 Jan 2014 10:23:05 +0000
Message-Id: <E1W1ClV-00024L-31@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: reorg function
	do_tmem_put()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0330035f44f3f6de553593b0b6359eb29fb3dd9b
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:05 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: reorg function do_tmem_put()
    
    Reorg code logic of do_tmem_put() to make it more readable and clean.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   86 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 37 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index da2326b..bd17893 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1509,47 +1509,54 @@ static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
-    struct tmem_object_root *obj = NULL, *objfound = NULL, *objnew = NULL;
-    struct tmem_page_descriptor *pgp = NULL, *pgpdel = NULL;
-    struct client *client = pool->client;
-    int ret = client->frozen ? -EFROZEN : -ENOMEM;
+    struct tmem_object_root *obj = NULL;
+    struct tmem_page_descriptor *pgp = NULL;
+    struct client *client;
+    int ret, newobj = 0;
 
     ASSERT(pool != NULL);
+    client = pool->client;
+    ret = client->frozen ? -EFROZEN : -ENOMEM;
     pool->puts++;
     /* does page already exist (dup)?  if so, handle specially */
-    if ( (obj = objfound = obj_find(pool,oidp)) != NULL )
+    if ( (obj = obj_find(pool,oidp)) != NULL )
     {
-        ASSERT_SPINLOCK(&objfound->obj_spinlock);
-        if ((pgp = pgp_lookup_in_obj(objfound, index)) != NULL)
+        if ((pgp = pgp_lookup_in_obj(obj, index)) != NULL)
+        {
             return do_tmem_dup_put(pgp, cmfn, clibuf);
+        }
+        else
+        {
+            /* no puts allowed into a frozen pool (except dup puts) */
+            if ( client->frozen )
+	        goto unlock_obj;
+        }
     }
-
-    /* no puts allowed into a frozen pool (except dup puts) */
-    if ( client->frozen )
-        goto free;
-
-    if ( (objfound == NULL) )
+    else
     {
+        /* no puts allowed into a frozen pool (except dup puts) */
+        if ( client->frozen )
+            return ret;
         tmem_write_lock(&pool->pool_rwlock);
-        if ( (obj = objnew = obj_new(pool,oidp)) == NULL )
+        if ( (obj = obj_new(pool,oidp)) == NULL )
         {
             tmem_write_unlock(&pool->pool_rwlock);
             return -ENOMEM;
         }
-        ASSERT_SPINLOCK(&objnew->obj_spinlock);
+        newobj = 1;
         tmem_write_unlock(&pool->pool_rwlock);
     }
 
-    ASSERT((obj != NULL)&&((objnew==obj)||(objfound==obj))&&(objnew!=objfound));
+    /* When arrive here, we have a spinlocked obj for use */
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     if ( (pgp = pgp_alloc(obj)) == NULL )
-        goto free;
+        goto unlock_obj;
 
     ret = pgp_add_to_obj(obj, index, pgp);
     if ( ret == -ENOMEM  )
         /* warning, may result in partially built radix tree ("stump") */
-        goto free;
-    ASSERT(ret != -EEXIST);
+        goto free_pgp;
+
     pgp->index = index;
     pgp->size = 0;
 
@@ -1562,7 +1569,7 @@ static int do_tmem_put(struct tmem_pool *pool,
         if ( ret == -ENOMEM )
         {
             client->compress_nomem++;
-            goto delete_and_free;
+            goto del_pgp_from_obj;
         }
         if ( ret == 0 )
         {
@@ -1577,15 +1584,16 @@ copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
     {
         ret = -ENOMEM;
-        goto delete_and_free;
+        goto del_pgp_from_obj;
     }
     ret = tmem_copy_from_client(pgp->pfp, cmfn, clibuf);
     if ( ret < 0 )
         goto bad_copy;
+
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
     {
         if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
-            goto delete_and_free;
+            goto del_pgp_from_obj;
     }
 
 insert_page:
@@ -1601,18 +1609,23 @@ insert_page:
         if (++client->eph_count > client->eph_count_max)
             client->eph_count_max = client->eph_count;
         tmem_spin_unlock(&eph_lists_spinlock);
-    } else { /* is_persistent */
+    }
+    else
+    { /* is_persistent */
         tmem_spin_lock(&pers_lists_spinlock);
         list_add_tail(&pgp->us.pool_pers_pages,
             &pool->persistent_page_list);
         tmem_spin_unlock(&pers_lists_spinlock);
     }
-    ASSERT( ((objnew==obj)||(objfound==obj)) && (objnew!=objfound));
+
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
     obj->no_evict = 0;
+
+    /* free the obj spinlock */
     tmem_spin_unlock(&obj->obj_spinlock);
     pool->good_puts++;
+
     if ( is_persistent(pool) )
         client->succ_pers_puts++;
     else
@@ -1622,25 +1635,24 @@ insert_page:
 bad_copy:
     failed_copies++;
 
-delete_and_free:
+del_pgp_from_obj:
     ASSERT((obj != NULL) && (pgp != NULL) && (pgp->index != -1));
-    pgpdel = pgp_delete_from_obj(obj, pgp->index);
-    ASSERT(pgp == pgpdel);
+    pgp_delete_from_obj(obj, pgp->index);
 
-free:
-    if ( pgp )
-        pgp_delete(pgp,0);
-    if ( objfound )
-    {
-        objfound->no_evict = 0;
-        tmem_spin_unlock(&objfound->obj_spinlock);
-    }
-    if ( objnew )
+free_pgp:
+    pgp_delete(pgp, 0);
+unlock_obj:
+    if ( newobj )
     {
         tmem_write_lock(&pool->pool_rwlock);
-        obj_free(objnew,0);
+        obj_free(obj, 0);
         tmem_write_unlock(&pool->pool_rwlock);
     }
+    else
+    {
+        obj->no_evict = 0;
+        tmem_spin_unlock(&obj->obj_spinlock);
+    }
     pool->no_mem_puts++;
     return 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 Thu Jan 09 10:23:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1ClZ-0004R8-JJ; Thu, 09 Jan 2014 10:23: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 1W1ClY-0004Qm-3n
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:08 +0000
Received: from [85.158.139.211:47182] by server-1.bemta-5.messagelabs.com id
	CA/3F-21065-B887EC25; Thu, 09 Jan 2014 10:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1389262985!8702513!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26208 invoked from network); 9 Jan 2014 10:23:06 -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;
	9 Jan 2014 10: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 1W1ClV-0000xz-62
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1ClV-00024L-31
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:05 +0000
Date: Thu, 09 Jan 2014 10:23:05 +0000
Message-Id: <E1W1ClV-00024L-31@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: reorg function
	do_tmem_put()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0330035f44f3f6de553593b0b6359eb29fb3dd9b
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:05 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: cleanup: reorg function do_tmem_put()
    
    Reorg code logic of do_tmem_put() to make it more readable and clean.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   86 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 37 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index da2326b..bd17893 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1509,47 +1509,54 @@ static int do_tmem_put(struct tmem_pool *pool,
               struct oid *oidp, uint32_t index,
               xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
-    struct tmem_object_root *obj = NULL, *objfound = NULL, *objnew = NULL;
-    struct tmem_page_descriptor *pgp = NULL, *pgpdel = NULL;
-    struct client *client = pool->client;
-    int ret = client->frozen ? -EFROZEN : -ENOMEM;
+    struct tmem_object_root *obj = NULL;
+    struct tmem_page_descriptor *pgp = NULL;
+    struct client *client;
+    int ret, newobj = 0;
 
     ASSERT(pool != NULL);
+    client = pool->client;
+    ret = client->frozen ? -EFROZEN : -ENOMEM;
     pool->puts++;
     /* does page already exist (dup)?  if so, handle specially */
-    if ( (obj = objfound = obj_find(pool,oidp)) != NULL )
+    if ( (obj = obj_find(pool,oidp)) != NULL )
     {
-        ASSERT_SPINLOCK(&objfound->obj_spinlock);
-        if ((pgp = pgp_lookup_in_obj(objfound, index)) != NULL)
+        if ((pgp = pgp_lookup_in_obj(obj, index)) != NULL)
+        {
             return do_tmem_dup_put(pgp, cmfn, clibuf);
+        }
+        else
+        {
+            /* no puts allowed into a frozen pool (except dup puts) */
+            if ( client->frozen )
+	        goto unlock_obj;
+        }
     }
-
-    /* no puts allowed into a frozen pool (except dup puts) */
-    if ( client->frozen )
-        goto free;
-
-    if ( (objfound == NULL) )
+    else
     {
+        /* no puts allowed into a frozen pool (except dup puts) */
+        if ( client->frozen )
+            return ret;
         tmem_write_lock(&pool->pool_rwlock);
-        if ( (obj = objnew = obj_new(pool,oidp)) == NULL )
+        if ( (obj = obj_new(pool,oidp)) == NULL )
         {
             tmem_write_unlock(&pool->pool_rwlock);
             return -ENOMEM;
         }
-        ASSERT_SPINLOCK(&objnew->obj_spinlock);
+        newobj = 1;
         tmem_write_unlock(&pool->pool_rwlock);
     }
 
-    ASSERT((obj != NULL)&&((objnew==obj)||(objfound==obj))&&(objnew!=objfound));
+    /* When arrive here, we have a spinlocked obj for use */
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     if ( (pgp = pgp_alloc(obj)) == NULL )
-        goto free;
+        goto unlock_obj;
 
     ret = pgp_add_to_obj(obj, index, pgp);
     if ( ret == -ENOMEM  )
         /* warning, may result in partially built radix tree ("stump") */
-        goto free;
-    ASSERT(ret != -EEXIST);
+        goto free_pgp;
+
     pgp->index = index;
     pgp->size = 0;
 
@@ -1562,7 +1569,7 @@ static int do_tmem_put(struct tmem_pool *pool,
         if ( ret == -ENOMEM )
         {
             client->compress_nomem++;
-            goto delete_and_free;
+            goto del_pgp_from_obj;
         }
         if ( ret == 0 )
         {
@@ -1577,15 +1584,16 @@ copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
     {
         ret = -ENOMEM;
-        goto delete_and_free;
+        goto del_pgp_from_obj;
     }
     ret = tmem_copy_from_client(pgp->pfp, cmfn, clibuf);
     if ( ret < 0 )
         goto bad_copy;
+
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
     {
         if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
-            goto delete_and_free;
+            goto del_pgp_from_obj;
     }
 
 insert_page:
@@ -1601,18 +1609,23 @@ insert_page:
         if (++client->eph_count > client->eph_count_max)
             client->eph_count_max = client->eph_count;
         tmem_spin_unlock(&eph_lists_spinlock);
-    } else { /* is_persistent */
+    }
+    else
+    { /* is_persistent */
         tmem_spin_lock(&pers_lists_spinlock);
         list_add_tail(&pgp->us.pool_pers_pages,
             &pool->persistent_page_list);
         tmem_spin_unlock(&pers_lists_spinlock);
     }
-    ASSERT( ((objnew==obj)||(objfound==obj)) && (objnew!=objfound));
+
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
     obj->no_evict = 0;
+
+    /* free the obj spinlock */
     tmem_spin_unlock(&obj->obj_spinlock);
     pool->good_puts++;
+
     if ( is_persistent(pool) )
         client->succ_pers_puts++;
     else
@@ -1622,25 +1635,24 @@ insert_page:
 bad_copy:
     failed_copies++;
 
-delete_and_free:
+del_pgp_from_obj:
     ASSERT((obj != NULL) && (pgp != NULL) && (pgp->index != -1));
-    pgpdel = pgp_delete_from_obj(obj, pgp->index);
-    ASSERT(pgp == pgpdel);
+    pgp_delete_from_obj(obj, pgp->index);
 
-free:
-    if ( pgp )
-        pgp_delete(pgp,0);
-    if ( objfound )
-    {
-        objfound->no_evict = 0;
-        tmem_spin_unlock(&objfound->obj_spinlock);
-    }
-    if ( objnew )
+free_pgp:
+    pgp_delete(pgp, 0);
+unlock_obj:
+    if ( newobj )
     {
         tmem_write_lock(&pool->pool_rwlock);
-        obj_free(objnew,0);
+        obj_free(obj, 0);
         tmem_write_unlock(&pool->pool_rwlock);
     }
+    else
+    {
+        obj->no_evict = 0;
+        tmem_spin_unlock(&obj->obj_spinlock);
+    }
     pool->no_mem_puts++;
     return 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 Thu Jan 09 10:23:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1Cli-0004T9-Ly; Thu, 09 Jan 2014 10:23: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 1W1Clh-0004St-Lv
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:17 +0000
Received: from [85.158.143.35:44598] by server-3.bemta-4.messagelabs.com id
	96/AA-32360-5987EC25; Thu, 09 Jan 2014 10:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389262995!10592745!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20272 invoked from network); 9 Jan 2014 10:23:16 -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 Jan 2014 10:23: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 1W1Clf-0000y5-Ah
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clf-00024j-9r
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:15 +0000
Date: Thu, 09 Jan 2014 10:23:15 +0000
Message-Id: <E1W1Clf-00024j-9r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: drop unneeded is_ephemeral() and
	is_private()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3122d67b0e495d164a1453f6dc4cd2cb0e9de9f5
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:06 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: drop unneeded is_ephemeral() and is_private()
    
    Can use !is_persistent() and !is_shared() to replace them directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index bd17893..7311487 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -126,9 +126,7 @@ struct tmem_pool {
 };
 
 #define is_persistent(_p)  (_p->persistent)
-#define is_ephemeral(_p)   (!(_p->persistent))
 #define is_shared(_p)      (_p->shared)
-#define is_private(_p)     (!(_p->shared))
 
 struct oid {
     uint64_t oid[3];
@@ -604,7 +602,7 @@ static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
         ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
     ASSERT(pgp->us.obj->pool != NULL);
     pool = pgp->us.obj->pool;
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
         ASSERT(list_empty(&pgp->global_eph_pages));
         ASSERT(list_empty(&pgp->us.client_eph_pages));
@@ -643,7 +641,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(pgp->us.obj->pool != NULL);
     client = pgp->us.obj->pool->client;
     ASSERT(client != NULL);
-    if ( is_ephemeral(pgp->us.obj->pool) )
+    if ( !is_persistent(pgp->us.obj->pool) )
     {
         if ( !no_eph_lock )
             tmem_spin_lock(&eph_lists_spinlock);
@@ -1597,7 +1595,7 @@ copy_uncompressed:
     }
 
 insert_page:
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
         tmem_spin_lock(&eph_lists_spinlock);
         list_add_tail(&pgp->global_eph_pages,
@@ -1697,9 +1695,9 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     if ( rc <= 0 )
         goto bad_copy;
 
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
-        if ( is_private(pool) )
+        if ( !is_shared(pool) )
         {
             pgp_delete(pgp,0);
             if ( obj->pgp_count == 0 )
@@ -1725,10 +1723,10 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         tmem_spin_unlock(&obj->obj_spinlock);
     }
     pool->found_gets++;
-    if ( is_ephemeral(pool) )
-        client->succ_eph_gets++;
-    else
+    if ( is_persistent(pool) )
         client->succ_pers_gets++;
+    else
+        client->succ_eph_gets++;
     return 1;
 
 bad_copy:
@@ -2349,7 +2347,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     struct tmem_handle h;
     unsigned int pagesize;
 
-    if ( pool == NULL || is_ephemeral(pool) )
+    if ( pool == NULL || !is_persistent(pool) )
         return -1;
 
     pagesize = 1 << (pool->pageshift + 12);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1Cli-0004T9-Ly; Thu, 09 Jan 2014 10:23: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 1W1Clh-0004St-Lv
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:17 +0000
Received: from [85.158.143.35:44598] by server-3.bemta-4.messagelabs.com id
	96/AA-32360-5987EC25; Thu, 09 Jan 2014 10:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389262995!10592745!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20272 invoked from network); 9 Jan 2014 10:23:16 -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 Jan 2014 10:23: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 1W1Clf-0000y5-Ah
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clf-00024j-9r
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:15 +0000
Date: Thu, 09 Jan 2014 10:23:15 +0000
Message-Id: <E1W1Clf-00024j-9r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: drop unneeded is_ephemeral() and
	is_private()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3122d67b0e495d164a1453f6dc4cd2cb0e9de9f5
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:06 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:57 2014 +0100

    tmem: drop unneeded is_ephemeral() and is_private()
    
    Can use !is_persistent() and !is_shared() to replace them directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index bd17893..7311487 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -126,9 +126,7 @@ struct tmem_pool {
 };
 
 #define is_persistent(_p)  (_p->persistent)
-#define is_ephemeral(_p)   (!(_p->persistent))
 #define is_shared(_p)      (_p->shared)
-#define is_private(_p)     (!(_p->shared))
 
 struct oid {
     uint64_t oid[3];
@@ -604,7 +602,7 @@ static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
         ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
     ASSERT(pgp->us.obj->pool != NULL);
     pool = pgp->us.obj->pool;
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
         ASSERT(list_empty(&pgp->global_eph_pages));
         ASSERT(list_empty(&pgp->us.client_eph_pages));
@@ -643,7 +641,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(pgp->us.obj->pool != NULL);
     client = pgp->us.obj->pool->client;
     ASSERT(client != NULL);
-    if ( is_ephemeral(pgp->us.obj->pool) )
+    if ( !is_persistent(pgp->us.obj->pool) )
     {
         if ( !no_eph_lock )
             tmem_spin_lock(&eph_lists_spinlock);
@@ -1597,7 +1595,7 @@ copy_uncompressed:
     }
 
 insert_page:
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
         tmem_spin_lock(&eph_lists_spinlock);
         list_add_tail(&pgp->global_eph_pages,
@@ -1697,9 +1695,9 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     if ( rc <= 0 )
         goto bad_copy;
 
-    if ( is_ephemeral(pool) )
+    if ( !is_persistent(pool) )
     {
-        if ( is_private(pool) )
+        if ( !is_shared(pool) )
         {
             pgp_delete(pgp,0);
             if ( obj->pgp_count == 0 )
@@ -1725,10 +1723,10 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         tmem_spin_unlock(&obj->obj_spinlock);
     }
     pool->found_gets++;
-    if ( is_ephemeral(pool) )
-        client->succ_eph_gets++;
-    else
+    if ( is_persistent(pool) )
         client->succ_pers_gets++;
+    else
+        client->succ_eph_gets++;
     return 1;
 
 bad_copy:
@@ -2349,7 +2347,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     struct tmem_handle h;
     unsigned int pagesize;
 
-    if ( pool == NULL || is_ephemeral(pool) )
+    if ( pool == NULL || !is_persistent(pool) )
         return -1;
 
     pagesize = 1 << (pool->pageshift + 12);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10: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 1W1Clt-0004XX-Qx; Thu, 09 Jan 2014 10:23: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 1W1Cls-0004X1-Gt
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:28 +0000
Received: from [85.158.139.211:43421] by server-15.bemta-5.messagelabs.com id
	44/34-08490-F987EC25; Thu, 09 Jan 2014 10:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1389263005!8534995!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7994 invoked from network); 9 Jan 2014 10:23:26 -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 Jan 2014 10: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 1W1Clp-0000yB-GH
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clp-000255-Dt
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:25 +0000
Date: Thu, 09 Jan 2014 10:23:25 +0000
Message-Id: <E1W1Clp-000255-Dt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rm useless
	EXPORT/FORWARD define
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 68af011e2af21f463826059cf50501f0126d09cd
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:07 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: rm useless EXPORT/FORWARD define
    
    It's meaningless to define EXPORT/FORWARD and nobody uses them.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c     |   16 ++++++----------
 xen/common/tmem_xen.c |   38 ++++++++++++++++++--------------------
 2 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 7311487..c31141c 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -24,9 +24,6 @@
 #include <xen/list.h>
 #include <xen/init.h>
 
-#define EXPORT /* indicates code other modules are dependent upon */
-#define FORWARD
-
 #define TMEM_SPEC_VERSION 1
 
 /* global statistics (none need to be locked) */
@@ -212,8 +209,8 @@ static int tmem_initialized = 0;
 
 /************ CONCURRENCY  ***********************************************/
 
-EXPORT DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
-EXPORT DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
+DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
+DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
 
@@ -2537,7 +2534,7 @@ static int do_tmem_control(struct tmem_op *op)
 
 /************ EXPORTed FUNCTIONS **************************************/
 
-EXPORT long do_tmem_op(tmem_cli_op_t uops)
+long do_tmem_op(tmem_cli_op_t uops)
 {
     struct tmem_op op;
     struct client *client = tmem_client_from_current();
@@ -2702,7 +2699,7 @@ out:
 }
 
 /* this should be called when the host is destroying a client */
-EXPORT void tmem_destroy(void *v)
+void tmem_destroy(void *v)
 {
     struct client *client = (struct client *)v;
 
@@ -2731,7 +2728,7 @@ EXPORT void tmem_destroy(void *v)
 }
 
 /* freezing all pools guarantees that no additional memory will be consumed */
-EXPORT void tmem_freeze_all(unsigned char key)
+void tmem_freeze_all(unsigned char key)
 {
     static int freeze = 0;
  
@@ -2750,8 +2747,7 @@ EXPORT void tmem_freeze_all(unsigned char key)
 }
 
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
-
-EXPORT void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
+void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
 {
     struct page_info *pfp;
     unsigned long evicts_per_relinq = 0;
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index efc2259..fbd1acc 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -14,27 +14,25 @@
 #include <xen/cpu.h>
 #include <xen/init.h>
 
-#define EXPORT /* indicates code other modules are dependent upon */
-
-EXPORT bool_t __read_mostly opt_tmem = 0;
+bool_t __read_mostly opt_tmem = 0;
 boolean_param("tmem", opt_tmem);
 
-EXPORT bool_t __read_mostly opt_tmem_compress = 0;
+bool_t __read_mostly opt_tmem_compress = 0;
 boolean_param("tmem_compress", opt_tmem_compress);
 
-EXPORT bool_t __read_mostly opt_tmem_dedup = 0;
+bool_t __read_mostly opt_tmem_dedup = 0;
 boolean_param("tmem_dedup", opt_tmem_dedup);
 
-EXPORT bool_t __read_mostly opt_tmem_tze = 0;
+bool_t __read_mostly opt_tmem_tze = 0;
 boolean_param("tmem_tze", opt_tmem_tze);
 
-EXPORT bool_t __read_mostly opt_tmem_shared_auth = 0;
+bool_t __read_mostly opt_tmem_shared_auth = 0;
 boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
 
-EXPORT int __read_mostly opt_tmem_lock = 0;
+int __read_mostly opt_tmem_lock = 0;
 integer_param("tmem_lock", opt_tmem_lock);
 
-EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
+atomic_t freeable_page_count = ATOMIC_INIT(0);
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
  * allocated iff opt_tmem_compress */
@@ -99,7 +97,7 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
 }
 #endif
 
-EXPORT int tmem_copy_from_client(struct page_info *pfp,
+int tmem_copy_from_client(struct page_info *pfp,
     xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -131,7 +129,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
     return rc;
 }
 
-EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
+int tmem_compress_from_client(xen_pfn_t cmfn,
     void **out_va, size_t *out_len, tmem_cli_va_param_t clibuf)
 {
     int ret = 0;
@@ -163,7 +161,7 @@ EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
     return 1;
 }
 
-EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
+int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -192,7 +190,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     return rc;
 }
 
-EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
+int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
                                     size_t size, tmem_cli_va_param_t clibuf)
 {
     unsigned long cli_mfn = 0;
@@ -221,7 +219,7 @@ EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
     return 1;
 }
 
-EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
+int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
                                     pagesize_t len)
 {
     void *cli_va;
@@ -245,12 +243,12 @@ EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
 
 /******************  XEN-SPECIFIC MEMORY ALLOCATION ********************/
 
-EXPORT struct xmem_pool *tmem_mempool = 0;
-EXPORT unsigned int tmem_mempool_maxalloc = 0;
+struct xmem_pool *tmem_mempool = 0;
+unsigned int tmem_mempool_maxalloc = 0;
 
-EXPORT DEFINE_SPINLOCK(tmem_page_list_lock);
-EXPORT PAGE_LIST_HEAD(tmem_page_list);
-EXPORT unsigned long tmem_page_list_pages = 0;
+DEFINE_SPINLOCK(tmem_page_list_lock);
+PAGE_LIST_HEAD(tmem_page_list);
+unsigned long tmem_page_list_pages = 0;
 
 static noinline void *tmem_mempool_page_get(unsigned long size)
 {
@@ -352,7 +350,7 @@ static struct notifier_block cpu_nfb = {
     .notifier_call = cpu_callback
 };
 
-EXPORT int __init tmem_init(void)
+int __init tmem_init(void)
 {
     unsigned int cpu;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10: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 1W1Clt-0004XX-Qx; Thu, 09 Jan 2014 10:23: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 1W1Cls-0004X1-Gt
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:28 +0000
Received: from [85.158.139.211:43421] by server-15.bemta-5.messagelabs.com id
	44/34-08490-F987EC25; Thu, 09 Jan 2014 10:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1389263005!8534995!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7994 invoked from network); 9 Jan 2014 10:23:26 -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 Jan 2014 10: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 1W1Clp-0000yB-GH
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clp-000255-Dt
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:25 +0000
Date: Thu, 09 Jan 2014 10:23:25 +0000
Message-Id: <E1W1Clp-000255-Dt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rm useless
	EXPORT/FORWARD define
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 68af011e2af21f463826059cf50501f0126d09cd
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:07 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: rm useless EXPORT/FORWARD define
    
    It's meaningless to define EXPORT/FORWARD and nobody uses them.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c     |   16 ++++++----------
 xen/common/tmem_xen.c |   38 ++++++++++++++++++--------------------
 2 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 7311487..c31141c 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -24,9 +24,6 @@
 #include <xen/list.h>
 #include <xen/init.h>
 
-#define EXPORT /* indicates code other modules are dependent upon */
-#define FORWARD
-
 #define TMEM_SPEC_VERSION 1
 
 /* global statistics (none need to be locked) */
@@ -212,8 +209,8 @@ static int tmem_initialized = 0;
 
 /************ CONCURRENCY  ***********************************************/
 
-EXPORT DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
-EXPORT DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
+DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
+DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
 
@@ -2537,7 +2534,7 @@ static int do_tmem_control(struct tmem_op *op)
 
 /************ EXPORTed FUNCTIONS **************************************/
 
-EXPORT long do_tmem_op(tmem_cli_op_t uops)
+long do_tmem_op(tmem_cli_op_t uops)
 {
     struct tmem_op op;
     struct client *client = tmem_client_from_current();
@@ -2702,7 +2699,7 @@ out:
 }
 
 /* this should be called when the host is destroying a client */
-EXPORT void tmem_destroy(void *v)
+void tmem_destroy(void *v)
 {
     struct client *client = (struct client *)v;
 
@@ -2731,7 +2728,7 @@ EXPORT void tmem_destroy(void *v)
 }
 
 /* freezing all pools guarantees that no additional memory will be consumed */
-EXPORT void tmem_freeze_all(unsigned char key)
+void tmem_freeze_all(unsigned char key)
 {
     static int freeze = 0;
  
@@ -2750,8 +2747,7 @@ EXPORT void tmem_freeze_all(unsigned char key)
 }
 
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
-
-EXPORT void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
+void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
 {
     struct page_info *pfp;
     unsigned long evicts_per_relinq = 0;
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index efc2259..fbd1acc 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -14,27 +14,25 @@
 #include <xen/cpu.h>
 #include <xen/init.h>
 
-#define EXPORT /* indicates code other modules are dependent upon */
-
-EXPORT bool_t __read_mostly opt_tmem = 0;
+bool_t __read_mostly opt_tmem = 0;
 boolean_param("tmem", opt_tmem);
 
-EXPORT bool_t __read_mostly opt_tmem_compress = 0;
+bool_t __read_mostly opt_tmem_compress = 0;
 boolean_param("tmem_compress", opt_tmem_compress);
 
-EXPORT bool_t __read_mostly opt_tmem_dedup = 0;
+bool_t __read_mostly opt_tmem_dedup = 0;
 boolean_param("tmem_dedup", opt_tmem_dedup);
 
-EXPORT bool_t __read_mostly opt_tmem_tze = 0;
+bool_t __read_mostly opt_tmem_tze = 0;
 boolean_param("tmem_tze", opt_tmem_tze);
 
-EXPORT bool_t __read_mostly opt_tmem_shared_auth = 0;
+bool_t __read_mostly opt_tmem_shared_auth = 0;
 boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
 
-EXPORT int __read_mostly opt_tmem_lock = 0;
+int __read_mostly opt_tmem_lock = 0;
 integer_param("tmem_lock", opt_tmem_lock);
 
-EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
+atomic_t freeable_page_count = ATOMIC_INIT(0);
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
  * allocated iff opt_tmem_compress */
@@ -99,7 +97,7 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
 }
 #endif
 
-EXPORT int tmem_copy_from_client(struct page_info *pfp,
+int tmem_copy_from_client(struct page_info *pfp,
     xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -131,7 +129,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
     return rc;
 }
 
-EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
+int tmem_compress_from_client(xen_pfn_t cmfn,
     void **out_va, size_t *out_len, tmem_cli_va_param_t clibuf)
 {
     int ret = 0;
@@ -163,7 +161,7 @@ EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
     return 1;
 }
 
-EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
+int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     tmem_cli_va_param_t clibuf)
 {
     unsigned long tmem_mfn, cli_mfn = 0;
@@ -192,7 +190,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
     return rc;
 }
 
-EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
+int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
                                     size_t size, tmem_cli_va_param_t clibuf)
 {
     unsigned long cli_mfn = 0;
@@ -221,7 +219,7 @@ EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
     return 1;
 }
 
-EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
+int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
                                     pagesize_t len)
 {
     void *cli_va;
@@ -245,12 +243,12 @@ EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
 
 /******************  XEN-SPECIFIC MEMORY ALLOCATION ********************/
 
-EXPORT struct xmem_pool *tmem_mempool = 0;
-EXPORT unsigned int tmem_mempool_maxalloc = 0;
+struct xmem_pool *tmem_mempool = 0;
+unsigned int tmem_mempool_maxalloc = 0;
 
-EXPORT DEFINE_SPINLOCK(tmem_page_list_lock);
-EXPORT PAGE_LIST_HEAD(tmem_page_list);
-EXPORT unsigned long tmem_page_list_pages = 0;
+DEFINE_SPINLOCK(tmem_page_list_lock);
+PAGE_LIST_HEAD(tmem_page_list);
+unsigned long tmem_page_list_pages = 0;
 
 static noinline void *tmem_mempool_page_get(unsigned long size)
 {
@@ -352,7 +350,7 @@ static struct notifier_block cpu_nfb = {
     .notifier_call = cpu_callback
 };
 
-EXPORT int __init tmem_init(void)
+int __init tmem_init(void)
 {
     unsigned int cpu;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1Cm4-0004fw-U0; Thu, 09 Jan 2014 10:23: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 1W1Cm3-0004eM-IZ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:40 +0000
Received: from [85.158.139.211:54422] by server-11.bemta-5.messagelabs.com id
	C4/7F-23268-AA87EC25; Thu, 09 Jan 2014 10:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1389263016!8741990!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12429 invoked from network); 9 Jan 2014 10:23:37 -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 Jan 2014 10: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 1W1Clz-0000yJ-M5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clz-00025V-K1
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:35 +0000
Date: Thu, 09 Jan 2014 10:23:35 +0000
Message-Id: <E1W1Clz-00025V-K1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop tmem_lock_all
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b67497054e25da9f68879d3ca2db9d0b5c1bba7d
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:08 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: drop tmem_lock_all
    
    tmem_lock_all is used for debug only, remove it from upstream to make
    tmem source code more readable and easier to maintain.
    And no_evict is meaningless without tmem_lock_all, this patch removes it
    also.
    
    This also fixes CID 1055654 Thread deadlock
    
    [ Two threads will be stuck waiting forever if each holds a lock the other needs to acquire.
    In alloc_heap_pages: Threads may try to acquire two locks in different orders, potentially
    causing deadlock (CWE-833)]
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  275 ++++++++++++++++----------------------------
 xen/common/tmem_xen.c      |    3 -
 xen/include/xen/tmem_xen.h |    8 --
 3 files changed, 100 insertions(+), 186 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index c31141c..d072d8c 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -138,7 +138,6 @@ struct tmem_object_root {
     struct tmem_pool *pool;
     domid_t last_client;
     spinlock_t obj_spinlock;
-    bool_t no_evict; /* if globally locked, pseudo-locks against eviction */
 };
 
 struct tmem_object_node {
@@ -207,24 +206,12 @@ static bool_t global_shared_auth = 0;
 static atomic_t client_weight_total = ATOMIC_INIT(0);
 static int tmem_initialized = 0;
 
-/************ CONCURRENCY  ***********************************************/
-
-DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
-DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
+DEFINE_RWLOCK(tmem_rwlock);
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
 
-#define tmem_spin_lock(_l)  do {if (!tmem_lock_all) spin_lock(_l);}while(0)
-#define tmem_spin_unlock(_l)  do {if (!tmem_lock_all) spin_unlock(_l);}while(0)
-#define tmem_read_lock(_l)  do {if (!tmem_lock_all) read_lock(_l);}while(0)
-#define tmem_read_unlock(_l)  do {if (!tmem_lock_all) read_unlock(_l);}while(0)
-#define tmem_write_lock(_l)  do {if (!tmem_lock_all) write_lock(_l);}while(0)
-#define tmem_write_unlock(_l)  do {if (!tmem_lock_all) write_unlock(_l);}while(0)
-#define tmem_write_trylock(_l)  ((tmem_lock_all)?1:write_trylock(_l))
-#define tmem_spin_trylock(_l)  (tmem_lock_all?1:spin_trylock(_l))
-
-#define ASSERT_SPINLOCK(_l) ASSERT(tmem_lock_all || spin_is_locked(_l))
-#define ASSERT_WRITELOCK(_l) ASSERT(tmem_lock_all || rw_is_write_locked(_l))
+#define ASSERT_SPINLOCK(_l) ASSERT(spin_is_locked(_l))
+#define ASSERT_WRITELOCK(_l) ASSERT(rw_is_write_locked(_l))
 
 /* global counters (should use long_atomic_t access) */
 static long global_eph_count = 0; /* atomicity depends on eph_lists_spinlock */
@@ -316,7 +303,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
     int ret;
 
     ASSERT(tmem_dedup_enabled());
-    tmem_read_lock(&pcd_tree_rwlocks[firstbyte]);
+    read_lock(&pcd_tree_rwlocks[firstbyte]);
     pcd = pgp->pcd;
     if ( pgp->size < PAGE_SIZE && pgp->size != 0 &&
          pcd->size < PAGE_SIZE && pcd->size != 0 )
@@ -326,7 +313,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
         ret = tmem_copy_tze_to_client(cmfn, pcd->tze, pcd->size);
     else
         ret = tmem_copy_to_client(cmfn, pcd->pfp, tmem_cli_buf_null);
-    tmem_read_unlock(&pcd_tree_rwlocks[firstbyte]);
+    read_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
 
@@ -350,14 +337,14 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
     if ( have_pcd_rwlock )
         ASSERT_WRITELOCK(&pcd_tree_rwlocks[firstbyte]);
     else
-        tmem_write_lock(&pcd_tree_rwlocks[firstbyte]);
+        write_lock(&pcd_tree_rwlocks[firstbyte]);
     list_del_init(&pgp->pcd_siblings);
     pgp->pcd = NULL;
     pgp->firstbyte = NOT_SHAREABLE;
     pgp->size = -1;
     if ( --pcd->pgp_ref_count )
     {
-        tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        write_unlock(&pcd_tree_rwlocks[firstbyte]);
         return;
     }
 
@@ -391,7 +378,7 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
             pcd_tot_csize -= PAGE_SIZE;
         tmem_page_free(pool,pfp);
     }
-    tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+    write_unlock(&pcd_tree_rwlocks[firstbyte]);
 }
 
 
@@ -423,7 +410,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
         ASSERT(pfp_size <= PAGE_SIZE);
         ASSERT(!(pfp_size & (sizeof(uint64_t)-1)));
     }
-    tmem_write_lock(&pcd_tree_rwlocks[firstbyte]);
+    write_lock(&pcd_tree_rwlocks[firstbyte]);
 
     /* look for page match */
     root = &pcd_tree_roots[firstbyte];
@@ -525,7 +512,7 @@ match:
     pgp->pcd = pcd;
 
 unlock:
-    tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+    write_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
 
@@ -641,7 +628,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     if ( !is_persistent(pgp->us.obj->pool) )
     {
         if ( !no_eph_lock )
-            tmem_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);
@@ -651,20 +638,20 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
         if ( !no_eph_lock )
-            tmem_spin_unlock(&eph_lists_spinlock);
+            spin_unlock(&eph_lists_spinlock);
     } else {
         if ( client->live_migrating )
         {
-            tmem_spin_lock(&pers_lists_spinlock);
+            spin_lock(&pers_lists_spinlock);
             list_add_tail(&pgp->client_inv_pages,
                           &client->persistent_invalidated_list);
             if ( pgp != pgp->us.obj->pool->cur_pgp )
                 list_del_init(&pgp->us.pool_pers_pages);
-            tmem_spin_unlock(&pers_lists_spinlock);
+            spin_unlock(&pers_lists_spinlock);
         } else {
-            tmem_spin_lock(&pers_lists_spinlock);
+            spin_lock(&pers_lists_spinlock);
             list_del_init(&pgp->us.pool_pers_pages);
-            tmem_spin_unlock(&pers_lists_spinlock);
+            spin_unlock(&pers_lists_spinlock);
         }
     }
 }
@@ -806,7 +793,7 @@ static struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oi
     struct tmem_object_root *obj;
 
 restart_find:
-    tmem_read_lock(&pool->pool_rwlock);
+    read_lock(&pool->pool_rwlock);
     node = pool->obj_rb_root[oid_hash(oidp)].rb_node;
     while ( node )
     {
@@ -814,17 +801,12 @@ restart_find:
         switch ( oid_compare(&obj->oid, oidp) )
         {
             case 0: /* equal */
-                if ( tmem_lock_all )
-                    obj->no_evict = 1;
-                else
+                if ( !spin_trylock(&obj->obj_spinlock) )
                 {
-                    if ( !tmem_spin_trylock(&obj->obj_spinlock) )
-                    {
-                        tmem_read_unlock(&pool->pool_rwlock);
-                        goto restart_find;
-                    }
-                    tmem_read_unlock(&pool->pool_rwlock);
+                    read_unlock(&pool->pool_rwlock);
+                    goto restart_find;
                 }
+                read_unlock(&pool->pool_rwlock);
                 return obj;
             case -1:
                 node = node->rb_left;
@@ -833,7 +815,7 @@ restart_find:
                 node = node->rb_right;
         }
     }
-    tmem_read_unlock(&pool->pool_rwlock);
+    read_unlock(&pool->pool_rwlock);
     return NULL;
 }
 
@@ -864,7 +846,7 @@ static void obj_free(struct tmem_object_root *obj, int no_rebalance)
     /* 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)]);
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     tmem_free(obj, pool);
 }
 
@@ -919,9 +901,8 @@ 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;
-    tmem_spin_lock(&obj->obj_spinlock);
+    spin_lock(&obj->obj_spinlock);
     obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
-    obj->no_evict = 1;
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     return obj;
 }
@@ -941,7 +922,7 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
     struct tmem_object_root *obj;
     int i;
 
-    tmem_write_lock(&pool->pool_rwlock);
+    write_lock(&pool->pool_rwlock);
     pool->is_dying = 1;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
     {
@@ -949,19 +930,18 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
         while ( node != NULL )
         {
             obj = container_of(node, struct tmem_object_root, rb_tree_node);
-            tmem_spin_lock(&obj->obj_spinlock);
+            spin_lock(&obj->obj_spinlock);
             node = rb_next(node);
-            ASSERT(obj->no_evict == 0);
             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);
             else
-                tmem_spin_unlock(&obj->obj_spinlock);
+                spin_unlock(&obj->obj_spinlock);
         }
     }
-    tmem_write_unlock(&pool->pool_rwlock);
+    write_unlock(&pool->pool_rwlock);
 }
 
 
@@ -1229,9 +1209,7 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
 
     if ( pool->is_dying )
         return 0;
-    if ( tmem_lock_all && !obj->no_evict )
-       return 1;
-    if ( tmem_spin_trylock(&obj->obj_spinlock) )
+    if ( spin_trylock(&obj->obj_spinlock) )
     {
         if ( tmem_dedup_enabled() )
         {
@@ -1239,7 +1217,7 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
             if ( firstbyte ==  NOT_SHAREABLE )
                 goto obj_unlock;
             ASSERT(firstbyte < 256);
-            if ( !tmem_write_trylock(&pcd_tree_rwlocks[firstbyte]) )
+            if ( !write_trylock(&pcd_tree_rwlocks[firstbyte]) )
                 goto obj_unlock;
             if ( pgp->pcd->pgp_ref_count > 1 && !pgp->eviction_attempted )
             {
@@ -1253,15 +1231,15 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
         }
         if ( obj->pgp_count > 1 )
             return 1;
-        if ( tmem_write_trylock(&pool->pool_rwlock) )
+        if ( write_trylock(&pool->pool_rwlock) )
         {
             *hold_pool_rwlock = 1;
             return 1;
         }
 pcd_unlock:
-        tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        write_unlock(&pcd_tree_rwlocks[firstbyte]);
 obj_unlock:
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     return 0;
 }
@@ -1276,7 +1254,7 @@ static int tmem_evict(void)
     bool_t hold_pool_rwlock = 0;
 
     evict_attempts++;
-    tmem_spin_lock(&eph_lists_spinlock);
+    spin_lock(&eph_lists_spinlock);
     if ( (client != NULL) && client_over_quota(client) &&
          !list_empty(&client->ephemeral_page_list) )
     {
@@ -1298,7 +1276,6 @@ found:
     ASSERT(pgp != NULL);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
-    ASSERT(obj->no_evict == 0);
     ASSERT(obj->pool != NULL);
     pool = obj->pool;
 
@@ -1317,14 +1294,14 @@ found:
         obj_free(obj,0);
     }
     else
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     if ( hold_pool_rwlock )
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     evicted_pgs++;
     ret = 1;
 
 out:
-    tmem_spin_unlock(&eph_lists_spinlock);
+    spin_unlock(&eph_lists_spinlock);
     return ret;
 }
 
@@ -1467,8 +1444,7 @@ done:
     /* successfully replaced data, clean up and return success */
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
-    obj->no_evict = 0;
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     pool->dup_puts_replaced++;
     pool->good_puts++;
     if ( is_persistent(pool) )
@@ -1489,12 +1465,11 @@ cleanup:
     pgp_delete(pgpfound,0);
     if ( obj->pgp_count == 0 )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj,0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     } else {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->dup_puts_flushed++;
     return ret;
@@ -1532,14 +1507,14 @@ static int do_tmem_put(struct tmem_pool *pool,
         /* no puts allowed into a frozen pool (except dup puts) */
         if ( client->frozen )
             return ret;
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         if ( (obj = obj_new(pool,oidp)) == NULL )
         {
-            tmem_write_unlock(&pool->pool_rwlock);
+            write_unlock(&pool->pool_rwlock);
             return -ENOMEM;
         }
         newobj = 1;
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     }
 
     /* When arrive here, we have a spinlocked obj for use */
@@ -1594,7 +1569,7 @@ copy_uncompressed:
 insert_page:
     if ( !is_persistent(pool) )
     {
-        tmem_spin_lock(&eph_lists_spinlock);
+        spin_lock(&eph_lists_spinlock);
         list_add_tail(&pgp->global_eph_pages,
             &global_ephemeral_page_list);
         if (++global_eph_count > global_eph_count_max)
@@ -1603,22 +1578,21 @@ insert_page:
             &client->ephemeral_page_list);
         if (++client->eph_count > client->eph_count_max)
             client->eph_count_max = client->eph_count;
-        tmem_spin_unlock(&eph_lists_spinlock);
+        spin_unlock(&eph_lists_spinlock);
     }
     else
     { /* is_persistent */
-        tmem_spin_lock(&pers_lists_spinlock);
+        spin_lock(&pers_lists_spinlock);
         list_add_tail(&pgp->us.pool_pers_pages,
             &pool->persistent_page_list);
-        tmem_spin_unlock(&pers_lists_spinlock);
+        spin_unlock(&pers_lists_spinlock);
     }
 
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
-    obj->no_evict = 0;
 
     /* free the obj spinlock */
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     pool->good_puts++;
 
     if ( is_persistent(pool) )
@@ -1639,14 +1613,13 @@ free_pgp:
 unlock_obj:
     if ( newobj )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj, 0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     }
     else
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->no_mem_puts++;
     return ret;
@@ -1675,8 +1648,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         pgp = pgp_delete_from_obj(obj, index);
     if ( pgp == NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
         return 0;
     }
     ASSERT(pgp->size != -1);
@@ -1699,25 +1671,24 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             pgp_delete(pgp,0);
             if ( obj->pgp_count == 0 )
             {
-                tmem_write_lock(&pool->pool_rwlock);
+                write_lock(&pool->pool_rwlock);
                 obj_free(obj,0);
                 obj = NULL;
-                tmem_write_unlock(&pool->pool_rwlock);
+                write_unlock(&pool->pool_rwlock);
             }
         } else {
-            tmem_spin_lock(&eph_lists_spinlock);
+            spin_lock(&eph_lists_spinlock);
             list_del(&pgp->global_eph_pages);
             list_add_tail(&pgp->global_eph_pages,&global_ephemeral_page_list);
             list_del(&pgp->us.client_eph_pages);
             list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list);
-            tmem_spin_unlock(&eph_lists_spinlock);
+            spin_unlock(&eph_lists_spinlock);
             obj->last_client = tmem_get_cli_id_from_current();
         }
     }
     if ( obj != NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->found_gets++;
     if ( is_persistent(pool) )
@@ -1727,8 +1698,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     return 1;
 
 bad_copy:
-    obj->no_evict = 0;
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     failed_copies++;
     return rc;
 }
@@ -1745,19 +1715,17 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
     pgp = pgp_delete_from_obj(obj, index);
     if ( pgp == NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
         goto out;
     }
     pgp_delete(pgp,0);
     if ( obj->pgp_count == 0 )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj,0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     } else {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->flushs_found++;
 
@@ -1776,10 +1744,10 @@ static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
     obj = obj_find(pool,oidp);
     if ( obj == NULL )
         goto out;
-    tmem_write_lock(&pool->pool_rwlock);
+    write_lock(&pool->pool_rwlock);
     obj_destroy(obj,0);
     pool->flush_objs_found++;
-    tmem_write_unlock(&pool->pool_rwlock);
+    write_unlock(&pool->pool_rwlock);
 
 out:
     if ( pool->client->frozen )
@@ -2351,7 +2319,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     if ( bufsize < pagesize + sizeof(struct tmem_handle) )
         return -ENOMEM;
 
-    tmem_spin_lock(&pers_lists_spinlock);
+    spin_lock(&pers_lists_spinlock);
     if ( list_empty(&pool->persistent_page_list) )
     {
         ret = -1;
@@ -2383,7 +2351,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
-    tmem_spin_unlock(&pers_lists_spinlock);
+    spin_unlock(&pers_lists_spinlock);
     return ret;
 }
 
@@ -2399,7 +2367,7 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
         return 0;
     if ( bufsize < sizeof(struct tmem_handle) )
         return 0;
-    tmem_spin_lock(&pers_lists_spinlock);
+    spin_lock(&pers_lists_spinlock);
     if ( list_empty(&client->persistent_invalidated_list) )
         goto out;
     if ( client->cur_pgp == NULL )
@@ -2425,7 +2393,7 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
     tmem_copy_to_client_buf(buf, &h, 1);
     ret = 1;
 out:
-    tmem_spin_unlock(&pers_lists_spinlock);
+    spin_unlock(&pers_lists_spinlock);
     return ret;
 }
 
@@ -2544,7 +2512,7 @@ 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 tmem_write_lock_set = 0, tmem_read_lock_set = 0;
+    bool_t write_lock_set = 0, read_lock_set = 0;
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2554,19 +2522,9 @@ long do_tmem_op(tmem_cli_op_t uops)
 
     total_tmem_ops++;
 
-    if ( tmem_lock_all )
-    {
-        if ( tmem_lock_all > 1 )
-            spin_lock_irq(&tmem_spinlock);
-        else
-            spin_lock(&tmem_spinlock);
-    }
-
     if ( client != NULL && tmem_client_is_dying(client) )
     {
         rc = -ENODEV;
-        if ( tmem_lock_all )
-            goto out;
  simple_error:
         errored_tmem_ops++;
         return rc;
@@ -2576,26 +2534,24 @@ long do_tmem_op(tmem_cli_op_t uops)
     {
         tmem_client_err("tmem: can't get tmem struct from %s\n", tmem_client_str);
         rc = -EFAULT;
-        if ( !tmem_lock_all )
-            goto simple_error;
-        goto out;
+        goto simple_error;
     }
 
     if ( op.cmd == TMEM_CONTROL )
     {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         rc = do_tmem_control(&op);
         goto out;
     } else if ( op.cmd == TMEM_AUTH ) {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         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 ) {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         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;
@@ -2604,8 +2560,8 @@ long do_tmem_op(tmem_cli_op_t uops)
     /* create per-client tmem structure dynamically on first use by client */
     if ( client == NULL )
     {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         if ( (client = client_create(tmem_get_cli_id_from_current())) == NULL )
         {
             tmem_client_err("tmem: can't create tmem structure for %s\n",
@@ -2617,18 +2573,18 @@ long do_tmem_op(tmem_cli_op_t uops)
 
     if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
     {
-        if ( !tmem_write_lock_set )
+        if ( !write_lock_set )
         {
-            tmem_write_lock(&tmem_rwlock);
-            tmem_write_lock_set = 1;
+            write_lock(&tmem_rwlock);
+            write_lock_set = 1;
         }
     }
     else
     {
-        if ( !tmem_write_lock_set )
+        if ( !write_lock_set )
         {
-            tmem_read_lock(&tmem_rwlock);
-            tmem_read_lock_set = 1;
+            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) )
@@ -2680,20 +2636,12 @@ long do_tmem_op(tmem_cli_op_t uops)
 out:
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( tmem_lock_all )
-    {
-        if ( tmem_lock_all > 1 )
-            spin_unlock_irq(&tmem_spinlock);
-        else
-            spin_unlock(&tmem_spinlock);
-    } else {
-        if ( tmem_write_lock_set )
-            write_unlock(&tmem_rwlock);
-        else if ( tmem_read_lock_set )
-            read_unlock(&tmem_rwlock);
-        else 
-            ASSERT(0);
-    }
+    if ( write_lock_set )
+        write_unlock(&tmem_rwlock);
+    else if ( read_lock_set )
+        read_unlock(&tmem_rwlock);
+    else 
+        ASSERT(0);
 
     return rc;
 }
@@ -2712,38 +2660,26 @@ void tmem_destroy(void *v)
         return;
     }
 
-    if ( tmem_lock_all )
-        spin_lock(&tmem_spinlock);
-    else
-        write_lock(&tmem_rwlock);
+    write_lock(&tmem_rwlock);
 
     printk("tmem: flushing tmem pools for %s=%d\n",
            tmem_cli_id_str, client->cli_id);
     client_flush(client, 1);
 
-    if ( tmem_lock_all )
-        spin_unlock(&tmem_spinlock);
-    else
-        write_unlock(&tmem_rwlock);
+    write_unlock(&tmem_rwlock);
 }
 
 /* freezing all pools guarantees that no additional memory will be consumed */
 void tmem_freeze_all(unsigned char key)
 {
     static int freeze = 0;
- 
-    if ( tmem_lock_all )
-        spin_lock(&tmem_spinlock);
-    else
-        write_lock(&tmem_rwlock);
+
+    write_lock(&tmem_rwlock);
 
     freeze = !freeze;
     tmemc_freeze_pools(TMEM_CLI_ID_NULL,freeze);
 
-    if ( tmem_lock_all )
-        spin_unlock(&tmem_spinlock);
-    else
-        write_unlock(&tmem_rwlock);
+    write_unlock(&tmem_rwlock);
 }
 
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
@@ -2766,12 +2702,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     }
 
     if ( tmem_called_from_tmem(memflags) )
-    {
-        if ( tmem_lock_all )
-            spin_lock(&tmem_spinlock);
-        else
-            read_lock(&tmem_rwlock);
-    }
+        read_lock(&tmem_rwlock);
 
     while ( (pfp = tmem_alloc_page(NULL,1)) == NULL )
     {
@@ -2789,12 +2720,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     }
 
     if ( tmem_called_from_tmem(memflags) )
-    {
-        if ( tmem_lock_all )
-            spin_unlock(&tmem_spinlock);
-        else
-            read_unlock(&tmem_rwlock);
-    }
+        read_unlock(&tmem_rwlock);
 
     return pfp;
 }
@@ -2820,9 +2746,8 @@ static int __init init_tmem(void)
 
     if ( tmem_init() )
     {
-        printk("tmem: initialized comp=%d dedup=%d tze=%d global-lock=%d\n",
-            tmem_compression_enabled(), tmem_dedup_enabled(), tmem_tze_enabled(),
-            tmem_lock_all);
+        printk("tmem: initialized comp=%d dedup=%d tze=%d\n",
+            tmem_compression_enabled(), tmem_dedup_enabled(), tmem_tze_enabled());
         if ( tmem_dedup_enabled()&&tmem_compression_enabled()&&tmem_tze_enabled() )
         {
             tmem_tze_disable();
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index fbd1acc..bc8e249 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -29,9 +29,6 @@ boolean_param("tmem_tze", opt_tmem_tze);
 bool_t __read_mostly opt_tmem_shared_auth = 0;
 boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
 
-int __read_mostly opt_tmem_lock = 0;
-integer_param("tmem_lock", opt_tmem_lock);
-
 atomic_t freeable_page_count = ATOMIC_INIT(0);
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index d842374..0628ef4 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -34,11 +34,6 @@ extern spinlock_t tmem_page_list_lock;
 extern unsigned long tmem_page_list_pages;
 extern atomic_t freeable_page_count;
 
-extern spinlock_t tmem_lock;
-extern spinlock_t tmem_spinlock;
-extern rwlock_t tmem_rwlock;
-
-extern void tmem_copy_page(char *to, char*from);
 extern int tmem_init(void);
 #define tmem_hash hash_long
 
@@ -77,8 +72,6 @@ static inline bool_t tmem_enabled(void)
     return opt_tmem;
 }
 
-extern int opt_tmem_lock;
-
 /*
  * Memory free page list management
  */
@@ -182,7 +175,6 @@ static inline unsigned long tmem_free_mb(void)
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
 }
 
-#define tmem_lock_all  opt_tmem_lock
 #define tmem_called_from_tmem(_memflags) (_memflags & MEMF_tmem)
 
 /*  "Client" (==domain) abstraction */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1Cm4-0004fw-U0; Thu, 09 Jan 2014 10:23: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 1W1Cm3-0004eM-IZ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:40 +0000
Received: from [85.158.139.211:54422] by server-11.bemta-5.messagelabs.com id
	C4/7F-23268-AA87EC25; Thu, 09 Jan 2014 10:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1389263016!8741990!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12429 invoked from network); 9 Jan 2014 10:23:37 -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 Jan 2014 10: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 1W1Clz-0000yJ-M5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Clz-00025V-K1
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:35 +0000
Date: Thu, 09 Jan 2014 10:23:35 +0000
Message-Id: <E1W1Clz-00025V-K1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop tmem_lock_all
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b67497054e25da9f68879d3ca2db9d0b5c1bba7d
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:08 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: drop tmem_lock_all
    
    tmem_lock_all is used for debug only, remove it from upstream to make
    tmem source code more readable and easier to maintain.
    And no_evict is meaningless without tmem_lock_all, this patch removes it
    also.
    
    This also fixes CID 1055654 Thread deadlock
    
    [ Two threads will be stuck waiting forever if each holds a lock the other needs to acquire.
    In alloc_heap_pages: Threads may try to acquire two locks in different orders, potentially
    causing deadlock (CWE-833)]
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  275 ++++++++++++++++----------------------------
 xen/common/tmem_xen.c      |    3 -
 xen/include/xen/tmem_xen.h |    8 --
 3 files changed, 100 insertions(+), 186 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index c31141c..d072d8c 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -138,7 +138,6 @@ struct tmem_object_root {
     struct tmem_pool *pool;
     domid_t last_client;
     spinlock_t obj_spinlock;
-    bool_t no_evict; /* if globally locked, pseudo-locks against eviction */
 };
 
 struct tmem_object_node {
@@ -207,24 +206,12 @@ static bool_t global_shared_auth = 0;
 static atomic_t client_weight_total = ATOMIC_INIT(0);
 static int tmem_initialized = 0;
 
-/************ CONCURRENCY  ***********************************************/
-
-DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
-DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
+DEFINE_RWLOCK(tmem_rwlock);
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
 
-#define tmem_spin_lock(_l)  do {if (!tmem_lock_all) spin_lock(_l);}while(0)
-#define tmem_spin_unlock(_l)  do {if (!tmem_lock_all) spin_unlock(_l);}while(0)
-#define tmem_read_lock(_l)  do {if (!tmem_lock_all) read_lock(_l);}while(0)
-#define tmem_read_unlock(_l)  do {if (!tmem_lock_all) read_unlock(_l);}while(0)
-#define tmem_write_lock(_l)  do {if (!tmem_lock_all) write_lock(_l);}while(0)
-#define tmem_write_unlock(_l)  do {if (!tmem_lock_all) write_unlock(_l);}while(0)
-#define tmem_write_trylock(_l)  ((tmem_lock_all)?1:write_trylock(_l))
-#define tmem_spin_trylock(_l)  (tmem_lock_all?1:spin_trylock(_l))
-
-#define ASSERT_SPINLOCK(_l) ASSERT(tmem_lock_all || spin_is_locked(_l))
-#define ASSERT_WRITELOCK(_l) ASSERT(tmem_lock_all || rw_is_write_locked(_l))
+#define ASSERT_SPINLOCK(_l) ASSERT(spin_is_locked(_l))
+#define ASSERT_WRITELOCK(_l) ASSERT(rw_is_write_locked(_l))
 
 /* global counters (should use long_atomic_t access) */
 static long global_eph_count = 0; /* atomicity depends on eph_lists_spinlock */
@@ -316,7 +303,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
     int ret;
 
     ASSERT(tmem_dedup_enabled());
-    tmem_read_lock(&pcd_tree_rwlocks[firstbyte]);
+    read_lock(&pcd_tree_rwlocks[firstbyte]);
     pcd = pgp->pcd;
     if ( pgp->size < PAGE_SIZE && pgp->size != 0 &&
          pcd->size < PAGE_SIZE && pcd->size != 0 )
@@ -326,7 +313,7 @@ static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
         ret = tmem_copy_tze_to_client(cmfn, pcd->tze, pcd->size);
     else
         ret = tmem_copy_to_client(cmfn, pcd->pfp, tmem_cli_buf_null);
-    tmem_read_unlock(&pcd_tree_rwlocks[firstbyte]);
+    read_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
 
@@ -350,14 +337,14 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
     if ( have_pcd_rwlock )
         ASSERT_WRITELOCK(&pcd_tree_rwlocks[firstbyte]);
     else
-        tmem_write_lock(&pcd_tree_rwlocks[firstbyte]);
+        write_lock(&pcd_tree_rwlocks[firstbyte]);
     list_del_init(&pgp->pcd_siblings);
     pgp->pcd = NULL;
     pgp->firstbyte = NOT_SHAREABLE;
     pgp->size = -1;
     if ( --pcd->pgp_ref_count )
     {
-        tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        write_unlock(&pcd_tree_rwlocks[firstbyte]);
         return;
     }
 
@@ -391,7 +378,7 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
             pcd_tot_csize -= PAGE_SIZE;
         tmem_page_free(pool,pfp);
     }
-    tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+    write_unlock(&pcd_tree_rwlocks[firstbyte]);
 }
 
 
@@ -423,7 +410,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
         ASSERT(pfp_size <= PAGE_SIZE);
         ASSERT(!(pfp_size & (sizeof(uint64_t)-1)));
     }
-    tmem_write_lock(&pcd_tree_rwlocks[firstbyte]);
+    write_lock(&pcd_tree_rwlocks[firstbyte]);
 
     /* look for page match */
     root = &pcd_tree_roots[firstbyte];
@@ -525,7 +512,7 @@ match:
     pgp->pcd = pcd;
 
 unlock:
-    tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+    write_unlock(&pcd_tree_rwlocks[firstbyte]);
     return ret;
 }
 
@@ -641,7 +628,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     if ( !is_persistent(pgp->us.obj->pool) )
     {
         if ( !no_eph_lock )
-            tmem_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);
@@ -651,20 +638,20 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
         if ( !no_eph_lock )
-            tmem_spin_unlock(&eph_lists_spinlock);
+            spin_unlock(&eph_lists_spinlock);
     } else {
         if ( client->live_migrating )
         {
-            tmem_spin_lock(&pers_lists_spinlock);
+            spin_lock(&pers_lists_spinlock);
             list_add_tail(&pgp->client_inv_pages,
                           &client->persistent_invalidated_list);
             if ( pgp != pgp->us.obj->pool->cur_pgp )
                 list_del_init(&pgp->us.pool_pers_pages);
-            tmem_spin_unlock(&pers_lists_spinlock);
+            spin_unlock(&pers_lists_spinlock);
         } else {
-            tmem_spin_lock(&pers_lists_spinlock);
+            spin_lock(&pers_lists_spinlock);
             list_del_init(&pgp->us.pool_pers_pages);
-            tmem_spin_unlock(&pers_lists_spinlock);
+            spin_unlock(&pers_lists_spinlock);
         }
     }
 }
@@ -806,7 +793,7 @@ static struct tmem_object_root * obj_find(struct tmem_pool *pool, struct oid *oi
     struct tmem_object_root *obj;
 
 restart_find:
-    tmem_read_lock(&pool->pool_rwlock);
+    read_lock(&pool->pool_rwlock);
     node = pool->obj_rb_root[oid_hash(oidp)].rb_node;
     while ( node )
     {
@@ -814,17 +801,12 @@ restart_find:
         switch ( oid_compare(&obj->oid, oidp) )
         {
             case 0: /* equal */
-                if ( tmem_lock_all )
-                    obj->no_evict = 1;
-                else
+                if ( !spin_trylock(&obj->obj_spinlock) )
                 {
-                    if ( !tmem_spin_trylock(&obj->obj_spinlock) )
-                    {
-                        tmem_read_unlock(&pool->pool_rwlock);
-                        goto restart_find;
-                    }
-                    tmem_read_unlock(&pool->pool_rwlock);
+                    read_unlock(&pool->pool_rwlock);
+                    goto restart_find;
                 }
+                read_unlock(&pool->pool_rwlock);
                 return obj;
             case -1:
                 node = node->rb_left;
@@ -833,7 +815,7 @@ restart_find:
                 node = node->rb_right;
         }
     }
-    tmem_read_unlock(&pool->pool_rwlock);
+    read_unlock(&pool->pool_rwlock);
     return NULL;
 }
 
@@ -864,7 +846,7 @@ static void obj_free(struct tmem_object_root *obj, int no_rebalance)
     /* 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)]);
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     tmem_free(obj, pool);
 }
 
@@ -919,9 +901,8 @@ 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;
-    tmem_spin_lock(&obj->obj_spinlock);
+    spin_lock(&obj->obj_spinlock);
     obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
-    obj->no_evict = 1;
     ASSERT_SPINLOCK(&obj->obj_spinlock);
     return obj;
 }
@@ -941,7 +922,7 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
     struct tmem_object_root *obj;
     int i;
 
-    tmem_write_lock(&pool->pool_rwlock);
+    write_lock(&pool->pool_rwlock);
     pool->is_dying = 1;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
     {
@@ -949,19 +930,18 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
         while ( node != NULL )
         {
             obj = container_of(node, struct tmem_object_root, rb_tree_node);
-            tmem_spin_lock(&obj->obj_spinlock);
+            spin_lock(&obj->obj_spinlock);
             node = rb_next(node);
-            ASSERT(obj->no_evict == 0);
             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);
             else
-                tmem_spin_unlock(&obj->obj_spinlock);
+                spin_unlock(&obj->obj_spinlock);
         }
     }
-    tmem_write_unlock(&pool->pool_rwlock);
+    write_unlock(&pool->pool_rwlock);
 }
 
 
@@ -1229,9 +1209,7 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
 
     if ( pool->is_dying )
         return 0;
-    if ( tmem_lock_all && !obj->no_evict )
-       return 1;
-    if ( tmem_spin_trylock(&obj->obj_spinlock) )
+    if ( spin_trylock(&obj->obj_spinlock) )
     {
         if ( tmem_dedup_enabled() )
         {
@@ -1239,7 +1217,7 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
             if ( firstbyte ==  NOT_SHAREABLE )
                 goto obj_unlock;
             ASSERT(firstbyte < 256);
-            if ( !tmem_write_trylock(&pcd_tree_rwlocks[firstbyte]) )
+            if ( !write_trylock(&pcd_tree_rwlocks[firstbyte]) )
                 goto obj_unlock;
             if ( pgp->pcd->pgp_ref_count > 1 && !pgp->eviction_attempted )
             {
@@ -1253,15 +1231,15 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
         }
         if ( obj->pgp_count > 1 )
             return 1;
-        if ( tmem_write_trylock(&pool->pool_rwlock) )
+        if ( write_trylock(&pool->pool_rwlock) )
         {
             *hold_pool_rwlock = 1;
             return 1;
         }
 pcd_unlock:
-        tmem_write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        write_unlock(&pcd_tree_rwlocks[firstbyte]);
 obj_unlock:
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     return 0;
 }
@@ -1276,7 +1254,7 @@ static int tmem_evict(void)
     bool_t hold_pool_rwlock = 0;
 
     evict_attempts++;
-    tmem_spin_lock(&eph_lists_spinlock);
+    spin_lock(&eph_lists_spinlock);
     if ( (client != NULL) && client_over_quota(client) &&
          !list_empty(&client->ephemeral_page_list) )
     {
@@ -1298,7 +1276,6 @@ found:
     ASSERT(pgp != NULL);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
-    ASSERT(obj->no_evict == 0);
     ASSERT(obj->pool != NULL);
     pool = obj->pool;
 
@@ -1317,14 +1294,14 @@ found:
         obj_free(obj,0);
     }
     else
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     if ( hold_pool_rwlock )
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     evicted_pgs++;
     ret = 1;
 
 out:
-    tmem_spin_unlock(&eph_lists_spinlock);
+    spin_unlock(&eph_lists_spinlock);
     return ret;
 }
 
@@ -1467,8 +1444,7 @@ done:
     /* successfully replaced data, clean up and return success */
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
-    obj->no_evict = 0;
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     pool->dup_puts_replaced++;
     pool->good_puts++;
     if ( is_persistent(pool) )
@@ -1489,12 +1465,11 @@ cleanup:
     pgp_delete(pgpfound,0);
     if ( obj->pgp_count == 0 )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj,0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     } else {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->dup_puts_flushed++;
     return ret;
@@ -1532,14 +1507,14 @@ static int do_tmem_put(struct tmem_pool *pool,
         /* no puts allowed into a frozen pool (except dup puts) */
         if ( client->frozen )
             return ret;
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         if ( (obj = obj_new(pool,oidp)) == NULL )
         {
-            tmem_write_unlock(&pool->pool_rwlock);
+            write_unlock(&pool->pool_rwlock);
             return -ENOMEM;
         }
         newobj = 1;
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     }
 
     /* When arrive here, we have a spinlocked obj for use */
@@ -1594,7 +1569,7 @@ copy_uncompressed:
 insert_page:
     if ( !is_persistent(pool) )
     {
-        tmem_spin_lock(&eph_lists_spinlock);
+        spin_lock(&eph_lists_spinlock);
         list_add_tail(&pgp->global_eph_pages,
             &global_ephemeral_page_list);
         if (++global_eph_count > global_eph_count_max)
@@ -1603,22 +1578,21 @@ insert_page:
             &client->ephemeral_page_list);
         if (++client->eph_count > client->eph_count_max)
             client->eph_count_max = client->eph_count;
-        tmem_spin_unlock(&eph_lists_spinlock);
+        spin_unlock(&eph_lists_spinlock);
     }
     else
     { /* is_persistent */
-        tmem_spin_lock(&pers_lists_spinlock);
+        spin_lock(&pers_lists_spinlock);
         list_add_tail(&pgp->us.pool_pers_pages,
             &pool->persistent_page_list);
-        tmem_spin_unlock(&pers_lists_spinlock);
+        spin_unlock(&pers_lists_spinlock);
     }
 
     if ( is_shared(pool) )
         obj->last_client = client->cli_id;
-    obj->no_evict = 0;
 
     /* free the obj spinlock */
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     pool->good_puts++;
 
     if ( is_persistent(pool) )
@@ -1639,14 +1613,13 @@ free_pgp:
 unlock_obj:
     if ( newobj )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj, 0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     }
     else
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->no_mem_puts++;
     return ret;
@@ -1675,8 +1648,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
         pgp = pgp_delete_from_obj(obj, index);
     if ( pgp == NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
         return 0;
     }
     ASSERT(pgp->size != -1);
@@ -1699,25 +1671,24 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             pgp_delete(pgp,0);
             if ( obj->pgp_count == 0 )
             {
-                tmem_write_lock(&pool->pool_rwlock);
+                write_lock(&pool->pool_rwlock);
                 obj_free(obj,0);
                 obj = NULL;
-                tmem_write_unlock(&pool->pool_rwlock);
+                write_unlock(&pool->pool_rwlock);
             }
         } else {
-            tmem_spin_lock(&eph_lists_spinlock);
+            spin_lock(&eph_lists_spinlock);
             list_del(&pgp->global_eph_pages);
             list_add_tail(&pgp->global_eph_pages,&global_ephemeral_page_list);
             list_del(&pgp->us.client_eph_pages);
             list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list);
-            tmem_spin_unlock(&eph_lists_spinlock);
+            spin_unlock(&eph_lists_spinlock);
             obj->last_client = tmem_get_cli_id_from_current();
         }
     }
     if ( obj != NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->found_gets++;
     if ( is_persistent(pool) )
@@ -1727,8 +1698,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     return 1;
 
 bad_copy:
-    obj->no_evict = 0;
-    tmem_spin_unlock(&obj->obj_spinlock);
+    spin_unlock(&obj->obj_spinlock);
     failed_copies++;
     return rc;
 }
@@ -1745,19 +1715,17 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
     pgp = pgp_delete_from_obj(obj, index);
     if ( pgp == NULL )
     {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
         goto out;
     }
     pgp_delete(pgp,0);
     if ( obj->pgp_count == 0 )
     {
-        tmem_write_lock(&pool->pool_rwlock);
+        write_lock(&pool->pool_rwlock);
         obj_free(obj,0);
-        tmem_write_unlock(&pool->pool_rwlock);
+        write_unlock(&pool->pool_rwlock);
     } else {
-        obj->no_evict = 0;
-        tmem_spin_unlock(&obj->obj_spinlock);
+        spin_unlock(&obj->obj_spinlock);
     }
     pool->flushs_found++;
 
@@ -1776,10 +1744,10 @@ static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
     obj = obj_find(pool,oidp);
     if ( obj == NULL )
         goto out;
-    tmem_write_lock(&pool->pool_rwlock);
+    write_lock(&pool->pool_rwlock);
     obj_destroy(obj,0);
     pool->flush_objs_found++;
-    tmem_write_unlock(&pool->pool_rwlock);
+    write_unlock(&pool->pool_rwlock);
 
 out:
     if ( pool->client->frozen )
@@ -2351,7 +2319,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     if ( bufsize < pagesize + sizeof(struct tmem_handle) )
         return -ENOMEM;
 
-    tmem_spin_lock(&pers_lists_spinlock);
+    spin_lock(&pers_lists_spinlock);
     if ( list_empty(&pool->persistent_page_list) )
     {
         ret = -1;
@@ -2383,7 +2351,7 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
-    tmem_spin_unlock(&pers_lists_spinlock);
+    spin_unlock(&pers_lists_spinlock);
     return ret;
 }
 
@@ -2399,7 +2367,7 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
         return 0;
     if ( bufsize < sizeof(struct tmem_handle) )
         return 0;
-    tmem_spin_lock(&pers_lists_spinlock);
+    spin_lock(&pers_lists_spinlock);
     if ( list_empty(&client->persistent_invalidated_list) )
         goto out;
     if ( client->cur_pgp == NULL )
@@ -2425,7 +2393,7 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
     tmem_copy_to_client_buf(buf, &h, 1);
     ret = 1;
 out:
-    tmem_spin_unlock(&pers_lists_spinlock);
+    spin_unlock(&pers_lists_spinlock);
     return ret;
 }
 
@@ -2544,7 +2512,7 @@ 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 tmem_write_lock_set = 0, tmem_read_lock_set = 0;
+    bool_t write_lock_set = 0, read_lock_set = 0;
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2554,19 +2522,9 @@ long do_tmem_op(tmem_cli_op_t uops)
 
     total_tmem_ops++;
 
-    if ( tmem_lock_all )
-    {
-        if ( tmem_lock_all > 1 )
-            spin_lock_irq(&tmem_spinlock);
-        else
-            spin_lock(&tmem_spinlock);
-    }
-
     if ( client != NULL && tmem_client_is_dying(client) )
     {
         rc = -ENODEV;
-        if ( tmem_lock_all )
-            goto out;
  simple_error:
         errored_tmem_ops++;
         return rc;
@@ -2576,26 +2534,24 @@ long do_tmem_op(tmem_cli_op_t uops)
     {
         tmem_client_err("tmem: can't get tmem struct from %s\n", tmem_client_str);
         rc = -EFAULT;
-        if ( !tmem_lock_all )
-            goto simple_error;
-        goto out;
+        goto simple_error;
     }
 
     if ( op.cmd == TMEM_CONTROL )
     {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         rc = do_tmem_control(&op);
         goto out;
     } else if ( op.cmd == TMEM_AUTH ) {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         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 ) {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         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;
@@ -2604,8 +2560,8 @@ long do_tmem_op(tmem_cli_op_t uops)
     /* create per-client tmem structure dynamically on first use by client */
     if ( client == NULL )
     {
-        tmem_write_lock(&tmem_rwlock);
-        tmem_write_lock_set = 1;
+        write_lock(&tmem_rwlock);
+        write_lock_set = 1;
         if ( (client = client_create(tmem_get_cli_id_from_current())) == NULL )
         {
             tmem_client_err("tmem: can't create tmem structure for %s\n",
@@ -2617,18 +2573,18 @@ long do_tmem_op(tmem_cli_op_t uops)
 
     if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
     {
-        if ( !tmem_write_lock_set )
+        if ( !write_lock_set )
         {
-            tmem_write_lock(&tmem_rwlock);
-            tmem_write_lock_set = 1;
+            write_lock(&tmem_rwlock);
+            write_lock_set = 1;
         }
     }
     else
     {
-        if ( !tmem_write_lock_set )
+        if ( !write_lock_set )
         {
-            tmem_read_lock(&tmem_rwlock);
-            tmem_read_lock_set = 1;
+            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) )
@@ -2680,20 +2636,12 @@ long do_tmem_op(tmem_cli_op_t uops)
 out:
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( tmem_lock_all )
-    {
-        if ( tmem_lock_all > 1 )
-            spin_unlock_irq(&tmem_spinlock);
-        else
-            spin_unlock(&tmem_spinlock);
-    } else {
-        if ( tmem_write_lock_set )
-            write_unlock(&tmem_rwlock);
-        else if ( tmem_read_lock_set )
-            read_unlock(&tmem_rwlock);
-        else 
-            ASSERT(0);
-    }
+    if ( write_lock_set )
+        write_unlock(&tmem_rwlock);
+    else if ( read_lock_set )
+        read_unlock(&tmem_rwlock);
+    else 
+        ASSERT(0);
 
     return rc;
 }
@@ -2712,38 +2660,26 @@ void tmem_destroy(void *v)
         return;
     }
 
-    if ( tmem_lock_all )
-        spin_lock(&tmem_spinlock);
-    else
-        write_lock(&tmem_rwlock);
+    write_lock(&tmem_rwlock);
 
     printk("tmem: flushing tmem pools for %s=%d\n",
            tmem_cli_id_str, client->cli_id);
     client_flush(client, 1);
 
-    if ( tmem_lock_all )
-        spin_unlock(&tmem_spinlock);
-    else
-        write_unlock(&tmem_rwlock);
+    write_unlock(&tmem_rwlock);
 }
 
 /* freezing all pools guarantees that no additional memory will be consumed */
 void tmem_freeze_all(unsigned char key)
 {
     static int freeze = 0;
- 
-    if ( tmem_lock_all )
-        spin_lock(&tmem_spinlock);
-    else
-        write_lock(&tmem_rwlock);
+
+    write_lock(&tmem_rwlock);
 
     freeze = !freeze;
     tmemc_freeze_pools(TMEM_CLI_ID_NULL,freeze);
 
-    if ( tmem_lock_all )
-        spin_unlock(&tmem_spinlock);
-    else
-        write_unlock(&tmem_rwlock);
+    write_unlock(&tmem_rwlock);
 }
 
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
@@ -2766,12 +2702,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     }
 
     if ( tmem_called_from_tmem(memflags) )
-    {
-        if ( tmem_lock_all )
-            spin_lock(&tmem_spinlock);
-        else
-            read_lock(&tmem_rwlock);
-    }
+        read_lock(&tmem_rwlock);
 
     while ( (pfp = tmem_alloc_page(NULL,1)) == NULL )
     {
@@ -2789,12 +2720,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     }
 
     if ( tmem_called_from_tmem(memflags) )
-    {
-        if ( tmem_lock_all )
-            spin_unlock(&tmem_spinlock);
-        else
-            read_unlock(&tmem_rwlock);
-    }
+        read_unlock(&tmem_rwlock);
 
     return pfp;
 }
@@ -2820,9 +2746,8 @@ static int __init init_tmem(void)
 
     if ( tmem_init() )
     {
-        printk("tmem: initialized comp=%d dedup=%d tze=%d global-lock=%d\n",
-            tmem_compression_enabled(), tmem_dedup_enabled(), tmem_tze_enabled(),
-            tmem_lock_all);
+        printk("tmem: initialized comp=%d dedup=%d tze=%d\n",
+            tmem_compression_enabled(), tmem_dedup_enabled(), tmem_tze_enabled());
         if ( tmem_dedup_enabled()&&tmem_compression_enabled()&&tmem_tze_enabled() )
         {
             tmem_tze_disable();
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index fbd1acc..bc8e249 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -29,9 +29,6 @@ boolean_param("tmem_tze", opt_tmem_tze);
 bool_t __read_mostly opt_tmem_shared_auth = 0;
 boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
 
-int __read_mostly opt_tmem_lock = 0;
-integer_param("tmem_lock", opt_tmem_lock);
-
 atomic_t freeable_page_count = ATOMIC_INIT(0);
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index d842374..0628ef4 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -34,11 +34,6 @@ extern spinlock_t tmem_page_list_lock;
 extern unsigned long tmem_page_list_pages;
 extern atomic_t freeable_page_count;
 
-extern spinlock_t tmem_lock;
-extern spinlock_t tmem_spinlock;
-extern rwlock_t tmem_rwlock;
-
-extern void tmem_copy_page(char *to, char*from);
 extern int tmem_init(void);
 #define tmem_hash hash_long
 
@@ -77,8 +72,6 @@ static inline bool_t tmem_enabled(void)
     return opt_tmem;
 }
 
-extern int opt_tmem_lock;
-
 /*
  * Memory free page list management
  */
@@ -182,7 +175,6 @@ static inline unsigned long tmem_free_mb(void)
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
 }
 
-#define tmem_lock_all  opt_tmem_lock
 #define tmem_called_from_tmem(_memflags) (_memflags & MEMF_tmem)
 
 /*  "Client" (==domain) abstraction */
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:23:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1CmF-0004lT-3G; Thu, 09 Jan 2014 10:23: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 1W1CmD-0004jd-3F
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:49 +0000
Received: from [193.109.254.147:22612] by server-7.bemta-14.messagelabs.com id
	E7/7F-15500-4B87EC25; Thu, 09 Jan 2014 10:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389263026!7516773!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 870 invoked from network); 9 Jan 2014 10:23:46 -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 Jan 2014 10:23: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 1W1Cm9-0000yP-QP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cm9-00025r-PS
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:45 +0000
Date: Thu, 09 Jan 2014 10:23:45 +0000
Message-Id: <E1W1Cm9-00025r-PS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: refactor the alloc/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 804ff77a93e5207fe12271d16fae81d17c5c72f5
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:09 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: refactor the alloc/free path
    
    There are two allocate path for each persistant and ephemeral pool.
    
    This path try to refactor those allocate/free functions with better name and
    more readable call layer. Also added more comment.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  114 +++++++++++++++++++++++++++++++++++++------
 xen/common/tmem_xen.c      |   63 ------------------------
 xen/include/xen/tmem_xen.h |   20 ++------
 3 files changed, 102 insertions(+), 95 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index d072d8c..07d62d7 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -206,6 +206,13 @@ static bool_t global_shared_auth = 0;
 static atomic_t client_weight_total = ATOMIC_INIT(0);
 static int tmem_initialized = 0;
 
+struct xmem_pool *tmem_mempool = 0;
+unsigned int tmem_mempool_maxalloc = 0;
+
+DEFINE_SPINLOCK(tmem_page_list_lock);
+PAGE_LIST_HEAD(tmem_page_list);
+unsigned long tmem_page_list_pages = 0;
+
 DEFINE_RWLOCK(tmem_rwlock);
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
@@ -233,7 +240,29 @@ static atomic_t global_rtree_node_count = ATOMIC_INIT(0);
 } while (0)
 
 
-/************ MEMORY ALLOCATION INTERFACE *****************************/
+/*
+ * There two types of memory allocation interfaces in tmem.
+ * One is based on xmem_pool and the other is used for allocate a whole page.
+ * Both of them are based on the lowlevel function __tmem_alloc_page/_thispool().
+ * The call trace of alloc path is like below.
+ * Persistant pool:
+ *     1.tmem_malloc()
+ *         > xmem_pool_alloc()
+ *             > tmem_persistent_pool_page_get()
+ *                 > __tmem_alloc_page_thispool()
+ *     2.tmem_alloc_page()
+ *         > __tmem_alloc_page_thispool()
+ *
+ * Ephemeral pool:
+ *     1.tmem_malloc()
+ *         > xmem_pool_alloc()
+ *             > tmem_mempool_page_get()
+ *                 > __tmem_alloc_page()
+ *     2.tmem_alloc_page()
+ *         > __tmem_alloc_page()
+ *
+ * The free path is done in the same manner.
+ */
 static void *tmem_malloc(size_t size, struct tmem_pool *pool)
 {
     void *v = NULL;
@@ -267,14 +296,14 @@ static void tmem_free(void *p, struct tmem_pool *pool)
     }
 }
 
-static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
+static struct page_info *tmem_alloc_page(struct tmem_pool *pool)
 {
     struct page_info *pfp = NULL;
 
     if ( pool != NULL && is_persistent(pool) )
-        pfp = tmem_alloc_page_thispool(pool->client->domain);
+        pfp = __tmem_alloc_page_thispool(pool->client->domain);
     else
-        pfp = tmem_alloc_page(pool,0);
+        pfp = __tmem_alloc_page(pool,0);
     if ( pfp == NULL )
         alloc_page_failed++;
     else
@@ -282,18 +311,68 @@ static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
     return pfp;
 }
 
-static void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
+static void tmem_free_page(struct tmem_pool *pool, struct page_info *pfp)
 {
     ASSERT(pfp);
     if ( pool == NULL || !is_persistent(pool) )
-        tmem_free_page(pfp);
+        __tmem_free_page(pfp);
     else
-        tmem_free_page_thispool(pfp);
+        __tmem_free_page_thispool(pfp);
     atomic_dec_and_assert(global_page_count);
 }
 
-/************ PAGE CONTENT DESCRIPTOR MANIPULATION ROUTINES ***********/
+static noinline void *tmem_mempool_page_get(unsigned long size)
+{
+    struct page_info *pi;
 
+    ASSERT(size == PAGE_SIZE);
+    if ( (pi = __tmem_alloc_page(NULL,0)) == NULL )
+        return NULL;
+    ASSERT(IS_VALID_PAGE(pi));
+    return page_to_virt(pi);
+}
+
+static void tmem_mempool_page_put(void *page_va)
+{
+    ASSERT(IS_PAGE_ALIGNED(page_va));
+    __tmem_free_page(virt_to_page(page_va));
+}
+
+static int __init tmem_mempool_init(void)
+{
+    tmem_mempool = xmem_pool_create("tmem", tmem_mempool_page_get,
+        tmem_mempool_page_put, PAGE_SIZE, 0, PAGE_SIZE);
+    if ( tmem_mempool )
+        tmem_mempool_maxalloc = xmem_pool_maxalloc(tmem_mempool);
+    return tmem_mempool != NULL;
+}
+
+/* persistent pools are per-domain */
+static void *tmem_persistent_pool_page_get(unsigned long size)
+{
+    struct page_info *pi;
+    struct domain *d = current->domain;
+
+    ASSERT(size == PAGE_SIZE);
+    if ( (pi = __tmem_alloc_page_thispool(d)) == NULL )
+        return NULL;
+    ASSERT(IS_VALID_PAGE(pi));
+    return page_to_virt(pi);
+}
+
+static void tmem_persistent_pool_page_put(void *page_va)
+{
+    struct page_info *pi;
+
+    ASSERT(IS_PAGE_ALIGNED(page_va));
+    pi = mfn_to_page(virt_to_mfn(page_va));
+    ASSERT(IS_VALID_PAGE(pi));
+    __tmem_free_page_thispool(pi);
+}
+
+/*
+ * Page content descriptor manipulation routines
+ */
 #define NOT_SHAREABLE ((uint16_t)-1UL)
 
 static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
@@ -376,7 +455,7 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
             pcd_tot_tze_size -= PAGE_SIZE;
         if ( tmem_compression_enabled() )
             pcd_tot_csize -= PAGE_SIZE;
-        tmem_page_free(pool,pfp);
+        tmem_free_page(pool,pfp);
     }
     write_unlock(&pcd_tree_rwlocks[firstbyte]);
 }
@@ -455,7 +534,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
             /* match! if not compressed, free the no-longer-needed page */
             /* but if compressed, data is assumed static so don't free! */
             if ( cdata == NULL )
-                tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+                tmem_free_page(pgp->us.obj->pool,pgp->pfp);
             deduped_puts++;
             goto match;
         }
@@ -492,7 +571,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
         tmem_tze_copy_from_pfp(pcd->tze,pgp->pfp,pfp_size);
         pcd->size = pfp_size;
         pcd_tot_tze_size += pfp_size;
-        tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+        tmem_free_page(pgp->us.obj->pool,pgp->pfp);
     } else {
         pcd->pfp = pgp->pfp;
         pcd->size = PAGE_SIZE;
@@ -566,7 +645,7 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     else if ( pgp_size )
         tmem_free(pgp->cdata, pool);
     else
-        tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+        tmem_free_page(pgp->us.obj->pool,pgp->pfp);
     if ( pool != NULL && pgp_size )
     {
         pool->client->compressed_pages--;
@@ -1369,7 +1448,7 @@ static int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn
     ret = tmem_compress_from_client(cmfn, &dst, &size, clibuf);
     if ( ret <= 0 )
         goto out;
-    else if ( (size == 0) || (size >= tmem_subpage_maxsize()) ) {
+    else if ( (size == 0) || (size >= tmem_mempool_maxalloc) ) {
         ret = 0;
         goto out;
     } else if ( tmem_dedup_enabled() && !is_persistent(pgp->us.obj->pool) ) {
@@ -1428,7 +1507,7 @@ static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
 copy_uncompressed:
     if ( pgp->pfp )
         pgp_free_data(pgp, pool);
-    if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
+    if ( ( pgp->pfp = tmem_alloc_page(pool) ) == NULL )
         goto failed_dup;
     pgp->size = 0;
     ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_cli_buf_null);
@@ -1551,7 +1630,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     }
 
 copy_uncompressed:
-    if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
+    if ( ( pgp->pfp = tmem_alloc_page(pool) ) == NULL )
     {
         ret = -ENOMEM;
         goto del_pgp_from_obj;
@@ -2704,7 +2783,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     if ( tmem_called_from_tmem(memflags) )
         read_lock(&tmem_rwlock);
 
-    while ( (pfp = tmem_alloc_page(NULL,1)) == NULL )
+    while ( (pfp = __tmem_alloc_page(NULL,1)) == NULL )
     {
         if ( (max_evictions-- <= 0) || !tmem_evict())
             break;
@@ -2744,6 +2823,9 @@ static int __init init_tmem(void)
             rwlock_init(&pcd_tree_rwlocks[i]);
         }
 
+    if ( !tmem_mempool_init() )
+        return 0;
+
     if ( tmem_init() )
     {
         printk("tmem: initialized comp=%d dedup=%d tze=%d\n",
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index bc8e249..5ef131b 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -238,67 +238,7 @@ int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
     return 1;
 }
 
-/******************  XEN-SPECIFIC MEMORY ALLOCATION ********************/
-
-struct xmem_pool *tmem_mempool = 0;
-unsigned int tmem_mempool_maxalloc = 0;
-
-DEFINE_SPINLOCK(tmem_page_list_lock);
-PAGE_LIST_HEAD(tmem_page_list);
-unsigned long tmem_page_list_pages = 0;
-
-static noinline void *tmem_mempool_page_get(unsigned long size)
-{
-    struct page_info *pi;
-
-    ASSERT(size == PAGE_SIZE);
-    if ( (pi = tmem_alloc_page(NULL,0)) == NULL )
-        return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
-    return page_to_virt(pi);
-}
-
-static void tmem_mempool_page_put(void *page_va)
-{
-    ASSERT(IS_PAGE_ALIGNED(page_va));
-    tmem_free_page(virt_to_page(page_va));
-}
-
-static int __init tmem_mempool_init(void)
-{
-    tmem_mempool = xmem_pool_create("tmem", tmem_mempool_page_get,
-        tmem_mempool_page_put, PAGE_SIZE, 0, PAGE_SIZE);
-    if ( tmem_mempool )
-        tmem_mempool_maxalloc = xmem_pool_maxalloc(tmem_mempool);
-    return tmem_mempool != NULL;
-}
-
-/* persistent pools are per-domain */
-
-void *tmem_persistent_pool_page_get(unsigned long size)
-{
-    struct page_info *pi;
-    struct domain *d = current->domain;
-
-    ASSERT(size == PAGE_SIZE);
-    if ( (pi = tmem_alloc_page_thispool(d)) == NULL )
-        return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
-    return page_to_virt(pi);
-}
-
-void tmem_persistent_pool_page_put(void *page_va)
-{
-    struct page_info *pi;
-
-    ASSERT(IS_PAGE_ALIGNED(page_va));
-    pi = mfn_to_page(virt_to_mfn(page_va));
-    ASSERT(IS_VALID_PAGE(pi));
-    tmem_free_page_thispool(pi);
-}
-
 /******************  XEN-SPECIFIC HOST INITIALIZATION ********************/
-
 static int dstmem_order, workmem_order;
 
 static int cpu_callback(
@@ -351,9 +291,6 @@ int __init tmem_init(void)
 {
     unsigned int cpu;
 
-    if ( !tmem_mempool_init() )
-        return 0;
-
     dstmem_order = get_order_from_pages(LZO_DSTMEM_PAGES);
     workmem_order = get_order_from_bytes(LZO1X_1_MEM_COMPRESS);
 
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 0628ef4..073fc1b 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -27,8 +27,6 @@ typedef uint32_t pagesize_t;  /* like size_t, must handle largest PAGE_SIZE */
   ((void *)((((unsigned long)addr + (PAGE_SIZE - 1)) & PAGE_MASK)) == addr)
 #define IS_VALID_PAGE(_pi)  ( mfn_valid(page_to_mfn(_pi)) )
 
-extern struct xmem_pool *tmem_mempool;
-extern unsigned int tmem_mempool_maxalloc;
 extern struct page_list_head tmem_page_list;
 extern spinlock_t tmem_page_list_lock;
 extern unsigned long tmem_page_list_pages;
@@ -100,7 +98,7 @@ static inline void tmem_page_list_put(struct page_info *pi)
 /*
  * Memory allocation for persistent data 
  */
-static inline struct page_info *tmem_alloc_page_thispool(struct domain *d)
+static inline struct page_info *__tmem_alloc_page_thispool(struct domain *d)
 {
     struct page_info *pi;
 
@@ -128,7 +126,7 @@ out:
     return pi;
 }
 
-static inline void tmem_free_page_thispool(struct page_info *pi)
+static inline void __tmem_free_page_thispool(struct page_info *pi)
 {
     struct domain *d = page_get_owner(pi);
 
@@ -146,7 +144,7 @@ static inline void tmem_free_page_thispool(struct page_info *pi)
 /*
  * Memory allocation for ephemeral (non-persistent) data
  */
-static inline struct page_info *tmem_alloc_page(void *pool, int no_heap)
+static inline struct page_info *__tmem_alloc_page(void *pool, int no_heap)
 {
     struct page_info *pi = tmem_page_list_get();
 
@@ -158,18 +156,13 @@ static inline struct page_info *tmem_alloc_page(void *pool, int no_heap)
     return pi;
 }
 
-static inline void tmem_free_page(struct page_info *pi)
+static inline void __tmem_free_page(struct page_info *pi)
 {
     ASSERT(IS_VALID_PAGE(pi));
     tmem_page_list_put(pi);
     atomic_dec(&freeable_page_count);
 }
 
-static inline unsigned int tmem_subpage_maxsize(void)
-{
-    return tmem_mempool_maxalloc;
-}
-
 static inline unsigned long tmem_free_mb(void)
 {
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
@@ -375,17 +368,12 @@ static inline void tmem_copy_to_client_buf_offset(tmem_cli_va_param_t clibuf,
 
 int tmem_decompress_to_client(xen_pfn_t, void *, size_t,
 			     tmem_cli_va_param_t);
-
 int tmem_compress_from_client(xen_pfn_t, void **, size_t *,
 			     tmem_cli_va_param_t);
 
 int tmem_copy_from_client(struct page_info *, xen_pfn_t, tmem_cli_va_param_t);
-
 int tmem_copy_to_client(xen_pfn_t, struct page_info *, tmem_cli_va_param_t);
-
 extern int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
-extern void *tmem_persistent_pool_page_get(unsigned long size);
-extern void tmem_persistent_pool_page_put(void *page_va);
 
 #define tmem_client_err(fmt, args...)  printk(XENLOG_G_ERR fmt, ##args)
 #define tmem_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##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 Thu Jan 09 10:23:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:23: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 1W1CmF-0004lT-3G; Thu, 09 Jan 2014 10:23: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 1W1CmD-0004jd-3F
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:49 +0000
Received: from [193.109.254.147:22612] by server-7.bemta-14.messagelabs.com id
	E7/7F-15500-4B87EC25; Thu, 09 Jan 2014 10:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389263026!7516773!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 870 invoked from network); 9 Jan 2014 10:23:46 -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 Jan 2014 10:23: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 1W1Cm9-0000yP-QP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cm9-00025r-PS
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:45 +0000
Date: Thu, 09 Jan 2014 10:23:45 +0000
Message-Id: <E1W1Cm9-00025r-PS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: refactor the alloc/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 804ff77a93e5207fe12271d16fae81d17c5c72f5
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:09 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: refactor the alloc/free path
    
    There are two allocate path for each persistant and ephemeral pool.
    
    This path try to refactor those allocate/free functions with better name and
    more readable call layer. Also added more comment.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |  114 +++++++++++++++++++++++++++++++++++++------
 xen/common/tmem_xen.c      |   63 ------------------------
 xen/include/xen/tmem_xen.h |   20 ++------
 3 files changed, 102 insertions(+), 95 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index d072d8c..07d62d7 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -206,6 +206,13 @@ static bool_t global_shared_auth = 0;
 static atomic_t client_weight_total = ATOMIC_INIT(0);
 static int tmem_initialized = 0;
 
+struct xmem_pool *tmem_mempool = 0;
+unsigned int tmem_mempool_maxalloc = 0;
+
+DEFINE_SPINLOCK(tmem_page_list_lock);
+PAGE_LIST_HEAD(tmem_page_list);
+unsigned long tmem_page_list_pages = 0;
+
 DEFINE_RWLOCK(tmem_rwlock);
 static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
 static DEFINE_SPINLOCK(pers_lists_spinlock);
@@ -233,7 +240,29 @@ static atomic_t global_rtree_node_count = ATOMIC_INIT(0);
 } while (0)
 
 
-/************ MEMORY ALLOCATION INTERFACE *****************************/
+/*
+ * There two types of memory allocation interfaces in tmem.
+ * One is based on xmem_pool and the other is used for allocate a whole page.
+ * Both of them are based on the lowlevel function __tmem_alloc_page/_thispool().
+ * The call trace of alloc path is like below.
+ * Persistant pool:
+ *     1.tmem_malloc()
+ *         > xmem_pool_alloc()
+ *             > tmem_persistent_pool_page_get()
+ *                 > __tmem_alloc_page_thispool()
+ *     2.tmem_alloc_page()
+ *         > __tmem_alloc_page_thispool()
+ *
+ * Ephemeral pool:
+ *     1.tmem_malloc()
+ *         > xmem_pool_alloc()
+ *             > tmem_mempool_page_get()
+ *                 > __tmem_alloc_page()
+ *     2.tmem_alloc_page()
+ *         > __tmem_alloc_page()
+ *
+ * The free path is done in the same manner.
+ */
 static void *tmem_malloc(size_t size, struct tmem_pool *pool)
 {
     void *v = NULL;
@@ -267,14 +296,14 @@ static void tmem_free(void *p, struct tmem_pool *pool)
     }
 }
 
-static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
+static struct page_info *tmem_alloc_page(struct tmem_pool *pool)
 {
     struct page_info *pfp = NULL;
 
     if ( pool != NULL && is_persistent(pool) )
-        pfp = tmem_alloc_page_thispool(pool->client->domain);
+        pfp = __tmem_alloc_page_thispool(pool->client->domain);
     else
-        pfp = tmem_alloc_page(pool,0);
+        pfp = __tmem_alloc_page(pool,0);
     if ( pfp == NULL )
         alloc_page_failed++;
     else
@@ -282,18 +311,68 @@ static struct page_info *tmem_page_alloc(struct tmem_pool *pool)
     return pfp;
 }
 
-static void tmem_page_free(struct tmem_pool *pool, struct page_info *pfp)
+static void tmem_free_page(struct tmem_pool *pool, struct page_info *pfp)
 {
     ASSERT(pfp);
     if ( pool == NULL || !is_persistent(pool) )
-        tmem_free_page(pfp);
+        __tmem_free_page(pfp);
     else
-        tmem_free_page_thispool(pfp);
+        __tmem_free_page_thispool(pfp);
     atomic_dec_and_assert(global_page_count);
 }
 
-/************ PAGE CONTENT DESCRIPTOR MANIPULATION ROUTINES ***********/
+static noinline void *tmem_mempool_page_get(unsigned long size)
+{
+    struct page_info *pi;
 
+    ASSERT(size == PAGE_SIZE);
+    if ( (pi = __tmem_alloc_page(NULL,0)) == NULL )
+        return NULL;
+    ASSERT(IS_VALID_PAGE(pi));
+    return page_to_virt(pi);
+}
+
+static void tmem_mempool_page_put(void *page_va)
+{
+    ASSERT(IS_PAGE_ALIGNED(page_va));
+    __tmem_free_page(virt_to_page(page_va));
+}
+
+static int __init tmem_mempool_init(void)
+{
+    tmem_mempool = xmem_pool_create("tmem", tmem_mempool_page_get,
+        tmem_mempool_page_put, PAGE_SIZE, 0, PAGE_SIZE);
+    if ( tmem_mempool )
+        tmem_mempool_maxalloc = xmem_pool_maxalloc(tmem_mempool);
+    return tmem_mempool != NULL;
+}
+
+/* persistent pools are per-domain */
+static void *tmem_persistent_pool_page_get(unsigned long size)
+{
+    struct page_info *pi;
+    struct domain *d = current->domain;
+
+    ASSERT(size == PAGE_SIZE);
+    if ( (pi = __tmem_alloc_page_thispool(d)) == NULL )
+        return NULL;
+    ASSERT(IS_VALID_PAGE(pi));
+    return page_to_virt(pi);
+}
+
+static void tmem_persistent_pool_page_put(void *page_va)
+{
+    struct page_info *pi;
+
+    ASSERT(IS_PAGE_ALIGNED(page_va));
+    pi = mfn_to_page(virt_to_mfn(page_va));
+    ASSERT(IS_VALID_PAGE(pi));
+    __tmem_free_page_thispool(pi);
+}
+
+/*
+ * Page content descriptor manipulation routines
+ */
 #define NOT_SHAREABLE ((uint16_t)-1UL)
 
 static int pcd_copy_to_client(xen_pfn_t cmfn, struct tmem_page_descriptor *pgp)
@@ -376,7 +455,7 @@ static void pcd_disassociate(struct tmem_page_descriptor *pgp, struct tmem_pool
             pcd_tot_tze_size -= PAGE_SIZE;
         if ( tmem_compression_enabled() )
             pcd_tot_csize -= PAGE_SIZE;
-        tmem_page_free(pool,pfp);
+        tmem_free_page(pool,pfp);
     }
     write_unlock(&pcd_tree_rwlocks[firstbyte]);
 }
@@ -455,7 +534,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
             /* match! if not compressed, free the no-longer-needed page */
             /* but if compressed, data is assumed static so don't free! */
             if ( cdata == NULL )
-                tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+                tmem_free_page(pgp->us.obj->pool,pgp->pfp);
             deduped_puts++;
             goto match;
         }
@@ -492,7 +571,7 @@ static int pcd_associate(struct tmem_page_descriptor *pgp, char *cdata, pagesize
         tmem_tze_copy_from_pfp(pcd->tze,pgp->pfp,pfp_size);
         pcd->size = pfp_size;
         pcd_tot_tze_size += pfp_size;
-        tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+        tmem_free_page(pgp->us.obj->pool,pgp->pfp);
     } else {
         pcd->pfp = pgp->pfp;
         pcd->size = PAGE_SIZE;
@@ -566,7 +645,7 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     else if ( pgp_size )
         tmem_free(pgp->cdata, pool);
     else
-        tmem_page_free(pgp->us.obj->pool,pgp->pfp);
+        tmem_free_page(pgp->us.obj->pool,pgp->pfp);
     if ( pool != NULL && pgp_size )
     {
         pool->client->compressed_pages--;
@@ -1369,7 +1448,7 @@ static int do_tmem_put_compress(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn
     ret = tmem_compress_from_client(cmfn, &dst, &size, clibuf);
     if ( ret <= 0 )
         goto out;
-    else if ( (size == 0) || (size >= tmem_subpage_maxsize()) ) {
+    else if ( (size == 0) || (size >= tmem_mempool_maxalloc) ) {
         ret = 0;
         goto out;
     } else if ( tmem_dedup_enabled() && !is_persistent(pgp->us.obj->pool) ) {
@@ -1428,7 +1507,7 @@ static int do_tmem_dup_put(struct tmem_page_descriptor *pgp, xen_pfn_t cmfn,
 copy_uncompressed:
     if ( pgp->pfp )
         pgp_free_data(pgp, pool);
-    if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
+    if ( ( pgp->pfp = tmem_alloc_page(pool) ) == NULL )
         goto failed_dup;
     pgp->size = 0;
     ret = tmem_copy_from_client(pgp->pfp, cmfn, tmem_cli_buf_null);
@@ -1551,7 +1630,7 @@ static int do_tmem_put(struct tmem_pool *pool,
     }
 
 copy_uncompressed:
-    if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
+    if ( ( pgp->pfp = tmem_alloc_page(pool) ) == NULL )
     {
         ret = -ENOMEM;
         goto del_pgp_from_obj;
@@ -2704,7 +2783,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
     if ( tmem_called_from_tmem(memflags) )
         read_lock(&tmem_rwlock);
 
-    while ( (pfp = tmem_alloc_page(NULL,1)) == NULL )
+    while ( (pfp = __tmem_alloc_page(NULL,1)) == NULL )
     {
         if ( (max_evictions-- <= 0) || !tmem_evict())
             break;
@@ -2744,6 +2823,9 @@ static int __init init_tmem(void)
             rwlock_init(&pcd_tree_rwlocks[i]);
         }
 
+    if ( !tmem_mempool_init() )
+        return 0;
+
     if ( tmem_init() )
     {
         printk("tmem: initialized comp=%d dedup=%d tze=%d\n",
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index bc8e249..5ef131b 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -238,67 +238,7 @@ int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
     return 1;
 }
 
-/******************  XEN-SPECIFIC MEMORY ALLOCATION ********************/
-
-struct xmem_pool *tmem_mempool = 0;
-unsigned int tmem_mempool_maxalloc = 0;
-
-DEFINE_SPINLOCK(tmem_page_list_lock);
-PAGE_LIST_HEAD(tmem_page_list);
-unsigned long tmem_page_list_pages = 0;
-
-static noinline void *tmem_mempool_page_get(unsigned long size)
-{
-    struct page_info *pi;
-
-    ASSERT(size == PAGE_SIZE);
-    if ( (pi = tmem_alloc_page(NULL,0)) == NULL )
-        return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
-    return page_to_virt(pi);
-}
-
-static void tmem_mempool_page_put(void *page_va)
-{
-    ASSERT(IS_PAGE_ALIGNED(page_va));
-    tmem_free_page(virt_to_page(page_va));
-}
-
-static int __init tmem_mempool_init(void)
-{
-    tmem_mempool = xmem_pool_create("tmem", tmem_mempool_page_get,
-        tmem_mempool_page_put, PAGE_SIZE, 0, PAGE_SIZE);
-    if ( tmem_mempool )
-        tmem_mempool_maxalloc = xmem_pool_maxalloc(tmem_mempool);
-    return tmem_mempool != NULL;
-}
-
-/* persistent pools are per-domain */
-
-void *tmem_persistent_pool_page_get(unsigned long size)
-{
-    struct page_info *pi;
-    struct domain *d = current->domain;
-
-    ASSERT(size == PAGE_SIZE);
-    if ( (pi = tmem_alloc_page_thispool(d)) == NULL )
-        return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
-    return page_to_virt(pi);
-}
-
-void tmem_persistent_pool_page_put(void *page_va)
-{
-    struct page_info *pi;
-
-    ASSERT(IS_PAGE_ALIGNED(page_va));
-    pi = mfn_to_page(virt_to_mfn(page_va));
-    ASSERT(IS_VALID_PAGE(pi));
-    tmem_free_page_thispool(pi);
-}
-
 /******************  XEN-SPECIFIC HOST INITIALIZATION ********************/
-
 static int dstmem_order, workmem_order;
 
 static int cpu_callback(
@@ -351,9 +291,6 @@ int __init tmem_init(void)
 {
     unsigned int cpu;
 
-    if ( !tmem_mempool_init() )
-        return 0;
-
     dstmem_order = get_order_from_pages(LZO_DSTMEM_PAGES);
     workmem_order = get_order_from_bytes(LZO1X_1_MEM_COMPRESS);
 
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 0628ef4..073fc1b 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -27,8 +27,6 @@ typedef uint32_t pagesize_t;  /* like size_t, must handle largest PAGE_SIZE */
   ((void *)((((unsigned long)addr + (PAGE_SIZE - 1)) & PAGE_MASK)) == addr)
 #define IS_VALID_PAGE(_pi)  ( mfn_valid(page_to_mfn(_pi)) )
 
-extern struct xmem_pool *tmem_mempool;
-extern unsigned int tmem_mempool_maxalloc;
 extern struct page_list_head tmem_page_list;
 extern spinlock_t tmem_page_list_lock;
 extern unsigned long tmem_page_list_pages;
@@ -100,7 +98,7 @@ static inline void tmem_page_list_put(struct page_info *pi)
 /*
  * Memory allocation for persistent data 
  */
-static inline struct page_info *tmem_alloc_page_thispool(struct domain *d)
+static inline struct page_info *__tmem_alloc_page_thispool(struct domain *d)
 {
     struct page_info *pi;
 
@@ -128,7 +126,7 @@ out:
     return pi;
 }
 
-static inline void tmem_free_page_thispool(struct page_info *pi)
+static inline void __tmem_free_page_thispool(struct page_info *pi)
 {
     struct domain *d = page_get_owner(pi);
 
@@ -146,7 +144,7 @@ static inline void tmem_free_page_thispool(struct page_info *pi)
 /*
  * Memory allocation for ephemeral (non-persistent) data
  */
-static inline struct page_info *tmem_alloc_page(void *pool, int no_heap)
+static inline struct page_info *__tmem_alloc_page(void *pool, int no_heap)
 {
     struct page_info *pi = tmem_page_list_get();
 
@@ -158,18 +156,13 @@ static inline struct page_info *tmem_alloc_page(void *pool, int no_heap)
     return pi;
 }
 
-static inline void tmem_free_page(struct page_info *pi)
+static inline void __tmem_free_page(struct page_info *pi)
 {
     ASSERT(IS_VALID_PAGE(pi));
     tmem_page_list_put(pi);
     atomic_dec(&freeable_page_count);
 }
 
-static inline unsigned int tmem_subpage_maxsize(void)
-{
-    return tmem_mempool_maxalloc;
-}
-
 static inline unsigned long tmem_free_mb(void)
 {
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
@@ -375,17 +368,12 @@ static inline void tmem_copy_to_client_buf_offset(tmem_cli_va_param_t clibuf,
 
 int tmem_decompress_to_client(xen_pfn_t, void *, size_t,
 			     tmem_cli_va_param_t);
-
 int tmem_compress_from_client(xen_pfn_t, void **, size_t *,
 			     tmem_cli_va_param_t);
 
 int tmem_copy_from_client(struct page_info *, xen_pfn_t, tmem_cli_va_param_t);
-
 int tmem_copy_to_client(xen_pfn_t, struct page_info *, tmem_cli_va_param_t);
-
 extern int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
-extern void *tmem_persistent_pool_page_get(unsigned long size);
-extern void tmem_persistent_pool_page_put(void *page_va);
 
 #define tmem_client_err(fmt, args...)  printk(XENLOG_G_ERR fmt, ##args)
 #define tmem_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##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 Thu Jan 09 10:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1CmO-0004nC-6H; Thu, 09 Jan 2014 10:24:00 +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 1W1CmN-0004mw-5m
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:59 +0000
Received: from [85.158.139.211:58449] by server-4.bemta-5.messagelabs.com id
	EC/AC-26791-EB87EC25; Thu, 09 Jan 2014 10:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1389263036!8750534!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25970 invoked from network); 9 Jan 2014 10:23:57 -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;
	9 Jan 2014 10: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 1W1CmJ-0000yY-VN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CmJ-00026x-Td
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:55 +0000
Date: Thu, 09 Jan 2014 10:23:55 +0000
Message-Id: <E1W1CmJ-00026x-Td@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: __tmem_alloc_page: drop
	unneed parameters
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cace8e75b0bc67c72658cc4cc272482bd27582d9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:10 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: __tmem_alloc_page: drop unneed parameters
    
    The two parameters of __tmem_alloc_page() can be reduced.
    tmem_called_from_tmem() was also dropped by this patch.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   11 +++++------
 xen/include/xen/tmem_xen.h |   11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 07d62d7..5bf5f04 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -303,7 +303,7 @@ static struct page_info *tmem_alloc_page(struct tmem_pool *pool)
     if ( pool != NULL && is_persistent(pool) )
         pfp = __tmem_alloc_page_thispool(pool->client->domain);
     else
-        pfp = __tmem_alloc_page(pool,0);
+        pfp = __tmem_alloc_page();
     if ( pfp == NULL )
         alloc_page_failed++;
     else
@@ -326,9 +326,8 @@ static noinline void *tmem_mempool_page_get(unsigned long size)
     struct page_info *pi;
 
     ASSERT(size == PAGE_SIZE);
-    if ( (pi = __tmem_alloc_page(NULL,0)) == NULL )
+    if ( (pi = __tmem_alloc_page()) == NULL )
         return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
     return page_to_virt(pi);
 }
 
@@ -2780,10 +2779,10 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
         return NULL;
     }
 
-    if ( tmem_called_from_tmem(memflags) )
+    if ( memflags & MEMF_tmem )
         read_lock(&tmem_rwlock);
 
-    while ( (pfp = __tmem_alloc_page(NULL,1)) == NULL )
+    while ( (pfp = tmem_page_list_get()) == NULL )
     {
         if ( (max_evictions-- <= 0) || !tmem_evict())
             break;
@@ -2798,7 +2797,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
         relinq_pgs++;
     }
 
-    if ( tmem_called_from_tmem(memflags) )
+    if ( memflags & MEMF_tmem )
         read_unlock(&tmem_rwlock);
 
     return pfp;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 073fc1b..9cfa73f 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -144,15 +144,16 @@ static inline void __tmem_free_page_thispool(struct page_info *pi)
 /*
  * Memory allocation for ephemeral (non-persistent) data
  */
-static inline struct page_info *__tmem_alloc_page(void *pool, int no_heap)
+static inline struct page_info *__tmem_alloc_page(void)
 {
     struct page_info *pi = tmem_page_list_get();
 
-    if ( pi == NULL && !no_heap )
+    if ( pi == NULL)
         pi = alloc_domheap_pages(0,0,MEMF_tmem);
-    ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
-    if ( pi != NULL && !no_heap )
+
+    if ( pi )
         atomic_inc(&freeable_page_count);
+    ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
     return pi;
 }
 
@@ -168,8 +169,6 @@ static inline unsigned long tmem_free_mb(void)
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
 }
 
-#define tmem_called_from_tmem(_memflags) (_memflags & MEMF_tmem)
-
 /*  "Client" (==domain) abstraction */
 
 struct 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 Thu Jan 09 10:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1CmO-0004nC-6H; Thu, 09 Jan 2014 10:24:00 +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 1W1CmN-0004mw-5m
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:59 +0000
Received: from [85.158.139.211:58449] by server-4.bemta-5.messagelabs.com id
	EC/AC-26791-EB87EC25; Thu, 09 Jan 2014 10:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1389263036!8750534!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25970 invoked from network); 9 Jan 2014 10:23:57 -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;
	9 Jan 2014 10: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 1W1CmJ-0000yY-VN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CmJ-00026x-Td
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:23:55 +0000
Date: Thu, 09 Jan 2014 10:23:55 +0000
Message-Id: <E1W1CmJ-00026x-Td@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: __tmem_alloc_page: drop
	unneed parameters
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cace8e75b0bc67c72658cc4cc272482bd27582d9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:10 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:53:58 2014 +0100

    tmem: cleanup: __tmem_alloc_page: drop unneed parameters
    
    The two parameters of __tmem_alloc_page() can be reduced.
    tmem_called_from_tmem() was also dropped by this patch.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   11 +++++------
 xen/include/xen/tmem_xen.h |   11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 07d62d7..5bf5f04 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -303,7 +303,7 @@ static struct page_info *tmem_alloc_page(struct tmem_pool *pool)
     if ( pool != NULL && is_persistent(pool) )
         pfp = __tmem_alloc_page_thispool(pool->client->domain);
     else
-        pfp = __tmem_alloc_page(pool,0);
+        pfp = __tmem_alloc_page();
     if ( pfp == NULL )
         alloc_page_failed++;
     else
@@ -326,9 +326,8 @@ static noinline void *tmem_mempool_page_get(unsigned long size)
     struct page_info *pi;
 
     ASSERT(size == PAGE_SIZE);
-    if ( (pi = __tmem_alloc_page(NULL,0)) == NULL )
+    if ( (pi = __tmem_alloc_page()) == NULL )
         return NULL;
-    ASSERT(IS_VALID_PAGE(pi));
     return page_to_virt(pi);
 }
 
@@ -2780,10 +2779,10 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
         return NULL;
     }
 
-    if ( tmem_called_from_tmem(memflags) )
+    if ( memflags & MEMF_tmem )
         read_lock(&tmem_rwlock);
 
-    while ( (pfp = __tmem_alloc_page(NULL,1)) == NULL )
+    while ( (pfp = tmem_page_list_get()) == NULL )
     {
         if ( (max_evictions-- <= 0) || !tmem_evict())
             break;
@@ -2798,7 +2797,7 @@ void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
         relinq_pgs++;
     }
 
-    if ( tmem_called_from_tmem(memflags) )
+    if ( memflags & MEMF_tmem )
         read_unlock(&tmem_rwlock);
 
     return pfp;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 073fc1b..9cfa73f 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -144,15 +144,16 @@ static inline void __tmem_free_page_thispool(struct page_info *pi)
 /*
  * Memory allocation for ephemeral (non-persistent) data
  */
-static inline struct page_info *__tmem_alloc_page(void *pool, int no_heap)
+static inline struct page_info *__tmem_alloc_page(void)
 {
     struct page_info *pi = tmem_page_list_get();
 
-    if ( pi == NULL && !no_heap )
+    if ( pi == NULL)
         pi = alloc_domheap_pages(0,0,MEMF_tmem);
-    ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
-    if ( pi != NULL && !no_heap )
+
+    if ( pi )
         atomic_inc(&freeable_page_count);
+    ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
     return pi;
 }
 
@@ -168,8 +169,6 @@ static inline unsigned long tmem_free_mb(void)
     return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
 }
 
-#define tmem_called_from_tmem(_memflags) (_memflags & MEMF_tmem)
-
 /*  "Client" (==domain) abstraction */
 
 struct 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 Thu Jan 09 10:24:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1Cma-0004ou-9K; Thu, 09 Jan 2014 10:24:12 +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 1W1CmY-0004oZ-FR
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:10 +0000
Received: from [85.158.137.68:38091] by server-16.bemta-3.messagelabs.com id
	0A/63-26128-8C87EC25; Thu, 09 Jan 2014 10:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389263046!8145528!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30103 invoked from network); 9 Jan 2014 10:24:07 -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;
	9 Jan 2014 10: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 1W1CmU-0000z7-48
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CmU-00027c-2Z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:06 +0000
Date: Thu, 09 Jan 2014 10:24:06 +0000
Message-Id: <E1W1CmU-00027c-2Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless functions
	from header file
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f7b92a1a9545ad83788c5305deb723ac075e47ff
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:11 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:54:18 2014 +0100

    tmem: cleanup: drop useless functions from header file
    
    They are several one line functions in tmem_xen.h which are useless, this patch
    embeded them into tmem.c directly.
    Also modify void *tmem in struct domain to struct client *tmem_client in order
    to make things more straightforward.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domain.c        |    4 ++--
 xen/common/tmem.c          |   24 ++++++++++++------------
 xen/include/xen/sched.h    |    2 +-
 xen/include/xen/tmem_xen.h |   30 +-----------------------------
 4 files changed, 16 insertions(+), 44 deletions(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 2cbc489..2636fc9 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -528,9 +528,9 @@ int domain_kill(struct domain *d)
         spin_barrier(&d->domain_lock);
         evtchn_destroy(d);
         gnttab_release_mappings(d);
-        tmem_destroy(d->tmem);
+        tmem_destroy(d->tmem_client);
         domain_set_outstanding_pages(d, 0);
-        d->tmem = NULL;
+        d->tmem_client = NULL;
         /* fallthrough */
     case DOMDYING_dying:
         rc = domain_relinquish_resources(d);
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 5bf5f04..2659651 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1206,7 +1206,7 @@ static struct client *client_create(domid_t cli_id)
         goto fail;
     }
     if ( !d->is_dying ) {
-        d->tmem = client;
+        d->tmem_client = client;
 	client->domain = d;
     }
     rcu_unlock_domain(d);
@@ -1324,7 +1324,7 @@ obj_unlock:
 
 static int tmem_evict(void)
 {
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_page_descriptor *pgp = NULL, *pgp2, *pgp_del;
     struct tmem_object_root *obj;
     struct tmem_pool *pool;
@@ -1761,7 +1761,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             list_del(&pgp->us.client_eph_pages);
             list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list);
             spin_unlock(&eph_lists_spinlock);
-            obj->last_client = tmem_get_cli_id_from_current();
+            obj->last_client = current->domain->domain_id;
         }
     }
     if ( obj != NULL )
@@ -1836,7 +1836,7 @@ out:
 
 static int do_tmem_destroy_pool(uint32_t pool_id)
 {
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool;
 
     if ( client->pools == NULL )
@@ -1867,7 +1867,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     int i;
 
     if ( this_cli_id == TMEM_CLI_ID_NULL )
-        cli_id = tmem_get_cli_id_from_current();
+        cli_id = current->domain->domain_id;
     else
         cli_id = this_cli_id;
     tmem_client_info("tmem: allocating %s-%s tmem pool for %s=%d...",
@@ -1908,7 +1908,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     }
     else
     {
-        client = tmem_client_from_current();
+        client = current->domain->tmem_client;
         ASSERT(client != NULL);
         for ( d_poolid = 0; d_poolid < MAX_POOLS_PER_DOMAIN; d_poolid++ )
             if ( client->pools[d_poolid] == NULL )
@@ -2511,7 +2511,7 @@ static int do_tmem_control(struct tmem_op *op)
     uint32_t subop = op->u.ctrl.subop;
     struct oid *oidp = (struct oid *)(&op->u.ctrl.oid[0]);
 
-    if (!tmem_current_is_privileged())
+    if ( xsm_tmem_control(XSM_PRIV) )
         return -EPERM;
 
     switch(subop)
@@ -2583,7 +2583,7 @@ static int do_tmem_control(struct tmem_op *op)
 long do_tmem_op(tmem_cli_op_t uops)
 {
     struct tmem_op op;
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool = NULL;
     struct oid *oidp;
     int rc = 0;
@@ -2595,12 +2595,12 @@ long do_tmem_op(tmem_cli_op_t uops)
     if ( !tmem_initialized )
         return -ENODEV;
 
-    if ( !tmem_current_permitted() )
+    if ( xsm_tmem_op(XSM_HOOK) )
         return -EPERM;
 
     total_tmem_ops++;
 
-    if ( client != NULL && tmem_client_is_dying(client) )
+    if ( client != NULL && client->domain->is_dying )
     {
         rc = -ENODEV;
  simple_error:
@@ -2640,7 +2640,7 @@ long do_tmem_op(tmem_cli_op_t uops)
     {
         write_lock(&tmem_rwlock);
         write_lock_set = 1;
-        if ( (client = client_create(tmem_get_cli_id_from_current())) == NULL )
+        if ( (client = client_create(current->domain->domain_id)) == NULL )
         {
             tmem_client_err("tmem: can't create tmem structure for %s\n",
                            tmem_client_str);
@@ -2732,7 +2732,7 @@ void tmem_destroy(void *v)
     if ( client == NULL )
         return;
 
-    if ( !tmem_client_is_dying(client) )
+    if ( !client->domain->is_dying )
     {
         printk("tmem: tmem_destroy can only destroy dying client\n");
         return;
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 7bcac31..fb8bd36 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -402,7 +402,7 @@ struct domain
     spinlock_t hypercall_deadlock_mutex;
 
     /* transcendent memory, auto-allocated on first tmem op by each domain */
-    void *tmem;
+    struct client *tmem_client;
 
     struct lock_profile_qhead profile_head;
 
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 9cfa73f..11f4c2d 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -171,45 +171,17 @@ static inline unsigned long tmem_free_mb(void)
 
 /*  "Client" (==domain) abstraction */
 
-struct client;
 static inline struct client *tmem_client_from_cli_id(domid_t cli_id)
 {
     struct client *c;
     struct domain *d = rcu_lock_domain_by_id(cli_id);
     if (d == NULL)
         return NULL;
-    c = (struct client *)(d->tmem);
+    c = d->tmem_client;
     rcu_unlock_domain(d);
     return c;
 }
 
-static inline struct client *tmem_client_from_current(void)
-{
-    return (struct client *)(current->domain->tmem);
-}
-
-#define tmem_client_is_dying(_client) (!!_client->domain->is_dying)
-
-static inline domid_t tmem_get_cli_id_from_current(void)
-{
-    return current->domain->domain_id;
-}
-
-static inline struct domain *tmem_get_cli_ptr_from_current(void)
-{
-    return current->domain;
-}
-
-static inline bool_t tmem_current_permitted(void)
-{
-    return !xsm_tmem_op(XSM_HOOK);
-}
-
-static inline bool_t tmem_current_is_privileged(void)
-{
-    return !xsm_tmem_control(XSM_PRIV);
-}
-
 static inline uint8_t tmem_get_first_byte(struct page_info *pfp)
 {
     const uint8_t *p = __map_domain_page(pfp);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1Cma-0004ou-9K; Thu, 09 Jan 2014 10:24:12 +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 1W1CmY-0004oZ-FR
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:10 +0000
Received: from [85.158.137.68:38091] by server-16.bemta-3.messagelabs.com id
	0A/63-26128-8C87EC25; Thu, 09 Jan 2014 10:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389263046!8145528!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30103 invoked from network); 9 Jan 2014 10:24:07 -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;
	9 Jan 2014 10: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 1W1CmU-0000z7-48
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CmU-00027c-2Z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:06 +0000
Date: Thu, 09 Jan 2014 10:24:06 +0000
Message-Id: <E1W1CmU-00027c-2Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop useless functions
	from header file
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f7b92a1a9545ad83788c5305deb723ac075e47ff
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:11 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:54:18 2014 +0100

    tmem: cleanup: drop useless functions from header file
    
    They are several one line functions in tmem_xen.h which are useless, this patch
    embeded them into tmem.c directly.
    Also modify void *tmem in struct domain to struct client *tmem_client in order
    to make things more straightforward.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domain.c        |    4 ++--
 xen/common/tmem.c          |   24 ++++++++++++------------
 xen/include/xen/sched.h    |    2 +-
 xen/include/xen/tmem_xen.h |   30 +-----------------------------
 4 files changed, 16 insertions(+), 44 deletions(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 2cbc489..2636fc9 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -528,9 +528,9 @@ int domain_kill(struct domain *d)
         spin_barrier(&d->domain_lock);
         evtchn_destroy(d);
         gnttab_release_mappings(d);
-        tmem_destroy(d->tmem);
+        tmem_destroy(d->tmem_client);
         domain_set_outstanding_pages(d, 0);
-        d->tmem = NULL;
+        d->tmem_client = NULL;
         /* fallthrough */
     case DOMDYING_dying:
         rc = domain_relinquish_resources(d);
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 5bf5f04..2659651 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1206,7 +1206,7 @@ static struct client *client_create(domid_t cli_id)
         goto fail;
     }
     if ( !d->is_dying ) {
-        d->tmem = client;
+        d->tmem_client = client;
 	client->domain = d;
     }
     rcu_unlock_domain(d);
@@ -1324,7 +1324,7 @@ obj_unlock:
 
 static int tmem_evict(void)
 {
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_page_descriptor *pgp = NULL, *pgp2, *pgp_del;
     struct tmem_object_root *obj;
     struct tmem_pool *pool;
@@ -1761,7 +1761,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             list_del(&pgp->us.client_eph_pages);
             list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list);
             spin_unlock(&eph_lists_spinlock);
-            obj->last_client = tmem_get_cli_id_from_current();
+            obj->last_client = current->domain->domain_id;
         }
     }
     if ( obj != NULL )
@@ -1836,7 +1836,7 @@ out:
 
 static int do_tmem_destroy_pool(uint32_t pool_id)
 {
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool;
 
     if ( client->pools == NULL )
@@ -1867,7 +1867,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     int i;
 
     if ( this_cli_id == TMEM_CLI_ID_NULL )
-        cli_id = tmem_get_cli_id_from_current();
+        cli_id = current->domain->domain_id;
     else
         cli_id = this_cli_id;
     tmem_client_info("tmem: allocating %s-%s tmem pool for %s=%d...",
@@ -1908,7 +1908,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     }
     else
     {
-        client = tmem_client_from_current();
+        client = current->domain->tmem_client;
         ASSERT(client != NULL);
         for ( d_poolid = 0; d_poolid < MAX_POOLS_PER_DOMAIN; d_poolid++ )
             if ( client->pools[d_poolid] == NULL )
@@ -2511,7 +2511,7 @@ static int do_tmem_control(struct tmem_op *op)
     uint32_t subop = op->u.ctrl.subop;
     struct oid *oidp = (struct oid *)(&op->u.ctrl.oid[0]);
 
-    if (!tmem_current_is_privileged())
+    if ( xsm_tmem_control(XSM_PRIV) )
         return -EPERM;
 
     switch(subop)
@@ -2583,7 +2583,7 @@ static int do_tmem_control(struct tmem_op *op)
 long do_tmem_op(tmem_cli_op_t uops)
 {
     struct tmem_op op;
-    struct client *client = tmem_client_from_current();
+    struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool = NULL;
     struct oid *oidp;
     int rc = 0;
@@ -2595,12 +2595,12 @@ long do_tmem_op(tmem_cli_op_t uops)
     if ( !tmem_initialized )
         return -ENODEV;
 
-    if ( !tmem_current_permitted() )
+    if ( xsm_tmem_op(XSM_HOOK) )
         return -EPERM;
 
     total_tmem_ops++;
 
-    if ( client != NULL && tmem_client_is_dying(client) )
+    if ( client != NULL && client->domain->is_dying )
     {
         rc = -ENODEV;
  simple_error:
@@ -2640,7 +2640,7 @@ long do_tmem_op(tmem_cli_op_t uops)
     {
         write_lock(&tmem_rwlock);
         write_lock_set = 1;
-        if ( (client = client_create(tmem_get_cli_id_from_current())) == NULL )
+        if ( (client = client_create(current->domain->domain_id)) == NULL )
         {
             tmem_client_err("tmem: can't create tmem structure for %s\n",
                            tmem_client_str);
@@ -2732,7 +2732,7 @@ void tmem_destroy(void *v)
     if ( client == NULL )
         return;
 
-    if ( !tmem_client_is_dying(client) )
+    if ( !client->domain->is_dying )
     {
         printk("tmem: tmem_destroy can only destroy dying client\n");
         return;
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 7bcac31..fb8bd36 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -402,7 +402,7 @@ struct domain
     spinlock_t hypercall_deadlock_mutex;
 
     /* transcendent memory, auto-allocated on first tmem op by each domain */
-    void *tmem;
+    struct client *tmem_client;
 
     struct lock_profile_qhead profile_head;
 
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 9cfa73f..11f4c2d 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -171,45 +171,17 @@ static inline unsigned long tmem_free_mb(void)
 
 /*  "Client" (==domain) abstraction */
 
-struct client;
 static inline struct client *tmem_client_from_cli_id(domid_t cli_id)
 {
     struct client *c;
     struct domain *d = rcu_lock_domain_by_id(cli_id);
     if (d == NULL)
         return NULL;
-    c = (struct client *)(d->tmem);
+    c = d->tmem_client;
     rcu_unlock_domain(d);
     return c;
 }
 
-static inline struct client *tmem_client_from_current(void)
-{
-    return (struct client *)(current->domain->tmem);
-}
-
-#define tmem_client_is_dying(_client) (!!_client->domain->is_dying)
-
-static inline domid_t tmem_get_cli_id_from_current(void)
-{
-    return current->domain->domain_id;
-}
-
-static inline struct domain *tmem_get_cli_ptr_from_current(void)
-{
-    return current->domain;
-}
-
-static inline bool_t tmem_current_permitted(void)
-{
-    return !xsm_tmem_op(XSM_HOOK);
-}
-
-static inline bool_t tmem_current_is_privileged(void)
-{
-    return !xsm_tmem_control(XSM_PRIV);
-}
-
 static inline uint8_t tmem_get_first_byte(struct page_info *pfp)
 {
     const uint8_t *p = __map_domain_page(pfp);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cmi-0004qm-Gu; Thu, 09 Jan 2014 10:24: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 1W1Cmg-0004qP-OO
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:18 +0000
Received: from [85.158.143.35:54834] by server-3.bemta-4.messagelabs.com id
	71/BC-32360-2D87EC25; Thu, 09 Jan 2014 10:24:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1389263056!7955773!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10386 invoked from network); 9 Jan 2014 10:24:17 -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;
	9 Jan 2014 10:24: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 1W1Cme-0000zT-A4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cme-000280-8C
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:16 +0000
Date: Thu, 09 Jan 2014 10:24:16 +0000
Message-Id: <E1W1Cme-000280-8C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: refator function
	tmem_ensure_avail_pages()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6f06f406f8b5207493f70f29efe523bf53243f36
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:12 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: refator function tmem_ensure_avail_pages()
    
    tmem_ensure_avail_pages() doesn't return a value which is incorrect because
    the caller need to confirm whether there is enough memory.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   32 ++++++++++++++++++++------------
 xen/include/xen/tmem_xen.h |    6 ------
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 2659651..685efef 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1409,22 +1409,28 @@ static unsigned long tmem_relinquish_npages(unsigned long n)
     return avail_pages;
 }
 
-/* Under certain conditions (e.g. if each client is putting pages for exactly
+/*
+ * Under certain conditions (e.g. if each client is putting pages for exactly
  * one object), once locks are held, freeing up memory may
  * result in livelocks and very long "put" times, so we try to ensure there
  * is a minimum amount of memory (1MB) available BEFORE any data structure
- * locks are held */
-static inline void tmem_ensure_avail_pages(void)
+ * locks are held.
+ */
+static inline bool_t tmem_ensure_avail_pages(void)
 {
     int failed_evict = 10;
+    unsigned long free_mem;
 
-    while ( !tmem_free_mb() )
-    {
-        if ( tmem_evict() )
-            continue;
-        else if ( failed_evict-- <= 0 )
-            break;
-    }
+    do {
+        free_mem = (tmem_page_list_pages + total_free_pages())
+                        >> (20 - PAGE_SHIFT);
+        if ( free_mem )
+            return 1;
+        if ( !tmem_evict() )
+            failed_evict--;
+    } while ( failed_evict > 0 );
+
+    return 0;
 }
 
 /************ TMEM CORE OPERATIONS ************************************/
@@ -2681,9 +2687,11 @@ long do_tmem_op(tmem_cli_op_t uops)
                               op.u.creat.uuid[0], op.u.creat.uuid[1]);
         break;
     case TMEM_PUT_PAGE:
-        tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+        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;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 11f4c2d..4e6c234 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -164,13 +164,7 @@ static inline void __tmem_free_page(struct page_info *pi)
     atomic_dec(&freeable_page_count);
 }
 
-static inline unsigned long tmem_free_mb(void)
-{
-    return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
-}
-
 /*  "Client" (==domain) abstraction */
-
 static inline struct client *tmem_client_from_cli_id(domid_t cli_id)
 {
     struct client *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 Thu Jan 09 10:24:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cmi-0004qm-Gu; Thu, 09 Jan 2014 10:24: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 1W1Cmg-0004qP-OO
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:18 +0000
Received: from [85.158.143.35:54834] by server-3.bemta-4.messagelabs.com id
	71/BC-32360-2D87EC25; Thu, 09 Jan 2014 10:24:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1389263056!7955773!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10386 invoked from network); 9 Jan 2014 10:24:17 -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;
	9 Jan 2014 10:24: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 1W1Cme-0000zT-A4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cme-000280-8C
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:16 +0000
Date: Thu, 09 Jan 2014 10:24:16 +0000
Message-Id: <E1W1Cme-000280-8C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: refator function
	tmem_ensure_avail_pages()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6f06f406f8b5207493f70f29efe523bf53243f36
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:12 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: refator function tmem_ensure_avail_pages()
    
    tmem_ensure_avail_pages() doesn't return a value which is incorrect because
    the caller need to confirm whether there is enough memory.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   32 ++++++++++++++++++++------------
 xen/include/xen/tmem_xen.h |    6 ------
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 2659651..685efef 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1409,22 +1409,28 @@ static unsigned long tmem_relinquish_npages(unsigned long n)
     return avail_pages;
 }
 
-/* Under certain conditions (e.g. if each client is putting pages for exactly
+/*
+ * Under certain conditions (e.g. if each client is putting pages for exactly
  * one object), once locks are held, freeing up memory may
  * result in livelocks and very long "put" times, so we try to ensure there
  * is a minimum amount of memory (1MB) available BEFORE any data structure
- * locks are held */
-static inline void tmem_ensure_avail_pages(void)
+ * locks are held.
+ */
+static inline bool_t tmem_ensure_avail_pages(void)
 {
     int failed_evict = 10;
+    unsigned long free_mem;
 
-    while ( !tmem_free_mb() )
-    {
-        if ( tmem_evict() )
-            continue;
-        else if ( failed_evict-- <= 0 )
-            break;
-    }
+    do {
+        free_mem = (tmem_page_list_pages + total_free_pages())
+                        >> (20 - PAGE_SHIFT);
+        if ( free_mem )
+            return 1;
+        if ( !tmem_evict() )
+            failed_evict--;
+    } while ( failed_evict > 0 );
+
+    return 0;
 }
 
 /************ TMEM CORE OPERATIONS ************************************/
@@ -2681,9 +2687,11 @@ long do_tmem_op(tmem_cli_op_t uops)
                               op.u.creat.uuid[0], op.u.creat.uuid[1]);
         break;
     case TMEM_PUT_PAGE:
-        tmem_ensure_avail_pages();
-        rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+        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;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 11f4c2d..4e6c234 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -164,13 +164,7 @@ static inline void __tmem_free_page(struct page_info *pi)
     atomic_dec(&freeable_page_count);
 }
 
-static inline unsigned long tmem_free_mb(void)
-{
-    return (tmem_page_list_pages + total_free_pages()) >> (20 - PAGE_SHIFT);
-}
-
 /*  "Client" (==domain) abstraction */
-
 static inline struct client *tmem_client_from_cli_id(domid_t cli_id)
 {
     struct client *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 Thu Jan 09 10:24:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cms-0004sx-Jj; Thu, 09 Jan 2014 10:24: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 1W1Cmq-0004sZ-To
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:29 +0000
Received: from [85.158.139.211:3933] by server-12.bemta-5.messagelabs.com id
	5D/32-30017-CD87EC25; Thu, 09 Jan 2014 10:24:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263066!8555919!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23740 invoked from network); 9 Jan 2014 10:24:27 -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;
	9 Jan 2014 10:24: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 1W1Cmo-0000zZ-FN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cmo-00028Y-DZ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:26 +0000
Date: Thu, 09 Jan 2014 10:24:26 +0000
Message-Id: <E1W1Cmo-00028Y-DZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rename
	tmem_relinquish_npages()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4f938ef112300d4b4ebfac3a74a155d159fd9a42
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:13 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: cleanup: rename tmem_relinquish_npages()
    
    Rename tmem_relinquish_npages() to tmem_flush_npages() to
    distinguish it from tmem_relinquish_pages().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 685efef..9269ebf 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1383,7 +1383,7 @@ out:
     return ret;
 }
 
-static unsigned long tmem_relinquish_npages(unsigned long n)
+static unsigned long tmem_flush_npages(unsigned long n)
 {
     unsigned long avail_pages = 0;
 
@@ -2028,7 +2028,7 @@ static int tmemc_flush_mem(domid_t cli_id, uint32_t kb)
     }
     /* convert kb to pages, rounding up if necessary */
     npages = (kb + ((1 << (PAGE_SHIFT-10))-1)) >> (PAGE_SHIFT-10);
-    flushed_pages = tmem_relinquish_npages(npages);
+    flushed_pages = tmem_flush_npages(npages);
     flushed_kb = flushed_pages << (PAGE_SHIFT-10);
     return flushed_kb;
 }
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cms-0004sx-Jj; Thu, 09 Jan 2014 10:24: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 1W1Cmq-0004sZ-To
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:29 +0000
Received: from [85.158.139.211:3933] by server-12.bemta-5.messagelabs.com id
	5D/32-30017-CD87EC25; Thu, 09 Jan 2014 10:24:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263066!8555919!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23740 invoked from network); 9 Jan 2014 10:24:27 -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;
	9 Jan 2014 10:24: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 1W1Cmo-0000zZ-FN
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cmo-00028Y-DZ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:26 +0000
Date: Thu, 09 Jan 2014 10:24:26 +0000
Message-Id: <E1W1Cmo-00028Y-DZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rename
	tmem_relinquish_npages()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4f938ef112300d4b4ebfac3a74a155d159fd9a42
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:13 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: cleanup: rename tmem_relinquish_npages()
    
    Rename tmem_relinquish_npages() to tmem_flush_npages() to
    distinguish it from tmem_relinquish_pages().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 685efef..9269ebf 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1383,7 +1383,7 @@ out:
     return ret;
 }
 
-static unsigned long tmem_relinquish_npages(unsigned long n)
+static unsigned long tmem_flush_npages(unsigned long n)
 {
     unsigned long avail_pages = 0;
 
@@ -2028,7 +2028,7 @@ static int tmemc_flush_mem(domid_t cli_id, uint32_t kb)
     }
     /* convert kb to pages, rounding up if necessary */
     npages = (kb + ((1 << (PAGE_SHIFT-10))-1)) >> (PAGE_SHIFT-10);
-    flushed_pages = tmem_relinquish_npages(npages);
+    flushed_pages = tmem_flush_npages(npages);
     flushed_kb = flushed_pages << (PAGE_SHIFT-10);
     return flushed_kb;
 }
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cn2-0004w3-5i; Thu, 09 Jan 2014 10:24: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 1W1Cn0-0004va-WD
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:39 +0000
Received: from [193.109.254.147:11541] by server-12.bemta-14.messagelabs.com
	id 67/95-13681-6E87EC25; Thu, 09 Jan 2014 10:24:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389263076!9775322!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17799 invoked from network); 9 Jan 2014 10:24:37 -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;
	9 Jan 2014 10:24: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 1W1Cmy-0000zh-Kb
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cmy-00029F-Iv
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:36 +0000
Date: Thu, 09 Jan 2014 10:24:36 +0000
Message-Id: <E1W1Cmy-00029F-Iv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rm unused
	tmem_freeze_all()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5e173a02c6220442b93a8e36a67305d705ff6467
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:14 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: cleanup: rm unused tmem_freeze_all()
    
    Nobody uses tmem_freeze_all() so remove it.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 9269ebf..fc75229 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2755,19 +2755,6 @@ void tmem_destroy(void *v)
     write_unlock(&tmem_rwlock);
 }
 
-/* freezing all pools guarantees that no additional memory will be consumed */
-void tmem_freeze_all(unsigned char key)
-{
-    static int freeze = 0;
-
-    write_lock(&tmem_rwlock);
-
-    freeze = !freeze;
-    tmemc_freeze_pools(TMEM_CLI_ID_NULL,freeze);
-
-    write_unlock(&tmem_rwlock);
-}
-
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
 void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
 {
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1Cn2-0004w3-5i; Thu, 09 Jan 2014 10:24: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 1W1Cn0-0004va-WD
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:39 +0000
Received: from [193.109.254.147:11541] by server-12.bemta-14.messagelabs.com
	id 67/95-13681-6E87EC25; Thu, 09 Jan 2014 10:24:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389263076!9775322!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17799 invoked from network); 9 Jan 2014 10:24:37 -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;
	9 Jan 2014 10:24: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 1W1Cmy-0000zh-Kb
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cmy-00029F-Iv
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:36 +0000
Date: Thu, 09 Jan 2014 10:24:36 +0000
Message-Id: <E1W1Cmy-00029F-Iv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: rm unused
	tmem_freeze_all()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5e173a02c6220442b93a8e36a67305d705ff6467
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:14 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: cleanup: rm unused tmem_freeze_all()
    
    Nobody uses tmem_freeze_all() so remove it.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 9269ebf..fc75229 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2755,19 +2755,6 @@ void tmem_destroy(void *v)
     write_unlock(&tmem_rwlock);
 }
 
-/* freezing all pools guarantees that no additional memory will be consumed */
-void tmem_freeze_all(unsigned char key)
-{
-    static int freeze = 0;
-
-    write_lock(&tmem_rwlock);
-
-    freeze = !freeze;
-    tmemc_freeze_pools(TMEM_CLI_ID_NULL,freeze);
-
-    write_unlock(&tmem_rwlock);
-}
-
 #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
 void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
 {
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:24:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1CnD-0004zE-97; Thu, 09 Jan 2014 10:24: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 1W1CnB-0004yn-H1
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:50 +0000
Received: from [193.109.254.147:40146] by server-9.bemta-14.messagelabs.com id
	21/57-13957-0F87EC25; Thu, 09 Jan 2014 10:24:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389263087!7517010!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7557 invoked from network); 9 Jan 2014 10:24:48 -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 Jan 2014 10: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 1W1Cn8-0000zn-Ty
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cn8-00029h-O3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:46 +0000
Date: Thu, 09 Jan 2014 10:24:46 +0000
Message-Id: <E1W1Cn8-00029h-O3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: check the return value of copy
	to 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 c8e6ce764fd0f84cb345b8dc18508e313099e61e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:15 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: check the return value of copy to guest
    
    Use function copy_to_guest_offset/copy_to_guest directly and check their return
    value.
    
    This also fixes CID 1132754, and 1132755:
    "Unchecked return value
    If the function returns an error value, the error value may be mistaken for a
    normal value.  In tmem_copy_to_client_buf_offset: Value returned from a function
    is not checked for errors before being used (CWE-252)"
    
    And CID 1055125, 1055126, 1055127, 1055128, 1055129, 1055130
    "Unchecked return value
    If the function returns an error value, the error value may be mistaken for a
    normal value.  In <functions changed>: Value returned from a function is not
    checked for errors before being used (CWE-252)"
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   34 ++++++++++++++++++++--------------
 xen/include/xen/tmem_xen.h |   14 --------------
 2 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index fc75229..d9e912b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2063,8 +2063,8 @@ static int tmemc_list_client(struct client *c, tmem_cli_va_param_t buf,
              c->eph_count, c->eph_count_max,
              c->compressed_pages, c->compressed_sum_size,
              c->compress_poor, c->compress_nomem);
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     for ( i = 0; i < MAX_POOLS_PER_DOMAIN; i++ )
     {
         if ( (p = c->pools[i]) == NULL )
@@ -2091,8 +2091,8 @@ static int tmemc_list_client(struct client *c, tmem_cli_va_param_t buf,
              p->flushs_found, p->flushs, p->flush_objs_found, p->flush_objs);
         if ( sum + n >= len )
             return sum;
-        tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-        sum += n;
+        if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+            sum += n;
     }
     return sum;
 }
@@ -2130,8 +2130,8 @@ static int tmemc_list_shared(tmem_cli_va_param_t buf, int off, uint32_t len,
              p->flushs_found, p->flushs, p->flush_objs_found, p->flush_objs);
         if ( sum + n >= len )
             return sum;
-        tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-        sum += n;
+        if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+            sum += n;
     }
     return sum;
 }
@@ -2147,8 +2147,8 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     n += scnprintf(info+n,BSIZE-n,"\n");
     if ( sum + n >= len )
         return sum;
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     return sum;
 }
 
@@ -2179,8 +2179,8 @@ static int tmemc_list_global(tmem_cli_va_param_t buf, int off, uint32_t len,
          tot_good_eph_puts,deduped_puts,pcd_tot_tze_size,pcd_tot_csize);
     if ( sum + n >= len )
         return sum;
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     return sum;
 }
 
@@ -2366,8 +2366,9 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
     case TMEMC_SAVE_GET_POOL_UUID:
          if ( pool == NULL )
              break;
-        tmem_copy_to_client_buf(buf, pool->uuid, 2);
         rc = 0;
+        if ( copy_to_guest(guest_handle_cast(buf, void), pool->uuid, 2) )
+            rc = -EFAULT;
         break;
     case TMEMC_SAVE_END:
         if ( client == NULL )
@@ -2430,8 +2431,12 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     BUILD_BUG_ON(sizeof(h.oid) != sizeof(oid));
     memcpy(h.oid, oid.oid, sizeof(h.oid));
     h.index = pgp->index;
-    tmem_copy_to_client_buf(buf, &h, 1);
-    tmem_client_buf_add(buf, sizeof(h));
+    if ( copy_to_guest(guest_handle_cast(buf, void), &h, 1) )
+    {
+        ret = -EFAULT;
+        goto out;
+    }
+    guest_handle_add_offset(buf, sizeof(h));
     ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
@@ -2474,8 +2479,9 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
     BUILD_BUG_ON(sizeof(h.oid) != sizeof(pgp->inv_oid));
     memcpy(h.oid, pgp->inv_oid.oid, sizeof(h.oid));
     h.index = pgp->index;
-    tmem_copy_to_client_buf(buf, &h, 1);
     ret = 1;
+    if ( copy_to_guest(guest_handle_cast(buf, void), &h, 1) )
+        ret = -EFAULT;
 out:
     spin_unlock(&pers_lists_spinlock);
     return ret;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 4e6c234..885ee21 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -313,21 +313,7 @@ static inline int tmem_get_tmemop_from_client(tmem_op_t *op, tmem_cli_op_t uops)
 }
 
 #define tmem_cli_buf_null guest_handle_from_ptr(NULL, char)
-
-static inline void tmem_copy_to_client_buf_offset(tmem_cli_va_param_t clibuf,
-						 int off,
-						 char *tmembuf, int len)
-{
-    copy_to_guest_offset(clibuf,off,tmembuf,len);
-}
-
-#define tmem_copy_to_client_buf(clibuf, tmembuf, cnt) \
-    copy_to_guest(guest_handle_cast(clibuf, void), tmembuf, cnt)
-
-#define tmem_client_buf_add guest_handle_add_offset
-
 #define TMEM_CLI_ID_NULL ((domid_t)((domid_t)-1L))
-
 #define tmem_cli_id_str "domid"
 #define tmem_client_str "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 Thu Jan 09 10:24:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:24: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 1W1CnD-0004zE-97; Thu, 09 Jan 2014 10:24: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 1W1CnB-0004yn-H1
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:50 +0000
Received: from [193.109.254.147:40146] by server-9.bemta-14.messagelabs.com id
	21/57-13957-0F87EC25; Thu, 09 Jan 2014 10:24:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389263087!7517010!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7557 invoked from network); 9 Jan 2014 10:24:48 -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 Jan 2014 10: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 1W1Cn8-0000zn-Ty
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cn8-00029h-O3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:46 +0000
Date: Thu, 09 Jan 2014 10:24:46 +0000
Message-Id: <E1W1Cn8-00029h-O3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: check the return value of copy
	to 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 c8e6ce764fd0f84cb345b8dc18508e313099e61e
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Thu Dec 12 19:05:15 2013 +0800
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 08:55:38 2014 +0100

    tmem: check the return value of copy to guest
    
    Use function copy_to_guest_offset/copy_to_guest directly and check their return
    value.
    
    This also fixes CID 1132754, and 1132755:
    "Unchecked return value
    If the function returns an error value, the error value may be mistaken for a
    normal value.  In tmem_copy_to_client_buf_offset: Value returned from a function
    is not checked for errors before being used (CWE-252)"
    
    And CID 1055125, 1055126, 1055127, 1055128, 1055129, 1055130
    "Unchecked return value
    If the function returns an error value, the error value may be mistaken for a
    normal value.  In <functions changed>: Value returned from a function is not
    checked for errors before being used (CWE-252)"
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c          |   34 ++++++++++++++++++++--------------
 xen/include/xen/tmem_xen.h |   14 --------------
 2 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index fc75229..d9e912b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2063,8 +2063,8 @@ static int tmemc_list_client(struct client *c, tmem_cli_va_param_t buf,
              c->eph_count, c->eph_count_max,
              c->compressed_pages, c->compressed_sum_size,
              c->compress_poor, c->compress_nomem);
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     for ( i = 0; i < MAX_POOLS_PER_DOMAIN; i++ )
     {
         if ( (p = c->pools[i]) == NULL )
@@ -2091,8 +2091,8 @@ static int tmemc_list_client(struct client *c, tmem_cli_va_param_t buf,
              p->flushs_found, p->flushs, p->flush_objs_found, p->flush_objs);
         if ( sum + n >= len )
             return sum;
-        tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-        sum += n;
+        if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+            sum += n;
     }
     return sum;
 }
@@ -2130,8 +2130,8 @@ static int tmemc_list_shared(tmem_cli_va_param_t buf, int off, uint32_t len,
              p->flushs_found, p->flushs, p->flush_objs_found, p->flush_objs);
         if ( sum + n >= len )
             return sum;
-        tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-        sum += n;
+        if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+            sum += n;
     }
     return sum;
 }
@@ -2147,8 +2147,8 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off,
     n += scnprintf(info+n,BSIZE-n,"\n");
     if ( sum + n >= len )
         return sum;
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     return sum;
 }
 
@@ -2179,8 +2179,8 @@ static int tmemc_list_global(tmem_cli_va_param_t buf, int off, uint32_t len,
          tot_good_eph_puts,deduped_puts,pcd_tot_tze_size,pcd_tot_csize);
     if ( sum + n >= len )
         return sum;
-    tmem_copy_to_client_buf_offset(buf,off+sum,info,n+1);
-    sum += n;
+    if ( !copy_to_guest_offset(buf, off + sum, info, n + 1) )
+        sum += n;
     return sum;
 }
 
@@ -2366,8 +2366,9 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
     case TMEMC_SAVE_GET_POOL_UUID:
          if ( pool == NULL )
              break;
-        tmem_copy_to_client_buf(buf, pool->uuid, 2);
         rc = 0;
+        if ( copy_to_guest(guest_handle_cast(buf, void), pool->uuid, 2) )
+            rc = -EFAULT;
         break;
     case TMEMC_SAVE_END:
         if ( client == NULL )
@@ -2430,8 +2431,12 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     BUILD_BUG_ON(sizeof(h.oid) != sizeof(oid));
     memcpy(h.oid, oid.oid, sizeof(h.oid));
     h.index = pgp->index;
-    tmem_copy_to_client_buf(buf, &h, 1);
-    tmem_client_buf_add(buf, sizeof(h));
+    if ( copy_to_guest(guest_handle_cast(buf, void), &h, 1) )
+    {
+        ret = -EFAULT;
+        goto out;
+    }
+    guest_handle_add_offset(buf, sizeof(h));
     ret = do_tmem_get(pool, &oid, pgp->index, 0, buf);
 
 out:
@@ -2474,8 +2479,9 @@ static int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf,
     BUILD_BUG_ON(sizeof(h.oid) != sizeof(pgp->inv_oid));
     memcpy(h.oid, pgp->inv_oid.oid, sizeof(h.oid));
     h.index = pgp->index;
-    tmem_copy_to_client_buf(buf, &h, 1);
     ret = 1;
+    if ( copy_to_guest(guest_handle_cast(buf, void), &h, 1) )
+        ret = -EFAULT;
 out:
     spin_unlock(&pers_lists_spinlock);
     return ret;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 4e6c234..885ee21 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -313,21 +313,7 @@ static inline int tmem_get_tmemop_from_client(tmem_op_t *op, tmem_cli_op_t uops)
 }
 
 #define tmem_cli_buf_null guest_handle_from_ptr(NULL, char)
-
-static inline void tmem_copy_to_client_buf_offset(tmem_cli_va_param_t clibuf,
-						 int off,
-						 char *tmembuf, int len)
-{
-    copy_to_guest_offset(clibuf,off,tmembuf,len);
-}
-
-#define tmem_copy_to_client_buf(clibuf, tmembuf, cnt) \
-    copy_to_guest(guest_handle_cast(clibuf, void), tmembuf, cnt)
-
-#define tmem_client_buf_add guest_handle_add_offset
-
 #define TMEM_CLI_ID_NULL ((domid_t)((domid_t)-1L))
-
 #define tmem_cli_id_str "domid"
 #define tmem_client_str "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 Thu Jan 09 10:25:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CnN-00051f-CH; Thu, 09 Jan 2014 10:25: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 1W1CnM-00051M-61
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:00 +0000
Received: from [85.158.139.211:9182] by server-12.bemta-5.messagelabs.com id
	9E/63-30017-BF87EC25; Thu, 09 Jan 2014 10:24:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263097!8556089!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27918 invoked from network); 9 Jan 2014 10:24:58 -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;
	9 Jan 2014 10:24: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 1W1CnJ-0000zw-89
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnJ-0002AZ-1K
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:57 +0000
Date: Thu, 09 Jan 2014 10:24:57 +0000
Message-Id: <E1W1CnJ-0002AZ-1K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename XENMEM_add_to_physmap_{range =>
	batch}
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 89ec246739a9de372447973026ddcf9ad0a91f2e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Jan 8 09:04:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:04:48 2014 +0100

    rename XENMEM_add_to_physmap_{range => batch}
    
    The use of "range" here wasn't really correct - there are no ranges
    involved. As the comment in the public header already correctly said,
    all this is about is batching of XENMEM_add_to_physmap calls (with
    the addition of having a way to specify a foreign domain for
    XENMAPSPACE_gmfn_foreign).
    
    Suggested-by: Ian Campbell <Ian.Campbell@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/memory.c           |   58 ++++++++++++++++++++--------------------
 xen/include/public/arch-arm.h |    2 +-
 xen/include/public/memory.h   |   16 ++++++++---
 3 files changed, 41 insertions(+), 35 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 9aa65a8..5a0efd5 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -628,54 +628,54 @@ static int xenmem_add_to_physmap(struct domain *d,
     return rc;
 }
 
-static int xenmem_add_to_physmap_range(struct domain *d,
-                                       struct xen_add_to_physmap_range *xatpr,
+static int xenmem_add_to_physmap_batch(struct domain *d,
+                                       struct xen_add_to_physmap_batch *xatpb,
                                        unsigned int start)
 {
     unsigned int done = 0;
     int rc;
 
-    if ( xatpr->size < start )
+    if ( xatpb->size < start )
         return -EILSEQ;
 
-    guest_handle_add_offset(xatpr->idxs, start);
-    guest_handle_add_offset(xatpr->gpfns, start);
-    guest_handle_add_offset(xatpr->errs, start);
-    xatpr->size -= start;
+    guest_handle_add_offset(xatpb->idxs, start);
+    guest_handle_add_offset(xatpb->gpfns, start);
+    guest_handle_add_offset(xatpb->errs, start);
+    xatpb->size -= start;
 
-    while ( xatpr->size > done )
+    while ( xatpb->size > done )
     {
         xen_ulong_t idx;
         xen_pfn_t gpfn;
 
-        if ( unlikely(__copy_from_guest_offset(&idx, xatpr->idxs, 0, 1)) )
+        if ( unlikely(__copy_from_guest_offset(&idx, xatpb->idxs, 0, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        if ( unlikely(__copy_from_guest_offset(&gpfn, xatpr->gpfns, 0, 1)) )
+        if ( unlikely(__copy_from_guest_offset(&gpfn, xatpb->gpfns, 0, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        rc = xenmem_add_to_physmap_one(d, xatpr->space,
-                                       xatpr->foreign_domid,
+        rc = xenmem_add_to_physmap_one(d, xatpb->space,
+                                       xatpb->foreign_domid,
                                        idx, gpfn);
 
-        if ( unlikely(__copy_to_guest_offset(xatpr->errs, 0, &rc, 1)) )
+        if ( unlikely(__copy_to_guest_offset(xatpb->errs, 0, &rc, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        guest_handle_add_offset(xatpr->idxs, 1);
-        guest_handle_add_offset(xatpr->gpfns, 1);
-        guest_handle_add_offset(xatpr->errs, 1);
+        guest_handle_add_offset(xatpb->idxs, 1);
+        guest_handle_add_offset(xatpb->gpfns, 1);
+        guest_handle_add_offset(xatpb->errs, 1);
 
         /* Check for continuation if it's not the last iteration. */
-        if ( xatpr->size > ++done && hypercall_preempt_check() )
+        if ( xatpb->size > ++done && hypercall_preempt_check() )
         {
             rc = start + done;
             goto out;
@@ -830,7 +830,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&xatp, arg, 1) )
             return -EFAULT;
 
-        /* Foreign mapping is only possible via add_to_physmap_range. */
+        /* Foreign mapping is only possible via add_to_physmap_batch. */
         if ( xatp.space == XENMAPSPACE_gmfn_foreign )
             return -ENOSYS;
 
@@ -857,29 +857,29 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         return rc;
     }
 
-    case XENMEM_add_to_physmap_range:
+    case XENMEM_add_to_physmap_batch:
     {
-        struct xen_add_to_physmap_range xatpr;
+        struct xen_add_to_physmap_batch xatpb;
         struct domain *d;
 
-        BUILD_BUG_ON((typeof(xatpr.size))-1 >
+        BUILD_BUG_ON((typeof(xatpb.size))-1 >
                      (UINT_MAX >> MEMOP_EXTENT_SHIFT));
 
         /* Check for malicious or buggy input. */
-        if ( start_extent != (typeof(xatpr.size))start_extent )
+        if ( start_extent != (typeof(xatpb.size))start_extent )
             return -EDOM;
 
-        if ( copy_from_guest(&xatpr, arg, 1) ||
-             !guest_handle_okay(xatpr.idxs, xatpr.size) ||
-             !guest_handle_okay(xatpr.gpfns, xatpr.size) ||
-             !guest_handle_okay(xatpr.errs, xatpr.size) )
+        if ( copy_from_guest(&xatpb, arg, 1) ||
+             !guest_handle_okay(xatpb.idxs, xatpb.size) ||
+             !guest_handle_okay(xatpb.gpfns, xatpb.size) ||
+             !guest_handle_okay(xatpb.errs, xatpb.size) )
             return -EFAULT;
 
         /* This mapspace is unsupported for this hypercall. */
-        if ( xatpr.space == XENMAPSPACE_gmfn_range )
+        if ( xatpb.space == XENMAPSPACE_gmfn_range )
             return -EOPNOTSUPP;
 
-        d = rcu_lock_domain_by_any_id(xatpr.domid);
+        d = rcu_lock_domain_by_any_id(xatpb.domid);
         if ( d == NULL )
             return -ESRCH;
 
@@ -890,7 +890,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             return rc;
         }
 
-        rc = xenmem_add_to_physmap_range(d, &xatpr, start_extent);
+        rc = xenmem_add_to_physmap_batch(d, &xatpb, start_extent);
 
         rcu_unlock_domain(d);
 
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 2e7fb3e..7496556 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -91,7 +91,7 @@
  *
  *   In addition the following arch specific sub-ops:
  *    * XENMEM_add_to_physmap
- *    * XENMEM_add_to_physmap_range
+ *    * XENMEM_add_to_physmap_batch
  *
  *  HYPERVISOR_domctl
  *   All generic sub-operations, with the exception of:
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 7a26dee..f19ac14 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -207,8 +207,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_mapping_t);
 #define XENMAPSPACE_gmfn         2 /* GMFN */
 #define XENMAPSPACE_gmfn_range   3 /* GMFN range, XENMEM_add_to_physmap only. */
 #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another dom,
-                                    * XENMEM_add_to_physmap_range only.
-                                    */
+                                    * XENMEM_add_to_physmap_batch only. */
 /* ` } */
 
 /*
@@ -238,8 +237,8 @@ typedef struct xen_add_to_physmap xen_add_to_physmap_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
 /* A batched version of add_to_physmap. */
-#define XENMEM_add_to_physmap_range 23
-struct xen_add_to_physmap_range {
+#define XENMEM_add_to_physmap_batch 23
+struct xen_add_to_physmap_batch {
     /* IN */
     /* Which domain to change the mapping for. */
     domid_t domid;
@@ -260,8 +259,15 @@ struct xen_add_to_physmap_range {
     /* Per index error code. */
     XEN_GUEST_HANDLE(int) errs;
 };
-typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t;
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_batch_t;
+DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_batch_t);
+
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define XENMEM_add_to_physmap_range XENMEM_add_to_physmap_batch
+#define xen_add_to_physmap_range xen_add_to_physmap_batch
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_range_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
+#endif
 
 /*
  * Unmaps the page appearing at a particular GPFN from the specified guest's
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CnN-00051f-CH; Thu, 09 Jan 2014 10:25: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 1W1CnM-00051M-61
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:00 +0000
Received: from [85.158.139.211:9182] by server-12.bemta-5.messagelabs.com id
	9E/63-30017-BF87EC25; Thu, 09 Jan 2014 10:24:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263097!8556089!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27918 invoked from network); 9 Jan 2014 10:24:58 -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;
	9 Jan 2014 10:24: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 1W1CnJ-0000zw-89
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnJ-0002AZ-1K
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:24:57 +0000
Date: Thu, 09 Jan 2014 10:24:57 +0000
Message-Id: <E1W1CnJ-0002AZ-1K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename XENMEM_add_to_physmap_{range =>
	batch}
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 89ec246739a9de372447973026ddcf9ad0a91f2e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Jan 8 09:04:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:04:48 2014 +0100

    rename XENMEM_add_to_physmap_{range => batch}
    
    The use of "range" here wasn't really correct - there are no ranges
    involved. As the comment in the public header already correctly said,
    all this is about is batching of XENMEM_add_to_physmap calls (with
    the addition of having a way to specify a foreign domain for
    XENMAPSPACE_gmfn_foreign).
    
    Suggested-by: Ian Campbell <Ian.Campbell@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/memory.c           |   58 ++++++++++++++++++++--------------------
 xen/include/public/arch-arm.h |    2 +-
 xen/include/public/memory.h   |   16 ++++++++---
 3 files changed, 41 insertions(+), 35 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 9aa65a8..5a0efd5 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -628,54 +628,54 @@ static int xenmem_add_to_physmap(struct domain *d,
     return rc;
 }
 
-static int xenmem_add_to_physmap_range(struct domain *d,
-                                       struct xen_add_to_physmap_range *xatpr,
+static int xenmem_add_to_physmap_batch(struct domain *d,
+                                       struct xen_add_to_physmap_batch *xatpb,
                                        unsigned int start)
 {
     unsigned int done = 0;
     int rc;
 
-    if ( xatpr->size < start )
+    if ( xatpb->size < start )
         return -EILSEQ;
 
-    guest_handle_add_offset(xatpr->idxs, start);
-    guest_handle_add_offset(xatpr->gpfns, start);
-    guest_handle_add_offset(xatpr->errs, start);
-    xatpr->size -= start;
+    guest_handle_add_offset(xatpb->idxs, start);
+    guest_handle_add_offset(xatpb->gpfns, start);
+    guest_handle_add_offset(xatpb->errs, start);
+    xatpb->size -= start;
 
-    while ( xatpr->size > done )
+    while ( xatpb->size > done )
     {
         xen_ulong_t idx;
         xen_pfn_t gpfn;
 
-        if ( unlikely(__copy_from_guest_offset(&idx, xatpr->idxs, 0, 1)) )
+        if ( unlikely(__copy_from_guest_offset(&idx, xatpb->idxs, 0, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        if ( unlikely(__copy_from_guest_offset(&gpfn, xatpr->gpfns, 0, 1)) )
+        if ( unlikely(__copy_from_guest_offset(&gpfn, xatpb->gpfns, 0, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        rc = xenmem_add_to_physmap_one(d, xatpr->space,
-                                       xatpr->foreign_domid,
+        rc = xenmem_add_to_physmap_one(d, xatpb->space,
+                                       xatpb->foreign_domid,
                                        idx, gpfn);
 
-        if ( unlikely(__copy_to_guest_offset(xatpr->errs, 0, &rc, 1)) )
+        if ( unlikely(__copy_to_guest_offset(xatpb->errs, 0, &rc, 1)) )
         {
             rc = -EFAULT;
             goto out;
         }
 
-        guest_handle_add_offset(xatpr->idxs, 1);
-        guest_handle_add_offset(xatpr->gpfns, 1);
-        guest_handle_add_offset(xatpr->errs, 1);
+        guest_handle_add_offset(xatpb->idxs, 1);
+        guest_handle_add_offset(xatpb->gpfns, 1);
+        guest_handle_add_offset(xatpb->errs, 1);
 
         /* Check for continuation if it's not the last iteration. */
-        if ( xatpr->size > ++done && hypercall_preempt_check() )
+        if ( xatpb->size > ++done && hypercall_preempt_check() )
         {
             rc = start + done;
             goto out;
@@ -830,7 +830,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&xatp, arg, 1) )
             return -EFAULT;
 
-        /* Foreign mapping is only possible via add_to_physmap_range. */
+        /* Foreign mapping is only possible via add_to_physmap_batch. */
         if ( xatp.space == XENMAPSPACE_gmfn_foreign )
             return -ENOSYS;
 
@@ -857,29 +857,29 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         return rc;
     }
 
-    case XENMEM_add_to_physmap_range:
+    case XENMEM_add_to_physmap_batch:
     {
-        struct xen_add_to_physmap_range xatpr;
+        struct xen_add_to_physmap_batch xatpb;
         struct domain *d;
 
-        BUILD_BUG_ON((typeof(xatpr.size))-1 >
+        BUILD_BUG_ON((typeof(xatpb.size))-1 >
                      (UINT_MAX >> MEMOP_EXTENT_SHIFT));
 
         /* Check for malicious or buggy input. */
-        if ( start_extent != (typeof(xatpr.size))start_extent )
+        if ( start_extent != (typeof(xatpb.size))start_extent )
             return -EDOM;
 
-        if ( copy_from_guest(&xatpr, arg, 1) ||
-             !guest_handle_okay(xatpr.idxs, xatpr.size) ||
-             !guest_handle_okay(xatpr.gpfns, xatpr.size) ||
-             !guest_handle_okay(xatpr.errs, xatpr.size) )
+        if ( copy_from_guest(&xatpb, arg, 1) ||
+             !guest_handle_okay(xatpb.idxs, xatpb.size) ||
+             !guest_handle_okay(xatpb.gpfns, xatpb.size) ||
+             !guest_handle_okay(xatpb.errs, xatpb.size) )
             return -EFAULT;
 
         /* This mapspace is unsupported for this hypercall. */
-        if ( xatpr.space == XENMAPSPACE_gmfn_range )
+        if ( xatpb.space == XENMAPSPACE_gmfn_range )
             return -EOPNOTSUPP;
 
-        d = rcu_lock_domain_by_any_id(xatpr.domid);
+        d = rcu_lock_domain_by_any_id(xatpb.domid);
         if ( d == NULL )
             return -ESRCH;
 
@@ -890,7 +890,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             return rc;
         }
 
-        rc = xenmem_add_to_physmap_range(d, &xatpr, start_extent);
+        rc = xenmem_add_to_physmap_batch(d, &xatpb, start_extent);
 
         rcu_unlock_domain(d);
 
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 2e7fb3e..7496556 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -91,7 +91,7 @@
  *
  *   In addition the following arch specific sub-ops:
  *    * XENMEM_add_to_physmap
- *    * XENMEM_add_to_physmap_range
+ *    * XENMEM_add_to_physmap_batch
  *
  *  HYPERVISOR_domctl
  *   All generic sub-operations, with the exception of:
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 7a26dee..f19ac14 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -207,8 +207,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_mapping_t);
 #define XENMAPSPACE_gmfn         2 /* GMFN */
 #define XENMAPSPACE_gmfn_range   3 /* GMFN range, XENMEM_add_to_physmap only. */
 #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another dom,
-                                    * XENMEM_add_to_physmap_range only.
-                                    */
+                                    * XENMEM_add_to_physmap_batch only. */
 /* ` } */
 
 /*
@@ -238,8 +237,8 @@ typedef struct xen_add_to_physmap xen_add_to_physmap_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
 /* A batched version of add_to_physmap. */
-#define XENMEM_add_to_physmap_range 23
-struct xen_add_to_physmap_range {
+#define XENMEM_add_to_physmap_batch 23
+struct xen_add_to_physmap_batch {
     /* IN */
     /* Which domain to change the mapping for. */
     domid_t domid;
@@ -260,8 +259,15 @@ struct xen_add_to_physmap_range {
     /* Per index error code. */
     XEN_GUEST_HANDLE(int) errs;
 };
-typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t;
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_batch_t;
+DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_batch_t);
+
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define XENMEM_add_to_physmap_range XENMEM_add_to_physmap_batch
+#define xen_add_to_physmap_range xen_add_to_physmap_batch
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_range_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
+#endif
 
 /*
  * Unmaps the page appearing at a particular GPFN from the specified guest's
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CnX-00054G-H4; Thu, 09 Jan 2014 10:25:11 +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 1W1CnV-00053q-VK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:10 +0000
Received: from [193.109.254.147:46434] by server-11.bemta-14.messagelabs.com
	id D7/81-20576-5097EC25; Thu, 09 Jan 2014 10:25:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1389263107!9778850!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21507 invoked from network); 9 Jan 2014 10:25:08 -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;
	9 Jan 2014 10:25:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnT-00010V-GM
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnT-0002B8-F3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:07 +0000
Date: Thu, 09 Jan 2014 10:25:07 +0000
Message-Id: <E1W1CnT-0002B8-F3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] compat wrapper for
	XENMEM_add_to_physmap_batch
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 244ce6f42d1843c02be36ed808452df570378cb1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Jan 8 09:06:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:06:07 2014 +0100

    compat wrapper for XENMEM_add_to_physmap_batch
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/compat/memory.c |   60 ++++++++++++++++++++++++++++++++++++++++++++
 xen/include/xlat.lst       |    1 +
 2 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 7692b5b..4fae02a 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -27,12 +27,14 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
             struct xen_memory_reservation *rsrv;
             struct xen_memory_exchange *xchg;
             struct xen_add_to_physmap *atp;
+            struct xen_add_to_physmap_batch *atpb;
             struct xen_remove_from_physmap *xrfp;
         } nat;
         union {
             struct compat_memory_reservation rsrv;
             struct compat_memory_exchange xchg;
             struct compat_add_to_physmap atp;
+            struct compat_add_to_physmap_batch atpb;
         } cmp;
 
         set_xen_guest_handle(nat.hnd, COMPAT_ARG_XLAT_VIRT_BASE);
@@ -200,6 +202,60 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
 
             break;
 
+        case XENMEM_add_to_physmap_batch:
+        {
+            unsigned int limit = (COMPAT_ARG_XLAT_SIZE - sizeof(*nat.atpb))
+                                 / (sizeof(nat.atpb->idxs.p) + sizeof(nat.atpb->gpfns.p));
+            xen_ulong_t *idxs = (void *)(nat.atpb + 1);
+            xen_pfn_t *gpfns = (void *)(idxs + limit);
+
+            if ( copy_from_guest(&cmp.atpb, compat, 1) ||
+                 !compat_handle_okay(cmp.atpb.idxs, cmp.atpb.size) ||
+                 !compat_handle_okay(cmp.atpb.gpfns, cmp.atpb.size) ||
+                 !compat_handle_okay(cmp.atpb.errs, cmp.atpb.size) )
+                return -EFAULT;
+
+            end_extent = start_extent + limit;
+            if ( end_extent > cmp.atpb.size )
+                end_extent = cmp.atpb.size;
+
+            idxs -= start_extent;
+            gpfns -= start_extent;
+
+            for ( i = start_extent; i < end_extent; ++i )
+            {
+                compat_ulong_t idx;
+                compat_pfn_t gpfn;
+
+                if ( __copy_from_compat_offset(&idx, cmp.atpb.idxs, i, 1) ||
+                     __copy_from_compat_offset(&gpfn, cmp.atpb.gpfns, i, 1) )
+                    return -EFAULT;
+                idxs[i] = idx;
+                gpfns[i] = gpfn;
+            }
+
+#define XLAT_add_to_physmap_batch_HNDL_idxs(_d_, _s_) \
+            set_xen_guest_handle((_d_)->idxs, idxs)
+#define XLAT_add_to_physmap_batch_HNDL_gpfns(_d_, _s_) \
+            set_xen_guest_handle((_d_)->gpfns, gpfns)
+#define XLAT_add_to_physmap_batch_HNDL_errs(_d_, _s_) \
+            guest_from_compat_handle((_d_)->errs, (_s_)->errs)
+
+            XLAT_add_to_physmap_batch(nat.atpb, &cmp.atpb);
+
+#undef XLAT_add_to_physmap_batch_HNDL_errs
+#undef XLAT_add_to_physmap_batch_HNDL_gpfns
+#undef XLAT_add_to_physmap_batch_HNDL_idxs
+
+            if ( end_extent < cmp.atpb.size )
+            {
+                nat.atpb->size = end_extent;
+                ++split;
+            }
+
+            break;
+        }
+
         case XENMEM_remove_from_physmap:
         {
             struct compat_remove_from_physmap cmp;
@@ -321,6 +377,10 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
             break;
         }
 
+        case XENMEM_add_to_physmap_batch:
+            start_extent = end_extent;
+            break;
+
         case XENMEM_maximum_ram_page:
         case XENMEM_current_reservation:
         case XENMEM_maximum_reservation:
diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index f00cef3..8caede6 100644
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -55,6 +55,7 @@
 !	kexec_image			kexec.h
 !	kexec_range			kexec.h
 !	add_to_physmap			memory.h
+!	add_to_physmap_batch		memory.h
 !	foreign_memory_map		memory.h
 !	memory_exchange			memory.h
 !	memory_map			memory.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 Thu Jan 09 10:25:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CnX-00054G-H4; Thu, 09 Jan 2014 10:25:11 +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 1W1CnV-00053q-VK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:10 +0000
Received: from [193.109.254.147:46434] by server-11.bemta-14.messagelabs.com
	id D7/81-20576-5097EC25; Thu, 09 Jan 2014 10:25:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1389263107!9778850!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21507 invoked from network); 9 Jan 2014 10:25:08 -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;
	9 Jan 2014 10:25:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnT-00010V-GM
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CnT-0002B8-F3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:07 +0000
Date: Thu, 09 Jan 2014 10:25:07 +0000
Message-Id: <E1W1CnT-0002B8-F3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] compat wrapper for
	XENMEM_add_to_physmap_batch
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 244ce6f42d1843c02be36ed808452df570378cb1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Jan 8 09:06:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:06:07 2014 +0100

    compat wrapper for XENMEM_add_to_physmap_batch
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/compat/memory.c |   60 ++++++++++++++++++++++++++++++++++++++++++++
 xen/include/xlat.lst       |    1 +
 2 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 7692b5b..4fae02a 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -27,12 +27,14 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
             struct xen_memory_reservation *rsrv;
             struct xen_memory_exchange *xchg;
             struct xen_add_to_physmap *atp;
+            struct xen_add_to_physmap_batch *atpb;
             struct xen_remove_from_physmap *xrfp;
         } nat;
         union {
             struct compat_memory_reservation rsrv;
             struct compat_memory_exchange xchg;
             struct compat_add_to_physmap atp;
+            struct compat_add_to_physmap_batch atpb;
         } cmp;
 
         set_xen_guest_handle(nat.hnd, COMPAT_ARG_XLAT_VIRT_BASE);
@@ -200,6 +202,60 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
 
             break;
 
+        case XENMEM_add_to_physmap_batch:
+        {
+            unsigned int limit = (COMPAT_ARG_XLAT_SIZE - sizeof(*nat.atpb))
+                                 / (sizeof(nat.atpb->idxs.p) + sizeof(nat.atpb->gpfns.p));
+            xen_ulong_t *idxs = (void *)(nat.atpb + 1);
+            xen_pfn_t *gpfns = (void *)(idxs + limit);
+
+            if ( copy_from_guest(&cmp.atpb, compat, 1) ||
+                 !compat_handle_okay(cmp.atpb.idxs, cmp.atpb.size) ||
+                 !compat_handle_okay(cmp.atpb.gpfns, cmp.atpb.size) ||
+                 !compat_handle_okay(cmp.atpb.errs, cmp.atpb.size) )
+                return -EFAULT;
+
+            end_extent = start_extent + limit;
+            if ( end_extent > cmp.atpb.size )
+                end_extent = cmp.atpb.size;
+
+            idxs -= start_extent;
+            gpfns -= start_extent;
+
+            for ( i = start_extent; i < end_extent; ++i )
+            {
+                compat_ulong_t idx;
+                compat_pfn_t gpfn;
+
+                if ( __copy_from_compat_offset(&idx, cmp.atpb.idxs, i, 1) ||
+                     __copy_from_compat_offset(&gpfn, cmp.atpb.gpfns, i, 1) )
+                    return -EFAULT;
+                idxs[i] = idx;
+                gpfns[i] = gpfn;
+            }
+
+#define XLAT_add_to_physmap_batch_HNDL_idxs(_d_, _s_) \
+            set_xen_guest_handle((_d_)->idxs, idxs)
+#define XLAT_add_to_physmap_batch_HNDL_gpfns(_d_, _s_) \
+            set_xen_guest_handle((_d_)->gpfns, gpfns)
+#define XLAT_add_to_physmap_batch_HNDL_errs(_d_, _s_) \
+            guest_from_compat_handle((_d_)->errs, (_s_)->errs)
+
+            XLAT_add_to_physmap_batch(nat.atpb, &cmp.atpb);
+
+#undef XLAT_add_to_physmap_batch_HNDL_errs
+#undef XLAT_add_to_physmap_batch_HNDL_gpfns
+#undef XLAT_add_to_physmap_batch_HNDL_idxs
+
+            if ( end_extent < cmp.atpb.size )
+            {
+                nat.atpb->size = end_extent;
+                ++split;
+            }
+
+            break;
+        }
+
         case XENMEM_remove_from_physmap:
         {
             struct compat_remove_from_physmap cmp;
@@ -321,6 +377,10 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
             break;
         }
 
+        case XENMEM_add_to_physmap_batch:
+            start_extent = end_extent;
+            break;
+
         case XENMEM_maximum_ram_page:
         case XENMEM_current_reservation:
         case XENMEM_maximum_reservation:
diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index f00cef3..8caede6 100644
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -55,6 +55,7 @@
 !	kexec_image			kexec.h
 !	kexec_range			kexec.h
 !	add_to_physmap			memory.h
+!	add_to_physmap_batch		memory.h
 !	foreign_memory_map		memory.h
 !	memory_exchange			memory.h
 !	memory_map			memory.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 Thu Jan 09 10:25:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Cnh-00056Y-Jr; Thu, 09 Jan 2014 10:25:21 +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 1W1Cng-00056B-I5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:20 +0000
Received: from [85.158.139.211:17186] by server-11.bemta-5.messagelabs.com id
	C0/73-23268-F097EC25; Thu, 09 Jan 2014 10:25:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263118!8556197!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30947 invoked from network); 9 Jan 2014 10:25:19 -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;
	9 Jan 2014 10:25: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 1W1Cnd-00010f-LL
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnd-0002Bc-Jj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:17 +0000
Date: Thu, 09 Jan 2014 10:25:17 +0000
Message-Id: <E1W1Cnd-0002Bc-Jj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e019c606f598eb76585cc5d26a242a40dfc4d580
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Jan 8 09:15:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:15:03 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index de76ada..6c16399 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Cnh-00056Y-Jr; Thu, 09 Jan 2014 10:25:21 +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 1W1Cng-00056B-I5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:20 +0000
Received: from [85.158.139.211:17186] by server-11.bemta-5.messagelabs.com id
	C0/73-23268-F097EC25; Thu, 09 Jan 2014 10:25:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389263118!8556197!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30947 invoked from network); 9 Jan 2014 10:25:19 -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;
	9 Jan 2014 10:25: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 1W1Cnd-00010f-LL
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnd-0002Bc-Jj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:17 +0000
Date: Thu, 09 Jan 2014 10:25:17 +0000
Message-Id: <E1W1Cnd-0002Bc-Jj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e019c606f598eb76585cc5d26a242a40dfc4d580
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Jan 8 09:15:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:15:03 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index de76ada..6c16399 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Cnr-000591-Ms; Thu, 09 Jan 2014 10:25: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 1W1Cnq-00058Z-Jp
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:30 +0000
Received: from [85.158.139.211:24103] by server-11.bemta-5.messagelabs.com id
	FA/D3-23268-9197EC25; Thu, 09 Jan 2014 10:25:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389263128!8742844!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19953 invoked from network); 9 Jan 2014 10:25:29 -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;
	9 Jan 2014 10:25: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 1W1Cnn-00010l-Pc
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnn-0002C4-OT
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:27 +0000
Date: Thu, 09 Jan 2014 10:25:27 +0000
Message-Id: <E1W1Cnn-0002C4-OT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] firmware: change level-triggered GPE
	event to a edge one for qemu-xen
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 44219e14e3e3514af7d1416041db034e98988868
Author:     Anthony PERARD <anthony.perard@citrix.com>
AuthorDate: Wed Jan 8 09:17:55 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:17:55 2014 +0100

    firmware: change level-triggered GPE event to a edge one for qemu-xen
    
    This should help to reduce a CPU hotplug race window where a cpu hotplug
    event while not be seen by the OS.
    
    When hotplugging more than one vcpu, some of those vcpus might not be
    seen as plugged by the guest.
    
    This is what is currently happenning:
    
    1. hw adds cpu, sets GPE.2 bit and sends SCI
    2. OSPM gets SCI, reads GPE00.sts and masks GPE.2 bit in GPE00.en
    3. OSPM executes _L02 (level-triggered event associate to cpu hotplug)
    4. hw adds second cpu and sets GPE.2 bit but SCI is not asserted
        since GPE00.en masks event
    5. OSPM resets GPE.2 bit in GPE00.sts and umasks it in GPE00.en
    
    as result event for step 4 is lost because step 5 clears it and OS
    will not see added second cpu.
    
    ACPI 50 spec: 5.6.4 General-Purpose Event Handling
    defines GPE event handling as following:
    
    1. Disables the interrupt source (GPEx_BLK EN bit).
    2. If an edge event, clears the status bit.
    3. Performs one of the following:
    * Dispatches to an ACPI-aware device driver.
    * Queues the matching control method for execution.
    * Manages a wake event using device _PRW objects.
    4. If a level event, clears the status bit.
    5. Enables the interrupt source.
    
    So, by using edge-triggered General-Purpose Event instead of a
    level-triggered GPE, OSPM is less likely to clear the status bit of the
    addition of the second CPU. On step 5, QEMU will resend an interrupt if
    the status bit is set.
    
    This description apply also for PCI hotplug since the same step are
    followed by QEMU, so we also change the GPE event type for PCI hotplug.
    
    This does not apply to qemu-xen-traditional because it does not resend
    an interrupt if necessary as a result of step 5.
    
    Patch and description inspired by SeaBIOS's commit:
    Replace level gpe event with edge gpe event for hot-plug handlers
    9c6635bd48d39a1d17d0a73df6e577ef6bd0037c
    from Igor Mammedov <imammedo@redhat.com>
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 tools/firmware/hvmloader/acpi/mk_dsdt.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/firmware/hvmloader/acpi/mk_dsdt.c b/tools/firmware/hvmloader/acpi/mk_dsdt.c
index 996f30b..a4b693b 100644
--- a/tools/firmware/hvmloader/acpi/mk_dsdt.c
+++ b/tools/firmware/hvmloader/acpi/mk_dsdt.c
@@ -220,9 +220,13 @@ int main(int argc, char **argv)
 
     pop_block();
 
-    /* Define GPE control method '_L02'. */
+    /* Define GPE control method. */
     push_block("Scope", "\\_GPE");
-    push_block("Method", "_L02");
+    if (dm_version == QEMU_XEN_TRADITIONAL) {
+        push_block("Method", "_L02");
+    } else {
+        push_block("Method", "_E02");
+    }
     stmt("Return", "\\_SB.PRSC()");
     pop_block();
     pop_block();
@@ -428,7 +432,7 @@ int main(int argc, char **argv)
         decision_tree(0x00, 0x100, "SLT", pci_hotplug_notify);
         pop_block();
     } else {
-        push_block("Method", "_L01");
+        push_block("Method", "_E01");
         for (slot = 1; slot <= 31; slot++) {
             push_block("If", "And(PCIU, ShiftLeft(1, %i))", slot);
             stmt("Notify", "\\_SB.PCI0.S%i, 1", slot);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Cnr-000591-Ms; Thu, 09 Jan 2014 10:25: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 1W1Cnq-00058Z-Jp
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:30 +0000
Received: from [85.158.139.211:24103] by server-11.bemta-5.messagelabs.com id
	FA/D3-23268-9197EC25; Thu, 09 Jan 2014 10:25:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389263128!8742844!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19953 invoked from network); 9 Jan 2014 10:25:29 -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;
	9 Jan 2014 10:25: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 1W1Cnn-00010l-Pc
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnn-0002C4-OT
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:27 +0000
Date: Thu, 09 Jan 2014 10:25:27 +0000
Message-Id: <E1W1Cnn-0002C4-OT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] firmware: change level-triggered GPE
	event to a edge one for qemu-xen
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 44219e14e3e3514af7d1416041db034e98988868
Author:     Anthony PERARD <anthony.perard@citrix.com>
AuthorDate: Wed Jan 8 09:17:55 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 8 09:17:55 2014 +0100

    firmware: change level-triggered GPE event to a edge one for qemu-xen
    
    This should help to reduce a CPU hotplug race window where a cpu hotplug
    event while not be seen by the OS.
    
    When hotplugging more than one vcpu, some of those vcpus might not be
    seen as plugged by the guest.
    
    This is what is currently happenning:
    
    1. hw adds cpu, sets GPE.2 bit and sends SCI
    2. OSPM gets SCI, reads GPE00.sts and masks GPE.2 bit in GPE00.en
    3. OSPM executes _L02 (level-triggered event associate to cpu hotplug)
    4. hw adds second cpu and sets GPE.2 bit but SCI is not asserted
        since GPE00.en masks event
    5. OSPM resets GPE.2 bit in GPE00.sts and umasks it in GPE00.en
    
    as result event for step 4 is lost because step 5 clears it and OS
    will not see added second cpu.
    
    ACPI 50 spec: 5.6.4 General-Purpose Event Handling
    defines GPE event handling as following:
    
    1. Disables the interrupt source (GPEx_BLK EN bit).
    2. If an edge event, clears the status bit.
    3. Performs one of the following:
    * Dispatches to an ACPI-aware device driver.
    * Queues the matching control method for execution.
    * Manages a wake event using device _PRW objects.
    4. If a level event, clears the status bit.
    5. Enables the interrupt source.
    
    So, by using edge-triggered General-Purpose Event instead of a
    level-triggered GPE, OSPM is less likely to clear the status bit of the
    addition of the second CPU. On step 5, QEMU will resend an interrupt if
    the status bit is set.
    
    This description apply also for PCI hotplug since the same step are
    followed by QEMU, so we also change the GPE event type for PCI hotplug.
    
    This does not apply to qemu-xen-traditional because it does not resend
    an interrupt if necessary as a result of step 5.
    
    Patch and description inspired by SeaBIOS's commit:
    Replace level gpe event with edge gpe event for hot-plug handlers
    9c6635bd48d39a1d17d0a73df6e577ef6bd0037c
    from Igor Mammedov <imammedo@redhat.com>
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 tools/firmware/hvmloader/acpi/mk_dsdt.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/firmware/hvmloader/acpi/mk_dsdt.c b/tools/firmware/hvmloader/acpi/mk_dsdt.c
index 996f30b..a4b693b 100644
--- a/tools/firmware/hvmloader/acpi/mk_dsdt.c
+++ b/tools/firmware/hvmloader/acpi/mk_dsdt.c
@@ -220,9 +220,13 @@ int main(int argc, char **argv)
 
     pop_block();
 
-    /* Define GPE control method '_L02'. */
+    /* Define GPE control method. */
     push_block("Scope", "\\_GPE");
-    push_block("Method", "_L02");
+    if (dm_version == QEMU_XEN_TRADITIONAL) {
+        push_block("Method", "_L02");
+    } else {
+        push_block("Method", "_E02");
+    }
     stmt("Return", "\\_SB.PRSC()");
     pop_block();
     pop_block();
@@ -428,7 +432,7 @@ int main(int argc, char **argv)
         decision_tree(0x00, 0x100, "SLT", pci_hotplug_notify);
         pop_block();
     } else {
-        push_block("Method", "_L01");
+        push_block("Method", "_E01");
         for (slot = 1; slot <= 31; slot++) {
             push_block("If", "And(PCIU, ShiftLeft(1, %i))", slot);
             stmt("Notify", "\\_SB.PCI0.S%i, 1", slot);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 09 10:25:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Co2-0005DD-Pi; Thu, 09 Jan 2014 10:25:42 +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 1W1Co0-0005Bf-Oj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:40 +0000
Received: from [85.158.139.211:35125] by server-13.bemta-5.messagelabs.com id
	A0/E3-11357-4297EC25; Thu, 09 Jan 2014 10:25:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1389263138!8744124!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8952 invoked from network); 9 Jan 2014 10:25:39 -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;
	9 Jan 2014 10:25: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 1W1Cnx-00010t-UL
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnx-0002CU-T3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:37 +0000
Date: Thu, 09 Jan 2014 10:25:37 +0000
Message-Id: <E1W1Cnx-0002CU-T3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: use int64 for timeval
	fields in the timeout_register callback
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 56e43525ddc20aeda309ac19ac1104a1b171cb16
Author:     Rob Hoes <rob.hoes@citrix.com>
AuthorDate: Thu Dec 12 16:36:50 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 14:11:17 2014 +0000

    libxl: ocaml: use int64 for timeval fields in the timeout_register callback
    
    The original code works fine on 64-bit, but on 32-bit, the OCaml int (which is
    1 bit smaller than the C int) is likely to overflow.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/ocaml/libs/xl/xenlight.mli.in  |    2 +-
 tools/ocaml/libs/xl/xenlight_stubs.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/ocaml/libs/xl/xenlight.mli.in b/tools/ocaml/libs/xl/xenlight.mli.in
index 794dbf1..b9819e1 100644
--- a/tools/ocaml/libs/xl/xenlight.mli.in
+++ b/tools/ocaml/libs/xl/xenlight.mli.in
@@ -71,7 +71,7 @@ module Async : sig
 		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> unit) ->
 		fd_modify:('a -> Unix.file_descr -> event list -> unit) ->
 		fd_deregister:('a -> Unix.file_descr -> unit) ->
-		timeout_register:('a -> int -> int -> for_libxl -> unit) ->
+		timeout_register:('a -> int64 -> int64 -> for_libxl -> unit) ->
 		timeout_modify:('a -> unit) ->
 		osevent_hooks
 
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index a61c222..2e2606a 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -1286,6 +1286,7 @@ int timeout_register(void *user, void **for_app_registration_out,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
+	CAMLlocal2(sec, usec);
 	CAMLlocalN(args, 4);
 	static value *func = NULL;
 	value *p = (value *) user;
@@ -1295,9 +1296,12 @@ int timeout_register(void *user, void **for_app_registration_out,
 		func = caml_named_value("libxl_timeout_register");
 	}
 
+	sec = caml_copy_int64(abs.tv_sec);
+	usec = caml_copy_int64(abs.tv_usec);
+
 	args[0] = *p;
-	args[1] = Val_int(abs.tv_sec);
-	args[2] = Val_int(abs.tv_usec);
+	args[1] = sec;
+	args[2] = usec;
 	args[3] = (value) for_libxl;
 
 	caml_callbackN(*func, 4, 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 Thu Jan 09 10:25:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1Co2-0005DD-Pi; Thu, 09 Jan 2014 10:25:42 +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 1W1Co0-0005Bf-Oj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:40 +0000
Received: from [85.158.139.211:35125] by server-13.bemta-5.messagelabs.com id
	A0/E3-11357-4297EC25; Thu, 09 Jan 2014 10:25:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1389263138!8744124!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8952 invoked from network); 9 Jan 2014 10:25:39 -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;
	9 Jan 2014 10:25: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 1W1Cnx-00010t-UL
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Cnx-0002CU-T3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:37 +0000
Date: Thu, 09 Jan 2014 10:25:37 +0000
Message-Id: <E1W1Cnx-0002CU-T3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: use int64 for timeval
	fields in the timeout_register callback
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 56e43525ddc20aeda309ac19ac1104a1b171cb16
Author:     Rob Hoes <rob.hoes@citrix.com>
AuthorDate: Thu Dec 12 16:36:50 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 14:11:17 2014 +0000

    libxl: ocaml: use int64 for timeval fields in the timeout_register callback
    
    The original code works fine on 64-bit, but on 32-bit, the OCaml int (which is
    1 bit smaller than the C int) is likely to overflow.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/ocaml/libs/xl/xenlight.mli.in  |    2 +-
 tools/ocaml/libs/xl/xenlight_stubs.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/ocaml/libs/xl/xenlight.mli.in b/tools/ocaml/libs/xl/xenlight.mli.in
index 794dbf1..b9819e1 100644
--- a/tools/ocaml/libs/xl/xenlight.mli.in
+++ b/tools/ocaml/libs/xl/xenlight.mli.in
@@ -71,7 +71,7 @@ module Async : sig
 		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> unit) ->
 		fd_modify:('a -> Unix.file_descr -> event list -> unit) ->
 		fd_deregister:('a -> Unix.file_descr -> unit) ->
-		timeout_register:('a -> int -> int -> for_libxl -> unit) ->
+		timeout_register:('a -> int64 -> int64 -> for_libxl -> unit) ->
 		timeout_modify:('a -> unit) ->
 		osevent_hooks
 
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index a61c222..2e2606a 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -1286,6 +1286,7 @@ int timeout_register(void *user, void **for_app_registration_out,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
+	CAMLlocal2(sec, usec);
 	CAMLlocalN(args, 4);
 	static value *func = NULL;
 	value *p = (value *) user;
@@ -1295,9 +1296,12 @@ int timeout_register(void *user, void **for_app_registration_out,
 		func = caml_named_value("libxl_timeout_register");
 	}
 
+	sec = caml_copy_int64(abs.tv_sec);
+	usec = caml_copy_int64(abs.tv_usec);
+
 	args[0] = *p;
-	args[1] = Val_int(abs.tv_sec);
-	args[2] = Val_int(abs.tv_usec);
+	args[1] = sec;
+	args[2] = usec;
 	args[3] = (value) for_libxl;
 
 	caml_callbackN(*func, 4, 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 Thu Jan 09 10:25:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CoC-0005IM-SW; Thu, 09 Jan 2014 10:25:52 +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 1W1CoA-0005Hr-O2
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:51 +0000
Received: from [85.158.143.35:11590] by server-1.bemta-4.messagelabs.com id
	92/7D-02132-E297EC25; Thu, 09 Jan 2014 10:25:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1389263148!7956317!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29564 invoked from network); 9 Jan 2014 10:25:49 -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;
	9 Jan 2014 10:25: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 1W1Co8-000112-3G
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Co8-0002LE-28
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:48 +0000
Date: Thu, 09 Jan 2014 10:25:48 +0000
Message-Id: <E1W1Co8-0002LE-28@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: create VFB for PV guest when VNC
	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 706d4ab74b817e9bfccd2bb396a8511dc170051f
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Tue Dec 17 22:53:45 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 14:15:17 2014 +0000

    xl: create VFB for PV guest when VNC is specified
    
    This replicates a Xend behavior. When you specify 'vnc=1' and there's no
    'vfb=[]' in a PV guest's config file, xl parses all top level VNC options and
    creates a VFB for you.
    
    Fixes bug #25.
    http://bugs.xenproject.org/xen/bug/25
    
    Reported-by: Konrad Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/xl_cmdimpl.c |   78 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 55 insertions(+), 23 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index dce2699..c30f495 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -327,6 +327,16 @@ static void *xrealloc(void *ptr, size_t sz) {
     return r;
 }
 
+#define ARRAY_EXTEND_INIT(array,count,initfn)                           \
+    ({                                                                  \
+        typeof((count)) array_extend_old_count = (count);               \
+        (count)++;                                                      \
+        (array) = xrealloc((array), sizeof(*array) * (count));          \
+        (initfn)(&(array)[array_extend_old_count]);                     \
+        (array)[array_extend_old_count].devid = array_extend_old_count; \
+        &(array)[array_extend_old_count];                               \
+    })
+
 #define LOG(_f, _a...)   dolog(__FILE__, __LINE__, __func__, _f "\n", ##_a)
 
 static void dolog(const char *file, int line, const char *func, char *fmt, ...)
@@ -698,6 +708,19 @@ static int vcpupin_parse(char *cpu, libxl_bitmap *cpumap)
     return rc;
 }
 
+static void parse_top_level_vnc_options(XLU_Config *config,
+                                        libxl_vnc_info *vnc)
+{
+    long l;
+
+    xlu_cfg_get_defbool(config, "vnc", &vnc->enable, 0);
+    xlu_cfg_replace_string (config, "vnclisten", &vnc->listen, 0);
+    xlu_cfg_replace_string (config, "vncpasswd", &vnc->passwd, 0);
+    if (!xlu_cfg_get_long (config, "vncdisplay", &l, 0))
+        vnc->display = l;
+    xlu_cfg_get_defbool(config, "vncunused", &vnc->findunused, 0);
+}
+
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -1369,11 +1392,12 @@ skip_nic:
         fprintf(stderr, "WARNING: vif2: netchannel2 is deprecated and not supported by xl\n");
     }
 
+    d_config->num_vfbs = 0;
+    d_config->num_vkbs = 0;
+    d_config->vfbs = NULL;
+    d_config->vkbs = NULL;
+
     if (!xlu_cfg_get_list (config, "vfb", &cvfbs, 0, 0)) {
-        d_config->num_vfbs = 0;
-        d_config->num_vkbs = 0;
-        d_config->vfbs = NULL;
-        d_config->vkbs = NULL;
         while ((buf = xlu_cfg_get_listitem (cvfbs, d_config->num_vfbs)) != NULL) {
             libxl_device_vfb *vfb;
             libxl_device_vkb *vkb;
@@ -1381,15 +1405,11 @@ skip_nic:
             char *buf2 = strdup(buf);
             char *p, *p2;
 
-            d_config->vfbs = (libxl_device_vfb *) realloc(d_config->vfbs, sizeof(libxl_device_vfb) * (d_config->num_vfbs + 1));
-            vfb = d_config->vfbs + d_config->num_vfbs;
-            libxl_device_vfb_init(vfb);
-            vfb->devid = d_config->num_vfbs;
+            vfb = ARRAY_EXTEND_INIT(d_config->vfbs, d_config->num_vfbs,
+                                    libxl_device_vfb_init);
 
-            d_config->vkbs = (libxl_device_vkb *) realloc(d_config->vkbs, sizeof(libxl_device_vkb) * (d_config->num_vkbs + 1));
-            vkb = d_config->vkbs + d_config->num_vkbs;
-            libxl_device_vkb_init(vkb);
-            vkb->devid = d_config->num_vkbs;
+            vkb = ARRAY_EXTEND_INIT(d_config->vkbs, d_config->num_vkbs,
+                                    libxl_device_vkb_init);
 
             p = strtok(buf2, ",");
             if (!p)
@@ -1430,8 +1450,6 @@ skip_nic:
 
 skip_vfb:
             free(buf2);
-            d_config->num_vfbs++;
-            d_config->num_vkbs++;
         }
     }
 
@@ -1620,6 +1638,29 @@ skip_vfb:
 
 #undef parse_extra_args
 
+    /* If we've already got vfb=[] for PV guest then ignore top level
+     * VNC config. */
+    if (c_info->type == LIBXL_DOMAIN_TYPE_PV && !d_config->num_vfbs) {
+        long vnc_enabled = 0;
+
+        if (!xlu_cfg_get_long (config, "vnc", &l, 0))
+            vnc_enabled = l;
+
+        if (vnc_enabled) {
+            libxl_device_vfb *vfb;
+            libxl_device_vkb *vkb;
+
+            vfb = ARRAY_EXTEND_INIT(d_config->vfbs, d_config->num_vfbs,
+                                    libxl_device_vfb_init);
+
+            vkb = ARRAY_EXTEND_INIT(d_config->vkbs, d_config->num_vkbs,
+                                    libxl_device_vkb_init);
+
+            parse_top_level_vnc_options(config, &vfb->vnc);
+        }
+    } else
+        parse_top_level_vnc_options(config, &b_info->u.hvm.vnc);
+
     if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
         if (!xlu_cfg_get_string (config, "vga", &buf, 0)) {
             if (!strcmp(buf, "stdvga")) {
@@ -1634,15 +1675,6 @@ skip_vfb:
             b_info->u.hvm.vga.kind = l ? LIBXL_VGA_INTERFACE_TYPE_STD :
                                          LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
 
-        xlu_cfg_get_defbool(config, "vnc", &b_info->u.hvm.vnc.enable, 0);
-        xlu_cfg_replace_string (config, "vnclisten",
-                                &b_info->u.hvm.vnc.listen, 0);
-        xlu_cfg_replace_string (config, "vncpasswd",
-                                &b_info->u.hvm.vnc.passwd, 0);
-        if (!xlu_cfg_get_long (config, "vncdisplay", &l, 0))
-            b_info->u.hvm.vnc.display = l;
-        xlu_cfg_get_defbool(config, "vncunused",
-                            &b_info->u.hvm.vnc.findunused, 0);
         xlu_cfg_replace_string (config, "keymap", &b_info->u.hvm.keymap, 0);
         xlu_cfg_get_defbool(config, "sdl", &b_info->u.hvm.sdl.enable, 0);
         xlu_cfg_get_defbool(config, "opengl", &b_info->u.hvm.sdl.opengl, 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 Thu Jan 09 10:25:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:25: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 1W1CoC-0005IM-SW; Thu, 09 Jan 2014 10:25:52 +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 1W1CoA-0005Hr-O2
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:51 +0000
Received: from [85.158.143.35:11590] by server-1.bemta-4.messagelabs.com id
	92/7D-02132-E297EC25; Thu, 09 Jan 2014 10:25:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1389263148!7956317!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29564 invoked from network); 9 Jan 2014 10:25:49 -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;
	9 Jan 2014 10:25: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 1W1Co8-000112-3G
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1Co8-0002LE-28
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:48 +0000
Date: Thu, 09 Jan 2014 10:25:48 +0000
Message-Id: <E1W1Co8-0002LE-28@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: create VFB for PV guest when VNC
	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 706d4ab74b817e9bfccd2bb396a8511dc170051f
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Tue Dec 17 22:53:45 2013 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 14:15:17 2014 +0000

    xl: create VFB for PV guest when VNC is specified
    
    This replicates a Xend behavior. When you specify 'vnc=1' and there's no
    'vfb=[]' in a PV guest's config file, xl parses all top level VNC options and
    creates a VFB for you.
    
    Fixes bug #25.
    http://bugs.xenproject.org/xen/bug/25
    
    Reported-by: Konrad Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/xl_cmdimpl.c |   78 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 55 insertions(+), 23 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index dce2699..c30f495 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -327,6 +327,16 @@ static void *xrealloc(void *ptr, size_t sz) {
     return r;
 }
 
+#define ARRAY_EXTEND_INIT(array,count,initfn)                           \
+    ({                                                                  \
+        typeof((count)) array_extend_old_count = (count);               \
+        (count)++;                                                      \
+        (array) = xrealloc((array), sizeof(*array) * (count));          \
+        (initfn)(&(array)[array_extend_old_count]);                     \
+        (array)[array_extend_old_count].devid = array_extend_old_count; \
+        &(array)[array_extend_old_count];                               \
+    })
+
 #define LOG(_f, _a...)   dolog(__FILE__, __LINE__, __func__, _f "\n", ##_a)
 
 static void dolog(const char *file, int line, const char *func, char *fmt, ...)
@@ -698,6 +708,19 @@ static int vcpupin_parse(char *cpu, libxl_bitmap *cpumap)
     return rc;
 }
 
+static void parse_top_level_vnc_options(XLU_Config *config,
+                                        libxl_vnc_info *vnc)
+{
+    long l;
+
+    xlu_cfg_get_defbool(config, "vnc", &vnc->enable, 0);
+    xlu_cfg_replace_string (config, "vnclisten", &vnc->listen, 0);
+    xlu_cfg_replace_string (config, "vncpasswd", &vnc->passwd, 0);
+    if (!xlu_cfg_get_long (config, "vncdisplay", &l, 0))
+        vnc->display = l;
+    xlu_cfg_get_defbool(config, "vncunused", &vnc->findunused, 0);
+}
+
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -1369,11 +1392,12 @@ skip_nic:
         fprintf(stderr, "WARNING: vif2: netchannel2 is deprecated and not supported by xl\n");
     }
 
+    d_config->num_vfbs = 0;
+    d_config->num_vkbs = 0;
+    d_config->vfbs = NULL;
+    d_config->vkbs = NULL;
+
     if (!xlu_cfg_get_list (config, "vfb", &cvfbs, 0, 0)) {
-        d_config->num_vfbs = 0;
-        d_config->num_vkbs = 0;
-        d_config->vfbs = NULL;
-        d_config->vkbs = NULL;
         while ((buf = xlu_cfg_get_listitem (cvfbs, d_config->num_vfbs)) != NULL) {
             libxl_device_vfb *vfb;
             libxl_device_vkb *vkb;
@@ -1381,15 +1405,11 @@ skip_nic:
             char *buf2 = strdup(buf);
             char *p, *p2;
 
-            d_config->vfbs = (libxl_device_vfb *) realloc(d_config->vfbs, sizeof(libxl_device_vfb) * (d_config->num_vfbs + 1));
-            vfb = d_config->vfbs + d_config->num_vfbs;
-            libxl_device_vfb_init(vfb);
-            vfb->devid = d_config->num_vfbs;
+            vfb = ARRAY_EXTEND_INIT(d_config->vfbs, d_config->num_vfbs,
+                                    libxl_device_vfb_init);
 
-            d_config->vkbs = (libxl_device_vkb *) realloc(d_config->vkbs, sizeof(libxl_device_vkb) * (d_config->num_vkbs + 1));
-            vkb = d_config->vkbs + d_config->num_vkbs;
-            libxl_device_vkb_init(vkb);
-            vkb->devid = d_config->num_vkbs;
+            vkb = ARRAY_EXTEND_INIT(d_config->vkbs, d_config->num_vkbs,
+                                    libxl_device_vkb_init);
 
             p = strtok(buf2, ",");
             if (!p)
@@ -1430,8 +1450,6 @@ skip_nic:
 
 skip_vfb:
             free(buf2);
-            d_config->num_vfbs++;
-            d_config->num_vkbs++;
         }
     }
 
@@ -1620,6 +1638,29 @@ skip_vfb:
 
 #undef parse_extra_args
 
+    /* If we've already got vfb=[] for PV guest then ignore top level
+     * VNC config. */
+    if (c_info->type == LIBXL_DOMAIN_TYPE_PV && !d_config->num_vfbs) {
+        long vnc_enabled = 0;
+
+        if (!xlu_cfg_get_long (config, "vnc", &l, 0))
+            vnc_enabled = l;
+
+        if (vnc_enabled) {
+            libxl_device_vfb *vfb;
+            libxl_device_vkb *vkb;
+
+            vfb = ARRAY_EXTEND_INIT(d_config->vfbs, d_config->num_vfbs,
+                                    libxl_device_vfb_init);
+
+            vkb = ARRAY_EXTEND_INIT(d_config->vkbs, d_config->num_vkbs,
+                                    libxl_device_vkb_init);
+
+            parse_top_level_vnc_options(config, &vfb->vnc);
+        }
+    } else
+        parse_top_level_vnc_options(config, &b_info->u.hvm.vnc);
+
     if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
         if (!xlu_cfg_get_string (config, "vga", &buf, 0)) {
             if (!strcmp(buf, "stdvga")) {
@@ -1634,15 +1675,6 @@ skip_vfb:
             b_info->u.hvm.vga.kind = l ? LIBXL_VGA_INTERFACE_TYPE_STD :
                                          LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
 
-        xlu_cfg_get_defbool(config, "vnc", &b_info->u.hvm.vnc.enable, 0);
-        xlu_cfg_replace_string (config, "vnclisten",
-                                &b_info->u.hvm.vnc.listen, 0);
-        xlu_cfg_replace_string (config, "vncpasswd",
-                                &b_info->u.hvm.vnc.passwd, 0);
-        if (!xlu_cfg_get_long (config, "vncdisplay", &l, 0))
-            b_info->u.hvm.vnc.display = l;
-        xlu_cfg_get_defbool(config, "vncunused",
-                            &b_info->u.hvm.vnc.findunused, 0);
         xlu_cfg_replace_string (config, "keymap", &b_info->u.hvm.keymap, 0);
         xlu_cfg_get_defbool(config, "sdl", &b_info->u.hvm.sdl.enable, 0);
         xlu_cfg_get_defbool(config, "opengl", &b_info->u.hvm.sdl.opengl, 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 Thu Jan 09 10:26:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:26: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 1W1CoN-0005L7-1W; Thu, 09 Jan 2014 10:26:03 +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 1W1CoL-0005Km-5z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:26:01 +0000
Received: from [85.158.137.68:44795] by server-8.bemta-3.messagelabs.com id
	71/0D-31081-8397EC25; Thu, 09 Jan 2014 10:26:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389263158!8081538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31061 invoked from network); 9 Jan 2014 10:25:59 -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;
	9 Jan 2014 10:25: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 1W1CoI-00011B-7w
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CoI-0002MJ-6M
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:58 +0000
Date: Thu, 09 Jan 2014 10:25:58 +0000
Message-Id: <E1W1CoI-0002MJ-6M@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] gdbsx: Add Emacs local variables to
	source 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 025c1b755afc9a9f42f71ef167c20fdc616b1d2d
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Tue Jan 7 19:25:44 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 15:13:47 2014 +0000

    gdbsx: Add Emacs local variables to source files.
    
    These 2 files are changed in this patch set.  So add the allowed
    "Emacs local variables" from CODING_STYLE.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |    8 ++++++++
 xen/arch/x86/debug.c              |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 5736b86..0622ebd 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -821,3 +821,11 @@ xg_write_mem(uint64_t guestva, char *frombuf, int buflen, uint64_t pgd3val)
     return iop->remain;
 }
 
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/debug.c b/xen/arch/x86/debug.c
index 3e21ca8..a67a192 100644
--- a/xen/arch/x86/debug.c
+++ b/xen/arch/x86/debug.c
@@ -223,3 +223,11 @@ dbg_rw_mem(dbgva_t addr, dbgbyte_t *buf, int len, domid_t domid, int toaddr,
     return len;
 }
 
+/*
+ * 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 Thu Jan 09 10:26:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 10:26: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 1W1CoN-0005L7-1W; Thu, 09 Jan 2014 10:26:03 +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 1W1CoL-0005Km-5z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:26:01 +0000
Received: from [85.158.137.68:44795] by server-8.bemta-3.messagelabs.com id
	71/0D-31081-8397EC25; Thu, 09 Jan 2014 10:26:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389263158!8081538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31061 invoked from network); 9 Jan 2014 10:25:59 -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;
	9 Jan 2014 10:25: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 1W1CoI-00011B-7w
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1CoI-0002MJ-6M
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 10:25:58 +0000
Date: Thu, 09 Jan 2014 10:25:58 +0000
Message-Id: <E1W1CoI-0002MJ-6M@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] gdbsx: Add Emacs local variables to
	source 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 025c1b755afc9a9f42f71ef167c20fdc616b1d2d
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Tue Jan 7 19:25:44 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 8 15:13:47 2014 +0000

    gdbsx: Add Emacs local variables to source files.
    
    These 2 files are changed in this patch set.  So add the allowed
    "Emacs local variables" from CODING_STYLE.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |    8 ++++++++
 xen/arch/x86/debug.c              |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 5736b86..0622ebd 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -821,3 +821,11 @@ xg_write_mem(uint64_t guestva, char *frombuf, int buflen, uint64_t pgd3val)
     return iop->remain;
 }
 
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/debug.c b/xen/arch/x86/debug.c
index 3e21ca8..a67a192 100644
--- a/xen/arch/x86/debug.c
+++ b/xen/arch/x86/debug.c
@@ -223,3 +223,11 @@ dbg_rw_mem(dbgva_t addr, dbgbyte_t *buf, int len, domid_t domid, int toaddr,
     return len;
 }
 
+/*
+ * 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 Thu Jan 09 12:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 12:33: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 1W1EnM-0000Od-Bk; Thu, 09 Jan 2014 12:33: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 1W1EnK-0000OV-Gs
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:06 +0000
Received: from [193.109.254.147:64683] by server-5.bemta-14.messagelabs.com id
	B1/A2-03510-1079EC25; Thu, 09 Jan 2014 12:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389270784!9812530!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25360 invoked from network); 9 Jan 2014 12:33:04 -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;
	9 Jan 2014 12:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnH-0002Ms-PQ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnH-0005zl-Hr
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:03 +0000
Date: Thu, 09 Jan 2014 12:33:03 +0000
Message-Id: <E1W1EnH-0005zl-Hr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.3-testing] xen_disk: fix memory leak
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5684842851964985066=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 2c4d7159d8a3273e63ce22c7e7544c182f6d2ca5
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Wed Dec 4 15:16:18 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:18 2014 +0000

    xen_disk: fix memory leak
    
    On ioreq_release the full ioreq was memset to 0, losing all the data
    and memory allocations inside the QEMUIOVector, which leads to a
    memory leak. Create a new function to specifically reset ioreq.
    
    Reported-by: Maik Wessler <maik.wessler@yahoo.com>
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    
    Backport to qemu-xen-traditional.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 96b58a44756a8821c108358439b0f2c06e531159)
---
 hw/xen_disk.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index ee8d36f..250d806 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -116,6 +116,29 @@ struct XenBlkDev {
 
 /* ------------------------------------------------------------- */
 
+static void ioreq_reset(struct ioreq *ioreq)
+{
+    memset(&ioreq->req, 0, sizeof(ioreq->req));
+    ioreq->status = 0;
+    ioreq->start = 0;
+    ioreq->presync = 0;
+    ioreq->postsync = 0;
+
+    memset(ioreq->domids, 0, sizeof(ioreq->domids));
+    memset(ioreq->refs, 0, sizeof(ioreq->refs));
+    ioreq->prot = 0;
+    memset(ioreq->page, 0, sizeof(ioreq->page));
+    ioreq->pages = NULL;
+
+    ioreq->aio_inflight = 0;
+    ioreq->aio_errors = 0;
+
+    ioreq->blkdev = NULL;
+    memset(&ioreq->list, 0, sizeof(ioreq->list));
+
+    qemu_iovec_reset(&ioreq->v);
+}
+
 static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 {
     struct ioreq *ioreq = NULL;
@@ -132,7 +155,6 @@ static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 	/* get one from freelist */
 	ioreq = LIST_FIRST(&blkdev->freelist);
 	LIST_REMOVE(ioreq, list);
-        qemu_iovec_reset(&ioreq->v);
     }
     LIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
     blkdev->requests_inflight++;
@@ -156,7 +178,7 @@ static void ioreq_release(struct ioreq *ioreq, bool finish)
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
     LIST_REMOVE(ioreq, list);
-    memset(ioreq, 0, sizeof(*ioreq));
+    ioreq_reset(ioreq);
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
     if (finish) {
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.3-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 12:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 12:33: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 1W1EnM-0000Od-Bk; Thu, 09 Jan 2014 12:33: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 1W1EnK-0000OV-Gs
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:06 +0000
Received: from [193.109.254.147:64683] by server-5.bemta-14.messagelabs.com id
	B1/A2-03510-1079EC25; Thu, 09 Jan 2014 12:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389270784!9812530!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25360 invoked from network); 9 Jan 2014 12:33:04 -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;
	9 Jan 2014 12:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnH-0002Ms-PQ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnH-0005zl-Hr
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:03 +0000
Date: Thu, 09 Jan 2014 12:33:03 +0000
Message-Id: <E1W1EnH-0005zl-Hr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.3-testing] xen_disk: fix memory leak
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5684842851964985066=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 2c4d7159d8a3273e63ce22c7e7544c182f6d2ca5
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Wed Dec 4 15:16:18 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:18 2014 +0000

    xen_disk: fix memory leak
    
    On ioreq_release the full ioreq was memset to 0, losing all the data
    and memory allocations inside the QEMUIOVector, which leads to a
    memory leak. Create a new function to specifically reset ioreq.
    
    Reported-by: Maik Wessler <maik.wessler@yahoo.com>
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    
    Backport to qemu-xen-traditional.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 96b58a44756a8821c108358439b0f2c06e531159)
---
 hw/xen_disk.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index ee8d36f..250d806 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -116,6 +116,29 @@ struct XenBlkDev {
 
 /* ------------------------------------------------------------- */
 
+static void ioreq_reset(struct ioreq *ioreq)
+{
+    memset(&ioreq->req, 0, sizeof(ioreq->req));
+    ioreq->status = 0;
+    ioreq->start = 0;
+    ioreq->presync = 0;
+    ioreq->postsync = 0;
+
+    memset(ioreq->domids, 0, sizeof(ioreq->domids));
+    memset(ioreq->refs, 0, sizeof(ioreq->refs));
+    ioreq->prot = 0;
+    memset(ioreq->page, 0, sizeof(ioreq->page));
+    ioreq->pages = NULL;
+
+    ioreq->aio_inflight = 0;
+    ioreq->aio_errors = 0;
+
+    ioreq->blkdev = NULL;
+    memset(&ioreq->list, 0, sizeof(ioreq->list));
+
+    qemu_iovec_reset(&ioreq->v);
+}
+
 static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 {
     struct ioreq *ioreq = NULL;
@@ -132,7 +155,6 @@ static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 	/* get one from freelist */
 	ioreq = LIST_FIRST(&blkdev->freelist);
 	LIST_REMOVE(ioreq, list);
-        qemu_iovec_reset(&ioreq->v);
     }
     LIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
     blkdev->requests_inflight++;
@@ -156,7 +178,7 @@ static void ioreq_release(struct ioreq *ioreq, bool finish)
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
     LIST_REMOVE(ioreq, list);
-    memset(ioreq, 0, sizeof(*ioreq));
+    ioreq_reset(ioreq);
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
     if (finish) {
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.3-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 12:33:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 12:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1EnW-0000PV-Eb; Thu, 09 Jan 2014 12:33: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 1W1EnV-0000PM-1b
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:17 +0000
Received: from [85.158.137.68:22327] by server-11.bemta-3.messagelabs.com id
	21/37-19379-C079EC25; Thu, 09 Jan 2014 12:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389270794!8117627!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17502 invoked from network); 9 Jan 2014 12:33:15 -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;
	9 Jan 2014 12:33: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 1W1EnS-0002My-29
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnR-00060i-TH
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:13 +0000
Date: Thu, 09 Jan 2014 12:33:13 +0000
Message-Id: <E1W1EnR-00060i-TH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.3-testing] qemu-traditional: Fix build
	warnings on Wheezy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============3255596285931005874=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 044c9e608e67defea4fc9c9ef4286e85a99d68c2
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Dec 18 15:25:14 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:38 2014 +0000

    qemu-traditional: Fix build warnings on Wheezy
    
      CC    i386-dm/eepro100.o
    hw/eepro100.c: In function ‘eepro100_read4’:
    hw/eepro100.c:1232:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read2’:
    hw/eepro100.c:1202:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read1’:
    hw/eepro100.c:1179:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    Use ~0 to match the behaviour of real hardware.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2)
---
 hw/eepro100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index bc6c3d5..d172b91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1136,7 +1136,7 @@ static void eepro100_write_port(EEPRO100State * s, uint32_t val)
 
 static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 {
-    uint8_t val;
+    uint8_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1181,7 +1181,7 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 
 static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 {
-    uint16_t val;
+    uint16_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1204,7 +1204,7 @@ static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 
 static uint32_t eepro100_read4(EEPRO100State * s, uint32_t addr)
 {
-    uint32_t val;
+    uint32_t val = ~0U;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.3-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 12:33:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 12:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1EnW-0000PV-Eb; Thu, 09 Jan 2014 12:33: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 1W1EnV-0000PM-1b
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:17 +0000
Received: from [85.158.137.68:22327] by server-11.bemta-3.messagelabs.com id
	21/37-19379-C079EC25; Thu, 09 Jan 2014 12:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1389270794!8117627!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17502 invoked from network); 9 Jan 2014 12:33:15 -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;
	9 Jan 2014 12:33: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 1W1EnS-0002My-29
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1EnR-00060i-TH
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 12:33:13 +0000
Date: Thu, 09 Jan 2014 12:33:13 +0000
Message-Id: <E1W1EnR-00060i-TH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.3-testing] qemu-traditional: Fix build
	warnings on Wheezy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============3255596285931005874=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 044c9e608e67defea4fc9c9ef4286e85a99d68c2
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Dec 18 15:25:14 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:38 2014 +0000

    qemu-traditional: Fix build warnings on Wheezy
    
      CC    i386-dm/eepro100.o
    hw/eepro100.c: In function ‘eepro100_read4’:
    hw/eepro100.c:1232:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read2’:
    hw/eepro100.c:1202:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read1’:
    hw/eepro100.c:1179:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    Use ~0 to match the behaviour of real hardware.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2)
---
 hw/eepro100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index bc6c3d5..d172b91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1136,7 +1136,7 @@ static void eepro100_write_port(EEPRO100State * s, uint32_t val)
 
 static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 {
-    uint8_t val;
+    uint8_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1181,7 +1181,7 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 
 static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 {
-    uint16_t val;
+    uint16_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1204,7 +1204,7 @@ static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 
 static uint32_t eepro100_read4(EEPRO100State * s, uint32_t addr)
 {
-    uint32_t val;
+    uint32_t val = ~0U;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.3-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 13:00:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 13:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1FDa-0002dt-70; Thu, 09 Jan 2014 13:00:14 +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 1W1FDY-0002d5-Oo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:12 +0000
Received: from [85.158.143.35:8351] by server-3.bemta-4.messagelabs.com id
	4E/6A-32360-C5D9EC25; Thu, 09 Jan 2014 13:00:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1389272410!10534910!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28542 invoked from network); 9 Jan 2014 13:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Jan 2014 13: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 1W1FDR-0002hd-1v
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1FDQ-0006yY-8Q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:04 +0000
Date: Thu, 09 Jan 2014 13:00:04 +0000
Message-Id: <E1W1FDQ-0006yY-8Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.2-testing] xen_disk: fix memory leak
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5650841943077839192=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 78dfbb6b362c8ee718cacf8e3a595eceb8c77d18
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Wed Dec 4 15:16:18 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:29 2014 +0000

    xen_disk: fix memory leak
    
    On ioreq_release the full ioreq was memset to 0, losing all the data
    and memory allocations inside the QEMUIOVector, which leads to a
    memory leak. Create a new function to specifically reset ioreq.
    
    Reported-by: Maik Wessler <maik.wessler@yahoo.com>
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    
    Backport to qemu-xen-traditional.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 96b58a44756a8821c108358439b0f2c06e531159)
    (cherry picked from commit 2c4d7159d8a3273e63ce22c7e7544c182f6d2ca5)
---
 hw/xen_disk.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 33a5531..ff36ec9 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -116,6 +116,29 @@ struct XenBlkDev {
 
 /* ------------------------------------------------------------- */
 
+static void ioreq_reset(struct ioreq *ioreq)
+{
+    memset(&ioreq->req, 0, sizeof(ioreq->req));
+    ioreq->status = 0;
+    ioreq->start = 0;
+    ioreq->presync = 0;
+    ioreq->postsync = 0;
+
+    memset(ioreq->domids, 0, sizeof(ioreq->domids));
+    memset(ioreq->refs, 0, sizeof(ioreq->refs));
+    ioreq->prot = 0;
+    memset(ioreq->page, 0, sizeof(ioreq->page));
+    ioreq->pages = NULL;
+
+    ioreq->aio_inflight = 0;
+    ioreq->aio_errors = 0;
+
+    ioreq->blkdev = NULL;
+    memset(&ioreq->list, 0, sizeof(ioreq->list));
+
+    qemu_iovec_reset(&ioreq->v);
+}
+
 static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 {
     struct ioreq *ioreq = NULL;
@@ -132,7 +155,6 @@ static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 	/* get one from freelist */
 	ioreq = LIST_FIRST(&blkdev->freelist);
 	LIST_REMOVE(ioreq, list);
-        qemu_iovec_reset(&ioreq->v);
     }
     LIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
     blkdev->requests_inflight++;
@@ -156,7 +178,7 @@ static void ioreq_release(struct ioreq *ioreq, bool finish)
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
     LIST_REMOVE(ioreq, list);
-    memset(ioreq, 0, sizeof(*ioreq));
+    ioreq_reset(ioreq);
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
     if (finish) {
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.2-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 13:00:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 13:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1FDa-0002dt-70; Thu, 09 Jan 2014 13:00:14 +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 1W1FDY-0002d5-Oo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:12 +0000
Received: from [85.158.143.35:8351] by server-3.bemta-4.messagelabs.com id
	4E/6A-32360-C5D9EC25; Thu, 09 Jan 2014 13:00:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1389272410!10534910!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28542 invoked from network); 9 Jan 2014 13:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Jan 2014 13: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 1W1FDR-0002hd-1v
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1FDQ-0006yY-8Q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:04 +0000
Date: Thu, 09 Jan 2014 13:00:04 +0000
Message-Id: <E1W1FDQ-0006yY-8Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.2-testing] xen_disk: fix memory leak
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5650841943077839192=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 78dfbb6b362c8ee718cacf8e3a595eceb8c77d18
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Wed Dec 4 15:16:18 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:29 2014 +0000

    xen_disk: fix memory leak
    
    On ioreq_release the full ioreq was memset to 0, losing all the data
    and memory allocations inside the QEMUIOVector, which leads to a
    memory leak. Create a new function to specifically reset ioreq.
    
    Reported-by: Maik Wessler <maik.wessler@yahoo.com>
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    
    Backport to qemu-xen-traditional.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 96b58a44756a8821c108358439b0f2c06e531159)
    (cherry picked from commit 2c4d7159d8a3273e63ce22c7e7544c182f6d2ca5)
---
 hw/xen_disk.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 33a5531..ff36ec9 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -116,6 +116,29 @@ struct XenBlkDev {
 
 /* ------------------------------------------------------------- */
 
+static void ioreq_reset(struct ioreq *ioreq)
+{
+    memset(&ioreq->req, 0, sizeof(ioreq->req));
+    ioreq->status = 0;
+    ioreq->start = 0;
+    ioreq->presync = 0;
+    ioreq->postsync = 0;
+
+    memset(ioreq->domids, 0, sizeof(ioreq->domids));
+    memset(ioreq->refs, 0, sizeof(ioreq->refs));
+    ioreq->prot = 0;
+    memset(ioreq->page, 0, sizeof(ioreq->page));
+    ioreq->pages = NULL;
+
+    ioreq->aio_inflight = 0;
+    ioreq->aio_errors = 0;
+
+    ioreq->blkdev = NULL;
+    memset(&ioreq->list, 0, sizeof(ioreq->list));
+
+    qemu_iovec_reset(&ioreq->v);
+}
+
 static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 {
     struct ioreq *ioreq = NULL;
@@ -132,7 +155,6 @@ static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
 	/* get one from freelist */
 	ioreq = LIST_FIRST(&blkdev->freelist);
 	LIST_REMOVE(ioreq, list);
-        qemu_iovec_reset(&ioreq->v);
     }
     LIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
     blkdev->requests_inflight++;
@@ -156,7 +178,7 @@ static void ioreq_release(struct ioreq *ioreq, bool finish)
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
     LIST_REMOVE(ioreq, list);
-    memset(ioreq, 0, sizeof(*ioreq));
+    ioreq_reset(ioreq);
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
     if (finish) {
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.2-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 13:00:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 13:00: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 1W1FDg-0002fn-Rf; Thu, 09 Jan 2014 13:00: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 1W1FDe-0002f8-Lu
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:18 +0000
Received: from [85.158.143.35:42061] by server-3.bemta-4.messagelabs.com id
	E0/BA-32360-16D9EC25; Thu, 09 Jan 2014 13:00:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389272415!10644533!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18283 invoked from network); 9 Jan 2014 13:00:16 -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 Jan 2014 13:00: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 1W1FDb-0002hg-7V
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1FDb-0006zm-5A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:15 +0000
Date: Thu, 09 Jan 2014 13:00:15 +0000
Message-Id: <E1W1FDb-0006zm-5A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.2-testing] qemu-traditional: Fix build
	warnings on Wheezy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5096238806046788226=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 8d7e96f625c4a58d721db413b032fd0bb5671b96
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Dec 18 15:25:14 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:44:42 2014 +0000

    qemu-traditional: Fix build warnings on Wheezy
    
      CC    i386-dm/eepro100.o
    hw/eepro100.c: In function ‘eepro100_read4’:
    hw/eepro100.c:1232:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read2’:
    hw/eepro100.c:1202:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read1’:
    hw/eepro100.c:1179:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    Use ~0 to match the behaviour of real hardware.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2)
    (cherry picked from commit 044c9e608e67defea4fc9c9ef4286e85a99d68c2)
---
 hw/eepro100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index bc6c3d5..d172b91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1136,7 +1136,7 @@ static void eepro100_write_port(EEPRO100State * s, uint32_t val)
 
 static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 {
-    uint8_t val;
+    uint8_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1181,7 +1181,7 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 
 static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 {
-    uint16_t val;
+    uint16_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1204,7 +1204,7 @@ static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 
 static uint32_t eepro100_read4(EEPRO100State * s, uint32_t addr)
 {
-    uint32_t val;
+    uint32_t val = ~0U;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.2-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 13:00:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 13:00: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 1W1FDg-0002fn-Rf; Thu, 09 Jan 2014 13:00: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 1W1FDe-0002f8-Lu
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:18 +0000
Received: from [85.158.143.35:42061] by server-3.bemta-4.messagelabs.com id
	E0/BA-32360-16D9EC25; Thu, 09 Jan 2014 13:00:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389272415!10644533!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18283 invoked from network); 9 Jan 2014 13:00:16 -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 Jan 2014 13:00: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 1W1FDb-0002hg-7V
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1FDb-0006zm-5A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 13:00:15 +0000
Date: Thu, 09 Jan 2014 13:00:15 +0000
Message-Id: <E1W1FDb-0006zm-5A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-4.2-testing] qemu-traditional: Fix build
	warnings on Wheezy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============5096238806046788226=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 8d7e96f625c4a58d721db413b032fd0bb5671b96
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Dec 18 15:25:14 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:44:42 2014 +0000

    qemu-traditional: Fix build warnings on Wheezy
    
      CC    i386-dm/eepro100.o
    hw/eepro100.c: In function ‘eepro100_read4’:
    hw/eepro100.c:1232:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read2’:
    hw/eepro100.c:1202:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function ‘eepro100_read1’:
    hw/eepro100.c:1179:5: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    Use ~0 to match the behaviour of real hardware.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2)
    (cherry picked from commit 044c9e608e67defea4fc9c9ef4286e85a99d68c2)
---
 hw/eepro100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index bc6c3d5..d172b91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1136,7 +1136,7 @@ static void eepro100_write_port(EEPRO100State * s, uint32_t val)
 
 static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 {
-    uint8_t val;
+    uint8_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1181,7 +1181,7 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 
 static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 {
-    uint16_t val;
+    uint16_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1204,7 +1204,7 @@ static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 
 static uint32_t eepro100_read4(EEPRO100State * s, uint32_t addr)
 {
-    uint32_t val;
+    uint32_t val = ~0U;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.2-testing.git


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 18:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KF5-0007UB-RY; Thu, 09 Jan 2014 18: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 1W1KF4-0007U5-5X
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:06 +0000
Received: from [85.158.139.211:16418] by server-10.bemta-5.messagelabs.com id
	45/50-01405-DC8EEC25; Thu, 09 Jan 2014 18:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389291723!8854389!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18374 invoked from network); 9 Jan 2014 18: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;
	9 Jan 2014 18: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 1W1KF1-0006h7-GK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KF1-0007yo-9R
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:03 +0000
Date: Thu, 09 Jan 2014 18:22:03 +0000
Message-Id: <E1W1KF1-0007yo-9R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Fix memory leak in
	sched_domain_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 1e26756496943d9e530c22bcb5785a02ae4af9c7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:16:48 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:09 2014 +0000

    tools/libxl: Fix memory leak in sched_domain_output()
    
    Coverity ID: 1055904
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
    (cherry picked from commit 0792426b798fd3b39909d618cf8fe8bac30594f4)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
    (cherry picked from commit 338a8b13757d6ef36ff4e321cb4ef4190ba6ec02)
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index fe8dc92..0a576a6 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4761,6 +4761,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     poolinfo = libxl_list_cpupool(ctx, &n_pools);
     if (!poolinfo) {
         fprintf(stderr, "error getting cpupool info\n");
+        libxl_dominfo_list_free(info, nb_domain);
         return -ERROR_NOMEM;
     }
 
@@ -4782,6 +4783,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     }
     if (poolinfo)
         libxl_cpupoolinfo_list_free(poolinfo, n_pools);
+    libxl_dominfo_list_free(info, nb_domain);
     return 0;
 }
 
--
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 Thu Jan 09 18:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KF5-0007UB-RY; Thu, 09 Jan 2014 18: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 1W1KF4-0007U5-5X
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:06 +0000
Received: from [85.158.139.211:16418] by server-10.bemta-5.messagelabs.com id
	45/50-01405-DC8EEC25; Thu, 09 Jan 2014 18:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389291723!8854389!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18374 invoked from network); 9 Jan 2014 18: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;
	9 Jan 2014 18: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 1W1KF1-0006h7-GK
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KF1-0007yo-9R
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:03 +0000
Date: Thu, 09 Jan 2014 18:22:03 +0000
Message-Id: <E1W1KF1-0007yo-9R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Fix memory leak in
	sched_domain_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 1e26756496943d9e530c22bcb5785a02ae4af9c7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:16:48 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:09 2014 +0000

    tools/libxl: Fix memory leak in sched_domain_output()
    
    Coverity ID: 1055904
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
    (cherry picked from commit 0792426b798fd3b39909d618cf8fe8bac30594f4)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
    (cherry picked from commit 338a8b13757d6ef36ff4e321cb4ef4190ba6ec02)
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index fe8dc92..0a576a6 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4761,6 +4761,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     poolinfo = libxl_list_cpupool(ctx, &n_pools);
     if (!poolinfo) {
         fprintf(stderr, "error getting cpupool info\n");
+        libxl_dominfo_list_free(info, nb_domain);
         return -ERROR_NOMEM;
     }
 
@@ -4782,6 +4783,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     }
     if (poolinfo)
         libxl_cpupoolinfo_list_free(poolinfo, n_pools);
+    libxl_dominfo_list_free(info, nb_domain);
     return 0;
 }
 
--
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 Thu Jan 09 18:22:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1KFF-0007V7-UA; Thu, 09 Jan 2014 18:22:17 +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 1W1KFE-0007Uu-Jf
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:16 +0000
Received: from [85.158.137.68:21584] by server-11.bemta-3.messagelabs.com id
	C3/14-19379-7D8EEC25; Thu, 09 Jan 2014 18:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389291734!8266785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4908 invoked from network); 9 Jan 2014 18:22:15 -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;
	9 Jan 2014 18:22: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 1W1KFB-0006hA-QO
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFB-0007zC-Ku
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:13 +0000
Date: Thu, 09 Jan 2014 18:22:13 +0000
Message-Id: <E1W1KFB-0007zC-Ku@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Fix integer overflows
	in sched_sedf_domain_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 8ffe08b8968b3b9210b8c613728a35431734556a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:51 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:17 2014 +0000

    tools/libxl: Fix integer overflows in sched_sedf_domain_set()
    
    Coverity ID: 1055662 1055663 1055664
    
    Widen from int to uint64_t before multiplcation, rather than afterwards.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit 9c01516fee7d548af58fd310d3c93dd71ea9ea28)
    (cherry picked from commit 2de748569f827b037ec10104f7c12f44d01d0ffa)
---
 tools/libxl/libxl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index f6da7cd..8e191ca 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4227,11 +4227,11 @@ static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
     }
 
     if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
-        period = scinfo->period * 1000000;
+        period = (uint64_t)scinfo->period * 1000000;
     if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
-        slice = scinfo->slice * 1000000;
+        slice = (uint64_t)scinfo->slice * 1000000;
     if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
-        latency = scinfo->latency * 1000000;
+        latency = (uint64_t)scinfo->latency * 1000000;
     if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
         extratime = scinfo->extratime;
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
--
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 Thu Jan 09 18:22:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1KFF-0007V7-UA; Thu, 09 Jan 2014 18:22:17 +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 1W1KFE-0007Uu-Jf
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:16 +0000
Received: from [85.158.137.68:21584] by server-11.bemta-3.messagelabs.com id
	C3/14-19379-7D8EEC25; Thu, 09 Jan 2014 18:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389291734!8266785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4908 invoked from network); 9 Jan 2014 18:22:15 -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;
	9 Jan 2014 18:22: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 1W1KFB-0006hA-QO
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFB-0007zC-Ku
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:13 +0000
Date: Thu, 09 Jan 2014 18:22:13 +0000
Message-Id: <E1W1KFB-0007zC-Ku@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Fix integer overflows
	in sched_sedf_domain_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 8ffe08b8968b3b9210b8c613728a35431734556a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:51 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:17 2014 +0000

    tools/libxl: Fix integer overflows in sched_sedf_domain_set()
    
    Coverity ID: 1055662 1055663 1055664
    
    Widen from int to uint64_t before multiplcation, rather than afterwards.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit 9c01516fee7d548af58fd310d3c93dd71ea9ea28)
    (cherry picked from commit 2de748569f827b037ec10104f7c12f44d01d0ffa)
---
 tools/libxl/libxl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index f6da7cd..8e191ca 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4227,11 +4227,11 @@ static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
     }
 
     if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
-        period = scinfo->period * 1000000;
+        period = (uint64_t)scinfo->period * 1000000;
     if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
-        slice = scinfo->slice * 1000000;
+        slice = (uint64_t)scinfo->slice * 1000000;
     if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
-        latency = scinfo->latency * 1000000;
+        latency = (uint64_t)scinfo->latency * 1000000;
     if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
         extratime = scinfo->extratime;
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
--
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 Thu Jan 09 18:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFQ-0007WW-0y; Thu, 09 Jan 2014 18:22: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 1W1KFO-0007WJ-N4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:26 +0000
Received: from [193.109.254.147:30600] by server-9.bemta-14.messagelabs.com id
	98/75-13957-2E8EEC25; Thu, 09 Jan 2014 18:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1389291744!9835819!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12145 invoked from network); 9 Jan 2014 18:22:25 -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;
	9 Jan 2014 18: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 1W1KFM-0006hJ-3N
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFL-0007zZ-Uo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:23 +0000
Date: Thu, 09 Jan 2014 18:22:23 +0000
Message-Id: <E1W1KFL-0007zZ-Uo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xenconsole: Use
	xc_domain_getinfo() correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e30bd829a533241d639719f38712e433117adaa7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:38 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:31 2014 +0000

    tools/xenconsole: Use xc_domain_getinfo() correctly
    
    Coverity ID: 1055018
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit aa344500a3bfceb3ef01931609ac1cfaf6dcf52d)
    (cherry picked from commit 74cd17f84649012bec7ce484bf7b9c3f3a9e79ae)
---
 tools/console/client/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 523fc23..38c856a 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -339,7 +339,11 @@ int main(int argc, char **argv)
 		xc_interface *xc_handle = xc_interface_open(0,0,0);
 		if (xc_handle == NULL)
 			err(errno, "Could not open xc interface");
-		xc_domain_getinfo(xc_handle, domid, 1, &xcinfo);
+		if ( (xc_domain_getinfo(xc_handle, domid, 1, &xcinfo) != 1) ||
+		     (xcinfo.domid != domid) ) {
+			xc_interface_close(xc_handle);
+			err(errno, "Failed to get domain information");
+		}
 		/* default to pv console for pv guests and serial for hvm guests */
 		if (xcinfo.hvm)
 			type = CONSOLE_SERIAL;
--
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 Thu Jan 09 18:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFQ-0007WW-0y; Thu, 09 Jan 2014 18:22: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 1W1KFO-0007WJ-N4
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:26 +0000
Received: from [193.109.254.147:30600] by server-9.bemta-14.messagelabs.com id
	98/75-13957-2E8EEC25; Thu, 09 Jan 2014 18:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1389291744!9835819!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12145 invoked from network); 9 Jan 2014 18:22:25 -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;
	9 Jan 2014 18: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 1W1KFM-0006hJ-3N
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFL-0007zZ-Uo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:23 +0000
Date: Thu, 09 Jan 2014 18:22:23 +0000
Message-Id: <E1W1KFL-0007zZ-Uo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xenconsole: Use
	xc_domain_getinfo() correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e30bd829a533241d639719f38712e433117adaa7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:38 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:31 2014 +0000

    tools/xenconsole: Use xc_domain_getinfo() correctly
    
    Coverity ID: 1055018
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit aa344500a3bfceb3ef01931609ac1cfaf6dcf52d)
    (cherry picked from commit 74cd17f84649012bec7ce484bf7b9c3f3a9e79ae)
---
 tools/console/client/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 523fc23..38c856a 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -339,7 +339,11 @@ int main(int argc, char **argv)
 		xc_interface *xc_handle = xc_interface_open(0,0,0);
 		if (xc_handle == NULL)
 			err(errno, "Could not open xc interface");
-		xc_domain_getinfo(xc_handle, domid, 1, &xcinfo);
+		if ( (xc_domain_getinfo(xc_handle, domid, 1, &xcinfo) != 1) ||
+		     (xcinfo.domid != domid) ) {
+			xc_interface_close(xc_handle);
+			err(errno, "Failed to get domain information");
+		}
 		/* default to pv console for pv guests and serial for hvm guests */
 		if (xcinfo.hvm)
 			type = CONSOLE_SERIAL;
--
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 Thu Jan 09 18:22:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFa-0007YA-3p; Thu, 09 Jan 2014 18:22: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 1W1KFY-0007Xw-Ue
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:37 +0000
Received: from [85.158.139.211:23851] by server-10.bemta-5.messagelabs.com id
	01/E0-01405-CE8EEC25; Thu, 09 Jan 2014 18:22:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1389291754!7639085!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24857 invoked from network); 9 Jan 2014 18:22:35 -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;
	9 Jan 2014 18:22: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 1W1KFW-0006hR-E3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFW-00080p-7S
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:34 +0000
Date: Thu, 09 Jan 2014 18:22:34 +0000
Message-Id: <E1W1KFW-00080p-7S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xenconsoled: Fix file handle
	leaks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7732f0d10dc38b8a9d3c3c38bf7c483f36c00e00
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:39 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:47 2014 +0000

    tools/xenconsoled: Fix file handle leaks
    
    Coverity ID: 715218 1055876 1055877
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 9ab1792e1ce9e77afe2cd230d69e56a0737a735f)
    (cherry picked from commit 6f6d936af8acb7d9e36b70e5e70953f695ca3b36)
---
 tools/console/daemon/io.c    |    2 ++
 tools/console/daemon/utils.c |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 48fe151..367c4fb 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -270,6 +270,7 @@ static int create_hv_log(void)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
@@ -315,6 +316,7 @@ static int create_domain_log(struct domain *dom)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c
index aab6f42..71dd185 100644
--- a/tools/console/daemon/utils.c
+++ b/tools/console/daemon/utils.c
@@ -104,6 +104,7 @@ void daemonize(const char *pidfile)
 	signal(SIGTSTP, SIG_IGN);
 	signal(SIGTTOU, SIG_IGN);
 	signal(SIGTTIN, SIG_IGN);
+	close(fd);
 }
 
 bool xen_setup(void)
--
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 Thu Jan 09 18:22:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFa-0007YA-3p; Thu, 09 Jan 2014 18:22: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 1W1KFY-0007Xw-Ue
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:37 +0000
Received: from [85.158.139.211:23851] by server-10.bemta-5.messagelabs.com id
	01/E0-01405-CE8EEC25; Thu, 09 Jan 2014 18:22:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1389291754!7639085!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24857 invoked from network); 9 Jan 2014 18:22:35 -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;
	9 Jan 2014 18:22: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 1W1KFW-0006hR-E3
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFW-00080p-7S
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:34 +0000
Date: Thu, 09 Jan 2014 18:22:34 +0000
Message-Id: <E1W1KFW-00080p-7S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xenconsoled: Fix file handle
	leaks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7732f0d10dc38b8a9d3c3c38bf7c483f36c00e00
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:39 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:35:47 2014 +0000

    tools/xenconsoled: Fix file handle leaks
    
    Coverity ID: 715218 1055876 1055877
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 9ab1792e1ce9e77afe2cd230d69e56a0737a735f)
    (cherry picked from commit 6f6d936af8acb7d9e36b70e5e70953f695ca3b36)
---
 tools/console/daemon/io.c    |    2 ++
 tools/console/daemon/utils.c |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 48fe151..367c4fb 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -270,6 +270,7 @@ static int create_hv_log(void)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
@@ -315,6 +316,7 @@ static int create_domain_log(struct domain *dom)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c
index aab6f42..71dd185 100644
--- a/tools/console/daemon/utils.c
+++ b/tools/console/daemon/utils.c
@@ -104,6 +104,7 @@ void daemonize(const char *pidfile)
 	signal(SIGTSTP, SIG_IGN);
 	signal(SIGTTOU, SIG_IGN);
 	signal(SIGTTIN, SIG_IGN);
+	close(fd);
 }
 
 bool xen_setup(void)
--
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 Thu Jan 09 18:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KFl-0007ae-94; Thu, 09 Jan 2014 18: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 1W1KFj-0007aC-Eh
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:47 +0000
Received: from [85.158.139.211:24303] by server-15.bemta-5.messagelabs.com id
	36/2C-08490-6F8EEC25; Thu, 09 Jan 2014 18:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389291764!8674892!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 561 invoked from network); 9 Jan 2014 18:22:45 -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;
	9 Jan 2014 18:22: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 1W1KFg-0006hX-JX
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFg-00081E-Hs
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:44 +0000
Date: Thu, 09 Jan 2014 18:22:44 +0000
Message-Id: <E1W1KFg-00081E-Hs@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xc_restore: Initialise
	console and store mfns
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit fb6525f7e12fc8c707f3a12dd09655dddbbc16bb
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:47 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:37:52 2014 +0000

    tools/xc_restore: Initialise console and store mfns
    
    If the console or store mfn chunks are not present in the migration stream,
    stack junk gets reported for the mfns.
    
    XenServer had a very hard to track down VM corruption issue caused by exactly
    this issue.  Xenconsoled would connect to a junk mfn and incremented the ring
    pointer if the junk happend to look like a valid gfn.
    
    Coverity ID: 1056093 1056094
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 592b614f3469bb83d1158c3dc8c15b67aacfbf4f)
    (cherry picked from commit 6d7b67c67039ceac36a780b59c2b890739094b95)
    
    Conflicts:
    	tools/xcutils/xc_restore.c
---
 tools/xcutils/xc_restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 0235579..81ff165 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -23,7 +23,7 @@ main(int argc, char **argv)
     xc_interface *xch;
     int io_fd, ret;
     int superpages;
-    unsigned long store_mfn, console_mfn;
+    unsigned long store_mfn = 0, console_mfn = 0;
 
     if ( (argc != 8) && (argc != 9) )
         errx(1, "usage: %s iofd domid store_evtchn "
--
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 Thu Jan 09 18:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KFl-0007ae-94; Thu, 09 Jan 2014 18: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 1W1KFj-0007aC-Eh
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:47 +0000
Received: from [85.158.139.211:24303] by server-15.bemta-5.messagelabs.com id
	36/2C-08490-6F8EEC25; Thu, 09 Jan 2014 18:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1389291764!8674892!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 561 invoked from network); 9 Jan 2014 18:22:45 -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;
	9 Jan 2014 18:22: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 1W1KFg-0006hX-JX
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFg-00081E-Hs
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:44 +0000
Date: Thu, 09 Jan 2014 18:22:44 +0000
Message-Id: <E1W1KFg-00081E-Hs@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/xc_restore: Initialise
	console and store mfns
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit fb6525f7e12fc8c707f3a12dd09655dddbbc16bb
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:47 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:37:52 2014 +0000

    tools/xc_restore: Initialise console and store mfns
    
    If the console or store mfn chunks are not present in the migration stream,
    stack junk gets reported for the mfns.
    
    XenServer had a very hard to track down VM corruption issue caused by exactly
    this issue.  Xenconsoled would connect to a junk mfn and incremented the ring
    pointer if the junk happend to look like a valid gfn.
    
    Coverity ID: 1056093 1056094
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 592b614f3469bb83d1158c3dc8c15b67aacfbf4f)
    (cherry picked from commit 6d7b67c67039ceac36a780b59c2b890739094b95)
    
    Conflicts:
    	tools/xcutils/xc_restore.c
---
 tools/xcutils/xc_restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 0235579..81ff165 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -23,7 +23,7 @@ main(int argc, char **argv)
     xc_interface *xch;
     int io_fd, ret;
     int superpages;
-    unsigned long store_mfn, console_mfn;
+    unsigned long store_mfn = 0, console_mfn = 0;
 
     if ( (argc != 8) && (argc != 9) )
         errx(1, "usage: %s iofd domid store_evtchn "
--
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 Thu Jan 09 18:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFv-0007cO-Bo; Thu, 09 Jan 2014 18:22: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 1W1KFt-0007c7-FB
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:57 +0000
Received: from [85.158.137.68:23519] by server-16.bemta-3.messagelabs.com id
	3F/31-26128-009EEC25; Thu, 09 Jan 2014 18:22:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1389291774!8227838!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6280 invoked from network); 9 Jan 2014 18:22:56 -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;
	9 Jan 2014 18: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 1W1KFq-0006hj-Or
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFq-00081a-NR
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:54 +0000
Date: Thu, 09 Jan 2014 18:22:54 +0000
Message-Id: <E1W1KFq-00081a-NR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxc: Improve
	xc_dom_malloc_filemap() 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 30b447521114411374a42340475ee31e22a60ad1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:49 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:38:47 2014 +0000

    tools/libxc: Improve xc_dom_malloc_filemap() error handling
    
    Coverity ID 1055563
    
    In the original function, mmap() could be called with a length of -1 if the
    second lseek failed and the caller had not provided max_size.
    
    While fixing up this error, improve the logging of other error paths.  I know
    from personal experience that debugging failures function is rather difficult
    given only "xc_dom_malloc_filemap: failed (on file <somefile>)" in the logs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit c635c1ef7833e7505423f6567bf99bd355101587)
    (cherry picked from commit a5febe4aeff4ab80ce0411f63f336c25951098cf)
---
 tools/libxc/xc_dom_core.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index e79e38d..73ad976 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -176,13 +176,25 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
 {
     struct xc_dom_mem *block = NULL;
     int fd = -1;
+    off_t offset;
 
     fd = open(filename, O_RDONLY);
-    if ( fd == -1 )
+    if ( fd == -1 ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to open file: %s",
+                     strerror(errno));
+        goto err;
+    }
+
+    if ( (lseek(fd, 0, SEEK_SET) == -1) ||
+         ((offset = lseek(fd, 0, SEEK_END)) == -1) ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to seek on file: %s",
+                     strerror(errno));
         goto err;
+    }
 
-    lseek(fd, 0, SEEK_SET);
-    *size = lseek(fd, 0, SEEK_END);
+    *size = offset;
 
     if ( max_size && *size > max_size )
     {
@@ -192,14 +204,24 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
     }
 
     block = malloc(sizeof(*block));
-    if ( block == NULL )
+    if ( block == NULL ) {
+        xc_dom_panic(dom->xch, XC_OUT_OF_MEMORY,
+                     "failed to allocate block (%zu bytes)",
+                     sizeof(*block));
         goto err;
+    }
+
     memset(block, 0, sizeof(*block));
     block->mmap_len = *size;
     block->mmap_ptr = mmap(NULL, block->mmap_len, PROT_READ,
                            MAP_SHARED, fd, 0);
-    if ( block->mmap_ptr == MAP_FAILED )
+    if ( block->mmap_ptr == MAP_FAILED ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to mmap file: %s",
+                     strerror(errno));
         goto err;
+    }
+
     block->next = dom->memblocks;
     dom->memblocks = block;
     dom->alloc_malloc += sizeof(*block);
@@ -212,8 +234,7 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
  err:
     if ( fd != -1 )
         close(fd);
-    if ( block != NULL )
-        free(block);
+    free(block);
     DOMPRINTF("%s: failed (on file `%s')", __FUNCTION__, filename);
     return 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 Thu Jan 09 18:22:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:22: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 1W1KFv-0007cO-Bo; Thu, 09 Jan 2014 18:22: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 1W1KFt-0007c7-FB
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:57 +0000
Received: from [85.158.137.68:23519] by server-16.bemta-3.messagelabs.com id
	3F/31-26128-009EEC25; Thu, 09 Jan 2014 18:22:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1389291774!8227838!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6280 invoked from network); 9 Jan 2014 18:22:56 -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;
	9 Jan 2014 18: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 1W1KFq-0006hj-Or
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KFq-00081a-NR
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:22:54 +0000
Date: Thu, 09 Jan 2014 18:22:54 +0000
Message-Id: <E1W1KFq-00081a-NR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxc: Improve
	xc_dom_malloc_filemap() 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 30b447521114411374a42340475ee31e22a60ad1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:49 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:38:47 2014 +0000

    tools/libxc: Improve xc_dom_malloc_filemap() error handling
    
    Coverity ID 1055563
    
    In the original function, mmap() could be called with a length of -1 if the
    second lseek failed and the caller had not provided max_size.
    
    While fixing up this error, improve the logging of other error paths.  I know
    from personal experience that debugging failures function is rather difficult
    given only "xc_dom_malloc_filemap: failed (on file <somefile>)" in the logs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit c635c1ef7833e7505423f6567bf99bd355101587)
    (cherry picked from commit a5febe4aeff4ab80ce0411f63f336c25951098cf)
---
 tools/libxc/xc_dom_core.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index e79e38d..73ad976 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -176,13 +176,25 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
 {
     struct xc_dom_mem *block = NULL;
     int fd = -1;
+    off_t offset;
 
     fd = open(filename, O_RDONLY);
-    if ( fd == -1 )
+    if ( fd == -1 ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to open file: %s",
+                     strerror(errno));
+        goto err;
+    }
+
+    if ( (lseek(fd, 0, SEEK_SET) == -1) ||
+         ((offset = lseek(fd, 0, SEEK_END)) == -1) ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to seek on file: %s",
+                     strerror(errno));
         goto err;
+    }
 
-    lseek(fd, 0, SEEK_SET);
-    *size = lseek(fd, 0, SEEK_END);
+    *size = offset;
 
     if ( max_size && *size > max_size )
     {
@@ -192,14 +204,24 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
     }
 
     block = malloc(sizeof(*block));
-    if ( block == NULL )
+    if ( block == NULL ) {
+        xc_dom_panic(dom->xch, XC_OUT_OF_MEMORY,
+                     "failed to allocate block (%zu bytes)",
+                     sizeof(*block));
         goto err;
+    }
+
     memset(block, 0, sizeof(*block));
     block->mmap_len = *size;
     block->mmap_ptr = mmap(NULL, block->mmap_len, PROT_READ,
                            MAP_SHARED, fd, 0);
-    if ( block->mmap_ptr == MAP_FAILED )
+    if ( block->mmap_ptr == MAP_FAILED ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to mmap file: %s",
+                     strerror(errno));
         goto err;
+    }
+
     block->next = dom->memblocks;
     dom->memblocks = block;
     dom->alloc_malloc += sizeof(*block);
@@ -212,8 +234,7 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
  err:
     if ( fd != -1 )
         close(fd);
-    if ( block != NULL )
-        free(block);
+    free(block);
     DOMPRINTF("%s: failed (on file `%s')", __FUNCTION__, filename);
     return 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 Thu Jan 09 18:23:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1KGA-0007eR-Ek; Thu, 09 Jan 2014 18:23:14 +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 1W1KG8-0007e9-TS
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:13 +0000
Received: from [193.109.254.147:41721] by server-3.bemta-14.messagelabs.com id
	FE/18-11000-019EEC25; Thu, 09 Jan 2014 18:23:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1389291785!9879564!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11271 invoked from network); 9 Jan 2014 18:23:11 -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 Jan 2014 18:23: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 1W1KG0-0006iM-UP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KG0-00082E-Ss
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:04 +0000
Date: Thu, 09 Jan 2014 18:23:04 +0000
Message-Id: <E1W1KG0-00082E-Ss@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Avoid deliberate NULL
	pointer dereference
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e4959653e13e2f8a83c9868b08dac0672fe38249
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:50 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:38:56 2014 +0000

    tools/libxl: Avoid deliberate NULL pointer dereference
    
    Coverity ID: 1055290
    
    Calling LIBXL__LOG_ERRNO(ctx,) with a ctx pointer we have just failed to
    allocate is going to end badly.  Opencode a suitable use of xtl_log() instead.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 1677af03c14f2d8d88d2ed9ed8ce6d4906d19fb4)
    (cherry picked from commit 4cbbbdfb775d387dc1e0931b44e14d3205c92265)
---
 tools/libxl/libxl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 8e191ca..c47d21f 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -32,7 +32,9 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
 
     ctx = malloc(sizeof(*ctx));
     if (!ctx) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Failed to allocate context\n");
+        xtl_log(lg, XTL_ERROR, errno, "libxl",
+                "%s:%d:%s: Failed to allocate context\n",
+                __FILE__, __LINE__, __func__);
         rc = ERROR_NOMEM; goto out;
     }
 
--
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 Thu Jan 09 18:23:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1KGA-0007eR-Ek; Thu, 09 Jan 2014 18:23:14 +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 1W1KG8-0007e9-TS
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:13 +0000
Received: from [193.109.254.147:41721] by server-3.bemta-14.messagelabs.com id
	FE/18-11000-019EEC25; Thu, 09 Jan 2014 18:23:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1389291785!9879564!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11271 invoked from network); 9 Jan 2014 18:23:11 -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 Jan 2014 18:23: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 1W1KG0-0006iM-UP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KG0-00082E-Ss
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:04 +0000
Date: Thu, 09 Jan 2014 18:23:04 +0000
Message-Id: <E1W1KG0-00082E-Ss@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] tools/libxl: Avoid deliberate NULL
	pointer dereference
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e4959653e13e2f8a83c9868b08dac0672fe38249
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:50 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:38:56 2014 +0000

    tools/libxl: Avoid deliberate NULL pointer dereference
    
    Coverity ID: 1055290
    
    Calling LIBXL__LOG_ERRNO(ctx,) with a ctx pointer we have just failed to
    allocate is going to end badly.  Opencode a suitable use of xtl_log() instead.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 1677af03c14f2d8d88d2ed9ed8ce6d4906d19fb4)
    (cherry picked from commit 4cbbbdfb775d387dc1e0931b44e14d3205c92265)
---
 tools/libxl/libxl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 8e191ca..c47d21f 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -32,7 +32,9 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
 
     ctx = malloc(sizeof(*ctx));
     if (!ctx) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Failed to allocate context\n");
+        xtl_log(lg, XTL_ERROR, errno, "libxl",
+                "%s:%d:%s: Failed to allocate context\n",
+                __FILE__, __LINE__, __func__);
         rc = ERROR_NOMEM; goto out;
     }
 
--
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 Thu Jan 09 18:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KGF-0007fW-IZ; Thu, 09 Jan 2014 18:23: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 1W1KGD-0007f7-Lj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:17 +0000
Received: from [85.158.143.35:17309] by server-3.bemta-4.messagelabs.com id
	99/0E-32360-519EEC25; Thu, 09 Jan 2014 18:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291795!10693991!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15278 invoked from network); 9 Jan 2014 18:23: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 Jan 2014 18:23: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 1W1KGB-0006iP-4A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGB-00082h-24
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:15 +0000
Date: Thu, 09 Jan 2014 18:23:15 +0000
Message-Id: <E1W1KGB-00082h-24@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: fix fd check in
	libxl__spawn_local_dm
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4774639635776084540=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit b8ef216d7605c1ceb59be838e9d16baa9e1e94fd
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:08 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:18 2014 +0000

    libxl: fix fd check in libxl__spawn_local_dm
    
    Checking the logfile_w fd for -1 on failure is no longer true, because
    libxl__create_qemu_logfile will now return ERROR_FAIL on failure which
    is -3.
    
    While there also add an error check for opening /dev/null.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    (cherry picked from commit 3b88d95e9c0a5ff91d5b60e94d81f1982af57e7f)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
    (cherry picked from commit 8f1bd27fcd7f8be1353e7309f450283f3e5f7cd0)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
---
 tools/libxl/libxl_dm.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 80b4973..88a4894 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1122,6 +1122,11 @@ void libxl__spawn_local_dm(libxl__egc *egc, libxl__dm_spawn_state *dmss)
     logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644);
     free(logfile);
     null = open("/dev/null", O_RDONLY);
+    if (null < 0) {
+        LOGE(ERROR, "unable to open /dev/null");
+        rc = ERROR_FAIL;
+        goto out_close;
+    }
 
     const char *dom_path = libxl__xs_get_dompath(gc, domid);
     spawn->pidpath = GCSPRINTF("%s/%s", dom_path, "image/device-model-pid");
@@ -1169,8 +1174,8 @@ retry_transaction:
     rc = 0;
 
 out_close:
-    close(null);
-    close(logfile_w);
+    if (null >= 0) close(null);
+    if (logfile_w >= 0) close(logfile_w);
     free(args);
 out:
     if (rc)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 18:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KGF-0007fW-IZ; Thu, 09 Jan 2014 18:23: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 1W1KGD-0007f7-Lj
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:17 +0000
Received: from [85.158.143.35:17309] by server-3.bemta-4.messagelabs.com id
	99/0E-32360-519EEC25; Thu, 09 Jan 2014 18:23:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291795!10693991!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15278 invoked from network); 9 Jan 2014 18:23: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 Jan 2014 18:23: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 1W1KGB-0006iP-4A
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGB-00082h-24
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:15 +0000
Date: Thu, 09 Jan 2014 18:23:15 +0000
Message-Id: <E1W1KGB-00082h-24@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: fix fd check in
	libxl__spawn_local_dm
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4774639635776084540=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit b8ef216d7605c1ceb59be838e9d16baa9e1e94fd
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:08 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:18 2014 +0000

    libxl: fix fd check in libxl__spawn_local_dm
    
    Checking the logfile_w fd for -1 on failure is no longer true, because
    libxl__create_qemu_logfile will now return ERROR_FAIL on failure which
    is -3.
    
    While there also add an error check for opening /dev/null.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    (cherry picked from commit 3b88d95e9c0a5ff91d5b60e94d81f1982af57e7f)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
    (cherry picked from commit 8f1bd27fcd7f8be1353e7309f450283f3e5f7cd0)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
---
 tools/libxl/libxl_dm.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 80b4973..88a4894 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1122,6 +1122,11 @@ void libxl__spawn_local_dm(libxl__egc *egc, libxl__dm_spawn_state *dmss)
     logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644);
     free(logfile);
     null = open("/dev/null", O_RDONLY);
+    if (null < 0) {
+        LOGE(ERROR, "unable to open /dev/null");
+        rc = ERROR_FAIL;
+        goto out_close;
+    }
 
     const char *dom_path = libxl__xs_get_dompath(gc, domid);
     spawn->pidpath = GCSPRINTF("%s/%s", dom_path, "image/device-model-pid");
@@ -1169,8 +1174,8 @@ retry_transaction:
     rc = 0;
 
 out_close:
-    close(null);
-    close(logfile_w);
+    if (null >= 0) close(null);
+    if (logfile_w >= 0) close(logfile_w);
     free(args);
 out:
     if (rc)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 18:23:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGO-0007gv-P1; Thu, 09 Jan 2014 18:23: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 1W1KGO-0007gl-4J
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:28 +0000
Received: from [85.158.139.211:12019] by server-5.bemta-5.messagelabs.com id
	70/9E-14928-F19EEC25; Thu, 09 Jan 2014 18:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389291805!8865194!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20431 invoked from network); 9 Jan 2014 18:23:26 -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;
	9 Jan 2014 18: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 1W1KGL-0006iY-B0
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGL-000833-8Q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:25 +0000
Date: Thu, 09 Jan 2014 18:23:25 +0000
Message-Id: <E1W1KGL-000833-8Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xl: fixes for do_daemonize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0408394225398752871=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit c47753c44057deb9cb588f3ed03d4d6397f007ff
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:09 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:40 2014 +0000

    xl: fixes for do_daemonize
    
    Fix usage of CHK_ERRNO in do_daemonize and also remove the usage of a
    bogus for(;;).
    
    Coverity-ID: 1130516 and 1130520
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit ed8c9047f6fc6d28fc27d37576ec8c8c1be68efe)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
    (cherry picked from commit c393ff09ade45d1a2a8f1c12eac5eab4d38947a3)
---
 tools/libxl/xl_cmdimpl.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 0a576a6..4af5812 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1963,14 +1963,14 @@ start:
         if (child1) {
             printf("Daemon running with PID %d\n", child1);
 
-            for (;;) {
-                got_child = xl_waitpid(child_waitdaemon, &status, 0);
-                if (got_child == child1) break;
+            got_child = xl_waitpid(child_waitdaemon, &status, 0);
+            if (got_child != child1) {
                 assert(got_child == -1);
-                perror("failed to wait for daemonizing child");
+                LOG("failed to wait for daemonizing child: %s", strerror(errno));
                 ret = ERROR_FAIL;
                 goto out;
             }
+
             if (status) {
                 libxl_report_child_exitstatus(ctx, XTL_ERROR,
                            "daemonizing child", child1, status);
@@ -1993,17 +1993,16 @@ start:
             exit(-1);
         }
 
-        CHK_ERRNO(( logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND,
-                                   0644) )<0);
+        CHK_ERRNO(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
         free(fullname);
         free(name);
 
-        CHK_ERRNO(( nullfd = open("/dev/null", O_RDONLY) )<0);
+        CHK_ERRNO(nullfd = open("/dev/null", O_RDONLY));
         dup2(nullfd, 0);
         dup2(logfile, 1);
         dup2(logfile, 2);
 
-        CHK_ERRNO(daemon(0, 1) < 0);
+        CHK_ERRNO(daemon(0, 1));
         need_daemon = 0;
     }
     LOG("Waiting for domain %s (domid %d) to die [pid %ld]",
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 18:23:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGO-0007gv-P1; Thu, 09 Jan 2014 18:23: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 1W1KGO-0007gl-4J
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:28 +0000
Received: from [85.158.139.211:12019] by server-5.bemta-5.messagelabs.com id
	70/9E-14928-F19EEC25; Thu, 09 Jan 2014 18:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389291805!8865194!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20431 invoked from network); 9 Jan 2014 18:23:26 -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;
	9 Jan 2014 18: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 1W1KGL-0006iY-B0
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGL-000833-8Q
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:25 +0000
Date: Thu, 09 Jan 2014 18:23:25 +0000
Message-Id: <E1W1KGL-000833-8Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xl: fixes for do_daemonize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0408394225398752871=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit c47753c44057deb9cb588f3ed03d4d6397f007ff
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:09 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:40 2014 +0000

    xl: fixes for do_daemonize
    
    Fix usage of CHK_ERRNO in do_daemonize and also remove the usage of a
    bogus for(;;).
    
    Coverity-ID: 1130516 and 1130520
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit ed8c9047f6fc6d28fc27d37576ec8c8c1be68efe)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
    (cherry picked from commit c393ff09ade45d1a2a8f1c12eac5eab4d38947a3)
---
 tools/libxl/xl_cmdimpl.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 0a576a6..4af5812 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1963,14 +1963,14 @@ start:
         if (child1) {
             printf("Daemon running with PID %d\n", child1);
 
-            for (;;) {
-                got_child = xl_waitpid(child_waitdaemon, &status, 0);
-                if (got_child == child1) break;
+            got_child = xl_waitpid(child_waitdaemon, &status, 0);
+            if (got_child != child1) {
                 assert(got_child == -1);
-                perror("failed to wait for daemonizing child");
+                LOG("failed to wait for daemonizing child: %s", strerror(errno));
                 ret = ERROR_FAIL;
                 goto out;
             }
+
             if (status) {
                 libxl_report_child_exitstatus(ctx, XTL_ERROR,
                            "daemonizing child", child1, status);
@@ -1993,17 +1993,16 @@ start:
             exit(-1);
         }
 
-        CHK_ERRNO(( logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND,
-                                   0644) )<0);
+        CHK_ERRNO(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
         free(fullname);
         free(name);
 
-        CHK_ERRNO(( nullfd = open("/dev/null", O_RDONLY) )<0);
+        CHK_ERRNO(nullfd = open("/dev/null", O_RDONLY));
         dup2(nullfd, 0);
         dup2(logfile, 1);
         dup2(logfile, 2);
 
-        CHK_ERRNO(daemon(0, 1) < 0);
+        CHK_ERRNO(daemon(0, 1));
         need_daemon = 0;
     }
     LOG("Waiting for domain %s (domid %d) to die [pid %ld]",
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2


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

From xen-changelog-bounces@lists.xen.org Thu Jan 09 18:23:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGZ-0007jL-AO; Thu, 09 Jan 2014 18:23: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 1W1KGX-0007iw-Pu
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:37 +0000
Received: from [85.158.143.35:18524] by server-2.bemta-4.messagelabs.com id
	80/1D-11386-929EEC25; Thu, 09 Jan 2014 18:23:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291815!10694008!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16798 invoked from network); 9 Jan 2014 18:23:36 -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 Jan 2014 18:23: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 1W1KGV-0006ig-H5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGV-00083z-Ft
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:35 +0000
Date: Thu, 09 Jan 2014 18:23:35 +0000
Message-Id: <E1W1KGV-00083z-Ft@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: actually abort if
	initializing a ctx's lock fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 10905d3fd7e8c6846f791fa1c5dfa1580776e60c
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:00 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:52 2014 +0000

    libxl: actually abort if initializing a ctx's lock fails
    
    If initializing the ctx's lock fails, don't keep going, but instead
    error out.
    
    Coverity-ID: 1055289
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit b1cb2bdde1f2393d75a925e6c15862b93d3e7abd)
    (cherry picked from commit 62f88c08b31259032c81163f4133d6f25f033c1e)
---
 tools/libxl/libxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index c47d21f..4f28644 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -74,6 +74,8 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex");
         free(ctx);
         ctx = 0;
+        rc = ERROR_FAIL;
+        goto out;
     }
 
     /* Now ctx is safe for ctx_free; failures simply set rc and "goto out" */
--
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 Thu Jan 09 18:23:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGZ-0007jL-AO; Thu, 09 Jan 2014 18:23: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 1W1KGX-0007iw-Pu
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:37 +0000
Received: from [85.158.143.35:18524] by server-2.bemta-4.messagelabs.com id
	80/1D-11386-929EEC25; Thu, 09 Jan 2014 18:23:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291815!10694008!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16798 invoked from network); 9 Jan 2014 18:23:36 -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 Jan 2014 18:23: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 1W1KGV-0006ig-H5
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGV-00083z-Ft
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:35 +0000
Date: Thu, 09 Jan 2014 18:23:35 +0000
Message-Id: <E1W1KGV-00083z-Ft@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: actually abort if
	initializing a ctx's lock fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 10905d3fd7e8c6846f791fa1c5dfa1580776e60c
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:00 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:40:52 2014 +0000

    libxl: actually abort if initializing a ctx's lock fails
    
    If initializing the ctx's lock fails, don't keep going, but instead
    error out.
    
    Coverity-ID: 1055289
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit b1cb2bdde1f2393d75a925e6c15862b93d3e7abd)
    (cherry picked from commit 62f88c08b31259032c81163f4133d6f25f033c1e)
---
 tools/libxl/libxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index c47d21f..4f28644 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -74,6 +74,8 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex");
         free(ctx);
         ctx = 0;
+        rc = ERROR_FAIL;
+        goto out;
     }
 
     /* Now ctx is safe for ctx_free; failures simply set rc and "goto out" */
--
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 Thu Jan 09 18:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KGk-0007mK-Dh; Thu, 09 Jan 2014 18:23: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 1W1KGi-0007ls-JQ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:48 +0000
Received: from [85.158.137.68:51565] by server-13.bemta-3.messagelabs.com id
	82/11-28603-339EEC25; Thu, 09 Jan 2014 18:23:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389291826!7447417!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26880 invoked from network); 9 Jan 2014 18:23:47 -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;
	9 Jan 2014 18: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 1W1KGf-0006im-Ns
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGf-00084M-LF
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:45 +0000
Date: Thu, 09 Jan 2014 18:23:45 +0000
Message-Id: <E1W1KGf-00084M-LF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: don't leak output vcpu info
	on error in libxl_list_vcpu
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 05845ebd3c38ad36202ee7b129b7deef6b8552c0
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:01 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:05 2014 +0000

    libxl: don't leak output vcpu info on error in libxl_list_vcpu
    
    Coverity-ID: 1055887
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3c113a57f55dc4e36e3552342721db01efa832c6)
    (cherry picked from commit d41c205e0173ee923e791c2fd320c7eb25f2e9cb)
---
 tools/libxl/libxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 4f28644..b9fb822 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3909,15 +3909,15 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
     for (*nb_vcpu = 0; *nb_vcpu <= domaininfo.max_vcpu_id; ++*nb_vcpu, ++ptr) {
         if (libxl_cpu_bitmap_alloc(ctx, &ptr->cpumap, 0)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpumap");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getinfo(ctx->xch, domid, *nb_vcpu, &vcpuinfo) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu info");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getaffinity(ctx->xch, domid, *nb_vcpu, ptr->cpumap.map) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu affinity");
-            return NULL;
+            goto err;
         }
         ptr->vcpuid = *nb_vcpu;
         ptr->cpu = vcpuinfo.cpu;
@@ -3927,6 +3927,10 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
         ptr->vcpu_time = vcpuinfo.cpu_time;
     }
     return ret;
+
+err:
+    free(ret);
+    return NULL;
 }
 
 int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid,
--
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 Thu Jan 09 18:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KGk-0007mK-Dh; Thu, 09 Jan 2014 18:23: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 1W1KGi-0007ls-JQ
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:48 +0000
Received: from [85.158.137.68:51565] by server-13.bemta-3.messagelabs.com id
	82/11-28603-339EEC25; Thu, 09 Jan 2014 18:23:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389291826!7447417!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26880 invoked from network); 9 Jan 2014 18:23:47 -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;
	9 Jan 2014 18: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 1W1KGf-0006im-Ns
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGf-00084M-LF
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:45 +0000
Date: Thu, 09 Jan 2014 18:23:45 +0000
Message-Id: <E1W1KGf-00084M-LF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: don't leak output vcpu info
	on error in libxl_list_vcpu
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 05845ebd3c38ad36202ee7b129b7deef6b8552c0
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:01 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:05 2014 +0000

    libxl: don't leak output vcpu info on error in libxl_list_vcpu
    
    Coverity-ID: 1055887
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3c113a57f55dc4e36e3552342721db01efa832c6)
    (cherry picked from commit d41c205e0173ee923e791c2fd320c7eb25f2e9cb)
---
 tools/libxl/libxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 4f28644..b9fb822 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3909,15 +3909,15 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
     for (*nb_vcpu = 0; *nb_vcpu <= domaininfo.max_vcpu_id; ++*nb_vcpu, ++ptr) {
         if (libxl_cpu_bitmap_alloc(ctx, &ptr->cpumap, 0)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpumap");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getinfo(ctx->xch, domid, *nb_vcpu, &vcpuinfo) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu info");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getaffinity(ctx->xch, domid, *nb_vcpu, ptr->cpumap.map) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu affinity");
-            return NULL;
+            goto err;
         }
         ptr->vcpuid = *nb_vcpu;
         ptr->cpu = vcpuinfo.cpu;
@@ -3927,6 +3927,10 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
         ptr->vcpu_time = vcpuinfo.cpu_time;
     }
     return ret;
+
+err:
+    free(ret);
+    return NULL;
 }
 
 int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid,
--
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 Thu Jan 09 18:23:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGt-0007ou-IA; Thu, 09 Jan 2014 18:23:59 +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 1W1KGs-0007oS-BD
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:58 +0000
Received: from [85.158.143.35:2923] by server-2.bemta-4.messagelabs.com id
	46/5D-11386-D39EEC25; Thu, 09 Jan 2014 18:23:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291836!10694043!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18436 invoked from network); 9 Jan 2014 18:23:57 -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 Jan 2014 18: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 1W1KGp-0006iv-To
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGp-00084i-Re
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:55 +0000
Date: Thu, 09 Jan 2014 18:23:55 +0000
Message-Id: <E1W1KGp-00084i-Re@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: don't leak pcidevs in
	libxl_pcidev_assignable
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit daecc09fab938d76b6fa658c607644ed388054f7
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:03 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:12 2014 +0000

    libxl: don't leak pcidevs in libxl_pcidev_assignable
    
    Coverity-ID: 1055896
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 26b35b9ace97f433fcf4c5dfbdfb573d1075255f)
    (cherry picked from commit cfa252b05855a712eda0da80cd638c7093ddf89f)
---
 tools/libxl/libxl_pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 2d476e0..47225b4 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1033,11 +1033,10 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
             pcidevs[i].bus == pcidev->bus &&
             pcidevs[i].dev == pcidev->dev &&
             pcidevs[i].func == pcidev->func)
-        {
-            return 1;
-        }
+            break;
     }
-    return 0;
+    free(pcidevs);
+    return i != num;
 }
 
 int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
--
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 Thu Jan 09 18:23:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:23: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 1W1KGt-0007ou-IA; Thu, 09 Jan 2014 18:23:59 +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 1W1KGs-0007oS-BD
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:58 +0000
Received: from [85.158.143.35:2923] by server-2.bemta-4.messagelabs.com id
	46/5D-11386-D39EEC25; Thu, 09 Jan 2014 18:23:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389291836!10694043!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18436 invoked from network); 9 Jan 2014 18:23:57 -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 Jan 2014 18: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 1W1KGp-0006iv-To
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KGp-00084i-Re
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:23:55 +0000
Date: Thu, 09 Jan 2014 18:23:55 +0000
Message-Id: <E1W1KGp-00084i-Re@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: don't leak pcidevs in
	libxl_pcidev_assignable
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit daecc09fab938d76b6fa658c607644ed388054f7
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:03 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:12 2014 +0000

    libxl: don't leak pcidevs in libxl_pcidev_assignable
    
    Coverity-ID: 1055896
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 26b35b9ace97f433fcf4c5dfbdfb573d1075255f)
    (cherry picked from commit cfa252b05855a712eda0da80cd638c7093ddf89f)
---
 tools/libxl/libxl_pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 2d476e0..47225b4 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1033,11 +1033,10 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
             pcidevs[i].bus == pcidev->bus &&
             pcidevs[i].dev == pcidev->dev &&
             pcidevs[i].func == pcidev->func)
-        {
-            return 1;
-        }
+            break;
     }
-    return 0;
+    free(pcidevs);
+    return i != num;
 }
 
 int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
--
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 Thu Jan 09 18:24:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:24: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 1W1KH4-0007sC-Af; Thu, 09 Jan 2014 18:24: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 1W1KH2-0007rJ-Bo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:08 +0000
Received: from [85.158.143.35:22253] by server-3.bemta-4.messagelabs.com id
	B9/AE-32360-749EEC25; Thu, 09 Jan 2014 18:24:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1389291846!10619407!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22198 invoked from network); 9 Jan 2014 18:24:07 -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;
	9 Jan 2014 18: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 1W1KH0-0006jX-2L
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KH0-00085E-0z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:06 +0000
Date: Thu, 09 Jan 2014 18:24:06 +0000
Message-Id: <E1W1KH0-00085E-0z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xenstore: sanity check incoming
	message body lengths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c25ce50180afa0c703edcb156a644266a48edf9b
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Nov 30 13:20:04 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:52 2014 +0000

    xenstore: sanity check incoming message body lengths
    
    This is for the client-side receiving messages from xenstored, so there
    is no security impact, unlike XSA-72.
    
    Coverity-ID: 1055449
    Coverity-ID: 1056028
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 8da1ed9031341381c218b7e6eaab5b4f239a327b)
    (cherry picked from commit 014f9219f1dca3ee92948f0cfcda8d1befa6cbcd)
---
 tools/xenstore/xs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..ef8890e 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1073,6 +1073,12 @@ static int read_message(struct xs_handle *h, int nonblocking)
 		goto error_freemsg;
 	}
 
+	/* Sanity check message body length. */
+	if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+		saved_errno = E2BIG;
+		goto error_freemsg;
+	}
+
 	/* Allocate and read the message body. */
 	body = msg->body = malloc(msg->hdr.len + 1);
 	if (body == 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 Thu Jan 09 18:24:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18:24: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 1W1KH4-0007sC-Af; Thu, 09 Jan 2014 18:24: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 1W1KH2-0007rJ-Bo
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:08 +0000
Received: from [85.158.143.35:22253] by server-3.bemta-4.messagelabs.com id
	B9/AE-32360-749EEC25; Thu, 09 Jan 2014 18:24:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1389291846!10619407!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22198 invoked from network); 9 Jan 2014 18:24:07 -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;
	9 Jan 2014 18: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 1W1KH0-0006jX-2L
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KH0-00085E-0z
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:06 +0000
Date: Thu, 09 Jan 2014 18:24:06 +0000
Message-Id: <E1W1KH0-00085E-0z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xenstore: sanity check incoming
	message body lengths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c25ce50180afa0c703edcb156a644266a48edf9b
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Nov 30 13:20:04 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:41:52 2014 +0000

    xenstore: sanity check incoming message body lengths
    
    This is for the client-side receiving messages from xenstored, so there
    is no security impact, unlike XSA-72.
    
    Coverity-ID: 1055449
    Coverity-ID: 1056028
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 8da1ed9031341381c218b7e6eaab5b4f239a327b)
    (cherry picked from commit 014f9219f1dca3ee92948f0cfcda8d1befa6cbcd)
---
 tools/xenstore/xs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..ef8890e 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1073,6 +1073,12 @@ static int read_message(struct xs_handle *h, int nonblocking)
 		goto error_freemsg;
 	}
 
+	/* Sanity check message body length. */
+	if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+		saved_errno = E2BIG;
+		goto error_freemsg;
+	}
+
 	/* Allocate and read the message body. */
 	body = msg->body = malloc(msg->hdr.len + 1);
 	if (body == 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 Thu Jan 09 18:24:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KHD-0007v2-Sl; Thu, 09 Jan 2014 18:24: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 1W1KHC-0007ub-IP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:18 +0000
Received: from [193.109.254.147:52211] by server-6.bemta-14.messagelabs.com id
	28/13-14958-159EEC25; Thu, 09 Jan 2014 18:24:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389291856!7641005!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23752 invoked from network); 9 Jan 2014 18:24:17 -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 Jan 2014 18:24: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 1W1KHA-0006jy-63
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KHA-00085k-5C
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:16 +0000
Date: Thu, 09 Jan 2014 18:24:16 +0000
Message-Id: <E1W1KHA-00085k-5C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c5c697651b009a0672faa2a902a0c12d2e975d97
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Thu Jan 9 12:56:55 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:56:55 2014 +0000

    QEMU_TAG update
---
 Config.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 9264d78..638b1f5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -215,9 +215,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7c51fb2971cd455eb728e716f16a488c01f8e759
-# Mon Nov 11 13:42:56 2013 -0500
-# hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.
+QEMU_TAG ?= 8d7e96f625c4a58d721db413b032fd0bb5671b96
+# Wed Dec 18 15:25:14 2013 +0000
+# qemu-traditional: Fix build warnings on Wheezy
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
--
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 Thu Jan 09 18:24:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Jan 2014 18: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 1W1KHD-0007v2-Sl; Thu, 09 Jan 2014 18:24: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 1W1KHC-0007ub-IP
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:18 +0000
Received: from [193.109.254.147:52211] by server-6.bemta-14.messagelabs.com id
	28/13-14958-159EEC25; Thu, 09 Jan 2014 18:24:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389291856!7641005!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23752 invoked from network); 9 Jan 2014 18:24:17 -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 Jan 2014 18:24: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 1W1KHA-0006jy-63
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1KHA-00085k-5C
	for xen-changelog@lists.xensource.com; Thu, 09 Jan 2014 18:24:16 +0000
Date: Thu, 09 Jan 2014 18:24:16 +0000
Message-Id: <E1W1KHA-00085k-5C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c5c697651b009a0672faa2a902a0c12d2e975d97
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Thu Jan 9 12:56:55 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:56:55 2014 +0000

    QEMU_TAG update
---
 Config.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 9264d78..638b1f5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -215,9 +215,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7c51fb2971cd455eb728e716f16a488c01f8e759
-# Mon Nov 11 13:42:56 2013 -0500
-# hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.
+QEMU_TAG ?= 8d7e96f625c4a58d721db413b032fd0bb5671b96
+# Wed Dec 18 15:25:14 2013 +0000
+# qemu-traditional: Fix build warnings on Wheezy
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
--
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 Fri Jan 10 16:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f19-0003Lb-IB; Fri, 10 Jan 2014 16:33: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 1W1f18-0003LH-5j
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:06 +0000
Received: from [193.109.254.147:43477] by server-5.bemta-14.messagelabs.com id
	D9/8B-03510-1C020D25; Fri, 10 Jan 2014 16:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389371583!10143335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10077 invoked from network); 10 Jan 2014 16:33:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Jan 2014 16:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f15-00046x-JG
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f15-0004wC-9F
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:03 +0000
Date: Fri, 10 Jan 2014 16:33:03 +0000
Message-Id: <E1W1f15-0004wC-9F@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/dts: Don't translate invalid
	address
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0b1d127081896411bf91693acb1932345e0e627a
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Mon Jan 6 16:36:18 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:24:26 2014 +0000

    xen/dts: Don't translate invalid address
    
    ePAR specifies that if the property "ranges" doesn't exist in a bus node:
    
    "it is assumed that no mapping exists between children of node and the parent
    address space".
    
    Modify dt_number_of_address to check if the list of ranges are valid. Return
    0 (ie there is zero range) if the list is not valid.
    
    This patch has been tested on the Arndale where the bug can occur with the
    '/hdmi' node.
    
    Reported-by: <tsahee@gmx.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/device_tree.c |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index a29d9f2..55716a8 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -93,7 +93,7 @@ struct dt_bus
 {
     const char *name;
     const char *addresses;
-    int (*match)(const struct dt_device_node *parent);
+    bool_t (*match)(const struct dt_device_node *node);
     void (*count_cells)(const struct dt_device_node *child,
                         int *addrc, int *sizec);
     u64 (*map)(__be32 *addr, const __be32 *range, int na, int ns, int pna);
@@ -793,6 +793,18 @@ int dt_n_size_cells(const struct dt_device_node *np)
 /*
  * Default translator (generic bus)
  */
+static bool_t dt_bus_default_match(const struct dt_device_node *node)
+{
+    /* Root node doesn't have "ranges" property */
+    if ( node->parent == NULL )
+        return 1;
+
+    /* The default bus is only used when the "ranges" property exists.
+     * Otherwise we can't translate the address
+     */
+    return (dt_get_property(node, "ranges", NULL) != NULL);
+}
+
 static void dt_bus_default_count_cells(const struct dt_device_node *dev,
                                 int *addrc, int *sizec)
 {
@@ -856,7 +868,7 @@ static const struct dt_bus dt_busses[] =
     {
         .name = "default",
         .addresses = "reg",
-        .match = NULL,
+        .match = dt_bus_default_match,
         .count_cells = dt_bus_default_count_cells,
         .map = dt_bus_default_map,
         .translate = dt_bus_default_translate,
@@ -871,7 +883,6 @@ static const struct dt_bus *dt_match_bus(const struct dt_device_node *np)
     for ( i = 0; i < ARRAY_SIZE(dt_busses); i++ )
         if ( !dt_busses[i].match || dt_busses[i].match(np) )
             return &dt_busses[i];
-    BUG();
 
     return NULL;
 }
@@ -890,7 +901,10 @@ static const __be32 *dt_get_address(const struct dt_device_node *dev,
     parent = dt_get_parent(dev);
     if ( parent == NULL )
         return NULL;
+
     bus = dt_match_bus(parent);
+    if ( !bus )
+        return NULL;
     bus->count_cells(dev, &na, &ns);
 
     if ( !DT_CHECK_ADDR_COUNT(na) )
@@ -994,6 +1008,8 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
     if ( parent == NULL )
         goto bail;
     bus = dt_match_bus(parent);
+    if ( !bus )
+        goto bail;
 
     /* Count address cells & copy address locally */
     bus->count_cells(dev, &na, &ns);
@@ -1026,6 +1042,11 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
 
         /* Get new parent bus and counts */
         pbus = dt_match_bus(parent);
+        if ( pbus == NULL )
+        {
+            dt_printk("DT: %s is not a valid bus\n", parent->full_name);
+            break;
+        }
         pbus->count_cells(dev, &pna, &pns);
         if ( !DT_CHECK_COUNTS(pna, pns) )
         {
@@ -1164,6 +1185,8 @@ unsigned int dt_number_of_address(const struct dt_device_node *dev)
         return 0;
 
     bus = dt_match_bus(parent);
+    if ( !bus )
+        return 0;
     bus->count_cells(dev, &na, &ns);
 
     if ( !DT_CHECK_COUNTS(na, 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 Fri Jan 10 16:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f19-0003Lb-IB; Fri, 10 Jan 2014 16:33: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 1W1f18-0003LH-5j
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:06 +0000
Received: from [193.109.254.147:43477] by server-5.bemta-14.messagelabs.com id
	D9/8B-03510-1C020D25; Fri, 10 Jan 2014 16:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389371583!10143335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10077 invoked from network); 10 Jan 2014 16:33:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Jan 2014 16:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f15-00046x-JG
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f15-0004wC-9F
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:03 +0000
Date: Fri, 10 Jan 2014 16:33:03 +0000
Message-Id: <E1W1f15-0004wC-9F@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/dts: Don't translate invalid
	address
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0b1d127081896411bf91693acb1932345e0e627a
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Mon Jan 6 16:36:18 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:24:26 2014 +0000

    xen/dts: Don't translate invalid address
    
    ePAR specifies that if the property "ranges" doesn't exist in a bus node:
    
    "it is assumed that no mapping exists between children of node and the parent
    address space".
    
    Modify dt_number_of_address to check if the list of ranges are valid. Return
    0 (ie there is zero range) if the list is not valid.
    
    This patch has been tested on the Arndale where the bug can occur with the
    '/hdmi' node.
    
    Reported-by: <tsahee@gmx.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/device_tree.c |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index a29d9f2..55716a8 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -93,7 +93,7 @@ struct dt_bus
 {
     const char *name;
     const char *addresses;
-    int (*match)(const struct dt_device_node *parent);
+    bool_t (*match)(const struct dt_device_node *node);
     void (*count_cells)(const struct dt_device_node *child,
                         int *addrc, int *sizec);
     u64 (*map)(__be32 *addr, const __be32 *range, int na, int ns, int pna);
@@ -793,6 +793,18 @@ int dt_n_size_cells(const struct dt_device_node *np)
 /*
  * Default translator (generic bus)
  */
+static bool_t dt_bus_default_match(const struct dt_device_node *node)
+{
+    /* Root node doesn't have "ranges" property */
+    if ( node->parent == NULL )
+        return 1;
+
+    /* The default bus is only used when the "ranges" property exists.
+     * Otherwise we can't translate the address
+     */
+    return (dt_get_property(node, "ranges", NULL) != NULL);
+}
+
 static void dt_bus_default_count_cells(const struct dt_device_node *dev,
                                 int *addrc, int *sizec)
 {
@@ -856,7 +868,7 @@ static const struct dt_bus dt_busses[] =
     {
         .name = "default",
         .addresses = "reg",
-        .match = NULL,
+        .match = dt_bus_default_match,
         .count_cells = dt_bus_default_count_cells,
         .map = dt_bus_default_map,
         .translate = dt_bus_default_translate,
@@ -871,7 +883,6 @@ static const struct dt_bus *dt_match_bus(const struct dt_device_node *np)
     for ( i = 0; i < ARRAY_SIZE(dt_busses); i++ )
         if ( !dt_busses[i].match || dt_busses[i].match(np) )
             return &dt_busses[i];
-    BUG();
 
     return NULL;
 }
@@ -890,7 +901,10 @@ static const __be32 *dt_get_address(const struct dt_device_node *dev,
     parent = dt_get_parent(dev);
     if ( parent == NULL )
         return NULL;
+
     bus = dt_match_bus(parent);
+    if ( !bus )
+        return NULL;
     bus->count_cells(dev, &na, &ns);
 
     if ( !DT_CHECK_ADDR_COUNT(na) )
@@ -994,6 +1008,8 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
     if ( parent == NULL )
         goto bail;
     bus = dt_match_bus(parent);
+    if ( !bus )
+        goto bail;
 
     /* Count address cells & copy address locally */
     bus->count_cells(dev, &na, &ns);
@@ -1026,6 +1042,11 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
 
         /* Get new parent bus and counts */
         pbus = dt_match_bus(parent);
+        if ( pbus == NULL )
+        {
+            dt_printk("DT: %s is not a valid bus\n", parent->full_name);
+            break;
+        }
         pbus->count_cells(dev, &pna, &pns);
         if ( !DT_CHECK_COUNTS(pna, pns) )
         {
@@ -1164,6 +1185,8 @@ unsigned int dt_number_of_address(const struct dt_device_node *dev)
         return 0;
 
     bus = dt_match_bus(parent);
+    if ( !bus )
+        return 0;
     bus->count_cells(dev, &na, &ns);
 
     if ( !DT_CHECK_COUNTS(na, 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 Fri Jan 10 16:33:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1J-0003Nl-Ku; Fri, 10 Jan 2014 16:33: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 1W1f1I-0003Mt-9F
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:16 +0000
Received: from [193.109.254.147:51808] by server-7.bemta-14.messagelabs.com id
	7D/1C-15500-BC020D25; Fri, 10 Jan 2014 16:33:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389371594!7857607!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12080 invoked from network); 10 Jan 2014 16:33:14 -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;
	10 Jan 2014 16:33: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 1W1f1F-000473-Sq
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1F-0004wi-Na
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:13 +0000
Date: Fri, 10 Jan 2014 16:33:13 +0000
Message-Id: <E1W1f1F-0004wi-Na@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxc: Correct read_exact()
	error messages
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1671cdeac7da663fb2963f3e587fa279dcd0238b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 10:04:23 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:25:05 2014 +0000

    tools/libxc: Correct read_exact() error messages
    
    The errors have been incorrectly identifying their function since c/s
    861aef6e1558bebad8fc60c1c723f0706fd3ed87 which did a lot of error handling
    cleanup.
    
    Use __func__ to ensure the name remains correct in the future.
    
    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/libxc/xc_domain_restore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index 80769a7..ca2fb51 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -87,7 +87,7 @@ static ssize_t rdexact(xc_interface *xch, struct restore_ctx *ctx,
             if ( len == -1 && errno == EINTR )
                 continue;
             if ( !FD_ISSET(fd, &rfds) ) {
-                ERROR("read_exact_timed failed (select returned %zd)", len);
+                ERROR("%s failed (select returned %zd)", __func__, len);
                 errno = ETIMEDOUT;
                 return -1;
             }
@@ -101,7 +101,7 @@ static ssize_t rdexact(xc_interface *xch, struct restore_ctx *ctx,
             errno = 0;
         }
         if ( len <= 0 ) {
-            ERROR("read_exact_timed failed (read rc: %d, errno: %d)", len, errno);
+            ERROR("%s failed (read rc: %d, errno: %d)", __func__, len, errno);
             return -1;
         }
         offset += 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 Fri Jan 10 16:33:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1J-0003Nl-Ku; Fri, 10 Jan 2014 16:33: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 1W1f1I-0003Mt-9F
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:16 +0000
Received: from [193.109.254.147:51808] by server-7.bemta-14.messagelabs.com id
	7D/1C-15500-BC020D25; Fri, 10 Jan 2014 16:33:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389371594!7857607!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12080 invoked from network); 10 Jan 2014 16:33:14 -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;
	10 Jan 2014 16:33: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 1W1f1F-000473-Sq
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1F-0004wi-Na
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:13 +0000
Date: Fri, 10 Jan 2014 16:33:13 +0000
Message-Id: <E1W1f1F-0004wi-Na@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxc: Correct read_exact()
	error messages
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1671cdeac7da663fb2963f3e587fa279dcd0238b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 7 10:04:23 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:25:05 2014 +0000

    tools/libxc: Correct read_exact() error messages
    
    The errors have been incorrectly identifying their function since c/s
    861aef6e1558bebad8fc60c1c723f0706fd3ed87 which did a lot of error handling
    cleanup.
    
    Use __func__ to ensure the name remains correct in the future.
    
    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/libxc/xc_domain_restore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index 80769a7..ca2fb51 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -87,7 +87,7 @@ static ssize_t rdexact(xc_interface *xch, struct restore_ctx *ctx,
             if ( len == -1 && errno == EINTR )
                 continue;
             if ( !FD_ISSET(fd, &rfds) ) {
-                ERROR("read_exact_timed failed (select returned %zd)", len);
+                ERROR("%s failed (select returned %zd)", __func__, len);
                 errno = ETIMEDOUT;
                 return -1;
             }
@@ -101,7 +101,7 @@ static ssize_t rdexact(xc_interface *xch, struct restore_ctx *ctx,
             errno = 0;
         }
         if ( len <= 0 ) {
-            ERROR("read_exact_timed failed (read rc: %d, errno: %d)", len, errno);
+            ERROR("%s failed (read rc: %d, errno: %d)", __func__, len, errno);
             return -1;
         }
         offset += 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 Fri Jan 10 16:33:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1T-0003Pr-Kb; Fri, 10 Jan 2014 16:33:27 +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 1W1f1S-0003PF-E5
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:26 +0000
Received: from [85.158.143.35:6888] by server-3.bemta-4.messagelabs.com id
	78/DE-32360-5D020D25; Fri, 10 Jan 2014 16:33:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1389371604!10993787!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8748 invoked from network); 10 Jan 2014 16:33:25 -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;
	10 Jan 2014 16:33: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 1W1f1Q-000479-4D
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1P-0004xE-Vw
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:23 +0000
Date: Fri, 10 Jan 2014 16:33:23 +0000
Message-Id: <E1W1f1P-0004xE-Vw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs/man/xl.cfg.pod.5: document global
	VNC options for VFB device
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1a5279fa1e1407c9b8d6ae5d9b1b69f3c3b72d0b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Jan 9 11:48:13 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:26:36 2014 +0000

    docs/man/xl.cfg.pod.5: document global VNC options for VFB device
    
    Update xl.cfg to reflect change in 706d4ab74 "xl: create VFB for PV
    guest when VNC is specified".
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 docs/man/xl.cfg.pod.5 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 72efd88..9941395 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -387,7 +387,10 @@ to the domain.
 
 This options does not control the emulated graphics card presented to
 an HVM guest. See L<Emulated VGA Graphics Device> below for how to
-configure the emulated device.
+configure the emulated device. If L<Emulated VGA Graphics Device> options
+are used in a PV guest configuration, xl will pick up B<vnc>, B<vnclisten>,
+B<vncpasswd>, B<vncdisplay> and B<vncunused> to construct paravirtual
+framebuffer device for the guest.
 
 Each B<VFB_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
 settings, from the following list:
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 10 16:33:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1T-0003Pr-Kb; Fri, 10 Jan 2014 16:33:27 +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 1W1f1S-0003PF-E5
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:26 +0000
Received: from [85.158.143.35:6888] by server-3.bemta-4.messagelabs.com id
	78/DE-32360-5D020D25; Fri, 10 Jan 2014 16:33:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1389371604!10993787!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8748 invoked from network); 10 Jan 2014 16:33:25 -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;
	10 Jan 2014 16:33: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 1W1f1Q-000479-4D
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1P-0004xE-Vw
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:23 +0000
Date: Fri, 10 Jan 2014 16:33:23 +0000
Message-Id: <E1W1f1P-0004xE-Vw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs/man/xl.cfg.pod.5: document global
	VNC options for VFB device
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1a5279fa1e1407c9b8d6ae5d9b1b69f3c3b72d0b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Jan 9 11:48:13 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:26:36 2014 +0000

    docs/man/xl.cfg.pod.5: document global VNC options for VFB device
    
    Update xl.cfg to reflect change in 706d4ab74 "xl: create VFB for PV
    guest when VNC is specified".
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 docs/man/xl.cfg.pod.5 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 72efd88..9941395 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -387,7 +387,10 @@ to the domain.
 
 This options does not control the emulated graphics card presented to
 an HVM guest. See L<Emulated VGA Graphics Device> below for how to
-configure the emulated device.
+configure the emulated device. If L<Emulated VGA Graphics Device> options
+are used in a PV guest configuration, xl will pick up B<vnc>, B<vnclisten>,
+B<vncpasswd>, B<vncdisplay> and B<vncunused> to construct paravirtual
+framebuffer device for the guest.
 
 Each B<VFB_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
 settings, from the following list:
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 10 16:33:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1d-0003Tl-I4; Fri, 10 Jan 2014 16:33:37 +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 1W1f1d-0003TQ-0Q
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:37 +0000
Received: from [85.158.137.68:18073] by server-9.bemta-3.messagelabs.com id
	BC/57-13104-0E020D25; Fri, 10 Jan 2014 16:33:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389371614!8451991!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8115 invoked from network); 10 Jan 2014 16:33:35 -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;
	10 Jan 2014 16:33: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 1W1f1a-00047K-8l
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1a-0004xn-6v
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:34 +0000
Date: Fri, 10 Jan 2014 16:33:34 +0000
Message-Id: <E1W1f1a-0004xn-6v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: Auto-assign NIC devids in
	initiate_domain_create
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2d03be65d5c50053fec4a5fa1d691972e5d953c9
Author:     Stefan Bader <stefan.bader@canonical.com>
AuthorDate: Wed Jan 8 18:26:59 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:29:03 2014 +0000

    libxl: Auto-assign NIC devids in initiate_domain_create
    
    This will change initiate_domain_create to walk through NIC definitions
    and automatically assign devids to those which have not assigned one.
    The devids are needed later in domcreate_launch_dm (for HVM domains
    using emulated NICs). The command string for starting the device-model
    has those ids as part of its arguments.
    Assignment of devids in the hotplug case is handled by libxl_device_nic_add
    but that would be called too late in the startup case.
    I also moved the call to libxl__device_nic_setdefault here as this seems
    to be the only path leading there and avoids doing the loop a third time.
    The two loops are trying to handle a case where the caller sets some devids
    (not sure that should be valid) but leaves some unset.
    
    Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_create.c |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index e03bb55..543e0c8 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -706,6 +706,7 @@ static void initiate_domain_create(libxl__egc *egc,
     libxl_ctx *ctx = libxl__gc_owner(gc);
     uint32_t domid;
     int i, ret;
+    size_t last_devid = -1;
 
     /* convenience aliases */
     libxl_domain_config *const d_config = dcs->guest_config;
@@ -746,6 +747,29 @@ static void initiate_domain_create(libxl__egc *egc,
     libxl_device_disk *bootdisk =
         d_config->num_disks > 0 ? &d_config->disks[0] : NULL;
 
+    /*
+     * The devid has to be set before launching the device model. For the
+     * hotplug case this is done in libxl_device_nic_add but on domain
+     * creation this is called too late.
+     * Make two runs over configured NICs in order to avoid duplicate IDs
+     * in case the caller partially assigned IDs.
+     */
+    for (i = 0; i < d_config->num_nics; i++) {
+        /* We have to init the nic here, because we still haven't
+         * called libxl_device_nic_add when domcreate_launch_dm gets called,
+         * but qemu needs the nic information to be complete.
+         */
+        ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid);
+        if (ret) goto error_out;
+
+        if (d_config->nics[i].devid > last_devid)
+            last_devid = d_config->nics[i].devid;
+    }
+    for (i = 0; i < d_config->num_nics; i++) {
+        if (d_config->nics[i].devid < 0)
+            d_config->nics[i].devid = ++last_devid;
+    }
+
     if (restore_fd >= 0) {
         LOG(DEBUG, "restoring, not running bootloader\n");
         domcreate_bootloader_done(egc, &dcs->bl, 0);
@@ -1058,17 +1082,6 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
         }
     }
 
-
-
-    for (i = 0; i < d_config->num_nics; i++) {
-        /* We have to init the nic here, because we still haven't
-         * called libxl_device_nic_add at this point, but qemu needs
-         * the nic information to be complete.
-         */
-        ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid);
-        if (ret)
-            goto error_out;
-    }
     switch (d_config->c_info.type) {
     case LIBXL_DOMAIN_TYPE_HVM:
     {
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 10 16:33:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Jan 2014 16:33: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 1W1f1d-0003Tl-I4; Fri, 10 Jan 2014 16:33:37 +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 1W1f1d-0003TQ-0Q
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:37 +0000
Received: from [85.158.137.68:18073] by server-9.bemta-3.messagelabs.com id
	BC/57-13104-0E020D25; Fri, 10 Jan 2014 16:33:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389371614!8451991!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8115 invoked from network); 10 Jan 2014 16:33:35 -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;
	10 Jan 2014 16:33: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 1W1f1a-00047K-8l
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1f1a-0004xn-6v
	for xen-changelog@lists.xensource.com; Fri, 10 Jan 2014 16:33:34 +0000
Date: Fri, 10 Jan 2014 16:33:34 +0000
Message-Id: <E1W1f1a-0004xn-6v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: Auto-assign NIC devids in
	initiate_domain_create
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2d03be65d5c50053fec4a5fa1d691972e5d953c9
Author:     Stefan Bader <stefan.bader@canonical.com>
AuthorDate: Wed Jan 8 18:26:59 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Jan 9 15:29:03 2014 +0000

    libxl: Auto-assign NIC devids in initiate_domain_create
    
    This will change initiate_domain_create to walk through NIC definitions
    and automatically assign devids to those which have not assigned one.
    The devids are needed later in domcreate_launch_dm (for HVM domains
    using emulated NICs). The command string for starting the device-model
    has those ids as part of its arguments.
    Assignment of devids in the hotplug case is handled by libxl_device_nic_add
    but that would be called too late in the startup case.
    I also moved the call to libxl__device_nic_setdefault here as this seems
    to be the only path leading there and avoids doing the loop a third time.
    The two loops are trying to handle a case where the caller sets some devids
    (not sure that should be valid) but leaves some unset.
    
    Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_create.c |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index e03bb55..543e0c8 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -706,6 +706,7 @@ static void initiate_domain_create(libxl__egc *egc,
     libxl_ctx *ctx = libxl__gc_owner(gc);
     uint32_t domid;
     int i, ret;
+    size_t last_devid = -1;
 
     /* convenience aliases */
     libxl_domain_config *const d_config = dcs->guest_config;
@@ -746,6 +747,29 @@ static void initiate_domain_create(libxl__egc *egc,
     libxl_device_disk *bootdisk =
         d_config->num_disks > 0 ? &d_config->disks[0] : NULL;
 
+    /*
+     * The devid has to be set before launching the device model. For the
+     * hotplug case this is done in libxl_device_nic_add but on domain
+     * creation this is called too late.
+     * Make two runs over configured NICs in order to avoid duplicate IDs
+     * in case the caller partially assigned IDs.
+     */
+    for (i = 0; i < d_config->num_nics; i++) {
+        /* We have to init the nic here, because we still haven't
+         * called libxl_device_nic_add when domcreate_launch_dm gets called,
+         * but qemu needs the nic information to be complete.
+         */
+        ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid);
+        if (ret) goto error_out;
+
+        if (d_config->nics[i].devid > last_devid)
+            last_devid = d_config->nics[i].devid;
+    }
+    for (i = 0; i < d_config->num_nics; i++) {
+        if (d_config->nics[i].devid < 0)
+            d_config->nics[i].devid = ++last_devid;
+    }
+
     if (restore_fd >= 0) {
         LOG(DEBUG, "restoring, not running bootloader\n");
         domcreate_bootloader_done(egc, &dcs->bl, 0);
@@ -1058,17 +1082,6 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
         }
     }
 
-
-
-    for (i = 0; i < d_config->num_nics; i++) {
-        /* We have to init the nic here, because we still haven't
-         * called libxl_device_nic_add at this point, but qemu needs
-         * the nic information to be complete.
-         */
-        ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid);
-        if (ret)
-            goto error_out;
-    }
     switch (d_config->c_info.type) {
     case LIBXL_DOMAIN_TYPE_HVM:
     {
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 01:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nH5-0008MI-BQ; Sat, 11 Jan 2014 01:22: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 1W1nH4-0008MB-7S
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:06 +0000
Received: from [85.158.143.35:13480] by server-2.bemta-4.messagelabs.com id
	8F/AD-11386-DBC90D25; Sat, 11 Jan 2014 01:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389403324!11010162!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9691 invoked from network); 11 Jan 2014 01: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;
	11 Jan 2014 01: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 1W1nH1-0008K7-MQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nH1-00039o-G5
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:03 +0000
Date: Sat, 11 Jan 2014 01:22:03 +0000
Message-Id: <E1W1nH1-00039o-G5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] defer the domain mapping in
	scrub_one_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 bd80bb02047ce2448aafe4c0219fa5a3f6af790b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:39:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:39:21 2014 +0100

    defer the domain mapping in scrub_one_page()
    
    This avoids a resource leak and needless playing with the pagetables in the
    case that the page is broken.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Keir Fraser <keir@xen.org>
    master commit: 7dd4f9da063cb2cd43426c785535534c9d958ce5
    master date: 2013-12-09 14:13:23 +0100
---
 xen/common/page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 2f563e2..5cba5e0 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1499,11 +1499,13 @@ __initcall(pagealloc_keyhandler_init);
 
 void scrub_one_page(struct page_info *pg)
 {
-    void *p = __map_domain_page(pg);
+    void *p;
 
     if ( unlikely(pg->count_info & PGC_broken) )
         return;
 
+    p = __map_domain_page(pg);
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_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 Sat Jan 11 01:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nH5-0008MI-BQ; Sat, 11 Jan 2014 01:22: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 1W1nH4-0008MB-7S
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:06 +0000
Received: from [85.158.143.35:13480] by server-2.bemta-4.messagelabs.com id
	8F/AD-11386-DBC90D25; Sat, 11 Jan 2014 01:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389403324!11010162!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9691 invoked from network); 11 Jan 2014 01: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;
	11 Jan 2014 01: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 1W1nH1-0008K7-MQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nH1-00039o-G5
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:03 +0000
Date: Sat, 11 Jan 2014 01:22:03 +0000
Message-Id: <E1W1nH1-00039o-G5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] defer the domain mapping in
	scrub_one_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 bd80bb02047ce2448aafe4c0219fa5a3f6af790b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:39:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:39:21 2014 +0100

    defer the domain mapping in scrub_one_page()
    
    This avoids a resource leak and needless playing with the pagetables in the
    case that the page is broken.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Keir Fraser <keir@xen.org>
    master commit: 7dd4f9da063cb2cd43426c785535534c9d958ce5
    master date: 2013-12-09 14:13:23 +0100
---
 xen/common/page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 2f563e2..5cba5e0 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1499,11 +1499,13 @@ __initcall(pagealloc_keyhandler_init);
 
 void scrub_one_page(struct page_info *pg)
 {
-    void *p = __map_domain_page(pg);
+    void *p;
 
     if ( unlikely(pg->count_info & PGC_broken) )
         return;
 
+    p = __map_domain_page(pg);
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_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 Sat Jan 11 01:22:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1nHG-0008NJ-ED; Sat, 11 Jan 2014 01:22:18 +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 1W1nHE-0008NB-Nr
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:17 +0000
Received: from [193.109.254.147:53496] by server-5.bemta-14.messagelabs.com id
	EB/18-03510-8CC90D25; Sat, 11 Jan 2014 01:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1389403334!10111898!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16322 invoked from network); 11 Jan 2014 01:22:15 -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;
	11 Jan 2014 01:22: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 1W1nHB-0008KA-VZ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHB-0003AC-QF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:13 +0000
Date: Sat, 11 Jan 2014 01:22:13 +0000
Message-Id: <E1W1nHB-0003AC-QF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] amd/passthrough: Do not leak
	domain mappings from do_invalidate_dte()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 91d190682d788da9d824fd50ced989739a40c6d3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:41:01 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:41:01 2014 +0100

    amd/passthrough: Do not leak domain mappings from do_invalidate_dte()
    
    Coverity ID: 1135379
    
    As the code stands, the domain mapping will be leaked on each error path.
    
    The mapping can be for a much shorter period of time, and all the relevent
    information can be pulled out at once.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    master commit: 80dbe90a4e6b31f8cb859f7450fa3eed8695fd1d
    master date: 2013-12-10 16:16:49 +0100
---
 xen/drivers/passthrough/amd/iommu_guest.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 85f2361..5412f2c 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -424,12 +424,17 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
                                         sizeof(dev_entry_t), gbdf);
     ASSERT(mfn_valid(dte_mfn));
 
+    /* Read guest dte information */
     dte_base = map_domain_page(dte_mfn);
 
     gdte = dte_base + gbdf % (PAGE_SIZE / sizeof(dev_entry_t));
 
     gdom_id  = get_domid_from_dte(gdte);
     gcr3_gfn = get_guest_cr3_from_dte(gdte);
+    glx      = get_glx_from_dte(gdte);
+    gv       = get_gv_from_dte(gdte);
+
+    unmap_domain_page(dte_base);
 
     /* Do not update host dte before gcr3 has been set */
     if ( gcr3_gfn == 0 )
@@ -440,7 +445,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
 
     ASSERT(mfn_valid(gcr3_mfn));
 
-    /* Read guest dte information */
     iommu = find_iommu_for_device(0, mbdf);
     if ( !iommu )
     {
@@ -449,11 +453,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
         return -ENODEV;
     }
 
-    glx = get_glx_from_dte(gdte);
-    gv = get_gv_from_dte(gdte);
-
-    unmap_domain_page(dte_base);
-
     /* Setup host device entry */
     hdom_id = host_domid(d, gdom_id);
     req_id = get_dma_requestor_id(iommu->seg, mbdf);
--
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 Jan 11 01:22:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1nHG-0008NJ-ED; Sat, 11 Jan 2014 01:22:18 +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 1W1nHE-0008NB-Nr
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:17 +0000
Received: from [193.109.254.147:53496] by server-5.bemta-14.messagelabs.com id
	EB/18-03510-8CC90D25; Sat, 11 Jan 2014 01:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1389403334!10111898!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16322 invoked from network); 11 Jan 2014 01:22:15 -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;
	11 Jan 2014 01:22: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 1W1nHB-0008KA-VZ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHB-0003AC-QF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:13 +0000
Date: Sat, 11 Jan 2014 01:22:13 +0000
Message-Id: <E1W1nHB-0003AC-QF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] amd/passthrough: Do not leak
	domain mappings from do_invalidate_dte()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 91d190682d788da9d824fd50ced989739a40c6d3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:41:01 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:41:01 2014 +0100

    amd/passthrough: Do not leak domain mappings from do_invalidate_dte()
    
    Coverity ID: 1135379
    
    As the code stands, the domain mapping will be leaked on each error path.
    
    The mapping can be for a much shorter period of time, and all the relevent
    information can be pulled out at once.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    master commit: 80dbe90a4e6b31f8cb859f7450fa3eed8695fd1d
    master date: 2013-12-10 16:16:49 +0100
---
 xen/drivers/passthrough/amd/iommu_guest.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 85f2361..5412f2c 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -424,12 +424,17 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
                                         sizeof(dev_entry_t), gbdf);
     ASSERT(mfn_valid(dte_mfn));
 
+    /* Read guest dte information */
     dte_base = map_domain_page(dte_mfn);
 
     gdte = dte_base + gbdf % (PAGE_SIZE / sizeof(dev_entry_t));
 
     gdom_id  = get_domid_from_dte(gdte);
     gcr3_gfn = get_guest_cr3_from_dte(gdte);
+    glx      = get_glx_from_dte(gdte);
+    gv       = get_gv_from_dte(gdte);
+
+    unmap_domain_page(dte_base);
 
     /* Do not update host dte before gcr3 has been set */
     if ( gcr3_gfn == 0 )
@@ -440,7 +445,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
 
     ASSERT(mfn_valid(gcr3_mfn));
 
-    /* Read guest dte information */
     iommu = find_iommu_for_device(0, mbdf);
     if ( !iommu )
     {
@@ -449,11 +453,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
         return -ENODEV;
     }
 
-    glx = get_glx_from_dte(gdte);
-    gv = get_gv_from_dte(gdte);
-
-    unmap_domain_page(dte_base);
-
     /* Setup host device entry */
     hdom_id = host_domid(d, gdom_id);
     req_id = get_dma_requestor_id(iommu->seg, mbdf);
--
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 Jan 11 01:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHQ-0008OU-Hk; Sat, 11 Jan 2014 01:22: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 1W1nHO-0008OJ-LQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:26 +0000
Received: from [193.109.254.147:25731] by server-8.bemta-14.messagelabs.com id
	2C/E4-30921-2DC90D25; Sat, 11 Jan 2014 01:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1389403344!10178344!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25407 invoked from network); 11 Jan 2014 01:22: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;
	11 Jan 2014 01: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 1W1nHM-0008KJ-5B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHM-0003B4-3O
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:24 +0000
Date: Sat, 11 Jan 2014 01:22:24 +0000
Message-Id: <E1W1nHM-0003B4-3O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/cpuidle: publish new states
	only after fully initializing them
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b28c7b29999bf6bfcbe8ff977a15dbacf0f1ad84
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:41:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:41:53 2014 +0100

    x86/cpuidle: publish new states only after fully initializing them
    
    Since state information coming from Dom0 can arrive at any time, on
    any CPU, we ought to make sure that a new state is fully initialized
    before the target CPU might be using it.
    
    Once touching that code, also do minor cleanup: A missing (but benign)
    "break" and some white space adjustments.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: 4ca6f9f0377a30755a299cc60a6d44ab6c3b34d0
    master date: 2013-12-11 10:30:02 +0100
---
 xen/arch/x86/acpi/cpu_idle.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index c5c34df..989d034 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -925,7 +925,7 @@ static void set_cx(
                    acpi_power->cpu, xen_cx->type);
             return;
         }
-        cx = &acpi_power->states[acpi_power->count++];
+        cx = &acpi_power->states[acpi_power->count];
         cx->type = xen_cx->type;
         break;
     }
@@ -957,6 +957,9 @@ static void set_cx(
     
     cx->latency_ticks = ns_to_tick(cx->latency * 1000UL);
     cx->target_residency = cx->latency * latency_factor;
+
+    smp_wmb();
+    acpi_power->count++;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
         acpi_power->safe_state = cx;
 }
--
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 Jan 11 01:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHQ-0008OU-Hk; Sat, 11 Jan 2014 01:22: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 1W1nHO-0008OJ-LQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:26 +0000
Received: from [193.109.254.147:25731] by server-8.bemta-14.messagelabs.com id
	2C/E4-30921-2DC90D25; Sat, 11 Jan 2014 01:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1389403344!10178344!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25407 invoked from network); 11 Jan 2014 01:22: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;
	11 Jan 2014 01: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 1W1nHM-0008KJ-5B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHM-0003B4-3O
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:24 +0000
Date: Sat, 11 Jan 2014 01:22:24 +0000
Message-Id: <E1W1nHM-0003B4-3O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/cpuidle: publish new states
	only after fully initializing them
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b28c7b29999bf6bfcbe8ff977a15dbacf0f1ad84
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:41:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:41:53 2014 +0100

    x86/cpuidle: publish new states only after fully initializing them
    
    Since state information coming from Dom0 can arrive at any time, on
    any CPU, we ought to make sure that a new state is fully initialized
    before the target CPU might be using it.
    
    Once touching that code, also do minor cleanup: A missing (but benign)
    "break" and some white space adjustments.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: 4ca6f9f0377a30755a299cc60a6d44ab6c3b34d0
    master date: 2013-12-11 10:30:02 +0100
---
 xen/arch/x86/acpi/cpu_idle.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index c5c34df..989d034 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -925,7 +925,7 @@ static void set_cx(
                    acpi_power->cpu, xen_cx->type);
             return;
         }
-        cx = &acpi_power->states[acpi_power->count++];
+        cx = &acpi_power->states[acpi_power->count];
         cx->type = xen_cx->type;
         break;
     }
@@ -957,6 +957,9 @@ static void set_cx(
     
     cx->latency_ticks = ns_to_tick(cx->latency * 1000UL);
     cx->target_residency = cx->latency * latency_factor;
+
+    smp_wmb();
+    acpi_power->count++;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
         acpi_power->safe_state = cx;
 }
--
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 Jan 11 01:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01: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 1W1nHb-0008QX-Nn; Sat, 11 Jan 2014 01:22: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 1W1nHa-0008QK-E7
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:38 +0000
Received: from [193.109.254.147:31918] by server-14.bemta-14.messagelabs.com
	id 80/55-12628-DDC90D25; Sat, 11 Jan 2014 01:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389403354!10199972!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14651 invoked from network); 11 Jan 2014 01:22:35 -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;
	11 Jan 2014 01:22: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 1W1nHW-0008KR-9L
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHW-0003BU-8H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:34 +0000
Date: Sat, 11 Jan 2014 01:22:34 +0000
Message-Id: <E1W1nHW-0003BU-8H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/PV: don't commit debug
	register values early in arch_set_info_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 26c8fdfb7f332e1e78cc5d8679e8c3f047178b8d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:42:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:42:35 2014 +0100

    x86/PV: don't commit debug register values early in arch_set_info_guest()
    
    They're being taken care of later (via set_debugreg()), and temporarily
    copying them into struct vcpu means that bad values may end up getting
    loaded during context switch if the vCPU is already running and the
    function errors out between the premature and real commit step, leading
    to the same issue that XSA-12 dealt with.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 398c39b6c18d0b55acfc88f5ee75b3a793e6eeec
    master date: 2013-12-11 10:33:19 +0100
---
 xen/arch/x86/domain.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 68c435e..ecba304 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -829,13 +829,14 @@ int arch_set_info_guest(
                            c.cmp->trap_ctxt + i);
     }
 #endif
-    for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
-        v->arch.debugreg[i] = c(debugreg[i]);
 
     v->arch.user_regs.eflags |= 2;
 
     if ( is_hvm_vcpu(v) )
     {
+        for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
+            v->arch.debugreg[i] = c(debugreg[i]);
+
         hvm_set_info_guest(v);
         goto out;
     }
--
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 Jan 11 01:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01: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 1W1nHb-0008QX-Nn; Sat, 11 Jan 2014 01:22: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 1W1nHa-0008QK-E7
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:38 +0000
Received: from [193.109.254.147:31918] by server-14.bemta-14.messagelabs.com
	id 80/55-12628-DDC90D25; Sat, 11 Jan 2014 01:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389403354!10199972!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14651 invoked from network); 11 Jan 2014 01:22:35 -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;
	11 Jan 2014 01:22: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 1W1nHW-0008KR-9L
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHW-0003BU-8H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:34 +0000
Date: Sat, 11 Jan 2014 01:22:34 +0000
Message-Id: <E1W1nHW-0003BU-8H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/PV: don't commit debug
	register values early in arch_set_info_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 26c8fdfb7f332e1e78cc5d8679e8c3f047178b8d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:42:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:42:35 2014 +0100

    x86/PV: don't commit debug register values early in arch_set_info_guest()
    
    They're being taken care of later (via set_debugreg()), and temporarily
    copying them into struct vcpu means that bad values may end up getting
    loaded during context switch if the vCPU is already running and the
    function errors out between the premature and real commit step, leading
    to the same issue that XSA-12 dealt with.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 398c39b6c18d0b55acfc88f5ee75b3a793e6eeec
    master date: 2013-12-11 10:33:19 +0100
---
 xen/arch/x86/domain.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 68c435e..ecba304 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -829,13 +829,14 @@ int arch_set_info_guest(
                            c.cmp->trap_ctxt + i);
     }
 #endif
-    for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
-        v->arch.debugreg[i] = c(debugreg[i]);
 
     v->arch.user_regs.eflags |= 2;
 
     if ( is_hvm_vcpu(v) )
     {
+        for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
+            v->arch.debugreg[i] = c(debugreg[i]);
+
         hvm_set_info_guest(v);
         goto out;
     }
--
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 Jan 11 01:22:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHj-0008SH-Ql; Sat, 11 Jan 2014 01:22:47 +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 1W1nHj-0008S3-7B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:47 +0000
Received: from [193.109.254.147:34165] by server-5.bemta-14.messagelabs.com id
	2A/38-03510-6EC90D25; Sat, 11 Jan 2014 01:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1389403364!10178369!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26275 invoked from network); 11 Jan 2014 01:22:45 -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;
	11 Jan 2014 01:22: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 1W1nHg-0008KX-Lg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHg-0003Bu-DB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:44 +0000
Date: Sat, 11 Jan 2014 01:22:44 +0000
Message-Id: <E1W1nHg-0003Bu-DB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] kexec/x86: do not map crash kernel
	area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dff90d0c989624e08c8b191316586f919b3d1483
Author:     Daniel Kiper <daniel.kiper@oracle.com>
AuthorDate: Fri Jan 10 11:43:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:43:20 2014 +0100

    kexec/x86: do not map crash kernel area
    
    This mapping was apparently never used.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Acked-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 7113a45451a9f656deeff070e47672043ed83664
    master date: 2013-12-11 10:37:25 +0100
---
 xen/arch/x86/setup.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c512059..ea43fb1 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1101,9 +1101,7 @@ void __init __start_xen(unsigned long mbi_p)
 #endif
     }
 #ifdef CONFIG_X86_64
-    map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
-                     kexec_crash_area.start >> PAGE_SHIFT,
-                     PFN_UP(kexec_crash_area.size), PAGE_HYPERVISOR);
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
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 Jan 11 01:22:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHj-0008SH-Ql; Sat, 11 Jan 2014 01:22:47 +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 1W1nHj-0008S3-7B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:47 +0000
Received: from [193.109.254.147:34165] by server-5.bemta-14.messagelabs.com id
	2A/38-03510-6EC90D25; Sat, 11 Jan 2014 01:22:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1389403364!10178369!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26275 invoked from network); 11 Jan 2014 01:22:45 -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;
	11 Jan 2014 01:22: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 1W1nHg-0008KX-Lg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHg-0003Bu-DB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:44 +0000
Date: Sat, 11 Jan 2014 01:22:44 +0000
Message-Id: <E1W1nHg-0003Bu-DB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] kexec/x86: do not map crash kernel
	area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dff90d0c989624e08c8b191316586f919b3d1483
Author:     Daniel Kiper <daniel.kiper@oracle.com>
AuthorDate: Fri Jan 10 11:43:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:43:20 2014 +0100

    kexec/x86: do not map crash kernel area
    
    This mapping was apparently never used.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Acked-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 7113a45451a9f656deeff070e47672043ed83664
    master date: 2013-12-11 10:37:25 +0100
---
 xen/arch/x86/setup.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c512059..ea43fb1 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1101,9 +1101,7 @@ void __init __start_xen(unsigned long mbi_p)
 #endif
     }
 #ifdef CONFIG_X86_64
-    map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
-                     kexec_crash_area.start >> PAGE_SHIFT,
-                     PFN_UP(kexec_crash_area.size), PAGE_HYPERVISOR);
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
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 Jan 11 01:22:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHu-0008Tv-TW; Sat, 11 Jan 2014 01:22: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 1W1nHt-0008Tl-Jj
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:57 +0000
Received: from [85.158.137.68:46307] by server-13.bemta-3.messagelabs.com id
	E0/D4-28603-0FC90D25; Sat, 11 Jan 2014 01:22:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389403375!8504678!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10038 invoked from network); 11 Jan 2014 01:22:56 -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;
	11 Jan 2014 01: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 1W1nHq-0008Kg-Rp
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHq-0003CG-Oc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:54 +0000
Date: Sat, 11 Jan 2014 01:22:54 +0000
Message-Id: <E1W1nHq-0003CG-Oc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/p2m: restrict auditing to
	debug builds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a01a5595305f7f18ac0477d3f248e8c2b30b051c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:44:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:44:10 2014 +0100

    x86/p2m: restrict auditing to debug builds
    
    ... since iterating through all of a guest's pages may take unduly
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 4476d05cf5e8d3880f88ce16649766df67e0791e
    master date: 2013-12-13 15:06:11 +0100
---
 xen/include/asm-x86/p2m.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index d5665b8..af1359b 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -660,7 +660,11 @@ int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 extern void p2m_pt_init(struct p2m_domain *p2m);
 
 /* Debugging and auditing of the P2M code? */
+#ifndef NDEBUG
 #define P2M_AUDIT     1
+#else
+#define P2M_AUDIT     0
+#endif
 #define P2M_DEBUGGING 0
 
 #if P2M_AUDIT
--
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 Jan 11 01:22:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 01:22: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 1W1nHu-0008Tv-TW; Sat, 11 Jan 2014 01:22: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 1W1nHt-0008Tl-Jj
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:57 +0000
Received: from [85.158.137.68:46307] by server-13.bemta-3.messagelabs.com id
	E0/D4-28603-0FC90D25; Sat, 11 Jan 2014 01:22:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1389403375!8504678!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10038 invoked from network); 11 Jan 2014 01:22:56 -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;
	11 Jan 2014 01: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 1W1nHq-0008Kg-Rp
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1nHq-0003CG-Oc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 01:22:54 +0000
Date: Sat, 11 Jan 2014 01:22:54 +0000
Message-Id: <E1W1nHq-0003CG-Oc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/p2m: restrict auditing to
	debug builds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a01a5595305f7f18ac0477d3f248e8c2b30b051c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:44:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:44:10 2014 +0100

    x86/p2m: restrict auditing to debug builds
    
    ... since iterating through all of a guest's pages may take unduly
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 4476d05cf5e8d3880f88ce16649766df67e0791e
    master date: 2013-12-13 15:06:11 +0100
---
 xen/include/asm-x86/p2m.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index d5665b8..af1359b 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -660,7 +660,11 @@ int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 extern void p2m_pt_init(struct p2m_domain *p2m);
 
 /* Debugging and auditing of the P2M code? */
+#ifndef NDEBUG
 #define P2M_AUDIT     1
+#else
+#define P2M_AUDIT     0
+#endif
 #define P2M_DEBUGGING 0
 
 #if P2M_AUDIT
--
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 Jan 11 02:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o2W-0003kl-68; Sat, 11 Jan 2014 02:11: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 1W1o2U-0003kg-SQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:07 +0000
Received: from [193.109.254.147:45072] by server-10.bemta-14.messagelabs.com
	id 81/20-20752-A38A0D25; Sat, 11 Jan 2014 02:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389406264!7917174!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26214 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02: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 1W1o2S-0000md-AC
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2R-0004Xt-RZ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:03 +0000
Date: Sat, 11 Jan 2014 02:11:03 +0000
Message-Id: <E1W1o2R-0004Xt-RZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Fix memory leak in
	sched_domain_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 338a8b13757d6ef36ff4e321cb4ef4190ba6ec02
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:16:48 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:08:03 2014 +0000

    tools/libxl: Fix memory leak in sched_domain_output()
    
    Coverity ID: 1055904
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
    (cherry picked from commit 0792426b798fd3b39909d618cf8fe8bac30594f4)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index f5943a4..e2eb9e0 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -5003,6 +5003,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     poolinfo = libxl_list_cpupool(ctx, &n_pools);
     if (!poolinfo) {
         fprintf(stderr, "error getting cpupool info\n");
+        libxl_dominfo_list_free(info, nb_domain);
         return -ERROR_NOMEM;
     }
 
@@ -5024,6 +5025,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     }
     if (poolinfo)
         libxl_cpupoolinfo_list_free(poolinfo, n_pools);
+    libxl_dominfo_list_free(info, nb_domain);
     return 0;
 }
 
--
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 Jan 11 02:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o2W-0003kl-68; Sat, 11 Jan 2014 02:11: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 1W1o2U-0003kg-SQ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:07 +0000
Received: from [193.109.254.147:45072] by server-10.bemta-14.messagelabs.com
	id 81/20-20752-A38A0D25; Sat, 11 Jan 2014 02:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389406264!7917174!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26214 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02: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 1W1o2S-0000md-AC
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2R-0004Xt-RZ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:03 +0000
Date: Sat, 11 Jan 2014 02:11:03 +0000
Message-Id: <E1W1o2R-0004Xt-RZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Fix memory leak in
	sched_domain_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 338a8b13757d6ef36ff4e321cb4ef4190ba6ec02
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:16:48 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:08:03 2014 +0000

    tools/libxl: Fix memory leak in sched_domain_output()
    
    Coverity ID: 1055904
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Keir Fraser <keir@xen.org>
    CC: Jan Beulich <JBeulich@suse.com>
    (cherry picked from commit 0792426b798fd3b39909d618cf8fe8bac30594f4)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index f5943a4..e2eb9e0 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -5003,6 +5003,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     poolinfo = libxl_list_cpupool(ctx, &n_pools);
     if (!poolinfo) {
         fprintf(stderr, "error getting cpupool info\n");
+        libxl_dominfo_list_free(info, nb_domain);
         return -ERROR_NOMEM;
     }
 
@@ -5024,6 +5025,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
     }
     if (poolinfo)
         libxl_cpupoolinfo_list_free(poolinfo, n_pools);
+    libxl_dominfo_list_free(info, nb_domain);
     return 0;
 }
 
--
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 Jan 11 02:11:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o2h-0003le-8s; Sat, 11 Jan 2014 02:11: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 1W1o2f-0003lV-Gl
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:17 +0000
Received: from [85.158.137.68:8366] by server-16.bemta-3.messagelabs.com id
	50/12-26128-448A0D25; Sat, 11 Jan 2014 02:11:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1389406275!8509983!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20479 invoked from network); 11 Jan 2014 02:11:16 -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;
	11 Jan 2014 02:11: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 1W1o2c-0000mh-Q4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2c-0004YH-FE
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:14 +0000
Date: Sat, 11 Jan 2014 02:11:14 +0000
Message-Id: <E1W1o2c-0004YH-FE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Fix integer overflows
	in sched_sedf_domain_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 2de748569f827b037ec10104f7c12f44d01d0ffa
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:51 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:06 2014 +0000

    tools/libxl: Fix integer overflows in sched_sedf_domain_set()
    
    Coverity ID: 1055662 1055663 1055664
    
    Widen from int to uint64_t before multiplcation, rather than afterwards.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit 9c01516fee7d548af58fd310d3c93dd71ea9ea28)
---
 tools/libxl/libxl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 23d7657..5bd6fc1 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4558,11 +4558,11 @@ static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
     }
 
     if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
-        period = scinfo->period * 1000000;
+        period = (uint64_t)scinfo->period * 1000000;
     if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
-        slice = scinfo->slice * 1000000;
+        slice = (uint64_t)scinfo->slice * 1000000;
     if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
-        latency = scinfo->latency * 1000000;
+        latency = (uint64_t)scinfo->latency * 1000000;
     if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
         extratime = scinfo->extratime;
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
--
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 Jan 11 02:11:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o2h-0003le-8s; Sat, 11 Jan 2014 02:11: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 1W1o2f-0003lV-Gl
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:17 +0000
Received: from [85.158.137.68:8366] by server-16.bemta-3.messagelabs.com id
	50/12-26128-448A0D25; Sat, 11 Jan 2014 02:11:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1389406275!8509983!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20479 invoked from network); 11 Jan 2014 02:11:16 -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;
	11 Jan 2014 02:11: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 1W1o2c-0000mh-Q4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2c-0004YH-FE
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:14 +0000
Date: Sat, 11 Jan 2014 02:11:14 +0000
Message-Id: <E1W1o2c-0004YH-FE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Fix integer overflows
	in sched_sedf_domain_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 2de748569f827b037ec10104f7c12f44d01d0ffa
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:51 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:06 2014 +0000

    tools/libxl: Fix integer overflows in sched_sedf_domain_set()
    
    Coverity ID: 1055662 1055663 1055664
    
    Widen from int to uint64_t before multiplcation, rather than afterwards.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit 9c01516fee7d548af58fd310d3c93dd71ea9ea28)
---
 tools/libxl/libxl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 23d7657..5bd6fc1 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4558,11 +4558,11 @@ static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
     }
 
     if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
-        period = scinfo->period * 1000000;
+        period = (uint64_t)scinfo->period * 1000000;
     if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
-        slice = scinfo->slice * 1000000;
+        slice = (uint64_t)scinfo->slice * 1000000;
     if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
-        latency = scinfo->latency * 1000000;
+        latency = (uint64_t)scinfo->latency * 1000000;
     if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
         extratime = scinfo->extratime;
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
--
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 Jan 11 02:11:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11: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 1W1o2r-0003ms-Bq; Sat, 11 Jan 2014 02:11: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 1W1o2p-0003mf-M0
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:27 +0000
Received: from [193.109.254.147:35373] by server-7.bemta-14.messagelabs.com id
	20/65-15500-E48A0D25; Sat, 11 Jan 2014 02:11:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389406285!10175743!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2832 invoked from network); 11 Jan 2014 02:11:26 -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;
	11 Jan 2014 02:11: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 1W1o2n-0000mp-1d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2m-0004ZM-VI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:25 +0000
Date: Sat, 11 Jan 2014 02:11:24 +0000
Message-Id: <E1W1o2m-0004ZM-VI@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xenconsole: Use
	xc_domain_getinfo() correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 74cd17f84649012bec7ce484bf7b9c3f3a9e79ae
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:38 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:20 2014 +0000

    tools/xenconsole: Use xc_domain_getinfo() correctly
    
    Coverity ID: 1055018
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit aa344500a3bfceb3ef01931609ac1cfaf6dcf52d)
---
 tools/console/client/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 523fc23..38c856a 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -339,7 +339,11 @@ int main(int argc, char **argv)
 		xc_interface *xc_handle = xc_interface_open(0,0,0);
 		if (xc_handle == NULL)
 			err(errno, "Could not open xc interface");
-		xc_domain_getinfo(xc_handle, domid, 1, &xcinfo);
+		if ( (xc_domain_getinfo(xc_handle, domid, 1, &xcinfo) != 1) ||
+		     (xcinfo.domid != domid) ) {
+			xc_interface_close(xc_handle);
+			err(errno, "Failed to get domain information");
+		}
 		/* default to pv console for pv guests and serial for hvm guests */
 		if (xcinfo.hvm)
 			type = CONSOLE_SERIAL;
--
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 Jan 11 02:11:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11: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 1W1o2r-0003ms-Bq; Sat, 11 Jan 2014 02:11: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 1W1o2p-0003mf-M0
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:27 +0000
Received: from [193.109.254.147:35373] by server-7.bemta-14.messagelabs.com id
	20/65-15500-E48A0D25; Sat, 11 Jan 2014 02:11:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389406285!10175743!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2832 invoked from network); 11 Jan 2014 02:11:26 -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;
	11 Jan 2014 02:11: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 1W1o2n-0000mp-1d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2m-0004ZM-VI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:25 +0000
Date: Sat, 11 Jan 2014 02:11:24 +0000
Message-Id: <E1W1o2m-0004ZM-VI@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xenconsole: Use
	xc_domain_getinfo() correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 74cd17f84649012bec7ce484bf7b9c3f3a9e79ae
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:38 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:20 2014 +0000

    tools/xenconsole: Use xc_domain_getinfo() correctly
    
    Coverity ID: 1055018
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit aa344500a3bfceb3ef01931609ac1cfaf6dcf52d)
---
 tools/console/client/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 523fc23..38c856a 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -339,7 +339,11 @@ int main(int argc, char **argv)
 		xc_interface *xc_handle = xc_interface_open(0,0,0);
 		if (xc_handle == NULL)
 			err(errno, "Could not open xc interface");
-		xc_domain_getinfo(xc_handle, domid, 1, &xcinfo);
+		if ( (xc_domain_getinfo(xc_handle, domid, 1, &xcinfo) != 1) ||
+		     (xcinfo.domid != domid) ) {
+			xc_interface_close(xc_handle);
+			err(errno, "Failed to get domain information");
+		}
 		/* default to pv console for pv guests and serial for hvm guests */
 		if (xcinfo.hvm)
 			type = CONSOLE_SERIAL;
--
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 Jan 11 02:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o31-0003oL-En; Sat, 11 Jan 2014 02:11: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 1W1o2z-0003o9-Og
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:37 +0000
Received: from [193.109.254.147:51675] by server-10.bemta-14.messagelabs.com
	id 15/40-20752-958A0D25; Sat, 11 Jan 2014 02:11:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1389406295!10111738!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31599 invoked from network); 11 Jan 2014 02:11:36 -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;
	11 Jan 2014 02:11: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 1W1o2x-0000mx-6Z
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2x-0004Zp-5K
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:35 +0000
Date: Sat, 11 Jan 2014 02:11:35 +0000
Message-Id: <E1W1o2x-0004Zp-5K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xenconsoled: Fix file handle
	leaks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6f6d936af8acb7d9e36b70e5e70953f695ca3b36
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:39 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:27 2014 +0000

    tools/xenconsoled: Fix file handle leaks
    
    Coverity ID: 715218 1055876 1055877
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 9ab1792e1ce9e77afe2cd230d69e56a0737a735f)
---
 tools/console/daemon/io.c    |    2 ++
 tools/console/daemon/utils.c |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 250550a..007ecf4 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -278,6 +278,7 @@ static int create_hv_log(void)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
@@ -323,6 +324,7 @@ static int create_domain_log(struct domain *dom)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c
index aab6f42..71dd185 100644
--- a/tools/console/daemon/utils.c
+++ b/tools/console/daemon/utils.c
@@ -104,6 +104,7 @@ void daemonize(const char *pidfile)
 	signal(SIGTSTP, SIG_IGN);
 	signal(SIGTTOU, SIG_IGN);
 	signal(SIGTTIN, SIG_IGN);
+	close(fd);
 }
 
 bool xen_setup(void)
--
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 Jan 11 02:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o31-0003oL-En; Sat, 11 Jan 2014 02:11: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 1W1o2z-0003o9-Og
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:37 +0000
Received: from [193.109.254.147:51675] by server-10.bemta-14.messagelabs.com
	id 15/40-20752-958A0D25; Sat, 11 Jan 2014 02:11:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1389406295!10111738!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31599 invoked from network); 11 Jan 2014 02:11:36 -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;
	11 Jan 2014 02:11: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 1W1o2x-0000mx-6Z
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o2x-0004Zp-5K
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:35 +0000
Date: Sat, 11 Jan 2014 02:11:35 +0000
Message-Id: <E1W1o2x-0004Zp-5K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xenconsoled: Fix file handle
	leaks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6f6d936af8acb7d9e36b70e5e70953f695ca3b36
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:06:39 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:09:27 2014 +0000

    tools/xenconsoled: Fix file handle leaks
    
    Coverity ID: 715218 1055876 1055877
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 9ab1792e1ce9e77afe2cd230d69e56a0737a735f)
---
 tools/console/daemon/io.c    |    2 ++
 tools/console/daemon/utils.c |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 250550a..007ecf4 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -278,6 +278,7 @@ static int create_hv_log(void)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
@@ -323,6 +324,7 @@ static int create_domain_log(struct domain *dom)
 			dolog(LOG_ERR, "Failed to log opening timestamp "
 				       "in %s: %d (%s)", logfile, errno,
 				       strerror(errno));
+			close(fd);
 			return -1;
 		}
 	}
diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c
index aab6f42..71dd185 100644
--- a/tools/console/daemon/utils.c
+++ b/tools/console/daemon/utils.c
@@ -104,6 +104,7 @@ void daemonize(const char *pidfile)
 	signal(SIGTSTP, SIG_IGN);
 	signal(SIGTTOU, SIG_IGN);
 	signal(SIGTTIN, SIG_IGN);
+	close(fd);
 }
 
 bool xen_setup(void)
--
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 Jan 11 02:11:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o3B-0003pz-I5; Sat, 11 Jan 2014 02:11: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 1W1o3A-0003po-4l
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:48 +0000
Received: from [85.158.137.68:59991] by server-9.bemta-3.messagelabs.com id
	03/E9-13104-368A0D25; Sat, 11 Jan 2014 02:11:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1389406305!8545433!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25950 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02:11: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 1W1o37-0000n3-Cc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o37-0004aB-AJ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:45 +0000
Date: Sat, 11 Jan 2014 02:11:45 +0000
Message-Id: <E1W1o37-0004aB-AJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxc: Improve
	xc_dom_malloc_filemap() 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 a5febe4aeff4ab80ce0411f63f336c25951098cf
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:49 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:10:44 2014 +0000

    tools/libxc: Improve xc_dom_malloc_filemap() error handling
    
    Coverity ID 1055563
    
    In the original function, mmap() could be called with a length of -1 if the
    second lseek failed and the caller had not provided max_size.
    
    While fixing up this error, improve the logging of other error paths.  I know
    from personal experience that debugging failures function is rather difficult
    given only "xc_dom_malloc_filemap: failed (on file <somefile>)" in the logs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit c635c1ef7833e7505423f6567bf99bd355101587)
---
 tools/libxc/xc_dom_core.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index 0f367f6..9daccb4 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -176,13 +176,25 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
 {
     struct xc_dom_mem *block = NULL;
     int fd = -1;
+    off_t offset;
 
     fd = open(filename, O_RDONLY);
-    if ( fd == -1 )
+    if ( fd == -1 ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to open file: %s",
+                     strerror(errno));
+        goto err;
+    }
+
+    if ( (lseek(fd, 0, SEEK_SET) == -1) ||
+         ((offset = lseek(fd, 0, SEEK_END)) == -1) ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to seek on file: %s",
+                     strerror(errno));
         goto err;
+    }
 
-    lseek(fd, 0, SEEK_SET);
-    *size = lseek(fd, 0, SEEK_END);
+    *size = offset;
 
     if ( max_size && *size > max_size )
     {
@@ -192,14 +204,24 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
     }
 
     block = malloc(sizeof(*block));
-    if ( block == NULL )
+    if ( block == NULL ) {
+        xc_dom_panic(dom->xch, XC_OUT_OF_MEMORY,
+                     "failed to allocate block (%zu bytes)",
+                     sizeof(*block));
         goto err;
+    }
+
     memset(block, 0, sizeof(*block));
     block->mmap_len = *size;
     block->mmap_ptr = mmap(NULL, block->mmap_len, PROT_READ,
                            MAP_SHARED, fd, 0);
-    if ( block->mmap_ptr == MAP_FAILED )
+    if ( block->mmap_ptr == MAP_FAILED ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to mmap file: %s",
+                     strerror(errno));
         goto err;
+    }
+
     block->next = dom->memblocks;
     dom->memblocks = block;
     dom->alloc_malloc += sizeof(*block);
@@ -212,8 +234,7 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
  err:
     if ( fd != -1 )
         close(fd);
-    if ( block != NULL )
-        free(block);
+    free(block);
     DOMPRINTF("%s: failed (on file `%s')", __FUNCTION__, filename);
     return NULL;
 }
--
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 Jan 11 02:11:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o3B-0003pz-I5; Sat, 11 Jan 2014 02:11: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 1W1o3A-0003po-4l
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:48 +0000
Received: from [85.158.137.68:59991] by server-9.bemta-3.messagelabs.com id
	03/E9-13104-368A0D25; Sat, 11 Jan 2014 02:11:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1389406305!8545433!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25950 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02:11: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 1W1o37-0000n3-Cc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o37-0004aB-AJ
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:45 +0000
Date: Sat, 11 Jan 2014 02:11:45 +0000
Message-Id: <E1W1o37-0004aB-AJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxc: Improve
	xc_dom_malloc_filemap() 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 a5febe4aeff4ab80ce0411f63f336c25951098cf
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:49 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:10:44 2014 +0000

    tools/libxc: Improve xc_dom_malloc_filemap() error handling
    
    Coverity ID 1055563
    
    In the original function, mmap() could be called with a length of -1 if the
    second lseek failed and the caller had not provided max_size.
    
    While fixing up this error, improve the logging of other error paths.  I know
    from personal experience that debugging failures function is rather difficult
    given only "xc_dom_malloc_filemap: failed (on file <somefile>)" in the logs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit c635c1ef7833e7505423f6567bf99bd355101587)
---
 tools/libxc/xc_dom_core.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index 0f367f6..9daccb4 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -176,13 +176,25 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
 {
     struct xc_dom_mem *block = NULL;
     int fd = -1;
+    off_t offset;
 
     fd = open(filename, O_RDONLY);
-    if ( fd == -1 )
+    if ( fd == -1 ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to open file: %s",
+                     strerror(errno));
+        goto err;
+    }
+
+    if ( (lseek(fd, 0, SEEK_SET) == -1) ||
+         ((offset = lseek(fd, 0, SEEK_END)) == -1) ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to seek on file: %s",
+                     strerror(errno));
         goto err;
+    }
 
-    lseek(fd, 0, SEEK_SET);
-    *size = lseek(fd, 0, SEEK_END);
+    *size = offset;
 
     if ( max_size && *size > max_size )
     {
@@ -192,14 +204,24 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
     }
 
     block = malloc(sizeof(*block));
-    if ( block == NULL )
+    if ( block == NULL ) {
+        xc_dom_panic(dom->xch, XC_OUT_OF_MEMORY,
+                     "failed to allocate block (%zu bytes)",
+                     sizeof(*block));
         goto err;
+    }
+
     memset(block, 0, sizeof(*block));
     block->mmap_len = *size;
     block->mmap_ptr = mmap(NULL, block->mmap_len, PROT_READ,
                            MAP_SHARED, fd, 0);
-    if ( block->mmap_ptr == MAP_FAILED )
+    if ( block->mmap_ptr == MAP_FAILED ) {
+        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                     "failed to mmap file: %s",
+                     strerror(errno));
         goto err;
+    }
+
     block->next = dom->memblocks;
     dom->memblocks = block;
     dom->alloc_malloc += sizeof(*block);
@@ -212,8 +234,7 @@ void *xc_dom_malloc_filemap(struct xc_dom_image *dom,
  err:
     if ( fd != -1 )
         close(fd);
-    if ( block != NULL )
-        free(block);
+    free(block);
     DOMPRINTF("%s: failed (on file `%s')", __FUNCTION__, filename);
     return NULL;
 }
--
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 Jan 11 02:11:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11: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 1W1o3K-0003rt-Nf; Sat, 11 Jan 2014 02:11: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 1W1o3K-0003rl-6d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:58 +0000
Received: from [193.109.254.147:41901] by server-13.bemta-14.messagelabs.com
	id D7/A5-19374-D68A0D25; Sat, 11 Jan 2014 02:11:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389406315!10175775!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4027 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02:11: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 1W1o3H-0000nC-Mk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3H-0004aX-HB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:55 +0000
Date: Sat, 11 Jan 2014 02:11:55 +0000
Message-Id: <E1W1o3H-0004aX-HB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Avoid deliberate NULL
	pointer dereference
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4cbbbdfb775d387dc1e0931b44e14d3205c92265
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:50 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:12:54 2014 +0000

    tools/libxl: Avoid deliberate NULL pointer dereference
    
    Coverity ID: 1055290
    
    Calling LIBXL__LOG_ERRNO(ctx,) with a ctx pointer we have just failed to
    allocate is going to end badly.  Opencode a suitable use of xtl_log() instead.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 1677af03c14f2d8d88d2ed9ed8ce6d4906d19fb4)
---
 tools/libxl/libxl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 5bd6fc1..f447b9e 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -32,7 +32,9 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
 
     ctx = malloc(sizeof(*ctx));
     if (!ctx) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Failed to allocate context\n");
+        xtl_log(lg, XTL_ERROR, errno, "libxl",
+                "%s:%d:%s: Failed to allocate context\n",
+                __FILE__, __LINE__, __func__);
         rc = ERROR_NOMEM; goto out;
     }
 
--
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 Jan 11 02:11:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:11: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 1W1o3K-0003rt-Nf; Sat, 11 Jan 2014 02:11: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 1W1o3K-0003rl-6d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:58 +0000
Received: from [193.109.254.147:41901] by server-13.bemta-14.messagelabs.com
	id D7/A5-19374-D68A0D25; Sat, 11 Jan 2014 02:11:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1389406315!10175775!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4027 invoked from network); 11 Jan 2014 02:11: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;
	11 Jan 2014 02:11: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 1W1o3H-0000nC-Mk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3H-0004aX-HB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:11:55 +0000
Date: Sat, 11 Jan 2014 02:11:55 +0000
Message-Id: <E1W1o3H-0004aX-HB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libxl: Avoid deliberate NULL
	pointer dereference
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4cbbbdfb775d387dc1e0931b44e14d3205c92265
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:12:50 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:12:54 2014 +0000

    tools/libxl: Avoid deliberate NULL pointer dereference
    
    Coverity ID: 1055290
    
    Calling LIBXL__LOG_ERRNO(ctx,) with a ctx pointer we have just failed to
    allocate is going to end badly.  Opencode a suitable use of xtl_log() instead.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 1677af03c14f2d8d88d2ed9ed8ce6d4906d19fb4)
---
 tools/libxl/libxl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 5bd6fc1..f447b9e 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -32,7 +32,9 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
 
     ctx = malloc(sizeof(*ctx));
     if (!ctx) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Failed to allocate context\n");
+        xtl_log(lg, XTL_ERROR, errno, "libxl",
+                "%s:%d:%s: Failed to allocate context\n",
+                __FILE__, __LINE__, __func__);
         rc = ERROR_NOMEM; goto out;
     }
 
--
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 Jan 11 02:12:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o3V-0003ts-S8; Sat, 11 Jan 2014 02:12: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 1W1o3U-0003tf-Cc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:08 +0000
Received: from [85.158.139.211:54474] by server-2.bemta-5.messagelabs.com id
	60/C3-29392-778A0D25; Sat, 11 Jan 2014 02:12:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1389406326!9125642!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11044 invoked from network); 11 Jan 2014 02:12:07 -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;
	11 Jan 2014 02:12: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 1W1o3R-0000nl-SX
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3R-0004b3-Qe
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:05 +0000
Date: Sat, 11 Jan 2014 02:12:05 +0000
Message-Id: <E1W1o3R-0004b3-Qe@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: fix fd check in
	libxl__spawn_local_dm
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============8465614010917458574=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 8f1bd27fcd7f8be1353e7309f450283f3e5f7cd0
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:08 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:16:58 2014 +0000

    libxl: fix fd check in libxl__spawn_local_dm
    
    Checking the logfile_w fd for -1 on failure is no longer true, because
    libxl__create_qemu_logfile will now return ERROR_FAIL on failure which
    is -3.
    
    While there also add an error check for opening /dev/null.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    (cherry picked from commit 3b88d95e9c0a5ff91d5b60e94d81f1982af57e7f)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
---
 tools/libxl/libxl_dm.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 7e54c02..4dd71f1 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1180,6 +1180,11 @@ void libxl__spawn_local_dm(libxl__egc *egc, libxl__dm_spawn_state *dmss)
     logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644);
     free(logfile);
     null = open("/dev/null", O_RDONLY);
+    if (null < 0) {
+        LOGE(ERROR, "unable to open /dev/null");
+        rc = ERROR_FAIL;
+        goto out_close;
+    }
 
     const char *dom_path = libxl__xs_get_dompath(gc, domid);
     spawn->pidpath = GCSPRINTF("%s/%s", dom_path, "image/device-model-pid");
@@ -1227,8 +1232,8 @@ retry_transaction:
     rc = 0;
 
 out_close:
-    close(null);
-    close(logfile_w);
+    if (null >= 0) close(null);
+    if (logfile_w >= 0) close(logfile_w);
 out:
     if (rc)
         device_model_spawn_outcome(egc, dmss, rc);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3


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

From xen-changelog-bounces@lists.xen.org Sat Jan 11 02:12:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o3V-0003ts-S8; Sat, 11 Jan 2014 02:12: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 1W1o3U-0003tf-Cc
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:08 +0000
Received: from [85.158.139.211:54474] by server-2.bemta-5.messagelabs.com id
	60/C3-29392-778A0D25; Sat, 11 Jan 2014 02:12:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1389406326!9125642!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11044 invoked from network); 11 Jan 2014 02:12:07 -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;
	11 Jan 2014 02:12: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 1W1o3R-0000nl-SX
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3R-0004b3-Qe
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:05 +0000
Date: Sat, 11 Jan 2014 02:12:05 +0000
Message-Id: <E1W1o3R-0004b3-Qe@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: fix fd check in
	libxl__spawn_local_dm
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============8465614010917458574=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 8f1bd27fcd7f8be1353e7309f450283f3e5f7cd0
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:08 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:16:58 2014 +0000

    libxl: fix fd check in libxl__spawn_local_dm
    
    Checking the logfile_w fd for -1 on failure is no longer true, because
    libxl__create_qemu_logfile will now return ERROR_FAIL on failure which
    is -3.
    
    While there also add an error check for opening /dev/null.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    (cherry picked from commit 3b88d95e9c0a5ff91d5b60e94d81f1982af57e7f)
    
    Conflicts:
    	tools/libxl/libxl_dm.c
---
 tools/libxl/libxl_dm.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 7e54c02..4dd71f1 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1180,6 +1180,11 @@ void libxl__spawn_local_dm(libxl__egc *egc, libxl__dm_spawn_state *dmss)
     logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644);
     free(logfile);
     null = open("/dev/null", O_RDONLY);
+    if (null < 0) {
+        LOGE(ERROR, "unable to open /dev/null");
+        rc = ERROR_FAIL;
+        goto out_close;
+    }
 
     const char *dom_path = libxl__xs_get_dompath(gc, domid);
     spawn->pidpath = GCSPRINTF("%s/%s", dom_path, "image/device-model-pid");
@@ -1227,8 +1232,8 @@ retry_transaction:
     rc = 0;
 
 out_close:
-    close(null);
-    close(logfile_w);
+    if (null >= 0) close(null);
+    if (logfile_w >= 0) close(logfile_w);
 out:
     if (rc)
         device_model_spawn_outcome(egc, dmss, rc);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3


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

From xen-changelog-bounces@lists.xen.org Sat Jan 11 02:12:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o3f-0003vl-VC; Sat, 11 Jan 2014 02:12: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 1W1o3e-0003va-Tn
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:19 +0000
Received: from [85.158.137.68:9702] by server-17.bemta-3.messagelabs.com id
	1E/57-15965-288A0D25; Sat, 11 Jan 2014 02:12:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389406336!8448247!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15075 invoked from network); 11 Jan 2014 02:12:17 -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;
	11 Jan 2014 02:12: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 1W1o3c-0000nr-2O
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3c-0004bR-0n
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:16 +0000
Date: Sat, 11 Jan 2014 02:12:16 +0000
Message-Id: <E1W1o3c-0004bR-0n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xl: fixes for do_daemonize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0251896630798511244=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit c393ff09ade45d1a2a8f1c12eac5eab4d38947a3
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:09 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:23:08 2014 +0000

    xl: fixes for do_daemonize
    
    Fix usage of CHK_ERRNO in do_daemonize and also remove the usage of a
    bogus for(;;).
    
    Coverity-ID: 1130516 and 1130520
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit ed8c9047f6fc6d28fc27d37576ec8c8c1be68efe)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
---
 tools/libxl/xl_cmdimpl.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index e2eb9e0..efff199 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2079,14 +2079,14 @@ start:
         if (child1) {
             printf("Daemon running with PID %d\n", child1);
 
-            for (;;) {
-                got_child = xl_waitpid(child_waitdaemon, &status, 0);
-                if (got_child == child1) break;
+            got_child = xl_waitpid(child_waitdaemon, &status, 0);
+            if (got_child != child1) {
                 assert(got_child == -1);
-                perror("failed to wait for daemonizing child");
+                LOG("failed to wait for daemonizing child: %s", strerror(errno));
                 ret = ERROR_FAIL;
                 goto out;
             }
+
             if (status) {
                 libxl_report_child_exitstatus(ctx, XTL_ERROR,
                            "daemonizing child", child1, status);
@@ -2109,17 +2109,16 @@ start:
             exit(-1);
         }
 
-        CHK_ERRNO(( logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND,
-                                   0644) )<0);
+        CHK_ERRNO(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
         free(fullname);
         free(name);
 
-        CHK_ERRNO(( nullfd = open("/dev/null", O_RDONLY) )<0);
+        CHK_ERRNO(nullfd = open("/dev/null", O_RDONLY));
         dup2(nullfd, 0);
         dup2(logfile, 1);
         dup2(logfile, 2);
 
-        CHK_ERRNO(daemon(0, 1) < 0);
+        CHK_ERRNO(daemon(0, 1));
         need_daemon = 0;
     }
     LOG("Waiting for domain %s (domid %d) to die [pid %ld]",
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3


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

From xen-changelog-bounces@lists.xen.org Sat Jan 11 02:12:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02: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 1W1o3f-0003vl-VC; Sat, 11 Jan 2014 02:12: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 1W1o3e-0003va-Tn
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:19 +0000
Received: from [85.158.137.68:9702] by server-17.bemta-3.messagelabs.com id
	1E/57-15965-288A0D25; Sat, 11 Jan 2014 02:12:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389406336!8448247!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15075 invoked from network); 11 Jan 2014 02:12:17 -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;
	11 Jan 2014 02:12: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 1W1o3c-0000nr-2O
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3c-0004bR-0n
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:16 +0000
Date: Sat, 11 Jan 2014 02:12:16 +0000
Message-Id: <E1W1o3c-0004bR-0n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xl: fixes for do_daemonize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0251896630798511244=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit c393ff09ade45d1a2a8f1c12eac5eab4d38947a3
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Fri Nov 22 12:54:09 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:23:08 2014 +0000

    xl: fixes for do_daemonize
    
    Fix usage of CHK_ERRNO in do_daemonize and also remove the usage of a
    bogus for(;;).
    
    Coverity-ID: 1130516 and 1130520
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit ed8c9047f6fc6d28fc27d37576ec8c8c1be68efe)
    
    Conflicts:
    	tools/libxl/xl_cmdimpl.c
---
 tools/libxl/xl_cmdimpl.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index e2eb9e0..efff199 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2079,14 +2079,14 @@ start:
         if (child1) {
             printf("Daemon running with PID %d\n", child1);
 
-            for (;;) {
-                got_child = xl_waitpid(child_waitdaemon, &status, 0);
-                if (got_child == child1) break;
+            got_child = xl_waitpid(child_waitdaemon, &status, 0);
+            if (got_child != child1) {
                 assert(got_child == -1);
-                perror("failed to wait for daemonizing child");
+                LOG("failed to wait for daemonizing child: %s", strerror(errno));
                 ret = ERROR_FAIL;
                 goto out;
             }
+
             if (status) {
                 libxl_report_child_exitstatus(ctx, XTL_ERROR,
                            "daemonizing child", child1, status);
@@ -2109,17 +2109,16 @@ start:
             exit(-1);
         }
 
-        CHK_ERRNO(( logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND,
-                                   0644) )<0);
+        CHK_ERRNO(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
         free(fullname);
         free(name);
 
-        CHK_ERRNO(( nullfd = open("/dev/null", O_RDONLY) )<0);
+        CHK_ERRNO(nullfd = open("/dev/null", O_RDONLY));
         dup2(nullfd, 0);
         dup2(logfile, 1);
         dup2(logfile, 2);
 
-        CHK_ERRNO(daemon(0, 1) < 0);
+        CHK_ERRNO(daemon(0, 1));
         need_daemon = 0;
     }
     LOG("Waiting for domain %s (domid %d) to die [pid %ld]",
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3


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

From xen-changelog-bounces@lists.xen.org Sat Jan 11 02:12:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o3s-0003xc-2S; Sat, 11 Jan 2014 02:12: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 1W1o3q-0003xR-JV
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:30 +0000
Received: from [85.158.137.68:3277] by server-11.bemta-3.messagelabs.com id
	6A/C0-19379-D88A0D25; Sat, 11 Jan 2014 02:12:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1389406346!7335038!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20718 invoked from network); 11 Jan 2014 02:12:27 -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;
	11 Jan 2014 02:12: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 1W1o3m-0000o0-8S
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3m-0004cK-5k
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:26 +0000
Date: Sat, 11 Jan 2014 02:12:26 +0000
Message-Id: <E1W1o3m-0004cK-5k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: actually abort if
	initializing a ctx's lock fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 62f88c08b31259032c81163f4133d6f25f033c1e
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:00 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:24:53 2014 +0000

    libxl: actually abort if initializing a ctx's lock fails
    
    If initializing the ctx's lock fails, don't keep going, but instead
    error out.
    
    Coverity-ID: 1055289
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit b1cb2bdde1f2393d75a925e6c15862b93d3e7abd)
---
 tools/libxl/libxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index f447b9e..00430fb 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -74,6 +74,8 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex");
         free(ctx);
         ctx = 0;
+        rc = ERROR_FAIL;
+        goto out;
     }
 
     /* Now ctx is safe for ctx_free; failures simply set rc and "goto out" */
--
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 Jan 11 02:12:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o3s-0003xc-2S; Sat, 11 Jan 2014 02:12: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 1W1o3q-0003xR-JV
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:30 +0000
Received: from [85.158.137.68:3277] by server-11.bemta-3.messagelabs.com id
	6A/C0-19379-D88A0D25; Sat, 11 Jan 2014 02:12:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1389406346!7335038!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20718 invoked from network); 11 Jan 2014 02:12:27 -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;
	11 Jan 2014 02:12: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 1W1o3m-0000o0-8S
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3m-0004cK-5k
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:26 +0000
Date: Sat, 11 Jan 2014 02:12:26 +0000
Message-Id: <E1W1o3m-0004cK-5k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: actually abort if
	initializing a ctx's lock fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 62f88c08b31259032c81163f4133d6f25f033c1e
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:00 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:24:53 2014 +0000

    libxl: actually abort if initializing a ctx's lock fails
    
    If initializing the ctx's lock fails, don't keep going, but instead
    error out.
    
    Coverity-ID: 1055289
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit b1cb2bdde1f2393d75a925e6c15862b93d3e7abd)
---
 tools/libxl/libxl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index f447b9e..00430fb 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -74,6 +74,8 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex");
         free(ctx);
         ctx = 0;
+        rc = ERROR_FAIL;
+        goto out;
     }
 
     /* Now ctx is safe for ctx_free; failures simply set rc and "goto out" */
--
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 Jan 11 02:12:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o42-0003zB-5b; Sat, 11 Jan 2014 02:12: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 1W1o40-0003yz-OK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:40 +0000
Received: from [85.158.137.68:16150] by server-11.bemta-3.messagelabs.com id
	15/D0-19379-898A0D25; Sat, 11 Jan 2014 02:12:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389406357!8448274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15790 invoked from network); 11 Jan 2014 02:12:38 -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;
	11 Jan 2014 02:12: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 1W1o3w-0000o9-EN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3w-0004ck-Cr
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:36 +0000
Date: Sat, 11 Jan 2014 02:12:36 +0000
Message-Id: <E1W1o3w-0004ck-Cr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: don't leak output vcpu info
	on error in libxl_list_vcpu
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d41c205e0173ee923e791c2fd320c7eb25f2e9cb
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:01 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:08 2014 +0000

    libxl: don't leak output vcpu info on error in libxl_list_vcpu
    
    Coverity-ID: 1055887
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3c113a57f55dc4e36e3552342721db01efa832c6)
---
 tools/libxl/libxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 00430fb..3d9543b 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4180,15 +4180,15 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
     for (*nb_vcpu = 0; *nb_vcpu <= domaininfo.max_vcpu_id; ++*nb_vcpu, ++ptr) {
         if (libxl_cpu_bitmap_alloc(ctx, &ptr->cpumap, 0)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpumap");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getinfo(ctx->xch, domid, *nb_vcpu, &vcpuinfo) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu info");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getaffinity(ctx->xch, domid, *nb_vcpu, ptr->cpumap.map) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu affinity");
-            return NULL;
+            goto err;
         }
         ptr->vcpuid = *nb_vcpu;
         ptr->cpu = vcpuinfo.cpu;
@@ -4198,6 +4198,10 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
         ptr->vcpu_time = vcpuinfo.cpu_time;
     }
     return ret;
+
+err:
+    free(ret);
+    return NULL;
 }
 
 int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid,
--
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 Jan 11 02:12:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o42-0003zB-5b; Sat, 11 Jan 2014 02:12: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 1W1o40-0003yz-OK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:40 +0000
Received: from [85.158.137.68:16150] by server-11.bemta-3.messagelabs.com id
	15/D0-19379-898A0D25; Sat, 11 Jan 2014 02:12:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389406357!8448274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15790 invoked from network); 11 Jan 2014 02:12:38 -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;
	11 Jan 2014 02:12: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 1W1o3w-0000o9-EN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o3w-0004ck-Cr
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:36 +0000
Date: Sat, 11 Jan 2014 02:12:36 +0000
Message-Id: <E1W1o3w-0004ck-Cr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: don't leak output vcpu info
	on error in libxl_list_vcpu
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d41c205e0173ee923e791c2fd320c7eb25f2e9cb
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:01 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:08 2014 +0000

    libxl: don't leak output vcpu info on error in libxl_list_vcpu
    
    Coverity-ID: 1055887
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3c113a57f55dc4e36e3552342721db01efa832c6)
---
 tools/libxl/libxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 00430fb..3d9543b 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4180,15 +4180,15 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
     for (*nb_vcpu = 0; *nb_vcpu <= domaininfo.max_vcpu_id; ++*nb_vcpu, ++ptr) {
         if (libxl_cpu_bitmap_alloc(ctx, &ptr->cpumap, 0)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpumap");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getinfo(ctx->xch, domid, *nb_vcpu, &vcpuinfo) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu info");
-            return NULL;
+            goto err;
         }
         if (xc_vcpu_getaffinity(ctx->xch, domid, *nb_vcpu, ptr->cpumap.map) == -1) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting vcpu affinity");
-            return NULL;
+            goto err;
         }
         ptr->vcpuid = *nb_vcpu;
         ptr->cpu = vcpuinfo.cpu;
@@ -4198,6 +4198,10 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
         ptr->vcpu_time = vcpuinfo.cpu_time;
     }
     return ret;
+
+err:
+    free(ret);
+    return NULL;
 }
 
 int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid,
--
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 Jan 11 02:12:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o4A-00040c-8a; Sat, 11 Jan 2014 02:12: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 1W1o49-00040O-4H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:49 +0000
Received: from [85.158.143.35:6057] by server-3.bemta-4.messagelabs.com id
	24/44-32360-0A8A0D25; Sat, 11 Jan 2014 02:12:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1389406366!11015234!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7495 invoked from network); 11 Jan 2014 02:12:47 -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;
	11 Jan 2014 02:12: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 1W1o46-0000oH-Ji
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o46-0004d6-Ih
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:46 +0000
Date: Sat, 11 Jan 2014 02:12:46 +0000
Message-Id: <E1W1o46-0004d6-Ih@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: don't leak pcidevs in
	libxl_pcidev_assignable
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cfa252b05855a712eda0da80cd638c7093ddf89f
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:03 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:23 2014 +0000

    libxl: don't leak pcidevs in libxl_pcidev_assignable
    
    Coverity-ID: 1055896
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 26b35b9ace97f433fcf4c5dfbdfb573d1075255f)
---
 tools/libxl/libxl_pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 88bf91e..0295e0b 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1021,11 +1021,10 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
             pcidevs[i].bus == pcidev->bus &&
             pcidevs[i].dev == pcidev->dev &&
             pcidevs[i].func == pcidev->func)
-        {
-            return 1;
-        }
+            break;
     }
-    return 0;
+    free(pcidevs);
+    return i != num;
 }
 
 int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
--
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 Jan 11 02:12:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:12: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 1W1o4A-00040c-8a; Sat, 11 Jan 2014 02:12: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 1W1o49-00040O-4H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:49 +0000
Received: from [85.158.143.35:6057] by server-3.bemta-4.messagelabs.com id
	24/44-32360-0A8A0D25; Sat, 11 Jan 2014 02:12:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1389406366!11015234!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7495 invoked from network); 11 Jan 2014 02:12:47 -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;
	11 Jan 2014 02:12: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 1W1o46-0000oH-Ji
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o46-0004d6-Ih
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:46 +0000
Date: Sat, 11 Jan 2014 02:12:46 +0000
Message-Id: <E1W1o46-0004d6-Ih@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: don't leak pcidevs in
	libxl_pcidev_assignable
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cfa252b05855a712eda0da80cd638c7093ddf89f
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sun Dec 1 23:15:03 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:23 2014 +0000

    libxl: don't leak pcidevs in libxl_pcidev_assignable
    
    Coverity-ID: 1055896
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 26b35b9ace97f433fcf4c5dfbdfb573d1075255f)
---
 tools/libxl/libxl_pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 88bf91e..0295e0b 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1021,11 +1021,10 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
             pcidevs[i].bus == pcidev->bus &&
             pcidevs[i].dev == pcidev->dev &&
             pcidevs[i].func == pcidev->func)
-        {
-            return 1;
-        }
+            break;
     }
-    return 0;
+    free(pcidevs);
+    return i != num;
 }
 
 int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
--
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 Jan 11 02:13:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4K-00042J-BX; Sat, 11 Jan 2014 02:13: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 1W1o4J-000422-6F
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:59 +0000
Received: from [193.109.254.147:43277] by server-13.bemta-14.messagelabs.com
	id 4F/E5-19374-AA8A0D25; Sat, 11 Jan 2014 02:12:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1389406376!10174158!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24785 invoked from network); 11 Jan 2014 02:12:57 -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;
	11 Jan 2014 02:12: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 1W1o4G-0000oQ-Of
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4G-0004dS-N0
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:56 +0000
Date: Sat, 11 Jan 2014 02:12:56 +0000
Message-Id: <E1W1o4G-0004dS-N0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xenstore: sanity check incoming
	message body lengths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 014f9219f1dca3ee92948f0cfcda8d1befa6cbcd
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Nov 30 13:20:04 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:47 2014 +0000

    xenstore: sanity check incoming message body lengths
    
    This is for the client-side receiving messages from xenstored, so there
    is no security impact, unlike XSA-72.
    
    Coverity-ID: 1055449
    Coverity-ID: 1056028
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 8da1ed9031341381c218b7e6eaab5b4f239a327b)
---
 tools/xenstore/xs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index 86ef6c7..d0966ac 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1141,6 +1141,12 @@ static int read_message(struct xs_handle *h, int nonblocking)
 		goto error_freemsg;
 	}
 
+	/* Sanity check message body length. */
+	if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+		saved_errno = E2BIG;
+		goto error_freemsg;
+	}
+
 	/* Allocate and read the message body. */
 	body = msg->body = malloc(msg->hdr.len + 1);
 	if (body == NULL)
--
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 Jan 11 02:13:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4K-00042J-BX; Sat, 11 Jan 2014 02:13: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 1W1o4J-000422-6F
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:59 +0000
Received: from [193.109.254.147:43277] by server-13.bemta-14.messagelabs.com
	id 4F/E5-19374-AA8A0D25; Sat, 11 Jan 2014 02:12:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1389406376!10174158!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24785 invoked from network); 11 Jan 2014 02:12:57 -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;
	11 Jan 2014 02:12: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 1W1o4G-0000oQ-Of
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4G-0004dS-N0
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:12:56 +0000
Date: Sat, 11 Jan 2014 02:12:56 +0000
Message-Id: <E1W1o4G-0004dS-N0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xenstore: sanity check incoming
	message body lengths
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 014f9219f1dca3ee92948f0cfcda8d1befa6cbcd
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Nov 30 13:20:04 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:25:47 2014 +0000

    xenstore: sanity check incoming message body lengths
    
    This is for the client-side receiving messages from xenstored, so there
    is no security impact, unlike XSA-72.
    
    Coverity-ID: 1055449
    Coverity-ID: 1056028
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 8da1ed9031341381c218b7e6eaab5b4f239a327b)
---
 tools/xenstore/xs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index 86ef6c7..d0966ac 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1141,6 +1141,12 @@ static int read_message(struct xs_handle *h, int nonblocking)
 		goto error_freemsg;
 	}
 
+	/* Sanity check message body length. */
+	if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+		saved_errno = E2BIG;
+		goto error_freemsg;
+	}
+
 	/* Allocate and read the message body. */
 	body = msg->body = malloc(msg->hdr.len + 1);
 	if (body == NULL)
--
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 Jan 11 02:13:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4f-00044j-El; Sat, 11 Jan 2014 02:13: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 1W1o4e-00044b-BF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:20 +0000
Received: from [85.158.137.68:4288] by server-17.bemta-3.messagelabs.com id
	EB/97-15965-FB8A0D25; Sat, 11 Jan 2014 02:13:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389406397!8460183!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4098 invoked from network); 11 Jan 2014 02:13:18 -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;
	11 Jan 2014 02:13: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 1W1o4b-0000p2-AN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4b-0004eX-8g
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:17 +0000
Date: Sat, 11 Jan 2014 02:13:17 +0000
Message-Id: <E1W1o4b-0004eX-8g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a859a20735421164b718136d6134b4385235d48e
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Thu Jan 9 12:29:54 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:29:54 2014 +0000

    QEMU_TAG update
---
 Config.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index b7a05cf..820753c 100644
--- a/Config.mk
+++ b/Config.mk
@@ -224,9 +224,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 147f83f9b7d87a698c200c4f3eb2d36a0e4fe54b
-# Mon Nov 11 13:42:56 2013 -0500
-# hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.
+QEMU_TAG ?= 044c9e608e67defea4fc9c9ef4286e85a99d68c2
+# Wed Dec 18 15:25:14 2013 +0000
+# qemu-traditional: Fix build warnings on Wheezy
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
--
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 Jan 11 02:13:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4f-00044j-El; Sat, 11 Jan 2014 02:13: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 1W1o4e-00044b-BF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:20 +0000
Received: from [85.158.137.68:4288] by server-17.bemta-3.messagelabs.com id
	EB/97-15965-FB8A0D25; Sat, 11 Jan 2014 02:13:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389406397!8460183!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4098 invoked from network); 11 Jan 2014 02:13:18 -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;
	11 Jan 2014 02:13: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 1W1o4b-0000p2-AN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4b-0004eX-8g
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:17 +0000
Date: Sat, 11 Jan 2014 02:13:17 +0000
Message-Id: <E1W1o4b-0004eX-8g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a859a20735421164b718136d6134b4385235d48e
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Thu Jan 9 12:29:54 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:29:54 2014 +0000

    QEMU_TAG update
---
 Config.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index b7a05cf..820753c 100644
--- a/Config.mk
+++ b/Config.mk
@@ -224,9 +224,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 147f83f9b7d87a698c200c4f3eb2d36a0e4fe54b
-# Mon Nov 11 13:42:56 2013 -0500
-# hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.
+QEMU_TAG ?= 044c9e608e67defea4fc9c9ef4286e85a99d68c2
+# Wed Dec 18 15:25:14 2013 +0000
+# qemu-traditional: Fix build warnings on Wheezy
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
--
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 Jan 11 02:13:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4p-00045x-JF; Sat, 11 Jan 2014 02:13: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 1W1o4o-00045o-4i
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:30 +0000
Received: from [85.158.139.211:37012] by server-11.bemta-5.messagelabs.com id
	A0/AC-23268-9C8A0D25; Sat, 11 Jan 2014 02:13:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1389406407!9117453!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24691 invoked from network); 11 Jan 2014 02:13:28 -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;
	11 Jan 2014 02:13: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 1W1o4l-0000p8-GN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4l-0004fc-Du
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:27 +0000
Date: Sat, 11 Jan 2014 02:13:27 +0000
Message-Id: <E1W1o4l-0004fc-Du@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xc_restore: Initialise
	console and store mfns
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6d7b67c67039ceac36a780b59c2b890739094b95
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:47 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:36:23 2014 +0000

    tools/xc_restore: Initialise console and store mfns
    
    If the console or store mfn chunks are not present in the migration stream,
    stack junk gets reported for the mfns.
    
    XenServer had a very hard to track down VM corruption issue caused by exactly
    this issue.  Xenconsoled would connect to a junk mfn and incremented the ring
    pointer if the junk happend to look like a valid gfn.
    
    Coverity ID: 1056093 1056094
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 592b614f3469bb83d1158c3dc8c15b67aacfbf4f)
---
 tools/xcutils/xc_restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 5ec90ac..4ea261b 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -23,7 +23,7 @@ main(int argc, char **argv)
     xc_interface *xch;
     int io_fd, ret;
     int superpages;
-    unsigned long store_mfn, console_mfn;
+    unsigned long store_mfn = 0, console_mfn = 0;
     xentoollog_level lvl;
     xentoollog_logger *l;
 
--
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 Jan 11 02:13:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4p-00045x-JF; Sat, 11 Jan 2014 02:13: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 1W1o4o-00045o-4i
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:30 +0000
Received: from [85.158.139.211:37012] by server-11.bemta-5.messagelabs.com id
	A0/AC-23268-9C8A0D25; Sat, 11 Jan 2014 02:13:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1389406407!9117453!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24691 invoked from network); 11 Jan 2014 02:13:28 -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;
	11 Jan 2014 02:13: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 1W1o4l-0000p8-GN
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4l-0004fc-Du
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:27 +0000
Date: Sat, 11 Jan 2014 02:13:27 +0000
Message-Id: <E1W1o4l-0004fc-Du@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/xc_restore: Initialise
	console and store mfns
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 6d7b67c67039ceac36a780b59c2b890739094b95
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Nov 25 11:05:47 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:36:23 2014 +0000

    tools/xc_restore: Initialise console and store mfns
    
    If the console or store mfn chunks are not present in the migration stream,
    stack junk gets reported for the mfns.
    
    XenServer had a very hard to track down VM corruption issue caused by exactly
    this issue.  Xenconsoled would connect to a junk mfn and incremented the ring
    pointer if the junk happend to look like a valid gfn.
    
    Coverity ID: 1056093 1056094
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 592b614f3469bb83d1158c3dc8c15b67aacfbf4f)
---
 tools/xcutils/xc_restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 5ec90ac..4ea261b 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -23,7 +23,7 @@ main(int argc, char **argv)
     xc_interface *xch;
     int io_fd, ret;
     int superpages;
-    unsigned long store_mfn, console_mfn;
+    unsigned long store_mfn = 0, console_mfn = 0;
     xentoollog_level lvl;
     xentoollog_logger *l;
 
--
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 Jan 11 02:13:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4q-00046e-Nw; Sat, 11 Jan 2014 02:13:32 +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 1W1o4p-00045v-L7
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:31 +0000
Received: from [85.158.143.35:7085] by server-3.bemta-4.messagelabs.com id
	FE/84-32360-BC8A0D25; Sat, 11 Jan 2014 02:13:31 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406409!10984718!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17941 invoked from network); 11 Jan 2014 02:13:30 -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;
	11 Jan 2014 02:13: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 1W1o4R-0000oz-5D
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4Q-0004e0-Tk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:07 +0000
Date: Sat, 11 Jan 2014 02:13:06 +0000
Message-Id: <E1W1o4Q-0004e0-Tk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libx: xl uptime doesn't
	require argument
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0c815a0e5308aa5048e5c9959eeb9836917cf17e
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Dec 19 16:45:03 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:30 2014 +0000

    tools/libx: xl uptime doesn't require argument
    
    The current behavior is:
    
    42sh> xl uptime
    'xl uptime' requires at least 1 argument.
    
    Usage: xl [-v] uptime [-s] [Domain]
    
    The normal behavior should list uptime for each domain when there is no
    parameters.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3533972f6d423e71533ffbce5cb9d84bd1a9a674)
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index efff199..a7f888c 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -6096,7 +6096,7 @@ int main_uptime(int argc, char **argv)
     int nb_doms = 0;
     int opt;
 
-    SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 1) {
+    SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 0) {
     case 's':
         short_mode = 1;
         break;
--
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 Jan 11 02:13:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4q-00046e-Nw; Sat, 11 Jan 2014 02:13:32 +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 1W1o4p-00045v-L7
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:31 +0000
Received: from [85.158.143.35:7085] by server-3.bemta-4.messagelabs.com id
	FE/84-32360-BC8A0D25; Sat, 11 Jan 2014 02:13:31 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406409!10984718!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17941 invoked from network); 11 Jan 2014 02:13:30 -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;
	11 Jan 2014 02:13: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 1W1o4R-0000oz-5D
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4Q-0004e0-Tk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:07 +0000
Date: Sat, 11 Jan 2014 02:13:06 +0000
Message-Id: <E1W1o4Q-0004e0-Tk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] tools/libx: xl uptime doesn't
	require argument
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0c815a0e5308aa5048e5c9959eeb9836917cf17e
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Dec 19 16:45:03 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Thu Jan 9 12:26:30 2014 +0000

    tools/libx: xl uptime doesn't require argument
    
    The current behavior is:
    
    42sh> xl uptime
    'xl uptime' requires at least 1 argument.
    
    Usage: xl [-v] uptime [-s] [Domain]
    
    The normal behavior should list uptime for each domain when there is no
    parameters.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 3533972f6d423e71533ffbce5cb9d84bd1a9a674)
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index efff199..a7f888c 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -6096,7 +6096,7 @@ int main_uptime(int argc, char **argv)
     int nb_doms = 0;
     int opt;
 
-    SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 1) {
+    SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 0) {
     case 's':
         short_mode = 1;
         break;
--
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 Jan 11 02:13:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4z-00048e-Ql; Sat, 11 Jan 2014 02:13:41 +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 1W1o4y-00048K-2t
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:40 +0000
Received: from [193.109.254.147:48234] by server-1.bemta-14.messagelabs.com id
	39/C1-15600-3D8A0D25; Sat, 11 Jan 2014 02:13:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389406417!8677066!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19636 invoked from network); 11 Jan 2014 02:13:38 -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;
	11 Jan 2014 02:13: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 1W1o4v-0000pJ-Oe
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4v-0004g2-LP
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:37 +0000
Date: Sat, 11 Jan 2014 02:13:37 +0000
Message-Id: <E1W1o4v-0004g2-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] defer the domain mapping in
	scrub_one_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 62cf637762eeb21bac7a8fda215429e8e765c863
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:02:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:02:03 2014 +0100

    defer the domain mapping in scrub_one_page()
    
    This avoids a resource leak and needless playing with the pagetables in the
    case that the page is broken.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Keir Fraser <keir@xen.org>
    master commit: 7dd4f9da063cb2cd43426c785535534c9d958ce5
    master date: 2013-12-09 14:13:23 +0100
---
 xen/common/page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 8176ad6..60cb01d 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1649,11 +1649,13 @@ __initcall(pagealloc_keyhandler_init);
 
 void scrub_one_page(struct page_info *pg)
 {
-    void *p = __map_domain_page(pg);
+    void *p;
 
     if ( unlikely(pg->count_info & PGC_broken) )
         return;
 
+    p = __map_domain_page(pg);
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_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 Sat Jan 11 02:13:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o4z-00048e-Ql; Sat, 11 Jan 2014 02:13:41 +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 1W1o4y-00048K-2t
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:40 +0000
Received: from [193.109.254.147:48234] by server-1.bemta-14.messagelabs.com id
	39/C1-15600-3D8A0D25; Sat, 11 Jan 2014 02:13:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389406417!8677066!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19636 invoked from network); 11 Jan 2014 02:13:38 -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;
	11 Jan 2014 02:13: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 1W1o4v-0000pJ-Oe
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o4v-0004g2-LP
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:37 +0000
Date: Sat, 11 Jan 2014 02:13:37 +0000
Message-Id: <E1W1o4v-0004g2-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] defer the domain mapping in
	scrub_one_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 62cf637762eeb21bac7a8fda215429e8e765c863
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:02:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:02:03 2014 +0100

    defer the domain mapping in scrub_one_page()
    
    This avoids a resource leak and needless playing with the pagetables in the
    case that the page is broken.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Keir Fraser <keir@xen.org>
    master commit: 7dd4f9da063cb2cd43426c785535534c9d958ce5
    master date: 2013-12-09 14:13:23 +0100
---
 xen/common/page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 8176ad6..60cb01d 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1649,11 +1649,13 @@ __initcall(pagealloc_keyhandler_init);
 
 void scrub_one_page(struct page_info *pg)
 {
-    void *p = __map_domain_page(pg);
+    void *p;
 
     if ( unlikely(pg->count_info & PGC_broken) )
         return;
 
+    p = __map_domain_page(pg);
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_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 Sat Jan 11 02:13:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o59-0004Af-VX; Sat, 11 Jan 2014 02:13: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 1W1o58-0004AV-Fg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:50 +0000
Received: from [193.109.254.147:50293] by server-6.bemta-14.messagelabs.com id
	B0/48-14958-DD8A0D25; Sat, 11 Jan 2014 02:13:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389406428!10203382!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7825 invoked from network); 11 Jan 2014 02:13:49 -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;
	11 Jan 2014 02:13: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 1W1o55-0000pP-Tg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o55-0004gO-Sm
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:47 +0000
Date: Sat, 11 Jan 2014 02:13:47 +0000
Message-Id: <E1W1o55-0004gO-Sm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/cpuidle: publish new states
	only after fully initializing them
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5fc9153dfc01f13a6311fe339cfca62cb75e5b7c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:03:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:03:48 2014 +0100

    x86/cpuidle: publish new states only after fully initializing them
    
    Since state information coming from Dom0 can arrive at any time, on
    any CPU, we ought to make sure that a new state is fully initialized
    before the target CPU might be using it.
    
    Once touching that code, also do minor cleanup: A missing (but benign)
    "break" and some white space adjustments.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: 4ca6f9f0377a30755a299cc60a6d44ab6c3b34d0
    master date: 2013-12-11 10:30:02 +0100
---
 xen/arch/x86/acpi/cpu_idle.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 870fab8..5412338 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -909,7 +909,7 @@ static void set_cx(
                    acpi_power->cpu, xen_cx->type);
             return;
         }
-        cx = &acpi_power->states[acpi_power->count++];
+        cx = &acpi_power->states[acpi_power->count];
         cx->type = xen_cx->type;
         break;
     }
@@ -934,11 +934,14 @@ static void set_cx(
         break;
     default:
         cx->entry_method = ACPI_CSTATE_EM_NONE;
+        break;
     }
 
-    cx->latency  = xen_cx->latency;
-    
+    cx->latency = xen_cx->latency;
     cx->target_residency = cx->latency * latency_factor;
+
+    smp_wmb();
+    acpi_power->count++;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
         acpi_power->safe_state = cx;
 }
--
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 Jan 11 02:13:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:13: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 1W1o59-0004Af-VX; Sat, 11 Jan 2014 02:13: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 1W1o58-0004AV-Fg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:50 +0000
Received: from [193.109.254.147:50293] by server-6.bemta-14.messagelabs.com id
	B0/48-14958-DD8A0D25; Sat, 11 Jan 2014 02:13:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389406428!10203382!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7825 invoked from network); 11 Jan 2014 02:13:49 -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;
	11 Jan 2014 02:13: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 1W1o55-0000pP-Tg
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o55-0004gO-Sm
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:47 +0000
Date: Sat, 11 Jan 2014 02:13:47 +0000
Message-Id: <E1W1o55-0004gO-Sm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/cpuidle: publish new states
	only after fully initializing them
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5fc9153dfc01f13a6311fe339cfca62cb75e5b7c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:03:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:03:48 2014 +0100

    x86/cpuidle: publish new states only after fully initializing them
    
    Since state information coming from Dom0 can arrive at any time, on
    any CPU, we ought to make sure that a new state is fully initialized
    before the target CPU might be using it.
    
    Once touching that code, also do minor cleanup: A missing (but benign)
    "break" and some white space adjustments.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: 4ca6f9f0377a30755a299cc60a6d44ab6c3b34d0
    master date: 2013-12-11 10:30:02 +0100
---
 xen/arch/x86/acpi/cpu_idle.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 870fab8..5412338 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -909,7 +909,7 @@ static void set_cx(
                    acpi_power->cpu, xen_cx->type);
             return;
         }
-        cx = &acpi_power->states[acpi_power->count++];
+        cx = &acpi_power->states[acpi_power->count];
         cx->type = xen_cx->type;
         break;
     }
@@ -934,11 +934,14 @@ static void set_cx(
         break;
     default:
         cx->entry_method = ACPI_CSTATE_EM_NONE;
+        break;
     }
 
-    cx->latency  = xen_cx->latency;
-    
+    cx->latency = xen_cx->latency;
     cx->target_residency = cx->latency * latency_factor;
+
+    smp_wmb();
+    acpi_power->count++;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
         acpi_power->safe_state = cx;
 }
--
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 Jan 11 02:14:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5M-0004Cc-2J; Sat, 11 Jan 2014 02:14: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 1W1o5I-0004CN-O4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:00 +0000
Received: from [85.158.137.68:5044] by server-7.bemta-3.messagelabs.com id
	A7/FE-27599-8E8A0D25; Sat, 11 Jan 2014 02:14:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389406438!8529991!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10388 invoked from network); 11 Jan 2014 02:13:59 -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;
	11 Jan 2014 02:13: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 1W1o5G-0000pY-32
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5G-0004gk-18
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:58 +0000
Date: Sat, 11 Jan 2014 02:13:58 +0000
Message-Id: <E1W1o5G-0004gk-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/PV: don't commit debug
	register values early in arch_set_info_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 f5f4f5c5f55e3a5a701ff23bc8bf5a520f034770
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:04:18 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:04:18 2014 +0100

    x86/PV: don't commit debug register values early in arch_set_info_guest()
    
    They're being taken care of later (via set_debugreg()), and temporarily
    copying them into struct vcpu means that bad values may end up getting
    loaded during context switch if the vCPU is already running and the
    function errors out between the premature and real commit step, leading
    to the same issue that XSA-12 dealt with.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 398c39b6c18d0b55acfc88f5ee75b3a793e6eeec
    master date: 2013-12-11 10:33:19 +0100
---
 xen/arch/x86/domain.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 146fb9f..f01c7e3 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -720,13 +720,14 @@ int arch_set_info_guest(
             XLAT_trap_info(v->arch.pv_vcpu.trap_ctxt + i,
                            c.cmp->trap_ctxt + i);
     }
-    for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
-        v->arch.debugreg[i] = c(debugreg[i]);
 
     v->arch.user_regs.eflags |= 2;
 
     if ( is_hvm_vcpu(v) )
     {
+        for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
+            v->arch.debugreg[i] = c(debugreg[i]);
+
         hvm_set_info_guest(v);
         goto out;
     }
--
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 Jan 11 02:14:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5M-0004Cc-2J; Sat, 11 Jan 2014 02:14: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 1W1o5I-0004CN-O4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:00 +0000
Received: from [85.158.137.68:5044] by server-7.bemta-3.messagelabs.com id
	A7/FE-27599-8E8A0D25; Sat, 11 Jan 2014 02:14:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1389406438!8529991!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10388 invoked from network); 11 Jan 2014 02:13:59 -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;
	11 Jan 2014 02:13: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 1W1o5G-0000pY-32
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5G-0004gk-18
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:13:58 +0000
Date: Sat, 11 Jan 2014 02:13:58 +0000
Message-Id: <E1W1o5G-0004gk-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/PV: don't commit debug
	register values early in arch_set_info_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 f5f4f5c5f55e3a5a701ff23bc8bf5a520f034770
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:04:18 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:04:18 2014 +0100

    x86/PV: don't commit debug register values early in arch_set_info_guest()
    
    They're being taken care of later (via set_debugreg()), and temporarily
    copying them into struct vcpu means that bad values may end up getting
    loaded during context switch if the vCPU is already running and the
    function errors out between the premature and real commit step, leading
    to the same issue that XSA-12 dealt with.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 398c39b6c18d0b55acfc88f5ee75b3a793e6eeec
    master date: 2013-12-11 10:33:19 +0100
---
 xen/arch/x86/domain.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 146fb9f..f01c7e3 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -720,13 +720,14 @@ int arch_set_info_guest(
             XLAT_trap_info(v->arch.pv_vcpu.trap_ctxt + i,
                            c.cmp->trap_ctxt + i);
     }
-    for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
-        v->arch.debugreg[i] = c(debugreg[i]);
 
     v->arch.user_regs.eflags |= 2;
 
     if ( is_hvm_vcpu(v) )
     {
+        for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
+            v->arch.debugreg[i] = c(debugreg[i]);
+
         hvm_set_info_guest(v);
         goto out;
     }
--
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 Jan 11 02:14:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5V-0004ED-5R; Sat, 11 Jan 2014 02:14: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 1W1o5S-0004Dy-UL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:11 +0000
Received: from [85.158.137.68:5232] by server-9.bemta-3.messagelabs.com id
	25/7A-13104-2F8A0D25; Sat, 11 Jan 2014 02:14:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389406448!8460225!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6196 invoked from network); 11 Jan 2014 02:14:09 -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;
	11 Jan 2014 02:14: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 1W1o5Q-0000q7-95
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5Q-0004hG-6d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:08 +0000
Date: Sat, 11 Jan 2014 02:14:08 +0000
Message-Id: <E1W1o5Q-0004hG-6d@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] kexec/x86: do not map crash kernel
	area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8d611a00d3389d9c16506326e24145b94ac6fb86
Author:     Daniel Kiper <daniel.kiper@oracle.com>
AuthorDate: Fri Jan 10 11:04:46 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:04:46 2014 +0100

    kexec/x86: do not map crash kernel area
    
    This mapping was apparently never used.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Acked-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 7113a45451a9f656deeff070e47672043ed83664
    master date: 2013-12-11 10:37:25 +0100
---
 xen/arch/x86/setup.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 47aeed3..9e0bddc 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1096,9 +1096,7 @@ void __init __start_xen(unsigned long mbi_p)
                          mod[i].mod_start,
                          PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR);
     }
-    map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
-                     kexec_crash_area.start >> PAGE_SHIFT,
-                     PFN_UP(kexec_crash_area.size), PAGE_HYPERVISOR);
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
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 Jan 11 02:14:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5V-0004ED-5R; Sat, 11 Jan 2014 02:14: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 1W1o5S-0004Dy-UL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:11 +0000
Received: from [85.158.137.68:5232] by server-9.bemta-3.messagelabs.com id
	25/7A-13104-2F8A0D25; Sat, 11 Jan 2014 02:14:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1389406448!8460225!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6196 invoked from network); 11 Jan 2014 02:14:09 -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;
	11 Jan 2014 02:14: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 1W1o5Q-0000q7-95
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5Q-0004hG-6d
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:08 +0000
Date: Sat, 11 Jan 2014 02:14:08 +0000
Message-Id: <E1W1o5Q-0004hG-6d@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] kexec/x86: do not map crash kernel
	area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8d611a00d3389d9c16506326e24145b94ac6fb86
Author:     Daniel Kiper <daniel.kiper@oracle.com>
AuthorDate: Fri Jan 10 11:04:46 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:04:46 2014 +0100

    kexec/x86: do not map crash kernel area
    
    This mapping was apparently never used.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Acked-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 7113a45451a9f656deeff070e47672043ed83664
    master date: 2013-12-11 10:37:25 +0100
---
 xen/arch/x86/setup.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 47aeed3..9e0bddc 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1096,9 +1096,7 @@ void __init __start_xen(unsigned long mbi_p)
                          mod[i].mod_start,
                          PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR);
     }
-    map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
-                     kexec_crash_area.start >> PAGE_SHIFT,
-                     PFN_UP(kexec_crash_area.size), PAGE_HYPERVISOR);
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
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 Jan 11 02:14:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5f-0004Fp-8m; Sat, 11 Jan 2014 02:14:23 +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 1W1o5d-0004Fb-1F
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:21 +0000
Received: from [85.158.143.35:10267] by server-2.bemta-4.messagelabs.com id
	4D/9B-11386-CF8A0D25; Sat, 11 Jan 2014 02:14:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389406458!11013152!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27215 invoked from network); 11 Jan 2014 02:14:19 -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;
	11 Jan 2014 02:14: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 1W1o5a-0000qD-FK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5a-0004he-DB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:18 +0000
Date: Sat, 11 Jan 2014 02:14:18 +0000
Message-Id: <E1W1o5a-0004he-DB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] amd/passthrough: Do not leak
	domain mappings from do_invalidate_dte()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 48825e566cfad72975d6579d31555ab806fb2f71
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:06:05 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:06:05 2014 +0100

    amd/passthrough: Do not leak domain mappings from do_invalidate_dte()
    
    Coverity ID: 1135379
    
    As the code stands, the domain mapping will be leaked on each error path.
    
    The mapping can be for a much shorter period of time, and all the relevent
    information can be pulled out at once.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    master commit: 80dbe90a4e6b31f8cb859f7450fa3eed8695fd1d
    master date: 2013-12-10 16:16:49 +0100
---
 xen/drivers/passthrough/amd/iommu_guest.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 952600a..477de20 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -424,12 +424,17 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
                                         sizeof(dev_entry_t), gbdf);
     ASSERT(mfn_valid(dte_mfn));
 
+    /* Read guest dte information */
     dte_base = map_domain_page(dte_mfn);
 
     gdte = dte_base + gbdf % (PAGE_SIZE / sizeof(dev_entry_t));
 
     gdom_id  = get_domid_from_dte(gdte);
     gcr3_gfn = get_guest_cr3_from_dte(gdte);
+    glx      = get_glx_from_dte(gdte);
+    gv       = get_gv_from_dte(gdte);
+
+    unmap_domain_page(dte_base);
 
     /* Do not update host dte before gcr3 has been set */
     if ( gcr3_gfn == 0 )
@@ -440,7 +445,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
 
     ASSERT(mfn_valid(gcr3_mfn));
 
-    /* Read guest dte information */
     iommu = find_iommu_for_device(0, mbdf);
     if ( !iommu )
     {
@@ -449,11 +453,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
         return -ENODEV;
     }
 
-    glx = get_glx_from_dte(gdte);
-    gv = get_gv_from_dte(gdte);
-
-    unmap_domain_page(dte_base);
-
     /* Setup host device entry */
     hdom_id = host_domid(d, gdom_id);
     req_id = get_dma_requestor_id(iommu->seg, mbdf);
--
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 Jan 11 02:14:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5f-0004Fp-8m; Sat, 11 Jan 2014 02:14:23 +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 1W1o5d-0004Fb-1F
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:21 +0000
Received: from [85.158.143.35:10267] by server-2.bemta-4.messagelabs.com id
	4D/9B-11386-CF8A0D25; Sat, 11 Jan 2014 02:14:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1389406458!11013152!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27215 invoked from network); 11 Jan 2014 02:14:19 -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;
	11 Jan 2014 02:14: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 1W1o5a-0000qD-FK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5a-0004he-DB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:18 +0000
Date: Sat, 11 Jan 2014 02:14:18 +0000
Message-Id: <E1W1o5a-0004he-DB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] amd/passthrough: Do not leak
	domain mappings from do_invalidate_dte()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 48825e566cfad72975d6579d31555ab806fb2f71
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:06:05 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:06:05 2014 +0100

    amd/passthrough: Do not leak domain mappings from do_invalidate_dte()
    
    Coverity ID: 1135379
    
    As the code stands, the domain mapping will be leaked on each error path.
    
    The mapping can be for a much shorter period of time, and all the relevent
    information can be pulled out at once.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    master commit: 80dbe90a4e6b31f8cb859f7450fa3eed8695fd1d
    master date: 2013-12-10 16:16:49 +0100
---
 xen/drivers/passthrough/amd/iommu_guest.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 952600a..477de20 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -424,12 +424,17 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
                                         sizeof(dev_entry_t), gbdf);
     ASSERT(mfn_valid(dte_mfn));
 
+    /* Read guest dte information */
     dte_base = map_domain_page(dte_mfn);
 
     gdte = dte_base + gbdf % (PAGE_SIZE / sizeof(dev_entry_t));
 
     gdom_id  = get_domid_from_dte(gdte);
     gcr3_gfn = get_guest_cr3_from_dte(gdte);
+    glx      = get_glx_from_dte(gdte);
+    gv       = get_gv_from_dte(gdte);
+
+    unmap_domain_page(dte_base);
 
     /* Do not update host dte before gcr3 has been set */
     if ( gcr3_gfn == 0 )
@@ -440,7 +445,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
 
     ASSERT(mfn_valid(gcr3_mfn));
 
-    /* Read guest dte information */
     iommu = find_iommu_for_device(0, mbdf);
     if ( !iommu )
     {
@@ -449,11 +453,6 @@ static int do_invalidate_dte(struct domain *d, cmd_entry_t *cmd)
         return -ENODEV;
     }
 
-    glx = get_glx_from_dte(gdte);
-    gv = get_gv_from_dte(gdte);
-
-    unmap_domain_page(dte_base);
-
     /* Setup host device entry */
     hdom_id = host_domid(d, gdom_id);
     req_id = get_dma_requestor_id(iommu->seg, mbdf);
--
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 Jan 11 02:14:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5o-0004HF-Bx; Sat, 11 Jan 2014 02:14: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 1W1o5n-0004H2-AC
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:31 +0000
Received: from [85.158.137.68:5520] by server-1.bemta-3.messagelabs.com id
	FB/36-29598-609A0D25; Sat, 11 Jan 2014 02:14:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389406468!4828992!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20965 invoked from network); 11 Jan 2014 02:14:29 -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;
	11 Jan 2014 02:14: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 1W1o5k-0000qL-KX
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5k-0004ic-J6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:28 +0000
Date: Sat, 11 Jan 2014 02:14:28 +0000
Message-Id: <E1W1o5k-0004ic-J6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/p2m: restrict auditing to
	debug builds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 237925365096827ce87d40268e11266804022947
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:07:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:07:36 2014 +0100

    x86/p2m: restrict auditing to debug builds
    
    ... since iterating through all of a guest's pages may take unduly
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 4476d05cf5e8d3880f88ce16649766df67e0791e
    master date: 2013-12-13 15:06:11 +0100
---
 xen/include/asm-x86/p2m.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index 43583b2..f4e7253 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -600,7 +600,11 @@ int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 extern void p2m_pt_init(struct p2m_domain *p2m);
 
 /* Debugging and auditing of the P2M code? */
+#ifndef NDEBUG
 #define P2M_AUDIT     1
+#else
+#define P2M_AUDIT     0
+#endif
 #define P2M_DEBUGGING 0
 
 #if P2M_AUDIT
--
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 Jan 11 02:14:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5o-0004HF-Bx; Sat, 11 Jan 2014 02:14: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 1W1o5n-0004H2-AC
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:31 +0000
Received: from [85.158.137.68:5520] by server-1.bemta-3.messagelabs.com id
	FB/36-29598-609A0D25; Sat, 11 Jan 2014 02:14:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389406468!4828992!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20965 invoked from network); 11 Jan 2014 02:14:29 -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;
	11 Jan 2014 02:14: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 1W1o5k-0000qL-KX
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5k-0004ic-J6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:28 +0000
Date: Sat, 11 Jan 2014 02:14:28 +0000
Message-Id: <E1W1o5k-0004ic-J6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/p2m: restrict auditing to
	debug builds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 237925365096827ce87d40268e11266804022947
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 10 11:07:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:07:36 2014 +0100

    x86/p2m: restrict auditing to debug builds
    
    ... since iterating through all of a guest's pages may take unduly
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 4476d05cf5e8d3880f88ce16649766df67e0791e
    master date: 2013-12-13 15:06:11 +0100
---
 xen/include/asm-x86/p2m.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index 43583b2..f4e7253 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -600,7 +600,11 @@ int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 extern void p2m_pt_init(struct p2m_domain *p2m);
 
 /* Debugging and auditing of the P2M code? */
+#ifndef NDEBUG
 #define P2M_AUDIT     1
+#else
+#define P2M_AUDIT     0
+#endif
 #define P2M_DEBUGGING 0
 
 #if P2M_AUDIT
--
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 Jan 11 02:14:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5y-0004Ih-Gw; Sat, 11 Jan 2014 02:14:42 +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 1W1o5x-0004IY-7e
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:41 +0000
Received: from [85.158.143.35:10718] by server-3.bemta-4.messagelabs.com id
	16/05-32360-019A0D25; Sat, 11 Jan 2014 02:14:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406478!10984777!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20477 invoked from network); 11 Jan 2014 02:14:39 -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;
	11 Jan 2014 02:14: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 1W1o5u-0000qR-Pk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5u-0004j2-O6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:38 +0000
Date: Sat, 11 Jan 2014 02:14:38 +0000
Message-Id: <E1W1o5u-0004j2-O6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/mm: Prevent leaking domain
	mappings in paging_log_dirty_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 4cfd2132b5afb959226eafd8dd3be0a69f947e2a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:08:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:08:35 2014 +0100

    x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
    
    Coverity ID: 1135374 1135375 1135376 1135377
    
    If {copy_to,clear}_guest_offset() fails, we would leak the domain mappings for
    l4 thru l1.
    
    Fixing this requires having conditional unmaps on the faulting path, which in
    turn requires explicitly initialising the pointers to NULL because of the
    early ENOMEM exit.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 0725f326358cbb2ba7f9626976e346b963d74c37
    master date: 2013-12-17 16:38:07 +0100
---
 xen/arch/x86/mm/paging.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 4ba7669..21344e5 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -330,8 +330,8 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
 {
     int rv = 0, clean = 0, peek = 1;
     unsigned long pages = 0;
-    mfn_t *l4, *l3, *l2;
-    unsigned long *l1;
+    mfn_t *l4 = NULL, *l3 = NULL, *l2 = NULL;
+    unsigned long *l1 = NULL;
     int i4, i3, i2;
 
     domain_pause(d);
@@ -434,6 +434,16 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
  out:
     paging_unlock(d);
     domain_unpause(d);
+
+    if ( l1 )
+        unmap_domain_page(l1);
+    if ( l2 )
+        unmap_domain_page(l2);
+    if ( l3 )
+        unmap_domain_page(l3);
+    if ( l4 )
+        unmap_domain_page(l4);
+
     return rv;
 }
 
--
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 Jan 11 02:14:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o5y-0004Ih-Gw; Sat, 11 Jan 2014 02:14:42 +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 1W1o5x-0004IY-7e
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:41 +0000
Received: from [85.158.143.35:10718] by server-3.bemta-4.messagelabs.com id
	16/05-32360-019A0D25; Sat, 11 Jan 2014 02:14:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406478!10984777!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20477 invoked from network); 11 Jan 2014 02:14:39 -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;
	11 Jan 2014 02:14: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 1W1o5u-0000qR-Pk
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o5u-0004j2-O6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:38 +0000
Date: Sat, 11 Jan 2014 02:14:38 +0000
Message-Id: <E1W1o5u-0004j2-O6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/mm: Prevent leaking domain
	mappings in paging_log_dirty_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 4cfd2132b5afb959226eafd8dd3be0a69f947e2a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:08:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:08:35 2014 +0100

    x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
    
    Coverity ID: 1135374 1135375 1135376 1135377
    
    If {copy_to,clear}_guest_offset() fails, we would leak the domain mappings for
    l4 thru l1.
    
    Fixing this requires having conditional unmaps on the faulting path, which in
    turn requires explicitly initialising the pointers to NULL because of the
    early ENOMEM exit.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 0725f326358cbb2ba7f9626976e346b963d74c37
    master date: 2013-12-17 16:38:07 +0100
---
 xen/arch/x86/mm/paging.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 4ba7669..21344e5 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -330,8 +330,8 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
 {
     int rv = 0, clean = 0, peek = 1;
     unsigned long pages = 0;
-    mfn_t *l4, *l3, *l2;
-    unsigned long *l1;
+    mfn_t *l4 = NULL, *l3 = NULL, *l2 = NULL;
+    unsigned long *l1 = NULL;
     int i4, i3, i2;
 
     domain_pause(d);
@@ -434,6 +434,16 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
  out:
     paging_unlock(d);
     domain_unpause(d);
+
+    if ( l1 )
+        unmap_domain_page(l1);
+    if ( l2 )
+        unmap_domain_page(l2);
+    if ( l3 )
+        unmap_domain_page(l3);
+    if ( l4 )
+        unmap_domain_page(l4);
+
     return rv;
 }
 
--
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 Jan 11 02:14:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o69-0004Kr-TT; Sat, 11 Jan 2014 02:14:53 +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 1W1o68-0004Ka-Aw
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:52 +0000
Received: from [85.158.139.211:61770] by server-14.bemta-5.messagelabs.com id
	2A/41-24200-B19A0D25; Sat, 11 Jan 2014 02:14:51 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389406490!9116807!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_DONG
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13253 invoked from network); 11 Jan 2014 02:14:51 -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;
	11 Jan 2014 02:14: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 1W1o65-0000qX-Rw
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o64-0004jT-TR
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:49 +0000
Date: Sat, 11 Jan 2014 02:14:48 +0000
Message-Id: <E1W1o64-0004jT-TR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] Nested VMX: Setup the virtual NMI
	exiting 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 aa00104a494bd3ccbae60f49bf0287a5c2c06e9d
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 10 11:09:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:09:28 2014 +0100

    Nested VMX: Setup the virtual NMI exiting info
    
    When inject a virtual nmi exit to L1, hypervisor need to set the
    virtual vmcs with right vaule which is missing in current Xen.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Eddie Dong <eddie.dong@intel.com>
    master commit: 136058cc5ce4f1e630d5bac199304fdc9429faa3
    master date: 2013-12-20 11:57:14 +0100
---
 xen/arch/x86/hvm/vmx/vvmx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index fd841ae..aad108c 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1294,6 +1294,12 @@ static void sync_exception_state(struct vcpu *v)
                     nvmx->intr.error_code);
         break;
     case X86_EVENTTYPE_NMI:
+        __set_vvmcs(nvcpu->nv_vvmcx, VM_EXIT_REASON,
+                    EXIT_REASON_EXCEPTION_NMI);
+        __set_vvmcs(nvcpu->nv_vvmcx, EXIT_QUALIFICATION, 0);
+        __set_vvmcs(nvcpu->nv_vvmcx, VM_EXIT_INTR_INFO,
+                    nvmx->intr.intr_info);
+        break;
     default:
         gdprintk(XENLOG_ERR, "Exception state %lx not handled\n",
                nvmx->intr.intr_info); 
--
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 Jan 11 02:14:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:14: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 1W1o69-0004Kr-TT; Sat, 11 Jan 2014 02:14:53 +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 1W1o68-0004Ka-Aw
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:52 +0000
Received: from [85.158.139.211:61770] by server-14.bemta-5.messagelabs.com id
	2A/41-24200-B19A0D25; Sat, 11 Jan 2014 02:14:51 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1389406490!9116807!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_DONG
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13253 invoked from network); 11 Jan 2014 02:14:51 -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;
	11 Jan 2014 02:14: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 1W1o65-0000qX-Rw
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o64-0004jT-TR
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:14:49 +0000
Date: Sat, 11 Jan 2014 02:14:48 +0000
Message-Id: <E1W1o64-0004jT-TR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] Nested VMX: Setup the virtual NMI
	exiting 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 aa00104a494bd3ccbae60f49bf0287a5c2c06e9d
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 10 11:09:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:09:28 2014 +0100

    Nested VMX: Setup the virtual NMI exiting info
    
    When inject a virtual nmi exit to L1, hypervisor need to set the
    virtual vmcs with right vaule which is missing in current Xen.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Eddie Dong <eddie.dong@intel.com>
    master commit: 136058cc5ce4f1e630d5bac199304fdc9429faa3
    master date: 2013-12-20 11:57:14 +0100
---
 xen/arch/x86/hvm/vmx/vvmx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index fd841ae..aad108c 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1294,6 +1294,12 @@ static void sync_exception_state(struct vcpu *v)
                     nvmx->intr.error_code);
         break;
     case X86_EVENTTYPE_NMI:
+        __set_vvmcs(nvcpu->nv_vvmcx, VM_EXIT_REASON,
+                    EXIT_REASON_EXCEPTION_NMI);
+        __set_vvmcs(nvcpu->nv_vvmcx, EXIT_QUALIFICATION, 0);
+        __set_vvmcs(nvcpu->nv_vvmcx, VM_EXIT_INTR_INFO,
+                    nvmx->intr.intr_info);
+        break;
     default:
         gdprintk(XENLOG_ERR, "Exception state %lx not handled\n",
                nvmx->intr.intr_info); 
--
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 Jan 11 02:15:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6K-0004Mg-HC; Sat, 11 Jan 2014 02:15:04 +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 1W1o6I-0004MK-EI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:02 +0000
Received: from [85.158.143.35:57302] by server-3.bemta-4.messagelabs.com id
	C8/25-32360-529A0D25; Sat, 11 Jan 2014 02:15:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406500!10984796!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21280 invoked from network); 11 Jan 2014 02:15:01 -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;
	11 Jan 2014 02:15: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 1W1o6G-0000qg-1H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6F-0004jz-VL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:00 +0000
Date: Sat, 11 Jan 2014 02:14:59 +0000
Message-Id: <E1W1o6F-0004jz-VL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VMX,
	apicv: Set "NMI-window exiting" for NMI
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 47adfc02529053ca376704d1de8d9313c3a213a5
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 10 11:10:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:10:07 2014 +0100

    VMX,apicv: Set "NMI-window exiting" for NMI
    
    Enable NMI-window exiting if interrupt is blocked by NMI under apicv enabled
    platform.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    master commit: 185e83591ce420e0b004646b55c5e4783e388531
    master date: 2014-01-07 14:30:21 +0100
---
 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index 45942ab..c9eb932 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -238,10 +238,11 @@ void vmx_intr_assist(void)
         intblk = hvm_interrupt_blocked(v, intack);
         if ( cpu_has_vmx_virtual_intr_delivery )
         {
-            /* Set "Interrupt-window exiting" for ExtINT */
+            /* Set "Interrupt-window exiting" for ExtINT and NMI. */
             if ( (intblk != hvm_intblk_none) &&
-                 ( (intack.source == hvm_intsrc_pic) ||
-                 ( intack.source == hvm_intsrc_vector) ) )
+                 (intack.source == hvm_intsrc_pic ||
+                  intack.source == hvm_intsrc_vector ||
+                  intack.source == hvm_intsrc_nmi) )
             {
                 enable_intr_window(v, intack);
                 goto out;
--
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 Jan 11 02:15:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6K-0004Mg-HC; Sat, 11 Jan 2014 02:15:04 +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 1W1o6I-0004MK-EI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:02 +0000
Received: from [85.158.143.35:57302] by server-3.bemta-4.messagelabs.com id
	C8/25-32360-529A0D25; Sat, 11 Jan 2014 02:15:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1389406500!10984796!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21280 invoked from network); 11 Jan 2014 02:15:01 -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;
	11 Jan 2014 02:15: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 1W1o6G-0000qg-1H
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6F-0004jz-VL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:00 +0000
Date: Sat, 11 Jan 2014 02:14:59 +0000
Message-Id: <E1W1o6F-0004jz-VL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VMX,
	apicv: Set "NMI-window exiting" for NMI
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 47adfc02529053ca376704d1de8d9313c3a213a5
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 10 11:10:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:10:07 2014 +0100

    VMX,apicv: Set "NMI-window exiting" for NMI
    
    Enable NMI-window exiting if interrupt is blocked by NMI under apicv enabled
    platform.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    master commit: 185e83591ce420e0b004646b55c5e4783e388531
    master date: 2014-01-07 14:30:21 +0100
---
 xen/arch/x86/hvm/vmx/intr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index 45942ab..c9eb932 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -238,10 +238,11 @@ void vmx_intr_assist(void)
         intblk = hvm_interrupt_blocked(v, intack);
         if ( cpu_has_vmx_virtual_intr_delivery )
         {
-            /* Set "Interrupt-window exiting" for ExtINT */
+            /* Set "Interrupt-window exiting" for ExtINT and NMI. */
             if ( (intblk != hvm_intblk_none) &&
-                 ( (intack.source == hvm_intsrc_pic) ||
-                 ( intack.source == hvm_intsrc_vector) ) )
+                 (intack.source == hvm_intsrc_pic ||
+                  intack.source == hvm_intsrc_vector ||
+                  intack.source == hvm_intsrc_nmi) )
             {
                 enable_intr_window(v, intack);
                 goto out;
--
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 Jan 11 02:15:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o6U-0004Oo-P1; Sat, 11 Jan 2014 02:15:14 +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 1W1o6T-0004OW-C9
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:13 +0000
Received: from [193.109.254.147:4887] by server-10.bemta-14.messagelabs.com id
	2A/41-20752-039A0D25; Sat, 11 Jan 2014 02:15:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389406510!7917450!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3568 invoked from network); 11 Jan 2014 02:15:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	11 Jan 2014 02:15: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 1W1o6Q-0000ri-8X
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6Q-0004ki-4b
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:10 +0000
Date: Sat, 11 Jan 2014 02:15:10 +0000
Message-Id: <E1W1o6Q-0004ki-4b@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] AMD/microcode: avoid
	use-after-free for the microcode buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit de91b853fab7201e502f75aa01e6b3e4ec51d8a4
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:10:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:10:48 2014 +0100

    AMD/microcode: avoid use-after-free for the microcode buffer
    
    It is possible to free the mc_old buffer and then store it for use in the case
    of resume.
    
    This keeps the old semantics of being able to return an error even after a
    successful microcode application.
    
    Coverity-ID 1146953
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    master commit: a9fe8c7dda440b84e178d65dcd64c0173b0a4b5d
    master date: 2014-01-07 14:58:35 +0100
---
 xen/arch/x86/microcode_amd.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index a3ceef8..3014245 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -275,7 +275,7 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
     struct microcode_amd *mc_amd, *mc_old;
     size_t offset = bufsize;
     size_t last_offset, applied_offset = 0;
-    int error = 0;
+    int error = 0, save_error = 1;
     struct ucode_cpu_info *uci = &per_cpu(ucode_cpu_info, cpu);
 
     /* We should bind the task to the CPU */
@@ -338,19 +338,20 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
      */
     if ( applied_offset )
     {
-        int ret = get_ucode_from_buffer_amd(mc_amd, buf, bufsize,
-                                            &applied_offset);
-        if ( ret == 0 )
-            xfree(mc_old);
-        else
-            error = ret;
+        save_error = get_ucode_from_buffer_amd(
+            mc_amd, buf, bufsize, &applied_offset);
+
+        if ( save_error )
+            error = save_error;
     }
 
-    if ( !applied_offset || error )
+    if ( save_error )
     {
         xfree(mc_amd);
         uci->mc.mc_amd = mc_old;
     }
+    else
+        xfree(mc_old);
 
   out:
     svm_host_osvw_init();
--
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 Jan 11 02:15:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W1o6U-0004Oo-P1; Sat, 11 Jan 2014 02:15:14 +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 1W1o6T-0004OW-C9
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:13 +0000
Received: from [193.109.254.147:4887] by server-10.bemta-14.messagelabs.com id
	2A/41-20752-039A0D25; Sat, 11 Jan 2014 02:15:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1389406510!7917450!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3568 invoked from network); 11 Jan 2014 02:15:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	11 Jan 2014 02:15: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 1W1o6Q-0000ri-8X
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6Q-0004ki-4b
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:10 +0000
Date: Sat, 11 Jan 2014 02:15:10 +0000
Message-Id: <E1W1o6Q-0004ki-4b@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] AMD/microcode: avoid
	use-after-free for the microcode buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit de91b853fab7201e502f75aa01e6b3e4ec51d8a4
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:10:48 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:10:48 2014 +0100

    AMD/microcode: avoid use-after-free for the microcode buffer
    
    It is possible to free the mc_old buffer and then store it for use in the case
    of resume.
    
    This keeps the old semantics of being able to return an error even after a
    successful microcode application.
    
    Coverity-ID 1146953
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    master commit: a9fe8c7dda440b84e178d65dcd64c0173b0a4b5d
    master date: 2014-01-07 14:58:35 +0100
---
 xen/arch/x86/microcode_amd.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index a3ceef8..3014245 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -275,7 +275,7 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
     struct microcode_amd *mc_amd, *mc_old;
     size_t offset = bufsize;
     size_t last_offset, applied_offset = 0;
-    int error = 0;
+    int error = 0, save_error = 1;
     struct ucode_cpu_info *uci = &per_cpu(ucode_cpu_info, cpu);
 
     /* We should bind the task to the CPU */
@@ -338,19 +338,20 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
      */
     if ( applied_offset )
     {
-        int ret = get_ucode_from_buffer_amd(mc_amd, buf, bufsize,
-                                            &applied_offset);
-        if ( ret == 0 )
-            xfree(mc_old);
-        else
-            error = ret;
+        save_error = get_ucode_from_buffer_amd(
+            mc_amd, buf, bufsize, &applied_offset);
+
+        if ( save_error )
+            error = save_error;
     }
 
-    if ( !applied_offset || error )
+    if ( save_error )
     {
         xfree(mc_amd);
         uci->mc.mc_amd = mc_old;
     }
+    else
+        xfree(mc_old);
 
   out:
     svm_host_osvw_init();
--
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 Jan 11 02:15:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6d-0004RG-TZ; Sat, 11 Jan 2014 02:15:23 +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 1W1o6c-0004Qu-WB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:23 +0000
Received: from [85.158.143.35:61675] by server-2.bemta-4.messagelabs.com id
	43/0C-11386-A39A0D25; Sat, 11 Jan 2014 02:15:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1389406520!10988322!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17999 invoked from network); 11 Jan 2014 02:15:21 -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;
	11 Jan 2014 02:15: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 1W1o6a-0000rq-EL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6a-0004l5-CT
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:20 +0000
Date: Sat, 11 Jan 2014 02:15:20 +0000
Message-Id: <E1W1o6a-0004l5-CT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VTD/DMAR: free() correct pointer
	on error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ed50e7e5db4055788d4099012236ea3cdeb96759
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:11:39 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:11:39 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 62d33ca1048f4e08eaeb026c7b79239b4605b636
    master date: 2014-01-07 14:59:31 +0100
---
 xen/drivers/passthrough/vtd/dmar.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8e162ff..cb998e2 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -312,7 +312,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_pci_path *path;
     struct acpi_drhd_unit *drhd = type == DMAR_TYPE ?
         container_of(scope, struct acpi_drhd_unit, scope) : NULL;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -364,9 +364,10 @@ static int __init acpi_parse_dev_scope(
             {
                 struct acpi_hpet_unit *acpi_hpet_unit;
 
+                ret = -ENOMEM;
                 acpi_hpet_unit = xmalloc(struct acpi_hpet_unit);
                 if ( !acpi_hpet_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_hpet_unit->id = acpi_scope->enumeration_id;
                 acpi_hpet_unit->bus = bus;
                 acpi_hpet_unit->dev = path->dev;
@@ -397,9 +398,10 @@ static int __init acpi_parse_dev_scope(
 
             if ( drhd )
             {
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -420,7 +422,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -708,7 +716,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return ret;
--
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 Jan 11 02:15:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6d-0004RG-TZ; Sat, 11 Jan 2014 02:15:23 +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 1W1o6c-0004Qu-WB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:23 +0000
Received: from [85.158.143.35:61675] by server-2.bemta-4.messagelabs.com id
	43/0C-11386-A39A0D25; Sat, 11 Jan 2014 02:15:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1389406520!10988322!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17999 invoked from network); 11 Jan 2014 02:15:21 -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;
	11 Jan 2014 02:15: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 1W1o6a-0000rq-EL
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6a-0004l5-CT
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:20 +0000
Date: Sat, 11 Jan 2014 02:15:20 +0000
Message-Id: <E1W1o6a-0004l5-CT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VTD/DMAR: free() correct pointer
	on error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ed50e7e5db4055788d4099012236ea3cdeb96759
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 11:11:39 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:11:39 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 62d33ca1048f4e08eaeb026c7b79239b4605b636
    master date: 2014-01-07 14:59:31 +0100
---
 xen/drivers/passthrough/vtd/dmar.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8e162ff..cb998e2 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -312,7 +312,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_pci_path *path;
     struct acpi_drhd_unit *drhd = type == DMAR_TYPE ?
         container_of(scope, struct acpi_drhd_unit, scope) : NULL;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -364,9 +364,10 @@ static int __init acpi_parse_dev_scope(
             {
                 struct acpi_hpet_unit *acpi_hpet_unit;
 
+                ret = -ENOMEM;
                 acpi_hpet_unit = xmalloc(struct acpi_hpet_unit);
                 if ( !acpi_hpet_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_hpet_unit->id = acpi_scope->enumeration_id;
                 acpi_hpet_unit->bus = bus;
                 acpi_hpet_unit->dev = path->dev;
@@ -397,9 +398,10 @@ static int __init acpi_parse_dev_scope(
 
             if ( drhd )
             {
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -420,7 +422,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -708,7 +716,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return ret;
--
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 Jan 11 02:15:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6o-0004Te-9o; Sat, 11 Jan 2014 02:15: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 1W1o6n-0004TO-Eo
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:33 +0000
Received: from [85.158.139.211:34345] by server-2.bemta-5.messagelabs.com id
	ED/B4-29392-449A0D25; Sat, 11 Jan 2014 02:15:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389406530!9124963!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20622 invoked from network); 11 Jan 2014 02:15:31 -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;
	11 Jan 2014 02:15: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 1W1o6k-0000ry-KI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6k-0004mF-IT
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:30 +0000
Date: Sat, 11 Jan 2014 02:15:30 +0000
Message-Id: <E1W1o6k-0004mF-IT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] AMD/IOMMU: fix infinite loop due
	to ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 409a2073540b0dfc47a4d0f6de41db160c28e488
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Fri Jan 10 11:12:25 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:12:25 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 81b1c7de2339d2788352b162057e70130803f3cf
    master date: 2014-01-07 15:09:42 +0100
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 330e74f..a88d223 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -156,7 +156,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -234,7 +234,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -289,7 +290,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -427,7 +428,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -508,7 +509,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -587,7 +588,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index ba86e1b..2af0923 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -533,7 +533,8 @@ static hw_irq_controller iommu_maskable_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, flags;
+    u16 domain_id, device_id, flags;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1112,7 +1113,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1127,7 +1128,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1165,7 +1166,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1315,7 +1316,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf; 
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
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 Jan 11 02:15:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6o-0004Te-9o; Sat, 11 Jan 2014 02:15: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 1W1o6n-0004TO-Eo
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:33 +0000
Received: from [85.158.139.211:34345] by server-2.bemta-5.messagelabs.com id
	ED/B4-29392-449A0D25; Sat, 11 Jan 2014 02:15:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389406530!9124963!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20622 invoked from network); 11 Jan 2014 02:15:31 -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;
	11 Jan 2014 02:15: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 1W1o6k-0000ry-KI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6k-0004mF-IT
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:30 +0000
Date: Sat, 11 Jan 2014 02:15:30 +0000
Message-Id: <E1W1o6k-0004mF-IT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] AMD/IOMMU: fix infinite loop due
	to ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 409a2073540b0dfc47a4d0f6de41db160c28e488
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Fri Jan 10 11:12:25 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:12:25 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 81b1c7de2339d2788352b162057e70130803f3cf
    master date: 2014-01-07 15:09:42 +0100
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 330e74f..a88d223 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -156,7 +156,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -234,7 +234,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -289,7 +290,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -427,7 +428,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -508,7 +509,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -587,7 +588,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index ba86e1b..2af0923 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -533,7 +533,8 @@ static hw_irq_controller iommu_maskable_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, flags;
+    u16 domain_id, device_id, flags;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1112,7 +1113,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1127,7 +1128,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1165,7 +1166,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1315,7 +1316,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf; 
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
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 Jan 11 02:15:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6y-0004Vq-Cm; Sat, 11 Jan 2014 02:15: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 1W1o6x-0004Vc-H4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:43 +0000
Received: from [85.158.137.68:18653] by server-12.bemta-3.messagelabs.com id
	32/67-20055-E49A0D25; Sat, 11 Jan 2014 02:15:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389406540!7692240!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21339 invoked from network); 11 Jan 2014 02:15:41 -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;
	11 Jan 2014 02:15: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 1W1o6u-0000s4-PI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6u-0004me-OG
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:40 +0000
Date: Sat, 11 Jan 2014 02:15:40 +0000
Message-Id: <E1W1o6u-0004me-OG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 670d64aed01e27d3e8b783fd83dc29bc46a808b7
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 11:13:00 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:13:00 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: e019c606f598eb76585cc5d26a242a40dfc4d580
    master date: 2014-01-08 09:15:03 +0100
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index de76ada..6c16399 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
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 Jan 11 02:15:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 02:15: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 1W1o6y-0004Vq-Cm; Sat, 11 Jan 2014 02:15: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 1W1o6x-0004Vc-H4
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:43 +0000
Received: from [85.158.137.68:18653] by server-12.bemta-3.messagelabs.com id
	32/67-20055-E49A0D25; Sat, 11 Jan 2014 02:15:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1389406540!7692240!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21339 invoked from network); 11 Jan 2014 02:15:41 -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;
	11 Jan 2014 02:15: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 1W1o6u-0000s4-PI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W1o6u-0004me-OG
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 02:15:40 +0000
Date: Sat, 11 Jan 2014 02:15:40 +0000
Message-Id: <E1W1o6u-0004me-OG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 670d64aed01e27d3e8b783fd83dc29bc46a808b7
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 11:13:00 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 11:13:00 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: e019c606f598eb76585cc5d26a242a40dfc4d580
    master date: 2014-01-08 09:15:03 +0100
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index de76ada..6c16399 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
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 Jan 11 21:33:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26B3-0004Jz-6A; Sat, 11 Jan 2014 21:33: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 1W26B1-0004Ji-6k
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:07 +0000
Received: from [85.158.143.35:53001] by server-1.bemta-4.messagelabs.com id
	B1/8F-02132-298B1D25; Sat, 11 Jan 2014 21:33:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389475984!11086979!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3535 invoked from network); 11 Jan 2014 21:33:05 -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;
	11 Jan 2014 21:33: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 1W26Ay-0005co-2G
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Ax-0002Qk-Mt
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:03 +0000
Date: Sat, 11 Jan 2014 21:33:03 +0000
Message-Id: <E1W26Ax-0002Qk-Mt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] dbg_rw_guest_mem: need to call put_gfn
	in 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 3dbab7a8bf4bef1bb2967cb3a8c7ed2146482ab3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 17:45:01 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 17:45:01 2014 +0100

    dbg_rw_guest_mem: need to call put_gfn in error path
    
    Using a 1G hvm domU (in grub) and gdbsx:
    
    (gdb) set arch i8086
    warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
    of GDB.  Attempting to continue with the default i8086 settings.
    
    The target architecture is assumed to be i8086
    (gdb) target remote localhost:9999
    Remote debugging using localhost:9999
    Remote debugging from host 127.0.0.1
    0x0000d475 in ?? ()
    (gdb) x/1xh 0x6ae9168b
    
    Will reproduce this bug.
    
    With a debug=y build you will get:
    
    Assertion '!preempt_count()' failed at preempt.c:37
    
    For a debug=n build you will get a dom0 VCPU hung (at some point) in:
    
             [ffff82c4c0126eec] _write_lock+0x3c/0x50
              ffff82c4c01e43a0  __get_gfn_type_access+0x150/0x230
              ffff82c4c0158885  dbg_rw_mem+0x115/0x360
              ffff82c4c0158fc8  arch_do_domctl+0x4b8/0x22f0
              ffff82c4c01709ed  get_page+0x2d/0x100
              ffff82c4c01031aa  do_domctl+0x2ba/0x11e0
              ffff82c4c0179662  do_mmuext_op+0x8d2/0x1b20
              ffff82c4c0183598  __update_vcpu_system_time+0x288/0x340
              ffff82c4c015c719  continue_nonidle_domain+0x9/0x30
              ffff82c4c012938b  add_entry+0x4b/0xb0
              ffff82c4c02223f9  syscall_enter+0xa9/0xae
    
    And gdb output:
    
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     0x3024
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     Ignoring packet error, continuing...
    Reply contains invalid hex digit 116
    
    The 1st one worked because the p2m.lock is recursive and the PCPU
    had not yet changed.
    
    crash reports (for example):
    
    crash> mm_rwlock_t 0xffff83083f913010
    struct mm_rwlock_t {
      lock = {
        raw = {
          lock = 2147483647
        },
        debug = {<No data fields>}
      },
      unlock_level = 0,
      recurse_count = 1,
      locker = 1,
      locker_function = 0xffff82c4c022c640 <__func__.13514> "__get_gfn_type_access"
    }
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 xen/arch/x86/debug.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/debug.c b/xen/arch/x86/debug.c
index a67a192..435bd40 100644
--- a/xen/arch/x86/debug.c
+++ b/xen/arch/x86/debug.c
@@ -63,10 +63,17 @@ dbg_hvm_va2mfn(dbgva_t vaddr, struct domain *dp, int toaddr,
     if ( p2m_is_readonly(gfntype) && toaddr )
     {
         DBGP2("kdb:p2m_is_readonly: gfntype:%x\n", gfntype);
-        return INVALID_MFN;
+        mfn = INVALID_MFN;
+    }
+    else
+        DBGP2("X: vaddr:%lx domid:%d mfn:%lx\n", vaddr, dp->domain_id, mfn);
+
+    if ( mfn == INVALID_MFN )
+    {
+        put_gfn(dp, *gfn);
+        *gfn = INVALID_GFN;
     }
 
-    DBGP2("X: vaddr:%lx domid:%d mfn:%lx\n", vaddr, dp->domain_id, mfn);
     return 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 Sat Jan 11 21:33:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26B3-0004Jz-6A; Sat, 11 Jan 2014 21:33: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 1W26B1-0004Ji-6k
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:07 +0000
Received: from [85.158.143.35:53001] by server-1.bemta-4.messagelabs.com id
	B1/8F-02132-298B1D25; Sat, 11 Jan 2014 21:33:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389475984!11086979!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3535 invoked from network); 11 Jan 2014 21:33:05 -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;
	11 Jan 2014 21:33: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 1W26Ay-0005co-2G
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Ax-0002Qk-Mt
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:03 +0000
Date: Sat, 11 Jan 2014 21:33:03 +0000
Message-Id: <E1W26Ax-0002Qk-Mt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] dbg_rw_guest_mem: need to call put_gfn
	in 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 3dbab7a8bf4bef1bb2967cb3a8c7ed2146482ab3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 10 17:45:01 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 17:45:01 2014 +0100

    dbg_rw_guest_mem: need to call put_gfn in error path
    
    Using a 1G hvm domU (in grub) and gdbsx:
    
    (gdb) set arch i8086
    warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
    of GDB.  Attempting to continue with the default i8086 settings.
    
    The target architecture is assumed to be i8086
    (gdb) target remote localhost:9999
    Remote debugging using localhost:9999
    Remote debugging from host 127.0.0.1
    0x0000d475 in ?? ()
    (gdb) x/1xh 0x6ae9168b
    
    Will reproduce this bug.
    
    With a debug=y build you will get:
    
    Assertion '!preempt_count()' failed at preempt.c:37
    
    For a debug=n build you will get a dom0 VCPU hung (at some point) in:
    
             [ffff82c4c0126eec] _write_lock+0x3c/0x50
              ffff82c4c01e43a0  __get_gfn_type_access+0x150/0x230
              ffff82c4c0158885  dbg_rw_mem+0x115/0x360
              ffff82c4c0158fc8  arch_do_domctl+0x4b8/0x22f0
              ffff82c4c01709ed  get_page+0x2d/0x100
              ffff82c4c01031aa  do_domctl+0x2ba/0x11e0
              ffff82c4c0179662  do_mmuext_op+0x8d2/0x1b20
              ffff82c4c0183598  __update_vcpu_system_time+0x288/0x340
              ffff82c4c015c719  continue_nonidle_domain+0x9/0x30
              ffff82c4c012938b  add_entry+0x4b/0xb0
              ffff82c4c02223f9  syscall_enter+0xa9/0xae
    
    And gdb output:
    
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     0x3024
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     Ignoring packet error, continuing...
    Reply contains invalid hex digit 116
    
    The 1st one worked because the p2m.lock is recursive and the PCPU
    had not yet changed.
    
    crash reports (for example):
    
    crash> mm_rwlock_t 0xffff83083f913010
    struct mm_rwlock_t {
      lock = {
        raw = {
          lock = 2147483647
        },
        debug = {<No data fields>}
      },
      unlock_level = 0,
      recurse_count = 1,
      locker = 1,
      locker_function = 0xffff82c4c022c640 <__func__.13514> "__get_gfn_type_access"
    }
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 xen/arch/x86/debug.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/debug.c b/xen/arch/x86/debug.c
index a67a192..435bd40 100644
--- a/xen/arch/x86/debug.c
+++ b/xen/arch/x86/debug.c
@@ -63,10 +63,17 @@ dbg_hvm_va2mfn(dbgva_t vaddr, struct domain *dp, int toaddr,
     if ( p2m_is_readonly(gfntype) && toaddr )
     {
         DBGP2("kdb:p2m_is_readonly: gfntype:%x\n", gfntype);
-        return INVALID_MFN;
+        mfn = INVALID_MFN;
+    }
+    else
+        DBGP2("X: vaddr:%lx domid:%d mfn:%lx\n", vaddr, dp->domain_id, mfn);
+
+    if ( mfn == INVALID_MFN )
+    {
+        put_gfn(dp, *gfn);
+        *gfn = INVALID_GFN;
     }
 
-    DBGP2("X: vaddr:%lx domid:%d mfn:%lx\n", vaddr, dp->domain_id, mfn);
     return 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 Sat Jan 11 21:33:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W26BD-0004LP-8x; Sat, 11 Jan 2014 21:33: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 1W26BB-0004L1-Fz
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:17 +0000
Received: from [193.109.254.147:58301] by server-4.bemta-14.messagelabs.com id
	87/27-03916-C98B1D25; Sat, 11 Jan 2014 21:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389475994!8763717!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6855 invoked from network); 11 Jan 2014 21:33: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;
	11 Jan 2014 21:33: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 1W26B8-0005cr-Fd
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26B8-0002R8-6t
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:14 +0000
Date: Sat, 11 Jan 2014 21:33:14 +0000
Message-Id: <E1W26B8-0002R8-6t@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: map portion of kexec crash area
	that is within the direct map area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0896bd8bea84526b00e00d2d076f4f953a3d73cb
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Fri Jan 10 17:46:33 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 17:46:33 2014 +0100

    x86: map portion of kexec crash area that is within the direct map area
    
    Commit 7113a45451a9f656deeff070e47672043ed83664 (kexec/x86: do not map
    crash kernel area) causes fatal page faults when loading a crash
    image.  The attempt to zero the first control page allocated from the
    crash region will fault as the VA return by map_domain_page() has no
    mapping.
    
    The fault will occur on non-debug builds of Xen when the crash area is
    below 5 TiB (which will be most systems).
    
    The assumption that the crash area mapping was not used is incorrect.
    map_domain_page() is used when loading an image and building the
    image's page tables to temporarily map the crash area, thus the
    mapping is required if the crash area is in the direct map area.
    
    Reintroduce the mapping, but only the portions of the crash area that
    are within the direct map area.
    
    Reported-by: Don Slutz <dslutz@verizon.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Tested-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
    Tested-by: Daniel Kiper <daniel.kiper@oracle.com>
    
    This is really just a band aid - kexec shouldn't rely on the crash area
    being always mapped when in the direct mapping range (and it didn't use
    to in its previous form). That's primarily because map_domain_page()
    (needed when the area is outside the direct mapping range) may be
    unusable when wanting to kexec due to a crash, but also because in the
    case of PFN compression the kexec range (if specified on the command
    line) could fall into a hole between used memory ranges (while we're
    currently only ignoring memory at the top of the physical address
    space, it's pretty clear that sooner or later we will want that
    selection to become more sophisticated in order to maximize the memory
    made use of).
    
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/setup.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4833ca3..b49256d 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1098,6 +1098,17 @@ void __init __start_xen(unsigned long mbi_p)
                          PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR);
     }
 
+    if ( kexec_crash_area.size )
+    {
+        unsigned long s = PFN_DOWN(kexec_crash_area.start);
+        unsigned long e = min(s + PFN_UP(kexec_crash_area.size),
+                              PFN_UP(__pa(HYPERVISOR_VIRT_END - 1)));
+
+        if ( e > s ) 
+            map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
+                             s, e - s, PAGE_HYPERVISOR);
+    }
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W26BD-0004LP-8x; Sat, 11 Jan 2014 21:33: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 1W26BB-0004L1-Fz
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:17 +0000
Received: from [193.109.254.147:58301] by server-4.bemta-14.messagelabs.com id
	87/27-03916-C98B1D25; Sat, 11 Jan 2014 21:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389475994!8763717!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6855 invoked from network); 11 Jan 2014 21:33: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;
	11 Jan 2014 21:33: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 1W26B8-0005cr-Fd
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26B8-0002R8-6t
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:14 +0000
Date: Sat, 11 Jan 2014 21:33:14 +0000
Message-Id: <E1W26B8-0002R8-6t@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: map portion of kexec crash area
	that is within the direct map area
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0896bd8bea84526b00e00d2d076f4f953a3d73cb
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Fri Jan 10 17:46:33 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 10 17:46:33 2014 +0100

    x86: map portion of kexec crash area that is within the direct map area
    
    Commit 7113a45451a9f656deeff070e47672043ed83664 (kexec/x86: do not map
    crash kernel area) causes fatal page faults when loading a crash
    image.  The attempt to zero the first control page allocated from the
    crash region will fault as the VA return by map_domain_page() has no
    mapping.
    
    The fault will occur on non-debug builds of Xen when the crash area is
    below 5 TiB (which will be most systems).
    
    The assumption that the crash area mapping was not used is incorrect.
    map_domain_page() is used when loading an image and building the
    image's page tables to temporarily map the crash area, thus the
    mapping is required if the crash area is in the direct map area.
    
    Reintroduce the mapping, but only the portions of the crash area that
    are within the direct map area.
    
    Reported-by: Don Slutz <dslutz@verizon.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Tested-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
    Tested-by: Daniel Kiper <daniel.kiper@oracle.com>
    
    This is really just a band aid - kexec shouldn't rely on the crash area
    being always mapped when in the direct mapping range (and it didn't use
    to in its previous form). That's primarily because map_domain_page()
    (needed when the area is outside the direct mapping range) may be
    unusable when wanting to kexec due to a crash, but also because in the
    case of PFN compression the kexec range (if specified on the command
    line) could fall into a hole between used memory ranges (while we're
    currently only ignoring memory at the top of the physical address
    space, it's pretty clear that sooner or later we will want that
    selection to become more sophisticated in order to maximize the memory
    made use of).
    
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/setup.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4833ca3..b49256d 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1098,6 +1098,17 @@ void __init __start_xen(unsigned long mbi_p)
                          PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR);
     }
 
+    if ( kexec_crash_area.size )
+    {
+        unsigned long s = PFN_DOWN(kexec_crash_area.start);
+        unsigned long e = min(s + PFN_UP(kexec_crash_area.size),
+                              PFN_UP(__pa(HYPERVISOR_VIRT_END - 1)));
+
+        if ( e > s ) 
+            map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
+                             s, e - s, PAGE_HYPERVISOR);
+    }
+
     xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
                    ~((1UL << L2_PAGETABLE_SHIFT) - 1);
     destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21: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 1W26BN-0004NX-C5; Sat, 11 Jan 2014 21:33: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 1W26BL-0004N7-U6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:28 +0000
Received: from [193.109.254.147:58533] by server-13.bemta-14.messagelabs.com
	id 86/BA-19374-7A8B1D25; Sat, 11 Jan 2014 21:33:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389476004!10290957!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1150 invoked from network); 11 Jan 2014 21:33:25 -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;
	11 Jan 2014 21:33: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 1W26BI-0005d0-Nx
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26BI-0002RU-IK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:24 +0000
Date: Sat, 11 Jan 2014 21:33:24 +0000
Message-Id: <E1W26BI-0002RU-IK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: use
	'for_app_registration' in osevent callbacks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8aba7e1ce9e26cdf9d2b002ed87b4bd75fce4af3
Author:     Rob Hoes <rob.hoes@citrix.com>
AuthorDate: Fri Jan 10 13:52:04 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:54:45 2014 +0000

    libxl: ocaml: use 'for_app_registration' in osevent callbacks
    
    This allows the application to pass a token to libxl in the fd/timeout
    registration callbacks, which it receives back in modification or
    deregistration callbacks.
    
    It turns out that this is essential for timeout handling, in order to
    identify which timeout to change on a modify event.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    Acked-by: David Scott <dave.scott@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/ocaml/libs/xl/xenlight.ml.in   |    4 +-
 tools/ocaml/libs/xl/xenlight.mli.in  |   10 +-
 tools/ocaml/libs/xl/xenlight_stubs.c |  149 +++++++++++++++++++++++++++++-----
 3 files changed, 136 insertions(+), 27 deletions(-)

diff --git a/tools/ocaml/libs/xl/xenlight.ml.in b/tools/ocaml/libs/xl/xenlight.ml.in
index 47f3487..80e620a 100644
--- a/tools/ocaml/libs/xl/xenlight.ml.in
+++ b/tools/ocaml/libs/xl/xenlight.ml.in
@@ -68,12 +68,12 @@ module Async = struct
 	external osevent_occurred_fd : ctx -> for_libxl -> Unix.file_descr -> event list -> event list -> unit = "stub_libxl_osevent_occurred_fd"
 	external osevent_occurred_timeout : ctx -> for_libxl -> unit = "stub_libxl_osevent_occurred_timeout"
 
-	let osevent_register_hooks ctx ~user ~fd_register ~fd_modify ~fd_deregister ~timeout_register ~timeout_modify =
+	let osevent_register_hooks ctx ~user ~fd_register ~fd_modify ~fd_deregister ~timeout_register ~timeout_fire_now =
 		Callback.register "libxl_fd_register" fd_register;
 		Callback.register "libxl_fd_modify" fd_modify;
 		Callback.register "libxl_fd_deregister" fd_deregister;
 		Callback.register "libxl_timeout_register" timeout_register;
-		Callback.register "libxl_timeout_modify" timeout_modify;
+		Callback.register "libxl_timeout_fire_now" timeout_fire_now;
 		osevent_register_hooks' ctx user
 
 	let async_register_callback ~async_callback =
diff --git a/tools/ocaml/libs/xl/xenlight.mli.in b/tools/ocaml/libs/xl/xenlight.mli.in
index b9819e1..b2c06b5 100644
--- a/tools/ocaml/libs/xl/xenlight.mli.in
+++ b/tools/ocaml/libs/xl/xenlight.mli.in
@@ -68,11 +68,11 @@ module Async : sig
 
 	val osevent_register_hooks : ctx ->
 		user:'a ->
-		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> unit) ->
-		fd_modify:('a -> Unix.file_descr -> event list -> unit) ->
-		fd_deregister:('a -> Unix.file_descr -> unit) ->
-		timeout_register:('a -> int64 -> int64 -> for_libxl -> unit) ->
-		timeout_modify:('a -> unit) ->
+		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> 'b) ->
+		fd_modify:('a -> Unix.file_descr -> 'b -> event list -> 'b) ->
+		fd_deregister:('a -> Unix.file_descr -> 'b -> unit) ->
+		timeout_register:('a -> int64 -> int64 -> for_libxl -> 'c) ->
+		timeout_fire_now:('a -> 'c -> 'c) ->
 		osevent_hooks
 
 	external osevent_occurred_fd : ctx -> for_libxl -> Unix.file_descr -> event list -> event list -> unit = "stub_libxl_osevent_occurred_fd"
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index 2e2606a..23f253a 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -31,6 +31,7 @@
 #include <libxl_utils.h>
 
 #include <unistd.h>
+#include <assert.h>
 
 #include "caml_xentoollog.h"
 
@@ -1211,14 +1212,20 @@ value Val_poll_events(short events)
 	CAMLreturn(event_list);
 }
 
+/* The process for dealing with the for_app_registration_  values in the
+ * callbacks below (GC registrations etc) is similar to the way for_callback is
+ * handled in the asynchronous operations above. */
+
 int fd_register(void *user, int fd, void **for_app_registration_out,
                      short events, void *for_libxl)
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
 	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app;
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1230,10 +1237,26 @@ int fd_register(void *user, int fd, void **for_app_registration_out,
 	args[2] = Val_poll_events(events);
 	args[3] = (value) for_libxl;
 
-	caml_callbackN(*func, 4, args);
+	for_app = malloc(sizeof(value));
+	if (!for_app) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	*for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(*for_app)) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		free(for_app);
+		goto err;
+	}
+
+	caml_register_global_root(for_app);
+	*for_app_registration_out = for_app;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 int fd_modify(void *user, int fd, void **for_app_registration_update,
@@ -1241,9 +1264,14 @@ int fd_modify(void *user, int fd, void **for_app_registration_update,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
-	CAMLlocalN(args, 3);
+	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app = *for_app_registration_update;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(for_app);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1252,21 +1280,37 @@ int fd_modify(void *user, int fd, void **for_app_registration_update,
 
 	args[0] = *p;
 	args[1] = Val_int(fd);
-	args[2] = Val_poll_events(events);
+	args[2] = *for_app;
+	args[3] = Val_poll_events(events);
+
+	*for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(*for_app)) {
+		/* If an exception is caught, *for_app_registration_update is not
+		 * changed. It remains a valid pointer to a value that is registered
+		 * with the GC. */
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	*for_app_registration_update = for_app;
 
-	caml_callbackN(*func, 3, args);
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 void fd_deregister(void *user, int fd, void *for_app_registration)
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
-	CAMLlocalN(args, 2);
+	CAMLlocalN(args, 3);
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app = for_app_registration;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(for_app);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1275,12 +1319,26 @@ void fd_deregister(void *user, int fd, void *for_app_registration)
 
 	args[0] = *p;
 	args[1] = Val_int(fd);
+	args[2] = *for_app;
+
+	caml_callbackN_exn(*func, 3, args);
+	/* This hook does not return error codes, so the best thing we can do
+	 * to avoid trouble, if we catch an exception from the app, is abort. */
+	if (Is_exception_result(*for_app))
+		abort();
+
+	caml_remove_global_root(for_app);
+	free(for_app);
 
-	caml_callbackN(*func, 2, args);
 	CAMLdone;
 	caml_enter_blocking_section();
 }
 
+struct timeout_handles {
+	void *for_libxl;
+	value for_app;
+};
+
 int timeout_register(void *user, void **for_app_registration_out,
                           struct timeval abs, void *for_libxl)
 {
@@ -1288,8 +1346,10 @@ int timeout_register(void *user, void **for_app_registration_out,
 	CAMLparam0();
 	CAMLlocal2(sec, usec);
 	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	struct timeout_handles *handles;
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1299,15 +1359,36 @@ int timeout_register(void *user, void **for_app_registration_out,
 	sec = caml_copy_int64(abs.tv_sec);
 	usec = caml_copy_int64(abs.tv_usec);
 
+	/* This struct of "handles" will contain "for_libxl" as well as "for_app".
+	 * We'll give a pointer to the struct to the app, and get it back in
+	 * occurred_timeout, where we can clean it all up. */
+	handles = malloc(sizeof(*handles));
+	if (!handles) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	handles->for_libxl = for_libxl;
+
 	args[0] = *p;
 	args[1] = sec;
 	args[2] = usec;
-	args[3] = (value) for_libxl;
+	args[3] = (value) handles;
 
-	caml_callbackN(*func, 4, args);
+	handles->for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(handles->for_app)) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		free(handles);
+		goto err;
+	}
+
+	caml_register_global_root(&handles->for_app);
+	*for_app_registration_out = handles;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 int timeout_modify(void *user, void **for_app_registration_update,
@@ -1315,25 +1396,49 @@ int timeout_modify(void *user, void **for_app_registration_update,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
+	CAMLlocal1(for_app_update);
+	CAMLlocalN(args, 2);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	struct timeout_handles *handles = *for_app_registration_update;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(handles->for_app);
+
+	/* Libxl currently promises that timeout_modify is only ever called with
+	 * abs={0,0}, meaning "right away". We cannot deal with other values. */
+	assert(abs.tv_sec == 0 && abs.tv_usec == 0);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
-		func = caml_named_value("libxl_timeout_modify");
+		func = caml_named_value("libxl_timeout_fire_now");
+	}
+
+	args[0] = *p;
+	args[1] = handles->for_app;
+
+	for_app_update = caml_callbackN_exn(*func, 2, args);
+	if (Is_exception_result(for_app_update)) {
+		/* If an exception is caught, *for_app_registration_update is not
+		 * changed. It remains a valid pointer to a value that is registered
+		 * with the GC. */
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
 	}
 
-	caml_callback(*func, *p);
+	handles->for_app = for_app_update;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 void timeout_deregister(void *user, void *for_app_registration)
 {
-	caml_leave_blocking_section();
-	failwith_xl(ERROR_FAIL, "timeout_deregister not yet implemented");
-	caml_enter_blocking_section();
+	/* This hook will never be called by libxl. */
+	abort();
 }
 
 value stub_libxl_osevent_register_hooks(value ctx, value user)
@@ -1384,14 +1489,18 @@ value stub_libxl_osevent_occurred_fd(value ctx, value for_libxl, value fd,
 	CAMLreturn(Val_unit);
 }
 
-value stub_libxl_osevent_occurred_timeout(value ctx, value for_libxl)
+value stub_libxl_osevent_occurred_timeout(value ctx, value handles)
 {
-	CAMLparam2(ctx, for_libxl);
+	CAMLparam1(ctx);
+	struct timeout_handles *c_handles = (struct timeout_handles *) handles;
 
 	caml_enter_blocking_section();
-	libxl_osevent_occurred_timeout(CTX, (void *) for_libxl);
+	libxl_osevent_occurred_timeout(CTX, (void *) c_handles->for_libxl);
 	caml_leave_blocking_section();
 
+	caml_remove_global_root(&c_handles->for_app);
+	free(c_handles);
+
 	CAMLreturn(Val_unit);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21: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 1W26BN-0004NX-C5; Sat, 11 Jan 2014 21:33: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 1W26BL-0004N7-U6
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:28 +0000
Received: from [193.109.254.147:58533] by server-13.bemta-14.messagelabs.com
	id 86/BA-19374-7A8B1D25; Sat, 11 Jan 2014 21:33:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1389476004!10290957!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1150 invoked from network); 11 Jan 2014 21:33:25 -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;
	11 Jan 2014 21:33: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 1W26BI-0005d0-Nx
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26BI-0002RU-IK
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:24 +0000
Date: Sat, 11 Jan 2014 21:33:24 +0000
Message-Id: <E1W26BI-0002RU-IK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: use
	'for_app_registration' in osevent callbacks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8aba7e1ce9e26cdf9d2b002ed87b4bd75fce4af3
Author:     Rob Hoes <rob.hoes@citrix.com>
AuthorDate: Fri Jan 10 13:52:04 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:54:45 2014 +0000

    libxl: ocaml: use 'for_app_registration' in osevent callbacks
    
    This allows the application to pass a token to libxl in the fd/timeout
    registration callbacks, which it receives back in modification or
    deregistration callbacks.
    
    It turns out that this is essential for timeout handling, in order to
    identify which timeout to change on a modify event.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    Acked-by: David Scott <dave.scott@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/ocaml/libs/xl/xenlight.ml.in   |    4 +-
 tools/ocaml/libs/xl/xenlight.mli.in  |   10 +-
 tools/ocaml/libs/xl/xenlight_stubs.c |  149 +++++++++++++++++++++++++++++-----
 3 files changed, 136 insertions(+), 27 deletions(-)

diff --git a/tools/ocaml/libs/xl/xenlight.ml.in b/tools/ocaml/libs/xl/xenlight.ml.in
index 47f3487..80e620a 100644
--- a/tools/ocaml/libs/xl/xenlight.ml.in
+++ b/tools/ocaml/libs/xl/xenlight.ml.in
@@ -68,12 +68,12 @@ module Async = struct
 	external osevent_occurred_fd : ctx -> for_libxl -> Unix.file_descr -> event list -> event list -> unit = "stub_libxl_osevent_occurred_fd"
 	external osevent_occurred_timeout : ctx -> for_libxl -> unit = "stub_libxl_osevent_occurred_timeout"
 
-	let osevent_register_hooks ctx ~user ~fd_register ~fd_modify ~fd_deregister ~timeout_register ~timeout_modify =
+	let osevent_register_hooks ctx ~user ~fd_register ~fd_modify ~fd_deregister ~timeout_register ~timeout_fire_now =
 		Callback.register "libxl_fd_register" fd_register;
 		Callback.register "libxl_fd_modify" fd_modify;
 		Callback.register "libxl_fd_deregister" fd_deregister;
 		Callback.register "libxl_timeout_register" timeout_register;
-		Callback.register "libxl_timeout_modify" timeout_modify;
+		Callback.register "libxl_timeout_fire_now" timeout_fire_now;
 		osevent_register_hooks' ctx user
 
 	let async_register_callback ~async_callback =
diff --git a/tools/ocaml/libs/xl/xenlight.mli.in b/tools/ocaml/libs/xl/xenlight.mli.in
index b9819e1..b2c06b5 100644
--- a/tools/ocaml/libs/xl/xenlight.mli.in
+++ b/tools/ocaml/libs/xl/xenlight.mli.in
@@ -68,11 +68,11 @@ module Async : sig
 
 	val osevent_register_hooks : ctx ->
 		user:'a ->
-		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> unit) ->
-		fd_modify:('a -> Unix.file_descr -> event list -> unit) ->
-		fd_deregister:('a -> Unix.file_descr -> unit) ->
-		timeout_register:('a -> int64 -> int64 -> for_libxl -> unit) ->
-		timeout_modify:('a -> unit) ->
+		fd_register:('a -> Unix.file_descr -> event list -> for_libxl -> 'b) ->
+		fd_modify:('a -> Unix.file_descr -> 'b -> event list -> 'b) ->
+		fd_deregister:('a -> Unix.file_descr -> 'b -> unit) ->
+		timeout_register:('a -> int64 -> int64 -> for_libxl -> 'c) ->
+		timeout_fire_now:('a -> 'c -> 'c) ->
 		osevent_hooks
 
 	external osevent_occurred_fd : ctx -> for_libxl -> Unix.file_descr -> event list -> event list -> unit = "stub_libxl_osevent_occurred_fd"
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index 2e2606a..23f253a 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -31,6 +31,7 @@
 #include <libxl_utils.h>
 
 #include <unistd.h>
+#include <assert.h>
 
 #include "caml_xentoollog.h"
 
@@ -1211,14 +1212,20 @@ value Val_poll_events(short events)
 	CAMLreturn(event_list);
 }
 
+/* The process for dealing with the for_app_registration_  values in the
+ * callbacks below (GC registrations etc) is similar to the way for_callback is
+ * handled in the asynchronous operations above. */
+
 int fd_register(void *user, int fd, void **for_app_registration_out,
                      short events, void *for_libxl)
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
 	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app;
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1230,10 +1237,26 @@ int fd_register(void *user, int fd, void **for_app_registration_out,
 	args[2] = Val_poll_events(events);
 	args[3] = (value) for_libxl;
 
-	caml_callbackN(*func, 4, args);
+	for_app = malloc(sizeof(value));
+	if (!for_app) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	*for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(*for_app)) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		free(for_app);
+		goto err;
+	}
+
+	caml_register_global_root(for_app);
+	*for_app_registration_out = for_app;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 int fd_modify(void *user, int fd, void **for_app_registration_update,
@@ -1241,9 +1264,14 @@ int fd_modify(void *user, int fd, void **for_app_registration_update,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
-	CAMLlocalN(args, 3);
+	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app = *for_app_registration_update;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(for_app);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1252,21 +1280,37 @@ int fd_modify(void *user, int fd, void **for_app_registration_update,
 
 	args[0] = *p;
 	args[1] = Val_int(fd);
-	args[2] = Val_poll_events(events);
+	args[2] = *for_app;
+	args[3] = Val_poll_events(events);
+
+	*for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(*for_app)) {
+		/* If an exception is caught, *for_app_registration_update is not
+		 * changed. It remains a valid pointer to a value that is registered
+		 * with the GC. */
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	*for_app_registration_update = for_app;
 
-	caml_callbackN(*func, 3, args);
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 void fd_deregister(void *user, int fd, void *for_app_registration)
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
-	CAMLlocalN(args, 2);
+	CAMLlocalN(args, 3);
 	static value *func = NULL;
 	value *p = (value *) user;
+	value *for_app = for_app_registration;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(for_app);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1275,12 +1319,26 @@ void fd_deregister(void *user, int fd, void *for_app_registration)
 
 	args[0] = *p;
 	args[1] = Val_int(fd);
+	args[2] = *for_app;
+
+	caml_callbackN_exn(*func, 3, args);
+	/* This hook does not return error codes, so the best thing we can do
+	 * to avoid trouble, if we catch an exception from the app, is abort. */
+	if (Is_exception_result(*for_app))
+		abort();
+
+	caml_remove_global_root(for_app);
+	free(for_app);
 
-	caml_callbackN(*func, 2, args);
 	CAMLdone;
 	caml_enter_blocking_section();
 }
 
+struct timeout_handles {
+	void *for_libxl;
+	value for_app;
+};
+
 int timeout_register(void *user, void **for_app_registration_out,
                           struct timeval abs, void *for_libxl)
 {
@@ -1288,8 +1346,10 @@ int timeout_register(void *user, void **for_app_registration_out,
 	CAMLparam0();
 	CAMLlocal2(sec, usec);
 	CAMLlocalN(args, 4);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	struct timeout_handles *handles;
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
@@ -1299,15 +1359,36 @@ int timeout_register(void *user, void **for_app_registration_out,
 	sec = caml_copy_int64(abs.tv_sec);
 	usec = caml_copy_int64(abs.tv_usec);
 
+	/* This struct of "handles" will contain "for_libxl" as well as "for_app".
+	 * We'll give a pointer to the struct to the app, and get it back in
+	 * occurred_timeout, where we can clean it all up. */
+	handles = malloc(sizeof(*handles));
+	if (!handles) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
+	}
+
+	handles->for_libxl = for_libxl;
+
 	args[0] = *p;
 	args[1] = sec;
 	args[2] = usec;
-	args[3] = (value) for_libxl;
+	args[3] = (value) handles;
 
-	caml_callbackN(*func, 4, args);
+	handles->for_app = caml_callbackN_exn(*func, 4, args);
+	if (Is_exception_result(handles->for_app)) {
+		ret = ERROR_OSEVENT_REG_FAIL;
+		free(handles);
+		goto err;
+	}
+
+	caml_register_global_root(&handles->for_app);
+	*for_app_registration_out = handles;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 int timeout_modify(void *user, void **for_app_registration_update,
@@ -1315,25 +1396,49 @@ int timeout_modify(void *user, void **for_app_registration_update,
 {
 	caml_leave_blocking_section();
 	CAMLparam0();
+	CAMLlocal1(for_app_update);
+	CAMLlocalN(args, 2);
+	int ret = 0;
 	static value *func = NULL;
 	value *p = (value *) user;
+	struct timeout_handles *handles = *for_app_registration_update;
+
+	/* If for_app == NULL, then something is very wrong */
+	assert(handles->for_app);
+
+	/* Libxl currently promises that timeout_modify is only ever called with
+	 * abs={0,0}, meaning "right away". We cannot deal with other values. */
+	assert(abs.tv_sec == 0 && abs.tv_usec == 0);
 
 	if (func == NULL) {
 		/* First time around, lookup by name */
-		func = caml_named_value("libxl_timeout_modify");
+		func = caml_named_value("libxl_timeout_fire_now");
+	}
+
+	args[0] = *p;
+	args[1] = handles->for_app;
+
+	for_app_update = caml_callbackN_exn(*func, 2, args);
+	if (Is_exception_result(for_app_update)) {
+		/* If an exception is caught, *for_app_registration_update is not
+		 * changed. It remains a valid pointer to a value that is registered
+		 * with the GC. */
+		ret = ERROR_OSEVENT_REG_FAIL;
+		goto err;
 	}
 
-	caml_callback(*func, *p);
+	handles->for_app = for_app_update;
+
+err:
 	CAMLdone;
 	caml_enter_blocking_section();
-	return 0;
+	return ret;
 }
 
 void timeout_deregister(void *user, void *for_app_registration)
 {
-	caml_leave_blocking_section();
-	failwith_xl(ERROR_FAIL, "timeout_deregister not yet implemented");
-	caml_enter_blocking_section();
+	/* This hook will never be called by libxl. */
+	abort();
 }
 
 value stub_libxl_osevent_register_hooks(value ctx, value user)
@@ -1384,14 +1489,18 @@ value stub_libxl_osevent_occurred_fd(value ctx, value for_libxl, value fd,
 	CAMLreturn(Val_unit);
 }
 
-value stub_libxl_osevent_occurred_timeout(value ctx, value for_libxl)
+value stub_libxl_osevent_occurred_timeout(value ctx, value handles)
 {
-	CAMLparam2(ctx, for_libxl);
+	CAMLparam1(ctx);
+	struct timeout_handles *c_handles = (struct timeout_handles *) handles;
 
 	caml_enter_blocking_section();
-	libxl_osevent_occurred_timeout(CTX, (void *) for_libxl);
+	libxl_osevent_occurred_timeout(CTX, (void *) c_handles->for_libxl);
 	caml_leave_blocking_section();
 
+	caml_remove_global_root(&c_handles->for_app);
+	free(c_handles);
+
 	CAMLreturn(Val_unit);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26BX-0004PO-Ev; Sat, 11 Jan 2014 21:33: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 1W26BV-0004P6-HI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:37 +0000
Received: from [85.158.139.211:24722] by server-1.bemta-5.messagelabs.com id
	11/C9-21065-0B8B1D25; Sat, 11 Jan 2014 21:33:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1389476015!9207380!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5888 invoked from network); 11 Jan 2014 21:33:36 -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;
	11 Jan 2014 21:33: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 1W26BS-0005d8-V2
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26BS-0002Ru-SF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:34 +0000
Date: Sat, 11 Jan 2014 21:33:34 +0000
Message-Id: <E1W26BS-0002Ru-SF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Scrub heap pages during boot
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ca6bf20d4157b3b0b270e384e47c1e351964be16
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Jan 10 03:27:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:55:33 2014 +0000

    xen/arm: Scrub heap pages during boot
    
    Scrub heap pages was disabled because it was slow on the models. Now that Xen
    supports real hardware, it's possible to enable by default scrubbing.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/setup.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 840b04b..9480f42 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -764,10 +764,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     if ( construct_dom0(dom0) != 0)
             panic("Could not set up DOM0 guest OS");
 
-    /* Scrub RAM that is still free and so may go to an unprivileged domain.
-       XXX too slow in simulator
-       scrub_heap_pages();
-    */
+    /* Scrub RAM that is still free and so may go to an unprivileged domain. */
+    scrub_heap_pages();
 
     init_constructors();
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26BX-0004PO-Ev; Sat, 11 Jan 2014 21:33: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 1W26BV-0004P6-HI
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:37 +0000
Received: from [85.158.139.211:24722] by server-1.bemta-5.messagelabs.com id
	11/C9-21065-0B8B1D25; Sat, 11 Jan 2014 21:33:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1389476015!9207380!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5888 invoked from network); 11 Jan 2014 21:33:36 -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;
	11 Jan 2014 21:33: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 1W26BS-0005d8-V2
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26BS-0002Ru-SF
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:34 +0000
Date: Sat, 11 Jan 2014 21:33:34 +0000
Message-Id: <E1W26BS-0002Ru-SF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Scrub heap pages during boot
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ca6bf20d4157b3b0b270e384e47c1e351964be16
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Jan 10 03:27:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:55:33 2014 +0000

    xen/arm: Scrub heap pages during boot
    
    Scrub heap pages was disabled because it was slow on the models. Now that Xen
    supports real hardware, it's possible to enable by default scrubbing.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/setup.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 840b04b..9480f42 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -764,10 +764,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     if ( construct_dom0(dom0) != 0)
             panic("Could not set up DOM0 guest OS");
 
-    /* Scrub RAM that is still free and so may go to an unprivileged domain.
-       XXX too slow in simulator
-       scrub_heap_pages();
-    */
+    /* Scrub RAM that is still free and so may go to an unprivileged domain. */
+    scrub_heap_pages();
 
     init_constructors();
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 11 21:33:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26Bj-0004Rm-Hx; Sat, 11 Jan 2014 21:33: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 1W26Bh-0004R7-Dh
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:49 +0000
Received: from [85.158.137.68:12296] by server-6.bemta-3.messagelabs.com id
	C4/47-04868-CB8B1D25; Sat, 11 Jan 2014 21:33:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1389476025!7408835!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29975 invoked from network); 11 Jan 2014 21:33:46 -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;
	11 Jan 2014 21:33: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 1W26Bd-0005dE-9y
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Bd-0002SH-4B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:45 +0000
Date: Sat, 11 Jan 2014 21:33:45 +0000
Message-Id: <E1W26Bd-0002SH-4B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: force guest memory accesses
	to cacheable when MMU is disabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 89eb02c2204a0b42a0aa169f107bc346a3fef802
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Jan 8 14:09:01 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:56:37 2014 +0000

    xen: arm: force guest memory accesses to cacheable when MMU is disabled
    
    On ARM guest OSes are started with MMU and Caches disables (as they are on
    native) however caching is enabled in the domain running the builder and
    therefore we must ensure cache consistency.
    
    The existing solution to this problem (a0035ecc0d82 "tools: libxc: flush data
    cache after loading images into guest memory") is to flush the caches after
    loading the various blobs into guest RAM. However this approach has two short
    comings:
    
     - The cache flush primitives available to userspace on arm32 are not
       sufficient for our needs.
     - There is a race between the cache flush and the unmap of the guest page
       where the processor might speculatively dirty the cache line again.
    
    (of these the second is the more fundamental)
    
    This patch makes use of the the hardware functionality to force all accesses
    made from guest mode to be cached (the HCR.DC == default cached bit). This
    means that we don't need to worry about the domain builder's writes being
    cached because the guests "uncached" accesses will actually be cached.
    
    Unfortunately the use of HCR.DC is incompatible with the guest enabling its
    MMU (SCTLR.M bit). Therefore we must trap accesses to the SCTLR so that we can
    detect when this happens and disable HCR.DC. This is done with the HCR.TVM
    (trap virtual memory controls) bit which also causes various other registers
    to be trapped, all of which can be passed straight through to the underlying
    register. Once the guest has enabled its MMU we no longer need to trap so
    there is no ongoing overhead. In my tests Linux makes about half a dozen
    accesses to these registers before the MMU is enabled, I would expect other
    OSes to behave similarly (the sequence of writes needed to setup the MMU is
    pretty obvious).
    
    Apart from this unfortunate need to trap these accesses this approach is
    incompatible with guests which attempt to do DMA operations with their MMU
    disabled. In practice this means guests with passthrough which we do not yet
    support. Since a typical guest (including dom0) does not access devices which
    require DMA until after it is fully up and running with paging enabled the
    main risk is to in-guest firmware which does DMA i.e. running EFI in a guest,
    with a disk passed through and booting from that disk. Since we know that dom0
    is not using any such firmware and we do not support device passthrough to
    guests yet we can live with this restriction. Once passthrough is implemented
    this will need to be revisited.
    
    The patch includes a couple of seemingly unrelated but necessary changes:
    
     - HSR_SYSREG_CRN_MASK was incorrectly defined, which happened to be benign
       with the existing set of system register we handled, but broke with the new
       ones introduced here.
     - The defines used to decode the HSR system register fields were named the
       same as the register. This breaks the accessor macros. This had gone
       unnoticed because the handling of the existing trapped registers did not
       require accessing the underlying hardware register. Rename those constants
       with an HSR_SYSREG prefix (in line with HSR_CP32/64 for 32-bit registers).
    
    This patch has survived thousands of boot loops on a Midway system.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain.c           |    7 ++
 xen/arch/arm/traps.c            |  163 ++++++++++++++++++++++++++++++++++++++-
 xen/arch/arm/vtimer.c           |    6 +-
 xen/include/asm-arm/cpregs.h    |    4 +
 xen/include/asm-arm/domain.h    |    2 +
 xen/include/asm-arm/processor.h |    2 +-
 xen/include/asm-arm/sysregs.h   |   19 ++++-
 7 files changed, 194 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 124cccf..635a9a4 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -19,6 +19,7 @@
 #include <xen/errno.h>
 #include <xen/bitops.h>
 #include <xen/grant_table.h>
+#include <xen/stdbool.h>
 
 #include <asm/current.h>
 #include <asm/event.h>
@@ -219,6 +220,11 @@ static void ctxt_switch_to(struct vcpu *n)
     else
         hcr |= HCR_RW;
 
+    if ( n->arch.default_cache )
+        hcr |= (HCR_TVM|HCR_DC);
+    else
+        hcr &= ~(HCR_TVM|HCR_DC);
+
     WRITE_SYSREG(hcr, HCR_EL2);
     isb();
 
@@ -469,6 +475,7 @@ int vcpu_initialise(struct vcpu *v)
         return rc;
 
     v->arch.sctlr = SCTLR_GUEST_INIT;
+    v->arch.default_cache = true;
 
     /*
      * By default exposes an SMP system with AFF0 set to the VCPU ID
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 7c5ab19..48a6fcc 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -29,12 +29,14 @@
 #include <xen/hypercall.h>
 #include <xen/softirq.h>
 #include <xen/domain_page.h>
+#include <xen/stdbool.h>
 #include <public/sched.h>
 #include <public/xen.h>
 #include <asm/event.h>
 #include <asm/regs.h>
 #include <asm/cpregs.h>
 #include <asm/psci.h>
+#include <asm/flushtlb.h>
 
 #include "decode.h"
 #include "io.h"
@@ -1279,6 +1281,29 @@ static void advance_pc(struct cpu_user_regs *regs, union hsr hsr)
     regs->pc += hsr.len ? 4 : 2;
 }
 
+static void update_sctlr(struct vcpu *v, uint32_t val)
+{
+    /*
+     * If MMU (SCTLR_M) is now enabled then we must disable HCR.DC
+     * because they are incompatible.
+     *
+     * Once HCR.DC is disabled then we do not need HCR_TVM either,
+     * since it's only purpose was to catch the MMU being enabled.
+     *
+     * Both are set appropriately on context switch but we need to
+     * clear them now since we may not context switch on return to
+     * guest.
+     */
+    if ( val & SCTLR_M )
+    {
+        WRITE_SYSREG(READ_SYSREG(HCR_EL2) & ~(HCR_DC|HCR_TVM), HCR_EL2);
+        /* ARM ARM 0406C.b B3.2.1: Disabling HCR.DC without changing
+         * VMID requires us to flush the TLB for that VMID. */
+        flush_tlb();
+        v->arch.default_cache = false;
+    }
+}
+
 static void do_cp15_32(struct cpu_user_regs *regs,
                        union hsr hsr)
 {
@@ -1338,6 +1363,89 @@ static void do_cp15_32(struct cpu_user_regs *regs,
         if ( cp32.read )
            *r = v->arch.actlr;
         break;
+
+/* Passthru a 32-bit AArch32 register which is also 32-bit under AArch64 */
+#define CP32_PASSTHRU32(R...) do {              \
+    if ( cp32.read )                            \
+        *r = READ_SYSREG32(R);                  \
+    else                                        \
+        WRITE_SYSREG32(*r, R);                  \
+} while(0)
+
+/*
+ * Passthru a 32-bit AArch32 register which is 64-bit under AArch64.
+ * Updates the lower 32-bits and clears the upper bits.
+ */
+#define CP32_PASSTHRU64(R...) do {              \
+    if ( cp32.read )                            \
+        *r = (uint32_t)READ_SYSREG64(R);        \
+    else                                        \
+        WRITE_SYSREG64((uint64_t)*r, R);        \
+} while(0)
+
+/*
+ * Passthru a 32-bit AArch32 register which is 64-bit under AArch64.
+ * Updates either the HI ([63:32]) or LO ([31:0]) 32-bits preserving
+ * the other half.
+ */
+#ifdef CONFIG_ARM_64
+#define CP32_PASSTHRU64_HI(R...) do {                   \
+    if ( cp32.read )                                    \
+        *r = (uint32_t)(READ_SYSREG64(R) >> 32);        \
+    else                                                \
+    {                                                   \
+        uint64_t t = READ_SYSREG64(R) & 0xffffffffUL;   \
+        t |= ((uint64_t)(*r)) << 32;                    \
+        WRITE_SYSREG64(t, R);                           \
+    }                                                   \
+} while(0)
+#define CP32_PASSTHRU64_LO(R...) do {                           \
+    if ( cp32.read )                                            \
+        *r = (uint32_t)(READ_SYSREG64(R) & 0xffffffff);         \
+    else                                                        \
+    {                                                           \
+        uint64_t t = READ_SYSREG64(R) & 0xffffffff00000000UL;   \
+        t |= *r;                                                \
+        WRITE_SYSREG64(t, R);                                   \
+    }                                                           \
+} while(0)
+#endif
+
+    /* HCR.TVM */
+    case HSR_CPREG32(SCTLR):
+        CP32_PASSTHRU32(SCTLR_EL1);
+        update_sctlr(v, *r);
+        break;
+    case HSR_CPREG32(TTBR0_32):   CP32_PASSTHRU64(TTBR0_EL1);      break;
+    case HSR_CPREG32(TTBR1_32):   CP32_PASSTHRU64(TTBR1_EL1);      break;
+    case HSR_CPREG32(TTBCR):      CP32_PASSTHRU32(TCR_EL1);        break;
+    case HSR_CPREG32(DACR):       CP32_PASSTHRU32(DACR32_EL2);     break;
+    case HSR_CPREG32(DFSR):       CP32_PASSTHRU32(ESR_EL1);        break;
+    case HSR_CPREG32(IFSR):       CP32_PASSTHRU32(IFSR32_EL2);     break;
+    case HSR_CPREG32(ADFSR):      CP32_PASSTHRU32(AFSR0_EL1);      break;
+    case HSR_CPREG32(AIFSR):      CP32_PASSTHRU32(AFSR1_EL1);      break;
+    case HSR_CPREG32(CONTEXTIDR): CP32_PASSTHRU32(CONTEXTIDR_EL1); break;
+
+#ifdef CONFIG_ARM_64
+    case HSR_CPREG32(DFAR):       CP32_PASSTHRU64_LO(FAR_EL1);     break;
+    case HSR_CPREG32(IFAR):       CP32_PASSTHRU64_HI(FAR_EL1);     break;
+    case HSR_CPREG32(MAIR0):      CP32_PASSTHRU64_LO(MAIR_EL1);    break;
+    case HSR_CPREG32(MAIR1):      CP32_PASSTHRU64_HI(MAIR_EL1);    break;
+    case HSR_CPREG32(AMAIR0):     CP32_PASSTHRU64_LO(AMAIR_EL1);   break;
+    case HSR_CPREG32(AMAIR1):     CP32_PASSTHRU64_HI(AMAIR_EL1);   break;
+#else
+    case HSR_CPREG32(DFAR):       CP32_PASSTHRU32(DFAR);           break;
+    case HSR_CPREG32(IFAR):       CP32_PASSTHRU32(IFAR);           break;
+    case HSR_CPREG32(MAIR0):      CP32_PASSTHRU32(MAIR0);          break;
+    case HSR_CPREG32(MAIR1):      CP32_PASSTHRU32(MAIR1);          break;
+    case HSR_CPREG32(AMAIR0):     CP32_PASSTHRU32(AMAIR0);         break;
+    case HSR_CPREG32(AMAIR1):     CP32_PASSTHRU32(AMAIR1);         break;
+#endif
+
+#undef CP32_PASSTHRU32
+#undef CP32_PASSTHRU64
+#undef CP32_PASSTHRU64_LO
+#undef CP32_PASSTHRU64_HI
     default:
         printk("%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%"PRIregister"\n",
                cp32.read ? "mrc" : "mcr",
@@ -1351,6 +1459,9 @@ static void do_cp15_64(struct cpu_user_regs *regs,
                        union hsr hsr)
 {
     struct hsr_cp64 cp64 = hsr.cp64;
+    uint32_t *r1 = (uint32_t *)select_user_reg(regs, cp64.reg1);
+    uint32_t *r2 = (uint32_t *)select_user_reg(regs, cp64.reg2);
+    uint64_t r;
 
     if ( !check_conditional_instr(regs, hsr) )
     {
@@ -1368,6 +1479,26 @@ static void do_cp15_64(struct cpu_user_regs *regs,
             domain_crash_synchronous();
         }
         break;
+
+#define CP64_PASSTHRU(R...) do {                                  \
+    if ( cp64.read )                                            \
+    {                                                           \
+        r = READ_SYSREG64(R);                                   \
+        *r1 = r & 0xffffffffUL;                                 \
+        *r2 = r >> 32;                                          \
+    }                                                           \
+    else                                                        \
+    {                                                           \
+        r = (*r1) | (((uint64_t)(*r2))<<32);                    \
+        WRITE_SYSREG64(r, R);                                   \
+    }                                                           \
+} while(0)
+
+    case HSR_CPREG64(TTBR0): CP64_PASSTHRU(TTBR0_EL1); break;
+    case HSR_CPREG64(TTBR1): CP64_PASSTHRU(TTBR1_EL1); break;
+
+#undef CP64_PASSTHRU
+
     default:
         printk("%s p15, %d, r%d, r%d, cr%d @ 0x%"PRIregister"\n",
                cp64.read ? "mrrc" : "mcrr",
@@ -1382,11 +1513,13 @@ static void do_sysreg(struct cpu_user_regs *regs,
                       union hsr hsr)
 {
     struct hsr_sysreg sysreg = hsr.sysreg;
+    register_t *x = select_user_reg(regs, sysreg.reg);
+    struct vcpu *v = current;
 
     switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
     {
-    case CNTP_CTL_EL0:
-    case CNTP_TVAL_EL0:
+    case HSR_SYSREG_CNTP_CTL_EL0:
+    case HSR_SYSREG_CNTP_TVAL_EL0:
         if ( !vtimer_emulate(regs, hsr) )
         {
             dprintk(XENLOG_ERR,
@@ -1394,6 +1527,31 @@ static void do_sysreg(struct cpu_user_regs *regs,
             domain_crash_synchronous();
         }
         break;
+
+#define SYSREG_PASSTHRU(R...) do {              \
+    if ( sysreg.read )                          \
+        *x = READ_SYSREG(R);                    \
+    else                                        \
+        WRITE_SYSREG(*x, R);                    \
+} while(0)
+
+    case HSR_SYSREG_SCTLR_EL1:
+        SYSREG_PASSTHRU(SCTLR_EL1);
+        update_sctlr(v, *x);
+        break;
+    case HSR_SYSREG_TTBR0_EL1:      SYSREG_PASSTHRU(TTBR0_EL1);      break;
+    case HSR_SYSREG_TTBR1_EL1:      SYSREG_PASSTHRU(TTBR1_EL1);      break;
+    case HSR_SYSREG_TCR_EL1:        SYSREG_PASSTHRU(TCR_EL1);        break;
+    case HSR_SYSREG_ESR_EL1:        SYSREG_PASSTHRU(ESR_EL1);        break;
+    case HSR_SYSREG_FAR_EL1:        SYSREG_PASSTHRU(FAR_EL1);        break;
+    case HSR_SYSREG_AFSR0_EL1:      SYSREG_PASSTHRU(AFSR0_EL1);      break;
+    case HSR_SYSREG_AFSR1_EL1:      SYSREG_PASSTHRU(AFSR1_EL1);      break;
+    case HSR_SYSREG_MAIR_EL1:       SYSREG_PASSTHRU(MAIR_EL1);       break;
+    case HSR_SYSREG_AMAIR_EL1:      SYSREG_PASSTHRU(AMAIR_EL1);      break;
+    case HSR_SYSREG_CONTEXTIDR_EL1: SYSREG_PASSTHRU(CONTEXTIDR_EL1); break;
+
+#undef SYSREG_PASSTHRU
+
     default:
         printk("%s %d, %d, c%d, c%d, %d %s x%d @ 0x%"PRIregister"\n",
                sysreg.read ? "mrs" : "msr",
@@ -1466,7 +1624,6 @@ done:
     if (first) unmap_domain_page(first);
 }
 
-
 static void do_trap_instr_abort_guest(struct cpu_user_regs *regs,
                                       union hsr hsr)
 {
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 433ad55..e325f78 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -240,18 +240,18 @@ static int vtimer_emulate_sysreg(struct cpu_user_regs *regs, union hsr hsr)
 
     switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
     {
-    case CNTP_CTL_EL0:
+    case HSR_SYSREG_CNTP_CTL_EL0:
         vtimer_cntp_ctl(regs, &r, sysreg.read);
         if ( sysreg.read )
             *x = r;
         return 1;
-    case CNTP_TVAL_EL0:
+    case HSR_SYSREG_CNTP_TVAL_EL0:
         vtimer_cntp_tval(regs, &r, sysreg.read);
         if ( sysreg.read )
             *x = r;
         return 1;
 
-    case HSR_CPREG64(CNTPCT):
+    case HSR_SYSREG_CNTPCT_EL0:
         return vtimer_cntpct(regs, x, sysreg.read);
 
     default:
diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index f0f1d53..508467a 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -121,6 +121,8 @@
 #define TTBR0           p15,0,c2        /* Translation Table Base Reg. 0 */
 #define TTBR1           p15,1,c2        /* Translation Table Base Reg. 1 */
 #define HTTBR           p15,4,c2        /* Hyp. Translation Table Base Register */
+#define TTBR0_32        p15,0,c2,c0,0   /* 32-bit access to TTBR0 */
+#define TTBR1_32        p15,0,c2,c0,1   /* 32-bit access to TTBR1 */
 #define HTCR            p15,4,c2,c0,2   /* Hyp. Translation Control Register */
 #define VTCR            p15,4,c2,c1,2   /* Virtualization Translation Control Register */
 #define VTTBR           p15,6,c2        /* Virtualization Translation Table Base Register */
@@ -260,7 +262,9 @@
 #define CPACR_EL1               CPACR
 #define CSSELR_EL1              CSSELR
 #define DACR32_EL2              DACR
+#define ESR_EL1                 DFSR
 #define ESR_EL2                 HSR
+#define FAR_EL1                 HIFAR
 #define FAR_EL2                 HIFAR
 #define HCR_EL2                 HCR
 #define HPFAR_EL2               HPFAR
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index bc20a15..af8c64b 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -257,6 +257,8 @@ struct arch_vcpu
     uint64_t event_mask;
     uint64_t lr_mask;
 
+    bool_t default_cache;
+
     struct {
         /*
          * SGIs and PPIs are per-VCPU, SPIs are domain global and in
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index dfe807d..06e638f 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -342,7 +342,7 @@ union hsr {
 #define HSR_SYSREG_OP0_SHIFT (20)
 #define HSR_SYSREG_OP1_MASK (0x0001c000)
 #define HSR_SYSREG_OP1_SHIFT (14)
-#define HSR_SYSREG_CRN_MASK (0x00003800)
+#define HSR_SYSREG_CRN_MASK (0x00003c00)
 #define HSR_SYSREG_CRN_SHIFT (10)
 #define HSR_SYSREG_CRM_MASK (0x0000001e)
 #define HSR_SYSREG_CRM_SHIFT (1)
diff --git a/xen/include/asm-arm/sysregs.h b/xen/include/asm-arm/sysregs.h
index 48ad07e..0cee0e9 100644
--- a/xen/include/asm-arm/sysregs.h
+++ b/xen/include/asm-arm/sysregs.h
@@ -40,8 +40,23 @@
     ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \
     ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)
 
-#define CNTP_CTL_EL0  HSR_SYSREG(3,3,c14,c2,1)
-#define CNTP_TVAL_EL0 HSR_SYSREG(3,3,c14,c2,0)
+#define HSR_SYSREG_SCTLR_EL1      HSR_SYSREG(3,0,c1, c0,0)
+#define HSR_SYSREG_TTBR0_EL1      HSR_SYSREG(3,0,c2, c0,0)
+#define HSR_SYSREG_TTBR1_EL1      HSR_SYSREG(3,0,c2, c0,1)
+#define HSR_SYSREG_TCR_EL1        HSR_SYSREG(3,0,c2, c0,2)
+#define HSR_SYSREG_AFSR0_EL1      HSR_SYSREG(3,0,c5, c1,0)
+#define HSR_SYSREG_AFSR1_EL1      HSR_SYSREG(3,0,c5, c1,1)
+#define HSR_SYSREG_ESR_EL1        HSR_SYSREG(3,0,c5, c2,0)
+#define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
+#define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
+#define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
+#define HSR_SYSREG_CONTEXTIDR_EL1 HSR_SYSREG(3,0,c13,c0,1)
+
+#define HSR_SYSREG_CNTPCT_EL0     HSR_SYSREG(3,3,c14,c0,0)
+#define HSR_SYSREG_CNTP_CTL_EL0   HSR_SYSREG(3,3,c14,c2,1)
+#define HSR_SYSREG_CNTP_TVAL_EL0  HSR_SYSREG(3,3,c14,c2,0)
+
+
 #endif
 
 #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 Sat Jan 11 21:33:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26Bj-0004Rm-Hx; Sat, 11 Jan 2014 21:33: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 1W26Bh-0004R7-Dh
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:49 +0000
Received: from [85.158.137.68:12296] by server-6.bemta-3.messagelabs.com id
	C4/47-04868-CB8B1D25; Sat, 11 Jan 2014 21:33:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1389476025!7408835!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29975 invoked from network); 11 Jan 2014 21:33:46 -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;
	11 Jan 2014 21:33: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 1W26Bd-0005dE-9y
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Bd-0002SH-4B
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:45 +0000
Date: Sat, 11 Jan 2014 21:33:45 +0000
Message-Id: <E1W26Bd-0002SH-4B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: force guest memory accesses
	to cacheable when MMU is disabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 89eb02c2204a0b42a0aa169f107bc346a3fef802
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Jan 8 14:09:01 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:56:37 2014 +0000

    xen: arm: force guest memory accesses to cacheable when MMU is disabled
    
    On ARM guest OSes are started with MMU and Caches disables (as they are on
    native) however caching is enabled in the domain running the builder and
    therefore we must ensure cache consistency.
    
    The existing solution to this problem (a0035ecc0d82 "tools: libxc: flush data
    cache after loading images into guest memory") is to flush the caches after
    loading the various blobs into guest RAM. However this approach has two short
    comings:
    
     - The cache flush primitives available to userspace on arm32 are not
       sufficient for our needs.
     - There is a race between the cache flush and the unmap of the guest page
       where the processor might speculatively dirty the cache line again.
    
    (of these the second is the more fundamental)
    
    This patch makes use of the the hardware functionality to force all accesses
    made from guest mode to be cached (the HCR.DC == default cached bit). This
    means that we don't need to worry about the domain builder's writes being
    cached because the guests "uncached" accesses will actually be cached.
    
    Unfortunately the use of HCR.DC is incompatible with the guest enabling its
    MMU (SCTLR.M bit). Therefore we must trap accesses to the SCTLR so that we can
    detect when this happens and disable HCR.DC. This is done with the HCR.TVM
    (trap virtual memory controls) bit which also causes various other registers
    to be trapped, all of which can be passed straight through to the underlying
    register. Once the guest has enabled its MMU we no longer need to trap so
    there is no ongoing overhead. In my tests Linux makes about half a dozen
    accesses to these registers before the MMU is enabled, I would expect other
    OSes to behave similarly (the sequence of writes needed to setup the MMU is
    pretty obvious).
    
    Apart from this unfortunate need to trap these accesses this approach is
    incompatible with guests which attempt to do DMA operations with their MMU
    disabled. In practice this means guests with passthrough which we do not yet
    support. Since a typical guest (including dom0) does not access devices which
    require DMA until after it is fully up and running with paging enabled the
    main risk is to in-guest firmware which does DMA i.e. running EFI in a guest,
    with a disk passed through and booting from that disk. Since we know that dom0
    is not using any such firmware and we do not support device passthrough to
    guests yet we can live with this restriction. Once passthrough is implemented
    this will need to be revisited.
    
    The patch includes a couple of seemingly unrelated but necessary changes:
    
     - HSR_SYSREG_CRN_MASK was incorrectly defined, which happened to be benign
       with the existing set of system register we handled, but broke with the new
       ones introduced here.
     - The defines used to decode the HSR system register fields were named the
       same as the register. This breaks the accessor macros. This had gone
       unnoticed because the handling of the existing trapped registers did not
       require accessing the underlying hardware register. Rename those constants
       with an HSR_SYSREG prefix (in line with HSR_CP32/64 for 32-bit registers).
    
    This patch has survived thousands of boot loops on a Midway system.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain.c           |    7 ++
 xen/arch/arm/traps.c            |  163 ++++++++++++++++++++++++++++++++++++++-
 xen/arch/arm/vtimer.c           |    6 +-
 xen/include/asm-arm/cpregs.h    |    4 +
 xen/include/asm-arm/domain.h    |    2 +
 xen/include/asm-arm/processor.h |    2 +-
 xen/include/asm-arm/sysregs.h   |   19 ++++-
 7 files changed, 194 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 124cccf..635a9a4 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -19,6 +19,7 @@
 #include <xen/errno.h>
 #include <xen/bitops.h>
 #include <xen/grant_table.h>
+#include <xen/stdbool.h>
 
 #include <asm/current.h>
 #include <asm/event.h>
@@ -219,6 +220,11 @@ static void ctxt_switch_to(struct vcpu *n)
     else
         hcr |= HCR_RW;
 
+    if ( n->arch.default_cache )
+        hcr |= (HCR_TVM|HCR_DC);
+    else
+        hcr &= ~(HCR_TVM|HCR_DC);
+
     WRITE_SYSREG(hcr, HCR_EL2);
     isb();
 
@@ -469,6 +475,7 @@ int vcpu_initialise(struct vcpu *v)
         return rc;
 
     v->arch.sctlr = SCTLR_GUEST_INIT;
+    v->arch.default_cache = true;
 
     /*
      * By default exposes an SMP system with AFF0 set to the VCPU ID
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 7c5ab19..48a6fcc 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -29,12 +29,14 @@
 #include <xen/hypercall.h>
 #include <xen/softirq.h>
 #include <xen/domain_page.h>
+#include <xen/stdbool.h>
 #include <public/sched.h>
 #include <public/xen.h>
 #include <asm/event.h>
 #include <asm/regs.h>
 #include <asm/cpregs.h>
 #include <asm/psci.h>
+#include <asm/flushtlb.h>
 
 #include "decode.h"
 #include "io.h"
@@ -1279,6 +1281,29 @@ static void advance_pc(struct cpu_user_regs *regs, union hsr hsr)
     regs->pc += hsr.len ? 4 : 2;
 }
 
+static void update_sctlr(struct vcpu *v, uint32_t val)
+{
+    /*
+     * If MMU (SCTLR_M) is now enabled then we must disable HCR.DC
+     * because they are incompatible.
+     *
+     * Once HCR.DC is disabled then we do not need HCR_TVM either,
+     * since it's only purpose was to catch the MMU being enabled.
+     *
+     * Both are set appropriately on context switch but we need to
+     * clear them now since we may not context switch on return to
+     * guest.
+     */
+    if ( val & SCTLR_M )
+    {
+        WRITE_SYSREG(READ_SYSREG(HCR_EL2) & ~(HCR_DC|HCR_TVM), HCR_EL2);
+        /* ARM ARM 0406C.b B3.2.1: Disabling HCR.DC without changing
+         * VMID requires us to flush the TLB for that VMID. */
+        flush_tlb();
+        v->arch.default_cache = false;
+    }
+}
+
 static void do_cp15_32(struct cpu_user_regs *regs,
                        union hsr hsr)
 {
@@ -1338,6 +1363,89 @@ static void do_cp15_32(struct cpu_user_regs *regs,
         if ( cp32.read )
            *r = v->arch.actlr;
         break;
+
+/* Passthru a 32-bit AArch32 register which is also 32-bit under AArch64 */
+#define CP32_PASSTHRU32(R...) do {              \
+    if ( cp32.read )                            \
+        *r = READ_SYSREG32(R);                  \
+    else                                        \
+        WRITE_SYSREG32(*r, R);                  \
+} while(0)
+
+/*
+ * Passthru a 32-bit AArch32 register which is 64-bit under AArch64.
+ * Updates the lower 32-bits and clears the upper bits.
+ */
+#define CP32_PASSTHRU64(R...) do {              \
+    if ( cp32.read )                            \
+        *r = (uint32_t)READ_SYSREG64(R);        \
+    else                                        \
+        WRITE_SYSREG64((uint64_t)*r, R);        \
+} while(0)
+
+/*
+ * Passthru a 32-bit AArch32 register which is 64-bit under AArch64.
+ * Updates either the HI ([63:32]) or LO ([31:0]) 32-bits preserving
+ * the other half.
+ */
+#ifdef CONFIG_ARM_64
+#define CP32_PASSTHRU64_HI(R...) do {                   \
+    if ( cp32.read )                                    \
+        *r = (uint32_t)(READ_SYSREG64(R) >> 32);        \
+    else                                                \
+    {                                                   \
+        uint64_t t = READ_SYSREG64(R) & 0xffffffffUL;   \
+        t |= ((uint64_t)(*r)) << 32;                    \
+        WRITE_SYSREG64(t, R);                           \
+    }                                                   \
+} while(0)
+#define CP32_PASSTHRU64_LO(R...) do {                           \
+    if ( cp32.read )                                            \
+        *r = (uint32_t)(READ_SYSREG64(R) & 0xffffffff);         \
+    else                                                        \
+    {                                                           \
+        uint64_t t = READ_SYSREG64(R) & 0xffffffff00000000UL;   \
+        t |= *r;                                                \
+        WRITE_SYSREG64(t, R);                                   \
+    }                                                           \
+} while(0)
+#endif
+
+    /* HCR.TVM */
+    case HSR_CPREG32(SCTLR):
+        CP32_PASSTHRU32(SCTLR_EL1);
+        update_sctlr(v, *r);
+        break;
+    case HSR_CPREG32(TTBR0_32):   CP32_PASSTHRU64(TTBR0_EL1);      break;
+    case HSR_CPREG32(TTBR1_32):   CP32_PASSTHRU64(TTBR1_EL1);      break;
+    case HSR_CPREG32(TTBCR):      CP32_PASSTHRU32(TCR_EL1);        break;
+    case HSR_CPREG32(DACR):       CP32_PASSTHRU32(DACR32_EL2);     break;
+    case HSR_CPREG32(DFSR):       CP32_PASSTHRU32(ESR_EL1);        break;
+    case HSR_CPREG32(IFSR):       CP32_PASSTHRU32(IFSR32_EL2);     break;
+    case HSR_CPREG32(ADFSR):      CP32_PASSTHRU32(AFSR0_EL1);      break;
+    case HSR_CPREG32(AIFSR):      CP32_PASSTHRU32(AFSR1_EL1);      break;
+    case HSR_CPREG32(CONTEXTIDR): CP32_PASSTHRU32(CONTEXTIDR_EL1); break;
+
+#ifdef CONFIG_ARM_64
+    case HSR_CPREG32(DFAR):       CP32_PASSTHRU64_LO(FAR_EL1);     break;
+    case HSR_CPREG32(IFAR):       CP32_PASSTHRU64_HI(FAR_EL1);     break;
+    case HSR_CPREG32(MAIR0):      CP32_PASSTHRU64_LO(MAIR_EL1);    break;
+    case HSR_CPREG32(MAIR1):      CP32_PASSTHRU64_HI(MAIR_EL1);    break;
+    case HSR_CPREG32(AMAIR0):     CP32_PASSTHRU64_LO(AMAIR_EL1);   break;
+    case HSR_CPREG32(AMAIR1):     CP32_PASSTHRU64_HI(AMAIR_EL1);   break;
+#else
+    case HSR_CPREG32(DFAR):       CP32_PASSTHRU32(DFAR);           break;
+    case HSR_CPREG32(IFAR):       CP32_PASSTHRU32(IFAR);           break;
+    case HSR_CPREG32(MAIR0):      CP32_PASSTHRU32(MAIR0);          break;
+    case HSR_CPREG32(MAIR1):      CP32_PASSTHRU32(MAIR1);          break;
+    case HSR_CPREG32(AMAIR0):     CP32_PASSTHRU32(AMAIR0);         break;
+    case HSR_CPREG32(AMAIR1):     CP32_PASSTHRU32(AMAIR1);         break;
+#endif
+
+#undef CP32_PASSTHRU32
+#undef CP32_PASSTHRU64
+#undef CP32_PASSTHRU64_LO
+#undef CP32_PASSTHRU64_HI
     default:
         printk("%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%"PRIregister"\n",
                cp32.read ? "mrc" : "mcr",
@@ -1351,6 +1459,9 @@ static void do_cp15_64(struct cpu_user_regs *regs,
                        union hsr hsr)
 {
     struct hsr_cp64 cp64 = hsr.cp64;
+    uint32_t *r1 = (uint32_t *)select_user_reg(regs, cp64.reg1);
+    uint32_t *r2 = (uint32_t *)select_user_reg(regs, cp64.reg2);
+    uint64_t r;
 
     if ( !check_conditional_instr(regs, hsr) )
     {
@@ -1368,6 +1479,26 @@ static void do_cp15_64(struct cpu_user_regs *regs,
             domain_crash_synchronous();
         }
         break;
+
+#define CP64_PASSTHRU(R...) do {                                  \
+    if ( cp64.read )                                            \
+    {                                                           \
+        r = READ_SYSREG64(R);                                   \
+        *r1 = r & 0xffffffffUL;                                 \
+        *r2 = r >> 32;                                          \
+    }                                                           \
+    else                                                        \
+    {                                                           \
+        r = (*r1) | (((uint64_t)(*r2))<<32);                    \
+        WRITE_SYSREG64(r, R);                                   \
+    }                                                           \
+} while(0)
+
+    case HSR_CPREG64(TTBR0): CP64_PASSTHRU(TTBR0_EL1); break;
+    case HSR_CPREG64(TTBR1): CP64_PASSTHRU(TTBR1_EL1); break;
+
+#undef CP64_PASSTHRU
+
     default:
         printk("%s p15, %d, r%d, r%d, cr%d @ 0x%"PRIregister"\n",
                cp64.read ? "mrrc" : "mcrr",
@@ -1382,11 +1513,13 @@ static void do_sysreg(struct cpu_user_regs *regs,
                       union hsr hsr)
 {
     struct hsr_sysreg sysreg = hsr.sysreg;
+    register_t *x = select_user_reg(regs, sysreg.reg);
+    struct vcpu *v = current;
 
     switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
     {
-    case CNTP_CTL_EL0:
-    case CNTP_TVAL_EL0:
+    case HSR_SYSREG_CNTP_CTL_EL0:
+    case HSR_SYSREG_CNTP_TVAL_EL0:
         if ( !vtimer_emulate(regs, hsr) )
         {
             dprintk(XENLOG_ERR,
@@ -1394,6 +1527,31 @@ static void do_sysreg(struct cpu_user_regs *regs,
             domain_crash_synchronous();
         }
         break;
+
+#define SYSREG_PASSTHRU(R...) do {              \
+    if ( sysreg.read )                          \
+        *x = READ_SYSREG(R);                    \
+    else                                        \
+        WRITE_SYSREG(*x, R);                    \
+} while(0)
+
+    case HSR_SYSREG_SCTLR_EL1:
+        SYSREG_PASSTHRU(SCTLR_EL1);
+        update_sctlr(v, *x);
+        break;
+    case HSR_SYSREG_TTBR0_EL1:      SYSREG_PASSTHRU(TTBR0_EL1);      break;
+    case HSR_SYSREG_TTBR1_EL1:      SYSREG_PASSTHRU(TTBR1_EL1);      break;
+    case HSR_SYSREG_TCR_EL1:        SYSREG_PASSTHRU(TCR_EL1);        break;
+    case HSR_SYSREG_ESR_EL1:        SYSREG_PASSTHRU(ESR_EL1);        break;
+    case HSR_SYSREG_FAR_EL1:        SYSREG_PASSTHRU(FAR_EL1);        break;
+    case HSR_SYSREG_AFSR0_EL1:      SYSREG_PASSTHRU(AFSR0_EL1);      break;
+    case HSR_SYSREG_AFSR1_EL1:      SYSREG_PASSTHRU(AFSR1_EL1);      break;
+    case HSR_SYSREG_MAIR_EL1:       SYSREG_PASSTHRU(MAIR_EL1);       break;
+    case HSR_SYSREG_AMAIR_EL1:      SYSREG_PASSTHRU(AMAIR_EL1);      break;
+    case HSR_SYSREG_CONTEXTIDR_EL1: SYSREG_PASSTHRU(CONTEXTIDR_EL1); break;
+
+#undef SYSREG_PASSTHRU
+
     default:
         printk("%s %d, %d, c%d, c%d, %d %s x%d @ 0x%"PRIregister"\n",
                sysreg.read ? "mrs" : "msr",
@@ -1466,7 +1624,6 @@ done:
     if (first) unmap_domain_page(first);
 }
 
-
 static void do_trap_instr_abort_guest(struct cpu_user_regs *regs,
                                       union hsr hsr)
 {
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 433ad55..e325f78 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -240,18 +240,18 @@ static int vtimer_emulate_sysreg(struct cpu_user_regs *regs, union hsr hsr)
 
     switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
     {
-    case CNTP_CTL_EL0:
+    case HSR_SYSREG_CNTP_CTL_EL0:
         vtimer_cntp_ctl(regs, &r, sysreg.read);
         if ( sysreg.read )
             *x = r;
         return 1;
-    case CNTP_TVAL_EL0:
+    case HSR_SYSREG_CNTP_TVAL_EL0:
         vtimer_cntp_tval(regs, &r, sysreg.read);
         if ( sysreg.read )
             *x = r;
         return 1;
 
-    case HSR_CPREG64(CNTPCT):
+    case HSR_SYSREG_CNTPCT_EL0:
         return vtimer_cntpct(regs, x, sysreg.read);
 
     default:
diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index f0f1d53..508467a 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -121,6 +121,8 @@
 #define TTBR0           p15,0,c2        /* Translation Table Base Reg. 0 */
 #define TTBR1           p15,1,c2        /* Translation Table Base Reg. 1 */
 #define HTTBR           p15,4,c2        /* Hyp. Translation Table Base Register */
+#define TTBR0_32        p15,0,c2,c0,0   /* 32-bit access to TTBR0 */
+#define TTBR1_32        p15,0,c2,c0,1   /* 32-bit access to TTBR1 */
 #define HTCR            p15,4,c2,c0,2   /* Hyp. Translation Control Register */
 #define VTCR            p15,4,c2,c1,2   /* Virtualization Translation Control Register */
 #define VTTBR           p15,6,c2        /* Virtualization Translation Table Base Register */
@@ -260,7 +262,9 @@
 #define CPACR_EL1               CPACR
 #define CSSELR_EL1              CSSELR
 #define DACR32_EL2              DACR
+#define ESR_EL1                 DFSR
 #define ESR_EL2                 HSR
+#define FAR_EL1                 HIFAR
 #define FAR_EL2                 HIFAR
 #define HCR_EL2                 HCR
 #define HPFAR_EL2               HPFAR
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index bc20a15..af8c64b 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -257,6 +257,8 @@ struct arch_vcpu
     uint64_t event_mask;
     uint64_t lr_mask;
 
+    bool_t default_cache;
+
     struct {
         /*
          * SGIs and PPIs are per-VCPU, SPIs are domain global and in
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index dfe807d..06e638f 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -342,7 +342,7 @@ union hsr {
 #define HSR_SYSREG_OP0_SHIFT (20)
 #define HSR_SYSREG_OP1_MASK (0x0001c000)
 #define HSR_SYSREG_OP1_SHIFT (14)
-#define HSR_SYSREG_CRN_MASK (0x00003800)
+#define HSR_SYSREG_CRN_MASK (0x00003c00)
 #define HSR_SYSREG_CRN_SHIFT (10)
 #define HSR_SYSREG_CRM_MASK (0x0000001e)
 #define HSR_SYSREG_CRM_SHIFT (1)
diff --git a/xen/include/asm-arm/sysregs.h b/xen/include/asm-arm/sysregs.h
index 48ad07e..0cee0e9 100644
--- a/xen/include/asm-arm/sysregs.h
+++ b/xen/include/asm-arm/sysregs.h
@@ -40,8 +40,23 @@
     ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \
     ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)
 
-#define CNTP_CTL_EL0  HSR_SYSREG(3,3,c14,c2,1)
-#define CNTP_TVAL_EL0 HSR_SYSREG(3,3,c14,c2,0)
+#define HSR_SYSREG_SCTLR_EL1      HSR_SYSREG(3,0,c1, c0,0)
+#define HSR_SYSREG_TTBR0_EL1      HSR_SYSREG(3,0,c2, c0,0)
+#define HSR_SYSREG_TTBR1_EL1      HSR_SYSREG(3,0,c2, c0,1)
+#define HSR_SYSREG_TCR_EL1        HSR_SYSREG(3,0,c2, c0,2)
+#define HSR_SYSREG_AFSR0_EL1      HSR_SYSREG(3,0,c5, c1,0)
+#define HSR_SYSREG_AFSR1_EL1      HSR_SYSREG(3,0,c5, c1,1)
+#define HSR_SYSREG_ESR_EL1        HSR_SYSREG(3,0,c5, c2,0)
+#define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
+#define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
+#define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
+#define HSR_SYSREG_CONTEXTIDR_EL1 HSR_SYSREG(3,0,c13,c0,1)
+
+#define HSR_SYSREG_CNTPCT_EL0     HSR_SYSREG(3,3,c14,c0,0)
+#define HSR_SYSREG_CNTP_CTL_EL0   HSR_SYSREG(3,3,c14,c2,1)
+#define HSR_SYSREG_CNTP_TVAL_EL0  HSR_SYSREG(3,3,c14,c2,0)
+
+
 #endif
 
 #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 Sat Jan 11 21:33:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26Br-0004Tz-NE; Sat, 11 Jan 2014 21:33:59 +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 1W26Bq-0004Te-Ra
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:59 +0000
Received: from [85.158.143.35:9420] by server-3.bemta-4.messagelabs.com id
	9C/3C-32360-6C8B1D25; Sat, 11 Jan 2014 21:33:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1389476035!9847939!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30292 invoked from network); 11 Jan 2014 21:33:56 -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;
	11 Jan 2014 21:33: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 1W26Bn-0005dN-G9
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Bn-0002T9-EB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:55 +0000
Date: Sat, 11 Jan 2014 21:33:55 +0000
Message-Id: <E1W26Bn-0002T9-EB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "tools: libxc: flush data cache
	after loading images into guest memory"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4fad2dc72a8607f50c3783e1cbcb3fb25e3af932
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 15:52:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:59:01 2014 +0000

    Revert "tools: libxc: flush data cache after loading images into guest memory"
    
    This reverts commit a0035ecc0d82c1d4dcd5e429e2fcc3192d89747a.
    
    Even with this fix there is a period between the flush and the unmap where
    processor may speculate data into the cache. The solution is to map this
    region uncached or to use the HCR.DC bit to mark all guest accesses cached.
    89eb02c2204a "xen: arm: force guest memory accesses to cacheable when MMU is
    disabled" has arranged to do the latter.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_dom_armzimageloader.c |    1 -
 tools/libxc/xc_dom_binloader.c       |    1 -
 tools/libxc/xc_dom_core.c            |    2 -
 tools/libxc/xc_linux_osdep.c         |   41 ----------------------------------
 tools/libxc/xc_minios.c              |   12 ----------
 tools/libxc/xc_netbsd.c              |   14 -----------
 tools/libxc/xc_private.c             |    5 ----
 tools/libxc/xc_private.h             |    3 --
 tools/libxc/xc_solaris.c             |   14 -----------
 tools/libxc/xenctrl_osdep_ENOSYS.c   |    9 -------
 tools/libxc/xenctrlosdep.h           |    1 -
 11 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c
index 508f74b..e6516a1 100644
--- a/tools/libxc/xc_dom_armzimageloader.c
+++ b/tools/libxc/xc_dom_armzimageloader.c
@@ -229,7 +229,6 @@ static int xc_dom_load_zimage_kernel(struct xc_dom_image *dom)
               __func__, dom->kernel_size, dom->kernel_blob, dst);
 
     memcpy(dst, dom->kernel_blob, dom->kernel_size);
-    xc_cache_flush(dom->xch, dst, dom->kernel_size);
 
     return 0;
 }
diff --git a/tools/libxc/xc_dom_binloader.c b/tools/libxc/xc_dom_binloader.c
index aa0463c..e1de5b5 100644
--- a/tools/libxc/xc_dom_binloader.c
+++ b/tools/libxc/xc_dom_binloader.c
@@ -301,7 +301,6 @@ static int xc_dom_load_bin_kernel(struct xc_dom_image *dom)
 
     memcpy(dest, image + skip, text_size);
     memset(dest + text_size, 0, bss_size);
-    xc_cache_flush(dom->xch, dest, text_size+bss_size);
 
     return 0;
 }
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index d46ac22..77a4e64 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -978,7 +978,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
         }
         else
             memcpy(ramdiskmap, dom->ramdisk_blob, dom->ramdisk_size);
-        xc_cache_flush(dom->xch, ramdiskmap, ramdisklen);
     }
 
     /* load devicetree */
@@ -998,7 +997,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
             goto err;
         }
         memcpy(devicetreemap, dom->devicetree_blob, dom->devicetree_size);
-        xc_cache_flush(dom->xch, devicetreemap, dom->devicetree_size);
     }
 
     /* allocate other pages */
diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
index e219b24..73860a2 100644
--- a/tools/libxc/xc_linux_osdep.c
+++ b/tools/libxc/xc_linux_osdep.c
@@ -30,7 +30,6 @@
 
 #include <sys/mman.h>
 #include <sys/ioctl.h>
-#include <sys/syscall.h>
 
 #include <xen/memory.h>
 #include <xen/sys/evtchn.h>
@@ -417,44 +416,6 @@ static void *linux_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handle
     return ret;
 }
 
-static void linux_privcmd_cache_flush(xc_interface *xch,
-				      const void *ptr, size_t nr)
-{
-#if defined(__arm__)
-    unsigned long start = (unsigned long)ptr;
-    unsigned long end = start + nr;
-    /* cacheflush(unsigned long start, unsigned long end, int flags) */
-    int rc = syscall(__ARM_NR_cacheflush, start, end, 0);
-    if ( rc < 0 )
-	    PERROR("cache flush operation failed: %d\n", errno);
-#elif defined(__aarch64__)
-    unsigned long start = (unsigned long)ptr;
-    unsigned long end = start + nr;
-    unsigned long p, ctr;
-    int stride;
-
-    /* Flush cache using direct DC CVAC instructions. This is
-     * available to EL0 when SCTLR_EL1.UCI is set, which Linux does.
-     *
-     * Bits 19:16 of CTR_EL0 are log2 of the minimum dcache line size
-     * in words, which we use as our stride length. This is readable
-     * with SCTLR_EL1.UCT is set, which Linux does.
-     */
-    asm volatile ("mrs %0, ctr_el0" : "=r" (ctr));
-
-    stride = 4 * (1 << ((ctr & 0xf0000UL) >> 16));
-
-    for ( p = start ; p < end ; p += stride )
-        asm volatile ("dc cvac, %0" :  : "r" (p));
-    asm volatile ("dsb sy");
-#elif defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops linux_privcmd_ops = {
     .open = &linux_privcmd_open,
     .close = &linux_privcmd_close,
@@ -469,8 +430,6 @@ static struct xc_osdep_ops linux_privcmd_ops = {
         .map_foreign_bulk = &linux_privcmd_map_foreign_bulk,
         .map_foreign_range = &linux_privcmd_map_foreign_range,
         .map_foreign_ranges = &linux_privcmd_map_foreign_ranges,
-
-        .cache_flush = &linux_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
index 5026b2b..dec4d73 100644
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -181,16 +181,6 @@ static void *minios_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
     return ret;
 }
 
-static void minios_privcmd_cache_flush(xc_interface *xch,
-                                       const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    printf("No cache flush operation defined for architecture");
-    BUG();
-#endif
-}
 
 static struct xc_osdep_ops minios_privcmd_ops = {
     .open = &minios_privcmd_open,
@@ -206,8 +196,6 @@ static struct xc_osdep_ops minios_privcmd_ops = {
         .map_foreign_bulk = &minios_privcmd_map_foreign_bulk,
         .map_foreign_range = &minios_privcmd_map_foreign_range,
         .map_foreign_ranges = &minios_privcmd_map_foreign_ranges,
-
-        .cache_flush = &minios_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 0143305..8a90ef3 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -22,7 +22,6 @@
 
 #include <xen/sys/evtchn.h>
 #include <unistd.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #include <malloc.h>
 #include <sys/mman.h>
@@ -208,17 +207,6 @@ mmap_failed:
 	return NULL;
 }
 
-static void netbsd_privcmd_cache_flush(xc_interface *xch,
-                                       const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops netbsd_privcmd_ops = {
     .open = &netbsd_privcmd_open,
     .close = &netbsd_privcmd_close,
@@ -233,8 +221,6 @@ static struct xc_osdep_ops netbsd_privcmd_ops = {
         .map_foreign_bulk = &xc_map_foreign_bulk_compat,
         .map_foreign_range = &netbsd_privcmd_map_foreign_range,
         .map_foreign_ranges = &netbsd_privcmd_map_foreign_ranges,
-
-        .cache_flush = &netbsd_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index 3ccee2b..838fd21 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -249,11 +249,6 @@ int do_xen_hypercall(xc_interface *xch, privcmd_hypercall_t *hypercall)
     return xch->ops->u.privcmd.hypercall(xch, xch->ops_handle, hypercall);
 }
 
-void xc_cache_flush(xc_interface *xch, const void *p, size_t n)
-{
-    xch->ops->u.privcmd.cache_flush(xch, p, n);
-}
-
 xc_evtchn *xc_evtchn_open(xentoollog_logger *logger,
                              unsigned open_flags)
 {
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 50a0aa7..92271c9 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -304,9 +304,6 @@ void bitmap_byte_to_64(uint64_t *lp, const uint8_t *bp, int nbits);
 /* Optionally flush file to disk and discard page cache */
 void discard_file_cache(xc_interface *xch, int fd, int flush);
 
-/* Flush data cache */
-void xc_cache_flush(xc_interface *xch, const void *p, size_t n);
-
 #define MAX_MMU_UPDATES 1024
 struct xc_mmu {
     mmu_update_t updates[MAX_MMU_UPDATES];
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index edffab1..7257a54 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -23,7 +23,6 @@
 #include <xen/memory.h>
 #include <xen/sys/evtchn.h>
 #include <unistd.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #include <malloc.h>
 
@@ -179,17 +178,6 @@ mmap_failed:
     return NULL;
 }
 
-static void solaris_privcmd_cache_flush(xc_interface *xch,
-                                        const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops solaris_privcmd_ops = {
     .open = &solaris_privcmd_open,
     .close = &solaris_privcmd_close,
@@ -204,8 +192,6 @@ static struct xc_osdep_ops solaris_privcmd_ops = {
         .map_foreign_bulk = &xc_map_foreign_bulk_compat,
         .map_foreign_range = &solaris_privcmd_map_foreign_range,
         .map_foreign_ranges = &solaris_privcmd_map_foreign_ranges,
-
-        .cache_flush = &solaris_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xenctrl_osdep_ENOSYS.c b/tools/libxc/xenctrl_osdep_ENOSYS.c
index d911b10..4821342 100644
--- a/tools/libxc/xenctrl_osdep_ENOSYS.c
+++ b/tools/libxc/xenctrl_osdep_ENOSYS.c
@@ -63,13 +63,6 @@ static void *ENOSYS_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
     return MAP_FAILED;
 }
 
-static void ENOSYS_privcmd_cache_flush(xc_interface *xch, const void *p, size_t n)
-{
-    unsigned long start = (unsigned long)p;
-    unsigned long end = start + n;
-    IPRINTF(xch, "ENOSYS_privcmd: cache_flush: %#lx-%#lx\n", start, end);
-}
-
 static struct xc_osdep_ops ENOSYS_privcmd_ops =
 {
     .open      = &ENOSYS_privcmd_open,
@@ -81,8 +74,6 @@ static struct xc_osdep_ops ENOSYS_privcmd_ops =
         .map_foreign_bulk = &ENOSYS_privcmd_map_foreign_bulk,
         .map_foreign_range = &ENOSYS_privcmd_map_foreign_range,
         .map_foreign_ranges = &ENOSYS_privcmd_map_foreign_ranges,
-
-        .cache_flush = &ENOSYS_privcmd_cache_flush,
     }
 };
 
diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
index 6c9a005..e610a24 100644
--- a/tools/libxc/xenctrlosdep.h
+++ b/tools/libxc/xenctrlosdep.h
@@ -89,7 +89,6 @@ struct xc_osdep_ops
             void *(*map_foreign_ranges)(xc_interface *xch, xc_osdep_handle h, uint32_t dom, size_t size, int prot,
                                         size_t chunksize, privcmd_mmap_entry_t entries[],
                                         int nentries);
-            void (*cache_flush)(xc_interface *xch, const void *p, size_t n);
         } privcmd;
         struct {
             int (*fd)(xc_evtchn *xce, xc_osdep_handle 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 Sat Jan 11 21:33:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Jan 2014 21:33: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 1W26Br-0004Tz-NE; Sat, 11 Jan 2014 21:33:59 +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 1W26Bq-0004Te-Ra
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:59 +0000
Received: from [85.158.143.35:9420] by server-3.bemta-4.messagelabs.com id
	9C/3C-32360-6C8B1D25; Sat, 11 Jan 2014 21:33:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1389476035!9847939!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30292 invoked from network); 11 Jan 2014 21:33:56 -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;
	11 Jan 2014 21:33: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 1W26Bn-0005dN-G9
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W26Bn-0002T9-EB
	for xen-changelog@lists.xensource.com; Sat, 11 Jan 2014 21:33:55 +0000
Date: Sat, 11 Jan 2014 21:33:55 +0000
Message-Id: <E1W26Bn-0002T9-EB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "tools: libxc: flush data cache
	after loading images into guest memory"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4fad2dc72a8607f50c3783e1cbcb3fb25e3af932
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 7 15:52:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 10 16:59:01 2014 +0000

    Revert "tools: libxc: flush data cache after loading images into guest memory"
    
    This reverts commit a0035ecc0d82c1d4dcd5e429e2fcc3192d89747a.
    
    Even with this fix there is a period between the flush and the unmap where
    processor may speculate data into the cache. The solution is to map this
    region uncached or to use the HCR.DC bit to mark all guest accesses cached.
    89eb02c2204a "xen: arm: force guest memory accesses to cacheable when MMU is
    disabled" has arranged to do the latter.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_dom_armzimageloader.c |    1 -
 tools/libxc/xc_dom_binloader.c       |    1 -
 tools/libxc/xc_dom_core.c            |    2 -
 tools/libxc/xc_linux_osdep.c         |   41 ----------------------------------
 tools/libxc/xc_minios.c              |   12 ----------
 tools/libxc/xc_netbsd.c              |   14 -----------
 tools/libxc/xc_private.c             |    5 ----
 tools/libxc/xc_private.h             |    3 --
 tools/libxc/xc_solaris.c             |   14 -----------
 tools/libxc/xenctrl_osdep_ENOSYS.c   |    9 -------
 tools/libxc/xenctrlosdep.h           |    1 -
 11 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c
index 508f74b..e6516a1 100644
--- a/tools/libxc/xc_dom_armzimageloader.c
+++ b/tools/libxc/xc_dom_armzimageloader.c
@@ -229,7 +229,6 @@ static int xc_dom_load_zimage_kernel(struct xc_dom_image *dom)
               __func__, dom->kernel_size, dom->kernel_blob, dst);
 
     memcpy(dst, dom->kernel_blob, dom->kernel_size);
-    xc_cache_flush(dom->xch, dst, dom->kernel_size);
 
     return 0;
 }
diff --git a/tools/libxc/xc_dom_binloader.c b/tools/libxc/xc_dom_binloader.c
index aa0463c..e1de5b5 100644
--- a/tools/libxc/xc_dom_binloader.c
+++ b/tools/libxc/xc_dom_binloader.c
@@ -301,7 +301,6 @@ static int xc_dom_load_bin_kernel(struct xc_dom_image *dom)
 
     memcpy(dest, image + skip, text_size);
     memset(dest + text_size, 0, bss_size);
-    xc_cache_flush(dom->xch, dest, text_size+bss_size);
 
     return 0;
 }
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index d46ac22..77a4e64 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -978,7 +978,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
         }
         else
             memcpy(ramdiskmap, dom->ramdisk_blob, dom->ramdisk_size);
-        xc_cache_flush(dom->xch, ramdiskmap, ramdisklen);
     }
 
     /* load devicetree */
@@ -998,7 +997,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
             goto err;
         }
         memcpy(devicetreemap, dom->devicetree_blob, dom->devicetree_size);
-        xc_cache_flush(dom->xch, devicetreemap, dom->devicetree_size);
     }
 
     /* allocate other pages */
diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
index e219b24..73860a2 100644
--- a/tools/libxc/xc_linux_osdep.c
+++ b/tools/libxc/xc_linux_osdep.c
@@ -30,7 +30,6 @@
 
 #include <sys/mman.h>
 #include <sys/ioctl.h>
-#include <sys/syscall.h>
 
 #include <xen/memory.h>
 #include <xen/sys/evtchn.h>
@@ -417,44 +416,6 @@ static void *linux_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handle
     return ret;
 }
 
-static void linux_privcmd_cache_flush(xc_interface *xch,
-				      const void *ptr, size_t nr)
-{
-#if defined(__arm__)
-    unsigned long start = (unsigned long)ptr;
-    unsigned long end = start + nr;
-    /* cacheflush(unsigned long start, unsigned long end, int flags) */
-    int rc = syscall(__ARM_NR_cacheflush, start, end, 0);
-    if ( rc < 0 )
-	    PERROR("cache flush operation failed: %d\n", errno);
-#elif defined(__aarch64__)
-    unsigned long start = (unsigned long)ptr;
-    unsigned long end = start + nr;
-    unsigned long p, ctr;
-    int stride;
-
-    /* Flush cache using direct DC CVAC instructions. This is
-     * available to EL0 when SCTLR_EL1.UCI is set, which Linux does.
-     *
-     * Bits 19:16 of CTR_EL0 are log2 of the minimum dcache line size
-     * in words, which we use as our stride length. This is readable
-     * with SCTLR_EL1.UCT is set, which Linux does.
-     */
-    asm volatile ("mrs %0, ctr_el0" : "=r" (ctr));
-
-    stride = 4 * (1 << ((ctr & 0xf0000UL) >> 16));
-
-    for ( p = start ; p < end ; p += stride )
-        asm volatile ("dc cvac, %0" :  : "r" (p));
-    asm volatile ("dsb sy");
-#elif defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops linux_privcmd_ops = {
     .open = &linux_privcmd_open,
     .close = &linux_privcmd_close,
@@ -469,8 +430,6 @@ static struct xc_osdep_ops linux_privcmd_ops = {
         .map_foreign_bulk = &linux_privcmd_map_foreign_bulk,
         .map_foreign_range = &linux_privcmd_map_foreign_range,
         .map_foreign_ranges = &linux_privcmd_map_foreign_ranges,
-
-        .cache_flush = &linux_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
index 5026b2b..dec4d73 100644
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -181,16 +181,6 @@ static void *minios_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
     return ret;
 }
 
-static void minios_privcmd_cache_flush(xc_interface *xch,
-                                       const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    printf("No cache flush operation defined for architecture");
-    BUG();
-#endif
-}
 
 static struct xc_osdep_ops minios_privcmd_ops = {
     .open = &minios_privcmd_open,
@@ -206,8 +196,6 @@ static struct xc_osdep_ops minios_privcmd_ops = {
         .map_foreign_bulk = &minios_privcmd_map_foreign_bulk,
         .map_foreign_range = &minios_privcmd_map_foreign_range,
         .map_foreign_ranges = &minios_privcmd_map_foreign_ranges,
-
-        .cache_flush = &minios_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 0143305..8a90ef3 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -22,7 +22,6 @@
 
 #include <xen/sys/evtchn.h>
 #include <unistd.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #include <malloc.h>
 #include <sys/mman.h>
@@ -208,17 +207,6 @@ mmap_failed:
 	return NULL;
 }
 
-static void netbsd_privcmd_cache_flush(xc_interface *xch,
-                                       const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops netbsd_privcmd_ops = {
     .open = &netbsd_privcmd_open,
     .close = &netbsd_privcmd_close,
@@ -233,8 +221,6 @@ static struct xc_osdep_ops netbsd_privcmd_ops = {
         .map_foreign_bulk = &xc_map_foreign_bulk_compat,
         .map_foreign_range = &netbsd_privcmd_map_foreign_range,
         .map_foreign_ranges = &netbsd_privcmd_map_foreign_ranges,
-
-        .cache_flush = &netbsd_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index 3ccee2b..838fd21 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -249,11 +249,6 @@ int do_xen_hypercall(xc_interface *xch, privcmd_hypercall_t *hypercall)
     return xch->ops->u.privcmd.hypercall(xch, xch->ops_handle, hypercall);
 }
 
-void xc_cache_flush(xc_interface *xch, const void *p, size_t n)
-{
-    xch->ops->u.privcmd.cache_flush(xch, p, n);
-}
-
 xc_evtchn *xc_evtchn_open(xentoollog_logger *logger,
                              unsigned open_flags)
 {
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 50a0aa7..92271c9 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -304,9 +304,6 @@ void bitmap_byte_to_64(uint64_t *lp, const uint8_t *bp, int nbits);
 /* Optionally flush file to disk and discard page cache */
 void discard_file_cache(xc_interface *xch, int fd, int flush);
 
-/* Flush data cache */
-void xc_cache_flush(xc_interface *xch, const void *p, size_t n);
-
 #define MAX_MMU_UPDATES 1024
 struct xc_mmu {
     mmu_update_t updates[MAX_MMU_UPDATES];
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index edffab1..7257a54 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -23,7 +23,6 @@
 #include <xen/memory.h>
 #include <xen/sys/evtchn.h>
 #include <unistd.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #include <malloc.h>
 
@@ -179,17 +178,6 @@ mmap_failed:
     return NULL;
 }
 
-static void solaris_privcmd_cache_flush(xc_interface *xch,
-                                        const void *ptr, size_t nr)
-{
-#if defined(__i386__) || defined(__x86_64__)
-    /* No need for cache maintenance on x86 */
-#else
-    PERROR("No cache flush operation defined for architecture");
-    abort();
-#endif
-}
-
 static struct xc_osdep_ops solaris_privcmd_ops = {
     .open = &solaris_privcmd_open,
     .close = &solaris_privcmd_close,
@@ -204,8 +192,6 @@ static struct xc_osdep_ops solaris_privcmd_ops = {
         .map_foreign_bulk = &xc_map_foreign_bulk_compat,
         .map_foreign_range = &solaris_privcmd_map_foreign_range,
         .map_foreign_ranges = &solaris_privcmd_map_foreign_ranges,
-
-        .cache_flush = &solaris_privcmd_cache_flush,
     },
 };
 
diff --git a/tools/libxc/xenctrl_osdep_ENOSYS.c b/tools/libxc/xenctrl_osdep_ENOSYS.c
index d911b10..4821342 100644
--- a/tools/libxc/xenctrl_osdep_ENOSYS.c
+++ b/tools/libxc/xenctrl_osdep_ENOSYS.c
@@ -63,13 +63,6 @@ static void *ENOSYS_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
     return MAP_FAILED;
 }
 
-static void ENOSYS_privcmd_cache_flush(xc_interface *xch, const void *p, size_t n)
-{
-    unsigned long start = (unsigned long)p;
-    unsigned long end = start + n;
-    IPRINTF(xch, "ENOSYS_privcmd: cache_flush: %#lx-%#lx\n", start, end);
-}
-
 static struct xc_osdep_ops ENOSYS_privcmd_ops =
 {
     .open      = &ENOSYS_privcmd_open,
@@ -81,8 +74,6 @@ static struct xc_osdep_ops ENOSYS_privcmd_ops =
         .map_foreign_bulk = &ENOSYS_privcmd_map_foreign_bulk,
         .map_foreign_range = &ENOSYS_privcmd_map_foreign_range,
         .map_foreign_ranges = &ENOSYS_privcmd_map_foreign_ranges,
-
-        .cache_flush = &ENOSYS_privcmd_cache_flush,
     }
 };
 
diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
index 6c9a005..e610a24 100644
--- a/tools/libxc/xenctrlosdep.h
+++ b/tools/libxc/xenctrlosdep.h
@@ -89,7 +89,6 @@ struct xc_osdep_ops
             void *(*map_foreign_ranges)(xc_interface *xch, xc_osdep_handle h, uint32_t dom, size_t size, int prot,
                                         size_t chunksize, privcmd_mmap_entry_t entries[],
                                         int nentries);
-            void (*cache_flush)(xc_interface *xch, const void *p, size_t n);
         } privcmd;
         struct {
             int (*fd)(xc_evtchn *xce, xc_osdep_handle 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 Mon Jan 13 20:00:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W2ngB-0000LV-E6; Mon, 13 Jan 2014 20:00:11 +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 1W2ng9-0000LP-46
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:09 +0000
Received: from [85.158.139.211:60339] by server-17.bemta-5.messagelabs.com id
	58/98-19152-8C544D25; Mon, 13 Jan 2014 20:00:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389643206!9522249!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32391 invoked from network); 13 Jan 2014 20:00:07 -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;
	13 Jan 2014 20:00: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 1W2ng5-0001II-Nd
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ng4-0005NG-Qm
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:04 +0000
Date: Mon, 13 Jan 2014 20:00:04 +0000
Message-Id: <E1W2ng4-0005NG-Qm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] ix86: fix linear page table
	construction in alloc_l2_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 fe046454eb9e44e99706bc2b42058aa0a9e2631b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 13 15:57:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 15:57:07 2014 +0100

    ix86: fix linear page table construction in alloc_l2_table()
    
    Slot 0 got updated when slot 3 was meant. The mistake was hidden by
    create_pae_xen_mappings() correcting things immediately afterwards
    (i.e. before the new entries could get used the first time).
    
    Reported-by: CHENG Yueqiang <yqcheng.2008@phdis.smu.edu.sg>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index daba883..01f3002 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_info *page, unsigned long type,
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
--
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 Mon Jan 13 20:00:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W2ngB-0000LV-E6; Mon, 13 Jan 2014 20:00:11 +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 1W2ng9-0000LP-46
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:09 +0000
Received: from [85.158.139.211:60339] by server-17.bemta-5.messagelabs.com id
	58/98-19152-8C544D25; Mon, 13 Jan 2014 20:00:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1389643206!9522249!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32391 invoked from network); 13 Jan 2014 20:00:07 -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;
	13 Jan 2014 20:00: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 1W2ng5-0001II-Nd
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ng4-0005NG-Qm
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:04 +0000
Date: Mon, 13 Jan 2014 20:00:04 +0000
Message-Id: <E1W2ng4-0005NG-Qm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] ix86: fix linear page table
	construction in alloc_l2_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 fe046454eb9e44e99706bc2b42058aa0a9e2631b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 13 15:57:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 15:57:07 2014 +0100

    ix86: fix linear page table construction in alloc_l2_table()
    
    Slot 0 got updated when slot 3 was meant. The mistake was hidden by
    create_pae_xen_mappings() correcting things immediately afterwards
    (i.e. before the new entries could get used the first time).
    
    Reported-by: CHENG Yueqiang <yqcheng.2008@phdis.smu.edu.sg>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index daba883..01f3002 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_info *page, unsigned long type,
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
--
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 Mon Jan 13 20:00:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngL-0000MK-IV; Mon, 13 Jan 2014 20:00: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 1W2ngK-0000M1-22
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:20 +0000
Received: from [193.109.254.147:12844] by server-15.bemta-14.messagelabs.com
	id 08/4A-22186-2D544D25; Mon, 13 Jan 2014 20:00:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1389643216!10593832!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9189 invoked from network); 13 Jan 2014 20:00: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;
	13 Jan 2014 20:00: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 1W2ngG-0001IL-CC
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngF-0005O3-VB
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:15 +0000
Date: Mon, 13 Jan 2014 20:00:15 +0000
Message-Id: <E1W2ngF-0005O3-VB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/mm: Prevent leaking domain
	mappings in paging_log_dirty_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 bbe395ebb8131c5ceee08308870a8aeab259dc8f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 13 15:59:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 15:59:28 2014 +0100

    x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
    
    Coverity ID: 1135374 1135375 1135376 1135377
    
    If {copy_to,clear}_guest_offset() fails, we would leak the domain mappings for
    l4 thru l1.
    
    Fixing this requires having conditional unmaps on the faulting path, which in
    turn requires explicitly initialising the pointers to NULL because of the
    early ENOMEM exit.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 0725f326358cbb2ba7f9626976e346b963d74c37
    master date: 2013-12-17 16:38:07 +0100
---
 xen/arch/x86/mm/paging.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 3742975..c93d30f 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -330,8 +330,8 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
 {
     int rv = 0, clean = 0, peek = 1;
     unsigned long pages = 0;
-    mfn_t *l4, *l3, *l2;
-    unsigned long *l1;
+    mfn_t *l4 = NULL, *l3 = NULL, *l2 = NULL;
+    unsigned long *l1 = NULL;
     int i4, i3, i2;
 
     domain_pause(d);
@@ -434,6 +434,16 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
  out:
     paging_unlock(d);
     domain_unpause(d);
+
+    if ( l1 )
+        unmap_domain_page(l1);
+    if ( l2 )
+        unmap_domain_page(l2);
+    if ( l3 )
+        unmap_domain_page(l3);
+    if ( l4 )
+        unmap_domain_page(l4);
+
     return rv;
 }
 
--
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 Mon Jan 13 20:00:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngL-0000MK-IV; Mon, 13 Jan 2014 20:00: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 1W2ngK-0000M1-22
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:20 +0000
Received: from [193.109.254.147:12844] by server-15.bemta-14.messagelabs.com
	id 08/4A-22186-2D544D25; Mon, 13 Jan 2014 20:00:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1389643216!10593832!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9189 invoked from network); 13 Jan 2014 20:00: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;
	13 Jan 2014 20:00: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 1W2ngG-0001IL-CC
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngF-0005O3-VB
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:15 +0000
Date: Mon, 13 Jan 2014 20:00:15 +0000
Message-Id: <E1W2ngF-0005O3-VB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/mm: Prevent leaking domain
	mappings in paging_log_dirty_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 bbe395ebb8131c5ceee08308870a8aeab259dc8f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 13 15:59:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 15:59:28 2014 +0100

    x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
    
    Coverity ID: 1135374 1135375 1135376 1135377
    
    If {copy_to,clear}_guest_offset() fails, we would leak the domain mappings for
    l4 thru l1.
    
    Fixing this requires having conditional unmaps on the faulting path, which in
    turn requires explicitly initialising the pointers to NULL because of the
    early ENOMEM exit.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <JBeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    master commit: 0725f326358cbb2ba7f9626976e346b963d74c37
    master date: 2013-12-17 16:38:07 +0100
---
 xen/arch/x86/mm/paging.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 3742975..c93d30f 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -330,8 +330,8 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
 {
     int rv = 0, clean = 0, peek = 1;
     unsigned long pages = 0;
-    mfn_t *l4, *l3, *l2;
-    unsigned long *l1;
+    mfn_t *l4 = NULL, *l3 = NULL, *l2 = NULL;
+    unsigned long *l1 = NULL;
     int i4, i3, i2;
 
     domain_pause(d);
@@ -434,6 +434,16 @@ int paging_log_dirty_op(struct domain *d, struct xen_domctl_shadow_op *sc)
  out:
     paging_unlock(d);
     domain_unpause(d);
+
+    if ( l1 )
+        unmap_domain_page(l1);
+    if ( l2 )
+        unmap_domain_page(l2);
+    if ( l3 )
+        unmap_domain_page(l3);
+    if ( l4 )
+        unmap_domain_page(l4);
+
     return rv;
 }
 
--
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 Mon Jan 13 20:00:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngU-0000NM-Jn; Mon, 13 Jan 2014 20:00: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 1W2ngT-0000N2-42
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:29 +0000
Received: from [85.158.143.35:2183] by server-2.bemta-4.messagelabs.com id
	50/A9-11386-CD544D25; Mon, 13 Jan 2014 20:00:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389643226!11418246!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26474 invoked from network); 13 Jan 2014 20:00:27 -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;
	13 Jan 2014 20:00: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 1W2ngQ-0001IU-Jf
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngQ-0005P8-Ew
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:26 +0000
Date: Mon, 13 Jan 2014 20:00:26 +0000
Message-Id: <E1W2ngQ-0005P8-Ew@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VTD/DMAR: free() correct pointer
	on error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit be6a5018e4b7b2e5b52952317690428c002072c7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 13 16:00:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:00:28 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 62d33ca1048f4e08eaeb026c7b79239b4605b636
    master date: 2014-01-07 14:59:31 +0100
---
 xen/drivers/passthrough/vtd/dmar.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 309a985..0c52bd6 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -282,7 +282,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_device_scope *acpi_scope;
     u16 bus, sub_bus, sec_bus;
     const struct acpi_dmar_pci_path *path;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -355,9 +355,11 @@ static int __init acpi_parse_dev_scope(
             if ( type == DMAR_TYPE )
             {
                 struct acpi_drhd_unit *drhd = acpi_entry;
+
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -378,7 +380,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -667,7 +675,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return ret;
--
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 Mon Jan 13 20:00:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngU-0000NM-Jn; Mon, 13 Jan 2014 20:00: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 1W2ngT-0000N2-42
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:29 +0000
Received: from [85.158.143.35:2183] by server-2.bemta-4.messagelabs.com id
	50/A9-11386-CD544D25; Mon, 13 Jan 2014 20:00:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1389643226!11418246!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26474 invoked from network); 13 Jan 2014 20:00:27 -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;
	13 Jan 2014 20:00: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 1W2ngQ-0001IU-Jf
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngQ-0005P8-Ew
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:26 +0000
Date: Mon, 13 Jan 2014 20:00:26 +0000
Message-Id: <E1W2ngQ-0005P8-Ew@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VTD/DMAR: free() correct pointer
	on error from acpi_parse_one_atsr()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit be6a5018e4b7b2e5b52952317690428c002072c7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 13 16:00:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:00:28 2014 +0100

    VTD/DMAR: free() correct pointer on error from acpi_parse_one_atsr()
    
    Free the allocated structure rather than the ACPI table ATS entry.
    
    On further analysis, there is another memory leak.  acpi_parse_dev_scope()
    could allocate scope->devices, and return with -ENOMEM.  All callers of
    acpi_parse_dev_scope() would then free the underlying structure, loosing the
    pointer.
    
    These errors can only actually be reached through acpi_parse_dev_scope()
    (which passes type = DMAR_TYPE), but I am quite surprised Coverity didn't spot
    it.
    
    Coverity-ID: 1146949
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 62d33ca1048f4e08eaeb026c7b79239b4605b636
    master date: 2014-01-07 14:59:31 +0100
---
 xen/drivers/passthrough/vtd/dmar.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 309a985..0c52bd6 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -282,7 +282,7 @@ static int __init acpi_parse_dev_scope(
     const struct acpi_dmar_device_scope *acpi_scope;
     u16 bus, sub_bus, sec_bus;
     const struct acpi_dmar_pci_path *path;
-    int depth, cnt, didx = 0;
+    int depth, cnt, didx = 0, ret;
 
     if ( (cnt = scope_device_count(start, end)) < 0 )
         return cnt;
@@ -355,9 +355,11 @@ static int __init acpi_parse_dev_scope(
             if ( type == DMAR_TYPE )
             {
                 struct acpi_drhd_unit *drhd = acpi_entry;
+
+                ret = -ENOMEM;
                 acpi_ioapic_unit = xmalloc(struct acpi_ioapic_unit);
                 if ( !acpi_ioapic_unit )
-                    return -ENOMEM;
+                    goto out;
                 acpi_ioapic_unit->apic_id = acpi_scope->enumeration_id;
                 acpi_ioapic_unit->ioapic.bdf.bus = bus;
                 acpi_ioapic_unit->ioapic.bdf.dev = path->dev;
@@ -378,7 +380,13 @@ static int __init acpi_parse_dev_scope(
         start += acpi_scope->length;
    }
 
-    return 0;
+    ret = 0;
+
+ out:
+    if ( ret )
+        xfree(scope->devices);
+
+    return ret;
 }
 
 static int __init acpi_dmar_check_length(
@@ -667,7 +675,7 @@ acpi_parse_one_atsr(struct acpi_dmar_header *header)
     }
 
     if ( ret )
-        xfree(atsr);
+        xfree(atsru);
     else
         acpi_register_atsr_unit(atsru);
     return ret;
--
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 Mon Jan 13 20:00:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2nge-0000Oj-Oe; Mon, 13 Jan 2014 20:00: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 1W2ngd-0000OV-PH
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:39 +0000
Received: from [85.158.139.211:55811] by server-7.bemta-5.messagelabs.com id
	5C/D2-04824-7E544D25; Mon, 13 Jan 2014 20:00:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1389643237!8293573!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4783 invoked from network); 13 Jan 2014 20:00:37 -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;
	13 Jan 2014 20:00: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 1W2nga-0001Ic-PT
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2nga-0005PY-Nh
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:36 +0000
Date: Mon, 13 Jan 2014 20:00:36 +0000
Message-Id: <E1W2nga-0005PY-Nh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] AMD/IOMMU: fix infinite loop due
	to ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e88cfd40d013ced1e76bc8193eb97346e89f5858
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Mon Jan 13 16:03:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:03:28 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 81b1c7de2339d2788352b162057e70130803f3cf
    master date: 2014-01-07 15:09:42 +0100
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 2c23646..a0ed7b7 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -157,7 +157,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -235,7 +235,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -290,7 +291,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -427,7 +428,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -508,7 +509,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -587,7 +588,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index 4bc5077..abad273 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -561,7 +561,8 @@ static hw_irq_controller iommu_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, cword;
+    u16 domain_id, device_id, cword;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1112,7 +1113,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1127,7 +1128,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1165,7 +1166,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1315,7 +1316,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf;
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
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 Mon Jan 13 20:00:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2nge-0000Oj-Oe; Mon, 13 Jan 2014 20:00: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 1W2ngd-0000OV-PH
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:39 +0000
Received: from [85.158.139.211:55811] by server-7.bemta-5.messagelabs.com id
	5C/D2-04824-7E544D25; Mon, 13 Jan 2014 20:00:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1389643237!8293573!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4783 invoked from network); 13 Jan 2014 20:00:37 -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;
	13 Jan 2014 20:00: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 1W2nga-0001Ic-PT
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2nga-0005PY-Nh
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:36 +0000
Date: Mon, 13 Jan 2014 20:00:36 +0000
Message-Id: <E1W2nga-0005PY-Nh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] AMD/IOMMU: fix infinite loop due
	to ivrs_bdf_entries larger than 16-bit value
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e88cfd40d013ced1e76bc8193eb97346e89f5858
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
AuthorDate: Mon Jan 13 16:03:28 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:03:28 2014 +0100

    AMD/IOMMU: fix infinite loop due to ivrs_bdf_entries larger than 16-bit value
    
    Certain AMD systems could have upto 0x10000 ivrs_bdf_entries.
    However, the loop variable (bdf) is declared as u16 which causes
    inifinite loop when parsing IOMMU event log with IO_PAGE_FAULT event.
    This patch changes the variable to u32 instead.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 81b1c7de2339d2788352b162057e70130803f3cf
    master date: 2014-01-07 15:09:42 +0100
---
 xen/drivers/passthrough/amd/iommu_acpi.c |   13 +++++++------
 xen/drivers/passthrough/amd/iommu_init.c |   12 +++++++-----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 2c23646..a0ed7b7 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -157,7 +157,7 @@ static int __init register_exclusion_range_for_all_devices(
     int seg = 0; /* XXX */
     unsigned long range_top, iommu_top, length;
     struct amd_iommu *iommu;
-    u16 bdf;
+    unsigned int bdf;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -235,7 +235,8 @@ static int __init register_exclusion_range_for_iommu_devices(
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
     unsigned long range_top, iommu_top, length;
-    u16 bdf, req;
+    unsigned int bdf;
+    u16 req;
 
     /* is part of exclusion range inside of IOMMU virtual address space? */
     /* note: 'limit' parameter is assumed to be page-aligned */
@@ -290,7 +291,7 @@ static int __init parse_ivmd_device_range(
     const struct acpi_ivrs_memory *ivmd_block,
     unsigned long base, unsigned long limit, u8 iw, u8 ir)
 {
-    u16 first_bdf, last_bdf, bdf;
+    unsigned int first_bdf, last_bdf, bdf;
     int error;
 
     first_bdf = ivmd_block->header.device_id;
@@ -427,7 +428,7 @@ static u16 __init parse_ivhd_device_range(
     const struct acpi_ivhd_device_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -508,7 +509,7 @@ static u16 __init parse_ivhd_device_alias_range(
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
 
-    u16 dev_length, first_bdf, last_bdf, alias_id, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, alias_id, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
@@ -587,7 +588,7 @@ static u16 __init parse_ivhd_device_extended_range(
     const struct acpi_ivhd_device_extended_range *range,
     u16 header_length, u16 block_length, struct amd_iommu *iommu)
 {
-    u16 dev_length, first_bdf, last_bdf, bdf;
+    unsigned int dev_length, first_bdf, last_bdf, bdf;
 
     dev_length = sizeof(*range);
     if ( header_length < (block_length + dev_length) )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index 4bc5077..abad273 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -561,7 +561,8 @@ static hw_irq_controller iommu_msi_type = {
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, cword;
+    u16 domain_id, device_id, cword;
+    unsigned int bdf;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -1112,7 +1113,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 
     do {
         struct ivrs_mappings *map;
-        int bdf;
+        unsigned int bdf;
 
         if ( !radix_tree_gang_lookup(&ivrs_maps, (void **)&map, seg, 1) )
             break;
@@ -1127,7 +1128,7 @@ int iterate_ivrs_entries(int (*handler)(u16 seg, struct ivrs_mappings *))
 static int __init alloc_ivrs_mappings(u16 seg)
 {
     struct ivrs_mappings *ivrs_mappings;
-    int bdf;
+    unsigned int bdf;
 
     BUG_ON( !ivrs_bdf_entries );
 
@@ -1165,7 +1166,7 @@ static int __init alloc_ivrs_mappings(u16 seg)
 static int __init amd_iommu_setup_device_table(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf;
+    unsigned int bdf;
     void *intr_tb, *dte;
 
     BUG_ON( (ivrs_bdf_entries == 0) );
@@ -1315,7 +1316,8 @@ static void invalidate_all_domain_pages(void)
 static int _invalidate_all_devices(
     u16 seg, struct ivrs_mappings *ivrs_mappings)
 {
-    int bdf, req_id;
+    unsigned int bdf;
+    u16 req_id;
     unsigned long flags;
     struct amd_iommu *iommu;
 
--
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 Mon Jan 13 20:00:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngo-0000R8-TM; Mon, 13 Jan 2014 20:00: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 1W2ngn-0000Qw-KK
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:49 +0000
Received: from [193.109.254.147:41410] by server-4.bemta-14.messagelabs.com id
	CF/CC-03916-0F544D25; Mon, 13 Jan 2014 20:00:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389643247!10614591!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6850 invoked from network); 13 Jan 2014 20:00:48 -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;
	13 Jan 2014 20:00: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 1W2ngk-0001Ii-Uc
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngk-0005Px-TC
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:46 +0000
Date: Mon, 13 Jan 2014 20:00:46 +0000
Message-Id: <E1W2ngk-0005Px-TC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e131045033e7235d17a0d4be88e3a550cfcaf375
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Mon Jan 13 16:04:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:04:23 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: e019c606f598eb76585cc5d26a242a40dfc4d580
    master date: 2014-01-08 09:15:03 +0100
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index ff9cb49..9fbfc55 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
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 Mon Jan 13 20:00:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Jan 2014 20:00: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 1W2ngo-0000R8-TM; Mon, 13 Jan 2014 20:00: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 1W2ngn-0000Qw-KK
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:49 +0000
Received: from [193.109.254.147:41410] by server-4.bemta-14.messagelabs.com id
	CF/CC-03916-0F544D25; Mon, 13 Jan 2014 20:00:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1389643247!10614591!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6850 invoked from network); 13 Jan 2014 20:00:48 -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;
	13 Jan 2014 20:00: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 1W2ngk-0001Ii-Uc
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W2ngk-0005Px-TC
	for xen-changelog@lists.xensource.com; Mon, 13 Jan 2014 20:00:46 +0000
Date: Mon, 13 Jan 2014 20:00:46 +0000
Message-Id: <E1W2ngk-0005Px-TC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] hvm_save_one: return correct data
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e131045033e7235d17a0d4be88e3a550cfcaf375
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Mon Jan 13 16:04:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 13 16:04:23 2014 +0100

    hvm_save_one: return correct data
    
    It is possible that hvm_sr_handlers[typecode].save does not use all
    the provided room.  Also it can use variable sized records.  In both
    cases, using:
    
       instance * hvm_sr_handlers[typecode].size
    
    does not select the correct instance.  Add code to search for the
    correct instance.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: e019c606f598eb76585cc5d26a242a40dfc4d580
    master date: 2014-01-08 09:15:03 +0100
---
 xen/common/hvm/save.c |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index ff9cb49..9fbfc55 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -98,9 +98,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
     else 
         sz = hvm_sr_handlers[typecode].size;
     
-    if ( (instance + 1) * hvm_sr_handlers[typecode].size > sz )
-        return -EINVAL;
-
     ctxt.size = sz;
     ctxt.data = xmalloc_bytes(sz);
     if ( !ctxt.data )
@@ -112,13 +109,30 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance,
                d->domain_id, typecode);
         rv = -EFAULT;
     }
-    else if ( copy_to_guest(handle,
-                            ctxt.data 
-                            + (instance * hvm_sr_handlers[typecode].size) 
-                            + sizeof (struct hvm_save_descriptor), 
-                            hvm_sr_handlers[typecode].size
-                            - sizeof (struct hvm_save_descriptor)) )
-        rv = -EFAULT;
+    else
+    {
+        uint32_t off;
+        const struct hvm_save_descriptor *desc;
+
+        rv = -EBADSLT;
+        for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
+        {
+            desc = (void *)(ctxt.data + off);
+            /* Move past header */
+            off += sizeof(*desc);
+            if ( instance == desc->instance )
+            {
+                uint32_t copy_length = desc->length;
+
+                if ( off + copy_length > ctxt.cur )
+                    copy_length = ctxt.cur - off;
+                rv = 0;
+                if ( copy_to_guest(handle, ctxt.data + off, copy_length) )
+                    rv = -EFAULT;
+                break;
+            }
+        }
+    }
 
     xfree(ctxt.data);
     return rv;
--
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 Jan 15 21:00:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Jan 2014 21:00: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 1W3XZJ-00066h-Ma; Wed, 15 Jan 2014 21:00: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 1W3XZH-00066S-G5
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:07 +0000
Received: from [85.158.143.35:55883] by server-1.bemta-4.messagelabs.com id
	74/84-02132-6D6F6D25; Wed, 15 Jan 2014 21:00:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1389819605!11951534!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1601 invoked from network); 15 Jan 2014 21:00:06 -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;
	15 Jan 2014 21:00: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 1W3XZE-0006yl-IQ
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3XZE-0007VO-3x
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:04 +0000
Date: Wed, 15 Jan 2014 21:00:04 +0000
Message-Id: <E1W3XZE-0007VO-3x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] update Xen version to 4.4-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cfad12fd29637e4e5ede4a9ff15e2777e7a7d7b2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 14 16:19:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 14 16:19:08 2014 +0100

    update Xen version to 4.4-rc2
---
 Config.mk    |    2 +-
 xen/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index b35adcf..55dce20 100644
--- a/Config.mk
+++ b/Config.mk
@@ -246,7 +246,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2
+QEMU_TAG ?= xen-4.4.0-rc2
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 1ea2717..7258504 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 4
-export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= -rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-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 Wed Jan 15 21:00:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Jan 2014 21:00: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 1W3XZJ-00066h-Ma; Wed, 15 Jan 2014 21:00: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 1W3XZH-00066S-G5
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:07 +0000
Received: from [85.158.143.35:55883] by server-1.bemta-4.messagelabs.com id
	74/84-02132-6D6F6D25; Wed, 15 Jan 2014 21:00:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1389819605!11951534!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1601 invoked from network); 15 Jan 2014 21:00:06 -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;
	15 Jan 2014 21:00: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 1W3XZE-0006yl-IQ
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3XZE-0007VO-3x
	for xen-changelog@lists.xensource.com; Wed, 15 Jan 2014 21:00:04 +0000
Date: Wed, 15 Jan 2014 21:00:04 +0000
Message-Id: <E1W3XZE-0007VO-3x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] update Xen version to 4.4-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cfad12fd29637e4e5ede4a9ff15e2777e7a7d7b2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 14 16:19:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 14 16:19:08 2014 +0100

    update Xen version to 4.4-rc2
---
 Config.mk    |    2 +-
 xen/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index b35adcf..55dce20 100644
--- a/Config.mk
+++ b/Config.mk
@@ -246,7 +246,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2
+QEMU_TAG ?= xen-4.4.0-rc2
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 1ea2717..7258504 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 4
-export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= -rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-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 Thu Jan 16 11:55:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W3lXV-00023M-Id; Thu, 16 Jan 2014 11:55: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 1W3lXU-00023G-5O
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:12 +0000
Received: from [85.158.137.68:62667] by server-17.bemta-3.messagelabs.com id
	6E/14-15965-F98C7D25; Thu, 16 Jan 2014 11:55:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1389873309!9483302!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26323 invoked from network); 16 Jan 2014 11:55:10 -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;
	16 Jan 2014 11:55: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 1W3lXM-0007Rz-9R
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXM-0007fE-33
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:04 +0000
Date: Thu, 16 Jan 2014 11:55:04 +0000
Message-Id: <E1W3lXM-0007fE-33@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xg_read_mem: Report on 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 dfbd3d62cd4a8e6e51be7896300e59c9ee0b8f82
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 16:56:59 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:01:31 2014 +0000

    xg_read_mem: Report on error.
    
    I had coded this with XGERR, but gdb will try to read memory without
    a direct request from the user.  So the error message can be confusing.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 0622ebd..3b2a285 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -775,7 +775,7 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
 {
     struct xen_domctl_gdbsx_memio *iop = &domctl.u.gdbsx_guest_memio;
     union {uint64_t llbuf8; char buf8[8];} u = {0};
-    int i;
+    int i, rc;
 
     XGTRC("E:gva:%llx tobuf:%lx len:%d\n", guestva, tobuf, tobuf_len);
 
@@ -786,7 +786,9 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
     iop->len = tobuf_len;
     iop->gwr = 0;       /* not writing to guest */
 
-    _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len);
+    if ( (rc = _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len)) )
+        XGTRC("ERROR: failed to read %d bytes. errno:%d rc:%d\n",
+              iop->remain, errno, rc);
 
     for(i=0; i < XGMIN(8, tobuf_len); u.buf8[i]=tobuf[i], i++);
     XGTRC("X:remain:%d buf8:0x%llx\n", iop->remain, u.llbuf8);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 16 11:55:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W3lXV-00023M-Id; Thu, 16 Jan 2014 11:55: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 1W3lXU-00023G-5O
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:12 +0000
Received: from [85.158.137.68:62667] by server-17.bemta-3.messagelabs.com id
	6E/14-15965-F98C7D25; Thu, 16 Jan 2014 11:55:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1389873309!9483302!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26323 invoked from network); 16 Jan 2014 11:55:10 -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;
	16 Jan 2014 11:55: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 1W3lXM-0007Rz-9R
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXM-0007fE-33
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:04 +0000
Date: Thu, 16 Jan 2014 11:55:04 +0000
Message-Id: <E1W3lXM-0007fE-33@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xg_read_mem: Report on 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 dfbd3d62cd4a8e6e51be7896300e59c9ee0b8f82
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 16:56:59 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:01:31 2014 +0000

    xg_read_mem: Report on error.
    
    I had coded this with XGERR, but gdb will try to read memory without
    a direct request from the user.  So the error message can be confusing.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 0622ebd..3b2a285 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -775,7 +775,7 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
 {
     struct xen_domctl_gdbsx_memio *iop = &domctl.u.gdbsx_guest_memio;
     union {uint64_t llbuf8; char buf8[8];} u = {0};
-    int i;
+    int i, rc;
 
     XGTRC("E:gva:%llx tobuf:%lx len:%d\n", guestva, tobuf, tobuf_len);
 
@@ -786,7 +786,9 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
     iop->len = tobuf_len;
     iop->gwr = 0;       /* not writing to guest */
 
-    _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len);
+    if ( (rc = _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len)) )
+        XGTRC("ERROR: failed to read %d bytes. errno:%d rc:%d\n",
+              iop->remain, errno, rc);
 
     for(i=0; i < XGMIN(8, tobuf_len); u.buf8[i]=tobuf[i], i++);
     XGTRC("X:remain:%d buf8:0x%llx\n", iop->remain, u.llbuf8);
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 16 11:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11: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 1W3lXl-00024f-6x; Thu, 16 Jan 2014 11: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 1W3lXj-00024N-RI
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:28 +0000
Received: from [85.158.137.68:64239] by server-16.bemta-3.messagelabs.com id
	90/1B-26128-FA8C7D25; Thu, 16 Jan 2014 11:55:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389873325!9468497!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28015 invoked from network); 16 Jan 2014 11:55:26 -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;
	16 Jan 2014 11: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 1W3lXg-0007S5-Py
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXg-0007gi-Nd
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:24 +0000
Date: Thu, 16 Jan 2014 11:55:24 +0000
Message-Id: <E1W3lXg-0007gi-Nd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: guard x86-specific
	functions behind an ifdef
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9b2691bdb499a3c2a136596658571056df1d42c8
Author:     Anil Madhavapeddy <anil@recoil.org>
AuthorDate: Sat Jan 11 23:33:25 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:08:56 2014 +0000

    libxl: ocaml: guard x86-specific functions behind an ifdef
    
    The various cpuid functions are not available on ARM, so this
    makes them raise an OCaml exception.  Omitting the functions
    completely results in a link failure in oxenstored due to the
    missing symbols, so this is preferable to the much bigger patch
    that would result from adding conditional compilation into the
    OCaml interfaces.
    
    With this patch, oxenstored can successfully start a domain on
    Xen/ARM.
    
    Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
    Acked-by: David Scott <dave.scott@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/ocaml/libs/xc/xenctrl_stubs.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
index f5cf0ed..ff29b47 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -714,6 +714,7 @@ CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid,
 {
 	CAMLparam4(xch, domid, input, config);
 	CAMLlocal2(array, tmp);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 	unsigned int c_input[2];
 	char *c_config[4], *out_config[4];
@@ -742,17 +743,24 @@ CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid,
 			 c_input, (const char **)c_config, out_config);
 	if (r < 0)
 		failwith_xc(_H(xch));
+#else
+	caml_failwith("xc_domain_cpuid_set: not implemented");
+#endif
 	CAMLreturn(array);
 }
 
 CAMLprim value stub_xc_domain_cpuid_apply_policy(value xch, value domid)
 {
 	CAMLparam2(xch, domid);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 
 	r = xc_cpuid_apply_policy(_H(xch), _D(domid));
 	if (r < 0)
 		failwith_xc(_H(xch));
+#else
+	caml_failwith("xc_domain_cpuid_apply_policy: not implemented");
+#endif
 	CAMLreturn(Val_unit);
 }
 
@@ -760,6 +768,7 @@ CAMLprim value stub_xc_cpuid_check(value xch, value input, value config)
 {
 	CAMLparam3(xch, input, config);
 	CAMLlocal3(ret, array, tmp);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 	unsigned int c_input[2];
 	char *c_config[4], *out_config[4];
@@ -792,6 +801,9 @@ CAMLprim value stub_xc_cpuid_check(value xch, value input, value config)
 	Store_field(ret, 0, Val_bool(r));
 	Store_field(ret, 1, array);
 
+#else
+	caml_failwith("xc_domain_cpuid_check: not implemented");
+#endif
 	CAMLreturn(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 Thu Jan 16 11:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11: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 1W3lXl-00024f-6x; Thu, 16 Jan 2014 11: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 1W3lXj-00024N-RI
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:28 +0000
Received: from [85.158.137.68:64239] by server-16.bemta-3.messagelabs.com id
	90/1B-26128-FA8C7D25; Thu, 16 Jan 2014 11:55:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1389873325!9468497!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28015 invoked from network); 16 Jan 2014 11:55:26 -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;
	16 Jan 2014 11: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 1W3lXg-0007S5-Py
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXg-0007gi-Nd
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:24 +0000
Date: Thu, 16 Jan 2014 11:55:24 +0000
Message-Id: <E1W3lXg-0007gi-Nd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: ocaml: guard x86-specific
	functions behind an ifdef
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9b2691bdb499a3c2a136596658571056df1d42c8
Author:     Anil Madhavapeddy <anil@recoil.org>
AuthorDate: Sat Jan 11 23:33:25 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:08:56 2014 +0000

    libxl: ocaml: guard x86-specific functions behind an ifdef
    
    The various cpuid functions are not available on ARM, so this
    makes them raise an OCaml exception.  Omitting the functions
    completely results in a link failure in oxenstored due to the
    missing symbols, so this is preferable to the much bigger patch
    that would result from adding conditional compilation into the
    OCaml interfaces.
    
    With this patch, oxenstored can successfully start a domain on
    Xen/ARM.
    
    Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
    Acked-by: David Scott <dave.scott@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/ocaml/libs/xc/xenctrl_stubs.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
index f5cf0ed..ff29b47 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -714,6 +714,7 @@ CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid,
 {
 	CAMLparam4(xch, domid, input, config);
 	CAMLlocal2(array, tmp);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 	unsigned int c_input[2];
 	char *c_config[4], *out_config[4];
@@ -742,17 +743,24 @@ CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid,
 			 c_input, (const char **)c_config, out_config);
 	if (r < 0)
 		failwith_xc(_H(xch));
+#else
+	caml_failwith("xc_domain_cpuid_set: not implemented");
+#endif
 	CAMLreturn(array);
 }
 
 CAMLprim value stub_xc_domain_cpuid_apply_policy(value xch, value domid)
 {
 	CAMLparam2(xch, domid);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 
 	r = xc_cpuid_apply_policy(_H(xch), _D(domid));
 	if (r < 0)
 		failwith_xc(_H(xch));
+#else
+	caml_failwith("xc_domain_cpuid_apply_policy: not implemented");
+#endif
 	CAMLreturn(Val_unit);
 }
 
@@ -760,6 +768,7 @@ CAMLprim value stub_xc_cpuid_check(value xch, value input, value config)
 {
 	CAMLparam3(xch, input, config);
 	CAMLlocal3(ret, array, tmp);
+#if defined(__i386__) || defined(__x86_64__)
 	int r;
 	unsigned int c_input[2];
 	char *c_config[4], *out_config[4];
@@ -792,6 +801,9 @@ CAMLprim value stub_xc_cpuid_check(value xch, value input, value config)
 	Store_field(ret, 0, Val_bool(r));
 	Store_field(ret, 1, array);
 
+#else
+	caml_failwith("xc_domain_cpuid_check: not implemented");
+#endif
 	CAMLreturn(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 Thu Jan 16 11:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11: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 1W3lXv-00026i-BU; Thu, 16 Jan 2014 11:55: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 1W3lXt-00026H-Dp
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:37 +0000
Received: from [85.158.143.35:4319] by server-1.bemta-4.messagelabs.com id
	40/9D-02132-8B8C7D25; Thu, 16 Jan 2014 11:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1389873335!12140210!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26179 invoked from network); 16 Jan 2014 11:55:36 -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 Jan 2014 11: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 1W3lXq-0007SG-VG
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXq-0007h8-Sj
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:34 +0000
Date: Thu, 16 Jan 2014 11:55:34 +0000
Message-Id: <E1W3lXq-0007h8-Sj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: correct flush_tlb_mask
	behaviour
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8a9ab685bef64a50f58d99a4e8728b770289e9ef
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Jan 9 16:58:03 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:16:39 2014 +0000

    xen/arm: correct flush_tlb_mask behaviour
    
    On ARM, flush_tlb_mask is used in the common code:
        - alloc_heap_pages: the flush is only be called if the new allocated
        page was used by a domain before. So we need to flush only TLB non-secure
    non-hyp inner-shareable.
        - common/grant-table.c: every calls to flush_tlb_mask are used with
        the current domain. A flush TLB by current VMID inner-shareable is enough.
    
    The current code only flush hypervisor TLB on the current PCPU. For now,
    flush TLBs non-secure non-hyp on every PCPUs.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/smp.c                   |    3 ++-
 xen/include/asm-arm/arm32/flushtlb.h |   11 +++++++++++
 xen/include/asm-arm/arm64/flushtlb.h |   11 +++++++++++
 3 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c
index 4042db5..30203b8 100644
--- a/xen/arch/arm/smp.c
+++ b/xen/arch/arm/smp.c
@@ -4,11 +4,12 @@
 #include <asm/cpregs.h>
 #include <asm/page.h>
 #include <asm/gic.h>
+#include <asm/flushtlb.h>
 
 void flush_tlb_mask(const cpumask_t *mask)
 {
     /* No need to IPI other processors on ARM, the processor takes care of it. */
-    flush_xen_data_tlb();
+    flush_tlb_all();
 }
 
 void smp_send_event_check_mask(const cpumask_t *mask)
diff --git a/xen/include/asm-arm/arm32/flushtlb.h b/xen/include/asm-arm/arm32/flushtlb.h
index ab166f3..7183a07 100644
--- a/xen/include/asm-arm/arm32/flushtlb.h
+++ b/xen/include/asm-arm/arm32/flushtlb.h
@@ -34,6 +34,17 @@ static inline void flush_tlb_all_local(void)
     isb();
 }
 
+/* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+    dsb();
+    isb();
+}
+
 #endif /* __ASM_ARM_ARM32_FLUSHTLB_H__ */
 /*
  * Local variables:
diff --git a/xen/include/asm-arm/arm64/flushtlb.h b/xen/include/asm-arm/arm64/flushtlb.h
index 9ce79a8..a73df92 100644
--- a/xen/include/asm-arm/arm64/flushtlb.h
+++ b/xen/include/asm-arm/arm64/flushtlb.h
@@ -34,6 +34,17 @@ static inline void flush_tlb_all_local(void)
         : : : "memory");
 }
 
+/* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all(void)
+{
+    asm volatile(
+        "dsb sy;"
+        "tlbi alle1is;"
+        "dsb sy;"
+        "isb;"
+        : : : "memory");
+}
+
 #endif /* __ASM_ARM_ARM64_FLUSHTLB_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 Thu Jan 16 11:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11: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 1W3lXv-00026i-BU; Thu, 16 Jan 2014 11:55: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 1W3lXt-00026H-Dp
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:37 +0000
Received: from [85.158.143.35:4319] by server-1.bemta-4.messagelabs.com id
	40/9D-02132-8B8C7D25; Thu, 16 Jan 2014 11:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1389873335!12140210!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26179 invoked from network); 16 Jan 2014 11:55:36 -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 Jan 2014 11: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 1W3lXq-0007SG-VG
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXq-0007h8-Sj
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:34 +0000
Date: Thu, 16 Jan 2014 11:55:34 +0000
Message-Id: <E1W3lXq-0007h8-Sj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: correct flush_tlb_mask
	behaviour
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8a9ab685bef64a50f58d99a4e8728b770289e9ef
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Jan 9 16:58:03 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:16:39 2014 +0000

    xen/arm: correct flush_tlb_mask behaviour
    
    On ARM, flush_tlb_mask is used in the common code:
        - alloc_heap_pages: the flush is only be called if the new allocated
        page was used by a domain before. So we need to flush only TLB non-secure
    non-hyp inner-shareable.
        - common/grant-table.c: every calls to flush_tlb_mask are used with
        the current domain. A flush TLB by current VMID inner-shareable is enough.
    
    The current code only flush hypervisor TLB on the current PCPU. For now,
    flush TLBs non-secure non-hyp on every PCPUs.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/smp.c                   |    3 ++-
 xen/include/asm-arm/arm32/flushtlb.h |   11 +++++++++++
 xen/include/asm-arm/arm64/flushtlb.h |   11 +++++++++++
 3 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c
index 4042db5..30203b8 100644
--- a/xen/arch/arm/smp.c
+++ b/xen/arch/arm/smp.c
@@ -4,11 +4,12 @@
 #include <asm/cpregs.h>
 #include <asm/page.h>
 #include <asm/gic.h>
+#include <asm/flushtlb.h>
 
 void flush_tlb_mask(const cpumask_t *mask)
 {
     /* No need to IPI other processors on ARM, the processor takes care of it. */
-    flush_xen_data_tlb();
+    flush_tlb_all();
 }
 
 void smp_send_event_check_mask(const cpumask_t *mask)
diff --git a/xen/include/asm-arm/arm32/flushtlb.h b/xen/include/asm-arm/arm32/flushtlb.h
index ab166f3..7183a07 100644
--- a/xen/include/asm-arm/arm32/flushtlb.h
+++ b/xen/include/asm-arm/arm32/flushtlb.h
@@ -34,6 +34,17 @@ static inline void flush_tlb_all_local(void)
     isb();
 }
 
+/* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+    dsb();
+    isb();
+}
+
 #endif /* __ASM_ARM_ARM32_FLUSHTLB_H__ */
 /*
  * Local variables:
diff --git a/xen/include/asm-arm/arm64/flushtlb.h b/xen/include/asm-arm/arm64/flushtlb.h
index 9ce79a8..a73df92 100644
--- a/xen/include/asm-arm/arm64/flushtlb.h
+++ b/xen/include/asm-arm/arm64/flushtlb.h
@@ -34,6 +34,17 @@ static inline void flush_tlb_all_local(void)
         : : : "memory");
 }
 
+/* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all(void)
+{
+    asm volatile(
+        "dsb sy;"
+        "tlbi alle1is;"
+        "dsb sy;"
+        "isb;"
+        : : : "memory");
+}
+
 #endif /* __ASM_ARM_ARM64_FLUSHTLB_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 Thu Jan 16 11:55:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55: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 1W3lY7-000295-GL; Thu, 16 Jan 2014 11:55: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 1W3lY5-00028U-FZ
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:49 +0000
Received: from [85.158.137.68:14596] by server-5.bemta-3.messagelabs.com id
	70/87-25188-3C8C7D25; Thu, 16 Jan 2014 11:55:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389873345!5841800!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21202 invoked from network); 16 Jan 2014 11:55:46 -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;
	16 Jan 2014 11: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 1W3lY1-0007SM-2s
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lY1-0007hU-1T
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:45 +0000
Date: Thu, 16 Jan 2014 11:55:45 +0000
Message-Id: <E1W3lY1-0007hU-1T@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: p2m: Correctly flush TLB in
	create_p2m_entries
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c938f5414b2b7ffa5b6f65daa9f4522db360987b
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Jan 14 13:36:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:16:40 2014 +0000

    xen/arm: p2m: Correctly flush TLB in create_p2m_entries
    
    The p2m is shared between VCPUs for each domain. Currently Xen only flush
    TLB on the local PCPU. This could result to mismatch between the mapping in the
    p2m and TLBs.
    
    Flush TLB entries used by this domain on every PCPU. The flush can also be
    moved out of the loop because:
        - ALLOCATE: only called for dom0 RAM allocation, so the flush is never called
        - INSERT: if valid = 1 that would means with have replaced a
        page that already belongs to the domain. A VCPU can write on the wrong page.
        This can happen for dom0 with the 1:1 mapping because the mapping is not
        removed from the p2m.
        - REMOVE: except for grant-table (replace_grant_host_mapping), each
        call to guest_physmap_remove_page are protected by the callers via a
            get_page -> .... -> guest_physmap_remove_page -> ... -> put_page. So
        the page can't be allocated for another domain until the last put_page.
        - RELINQUISH : the domain is not running anymore so we don't care...
    
    Also avoid leaking a foreign page if the function is INSERTed a new mapping
    on top of foreign mapping.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/p2m.c |   56 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 11f4714..85ca330 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -238,7 +238,7 @@ static int create_p2m_entries(struct domain *d,
                      int mattr,
                      p2m_type_t t)
 {
-    int rc, flush;
+    int rc;
     struct p2m_domain *p2m = &d->arch.p2m;
     lpae_t *first = NULL, *second = NULL, *third = NULL;
     paddr_t addr;
@@ -246,10 +246,15 @@ static int create_p2m_entries(struct domain *d,
                   cur_first_offset = ~0,
                   cur_second_offset = ~0;
     unsigned long count = 0;
+    unsigned int flush = 0;
     bool_t populate = (op == INSERT || op == ALLOCATE);
+    lpae_t pte;
 
     spin_lock(&p2m->lock);
 
+    if ( d != current->domain )
+        p2m_load_VTTBR(d);
+
     addr = start_gpaddr;
     while ( addr < end_gpaddr )
     {
@@ -316,15 +321,31 @@ static int create_p2m_entries(struct domain *d,
             cur_second_offset = second_table_offset(addr);
         }
 
-        flush = third[third_table_offset(addr)].p2m.valid;
+        pte = third[third_table_offset(addr)];
+
+        flush |= pte.p2m.valid;
+
+        /* TODO: Handle other p2m type
+         *
+         * It's safe to do the put_page here because page_alloc will
+         * flush the TLBs if the page is reallocated before the end of
+         * this loop.
+         */
+        if ( pte.p2m.valid && p2m_is_foreign(pte.p2m.type) )
+        {
+            unsigned long mfn = pte.p2m.base;
+
+            ASSERT(mfn_valid(mfn));
+            put_page(mfn_to_page(mfn));
+        }
 
         /* Allocate a new RAM page and attach */
         switch (op) {
             case ALLOCATE:
                 {
                     struct page_info *page;
-                    lpae_t pte;
 
+                    ASSERT(!pte.p2m.valid);
                     rc = -ENOMEM;
                     page = alloc_domheap_page(d, 0);
                     if ( page == NULL ) {
@@ -339,8 +360,7 @@ static int create_p2m_entries(struct domain *d,
                 break;
             case INSERT:
                 {
-                    lpae_t pte = mfn_to_p2m_entry(maddr >> PAGE_SHIFT,
-                                                  mattr, t);
+                    pte = mfn_to_p2m_entry(maddr >> PAGE_SHIFT, mattr, t);
                     write_pte(&third[third_table_offset(addr)], pte);
                     maddr += PAGE_SIZE;
                 }
@@ -348,9 +368,6 @@ static int create_p2m_entries(struct domain *d,
             case RELINQUISH:
             case REMOVE:
                 {
-                    lpae_t pte = third[third_table_offset(addr)];
-                    unsigned long mfn = pte.p2m.base;
-
                     if ( !pte.p2m.valid )
                     {
                         count++;
@@ -359,13 +376,6 @@ static int create_p2m_entries(struct domain *d,
 
                     count += 0x10;
 
-                    /* TODO: Handle other p2m type */
-                    if ( p2m_is_foreign(pte.p2m.type) )
-                    {
-                        ASSERT(mfn_valid(mfn));
-                        put_page(mfn_to_page(mfn));
-                    }
-
                     memset(&pte, 0x00, sizeof(pte));
                     write_pte(&third[third_table_offset(addr)], pte);
                     count++;
@@ -373,9 +383,6 @@ static int create_p2m_entries(struct domain *d,
                 break;
         }
 
-        if ( flush )
-            flush_tlb_all_local();
-
         /* Preempt every 2MiB (mapped) or 32 MiB (unmapped) - arbitrary */
         if ( op == RELINQUISH && count >= 0x2000 )
         {
@@ -392,6 +399,16 @@ static int create_p2m_entries(struct domain *d,
         addr += PAGE_SIZE;
     }
 
+    if ( flush )
+    {
+        /* At the beginning of the function, Xen is updating VTTBR
+         * with the domain where the mappings are created. In this
+         * case it's only necessary to flush TLBs on every CPUs with
+         * the current VMID (our domain).
+         */
+        flush_tlb();
+    }
+
     if ( op == ALLOCATE || op == INSERT )
     {
         unsigned long sgfn = paddr_to_pfn(start_gpaddr);
@@ -409,6 +426,9 @@ out:
     if (second) unmap_domain_page(second);
     if (first) unmap_domain_page(first);
 
+    if ( d != current->domain )
+        p2m_load_VTTBR(current->domain);
+
     spin_unlock(&p2m->lock);
 
     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 Thu Jan 16 11:55:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55: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 1W3lY7-000295-GL; Thu, 16 Jan 2014 11:55: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 1W3lY5-00028U-FZ
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:49 +0000
Received: from [85.158.137.68:14596] by server-5.bemta-3.messagelabs.com id
	70/87-25188-3C8C7D25; Thu, 16 Jan 2014 11:55:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1389873345!5841800!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21202 invoked from network); 16 Jan 2014 11:55:46 -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;
	16 Jan 2014 11: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 1W3lY1-0007SM-2s
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lY1-0007hU-1T
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:45 +0000
Date: Thu, 16 Jan 2014 11:55:45 +0000
Message-Id: <E1W3lY1-0007hU-1T@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: p2m: Correctly flush TLB in
	create_p2m_entries
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c938f5414b2b7ffa5b6f65daa9f4522db360987b
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Jan 14 13:36:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:16:40 2014 +0000

    xen/arm: p2m: Correctly flush TLB in create_p2m_entries
    
    The p2m is shared between VCPUs for each domain. Currently Xen only flush
    TLB on the local PCPU. This could result to mismatch between the mapping in the
    p2m and TLBs.
    
    Flush TLB entries used by this domain on every PCPU. The flush can also be
    moved out of the loop because:
        - ALLOCATE: only called for dom0 RAM allocation, so the flush is never called
        - INSERT: if valid = 1 that would means with have replaced a
        page that already belongs to the domain. A VCPU can write on the wrong page.
        This can happen for dom0 with the 1:1 mapping because the mapping is not
        removed from the p2m.
        - REMOVE: except for grant-table (replace_grant_host_mapping), each
        call to guest_physmap_remove_page are protected by the callers via a
            get_page -> .... -> guest_physmap_remove_page -> ... -> put_page. So
        the page can't be allocated for another domain until the last put_page.
        - RELINQUISH : the domain is not running anymore so we don't care...
    
    Also avoid leaking a foreign page if the function is INSERTed a new mapping
    on top of foreign mapping.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/p2m.c |   56 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 11f4714..85ca330 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -238,7 +238,7 @@ static int create_p2m_entries(struct domain *d,
                      int mattr,
                      p2m_type_t t)
 {
-    int rc, flush;
+    int rc;
     struct p2m_domain *p2m = &d->arch.p2m;
     lpae_t *first = NULL, *second = NULL, *third = NULL;
     paddr_t addr;
@@ -246,10 +246,15 @@ static int create_p2m_entries(struct domain *d,
                   cur_first_offset = ~0,
                   cur_second_offset = ~0;
     unsigned long count = 0;
+    unsigned int flush = 0;
     bool_t populate = (op == INSERT || op == ALLOCATE);
+    lpae_t pte;
 
     spin_lock(&p2m->lock);
 
+    if ( d != current->domain )
+        p2m_load_VTTBR(d);
+
     addr = start_gpaddr;
     while ( addr < end_gpaddr )
     {
@@ -316,15 +321,31 @@ static int create_p2m_entries(struct domain *d,
             cur_second_offset = second_table_offset(addr);
         }
 
-        flush = third[third_table_offset(addr)].p2m.valid;
+        pte = third[third_table_offset(addr)];
+
+        flush |= pte.p2m.valid;
+
+        /* TODO: Handle other p2m type
+         *
+         * It's safe to do the put_page here because page_alloc will
+         * flush the TLBs if the page is reallocated before the end of
+         * this loop.
+         */
+        if ( pte.p2m.valid && p2m_is_foreign(pte.p2m.type) )
+        {
+            unsigned long mfn = pte.p2m.base;
+
+            ASSERT(mfn_valid(mfn));
+            put_page(mfn_to_page(mfn));
+        }
 
         /* Allocate a new RAM page and attach */
         switch (op) {
             case ALLOCATE:
                 {
                     struct page_info *page;
-                    lpae_t pte;
 
+                    ASSERT(!pte.p2m.valid);
                     rc = -ENOMEM;
                     page = alloc_domheap_page(d, 0);
                     if ( page == NULL ) {
@@ -339,8 +360,7 @@ static int create_p2m_entries(struct domain *d,
                 break;
             case INSERT:
                 {
-                    lpae_t pte = mfn_to_p2m_entry(maddr >> PAGE_SHIFT,
-                                                  mattr, t);
+                    pte = mfn_to_p2m_entry(maddr >> PAGE_SHIFT, mattr, t);
                     write_pte(&third[third_table_offset(addr)], pte);
                     maddr += PAGE_SIZE;
                 }
@@ -348,9 +368,6 @@ static int create_p2m_entries(struct domain *d,
             case RELINQUISH:
             case REMOVE:
                 {
-                    lpae_t pte = third[third_table_offset(addr)];
-                    unsigned long mfn = pte.p2m.base;
-
                     if ( !pte.p2m.valid )
                     {
                         count++;
@@ -359,13 +376,6 @@ static int create_p2m_entries(struct domain *d,
 
                     count += 0x10;
 
-                    /* TODO: Handle other p2m type */
-                    if ( p2m_is_foreign(pte.p2m.type) )
-                    {
-                        ASSERT(mfn_valid(mfn));
-                        put_page(mfn_to_page(mfn));
-                    }
-
                     memset(&pte, 0x00, sizeof(pte));
                     write_pte(&third[third_table_offset(addr)], pte);
                     count++;
@@ -373,9 +383,6 @@ static int create_p2m_entries(struct domain *d,
                 break;
         }
 
-        if ( flush )
-            flush_tlb_all_local();
-
         /* Preempt every 2MiB (mapped) or 32 MiB (unmapped) - arbitrary */
         if ( op == RELINQUISH && count >= 0x2000 )
         {
@@ -392,6 +399,16 @@ static int create_p2m_entries(struct domain *d,
         addr += PAGE_SIZE;
     }
 
+    if ( flush )
+    {
+        /* At the beginning of the function, Xen is updating VTTBR
+         * with the domain where the mappings are created. In this
+         * case it's only necessary to flush TLBs on every CPUs with
+         * the current VMID (our domain).
+         */
+        flush_tlb();
+    }
+
     if ( op == ALLOCATE || op == INSERT )
     {
         unsigned long sgfn = paddr_to_pfn(start_gpaddr);
@@ -409,6 +426,9 @@ out:
     if (second) unmap_domain_page(second);
     if (first) unmap_domain_page(first);
 
+    if ( d != current->domain )
+        p2m_load_VTTBR(current->domain);
+
     spin_unlock(&p2m->lock);
 
     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 Thu Jan 16 11:55:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55: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 1W3lYF-0002BC-RT; Thu, 16 Jan 2014 11:55:59 +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 1W3lYD-0002AZ-LG
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:57 +0000
Received: from [85.158.143.35:18225] by server-3.bemta-4.messagelabs.com id
	05/37-32360-DC8C7D25; Thu, 16 Jan 2014 11:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1389873355!12136065!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16082 invoked from network); 16 Jan 2014 11:55:56 -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 Jan 2014 11: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 1W3lYB-0007SV-7H
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lYB-0007ht-5S
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:55 +0000
Date: Thu, 16 Jan 2014 11:55:55 +0000
Message-Id: <E1W3lYB-0007ht-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: disallow PCI device assignment
	for HVM guest when PoD is enabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c63868ff0164fa1927b0d39f9aef5c7074ee04e2
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Mon Jan 13 11:52:28 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:20:24 2014 +0000

    libxl: disallow PCI device assignment for HVM guest when PoD is enabled
    
    This replicates a Xend behavior, see ec789523749 ("xend: Dis-allow
    device assignment if PoD is enabled.").
    
    This change is restricted to HVM guest, as only HVM is relevant in the
    counterpart in Xend. We're late in release cycle so the change should
    only do what's necessary. Probably we can revisit it if we need to do
    the same thing for PV guest in the future.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Cc: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_create.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 543e0c8..a604cd8 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -707,6 +707,7 @@ static void initiate_domain_create(libxl__egc *egc,
     uint32_t domid;
     int i, ret;
     size_t last_devid = -1;
+    bool pod_enabled = false;
 
     /* convenience aliases */
     libxl_domain_config *const d_config = dcs->guest_config;
@@ -715,6 +716,25 @@ static void initiate_domain_create(libxl__egc *egc,
 
     domid = 0;
 
+    /* If target_memkb is smaller than max_memkb, the subsequent call
+     * to libxc when building HVM domain will enable PoD mode.
+     */
+    pod_enabled = (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM) &&
+        (d_config->b_info.target_memkb < d_config->b_info.max_memkb);
+
+    /* We cannot have PoD and PCI device assignment at the same time
+     * for HVM guest. It was reported that IOMMU cannot work with PoD
+     * enabled because it needs to populated entire page table for
+     * guest. To stay on the safe side, we disable PCI device
+     * assignment when PoD is enabled.
+     */
+    if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
+        d_config->num_pcidevs && pod_enabled) {
+        ret = ERROR_INVAL;
+        LOG(ERROR, "PCI device assignment for HVM guest failed due to PoD enabled");
+        goto error_out;
+    }
+
     ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info);
     if (ret) goto error_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 Thu Jan 16 11:55:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:55: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 1W3lYF-0002BC-RT; Thu, 16 Jan 2014 11:55:59 +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 1W3lYD-0002AZ-LG
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:57 +0000
Received: from [85.158.143.35:18225] by server-3.bemta-4.messagelabs.com id
	05/37-32360-DC8C7D25; Thu, 16 Jan 2014 11:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1389873355!12136065!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16082 invoked from network); 16 Jan 2014 11:55:56 -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 Jan 2014 11: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 1W3lYB-0007SV-7H
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lYB-0007ht-5S
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:55 +0000
Date: Thu, 16 Jan 2014 11:55:55 +0000
Message-Id: <E1W3lYB-0007ht-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: disallow PCI device assignment
	for HVM guest when PoD is enabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c63868ff0164fa1927b0d39f9aef5c7074ee04e2
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Mon Jan 13 11:52:28 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:20:24 2014 +0000

    libxl: disallow PCI device assignment for HVM guest when PoD is enabled
    
    This replicates a Xend behavior, see ec789523749 ("xend: Dis-allow
    device assignment if PoD is enabled.").
    
    This change is restricted to HVM guest, as only HVM is relevant in the
    counterpart in Xend. We're late in release cycle so the change should
    only do what's necessary. Probably we can revisit it if we need to do
    the same thing for PV guest in the future.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Cc: Ian Campbell <ian.campbell@citrix.com>
    Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_create.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 543e0c8..a604cd8 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -707,6 +707,7 @@ static void initiate_domain_create(libxl__egc *egc,
     uint32_t domid;
     int i, ret;
     size_t last_devid = -1;
+    bool pod_enabled = false;
 
     /* convenience aliases */
     libxl_domain_config *const d_config = dcs->guest_config;
@@ -715,6 +716,25 @@ static void initiate_domain_create(libxl__egc *egc,
 
     domid = 0;
 
+    /* If target_memkb is smaller than max_memkb, the subsequent call
+     * to libxc when building HVM domain will enable PoD mode.
+     */
+    pod_enabled = (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM) &&
+        (d_config->b_info.target_memkb < d_config->b_info.max_memkb);
+
+    /* We cannot have PoD and PCI device assignment at the same time
+     * for HVM guest. It was reported that IOMMU cannot work with PoD
+     * enabled because it needs to populated entire page table for
+     * guest. To stay on the safe side, we disable PCI device
+     * assignment when PoD is enabled.
+     */
+    if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
+        d_config->num_pcidevs && pod_enabled) {
+        ret = ERROR_INVAL;
+        LOG(ERROR, "PCI device assignment for HVM guest failed due to PoD enabled");
+        goto error_out;
+    }
+
     ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info);
     if (ret) goto error_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 Thu Jan 16 11:56:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:56: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 1W3lYa-0002E0-Bu; Thu, 16 Jan 2014 11:56: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 1W3lYR-0002Cf-DI
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:14 +0000
Received: from [193.109.254.147:46030] by server-2.bemta-14.messagelabs.com id
	E9/A1-00361-7D8C7D25; Thu, 16 Jan 2014 11:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389873365!9767110!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5250 invoked from network); 16 Jan 2014 11:56: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 Jan 2014 11: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 1W3lYL-0007T4-CY
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lYL-0007iQ-AW
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:05 +0000
Date: Thu, 16 Jan 2014 11:56:05 +0000
Message-Id: <E1W3lYL-0007iQ-AW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: Always use "fast" migration resume
	protocol
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c04c825bdf1e946260cba325eeed993004051050
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Jan 13 18:15:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:33:12 2014 +0000

    xl: Always use "fast" migration resume protocol
    
    As Ian Campbell writes in http://bugs.xenproject.org/xen/bug/30:
    
      There are two mechanisms by which a suspend can be aborted and the
      original domain resumed.
    
      The older method is that the toolstack resets a bunch of state (see
      tools/python/xen/xend/XendDomainInfo.py resumeDomain) and then
      restarts the domain. The domain will see HYPERVISOR_suspend return 0
      and will continue without any realisation that it is actually
      running in the original domain and not in a new one. This method is
      supposed to be implemented by libxl_domain_resume(suspend_cancel=0)
      but it is not.
    
      The other method is newer and in this case the toolstack arranges
      that HYPERVISOR_suspend returns SUSPEND_CANCEL and restarts it. The
      domain will observe this and realise that it has been restarted in
      the same domain and will behave accordingly. This method is
      implemented, correctly AFAIK, by
      libxl_domain_resume(suspend_cancel=1).
    
    Attempting to use the old method without doing all of the work simply
    causes the guest to crash.  Implementing the work required for old
    method, or for checking that domains actually support the new method,
    is not feasible at this stage of the 4.4 release.
    
    So, always use the new method, without regard to the declarations of
    support by the guest.  This is a strict improvement: guests which do
    in fact support the new method will work, whereas ones which don't are
    no worse off.
    
    There are two call sites of libxl_domain_resume that need fixing, both
    in the migration error path.
    
    With this change I observe a correct and successful resumption of a
    Debian wheezy guest with a Linux 3.4.70 kernel after a migration
    attempt which I arranged to fail by nobbling the block hotplug script.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: konrad.wilk@oracle.com
    CC: David Vrabel <david.vrabel@citrix.com>
    CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 tools/libxl/xl_cmdimpl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index c30f495..d93e01b 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3734,7 +3734,7 @@ static void migrate_domain(uint32_t domid, const char *rune, int debug,
         if (common_domname) {
             libxl_domain_rename(ctx, domid, away_domname, common_domname);
         }
-        rc = libxl_domain_resume(ctx, domid, 0, 0);
+        rc = libxl_domain_resume(ctx, domid, 1, 0);
         if (!rc) fprintf(stderr, "migration sender: Resumed OK.\n");
 
         fprintf(stderr, "Migration failed due to problems at target.\n");
@@ -3756,7 +3756,7 @@ static void migrate_domain(uint32_t domid, const char *rune, int debug,
     close(send_fd);
     migration_child_report(recv_fd);
     fprintf(stderr, "Migration failed, resuming at sender.\n");
-    libxl_domain_resume(ctx, domid, 0, 0);
+    libxl_domain_resume(ctx, domid, 1, 0);
     exit(-ERROR_FAIL);
 
  failed_badly:
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 16 11:56:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:56: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 1W3lYa-0002E0-Bu; Thu, 16 Jan 2014 11:56: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 1W3lYR-0002Cf-DI
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:14 +0000
Received: from [193.109.254.147:46030] by server-2.bemta-14.messagelabs.com id
	E9/A1-00361-7D8C7D25; Thu, 16 Jan 2014 11:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1389873365!9767110!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5250 invoked from network); 16 Jan 2014 11:56: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 Jan 2014 11: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 1W3lYL-0007T4-CY
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lYL-0007iQ-AW
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:05 +0000
Date: Thu, 16 Jan 2014 11:56:05 +0000
Message-Id: <E1W3lYL-0007iQ-AW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: Always use "fast" migration resume
	protocol
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c04c825bdf1e946260cba325eeed993004051050
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Jan 13 18:15:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:33:12 2014 +0000

    xl: Always use "fast" migration resume protocol
    
    As Ian Campbell writes in http://bugs.xenproject.org/xen/bug/30:
    
      There are two mechanisms by which a suspend can be aborted and the
      original domain resumed.
    
      The older method is that the toolstack resets a bunch of state (see
      tools/python/xen/xend/XendDomainInfo.py resumeDomain) and then
      restarts the domain. The domain will see HYPERVISOR_suspend return 0
      and will continue without any realisation that it is actually
      running in the original domain and not in a new one. This method is
      supposed to be implemented by libxl_domain_resume(suspend_cancel=0)
      but it is not.
    
      The other method is newer and in this case the toolstack arranges
      that HYPERVISOR_suspend returns SUSPEND_CANCEL and restarts it. The
      domain will observe this and realise that it has been restarted in
      the same domain and will behave accordingly. This method is
      implemented, correctly AFAIK, by
      libxl_domain_resume(suspend_cancel=1).
    
    Attempting to use the old method without doing all of the work simply
    causes the guest to crash.  Implementing the work required for old
    method, or for checking that domains actually support the new method,
    is not feasible at this stage of the 4.4 release.
    
    So, always use the new method, without regard to the declarations of
    support by the guest.  This is a strict improvement: guests which do
    in fact support the new method will work, whereas ones which don't are
    no worse off.
    
    There are two call sites of libxl_domain_resume that need fixing, both
    in the migration error path.
    
    With this change I observe a correct and successful resumption of a
    Debian wheezy guest with a Linux 3.4.70 kernel after a migration
    attempt which I arranged to fail by nobbling the block hotplug script.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: konrad.wilk@oracle.com
    CC: David Vrabel <david.vrabel@citrix.com>
    CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 tools/libxl/xl_cmdimpl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index c30f495..d93e01b 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3734,7 +3734,7 @@ static void migrate_domain(uint32_t domid, const char *rune, int debug,
         if (common_domname) {
             libxl_domain_rename(ctx, domid, away_domname, common_domname);
         }
-        rc = libxl_domain_resume(ctx, domid, 0, 0);
+        rc = libxl_domain_resume(ctx, domid, 1, 0);
         if (!rc) fprintf(stderr, "migration sender: Resumed OK.\n");
 
         fprintf(stderr, "Migration failed due to problems at target.\n");
@@ -3756,7 +3756,7 @@ static void migrate_domain(uint32_t domid, const char *rune, int debug,
     close(send_fd);
     migration_child_report(recv_fd);
     fprintf(stderr, "Migration failed, resuming at sender.\n");
-    libxl_domain_resume(ctx, domid, 0, 0);
+    libxl_domain_resume(ctx, domid, 1, 0);
     exit(-ERROR_FAIL);
 
  failed_badly:
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 16 11:56:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:56: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 1W3lYg-0002FV-W5; Thu, 16 Jan 2014 11:56:27 +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 1W3lYX-0002DB-LF
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:18 +0000
Received: from [193.109.254.147:13631] by server-10.bemta-14.messagelabs.com
	id 32/CC-20752-FD8C7D25; Thu, 16 Jan 2014 11:56:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1389873373!7769314!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14865 invoked from network); 16 Jan 2014 11:56:14 -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 Jan 2014 11:56: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 1W3lXW-0007S2-KB
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXW-0007gL-CU
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:14 +0000
Date: Thu, 16 Jan 2014 11:55:14 +0000
Message-Id: <E1W3lXW-0007gL-CU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xg_main: If
	XEN_DOMCTL_gdbsx_guestmemio fails then force 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 f91dc2000a86d0af00f52b527fd28df00070f9cb
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 16:57:00 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:01:31 2014 +0000

    xg_main: If XEN_DOMCTL_gdbsx_guestmemio fails then force error.
    
    Without this gdb does not report an error.
    
    With this patch and using a 1G hvm domU:
    
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     Cannot access memory at address 0x6ae9168b
    
    Drop output of iop->remain because it most likely will be zero.
    This leads to a strange message:
    
    ERROR: failed to read 0 bytes. errno:14 rc:-1
    
    Add address to write error because it may be the only message
    displayed.
    
    Note: currently XEN_DOMCTL_gdbsx_guestmemio does not change 'iop' on
    error and so iop->remain will be zero.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 3b2a285..0fc3f82 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -787,8 +787,10 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
     iop->gwr = 0;       /* not writing to guest */
 
     if ( (rc = _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len)) )
-        XGTRC("ERROR: failed to read %d bytes. errno:%d rc:%d\n",
-              iop->remain, errno, rc);
+    {
+        XGTRC("ERROR: failed to read bytes. errno:%d rc:%d\n", errno, rc);
+        return tobuf_len;
+    }
 
     for(i=0; i < XGMIN(8, tobuf_len); u.buf8[i]=tobuf[i], i++);
     XGTRC("X:remain:%d buf8:0x%llx\n", iop->remain, u.llbuf8);
@@ -818,8 +820,11 @@ xg_write_mem(uint64_t guestva, char *frombuf, int buflen, uint64_t pgd3val)
     iop->gwr = 1;       /* writing to guest */
 
     if ((rc=_domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, frombuf, buflen)))
-        XGERR("ERROR: failed to write %d bytes. errno:%d rc:%d\n", 
-              iop->remain, errno, rc);
+    {
+        XGERR("ERROR: failed to write bytes to %llx. errno:%d rc:%d\n",
+              guestva, errno, rc);
+        return buflen;
+    }
     return iop->remain;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 16 11:56:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Jan 2014 11:56: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 1W3lYg-0002FV-W5; Thu, 16 Jan 2014 11:56:27 +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 1W3lYX-0002DB-LF
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:56:18 +0000
Received: from [193.109.254.147:13631] by server-10.bemta-14.messagelabs.com
	id 32/CC-20752-FD8C7D25; Thu, 16 Jan 2014 11:56:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1389873373!7769314!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14865 invoked from network); 16 Jan 2014 11:56:14 -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 Jan 2014 11:56: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 1W3lXW-0007S2-KB
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W3lXW-0007gL-CU
	for xen-changelog@lists.xensource.com; Thu, 16 Jan 2014 11:55:14 +0000
Date: Thu, 16 Jan 2014 11:55:14 +0000
Message-Id: <E1W3lXW-0007gL-CU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xg_main: If
	XEN_DOMCTL_gdbsx_guestmemio fails then force 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 f91dc2000a86d0af00f52b527fd28df00070f9cb
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Fri Jan 10 16:57:00 2014 -0500
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Jan 15 13:01:31 2014 +0000

    xg_main: If XEN_DOMCTL_gdbsx_guestmemio fails then force error.
    
    Without this gdb does not report an error.
    
    With this patch and using a 1G hvm domU:
    
    (gdb) x/1xh 0x6ae9168b
    0x6ae9168b:     Cannot access memory at address 0x6ae9168b
    
    Drop output of iop->remain because it most likely will be zero.
    This leads to a strange message:
    
    ERROR: failed to read 0 bytes. errno:14 rc:-1
    
    Add address to write error because it may be the only message
    displayed.
    
    Note: currently XEN_DOMCTL_gdbsx_guestmemio does not change 'iop' on
    error and so iop->remain will be zero.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 tools/debugger/gdbsx/xg/xg_main.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 3b2a285..0fc3f82 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -787,8 +787,10 @@ xg_read_mem(uint64_t guestva, char *tobuf, int tobuf_len, uint64_t pgd3val)
     iop->gwr = 0;       /* not writing to guest */
 
     if ( (rc = _domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, tobuf, tobuf_len)) )
-        XGTRC("ERROR: failed to read %d bytes. errno:%d rc:%d\n",
-              iop->remain, errno, rc);
+    {
+        XGTRC("ERROR: failed to read bytes. errno:%d rc:%d\n", errno, rc);
+        return tobuf_len;
+    }
 
     for(i=0; i < XGMIN(8, tobuf_len); u.buf8[i]=tobuf[i], i++);
     XGTRC("X:remain:%d buf8:0x%llx\n", iop->remain, u.llbuf8);
@@ -818,8 +820,11 @@ xg_write_mem(uint64_t guestva, char *frombuf, int buflen, uint64_t pgd3val)
     iop->gwr = 1;       /* writing to guest */
 
     if ((rc=_domctl_hcall(XEN_DOMCTL_gdbsx_guestmemio, frombuf, buflen)))
-        XGERR("ERROR: failed to write %d bytes. errno:%d rc:%d\n", 
-              iop->remain, errno, rc);
+    {
+        XGERR("ERROR: failed to write bytes to %llx. errno:%d rc:%d\n",
+              guestva, errno, rc);
+        return buflen;
+    }
     return iop->remain;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 17 22:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Jan 2014 22:33: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 1W4HyM-000122-6q; Fri, 17 Jan 2014 22:33:06 +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 1W4HyL-00011v-Qv
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:06 +0000
Received: from [85.158.139.211:27361] by server-1.bemta-5.messagelabs.com id
	29/18-21065-1AFA9D25; Fri, 17 Jan 2014 22:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1389997983!10471672!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17353 invoked from network); 17 Jan 2014 22:33:04 -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;
	17 Jan 2014 22:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4HyI-0004vG-W3
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4HyI-0000TZ-OF
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:02 +0000
Date: Fri, 17 Jan 2014 22:33:02 +0000
Message-Id: <E1W4HyI-0000TZ-OF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: correct guest PSCI handling
	on 64-bit hypervisor.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f26d849dff24120e6ad633db94abfbc6e6572503
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 14 17:32:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 17 10:06:59 2014 +0000

    xen: arm: correct guest PSCI handling on 64-bit hypervisor.
    
    Using ->rN truncates the 64-bit registers to 32-bits, which on X-gene chops
    off the top bit of the entry address for PSCI_UP.
    
    Follow the pattern established in do_trap_hypercall.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/traps.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 48a6fcc..ea77cb8 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1065,23 +1065,34 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
 }
 #endif
 
+#ifdef CONFIG_ARM_64
+#define PSCI_OP_REG(r) (r)->x0
+#define PSCI_RESULT_REG(r) (r)->x0
+#define PSCI_ARGS(r) (r)->x1, (r)->x2
+#else
+#define PSCI_OP_REG(r) (r)->r0
+#define PSCI_RESULT_REG(r) (r)->r0
+#define PSCI_ARGS(r) (r)->r1, (r)->r2
+#endif
+
 static void do_trap_psci(struct cpu_user_regs *regs)
 {
     arm_psci_fn_t psci_call = NULL;
 
-    if ( regs->r0 >= ARRAY_SIZE(arm_psci_table) )
+    if ( PSCI_OP_REG(regs) >= ARRAY_SIZE(arm_psci_table) )
     {
         domain_crash_synchronous();
         return;
     }
 
-    psci_call = arm_psci_table[regs->r0].fn;
+    psci_call = arm_psci_table[PSCI_OP_REG(regs)].fn;
     if ( psci_call == NULL )
     {
         domain_crash_synchronous();
         return;
     }
-    regs->r0 = psci_call(regs->r1, regs->r2);
+
+    PSCI_RESULT_REG(regs) = psci_call(PSCI_ARGS(regs));
 }
 
 #ifdef CONFIG_ARM_64
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 17 22:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Jan 2014 22:33: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 1W4HyM-000122-6q; Fri, 17 Jan 2014 22:33:06 +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 1W4HyL-00011v-Qv
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:06 +0000
Received: from [85.158.139.211:27361] by server-1.bemta-5.messagelabs.com id
	29/18-21065-1AFA9D25; Fri, 17 Jan 2014 22:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1389997983!10471672!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17353 invoked from network); 17 Jan 2014 22:33:04 -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;
	17 Jan 2014 22:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4HyI-0004vG-W3
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4HyI-0000TZ-OF
	for xen-changelog@lists.xensource.com; Fri, 17 Jan 2014 22:33:02 +0000
Date: Fri, 17 Jan 2014 22:33:02 +0000
Message-Id: <E1W4HyI-0000TZ-OF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: correct guest PSCI handling
	on 64-bit hypervisor.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f26d849dff24120e6ad633db94abfbc6e6572503
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Jan 14 17:32:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Jan 17 10:06:59 2014 +0000

    xen: arm: correct guest PSCI handling on 64-bit hypervisor.
    
    Using ->rN truncates the 64-bit registers to 32-bits, which on X-gene chops
    off the top bit of the entry address for PSCI_UP.
    
    Follow the pattern established in do_trap_hypercall.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/traps.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 48a6fcc..ea77cb8 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1065,23 +1065,34 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
 }
 #endif
 
+#ifdef CONFIG_ARM_64
+#define PSCI_OP_REG(r) (r)->x0
+#define PSCI_RESULT_REG(r) (r)->x0
+#define PSCI_ARGS(r) (r)->x1, (r)->x2
+#else
+#define PSCI_OP_REG(r) (r)->r0
+#define PSCI_RESULT_REG(r) (r)->r0
+#define PSCI_ARGS(r) (r)->r1, (r)->r2
+#endif
+
 static void do_trap_psci(struct cpu_user_regs *regs)
 {
     arm_psci_fn_t psci_call = NULL;
 
-    if ( regs->r0 >= ARRAY_SIZE(arm_psci_table) )
+    if ( PSCI_OP_REG(regs) >= ARRAY_SIZE(arm_psci_table) )
     {
         domain_crash_synchronous();
         return;
     }
 
-    psci_call = arm_psci_table[regs->r0].fn;
+    psci_call = arm_psci_table[PSCI_OP_REG(regs)].fn;
     if ( psci_call == NULL )
     {
         domain_crash_synchronous();
         return;
     }
-    regs->r0 = psci_call(regs->r1, regs->r2);
+
+    PSCI_RESULT_REG(regs) = psci_call(PSCI_ARGS(regs));
 }
 
 #ifdef CONFIG_ARM_64
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 18 06:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22: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 1W4PIE-0003k1-Ot; Sat, 18 Jan 2014 06:22:06 +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 1W4PIE-0003jv-5s
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:06 +0000
Received: from [85.158.139.211:3257] by server-11.bemta-5.messagelabs.com id
	C0/CB-23268-D8D1AD25; Sat, 18 Jan 2014 06:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1390026123!7796691!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11898 invoked from network); 18 Jan 2014 06: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;
	18 Jan 2014 06: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 1W4PIB-0000Ls-D4
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIB-0005tY-0P
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:03 +0000
Date: Sat, 18 Jan 2014 06:22:03 +0000
Message-Id: <E1W4PIB-0005tY-0P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/ats: Fix parsing of 'ats'
	command line option
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit bb29b48ed8210ecb2c084b371057e78254d5998a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:39:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:39:08 2014 +0100

    x86/ats: Fix parsing of 'ats' command line option
    
    This is really a boolean_param() hidden inside a hand-coded attempt to
    replicate boolean_param(), which misses the 'no-' prefix semantics
    expected with Xen boolean parameters.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 7b5af1df122092243a3697409d5a5ad3b9944da4
    master date: 2013-11-04 14:45:17 +0100
---
 xen/drivers/passthrough/x86/ats.c |   27 +--------------------------
 1 files changed, 1 insertions(+), 26 deletions(-)

diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c
index 674b54a..bb7ee9a 100644
--- a/xen/drivers/passthrough/x86/ats.c
+++ b/xen/drivers/passthrough/x86/ats.c
@@ -20,33 +20,8 @@
 
 LIST_HEAD(ats_devices);
 
-static void parse_ats_param(char *s);
-custom_param("ats", parse_ats_param);
-
 bool_t __read_mostly ats_enabled = 1;
-
-static void __init parse_ats_param(char *s)
-{
-    char *ss;
-
-    do {
-        ss = strchr(s, ',');
-        if ( ss )
-            *ss = '\0';
-
-        switch ( parse_bool(s) )
-        {
-        case 0:
-            ats_enabled = 0;
-            break;
-        case 1:
-            ats_enabled = 1;
-            break;
-        }
-
-        s = ss + 1;
-    } while ( ss );
-}
+boolean_param("ats", ats_enabled);
 
 int enable_ats_device(int seg, int bus, int devfn)
 {
--
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 Jan 18 06:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22: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 1W4PIE-0003k1-Ot; Sat, 18 Jan 2014 06:22:06 +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 1W4PIE-0003jv-5s
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:06 +0000
Received: from [85.158.139.211:3257] by server-11.bemta-5.messagelabs.com id
	C0/CB-23268-D8D1AD25; Sat, 18 Jan 2014 06:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1390026123!7796691!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11898 invoked from network); 18 Jan 2014 06: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;
	18 Jan 2014 06: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 1W4PIB-0000Ls-D4
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIB-0005tY-0P
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:03 +0000
Date: Sat, 18 Jan 2014 06:22:03 +0000
Message-Id: <E1W4PIB-0005tY-0P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/ats: Fix parsing of 'ats'
	command line option
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit bb29b48ed8210ecb2c084b371057e78254d5998a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:39:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:39:08 2014 +0100

    x86/ats: Fix parsing of 'ats' command line option
    
    This is really a boolean_param() hidden inside a hand-coded attempt to
    replicate boolean_param(), which misses the 'no-' prefix semantics
    expected with Xen boolean parameters.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 7b5af1df122092243a3697409d5a5ad3b9944da4
    master date: 2013-11-04 14:45:17 +0100
---
 xen/drivers/passthrough/x86/ats.c |   27 +--------------------------
 1 files changed, 1 insertions(+), 26 deletions(-)

diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c
index 674b54a..bb7ee9a 100644
--- a/xen/drivers/passthrough/x86/ats.c
+++ b/xen/drivers/passthrough/x86/ats.c
@@ -20,33 +20,8 @@
 
 LIST_HEAD(ats_devices);
 
-static void parse_ats_param(char *s);
-custom_param("ats", parse_ats_param);
-
 bool_t __read_mostly ats_enabled = 1;
-
-static void __init parse_ats_param(char *s)
-{
-    char *ss;
-
-    do {
-        ss = strchr(s, ',');
-        if ( ss )
-            *ss = '\0';
-
-        switch ( parse_bool(s) )
-        {
-        case 0:
-            ats_enabled = 0;
-            break;
-        case 1:
-            ats_enabled = 1;
-            break;
-        }
-
-        s = ss + 1;
-    } while ( ss );
-}
+boolean_param("ats", ats_enabled);
 
 int enable_ats_device(int seg, int bus, int devfn)
 {
--
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 Jan 18 06:22:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4PIP-0003kq-Rc; Sat, 18 Jan 2014 06:22: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 1W4PIO-0003kj-Ta
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:17 +0000
Received: from [85.158.139.211:15588] by server-8.bemta-5.messagelabs.com id
	D1/E3-29838-89D1AD25; Sat, 18 Jan 2014 06:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1390026134!10513766!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26548 invoked from network); 18 Jan 2014 06:22:15 -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;
	18 Jan 2014 06:22: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 1W4PIM-0000Ly-0T
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIL-0005tx-IL
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:13 +0000
Date: Sat, 18 Jan 2014 06:22:13 +0000
Message-Id: <E1W4PIL-0005tx-IL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/VT-x: Disable MSR intercept
	for SHADOW_GS_BASE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 744165288752c2cfc179e5aeed6e3aa9905b480a
Author:     Paul Durrant <paul.durrant@citrix.com>
AuthorDate: Fri Jan 17 16:41:38 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:41:38 2014 +0100

    x86/VT-x: Disable MSR intercept for SHADOW_GS_BASE
    
    Intercepting this MSR is pointless - The swapgs instruction does not cause a
    vmexit, so the cached result of this is potentially stale after the next guest
    instruction.  It is correctly saved and restored on vcpu context switch.
    
    Furthermore, 64bit Windows writes to this MSR on every thread context switch,
    so interception causes a substantial performance hit.
    
    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
    master commit: a82e98d473fd212316ea5aa078a7588324b020e5
    master date: 2013-11-15 11:02:17 +0100
---
 xen/arch/x86/hvm/vmx/vmcs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index da30039..6042dd1 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -776,6 +776,7 @@ static int construct_vmcs(struct vcpu *v)
 
         vmx_disable_intercept_for_msr(v, MSR_FS_BASE);
         vmx_disable_intercept_for_msr(v, MSR_GS_BASE);
+        vmx_disable_intercept_for_msr(v, MSR_SHADOW_GS_BASE);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_CS);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_ESP);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_EIP);
--
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 Jan 18 06:22:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4PIP-0003kq-Rc; Sat, 18 Jan 2014 06:22: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 1W4PIO-0003kj-Ta
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:17 +0000
Received: from [85.158.139.211:15588] by server-8.bemta-5.messagelabs.com id
	D1/E3-29838-89D1AD25; Sat, 18 Jan 2014 06:22:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1390026134!10513766!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26548 invoked from network); 18 Jan 2014 06:22:15 -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;
	18 Jan 2014 06:22: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 1W4PIM-0000Ly-0T
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIL-0005tx-IL
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:13 +0000
Date: Sat, 18 Jan 2014 06:22:13 +0000
Message-Id: <E1W4PIL-0005tx-IL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/VT-x: Disable MSR intercept
	for SHADOW_GS_BASE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 744165288752c2cfc179e5aeed6e3aa9905b480a
Author:     Paul Durrant <paul.durrant@citrix.com>
AuthorDate: Fri Jan 17 16:41:38 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:41:38 2014 +0100

    x86/VT-x: Disable MSR intercept for SHADOW_GS_BASE
    
    Intercepting this MSR is pointless - The swapgs instruction does not cause a
    vmexit, so the cached result of this is potentially stale after the next guest
    instruction.  It is correctly saved and restored on vcpu context switch.
    
    Furthermore, 64bit Windows writes to this MSR on every thread context switch,
    so interception causes a substantial performance hit.
    
    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
    master commit: a82e98d473fd212316ea5aa078a7588324b020e5
    master date: 2013-11-15 11:02:17 +0100
---
 xen/arch/x86/hvm/vmx/vmcs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index da30039..6042dd1 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -776,6 +776,7 @@ static int construct_vmcs(struct vcpu *v)
 
         vmx_disable_intercept_for_msr(v, MSR_FS_BASE);
         vmx_disable_intercept_for_msr(v, MSR_GS_BASE);
+        vmx_disable_intercept_for_msr(v, MSR_SHADOW_GS_BASE);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_CS);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_ESP);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_EIP);
--
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 Jan 18 06:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22: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 1W4PIa-0003lq-UQ; Sat, 18 Jan 2014 06:22: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 1W4PIZ-0003lg-Bw
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:27 +0000
Received: from [85.158.137.68:37794] by server-2.bemta-3.messagelabs.com id
	45/31-17329-2AD1AD25; Sat, 18 Jan 2014 06:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390026144!9074863!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13072 invoked from network); 18 Jan 2014 06:22:25 -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;
	18 Jan 2014 06: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 1W4PIW-0000M4-BK
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIW-0005uJ-3O
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:24 +0000
Date: Sat, 18 Jan 2014 06:22:24 +0000
Message-Id: <E1W4PIW-0005uJ-3O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] kexec: prevent deadlock on reentry
	to the crash 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 12d9655b96c702c7a936cefeec27c7fd19ff6d09
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:42:37 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:42:37 2014 +0100

    kexec: prevent deadlock on reentry to the crash path
    
    In some cases, such as suffering a queued-invalidation timeout while
    performing an iommu_crash_shutdown(), Xen can end up reentering the crash
    path. Previously, this would result in a deadlock in one_cpu_only(), as the
    test_and_set_bit() would fail.
    
    The crash path is not reentrant, and even if it could be made to be so, it is
    almost certain that we would fall over the same reentry condition again.
    
    The new code can distinguish a reentry case from multiple cpus racing down the
    crash path.  In the case that a reentry is detected, return back out to the
    nested panic() call, which will maybe_reboot() on our behalf.  This requires a
    bit of return plumbing back up to kexec_crash().
    
    While fixing this deadlock, also fix up an minor niggle seen recently from a
    XenServer crash report.  The report was from a Bank 8 MCE, which had managed
    to crash on all cpus at once.  The result was a lot of stack traces with cpus
    in kexec_common_shutdown(), which was infact the inlined version of
    one_cpu_only().  The kexec crash path is not a hotpath, so we can easily
    afford to prevent inlining for the sake of clarity in the stack traces.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 470f58c159410b280627c2ea7798ea12ad93bd7c
    master date: 2013-11-27 15:13:48 +0100
---
 xen/common/kexec.c |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 2bc3e33..c50e702 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -232,11 +232,39 @@ void __init set_kexec_crash_area_size(u64 system_ram)
     }
 }
 
-static void one_cpu_only(void)
+/*
+ * Only allow one cpu to continue on the crash path, forcing others to spin.
+ * Racing on the crash path from here will end in misery.  If we reenter,
+ * something has very gone wrong and retrying will (almost certainly) be
+ * futile.  Return up to our nested panic() to try and reboot.
+ *
+ * This is noinline to make it obvious in stack traces which cpus have lost
+ * the race (as opposed to being somewhere in kexec_common_shutdown())
+ */
+static int noinline one_cpu_only(void)
 {
-    /* Only allow the first cpu to continue - force other cpus to spin */
-    if ( test_and_set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
-        for ( ; ; ) ;
+    static unsigned int crashing_cpu = -1;
+    unsigned int cpu = smp_processor_id();
+
+    if ( cmpxchg(&crashing_cpu, -1, cpu) != -1 )
+    {
+        /* Not the first entry into one_cpu_only(). */
+        if ( crashing_cpu == cpu )
+        {
+            printk("Reentered the crash path.  Something is very broken\n");
+            return -EBUSY;
+        }
+
+        /*
+         * Another cpu has beaten us to this point.  Wait here patiently for
+         * it to kill us.
+         */
+        for ( ; ; )
+            halt();
+    }
+
+    set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
+    return 0;
 }
 
 /* Save the registers in the per-cpu crash note buffer. */
@@ -287,13 +315,20 @@ crash_xen_info_t *kexec_crash_save_info(void)
     return out;
 }
 
-static void kexec_common_shutdown(void)
+static int kexec_common_shutdown(void)
 {
+    int ret;
+
+    ret = one_cpu_only();
+    if ( ret )
+        return ret;
+
     watchdog_disable();
     console_start_sync();
     spin_debug_disable();
-    one_cpu_only();
     acpi_dmar_reinstate();
+
+    return 0;
 }
 
 void kexec_crash(void)
@@ -306,7 +341,9 @@ void kexec_crash(void)
 
     kexecing = TRUE;
 
-    kexec_common_shutdown();
+    if ( kexec_common_shutdown() != 0 )
+        return;
+
     kexec_crash_save_cpu();
     machine_crash_shutdown();
     machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]);
--
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 Jan 18 06:22:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 06:22: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 1W4PIa-0003lq-UQ; Sat, 18 Jan 2014 06:22: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 1W4PIZ-0003lg-Bw
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:27 +0000
Received: from [85.158.137.68:37794] by server-2.bemta-3.messagelabs.com id
	45/31-17329-2AD1AD25; Sat, 18 Jan 2014 06:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390026144!9074863!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13072 invoked from network); 18 Jan 2014 06:22:25 -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;
	18 Jan 2014 06: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 1W4PIW-0000M4-BK
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4PIW-0005uJ-3O
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 06:22:24 +0000
Date: Sat, 18 Jan 2014 06:22:24 +0000
Message-Id: <E1W4PIW-0005uJ-3O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] kexec: prevent deadlock on reentry
	to the crash 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 12d9655b96c702c7a936cefeec27c7fd19ff6d09
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:42:37 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:42:37 2014 +0100

    kexec: prevent deadlock on reentry to the crash path
    
    In some cases, such as suffering a queued-invalidation timeout while
    performing an iommu_crash_shutdown(), Xen can end up reentering the crash
    path. Previously, this would result in a deadlock in one_cpu_only(), as the
    test_and_set_bit() would fail.
    
    The crash path is not reentrant, and even if it could be made to be so, it is
    almost certain that we would fall over the same reentry condition again.
    
    The new code can distinguish a reentry case from multiple cpus racing down the
    crash path.  In the case that a reentry is detected, return back out to the
    nested panic() call, which will maybe_reboot() on our behalf.  This requires a
    bit of return plumbing back up to kexec_crash().
    
    While fixing this deadlock, also fix up an minor niggle seen recently from a
    XenServer crash report.  The report was from a Bank 8 MCE, which had managed
    to crash on all cpus at once.  The result was a lot of stack traces with cpus
    in kexec_common_shutdown(), which was infact the inlined version of
    one_cpu_only().  The kexec crash path is not a hotpath, so we can easily
    afford to prevent inlining for the sake of clarity in the stack traces.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 470f58c159410b280627c2ea7798ea12ad93bd7c
    master date: 2013-11-27 15:13:48 +0100
---
 xen/common/kexec.c |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 2bc3e33..c50e702 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -232,11 +232,39 @@ void __init set_kexec_crash_area_size(u64 system_ram)
     }
 }
 
-static void one_cpu_only(void)
+/*
+ * Only allow one cpu to continue on the crash path, forcing others to spin.
+ * Racing on the crash path from here will end in misery.  If we reenter,
+ * something has very gone wrong and retrying will (almost certainly) be
+ * futile.  Return up to our nested panic() to try and reboot.
+ *
+ * This is noinline to make it obvious in stack traces which cpus have lost
+ * the race (as opposed to being somewhere in kexec_common_shutdown())
+ */
+static int noinline one_cpu_only(void)
 {
-    /* Only allow the first cpu to continue - force other cpus to spin */
-    if ( test_and_set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
-        for ( ; ; ) ;
+    static unsigned int crashing_cpu = -1;
+    unsigned int cpu = smp_processor_id();
+
+    if ( cmpxchg(&crashing_cpu, -1, cpu) != -1 )
+    {
+        /* Not the first entry into one_cpu_only(). */
+        if ( crashing_cpu == cpu )
+        {
+            printk("Reentered the crash path.  Something is very broken\n");
+            return -EBUSY;
+        }
+
+        /*
+         * Another cpu has beaten us to this point.  Wait here patiently for
+         * it to kill us.
+         */
+        for ( ; ; )
+            halt();
+    }
+
+    set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
+    return 0;
 }
 
 /* Save the registers in the per-cpu crash note buffer. */
@@ -287,13 +315,20 @@ crash_xen_info_t *kexec_crash_save_info(void)
     return out;
 }
 
-static void kexec_common_shutdown(void)
+static int kexec_common_shutdown(void)
 {
+    int ret;
+
+    ret = one_cpu_only();
+    if ( ret )
+        return ret;
+
     watchdog_disable();
     console_start_sync();
     spin_debug_disable();
-    one_cpu_only();
     acpi_dmar_reinstate();
+
+    return 0;
 }
 
 void kexec_crash(void)
@@ -306,7 +341,9 @@ void kexec_crash(void)
 
     kexecing = TRUE;
 
-    kexec_common_shutdown();
+    if ( kexec_common_shutdown() != 0 )
+        return;
+
     kexec_crash_save_cpu();
     machine_crash_shutdown();
     machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]);
--
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 Jan 18 15:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4Xio-0005Iz-6e; Sat, 18 Jan 2014 15:22:06 +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 1W4Xin-0005Iu-N9
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:05 +0000
Received: from [85.158.139.211:42173] by server-3.bemta-5.messagelabs.com id
	7B/55-04773-C1C9AD25; Sat, 18 Jan 2014 15:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1390058523!10547712!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8098 invoked from network); 18 Jan 2014 15:22:03 -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;
	18 Jan 2014 15:22: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 1W4Xik-0006Li-QL
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xik-0004Ea-J0
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:02 +0000
Date: Sat, 18 Jan 2014 15:22:02 +0000
Message-Id: <E1W4Xik-0004Ea-J0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/crash: Indicate how well
	nmi_shootdown_cpus() managed to do
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 39b9a5bc0858b604560499afdc9964a670c8b67b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:31:50 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:31:50 2014 +0100

    x86/crash: Indicate how well nmi_shootdown_cpus() managed to do
    
    Having nmi_shootdown_cpus() report which pcpus failed to be shot down is a
    useful debugging hint as to what possibly went wrong (especially when the
    crash logs seem to indicate that an NMI timeout occurred while waiting for one
    of the problematic pcpus to perform an action).
    
    This is achieved by swapping an atomic_t count of unreported pcpus with a
    cpumask.  In the case that the 1 second timeout occurs, use the cpumask to
    identify the problematic pcpus.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: f12c1f0b09205cdf18a2c4a615fdc3e7357ce704
    master date: 2013-09-26 10:14:51 +0200
---
 xen/arch/x86/crash.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index b692e91..01fd906 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -22,6 +22,7 @@
 #include <xen/perfc.h>
 #include <xen/kexec.h>
 #include <xen/sched.h>
+#include <xen/keyhandler.h>
 #include <public/xen.h>
 #include <asm/shared.h>
 #include <asm/hvm/support.h>
@@ -30,7 +31,7 @@
 #include <xen/iommu.h>
 #include <asm/hpet.h>
 
-static atomic_t waiting_for_crash_ipi;
+static cpumask_t waiting_to_crash;
 static unsigned int crashing_cpu;
 static DEFINE_PER_CPU_READ_MOSTLY(bool_t, crash_save_done);
 
@@ -65,7 +66,7 @@ void __attribute__((noreturn)) do_nmi_crash(struct cpu_user_regs *regs)
         __stop_this_cpu();
 
         this_cpu(crash_save_done) = 1;
-        atomic_dec(&waiting_for_crash_ipi);
+        cpumask_clear_cpu(cpu, &waiting_to_crash);
     }
 
     /* Poor mans self_nmi().  __stop_this_cpu() has reverted the LAPIC
@@ -123,7 +124,7 @@ static void nmi_shootdown_cpus(void)
     crashing_cpu = cpu;
     local_irq_count(crashing_cpu) = 0;
 
-    atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
+    cpumask_andnot(&waiting_to_crash, &cpu_online_map, cpumask_of(cpu));
 
     /* Change NMI trap handlers.  Non-crashing pcpus get nmi_crash which
      * invokes do_nmi_crash (above), which cause them to write state and
@@ -163,12 +164,22 @@ static void nmi_shootdown_cpus(void)
     smp_send_nmi_allbutself();
 
     msecs = 1000; /* Wait at most a second for the other cpus to stop */
-    while ( (atomic_read(&waiting_for_crash_ipi) > 0) && msecs )
+    while ( !cpumask_empty(&waiting_to_crash) && msecs )
     {
         mdelay(1);
         msecs--;
     }
 
+    /* Leave a hint of how well we did trying to shoot down the other cpus */
+    if ( cpumask_empty(&waiting_to_crash) )
+        printk("Shot down all CPUs\n");
+    else
+    {
+        cpulist_scnprintf(keyhandler_scratch, sizeof keyhandler_scratch,
+                          &waiting_to_crash);
+        printk("Failed to shoot down CPUs {%s}\n", keyhandler_scratch);
+    }
+
     /* Crash shutdown any IOMMU functionality as the crashdump kernel is not
      * happy when booting if interrupt/dma remapping is still enabled */
     iommu_crash_shutdown();
--
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 Jan 18 15:22:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4Xio-0005Iz-6e; Sat, 18 Jan 2014 15:22:06 +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 1W4Xin-0005Iu-N9
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:05 +0000
Received: from [85.158.139.211:42173] by server-3.bemta-5.messagelabs.com id
	7B/55-04773-C1C9AD25; Sat, 18 Jan 2014 15:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1390058523!10547712!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8098 invoked from network); 18 Jan 2014 15:22:03 -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;
	18 Jan 2014 15:22: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 1W4Xik-0006Li-QL
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xik-0004Ea-J0
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:02 +0000
Date: Sat, 18 Jan 2014 15:22:02 +0000
Message-Id: <E1W4Xik-0004Ea-J0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/crash: Indicate how well
	nmi_shootdown_cpus() managed to do
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 39b9a5bc0858b604560499afdc9964a670c8b67b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:31:50 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:31:50 2014 +0100

    x86/crash: Indicate how well nmi_shootdown_cpus() managed to do
    
    Having nmi_shootdown_cpus() report which pcpus failed to be shot down is a
    useful debugging hint as to what possibly went wrong (especially when the
    crash logs seem to indicate that an NMI timeout occurred while waiting for one
    of the problematic pcpus to perform an action).
    
    This is achieved by swapping an atomic_t count of unreported pcpus with a
    cpumask.  In the case that the 1 second timeout occurs, use the cpumask to
    identify the problematic pcpus.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: f12c1f0b09205cdf18a2c4a615fdc3e7357ce704
    master date: 2013-09-26 10:14:51 +0200
---
 xen/arch/x86/crash.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index b692e91..01fd906 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -22,6 +22,7 @@
 #include <xen/perfc.h>
 #include <xen/kexec.h>
 #include <xen/sched.h>
+#include <xen/keyhandler.h>
 #include <public/xen.h>
 #include <asm/shared.h>
 #include <asm/hvm/support.h>
@@ -30,7 +31,7 @@
 #include <xen/iommu.h>
 #include <asm/hpet.h>
 
-static atomic_t waiting_for_crash_ipi;
+static cpumask_t waiting_to_crash;
 static unsigned int crashing_cpu;
 static DEFINE_PER_CPU_READ_MOSTLY(bool_t, crash_save_done);
 
@@ -65,7 +66,7 @@ void __attribute__((noreturn)) do_nmi_crash(struct cpu_user_regs *regs)
         __stop_this_cpu();
 
         this_cpu(crash_save_done) = 1;
-        atomic_dec(&waiting_for_crash_ipi);
+        cpumask_clear_cpu(cpu, &waiting_to_crash);
     }
 
     /* Poor mans self_nmi().  __stop_this_cpu() has reverted the LAPIC
@@ -123,7 +124,7 @@ static void nmi_shootdown_cpus(void)
     crashing_cpu = cpu;
     local_irq_count(crashing_cpu) = 0;
 
-    atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
+    cpumask_andnot(&waiting_to_crash, &cpu_online_map, cpumask_of(cpu));
 
     /* Change NMI trap handlers.  Non-crashing pcpus get nmi_crash which
      * invokes do_nmi_crash (above), which cause them to write state and
@@ -163,12 +164,22 @@ static void nmi_shootdown_cpus(void)
     smp_send_nmi_allbutself();
 
     msecs = 1000; /* Wait at most a second for the other cpus to stop */
-    while ( (atomic_read(&waiting_for_crash_ipi) > 0) && msecs )
+    while ( !cpumask_empty(&waiting_to_crash) && msecs )
     {
         mdelay(1);
         msecs--;
     }
 
+    /* Leave a hint of how well we did trying to shoot down the other cpus */
+    if ( cpumask_empty(&waiting_to_crash) )
+        printk("Shot down all CPUs\n");
+    else
+    {
+        cpulist_scnprintf(keyhandler_scratch, sizeof keyhandler_scratch,
+                          &waiting_to_crash);
+        printk("Failed to shoot down CPUs {%s}\n", keyhandler_scratch);
+    }
+
     /* Crash shutdown any IOMMU functionality as the crashdump kernel is not
      * happy when booting if interrupt/dma remapping is still enabled */
     iommu_crash_shutdown();
--
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 Jan 18 15:22:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4Xiy-0005Jf-9M; Sat, 18 Jan 2014 15:22:16 +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 1W4Xix-0005JY-Mo
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:15 +0000
Received: from [193.109.254.147:8114] by server-4.bemta-14.messagelabs.com id
	89/BE-03916-72C9AD25; Sat, 18 Jan 2014 15:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1390058533!11702982!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29608 invoked from network); 18 Jan 2014 15:22:14 -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 Jan 2014 15:22: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 1W4Xiv-0006Ll-8z
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xiu-0004FU-TT
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:13 +0000
Date: Sat, 18 Jan 2014 15:22:12 +0000
Message-Id: <E1W4Xiu-0004FU-TT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/ats: Fix parsing of 'ats'
	command line option
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit be29888fb069cae35be251ce3fcf74e937030812
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:33:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:33:10 2014 +0100

    x86/ats: Fix parsing of 'ats' command line option
    
    This is really a boolean_param() hidden inside a hand-coded attempt to
    replicate boolean_param(), which misses the 'no-' prefix semantics
    expected with Xen boolean parameters.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 7b5af1df122092243a3697409d5a5ad3b9944da4
    master date: 2013-11-04 14:45:17 +0100
---
 xen/drivers/passthrough/x86/ats.c |   27 +--------------------------
 1 files changed, 1 insertions(+), 26 deletions(-)

diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c
index 674b54a..bb7ee9a 100644
--- a/xen/drivers/passthrough/x86/ats.c
+++ b/xen/drivers/passthrough/x86/ats.c
@@ -20,33 +20,8 @@
 
 LIST_HEAD(ats_devices);
 
-static void parse_ats_param(char *s);
-custom_param("ats", parse_ats_param);
-
 bool_t __read_mostly ats_enabled = 1;
-
-static void __init parse_ats_param(char *s)
-{
-    char *ss;
-
-    do {
-        ss = strchr(s, ',');
-        if ( ss )
-            *ss = '\0';
-
-        switch ( parse_bool(s) )
-        {
-        case 0:
-            ats_enabled = 0;
-            break;
-        case 1:
-            ats_enabled = 1;
-            break;
-        }
-
-        s = ss + 1;
-    } while ( ss );
-}
+boolean_param("ats", ats_enabled);
 
 int enable_ats_device(int seg, int bus, int devfn)
 {
--
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 Jan 18 15:22:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4Xiy-0005Jf-9M; Sat, 18 Jan 2014 15:22:16 +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 1W4Xix-0005JY-Mo
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:15 +0000
Received: from [193.109.254.147:8114] by server-4.bemta-14.messagelabs.com id
	89/BE-03916-72C9AD25; Sat, 18 Jan 2014 15:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1390058533!11702982!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29608 invoked from network); 18 Jan 2014 15:22:14 -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 Jan 2014 15:22: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 1W4Xiv-0006Ll-8z
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xiu-0004FU-TT
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:13 +0000
Date: Sat, 18 Jan 2014 15:22:12 +0000
Message-Id: <E1W4Xiu-0004FU-TT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/ats: Fix parsing of 'ats'
	command line option
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit be29888fb069cae35be251ce3fcf74e937030812
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:33:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:33:10 2014 +0100

    x86/ats: Fix parsing of 'ats' command line option
    
    This is really a boolean_param() hidden inside a hand-coded attempt to
    replicate boolean_param(), which misses the 'no-' prefix semantics
    expected with Xen boolean parameters.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 7b5af1df122092243a3697409d5a5ad3b9944da4
    master date: 2013-11-04 14:45:17 +0100
---
 xen/drivers/passthrough/x86/ats.c |   27 +--------------------------
 1 files changed, 1 insertions(+), 26 deletions(-)

diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c
index 674b54a..bb7ee9a 100644
--- a/xen/drivers/passthrough/x86/ats.c
+++ b/xen/drivers/passthrough/x86/ats.c
@@ -20,33 +20,8 @@
 
 LIST_HEAD(ats_devices);
 
-static void parse_ats_param(char *s);
-custom_param("ats", parse_ats_param);
-
 bool_t __read_mostly ats_enabled = 1;
-
-static void __init parse_ats_param(char *s)
-{
-    char *ss;
-
-    do {
-        ss = strchr(s, ',');
-        if ( ss )
-            *ss = '\0';
-
-        switch ( parse_bool(s) )
-        {
-        case 0:
-            ats_enabled = 0;
-            break;
-        case 1:
-            ats_enabled = 1;
-            break;
-        }
-
-        s = ss + 1;
-    } while ( ss );
-}
+boolean_param("ats", ats_enabled);
 
 int enable_ats_device(int seg, int bus, int devfn)
 {
--
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 Jan 18 15:22:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4Xj9-0005Kd-C9; Sat, 18 Jan 2014 15:22: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 1W4Xj8-0005KU-69
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:26 +0000
Received: from [85.158.139.211:4684] by server-12.bemta-5.messagelabs.com id
	33/F3-30017-13C9AD25; Sat, 18 Jan 2014 15:22:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390058543!10557737!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4321 invoked from network); 18 Jan 2014 15:22:24 -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;
	18 Jan 2014 15:22: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 1W4Xj5-0006Lu-E5
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xj5-0004Fr-Be
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:23 +0000
Date: Sat, 18 Jan 2014 15:22:23 +0000
Message-Id: <E1W4Xj5-0004Fr-Be@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/VT-x: Disable MSR intercept
	for SHADOW_GS_BASE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 491788b98c7b35822cab8bdf66504a78c88414ee
Author:     Paul Durrant <paul.durrant@citrix.com>
AuthorDate: Fri Jan 17 16:33:54 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:33:54 2014 +0100

    x86/VT-x: Disable MSR intercept for SHADOW_GS_BASE
    
    Intercepting this MSR is pointless - The swapgs instruction does not cause a
    vmexit, so the cached result of this is potentially stale after the next guest
    instruction.  It is correctly saved and restored on vcpu context switch.
    
    Furthermore, 64bit Windows writes to this MSR on every thread context switch,
    so interception causes a substantial performance hit.
    
    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
    master commit: a82e98d473fd212316ea5aa078a7588324b020e5
    master date: 2013-11-15 11:02:17 +0100
---
 xen/arch/x86/hvm/vmx/vmcs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 7e74fba..822e817 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -917,6 +917,7 @@ static int construct_vmcs(struct vcpu *v)
 
         vmx_disable_intercept_for_msr(v, MSR_FS_BASE, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_GS_BASE, MSR_TYPE_R | MSR_TYPE_W);
+        vmx_disable_intercept_for_msr(v, MSR_SHADOW_GS_BASE, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_CS, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_ESP, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_EIP, MSR_TYPE_R | MSR_TYPE_W);
--
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 Jan 18 15:22:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4Xj9-0005Kd-C9; Sat, 18 Jan 2014 15:22: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 1W4Xj8-0005KU-69
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:26 +0000
Received: from [85.158.139.211:4684] by server-12.bemta-5.messagelabs.com id
	33/F3-30017-13C9AD25; Sat, 18 Jan 2014 15:22:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390058543!10557737!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4321 invoked from network); 18 Jan 2014 15:22:24 -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;
	18 Jan 2014 15:22: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 1W4Xj5-0006Lu-E5
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4Xj5-0004Fr-Be
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:23 +0000
Date: Sat, 18 Jan 2014 15:22:23 +0000
Message-Id: <E1W4Xj5-0004Fr-Be@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/VT-x: Disable MSR intercept
	for SHADOW_GS_BASE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 491788b98c7b35822cab8bdf66504a78c88414ee
Author:     Paul Durrant <paul.durrant@citrix.com>
AuthorDate: Fri Jan 17 16:33:54 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:33:54 2014 +0100

    x86/VT-x: Disable MSR intercept for SHADOW_GS_BASE
    
    Intercepting this MSR is pointless - The swapgs instruction does not cause a
    vmexit, so the cached result of this is potentially stale after the next guest
    instruction.  It is correctly saved and restored on vcpu context switch.
    
    Furthermore, 64bit Windows writes to this MSR on every thread context switch,
    so interception causes a substantial performance hit.
    
    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
    master commit: a82e98d473fd212316ea5aa078a7588324b020e5
    master date: 2013-11-15 11:02:17 +0100
---
 xen/arch/x86/hvm/vmx/vmcs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 7e74fba..822e817 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -917,6 +917,7 @@ static int construct_vmcs(struct vcpu *v)
 
         vmx_disable_intercept_for_msr(v, MSR_FS_BASE, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_GS_BASE, MSR_TYPE_R | MSR_TYPE_W);
+        vmx_disable_intercept_for_msr(v, MSR_SHADOW_GS_BASE, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_CS, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_ESP, MSR_TYPE_R | MSR_TYPE_W);
         vmx_disable_intercept_for_msr(v, MSR_IA32_SYSENTER_EIP, MSR_TYPE_R | MSR_TYPE_W);
--
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 Jan 18 15:22:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4XjJ-0005Lm-Et; Sat, 18 Jan 2014 15:22:37 +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 1W4XjI-0005Le-FO
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:36 +0000
Received: from [85.158.139.211:4892] by server-7.bemta-5.messagelabs.com id
	38/AD-04824-B3C9AD25; Sat, 18 Jan 2014 15:22:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390058553!10549330!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13407 invoked from network); 18 Jan 2014 15:22: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;
	18 Jan 2014 15:22: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 1W4XjF-0006M2-JU
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4XjF-0004GP-H0
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:33 +0000
Date: Sat, 18 Jan 2014 15:22:33 +0000
Message-Id: <E1W4XjF-0004GP-H0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] kexec: prevent deadlock on reentry
	to the crash 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 7261a3fc6e6101293cff232b9423dd41b140fc0f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:37:06 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:37:06 2014 +0100

    kexec: prevent deadlock on reentry to the crash path
    
    In some cases, such as suffering a queued-invalidation timeout while
    performing an iommu_crash_shutdown(), Xen can end up reentering the crash
    path. Previously, this would result in a deadlock in one_cpu_only(), as the
    test_and_set_bit() would fail.
    
    The crash path is not reentrant, and even if it could be made to be so, it is
    almost certain that we would fall over the same reentry condition again.
    
    The new code can distinguish a reentry case from multiple cpus racing down the
    crash path.  In the case that a reentry is detected, return back out to the
    nested panic() call, which will maybe_reboot() on our behalf.  This requires a
    bit of return plumbing back up to kexec_crash().
    
    While fixing this deadlock, also fix up an minor niggle seen recently from a
    XenServer crash report.  The report was from a Bank 8 MCE, which had managed
    to crash on all cpus at once.  The result was a lot of stack traces with cpus
    in kexec_common_shutdown(), which was infact the inlined version of
    one_cpu_only().  The kexec crash path is not a hotpath, so we can easily
    afford to prevent inlining for the sake of clarity in the stack traces.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 470f58c159410b280627c2ea7798ea12ad93bd7c
    master date: 2013-11-27 15:13:48 +0100
---
 xen/common/kexec.c |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 1ba8556..5c6e251 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -234,11 +234,39 @@ void __init set_kexec_crash_area_size(u64 system_ram)
     }
 }
 
-static void one_cpu_only(void)
+/*
+ * Only allow one cpu to continue on the crash path, forcing others to spin.
+ * Racing on the crash path from here will end in misery.  If we reenter,
+ * something has very gone wrong and retrying will (almost certainly) be
+ * futile.  Return up to our nested panic() to try and reboot.
+ *
+ * This is noinline to make it obvious in stack traces which cpus have lost
+ * the race (as opposed to being somewhere in kexec_common_shutdown())
+ */
+static int noinline one_cpu_only(void)
 {
-    /* Only allow the first cpu to continue - force other cpus to spin */
-    if ( test_and_set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
-        for ( ; ; ) ;
+    static unsigned int crashing_cpu = -1;
+    unsigned int cpu = smp_processor_id();
+
+    if ( cmpxchg(&crashing_cpu, -1, cpu) != -1 )
+    {
+        /* Not the first entry into one_cpu_only(). */
+        if ( crashing_cpu == cpu )
+        {
+            printk("Reentered the crash path.  Something is very broken\n");
+            return -EBUSY;
+        }
+
+        /*
+         * Another cpu has beaten us to this point.  Wait here patiently for
+         * it to kill us.
+         */
+        for ( ; ; )
+            halt();
+    }
+
+    set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
+    return 0;
 }
 
 /* Save the registers in the per-cpu crash note buffer. */
@@ -289,13 +317,20 @@ crash_xen_info_t *kexec_crash_save_info(void)
     return out;
 }
 
-static void kexec_common_shutdown(void)
+static int kexec_common_shutdown(void)
 {
+    int ret;
+
+    ret = one_cpu_only();
+    if ( ret )
+        return ret;
+
     watchdog_disable();
     console_start_sync();
     spin_debug_disable();
-    one_cpu_only();
     acpi_dmar_reinstate();
+
+    return 0;
 }
 
 void kexec_crash(void)
@@ -308,7 +343,9 @@ void kexec_crash(void)
 
     kexecing = TRUE;
 
-    kexec_common_shutdown();
+    if ( kexec_common_shutdown() != 0 )
+        return;
+
     kexec_crash_save_cpu();
     machine_crash_shutdown();
     machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]);
--
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 Jan 18 15:22:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 18 Jan 2014 15:22: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 1W4XjJ-0005Lm-Et; Sat, 18 Jan 2014 15:22:37 +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 1W4XjI-0005Le-FO
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:36 +0000
Received: from [85.158.139.211:4892] by server-7.bemta-5.messagelabs.com id
	38/AD-04824-B3C9AD25; Sat, 18 Jan 2014 15:22:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390058553!10549330!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13407 invoked from network); 18 Jan 2014 15:22: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;
	18 Jan 2014 15:22: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 1W4XjF-0006M2-JU
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4XjF-0004GP-H0
	for xen-changelog@lists.xensource.com; Sat, 18 Jan 2014 15:22:33 +0000
Date: Sat, 18 Jan 2014 15:22:33 +0000
Message-Id: <E1W4XjF-0004GP-H0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] kexec: prevent deadlock on reentry
	to the crash 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 7261a3fc6e6101293cff232b9423dd41b140fc0f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 17 16:37:06 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:37:06 2014 +0100

    kexec: prevent deadlock on reentry to the crash path
    
    In some cases, such as suffering a queued-invalidation timeout while
    performing an iommu_crash_shutdown(), Xen can end up reentering the crash
    path. Previously, this would result in a deadlock in one_cpu_only(), as the
    test_and_set_bit() would fail.
    
    The crash path is not reentrant, and even if it could be made to be so, it is
    almost certain that we would fall over the same reentry condition again.
    
    The new code can distinguish a reentry case from multiple cpus racing down the
    crash path.  In the case that a reentry is detected, return back out to the
    nested panic() call, which will maybe_reboot() on our behalf.  This requires a
    bit of return plumbing back up to kexec_crash().
    
    While fixing this deadlock, also fix up an minor niggle seen recently from a
    XenServer crash report.  The report was from a Bank 8 MCE, which had managed
    to crash on all cpus at once.  The result was a lot of stack traces with cpus
    in kexec_common_shutdown(), which was infact the inlined version of
    one_cpu_only().  The kexec crash path is not a hotpath, so we can easily
    afford to prevent inlining for the sake of clarity in the stack traces.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 470f58c159410b280627c2ea7798ea12ad93bd7c
    master date: 2013-11-27 15:13:48 +0100
---
 xen/common/kexec.c |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 1ba8556..5c6e251 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -234,11 +234,39 @@ void __init set_kexec_crash_area_size(u64 system_ram)
     }
 }
 
-static void one_cpu_only(void)
+/*
+ * Only allow one cpu to continue on the crash path, forcing others to spin.
+ * Racing on the crash path from here will end in misery.  If we reenter,
+ * something has very gone wrong and retrying will (almost certainly) be
+ * futile.  Return up to our nested panic() to try and reboot.
+ *
+ * This is noinline to make it obvious in stack traces which cpus have lost
+ * the race (as opposed to being somewhere in kexec_common_shutdown())
+ */
+static int noinline one_cpu_only(void)
 {
-    /* Only allow the first cpu to continue - force other cpus to spin */
-    if ( test_and_set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
-        for ( ; ; ) ;
+    static unsigned int crashing_cpu = -1;
+    unsigned int cpu = smp_processor_id();
+
+    if ( cmpxchg(&crashing_cpu, -1, cpu) != -1 )
+    {
+        /* Not the first entry into one_cpu_only(). */
+        if ( crashing_cpu == cpu )
+        {
+            printk("Reentered the crash path.  Something is very broken\n");
+            return -EBUSY;
+        }
+
+        /*
+         * Another cpu has beaten us to this point.  Wait here patiently for
+         * it to kill us.
+         */
+        for ( ; ; )
+            halt();
+    }
+
+    set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
+    return 0;
 }
 
 /* Save the registers in the per-cpu crash note buffer. */
@@ -289,13 +317,20 @@ crash_xen_info_t *kexec_crash_save_info(void)
     return out;
 }
 
-static void kexec_common_shutdown(void)
+static int kexec_common_shutdown(void)
 {
+    int ret;
+
+    ret = one_cpu_only();
+    if ( ret )
+        return ret;
+
     watchdog_disable();
     console_start_sync();
     spin_debug_disable();
-    one_cpu_only();
     acpi_dmar_reinstate();
+
+    return 0;
 }
 
 void kexec_crash(void)
@@ -308,7 +343,9 @@ void kexec_crash(void)
 
     kexecing = TRUE;
 
-    kexec_common_shutdown();
+    if ( kexec_common_shutdown() != 0 )
+        return;
+
     kexec_crash_save_cpu();
     machine_crash_shutdown();
     machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]);
--
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 Sun Jan 19 06:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33: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 1W4lwR-00084E-A8; Sun, 19 Jan 2014 06:33: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 1W4lwQ-000844-Ez
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:06 +0000
Received: from [85.158.143.35:32090] by server-1.bemta-4.messagelabs.com id
	07/0C-02132-1A17BD25; Sun, 19 Jan 2014 06:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390113184!773729!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10681 invoked from network); 19 Jan 2014 06:33:04 -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;
	19 Jan 2014 06:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwN-0006lQ-Mh
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwN-00052p-66
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:03 +0000
Date: Sun, 19 Jan 2014 06:33:03 +0000
Message-Id: <E1W4lwN-00052p-66@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] mce: fix race condition in
	mctelem_xchg_head
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e9af61b969906976188609379183cb304935f448
Author:     Frediano Ziglio <frediano.ziglio@citrix.com>
AuthorDate: Fri Jan 17 15:58:27 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 15:58:27 2014 +0100

    mce: fix race condition in mctelem_xchg_head
    
    The function (mctelem_xchg_head()) used to exchange mce telemetry
    list heads is racy.  It may write to the head twice, with the second
    write linking to an element in the wrong state.
    
    If there are two threads, T1 inserting on committed list; and T2
    trying to consume it.
    
    1. T1 starts inserting an element (A), sets prev pointer (mcte_prev).
    2. T1 is interrupted after the cmpxchg succeeded.
    3. T2 gets the list and changes element A and updates the commit list
       head.
    4. T1 resumes, reads pointer to prev again and compare with result
       from the cmpxchg which succeeded but in the meantime prev changed
       in memory.
    5. T1 thinks the cmpxchg failed and goes around the loop again,
       linking head to A again.
    
    To solve the race use temporary variable for prev pointer.
    
    *linkp (which point to a field in the element) must be updated before
    the cmpxchg() as after a successful cmpxchg the element might be
    immediately removed and reinitialized.
    
    The wmb() prior to the cmpchgptr() call is not necessary since it is
    already a full memory barrier.  This wmb() is thus removed.
    
    Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
---
 xen/arch/x86/cpu/mcheck/mctelem.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/mctelem.c b/xen/arch/x86/cpu/mcheck/mctelem.c
index 37d830f..895ce1a 100644
--- a/xen/arch/x86/cpu/mcheck/mctelem.c
+++ b/xen/arch/x86/cpu/mcheck/mctelem.c
@@ -127,13 +127,14 @@ static DEFINE_PER_CPU(struct mc_telem_cpu_ctl, mctctl);
 static DEFINE_SPINLOCK(processing_lock);
 
 static void mctelem_xchg_head(struct mctelem_ent **headp,
-				struct mctelem_ent **old,
+				struct mctelem_ent **linkp,
 				struct mctelem_ent *new)
 {
 	for (;;) {
-		*old = *headp;
-		wmb();
-		if (cmpxchgptr(headp, *old, new) == *old)
+		struct mctelem_ent *old;
+
+		*linkp = old = *headp;
+		if (cmpxchgptr(headp, old, new) == old)
 			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 Sun Jan 19 06:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33: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 1W4lwR-00084E-A8; Sun, 19 Jan 2014 06:33: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 1W4lwQ-000844-Ez
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:06 +0000
Received: from [85.158.143.35:32090] by server-1.bemta-4.messagelabs.com id
	07/0C-02132-1A17BD25; Sun, 19 Jan 2014 06:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390113184!773729!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10681 invoked from network); 19 Jan 2014 06:33:04 -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;
	19 Jan 2014 06:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwN-0006lQ-Mh
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwN-00052p-66
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:03 +0000
Date: Sun, 19 Jan 2014 06:33:03 +0000
Message-Id: <E1W4lwN-00052p-66@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] mce: fix race condition in
	mctelem_xchg_head
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e9af61b969906976188609379183cb304935f448
Author:     Frediano Ziglio <frediano.ziglio@citrix.com>
AuthorDate: Fri Jan 17 15:58:27 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 15:58:27 2014 +0100

    mce: fix race condition in mctelem_xchg_head
    
    The function (mctelem_xchg_head()) used to exchange mce telemetry
    list heads is racy.  It may write to the head twice, with the second
    write linking to an element in the wrong state.
    
    If there are two threads, T1 inserting on committed list; and T2
    trying to consume it.
    
    1. T1 starts inserting an element (A), sets prev pointer (mcte_prev).
    2. T1 is interrupted after the cmpxchg succeeded.
    3. T2 gets the list and changes element A and updates the commit list
       head.
    4. T1 resumes, reads pointer to prev again and compare with result
       from the cmpxchg which succeeded but in the meantime prev changed
       in memory.
    5. T1 thinks the cmpxchg failed and goes around the loop again,
       linking head to A again.
    
    To solve the race use temporary variable for prev pointer.
    
    *linkp (which point to a field in the element) must be updated before
    the cmpxchg() as after a successful cmpxchg the element might be
    immediately removed and reinitialized.
    
    The wmb() prior to the cmpchgptr() call is not necessary since it is
    already a full memory barrier.  This wmb() is thus removed.
    
    Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
---
 xen/arch/x86/cpu/mcheck/mctelem.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/mctelem.c b/xen/arch/x86/cpu/mcheck/mctelem.c
index 37d830f..895ce1a 100644
--- a/xen/arch/x86/cpu/mcheck/mctelem.c
+++ b/xen/arch/x86/cpu/mcheck/mctelem.c
@@ -127,13 +127,14 @@ static DEFINE_PER_CPU(struct mc_telem_cpu_ctl, mctctl);
 static DEFINE_SPINLOCK(processing_lock);
 
 static void mctelem_xchg_head(struct mctelem_ent **headp,
-				struct mctelem_ent **old,
+				struct mctelem_ent **linkp,
 				struct mctelem_ent *new)
 {
 	for (;;) {
-		*old = *headp;
-		wmb();
-		if (cmpxchgptr(headp, *old, new) == *old)
+		struct mctelem_ent *old;
+
+		*linkp = old = *headp;
+		if (cmpxchgptr(headp, old, new) == old)
 			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 Sun Jan 19 06:33:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4lwc-00085A-Cx; Sun, 19 Jan 2014 06:33: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 1W4lwb-000852-4Q
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:17 +0000
Received: from [85.158.137.68:48030] by server-9.bemta-3.messagelabs.com id
	E3/2A-13104-CA17BD25; Sun, 19 Jan 2014 06:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390113194!9166864!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14373 invoked from network); 19 Jan 2014 06:33:15 -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;
	19 Jan 2014 06:33: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 1W4lwY-0006lW-2s
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwX-00053D-Q0
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:13 +0000
Date: Sun, 19 Jan 2014 06:33:13 +0000
Message-Id: <E1W4lwX-00053D-Q0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] nested EPT: fixing wrong handling for
	L2 guest's direct mmio access
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0b988ba711171b39aed9851cfe90fded50f775c5
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 17 16:00:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:00:21 2014 +0100

    nested EPT: fixing wrong handling for L2 guest's direct mmio access
    
    L2 guest will access the physical device directly(nested VT-d). For such access,
    Shadow EPT table should point to device's MMIO. But in current logic, L0 doesn't
    distinguish the MMIO whether from qemu or physical device when building shadow EPT table.
    This is wrong. This patch will setup the correct shadow EPT table for such MMIO ranges.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c    |   10 ++++++++--
 xen/include/asm-x86/hvm/nestedhvm.h |    1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index c2ef1d1..38e2327 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -170,8 +170,11 @@ nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
     mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, p2mt, p2ma,
                               0, page_order);
 
+    rc = NESTEDHVM_PAGEFAULT_DIRECT_MMIO;
+    if ( *p2mt == p2m_mmio_direct )
+        goto direct_mmio_out;
     rc = NESTEDHVM_PAGEFAULT_MMIO;
-    if ( p2m_is_mmio(*p2mt) )
+    if ( *p2mt == p2m_mmio_dm )
         goto out;
 
     rc = NESTEDHVM_PAGEFAULT_L0_ERROR;
@@ -184,8 +187,9 @@ nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
     if ( !mfn_valid(mfn) )
         goto out;
 
-    *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK);
     rc = NESTEDHVM_PAGEFAULT_DONE;
+direct_mmio_out:
+    *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK);
 out:
     __put_gfn(p2m, L1_gpa >> PAGE_SHIFT);
     return rc;
@@ -245,6 +249,8 @@ nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
         break;
     case NESTEDHVM_PAGEFAULT_MMIO:
         return rv;
+    case NESTEDHVM_PAGEFAULT_DIRECT_MMIO:
+        break;
     default:
         BUG();
         break;
diff --git a/xen/include/asm-x86/hvm/nestedhvm.h b/xen/include/asm-x86/hvm/nestedhvm.h
index d8124cf..cca41b3 100644
--- a/xen/include/asm-x86/hvm/nestedhvm.h
+++ b/xen/include/asm-x86/hvm/nestedhvm.h
@@ -53,6 +53,7 @@ bool_t nestedhvm_vcpu_in_guestmode(struct vcpu *v);
 #define NESTEDHVM_PAGEFAULT_L0_ERROR   3
 #define NESTEDHVM_PAGEFAULT_MMIO       4
 #define NESTEDHVM_PAGEFAULT_RETRY      5
+#define NESTEDHVM_PAGEFAULT_DIRECT_MMIO 6
 int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Sun Jan 19 06:33:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W4lwc-00085A-Cx; Sun, 19 Jan 2014 06:33: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 1W4lwb-000852-4Q
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:17 +0000
Received: from [85.158.137.68:48030] by server-9.bemta-3.messagelabs.com id
	E3/2A-13104-CA17BD25; Sun, 19 Jan 2014 06:33:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390113194!9166864!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14373 invoked from network); 19 Jan 2014 06:33:15 -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;
	19 Jan 2014 06:33: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 1W4lwY-0006lW-2s
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwX-00053D-Q0
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:13 +0000
Date: Sun, 19 Jan 2014 06:33:13 +0000
Message-Id: <E1W4lwX-00053D-Q0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] nested EPT: fixing wrong handling for
	L2 guest's direct mmio access
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0b988ba711171b39aed9851cfe90fded50f775c5
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Fri Jan 17 16:00:21 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:00:21 2014 +0100

    nested EPT: fixing wrong handling for L2 guest's direct mmio access
    
    L2 guest will access the physical device directly(nested VT-d). For such access,
    Shadow EPT table should point to device's MMIO. But in current logic, L0 doesn't
    distinguish the MMIO whether from qemu or physical device when building shadow EPT table.
    This is wrong. This patch will setup the correct shadow EPT table for such MMIO ranges.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c    |   10 ++++++++--
 xen/include/asm-x86/hvm/nestedhvm.h |    1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index c2ef1d1..38e2327 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -170,8 +170,11 @@ nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
     mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, p2mt, p2ma,
                               0, page_order);
 
+    rc = NESTEDHVM_PAGEFAULT_DIRECT_MMIO;
+    if ( *p2mt == p2m_mmio_direct )
+        goto direct_mmio_out;
     rc = NESTEDHVM_PAGEFAULT_MMIO;
-    if ( p2m_is_mmio(*p2mt) )
+    if ( *p2mt == p2m_mmio_dm )
         goto out;
 
     rc = NESTEDHVM_PAGEFAULT_L0_ERROR;
@@ -184,8 +187,9 @@ nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
     if ( !mfn_valid(mfn) )
         goto out;
 
-    *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK);
     rc = NESTEDHVM_PAGEFAULT_DONE;
+direct_mmio_out:
+    *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK);
 out:
     __put_gfn(p2m, L1_gpa >> PAGE_SHIFT);
     return rc;
@@ -245,6 +249,8 @@ nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
         break;
     case NESTEDHVM_PAGEFAULT_MMIO:
         return rv;
+    case NESTEDHVM_PAGEFAULT_DIRECT_MMIO:
+        break;
     default:
         BUG();
         break;
diff --git a/xen/include/asm-x86/hvm/nestedhvm.h b/xen/include/asm-x86/hvm/nestedhvm.h
index d8124cf..cca41b3 100644
--- a/xen/include/asm-x86/hvm/nestedhvm.h
+++ b/xen/include/asm-x86/hvm/nestedhvm.h
@@ -53,6 +53,7 @@ bool_t nestedhvm_vcpu_in_guestmode(struct vcpu *v);
 #define NESTEDHVM_PAGEFAULT_L0_ERROR   3
 #define NESTEDHVM_PAGEFAULT_MMIO       4
 #define NESTEDHVM_PAGEFAULT_RETRY      5
+#define NESTEDHVM_PAGEFAULT_DIRECT_MMIO 6
 int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Sun Jan 19 06:33:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33: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 1W4lwm-00086I-Fo; Sun, 19 Jan 2014 06:33: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 1W4lwk-00086A-VB
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:27 +0000
Received: from [193.109.254.147:23443] by server-5.bemta-14.messagelabs.com id
	EF/AE-03510-6B17BD25; Sun, 19 Jan 2014 06:33:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390113204!11698506!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18629 invoked from network); 19 Jan 2014 06:33:25 -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;
	19 Jan 2014 06:33: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 1W4lwi-0006lc-AN
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwi-00053a-5S
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:24 +0000
Date: Sun, 19 Jan 2014 06:33:24 +0000
Message-Id: <E1W4lwi-00053a-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: remove Linux sections
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 58f5bcaf05621810f06bf5b3592e2ae87475053d
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Fri Jan 17 16:02:00 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:02:00 2014 +0100

    MAINTAINERS: remove Linux sections
    
    The LINUX (PV_OPS) section was out-dated and it's better to only have
    this information in one place (Tte Linux MAINTAINERS file).
    
    The LINUX (XCP) section was an external project that that hasn't been
    maintained for years.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 MAINTAINERS |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4d9648f..7757cdd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -209,16 +209,6 @@ F:      xen/include/{kexec,kimage}.h
 F:      xen/arch/x86/machine_kexec.c
 F:      xen/arch/x86/x86_64/kexec_reloc.S
 
-LINUX (PV_OPS)
-M:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
-
-LINUX (XCP)
-M:	Ian Campbell <ian.campbell@citrix.com>
-S:	Supported
-T:	hg http://xenbits.xen.org/XCP/linux-2.6.*.pq.hg
-
 MACHINE CHECK (MCA) & RAS
 M:	Christoph Egger <chegger@amazon.de>
 M:	Liu Jinsong <jinsong.liu@intel.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 Sun Jan 19 06:33:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 19 Jan 2014 06:33: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 1W4lwm-00086I-Fo; Sun, 19 Jan 2014 06:33: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 1W4lwk-00086A-VB
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:27 +0000
Received: from [193.109.254.147:23443] by server-5.bemta-14.messagelabs.com id
	EF/AE-03510-6B17BD25; Sun, 19 Jan 2014 06:33:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390113204!11698506!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18629 invoked from network); 19 Jan 2014 06:33:25 -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;
	19 Jan 2014 06:33: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 1W4lwi-0006lc-AN
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W4lwi-00053a-5S
	for xen-changelog@lists.xensource.com; Sun, 19 Jan 2014 06:33:24 +0000
Date: Sun, 19 Jan 2014 06:33:24 +0000
Message-Id: <E1W4lwi-00053a-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: remove Linux sections
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 58f5bcaf05621810f06bf5b3592e2ae87475053d
Author:     David Vrabel <david.vrabel@citrix.com>
AuthorDate: Fri Jan 17 16:02:00 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 17 16:02:00 2014 +0100

    MAINTAINERS: remove Linux sections
    
    The LINUX (PV_OPS) section was out-dated and it's better to only have
    this information in one place (Tte Linux MAINTAINERS file).
    
    The LINUX (XCP) section was an external project that that hasn't been
    maintained for years.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 MAINTAINERS |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4d9648f..7757cdd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -209,16 +209,6 @@ F:      xen/include/{kexec,kimage}.h
 F:      xen/arch/x86/machine_kexec.c
 F:      xen/arch/x86/x86_64/kexec_reloc.S
 
-LINUX (PV_OPS)
-M:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
-
-LINUX (XCP)
-M:	Ian Campbell <ian.campbell@citrix.com>
-S:	Supported
-T:	hg http://xenbits.xen.org/XCP/linux-2.6.*.pq.hg
-
 MACHINE CHECK (MCA) & RAS
 M:	Christoph Egger <chegger@amazon.de>
 M:	Liu Jinsong <jinsong.liu@intel.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 Mon Jan 20 09:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5Asu-0002CZ-8C; Mon, 20 Jan 2014 09:11:08 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Ass-0002CK-JO
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:06 +0000
Received: from [85.158.137.68:36312] by server-11.bemta-3.messagelabs.com id
	AA/AE-19379-928ECD25; Mon, 20 Jan 2014 09:11:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-31.messagelabs.com!1390209064!6453718!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4755 invoked from network); 20 Jan 2014 09:11:05 -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;
	20 Jan 2014 09:11:05 -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 1W5Asp-00072C-PR
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Asp-0007pn-Ga
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Message-Id: <E1W5Asp-0007pn-Ga@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:11:03 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] x86/time: fix wc_version retry
	check
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390208471 -3600
# Node ID ca683fddd28a1878b1bea536eb99f3d2ddee7020
# Parent  777c424881e19f8f0c3106fd795873c536d93798
x86/time: fix wc_version retry check

When using | instead of || (attempting to make the compiler issue just
a single branch), both sides of the operator aren't separated by a
sequence point, and hence evaluation can happen in any order. In
particular the rightmost read of s->wc_version could get carried out
before the leftmost one. Use a local variable to prevent this. (In
reality the compiler is very likely to do only a single memory read
here anyway.)

Reported-by: Julian Stecklina <jsteckli@os.inf.tu-dresden.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 777c424881e1 -r ca683fddd28a arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c	Fri Dec 20 16:37:05 2013 +0100
+++ b/arch/i386/kernel/time-xen.c	Mon Jan 20 10:01:11 2014 +0100
@@ -257,6 +257,7 @@ static void __update_wallclock(time_t se
 static void update_wallclock(void)
 {
 	shared_info_t *s = HYPERVISOR_shared_info;
+	u32 version;
 
 	do {
 		shadow_tv_version = s->wc_version;
@@ -264,7 +265,8 @@ static void update_wallclock(void)
 		shadow_tv.tv_sec  = s->wc_sec;
 		shadow_tv.tv_nsec = s->wc_nsec;
 		rmb();
-	} while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
+		version = s->wc_version;
+	} while ((version & 1) | (shadow_tv_version ^ version));
 
 	if (!independent_wallclock)
 		__update_wallclock(shadow_tv.tv_sec, shadow_tv.tv_nsec);

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

From xen-changelog-bounces@lists.xen.org Mon Jan 20 09:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5Asu-0002Ce-AZ; Mon, 20 Jan 2014 09:11:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Ast-0002CM-Ct
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:07 +0000
Received: from [193.109.254.147:7895] by server-2.bemta-14.messagelabs.com id
	0E/E6-00361-A28ECD25; Mon, 20 Jan 2014 09:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1390209064!11923848!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26785 invoked from network); 20 Jan 2014 09:11:05 -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;
	20 Jan 2014 09:11:05 -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 1W5Asq-00072F-2L
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Asp-0007q5-U6
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Message-Id: <E1W5Asp-0007q5-U6@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:11: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] drivers: prefer xenbus_write()
	over xenbus_printf() where possible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390208636 -3600
# Node ID 9aa376723f25b5f022bc01bb36ae2197ee75d334
# Parent  ca683fddd28a1878b1bea536eb99f3d2ddee7020
drivers: prefer xenbus_write() over xenbus_printf() where possible

... as being the simpler variant.

This includes an inversion of netfront's HAVE_CSUM_OFFLOAD, in order to
be able to directly use __stringify() on it.

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


diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/blkfront/blkfront.c	Mon Jan 20 10:03:56 2014 +0100
@@ -187,8 +187,8 @@ again:
 		message = "writing event-channel";
 		goto abort_transaction;
 	}
-	err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
-			    XEN_IO_PROTO_ABI_NATIVE);
+	err = xenbus_write(xbt, dev->nodename, "protocol",
+			   XEN_IO_PROTO_ABI_NATIVE);
 	if (err) {
 		message = "writing protocol";
 		goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/fbfront/xenfb.c	Mon Jan 20 10:03:56 2014 +0100
@@ -760,11 +760,11 @@ static int xenfb_connect_backend(struct 
 			    irq_to_evtchn_port(irq));
 	if (ret)
 		goto error_xenbus;
-	ret = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
-			    XEN_IO_PROTO_ABI_NATIVE);
+	ret = xenbus_write(xbt, dev->nodename, "protocol",
+			   XEN_IO_PROTO_ABI_NATIVE);
 	if (ret)
 		goto error_xenbus;
-	ret = xenbus_printf(xbt, dev->nodename, "feature-update", "1");
+	ret = xenbus_write(xbt, dev->nodename, "feature-update", "1");
 	if (ret)
 		goto error_xenbus;
 	ret = xenbus_transaction_end(xbt, 0);
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/fbfront/xenkbd.c	Mon Jan 20 10:03:56 2014 +0100
@@ -126,7 +126,7 @@ int __devinit xenkbd_probe(struct xenbus
 	if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-abs-pointer", "%d", &abs) < 0)
 		abs = 0;
 	if (abs)
-		xenbus_printf(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
+		xenbus_write(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
 
 	/* keyboard */
 	kbd = input_allocate_device();
@@ -294,8 +294,8 @@ static void xenkbd_backend_changed(struc
 		if (ret < 0)
 			val = 0;
 		if (val) {
-			ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
-					    "request-abs-pointer", "1");
+			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
+					   "request-abs-pointer", "1");
 			if (ret)
 				; /* FIXME */
 		}
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/netback/xenbus.c
--- a/drivers/xen/netback/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/netback/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -107,8 +107,7 @@ static int netback_probe(struct xenbus_d
 		}
 
 		/* We support rx-copy path. */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-copy", "%d", 1);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-copy", "1");
 		if (err) {
 			message = "writing feature-rx-copy";
 			goto abort_transaction;
@@ -118,8 +117,7 @@ static int netback_probe(struct xenbus_d
 		 * We don't support rx-flip path (except old guests who don't
 		 * grok this feature flag).
 		 */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-flip", "%d", 0);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-flip", "0");
 		if (err) {
 			message = "writing feature-rx-flip";
 			goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/netfront/netfront.c	Mon Jan 20 10:03:56 2014 +0100
@@ -37,6 +37,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/stringify.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
@@ -100,7 +101,7 @@ static const int MODPARM_rx_flip = 0;
 #if defined(NETIF_F_GSO)
 #define HAVE_GSO			1
 #define HAVE_TSO			1 /* TSO is a subset of GSO */
-#define HAVE_CSUM_OFFLOAD		1
+#define NO_CSUM_OFFLOAD			0
 static inline void dev_disable_gso_features(struct net_device *dev)
 {
 	/* Turn off all GSO bits except ROBUST. */
@@ -116,7 +117,7 @@ static inline void dev_disable_gso_featu
  * with the presence of NETIF_F_TSO but it appears to be a good first
  * approximiation.
  */
-#define HAVE_CSUM_OFFLOAD              0
+#define NO_CSUM_OFFLOAD			1
 
 #define gso_size tso_size
 #define gso_segs tso_segs
@@ -143,7 +144,7 @@ static inline int netif_needs_gso(struct
 #else
 #define HAVE_GSO			0
 #define HAVE_TSO			0
-#define HAVE_CSUM_OFFLOAD		0
+#define NO_CSUM_OFFLOAD			1
 #define netif_needs_gso(dev, skb)	0
 #define dev_disable_gso_features(dev)	((void)0)
 #define ethtool_op_set_tso(dev, data)	(-ENOSYS)
@@ -420,27 +421,27 @@ again:
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-rx-notify", "1");
 	if (err) {
 		message = "writing feature-rx-notify";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload",
-			    "%d", !HAVE_CSUM_OFFLOAD);
+	err = xenbus_write(xbt, dev->nodename, "feature-no-csum-offload",
+			   __stringify(NO_CSUM_OFFLOAD));
 	if (err) {
 		message = "writing feature-no-csum-offload";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-sg", "1");
 	if (err) {
 		message = "writing feature-sg";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d",
-			    HAVE_TSO);
+	err = xenbus_write(xbt, dev->nodename, "feature-gso-tcpv4",
+			   __stringify(HAVE_TSO));
 	if (err) {
 		message = "writing feature-gso-tcpv4";
 		goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/pcifront/xenbus.c
--- a/drivers/xen/pcifront/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/pcifront/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -124,8 +124,8 @@ static int pcifront_publish_info(struct 
 		err = xenbus_printf(trans, pdev->xdev->nodename,
 				    "event-channel", "%u", pdev->evtchn);
 	if (!err)
-		err = xenbus_printf(trans, pdev->xdev->nodename,
-				    "magic", XEN_PCI_MAGIC);
+		err = xenbus_write(trans, pdev->xdev->nodename, "magic",
+				   XEN_PCI_MAGIC);
 
 	if (err) {
 		xenbus_transaction_end(trans, 1);
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/tpmback/xenbus.c
--- a/drivers/xen/tpmback/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/tpmback/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -176,7 +176,6 @@ static void connect(struct backend_info 
 	struct xenbus_transaction xbt;
 	int err;
 	struct xenbus_device *dev = be->dev;
-	unsigned long ready = 1;
 
 again:
 	err = xenbus_transaction_start(&xbt);
@@ -185,8 +184,7 @@ again:
 		return;
 	}
 
-	err = xenbus_printf(xbt, be->dev->nodename,
-			    "ready", "%lu", ready);
+	err = xenbus_write(xbt, be->dev->nodename, "ready", "1");
 	if (err) {
 		xenbus_dev_fatal(be->dev, err, "writing 'ready'");
 		goto abort;

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

From xen-changelog-bounces@lists.xen.org Mon Jan 20 09:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5Asu-0002CZ-8C; Mon, 20 Jan 2014 09:11:08 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Ass-0002CK-JO
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:06 +0000
Received: from [85.158.137.68:36312] by server-11.bemta-3.messagelabs.com id
	AA/AE-19379-928ECD25; Mon, 20 Jan 2014 09:11:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-31.messagelabs.com!1390209064!6453718!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4755 invoked from network); 20 Jan 2014 09:11:05 -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;
	20 Jan 2014 09:11:05 -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 1W5Asp-00072C-PR
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Asp-0007pn-Ga
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Message-Id: <E1W5Asp-0007pn-Ga@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:11:03 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] x86/time: fix wc_version retry
	check
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390208471 -3600
# Node ID ca683fddd28a1878b1bea536eb99f3d2ddee7020
# Parent  777c424881e19f8f0c3106fd795873c536d93798
x86/time: fix wc_version retry check

When using | instead of || (attempting to make the compiler issue just
a single branch), both sides of the operator aren't separated by a
sequence point, and hence evaluation can happen in any order. In
particular the rightmost read of s->wc_version could get carried out
before the leftmost one. Use a local variable to prevent this. (In
reality the compiler is very likely to do only a single memory read
here anyway.)

Reported-by: Julian Stecklina <jsteckli@os.inf.tu-dresden.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 777c424881e1 -r ca683fddd28a arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c	Fri Dec 20 16:37:05 2013 +0100
+++ b/arch/i386/kernel/time-xen.c	Mon Jan 20 10:01:11 2014 +0100
@@ -257,6 +257,7 @@ static void __update_wallclock(time_t se
 static void update_wallclock(void)
 {
 	shared_info_t *s = HYPERVISOR_shared_info;
+	u32 version;
 
 	do {
 		shadow_tv_version = s->wc_version;
@@ -264,7 +265,8 @@ static void update_wallclock(void)
 		shadow_tv.tv_sec  = s->wc_sec;
 		shadow_tv.tv_nsec = s->wc_nsec;
 		rmb();
-	} while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
+		version = s->wc_version;
+	} while ((version & 1) | (shadow_tv_version ^ version));
 
 	if (!independent_wallclock)
 		__update_wallclock(shadow_tv.tv_sec, shadow_tv.tv_nsec);

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

From xen-changelog-bounces@lists.xen.org Mon Jan 20 09:11:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5Asu-0002Ce-AZ; Mon, 20 Jan 2014 09:11:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Ast-0002CM-Ct
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:07 +0000
Received: from [193.109.254.147:7895] by server-2.bemta-14.messagelabs.com id
	0E/E6-00361-A28ECD25; Mon, 20 Jan 2014 09:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1390209064!11923848!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26785 invoked from network); 20 Jan 2014 09:11:05 -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;
	20 Jan 2014 09:11:05 -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 1W5Asq-00072F-2L
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5Asp-0007q5-U6
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:11:03 +0000
Message-Id: <E1W5Asp-0007q5-U6@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:11: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] drivers: prefer xenbus_write()
	over xenbus_printf() where possible
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390208636 -3600
# Node ID 9aa376723f25b5f022bc01bb36ae2197ee75d334
# Parent  ca683fddd28a1878b1bea536eb99f3d2ddee7020
drivers: prefer xenbus_write() over xenbus_printf() where possible

... as being the simpler variant.

This includes an inversion of netfront's HAVE_CSUM_OFFLOAD, in order to
be able to directly use __stringify() on it.

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


diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/blkfront/blkfront.c	Mon Jan 20 10:03:56 2014 +0100
@@ -187,8 +187,8 @@ again:
 		message = "writing event-channel";
 		goto abort_transaction;
 	}
-	err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
-			    XEN_IO_PROTO_ABI_NATIVE);
+	err = xenbus_write(xbt, dev->nodename, "protocol",
+			   XEN_IO_PROTO_ABI_NATIVE);
 	if (err) {
 		message = "writing protocol";
 		goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/fbfront/xenfb.c	Mon Jan 20 10:03:56 2014 +0100
@@ -760,11 +760,11 @@ static int xenfb_connect_backend(struct 
 			    irq_to_evtchn_port(irq));
 	if (ret)
 		goto error_xenbus;
-	ret = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
-			    XEN_IO_PROTO_ABI_NATIVE);
+	ret = xenbus_write(xbt, dev->nodename, "protocol",
+			   XEN_IO_PROTO_ABI_NATIVE);
 	if (ret)
 		goto error_xenbus;
-	ret = xenbus_printf(xbt, dev->nodename, "feature-update", "1");
+	ret = xenbus_write(xbt, dev->nodename, "feature-update", "1");
 	if (ret)
 		goto error_xenbus;
 	ret = xenbus_transaction_end(xbt, 0);
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/fbfront/xenkbd.c	Mon Jan 20 10:03:56 2014 +0100
@@ -126,7 +126,7 @@ int __devinit xenkbd_probe(struct xenbus
 	if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-abs-pointer", "%d", &abs) < 0)
 		abs = 0;
 	if (abs)
-		xenbus_printf(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
+		xenbus_write(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
 
 	/* keyboard */
 	kbd = input_allocate_device();
@@ -294,8 +294,8 @@ static void xenkbd_backend_changed(struc
 		if (ret < 0)
 			val = 0;
 		if (val) {
-			ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
-					    "request-abs-pointer", "1");
+			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
+					   "request-abs-pointer", "1");
 			if (ret)
 				; /* FIXME */
 		}
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/netback/xenbus.c
--- a/drivers/xen/netback/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/netback/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -107,8 +107,7 @@ static int netback_probe(struct xenbus_d
 		}
 
 		/* We support rx-copy path. */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-copy", "%d", 1);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-copy", "1");
 		if (err) {
 			message = "writing feature-rx-copy";
 			goto abort_transaction;
@@ -118,8 +117,7 @@ static int netback_probe(struct xenbus_d
 		 * We don't support rx-flip path (except old guests who don't
 		 * grok this feature flag).
 		 */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-flip", "%d", 0);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-flip", "0");
 		if (err) {
 			message = "writing feature-rx-flip";
 			goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/netfront/netfront.c	Mon Jan 20 10:03:56 2014 +0100
@@ -37,6 +37,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/stringify.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
@@ -100,7 +101,7 @@ static const int MODPARM_rx_flip = 0;
 #if defined(NETIF_F_GSO)
 #define HAVE_GSO			1
 #define HAVE_TSO			1 /* TSO is a subset of GSO */
-#define HAVE_CSUM_OFFLOAD		1
+#define NO_CSUM_OFFLOAD			0
 static inline void dev_disable_gso_features(struct net_device *dev)
 {
 	/* Turn off all GSO bits except ROBUST. */
@@ -116,7 +117,7 @@ static inline void dev_disable_gso_featu
  * with the presence of NETIF_F_TSO but it appears to be a good first
  * approximiation.
  */
-#define HAVE_CSUM_OFFLOAD              0
+#define NO_CSUM_OFFLOAD			1
 
 #define gso_size tso_size
 #define gso_segs tso_segs
@@ -143,7 +144,7 @@ static inline int netif_needs_gso(struct
 #else
 #define HAVE_GSO			0
 #define HAVE_TSO			0
-#define HAVE_CSUM_OFFLOAD		0
+#define NO_CSUM_OFFLOAD			1
 #define netif_needs_gso(dev, skb)	0
 #define dev_disable_gso_features(dev)	((void)0)
 #define ethtool_op_set_tso(dev, data)	(-ENOSYS)
@@ -420,27 +421,27 @@ again:
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-rx-notify", "1");
 	if (err) {
 		message = "writing feature-rx-notify";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload",
-			    "%d", !HAVE_CSUM_OFFLOAD);
+	err = xenbus_write(xbt, dev->nodename, "feature-no-csum-offload",
+			   __stringify(NO_CSUM_OFFLOAD));
 	if (err) {
 		message = "writing feature-no-csum-offload";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-sg", "1");
 	if (err) {
 		message = "writing feature-sg";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d",
-			    HAVE_TSO);
+	err = xenbus_write(xbt, dev->nodename, "feature-gso-tcpv4",
+			   __stringify(HAVE_TSO));
 	if (err) {
 		message = "writing feature-gso-tcpv4";
 		goto abort_transaction;
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/pcifront/xenbus.c
--- a/drivers/xen/pcifront/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/pcifront/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -124,8 +124,8 @@ static int pcifront_publish_info(struct 
 		err = xenbus_printf(trans, pdev->xdev->nodename,
 				    "event-channel", "%u", pdev->evtchn);
 	if (!err)
-		err = xenbus_printf(trans, pdev->xdev->nodename,
-				    "magic", XEN_PCI_MAGIC);
+		err = xenbus_write(trans, pdev->xdev->nodename, "magic",
+				   XEN_PCI_MAGIC);
 
 	if (err) {
 		xenbus_transaction_end(trans, 1);
diff -r ca683fddd28a -r 9aa376723f25 drivers/xen/tpmback/xenbus.c
--- a/drivers/xen/tpmback/xenbus.c	Mon Jan 20 10:01:11 2014 +0100
+++ b/drivers/xen/tpmback/xenbus.c	Mon Jan 20 10:03:56 2014 +0100
@@ -176,7 +176,6 @@ static void connect(struct backend_info 
 	struct xenbus_transaction xbt;
 	int err;
 	struct xenbus_device *dev = be->dev;
-	unsigned long ready = 1;
 
 again:
 	err = xenbus_transaction_start(&xbt);
@@ -185,8 +184,7 @@ again:
 		return;
 	}
 
-	err = xenbus_printf(xbt, be->dev->nodename,
-			    "ready", "%lu", ready);
+	err = xenbus_write(xbt, be->dev->nodename, "ready", "1");
 	if (err) {
 		xenbus_dev_fatal(be->dev, err, "writing 'ready'");
 		goto abort;

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

From xen-changelog-bounces@lists.xen.org Mon Jan 20 09:55:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:55: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 1W5BZT-0004wm-If; Mon, 20 Jan 2014 09:55:07 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5BZR-0004wh-PK
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:05 +0000
Received: from [85.158.137.68:22527] by server-11.bemta-3.messagelabs.com id
	60/4B-19379-972FCD25; Mon, 20 Jan 2014 09:55:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-31.messagelabs.com!1390211703!10101338!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20570 invoked from network); 20 Jan 2014 09:55:04 -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;
	20 Jan 2014 09:55:04 -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 1W5BZP-0007Ur-1z
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5BZO-0000c4-Rt
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:02 +0000
Message-Id: <E1W5BZO-0000c4-Rt@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:55:02 +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] balloon: don't crash in
	HVM-with-PoD guests
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390211059 -3600
# Node ID 6ea18f7269166802f9c03c4bf48e362e89dfdad5
# Parent  9aa376723f25b5f022bc01bb36ae2197ee75d334
balloon: don't crash in HVM-with-PoD guests

989:a7781c0a3b9a ("xen/balloon: fix balloon driver accounting for
HVM-with-PoD case") was almost entirely broken - the BUG_ON() there
triggers as soon as there's any meaningful amount of excess memory.

Re-implement the logic assuming that XENMEM_get_pod_target will at some
point be allowed for a domain to query on itself. Basing the
calculation on just num_physpages results in significantly too much
memory getting balloned out when there's memory beyond the 4G boundary.

Using what recent upstream's get_num_physpages() returns is not an
alternative because that value is too small (even if not as small as
totalram_pages), resulting in not enough pages getting ballooned out.

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


diff -r 9aa376723f25 -r 6ea18f726916 drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c	Mon Jan 20 10:03:56 2014 +0100
+++ b/drivers/xen/balloon/balloon.c	Mon Jan 20 10:44:19 2014 +0100
@@ -537,17 +537,11 @@ static int __init balloon_init(void)
 	 * extent of 1. When start_extent > nr_extents (>= in newer Xen), we
 	 * simply get start_extent returned.
 	 */
-	totalram_bias = HYPERVISOR_memory_op(rc != -ENOSYS && rc != 1
-		? XENMEM_maximum_reservation : XENMEM_current_reservation,
-		&pod_target.domid);
-	if ((long)totalram_bias != -ENOSYS) {
-		BUG_ON(totalram_bias < totalram_pages);
-		bs.current_pages = totalram_bias;
-		totalram_bias -= totalram_pages;
-	} else {
-		totalram_bias = 0;
-		bs.current_pages = totalram_pages;
-	}
+	bs.current_pages = pod_target.tot_pages + pod_target.pod_entries
+			   - pod_target.pod_cache_pages;
+	if (rc || bs.current_pages > num_physpages)
+		bs.current_pages = num_physpages;
+	totalram_bias = bs.current_pages - totalram_pages;
 #endif
 	bs.target_pages  = bs.current_pages;
 	bs.balloon_low   = 0;

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

From xen-changelog-bounces@lists.xen.org Mon Jan 20 09:55:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Jan 2014 09:55: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 1W5BZT-0004wm-If; Mon, 20 Jan 2014 09:55:07 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5BZR-0004wh-PK
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:05 +0000
Received: from [85.158.137.68:22527] by server-11.bemta-3.messagelabs.com id
	60/4B-19379-972FCD25; Mon, 20 Jan 2014 09:55:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-31.messagelabs.com!1390211703!10101338!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20570 invoked from network); 20 Jan 2014 09:55:04 -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;
	20 Jan 2014 09:55:04 -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 1W5BZP-0007Ur-1z
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W5BZO-0000c4-Rt
	for xen-changelog@lists.xensource.com; Mon, 20 Jan 2014 09:55:02 +0000
Message-Id: <E1W5BZO-0000c4-Rt@xenbits.xen.org>
Date: Mon, 20 Jan 2014 09:55:02 +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] balloon: don't crash in
	HVM-with-PoD guests
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390211059 -3600
# Node ID 6ea18f7269166802f9c03c4bf48e362e89dfdad5
# Parent  9aa376723f25b5f022bc01bb36ae2197ee75d334
balloon: don't crash in HVM-with-PoD guests

989:a7781c0a3b9a ("xen/balloon: fix balloon driver accounting for
HVM-with-PoD case") was almost entirely broken - the BUG_ON() there
triggers as soon as there's any meaningful amount of excess memory.

Re-implement the logic assuming that XENMEM_get_pod_target will at some
point be allowed for a domain to query on itself. Basing the
calculation on just num_physpages results in significantly too much
memory getting balloned out when there's memory beyond the 4G boundary.

Using what recent upstream's get_num_physpages() returns is not an
alternative because that value is too small (even if not as small as
totalram_pages), resulting in not enough pages getting ballooned out.

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


diff -r 9aa376723f25 -r 6ea18f726916 drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c	Mon Jan 20 10:03:56 2014 +0100
+++ b/drivers/xen/balloon/balloon.c	Mon Jan 20 10:44:19 2014 +0100
@@ -537,17 +537,11 @@ static int __init balloon_init(void)
 	 * extent of 1. When start_extent > nr_extents (>= in newer Xen), we
 	 * simply get start_extent returned.
 	 */
-	totalram_bias = HYPERVISOR_memory_op(rc != -ENOSYS && rc != 1
-		? XENMEM_maximum_reservation : XENMEM_current_reservation,
-		&pod_target.domid);
-	if ((long)totalram_bias != -ENOSYS) {
-		BUG_ON(totalram_bias < totalram_pages);
-		bs.current_pages = totalram_bias;
-		totalram_bias -= totalram_pages;
-	} else {
-		totalram_bias = 0;
-		bs.current_pages = totalram_pages;
-	}
+	bs.current_pages = pod_target.tot_pages + pod_target.pod_entries
+			   - pod_target.pod_cache_pages;
+	if (rc || bs.current_pages > num_physpages)
+		bs.current_pages = num_physpages;
+	totalram_bias = bs.current_pages - totalram_pages;
 #endif
 	bs.target_pages  = bs.current_pages;
 	bs.balloon_low   = 0;

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

From xen-changelog-bounces@lists.xen.org Tue Jan 21 22:44:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22:44:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5k3D-0005ka-Ef; Tue, 21 Jan 2014 22:44: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 1W5k3C-0005kV-CU
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:06 +0000
Received: from [85.158.143.35:48830] by server-2.bemta-4.messagelabs.com id
	7B/29-11386-538FED25; Tue, 21 Jan 2014 22:44:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390344244!1347400!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8519 invoked from network); 21 Jan 2014 22:44:05 -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;
	21 Jan 2014 22: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 1W5k39-00065m-JA
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k39-0005jp-6P
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:03 +0000
Date: Tue, 21 Jan 2014 22:44:03 +0000
Message-Id: <E1W5k39-0005jp-6P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/sysctl: Don't leak status in
	SYSCTL_page_offline_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 efd8ff0a04740a698b2b8b2b9adccd639e0fa6c9
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 20 09:48:11 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:48:11 2014 +0100

    common/sysctl: Don't leak status in SYSCTL_page_offline_op
    
    In addition, 'copyback' should be cleared even in the error case.
    
    Also fix the indentation of the arguments to copy_to_guest() to help clarify
    that the 'ret = -EFAULT' is not part of the condition.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/sysctl.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 117e095..0cb6ee1 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -230,12 +230,9 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         }
 
         if ( copy_to_guest(
-            op->u.page_offline.status, status,
-            op->u.page_offline.end - op->u.page_offline.start + 1) )
-        {
+                 op->u.page_offline.status, status,
+                 op->u.page_offline.end - op->u.page_offline.start + 1) )
             ret = -EFAULT;
-            break;
-        }
 
         xfree(status);
         copyback = 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 Tue Jan 21 22:44:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22:44:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W5k3D-0005ka-Ef; Tue, 21 Jan 2014 22:44: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 1W5k3C-0005kV-CU
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:06 +0000
Received: from [85.158.143.35:48830] by server-2.bemta-4.messagelabs.com id
	7B/29-11386-538FED25; Tue, 21 Jan 2014 22:44:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390344244!1347400!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8519 invoked from network); 21 Jan 2014 22:44:05 -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;
	21 Jan 2014 22: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 1W5k39-00065m-JA
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k39-0005jp-6P
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:03 +0000
Date: Tue, 21 Jan 2014 22:44:03 +0000
Message-Id: <E1W5k39-0005jp-6P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/sysctl: Don't leak status in
	SYSCTL_page_offline_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 efd8ff0a04740a698b2b8b2b9adccd639e0fa6c9
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 20 09:48:11 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:48:11 2014 +0100

    common/sysctl: Don't leak status in SYSCTL_page_offline_op
    
    In addition, 'copyback' should be cleared even in the error case.
    
    Also fix the indentation of the arguments to copy_to_guest() to help clarify
    that the 'ret = -EFAULT' is not part of the condition.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/sysctl.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 117e095..0cb6ee1 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -230,12 +230,9 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         }
 
         if ( copy_to_guest(
-            op->u.page_offline.status, status,
-            op->u.page_offline.end - op->u.page_offline.start + 1) )
-        {
+                 op->u.page_offline.status, status,
+                 op->u.page_offline.end - op->u.page_offline.start + 1) )
             ret = -EFAULT;
-            break;
-        }
 
         xfree(status);
         copyback = 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 Tue Jan 21 22:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22: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 1W5k3O-0005lA-HV; Tue, 21 Jan 2014 22:44: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 1W5k3N-0005l2-8j
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:17 +0000
Received: from [85.158.137.68:57665] by server-4.bemta-3.messagelabs.com id
	36/A7-10414-048FED25; Tue, 21 Jan 2014 22:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1390344254!10485060!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17890 invoked from network); 21 Jan 2014 22:44:15 -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;
	21 Jan 2014 22: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 1W5k3K-00065p-00
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k3J-0005kD-Mu
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:13 +0000
Date: Tue, 21 Jan 2014 22:44:13 +0000
Message-Id: <E1W5k3J-0005kD-Mu@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/memory: Fix ABI breakage for
	XENMEM_add_to_physmap
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ebc168f238ab7a729c45032c9663b14844f34656
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 20 09:49:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:49:20 2014 +0100

    common/memory: Fix ABI breakage for XENMEM_add_to_physmap
    
    caused by c/s 4be86bb194e25e46b6cbee900601bfee76e8090a
    
    In public/memory.h, struct xen_add_to_physmap has 'space' as an unsigned int,
    but struct xen_add_to_physmap_batch has 'space' as a uint16_t.
    
    By defining xenmem_add_to_physmap_one() with space defined as uint16_t, the
    now-common xenmem_add_to_physmap() implicitly truncates xatp->space from
    unsigned int to uint16_t, which changes the space switch()'d upon.
    
    This wouldn't be noticed with any upstream code (of which I am aware), but was
    discovered because of the XenServer support for legacy Windows PV drivers,
    which make XENMEM_add_to_physmap hypercalls using spaces with the top bit set.
    The current Windows PV drivers don't do this any more, but we 'fix' Xen to
    support running VMs with out-of-date tools.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Release-Ack: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/mm.c    |    2 +-
 xen/arch/x86/mm.c    |    2 +-
 xen/include/xen/mm.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 293b6e2..127cce0 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -970,7 +970,7 @@ void share_xen_page_with_privileged_guests(
 
 int xenmem_add_to_physmap_one(
     struct domain *d,
-    uint16_t space,
+    unsigned int space,
     domid_t foreign_domid,
     unsigned long idx,
     xen_pfn_t gpfn)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 32c0473..172c68c 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4522,7 +4522,7 @@ static int handle_iomem_range(unsigned long s, unsigned long e, void *p)
 
 int xenmem_add_to_physmap_one(
     struct domain *d,
-    uint16_t space,
+    unsigned int space,
     domid_t foreign_domid,
     unsigned long idx,
     xen_pfn_t gpfn)
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index f90ed74..b183189 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -356,7 +356,7 @@ static inline unsigned int get_order_from_pages(unsigned long nr_pages)
 
 void scrub_one_page(struct page_info *);
 
-int xenmem_add_to_physmap_one(struct domain *d, uint16_t space,
+int xenmem_add_to_physmap_one(struct domain *d, unsigned int space,
                               domid_t foreign_domid,
                               unsigned long idx, xen_pfn_t gpfn);
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 21 22:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22: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 1W5k3O-0005lA-HV; Tue, 21 Jan 2014 22:44: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 1W5k3N-0005l2-8j
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:17 +0000
Received: from [85.158.137.68:57665] by server-4.bemta-3.messagelabs.com id
	36/A7-10414-048FED25; Tue, 21 Jan 2014 22:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1390344254!10485060!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17890 invoked from network); 21 Jan 2014 22:44:15 -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;
	21 Jan 2014 22: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 1W5k3K-00065p-00
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k3J-0005kD-Mu
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:13 +0000
Date: Tue, 21 Jan 2014 22:44:13 +0000
Message-Id: <E1W5k3J-0005kD-Mu@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/memory: Fix ABI breakage for
	XENMEM_add_to_physmap
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ebc168f238ab7a729c45032c9663b14844f34656
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 20 09:49:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:49:20 2014 +0100

    common/memory: Fix ABI breakage for XENMEM_add_to_physmap
    
    caused by c/s 4be86bb194e25e46b6cbee900601bfee76e8090a
    
    In public/memory.h, struct xen_add_to_physmap has 'space' as an unsigned int,
    but struct xen_add_to_physmap_batch has 'space' as a uint16_t.
    
    By defining xenmem_add_to_physmap_one() with space defined as uint16_t, the
    now-common xenmem_add_to_physmap() implicitly truncates xatp->space from
    unsigned int to uint16_t, which changes the space switch()'d upon.
    
    This wouldn't be noticed with any upstream code (of which I am aware), but was
    discovered because of the XenServer support for legacy Windows PV drivers,
    which make XENMEM_add_to_physmap hypercalls using spaces with the top bit set.
    The current Windows PV drivers don't do this any more, but we 'fix' Xen to
    support running VMs with out-of-date tools.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Release-Ack: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/mm.c    |    2 +-
 xen/arch/x86/mm.c    |    2 +-
 xen/include/xen/mm.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 293b6e2..127cce0 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -970,7 +970,7 @@ void share_xen_page_with_privileged_guests(
 
 int xenmem_add_to_physmap_one(
     struct domain *d,
-    uint16_t space,
+    unsigned int space,
     domid_t foreign_domid,
     unsigned long idx,
     xen_pfn_t gpfn)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 32c0473..172c68c 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4522,7 +4522,7 @@ static int handle_iomem_range(unsigned long s, unsigned long e, void *p)
 
 int xenmem_add_to_physmap_one(
     struct domain *d,
-    uint16_t space,
+    unsigned int space,
     domid_t foreign_domid,
     unsigned long idx,
     xen_pfn_t gpfn)
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index f90ed74..b183189 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -356,7 +356,7 @@ static inline unsigned int get_order_from_pages(unsigned long nr_pages)
 
 void scrub_one_page(struct page_info *);
 
-int xenmem_add_to_physmap_one(struct domain *d, uint16_t space,
+int xenmem_add_to_physmap_one(struct domain *d, unsigned int space,
                               domid_t foreign_domid,
                               unsigned long idx, xen_pfn_t gpfn);
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 21 22:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22: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 1W5k3Y-0005mF-KO; Tue, 21 Jan 2014 22:44: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 1W5k3X-0005m5-7I
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:27 +0000
Received: from [85.158.139.211:43884] by server-12.bemta-5.messagelabs.com id
	B6/43-30017-A48FED25; Tue, 21 Jan 2014 22:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1390344264!11136108!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9781 invoked from network); 21 Jan 2014 22:44:25 -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;
	21 Jan 2014 22: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 1W5k3U-00065y-5m
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k3U-0005kZ-2Z
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:24 +0000
Date: Tue, 21 Jan 2014 22:44:24 +0000
Message-Id: <E1W5k3U-0005kZ-2Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] compat/memory: fix build with old gcc
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 407a3c00ffe9b283b2bd7e3ae6aa86a54d51ed92
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 20 09:50:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:50:20 2014 +0100

    compat/memory: fix build with old gcc
    
    struct xen_add_to_physmap_batch's size field being uint16_t causes old
    compiler versions to warn about the pointless range check done inside
    compat_handle_okay().
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/compat/memory.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 4fae02a..daa2e04 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -206,18 +206,20 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
         {
             unsigned int limit = (COMPAT_ARG_XLAT_SIZE - sizeof(*nat.atpb))
                                  / (sizeof(nat.atpb->idxs.p) + sizeof(nat.atpb->gpfns.p));
+            /* Use an intermediate variable to suppress warnings on old gcc: */
+            unsigned int size = cmp.atpb.size;
             xen_ulong_t *idxs = (void *)(nat.atpb + 1);
             xen_pfn_t *gpfns = (void *)(idxs + limit);
 
             if ( copy_from_guest(&cmp.atpb, compat, 1) ||
-                 !compat_handle_okay(cmp.atpb.idxs, cmp.atpb.size) ||
-                 !compat_handle_okay(cmp.atpb.gpfns, cmp.atpb.size) ||
-                 !compat_handle_okay(cmp.atpb.errs, cmp.atpb.size) )
+                 !compat_handle_okay(cmp.atpb.idxs, size) ||
+                 !compat_handle_okay(cmp.atpb.gpfns, size) ||
+                 !compat_handle_okay(cmp.atpb.errs, size) )
                 return -EFAULT;
 
             end_extent = start_extent + limit;
-            if ( end_extent > cmp.atpb.size )
-                end_extent = cmp.atpb.size;
+            if ( end_extent > size )
+                end_extent = size;
 
             idxs -= start_extent;
             gpfns -= start_extent;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 21 22:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 21 Jan 2014 22: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 1W5k3Y-0005mF-KO; Tue, 21 Jan 2014 22:44: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 1W5k3X-0005m5-7I
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:27 +0000
Received: from [85.158.139.211:43884] by server-12.bemta-5.messagelabs.com id
	B6/43-30017-A48FED25; Tue, 21 Jan 2014 22:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1390344264!11136108!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9781 invoked from network); 21 Jan 2014 22:44:25 -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;
	21 Jan 2014 22: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 1W5k3U-00065y-5m
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W5k3U-0005kZ-2Z
	for xen-changelog@lists.xensource.com; Tue, 21 Jan 2014 22:44:24 +0000
Date: Tue, 21 Jan 2014 22:44:24 +0000
Message-Id: <E1W5k3U-0005kZ-2Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] compat/memory: fix build with old gcc
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 407a3c00ffe9b283b2bd7e3ae6aa86a54d51ed92
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 20 09:50:20 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 20 09:50:20 2014 +0100

    compat/memory: fix build with old gcc
    
    struct xen_add_to_physmap_batch's size field being uint16_t causes old
    compiler versions to warn about the pointless range check done inside
    compat_handle_okay().
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/compat/memory.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 4fae02a..daa2e04 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -206,18 +206,20 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
         {
             unsigned int limit = (COMPAT_ARG_XLAT_SIZE - sizeof(*nat.atpb))
                                  / (sizeof(nat.atpb->idxs.p) + sizeof(nat.atpb->gpfns.p));
+            /* Use an intermediate variable to suppress warnings on old gcc: */
+            unsigned int size = cmp.atpb.size;
             xen_ulong_t *idxs = (void *)(nat.atpb + 1);
             xen_pfn_t *gpfns = (void *)(idxs + limit);
 
             if ( copy_from_guest(&cmp.atpb, compat, 1) ||
-                 !compat_handle_okay(cmp.atpb.idxs, cmp.atpb.size) ||
-                 !compat_handle_okay(cmp.atpb.gpfns, cmp.atpb.size) ||
-                 !compat_handle_okay(cmp.atpb.errs, cmp.atpb.size) )
+                 !compat_handle_okay(cmp.atpb.idxs, size) ||
+                 !compat_handle_okay(cmp.atpb.gpfns, size) ||
+                 !compat_handle_okay(cmp.atpb.errs, size) )
                 return -EFAULT;
 
             end_extent = start_extent + limit;
-            if ( end_extent > cmp.atpb.size )
-                end_extent = cmp.atpb.size;
+            if ( end_extent > size )
+                end_extent = size;
 
             idxs -= start_extent;
             gpfns -= start_extent;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 23 18:11:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11: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 1W6Ok8-00018P-N9; Thu, 23 Jan 2014 18:11: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 1W6Ok6-00018H-Gn
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:06 +0000
Received: from [85.158.143.35:11657] by server-1.bemta-4.messagelabs.com id
	F0/58-02132-93B51E25; Thu, 23 Jan 2014 18:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390500664!391208!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26212 invoked from network); 23 Jan 2014 18:11: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;
	23 Jan 2014 18: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 1W6Ok4-0000Dm-66
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6Ok3-00081L-Qp
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:03 +0000
Date: Thu, 23 Jan 2014 18:11:03 +0000
Message-Id: <E1W6Ok3-00081L-Qp@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Nested VMX: prohibit virtual
	vmentry/vmexit during IO emulation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 09bb434748af9bfe3f7fca4b6eef721a7d5042a4
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Thu Jan 23 10:27:34 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:27:34 2014 +0100

    Nested VMX: prohibit virtual vmentry/vmexit during IO emulation
    
    Sometimes, L0 needs to decode L2's instruction to handle IO access directly.
    And L0 may get X86EMUL_RETRY when handling this IO request. At same time, if
    there is a virtual vmexit pending (for example, an interrupt pending to inject
    to L1) and hypervisor will switch the VCPU context from L2 to L1. Now we
    already are in L1's context, but since we got a X86EMUL_RETRY just now and
    this means hypervisor will retry to handle the IO request later and
    unfortunately, the retry will happen in L1's context. And it will cause the
    problem. The fixing is that if there is a pending IO request, no virtual
    vmexit/vmentry is allowed.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
---
 xen/arch/x86/hvm/vmx/vvmx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 41db52b..d2ba435 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1396,6 +1396,13 @@ void nvmx_switch_guest(void)
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
     /*
+     * a pending IO emualtion may still no finished. In this case,
+     * no virtual vmswith is allowed. Or else, the following IO
+     * emulation will handled in a wrong VCPU context.
+     */
+    if ( get_ioreq(v)->state != STATE_IOREQ_NONE )
+        return;
+    /*
      * a softirq may interrupt us between a virtual vmentry is
      * just handled and the true vmentry. If during this window,
      * a L1 virtual interrupt causes another virtual vmexit, we
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 23 18:11:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11: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 1W6Ok8-00018P-N9; Thu, 23 Jan 2014 18:11: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 1W6Ok6-00018H-Gn
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:06 +0000
Received: from [85.158.143.35:11657] by server-1.bemta-4.messagelabs.com id
	F0/58-02132-93B51E25; Thu, 23 Jan 2014 18:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390500664!391208!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26212 invoked from network); 23 Jan 2014 18:11: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;
	23 Jan 2014 18: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 1W6Ok4-0000Dm-66
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6Ok3-00081L-Qp
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:03 +0000
Date: Thu, 23 Jan 2014 18:11:03 +0000
Message-Id: <E1W6Ok3-00081L-Qp@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Nested VMX: prohibit virtual
	vmentry/vmexit during IO emulation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 09bb434748af9bfe3f7fca4b6eef721a7d5042a4
Author:     Yang Zhang <yang.z.zhang@Intel.com>
AuthorDate: Thu Jan 23 10:27:34 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:27:34 2014 +0100

    Nested VMX: prohibit virtual vmentry/vmexit during IO emulation
    
    Sometimes, L0 needs to decode L2's instruction to handle IO access directly.
    And L0 may get X86EMUL_RETRY when handling this IO request. At same time, if
    there is a virtual vmexit pending (for example, an interrupt pending to inject
    to L1) and hypervisor will switch the VCPU context from L2 to L1. Now we
    already are in L1's context, but since we got a X86EMUL_RETRY just now and
    this means hypervisor will retry to handle the IO request later and
    unfortunately, the retry will happen in L1's context. And it will cause the
    problem. The fixing is that if there is a pending IO request, no virtual
    vmexit/vmentry is allowed.
    
    Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
    Acked-by: Jun Nakajima <jun.nakajima@intel.com>
---
 xen/arch/x86/hvm/vmx/vvmx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 41db52b..d2ba435 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1396,6 +1396,13 @@ void nvmx_switch_guest(void)
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
     /*
+     * a pending IO emualtion may still no finished. In this case,
+     * no virtual vmswith is allowed. Or else, the following IO
+     * emulation will handled in a wrong VCPU context.
+     */
+    if ( get_ioreq(v)->state != STATE_IOREQ_NONE )
+        return;
+    /*
      * a softirq may interrupt us between a virtual vmentry is
      * just handled and the true vmentry. If during this window,
      * a L1 virtual interrupt causes another virtual vmexit, we
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 23 18:11:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6OkI-000191-Q2; Thu, 23 Jan 2014 18:11: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 1W6OkH-00018s-Jf
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:17 +0000
Received: from [85.158.137.68:30020] by server-11.bemta-3.messagelabs.com id
	31/A3-19379-44B51E25; Thu, 23 Jan 2014 18:11:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390500675!10158791!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9270 invoked from network); 23 Jan 2014 18:11:16 -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;
	23 Jan 2014 18:11: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 1W6OkE-0000Dp-Rv
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6OkE-00081s-BM
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:14 +0000
Date: Thu, 23 Jan 2014 18:11:14 +0000
Message-Id: <E1W6OkE-00081s-BM@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] unmodified_drivers: make usbfront
	build conditional
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b2625bef58b66a012df2f759a1fb7ba50d139f7d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 23 10:29:12 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:29:12 2014 +0100

    unmodified_drivers: make usbfront build conditional
    
    Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
    driver") results in the PV drivers to no longer build against older
    (pre-2.6.35) Linux versions. That's because usbfront.h includes
    headers from drivers/usb/core/, which is generally unavailable when
    building out-of-tree modules.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 unmodified_drivers/linux-2.6/usbfront/Kbuild |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/unmodified_drivers/linux-2.6/usbfront/Kbuild b/unmodified_drivers/linux-2.6/usbfront/Kbuild
index f44deaa..321a35a 100644
--- a/unmodified_drivers/linux-2.6/usbfront/Kbuild
+++ b/unmodified_drivers/linux-2.6/usbfront/Kbuild
@@ -1,5 +1,7 @@
 include $(M)/overrides.mk
 
-obj-m += xen-usb.o
+obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \
+	      $(warning usbfront cannot be built), \
+	      xen-usb.o)
 
 xen-usb-objs := usbfront-hcd.o xenbus.o
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 23 18:11:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6OkI-000191-Q2; Thu, 23 Jan 2014 18:11: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 1W6OkH-00018s-Jf
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:17 +0000
Received: from [85.158.137.68:30020] by server-11.bemta-3.messagelabs.com id
	31/A3-19379-44B51E25; Thu, 23 Jan 2014 18:11:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1390500675!10158791!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9270 invoked from network); 23 Jan 2014 18:11:16 -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;
	23 Jan 2014 18:11: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 1W6OkE-0000Dp-Rv
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6OkE-00081s-BM
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:14 +0000
Date: Thu, 23 Jan 2014 18:11:14 +0000
Message-Id: <E1W6OkE-00081s-BM@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] unmodified_drivers: make usbfront
	build conditional
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b2625bef58b66a012df2f759a1fb7ba50d139f7d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 23 10:29:12 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:29:12 2014 +0100

    unmodified_drivers: make usbfront build conditional
    
    Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
    driver") results in the PV drivers to no longer build against older
    (pre-2.6.35) Linux versions. That's because usbfront.h includes
    headers from drivers/usb/core/, which is generally unavailable when
    building out-of-tree modules.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 unmodified_drivers/linux-2.6/usbfront/Kbuild |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/unmodified_drivers/linux-2.6/usbfront/Kbuild b/unmodified_drivers/linux-2.6/usbfront/Kbuild
index f44deaa..321a35a 100644
--- a/unmodified_drivers/linux-2.6/usbfront/Kbuild
+++ b/unmodified_drivers/linux-2.6/usbfront/Kbuild
@@ -1,5 +1,7 @@
 include $(M)/overrides.mk
 
-obj-m += xen-usb.o
+obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \
+	      $(warning usbfront cannot be built), \
+	      xen-usb.o)
 
 xen-usb-objs := usbfront-hcd.o xenbus.o
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 23 18:11:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6OkS-0001AB-Sy; Thu, 23 Jan 2014 18: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 1W6OkS-0001A4-1l
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:28 +0000
Received: from [85.158.143.35:62741] by server-1.bemta-4.messagelabs.com id
	1B/98-02132-F4B51E25; Thu, 23 Jan 2014 18:11:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390500685!390378!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14462 invoked from network); 23 Jan 2014 18:11:26 -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;
	23 Jan 2014 18:11: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 1W6OkP-0000Dy-2m
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6OkP-00082F-15
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:25 +0000
Date: Thu, 23 Jan 2014 18:11:25 +0000
Message-Id: <E1W6OkP-00082F-15@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: don't drop guest visible state
	updates when 64-bit PV guest is in user mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 231d7f4098c8ac9cdb78f18fcb820d8618c8b0c2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 23 10:30:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:30:08 2014 +0100

    x86: don't drop guest visible state updates when 64-bit PV guest is in user mode
    
    Since 64-bit PV uses separate kernel and user mode page tables, kernel
    addresses (as usually provided via VCPUOP_register_runstate_memory_area
    and possibly via VCPUOP_register_vcpu_time_memory_area) aren't
    necessarily accessible when the respective updating occurs. Add logic
    for toggle_guest_mode() to take care of this (if necessary) the next
    time the vCPU switches to kernel mode.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c        |   24 ++++++++++++++++--------
 xen/arch/x86/time.c          |   39 +++++++++++++++++++++++++--------------
 xen/arch/x86/x86_64/traps.c  |   12 ++++++++++++
 xen/include/asm-x86/domain.h |    8 ++++++++
 4 files changed, 61 insertions(+), 22 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index ae2d246..16f2b50 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1323,10 +1323,10 @@ static void paravirt_ctxt_switch_to(struct vcpu *v)
 }
 
 /* Update per-VCPU guest runstate shared memory area (if registered). */
-static void update_runstate_area(struct vcpu *v)
+bool_t update_runstate_area(const struct vcpu *v)
 {
     if ( guest_handle_is_null(runstate_guest(v)) )
-        return;
+        return 1;
 
     if ( has_32bit_shinfo(v->domain) )
     {
@@ -1334,10 +1334,18 @@ static void update_runstate_area(struct vcpu *v)
 
         XLAT_vcpu_runstate_info(&info, &v->runstate);
         __copy_to_guest(v->runstate_guest.compat, &info, 1);
-        return;
+        return 1;
     }
 
-    __copy_to_guest(runstate_guest(v), &v->runstate, 1);
+    return __copy_to_guest(runstate_guest(v), &v->runstate, 1) !=
+           sizeof(v->runstate);
+}
+
+static void _update_runstate_area(struct vcpu *v)
+{
+    if ( !update_runstate_area(v) && is_pv_vcpu(v) &&
+         !(v->arch.flags & TF_kernel_mode) )
+        v->arch.pv_vcpu.need_update_runstate_area = 1;
 }
 
 static inline int need_full_gdt(struct vcpu *v)
@@ -1443,8 +1451,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
         flush_tlb_mask(&dirty_mask);
     }
 
-    if (prev != next)
-        update_runstate_area(prev);
+    if ( prev != next )
+        _update_runstate_area(prev);
 
     if ( is_hvm_vcpu(prev) )
     {
@@ -1497,8 +1505,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
 
     context_saved(prev);
 
-    if (prev != next)
-        update_runstate_area(next);
+    if ( prev != next )
+        _update_runstate_area(next);
 
     /* Ensure that the vcpu has an up-to-date time base. */
     update_vcpu_system_time(next);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index e463600..6e31e1f 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -740,7 +740,6 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)
 {
     struct cpu_time       *t;
     struct vcpu_time_info *u, _u;
-    XEN_GUEST_HANDLE(vcpu_time_info_t) user_u;
     struct domain *d = v->domain;
     s_time_t tsc_stamp = 0;
 
@@ -805,19 +804,31 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)
     /* 3. Update guest kernel version. */
     u->version = version_update_end(u->version);
 
-    user_u = v->arch.time_info_guest;
-    if ( !guest_handle_is_null(user_u) )
-    {
-        /* 1. Update userspace version. */
-        __copy_field_to_guest(user_u, &_u, version);
-        wmb();
-        /* 2. Update all other userspavce fields. */
-        __copy_to_guest(user_u, &_u, 1);
-        wmb();
-        /* 3. Update userspace version. */
-        _u.version = version_update_end(_u.version);
-        __copy_field_to_guest(user_u, &_u, version);
-    }
+    if ( !update_secondary_system_time(v, &_u) && is_pv_domain(d) &&
+         !is_pv_32bit_domain(d) && !(v->arch.flags & TF_kernel_mode) )
+        v->arch.pv_vcpu.pending_system_time = _u;
+}
+
+bool_t update_secondary_system_time(const struct vcpu *v,
+                                    struct vcpu_time_info *u)
+{
+    XEN_GUEST_HANDLE(vcpu_time_info_t) user_u = v->arch.time_info_guest;
+
+    if ( guest_handle_is_null(user_u) )
+        return 1;
+
+    /* 1. Update userspace version. */
+    if ( __copy_field_to_guest(user_u, u, version) == sizeof(u->version) )
+        return 0;
+    wmb();
+    /* 2. Update all other userspace fields. */
+    __copy_to_guest(user_u, u, 1);
+    wmb();
+    /* 3. Update userspace version. */
+    u->version = version_update_end(u->version);
+    __copy_field_to_guest(user_u, u, version);
+
+    return 1;
 }
 
 void update_vcpu_system_time(struct vcpu *v)
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index ad09415..d8303f9 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -266,6 +266,18 @@ void toggle_guest_mode(struct vcpu *v)
 #else
     write_ptbase(v);
 #endif
+
+    if ( !(v->arch.flags & TF_kernel_mode) )
+        return;
+
+    if ( v->arch.pv_vcpu.need_update_runstate_area &&
+         update_runstate_area(v) )
+        v->arch.pv_vcpu.need_update_runstate_area = 0;
+
+    if ( v->arch.pv_vcpu.pending_system_time.version &&
+         update_secondary_system_time(v,
+                                      &v->arch.pv_vcpu.pending_system_time) )
+        v->arch.pv_vcpu.pending_system_time.version = 0;
 }
 
 unsigned long do_iret(void)
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 9d39061..ea72db2 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -373,6 +373,10 @@ struct pv_vcpu
     /* Current LDT details. */
     unsigned long shadow_ldt_mapcnt;
     spinlock_t shadow_ldt_lock;
+
+    /* Deferred VA-based update state. */
+    bool_t need_update_runstate_area;
+    struct vcpu_time_info pending_system_time;
 };
 
 struct arch_vcpu
@@ -445,6 +449,10 @@ struct arch_vcpu
 #define hvm_vmx         hvm_vcpu.u.vmx
 #define hvm_svm         hvm_vcpu.u.svm
 
+bool_t update_runstate_area(const struct vcpu *);
+bool_t update_secondary_system_time(const struct vcpu *,
+                                    struct vcpu_time_info *);
+
 void vcpu_show_execution_state(struct vcpu *);
 void vcpu_show_registers(const struct 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 Thu Jan 23 18:11:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 18:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6OkS-0001AB-Sy; Thu, 23 Jan 2014 18: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 1W6OkS-0001A4-1l
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:28 +0000
Received: from [85.158.143.35:62741] by server-1.bemta-4.messagelabs.com id
	1B/98-02132-F4B51E25; Thu, 23 Jan 2014 18:11:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390500685!390378!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14462 invoked from network); 23 Jan 2014 18:11:26 -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;
	23 Jan 2014 18:11: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 1W6OkP-0000Dy-2m
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6OkP-00082F-15
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 18:11:25 +0000
Date: Thu, 23 Jan 2014 18:11:25 +0000
Message-Id: <E1W6OkP-00082F-15@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: don't drop guest visible state
	updates when 64-bit PV guest is in user mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 231d7f4098c8ac9cdb78f18fcb820d8618c8b0c2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 23 10:30:08 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 10:30:08 2014 +0100

    x86: don't drop guest visible state updates when 64-bit PV guest is in user mode
    
    Since 64-bit PV uses separate kernel and user mode page tables, kernel
    addresses (as usually provided via VCPUOP_register_runstate_memory_area
    and possibly via VCPUOP_register_vcpu_time_memory_area) aren't
    necessarily accessible when the respective updating occurs. Add logic
    for toggle_guest_mode() to take care of this (if necessary) the next
    time the vCPU switches to kernel mode.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c        |   24 ++++++++++++++++--------
 xen/arch/x86/time.c          |   39 +++++++++++++++++++++++++--------------
 xen/arch/x86/x86_64/traps.c  |   12 ++++++++++++
 xen/include/asm-x86/domain.h |    8 ++++++++
 4 files changed, 61 insertions(+), 22 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index ae2d246..16f2b50 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1323,10 +1323,10 @@ static void paravirt_ctxt_switch_to(struct vcpu *v)
 }
 
 /* Update per-VCPU guest runstate shared memory area (if registered). */
-static void update_runstate_area(struct vcpu *v)
+bool_t update_runstate_area(const struct vcpu *v)
 {
     if ( guest_handle_is_null(runstate_guest(v)) )
-        return;
+        return 1;
 
     if ( has_32bit_shinfo(v->domain) )
     {
@@ -1334,10 +1334,18 @@ static void update_runstate_area(struct vcpu *v)
 
         XLAT_vcpu_runstate_info(&info, &v->runstate);
         __copy_to_guest(v->runstate_guest.compat, &info, 1);
-        return;
+        return 1;
     }
 
-    __copy_to_guest(runstate_guest(v), &v->runstate, 1);
+    return __copy_to_guest(runstate_guest(v), &v->runstate, 1) !=
+           sizeof(v->runstate);
+}
+
+static void _update_runstate_area(struct vcpu *v)
+{
+    if ( !update_runstate_area(v) && is_pv_vcpu(v) &&
+         !(v->arch.flags & TF_kernel_mode) )
+        v->arch.pv_vcpu.need_update_runstate_area = 1;
 }
 
 static inline int need_full_gdt(struct vcpu *v)
@@ -1443,8 +1451,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
         flush_tlb_mask(&dirty_mask);
     }
 
-    if (prev != next)
-        update_runstate_area(prev);
+    if ( prev != next )
+        _update_runstate_area(prev);
 
     if ( is_hvm_vcpu(prev) )
     {
@@ -1497,8 +1505,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
 
     context_saved(prev);
 
-    if (prev != next)
-        update_runstate_area(next);
+    if ( prev != next )
+        _update_runstate_area(next);
 
     /* Ensure that the vcpu has an up-to-date time base. */
     update_vcpu_system_time(next);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index e463600..6e31e1f 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -740,7 +740,6 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)
 {
     struct cpu_time       *t;
     struct vcpu_time_info *u, _u;
-    XEN_GUEST_HANDLE(vcpu_time_info_t) user_u;
     struct domain *d = v->domain;
     s_time_t tsc_stamp = 0;
 
@@ -805,19 +804,31 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)
     /* 3. Update guest kernel version. */
     u->version = version_update_end(u->version);
 
-    user_u = v->arch.time_info_guest;
-    if ( !guest_handle_is_null(user_u) )
-    {
-        /* 1. Update userspace version. */
-        __copy_field_to_guest(user_u, &_u, version);
-        wmb();
-        /* 2. Update all other userspavce fields. */
-        __copy_to_guest(user_u, &_u, 1);
-        wmb();
-        /* 3. Update userspace version. */
-        _u.version = version_update_end(_u.version);
-        __copy_field_to_guest(user_u, &_u, version);
-    }
+    if ( !update_secondary_system_time(v, &_u) && is_pv_domain(d) &&
+         !is_pv_32bit_domain(d) && !(v->arch.flags & TF_kernel_mode) )
+        v->arch.pv_vcpu.pending_system_time = _u;
+}
+
+bool_t update_secondary_system_time(const struct vcpu *v,
+                                    struct vcpu_time_info *u)
+{
+    XEN_GUEST_HANDLE(vcpu_time_info_t) user_u = v->arch.time_info_guest;
+
+    if ( guest_handle_is_null(user_u) )
+        return 1;
+
+    /* 1. Update userspace version. */
+    if ( __copy_field_to_guest(user_u, u, version) == sizeof(u->version) )
+        return 0;
+    wmb();
+    /* 2. Update all other userspace fields. */
+    __copy_to_guest(user_u, u, 1);
+    wmb();
+    /* 3. Update userspace version. */
+    u->version = version_update_end(u->version);
+    __copy_field_to_guest(user_u, u, version);
+
+    return 1;
 }
 
 void update_vcpu_system_time(struct vcpu *v)
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index ad09415..d8303f9 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -266,6 +266,18 @@ void toggle_guest_mode(struct vcpu *v)
 #else
     write_ptbase(v);
 #endif
+
+    if ( !(v->arch.flags & TF_kernel_mode) )
+        return;
+
+    if ( v->arch.pv_vcpu.need_update_runstate_area &&
+         update_runstate_area(v) )
+        v->arch.pv_vcpu.need_update_runstate_area = 0;
+
+    if ( v->arch.pv_vcpu.pending_system_time.version &&
+         update_secondary_system_time(v,
+                                      &v->arch.pv_vcpu.pending_system_time) )
+        v->arch.pv_vcpu.pending_system_time.version = 0;
 }
 
 unsigned long do_iret(void)
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 9d39061..ea72db2 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -373,6 +373,10 @@ struct pv_vcpu
     /* Current LDT details. */
     unsigned long shadow_ldt_mapcnt;
     spinlock_t shadow_ldt_lock;
+
+    /* Deferred VA-based update state. */
+    bool_t need_update_runstate_area;
+    struct vcpu_time_info pending_system_time;
 };
 
 struct arch_vcpu
@@ -445,6 +449,10 @@ struct arch_vcpu
 #define hvm_vmx         hvm_vcpu.u.vmx
 #define hvm_svm         hvm_vcpu.u.svm
 
+bool_t update_runstate_area(const struct vcpu *);
+bool_t update_secondary_system_time(const struct vcpu *,
+                                    struct vcpu_time_info *);
+
 void vcpu_show_execution_state(struct vcpu *);
 void vcpu_show_registers(const struct 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 Thu Jan 23 22:55:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 22:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6TB3-0004CD-KP; Thu, 23 Jan 2014 22:55: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 1W6TB2-0004C8-K6
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:12 +0000
Received: from [85.158.137.68:50933] by server-16.bemta-3.messagelabs.com id
	DD/DC-26128-FCD91E25; Thu, 23 Jan 2014 22:55:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1390517709!7332865!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31142 invoked from network); 23 Jan 2014 22:55:10 -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;
	23 Jan 2014 22:55: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 1W6TAu-0003Lv-43
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6TAt-0007pr-Tc
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:04 +0000
Date: Thu, 23 Jan 2014 22:55:03 +0000
Message-Id: <E1W6TAt-0007pr-Tc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/irq: avoid use-after-free on
	error path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 85c4e39100037fafc4e4c3e517aaef8180ffdde7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:59:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:59:35 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 650fc2f76d0a156e23703683d0c18fa262ecea36
    master date: 2014-01-23 13:55:42 +0100
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index f3d86a8..be34dcb 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1574,8 +1574,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
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 Thu Jan 23 22:55:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 22:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W6TB3-0004CD-KP; Thu, 23 Jan 2014 22:55: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 1W6TB2-0004C8-K6
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:12 +0000
Received: from [85.158.137.68:50933] by server-16.bemta-3.messagelabs.com id
	DD/DC-26128-FCD91E25; Thu, 23 Jan 2014 22:55:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1390517709!7332865!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31142 invoked from network); 23 Jan 2014 22:55:10 -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;
	23 Jan 2014 22:55: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 1W6TAu-0003Lv-43
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6TAt-0007pr-Tc
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 22:55:04 +0000
Date: Thu, 23 Jan 2014 22:55:03 +0000
Message-Id: <E1W6TAt-0007pr-Tc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/irq: avoid use-after-free on
	error path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 85c4e39100037fafc4e4c3e517aaef8180ffdde7
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:59:35 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:59:35 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 650fc2f76d0a156e23703683d0c18fa262ecea36
    master date: 2014-01-23 13:55:42 +0100
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index f3d86a8..be34dcb 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1574,8 +1574,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
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 Thu Jan 23 23:00:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 23:00: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 1W6TFo-0004Y9-JF; Thu, 23 Jan 2014 23:00: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 1W6TFn-0004Y0-S3
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:07 +0000
Received: from [85.158.139.211:3653] by server-1.bemta-5.messagelabs.com id
	B9/FF-21065-7FE91E25; Thu, 23 Jan 2014 23:00:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1390518005!11591645!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3199 invoked from network); 23 Jan 2014 23:00:06 -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;
	23 Jan 2014 23:00: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 1W6TFl-0003S1-31
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6TFk-000810-LU
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:05 +0000
Date: Thu, 23 Jan 2014 23:00:04 +0000
Message-Id: <E1W6TFk-000810-LU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/irq: avoid use-after-free on
	error path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4e54949a7baa5d66f1ab36571d6c974c9319a964
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:58:09 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:58:09 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 650fc2f76d0a156e23703683d0c18fa262ecea36
    master date: 2014-01-23 13:55:42 +0100
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index a4da786..2fd63ea 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
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 Thu Jan 23 23:00:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Jan 2014 23:00: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 1W6TFo-0004Y9-JF; Thu, 23 Jan 2014 23:00: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 1W6TFn-0004Y0-S3
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:07 +0000
Received: from [85.158.139.211:3653] by server-1.bemta-5.messagelabs.com id
	B9/FF-21065-7FE91E25; Thu, 23 Jan 2014 23:00:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1390518005!11591645!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3199 invoked from network); 23 Jan 2014 23:00:06 -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;
	23 Jan 2014 23:00: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 1W6TFl-0003S1-31
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6TFk-000810-LU
	for xen-changelog@lists.xensource.com; Thu, 23 Jan 2014 23:00:05 +0000
Date: Thu, 23 Jan 2014 23:00:04 +0000
Message-Id: <E1W6TFk-000810-LU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/irq: avoid use-after-free on
	error path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4e54949a7baa5d66f1ab36571d6c974c9319a964
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:58:09 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:58:09 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 650fc2f76d0a156e23703683d0c18fa262ecea36
    master date: 2014-01-23 13:55:42 +0100
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index a4da786..2fd63ea 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
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 Fri Jan 24 10:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Jan 2014 10:33: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 1W6e4P-0004po-Sa; Fri, 24 Jan 2014 10:33:05 +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 1W6e4P-0004ph-8p
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:05 +0000
Received: from [85.158.143.35:10496] by server-2.bemta-4.messagelabs.com id
	81/03-11386-06142E25; Fri, 24 Jan 2014 10:33:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390559583!512506!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20017 invoked from network); 24 Jan 2014 10:33:04 -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;
	24 Jan 2014 10:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6e4M-0001hl-T1
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6e4M-0002ZH-Pl
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:02 +0000
Date: Fri, 24 Jan 2014 10:33:02 +0000
Message-Id: <E1W6e4M-0002ZH-Pl@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/irq: avoid use-after-free on error
	path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 650fc2f76d0a156e23703683d0c18fa262ecea36
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:55:42 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:55:42 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index a47d4f6..db70077 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 24 10:33:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Jan 2014 10:33: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 1W6e4P-0004po-Sa; Fri, 24 Jan 2014 10:33:05 +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 1W6e4P-0004ph-8p
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:05 +0000
Received: from [85.158.143.35:10496] by server-2.bemta-4.messagelabs.com id
	81/03-11386-06142E25; Fri, 24 Jan 2014 10:33:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390559583!512506!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20017 invoked from network); 24 Jan 2014 10:33:04 -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;
	24 Jan 2014 10:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6e4M-0001hl-T1
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6e4M-0002ZH-Pl
	for xen-changelog@lists.xensource.com; Fri, 24 Jan 2014 10:33:02 +0000
Date: Fri, 24 Jan 2014 10:33:02 +0000
Message-Id: <E1W6e4M-0002ZH-Pl@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/irq: avoid use-after-free on error
	path in pirq_guest_bind()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 650fc2f76d0a156e23703683d0c18fa262ecea36
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 23 13:55:42 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 23 13:55:42 2014 +0100

    x86/irq: avoid use-after-free on error path in pirq_guest_bind()
    
    This is XSA-83.
    
    Coverity-ID: 1146952
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index a47d4f6..db70077 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
             printk(XENLOG_G_INFO
                    "Cannot bind IRQ%d to dom%d. Out of memory.\n",
                    pirq->pirq, v->domain->domain_id);
-            rc = -ENOMEM;
-            goto out;
+            return -ENOMEM;
         }
 
         action = newaction;
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 25 05:11:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Jan 2014 05:11: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 1W6vWP-0007Kb-4j; Sat, 25 Jan 2014 05:11: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 1W6vWN-0007KT-4c
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:07 +0000
Received: from [85.158.143.35:36987] by server-1.bemta-4.messagelabs.com id
	69/86-02132-A6743E25; Sat, 25 Jan 2014 05:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1390626664!693760!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3923 invoked from network); 25 Jan 2014 05:11:05 -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;
	25 Jan 2014 05: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 1W6vWJ-0004pF-P2
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6vWI-0001h5-Kw
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:02 +0000
Date: Sat, 25 Jan 2014 05:11:02 +0000
Message-Id: <E1W6vWI-0001h5-Kw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f6179b2e3638e1ff3b3f087ce34b0afdb05ed432
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:46:43 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:46:43 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 6cfdab3..8246679 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -612,7 +612,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
     case PHYSDEVOP_release_msix: {
         struct physdev_pci_device dev;
 
-        if ( copy_from_guest(&dev, arg, 1) )
+        if ( !IS_PRIV(v->domain) )
+            ret = -EPERM;
+        else if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
             ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
--
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 Jan 25 05:11:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Jan 2014 05:11: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 1W6vWP-0007Kb-4j; Sat, 25 Jan 2014 05:11: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 1W6vWN-0007KT-4c
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:07 +0000
Received: from [85.158.143.35:36987] by server-1.bemta-4.messagelabs.com id
	69/86-02132-A6743E25; Sat, 25 Jan 2014 05:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1390626664!693760!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3923 invoked from network); 25 Jan 2014 05:11:05 -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;
	25 Jan 2014 05: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 1W6vWJ-0004pF-P2
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W6vWI-0001h5-Kw
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 05:11:02 +0000
Date: Sat, 25 Jan 2014 05:11:02 +0000
Message-Id: <E1W6vWI-0001h5-Kw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f6179b2e3638e1ff3b3f087ce34b0afdb05ed432
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:46:43 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:46:43 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 6cfdab3..8246679 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -612,7 +612,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
     case PHYSDEVOP_release_msix: {
         struct physdev_pci_device dev;
 
-        if ( copy_from_guest(&dev, arg, 1) )
+        if ( !IS_PRIV(v->domain) )
+            ret = -EPERM;
+        else if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
             ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
--
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 Jan 25 14:22:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Jan 2014 14:22: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 1W747Z-0003nt-UO; Sat, 25 Jan 2014 14:22:05 +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 1W747Z-0003nn-J0
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:05 +0000
Received: from [85.158.143.35:5602] by server-1.bemta-4.messagelabs.com id
	A1/AC-02132-C88C3E25; Sat, 25 Jan 2014 14:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390659723!737677!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23832 invoked from network); 25 Jan 2014 14:22:03 -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;
	25 Jan 2014 14:22: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 1W747W-0002WW-Q4
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W747W-0007uf-Ew
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:02 +0000
Date: Sat, 25 Jan 2014 14:22:02 +0000
Message-Id: <E1W747W-0007uf-Ew@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9612d2948e1637c303e6be68df2168775ac5e97e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:45:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:45:03 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 3733c7a..945deee 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -586,7 +586,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
-            ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
+            ret = xsm_resource_setup_pci(XSM_PRIV,
+                                         (dev.seg << 16) | (dev.bus << 8) |
+                                         dev.devfn) ?:
+                  pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
                                    cmd != PHYSDEVOP_prepare_msix);
         break;
     }
--
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 Jan 25 14:22:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Jan 2014 14:22: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 1W747Z-0003nt-UO; Sat, 25 Jan 2014 14:22:05 +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 1W747Z-0003nn-J0
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:05 +0000
Received: from [85.158.143.35:5602] by server-1.bemta-4.messagelabs.com id
	A1/AC-02132-C88C3E25; Sat, 25 Jan 2014 14:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390659723!737677!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23832 invoked from network); 25 Jan 2014 14:22:03 -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;
	25 Jan 2014 14:22: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 1W747W-0002WW-Q4
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W747W-0007uf-Ew
	for xen-changelog@lists.xensource.com; Sat, 25 Jan 2014 14:22:02 +0000
Date: Sat, 25 Jan 2014 14:22:02 +0000
Message-Id: <E1W747W-0007uf-Ew@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9612d2948e1637c303e6be68df2168775ac5e97e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:45:03 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:45:03 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 3733c7a..945deee 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -586,7 +586,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
-            ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
+            ret = xsm_resource_setup_pci(XSM_PRIV,
+                                         (dev.seg << 16) | (dev.bus << 8) |
+                                         dev.devfn) ?:
+                  pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
                                    cmd != PHYSDEVOP_prepare_msix);
         break;
     }
--
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 Mon Jan 27 00:11:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 2014 00:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7Zn9-0005J5-5G; Mon, 27 Jan 2014 00:11: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 1W7Zn7-0005Iy-VB
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:06 +0000
Received: from [193.109.254.147:17530] by server-2.bemta-14.messagelabs.com id
	D3/7C-00361-914A5E25; Mon, 27 Jan 2014 00:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1390781463!9819785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16865 invoked from network); 27 Jan 2014 00:11:04 -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;
	27 Jan 2014 00:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7Zn5-0007ZX-85
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7Zn4-0005Hg-VT
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:03 +0000
Date: Mon, 27 Jan 2014 00:11:02 +0000
Message-Id: <E1W7Zn4-0005Hg-VT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.1] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit fa1bde94493ee9fc66ce6f33ed434a9d7133c896
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:48:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:48:07 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 92d3a80..679e270 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -554,7 +554,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
     case PHYSDEVOP_release_msix: {
         struct physdev_pci_device dev;
 
-        if ( copy_from_guest(&dev, arg, 1) )
+        if ( !IS_PRIV(v->domain) )
+            ret = -EPERM;
+        else if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else if ( dev.seg )
             ret = -EOPNOTSUPP;
--
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 Mon Jan 27 00:11:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 2014 00:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7Zn9-0005J5-5G; Mon, 27 Jan 2014 00:11: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 1W7Zn7-0005Iy-VB
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:06 +0000
Received: from [193.109.254.147:17530] by server-2.bemta-14.messagelabs.com id
	D3/7C-00361-914A5E25; Mon, 27 Jan 2014 00:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1390781463!9819785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16865 invoked from network); 27 Jan 2014 00:11:04 -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;
	27 Jan 2014 00:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7Zn5-0007ZX-85
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7Zn4-0005Hg-VT
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 00:11:03 +0000
Date: Mon, 27 Jan 2014 00:11:02 +0000
Message-Id: <E1W7Zn4-0005Hg-VT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.1] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit fa1bde94493ee9fc66ce6f33ed434a9d7133c896
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:48:07 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:48:07 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
    master date: 2014-01-24 13:41:36 +0100
---
 xen/arch/x86/physdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 92d3a80..679e270 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -554,7 +554,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
     case PHYSDEVOP_release_msix: {
         struct physdev_pci_device dev;
 
-        if ( copy_from_guest(&dev, arg, 1) )
+        if ( !IS_PRIV(v->domain) )
+            ret = -EPERM;
+        else if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else if ( dev.seg )
             ret = -EOPNOTSUPP;
--
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 Mon Jan 27 10:44:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 2014 10:44: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 1W7jfl-00050a-Hh; Mon, 27 Jan 2014 10:44: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 1W7jfj-00050S-Ln
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:07 +0000
Received: from [193.109.254.147:56043] by server-13.bemta-14.messagelabs.com
	id A6/3C-19374-77836E25; Mon, 27 Jan 2014 10:44:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1390819443!61729!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25398 invoked from network); 27 Jan 2014 10:44:04 -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;
	27 Jan 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 1W7jff-00056G-OR
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7jff-0006Sn-KO
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:03 +0000
Date: Mon, 27 Jan 2014 10:44:03 +0000
Message-Id: <E1W7jff-0006Sn-KO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "x86/viridian: Time Reference
	Count MSR"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1cd4fab14ce25859efa4a2af13475e6650a5506c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 10:19:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 10:19:53 2014 +0100

    Revert "x86/viridian: Time Reference Count MSR"
    
    This mostly reverts commit e36cd2cdc9674a7a4855d21fb7b3e6e17c4bb33b.
    hvm_get_guest_time() is not a suitable time source for this MSR, as
    is resets across migration.
    
    Conflicts:
    	xen/arch/x86/hvm/viridian.c
    	xen/include/asm-x86/perfc_defn.h
---
 xen/arch/x86/hvm/viridian.c      |    8 +-------
 xen/include/asm-x86/perfc_defn.h |    1 -
 2 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c
index 2b86d66..0fcbfd8 100644
--- a/xen/arch/x86/hvm/viridian.c
+++ b/xen/arch/x86/hvm/viridian.c
@@ -88,8 +88,7 @@ int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
         break;
     case 3:
         /* Which hypervisor MSRs are available to the guest */
-        *eax = (CPUID3A_MSR_REF_COUNT   |
-                CPUID3A_MSR_APIC_ACCESS |
+        *eax = (CPUID3A_MSR_APIC_ACCESS |
                 CPUID3A_MSR_HYPERCALL   |
                 CPUID3A_MSR_VP_INDEX    |
                 CPUID3A_MSR_FREQ);
@@ -312,11 +311,6 @@ int rdmsr_viridian_regs(uint32_t idx, uint64_t *val)
         *val = v->vcpu_id;
         break;
 
-    case VIRIDIAN_MSR_TIME_REF_COUNT:
-        perfc_incr(mshv_rdmsr_time_ref_count);
-        *val = hvm_get_guest_time(v) / 100;
-        break;
-
     case VIRIDIAN_MSR_TSC_FREQUENCY:
         perfc_incr(mshv_rdmsr_tsc_frequency);
         *val = (uint64_t)d->arch.tsc_khz * 1000ull;
diff --git a/xen/include/asm-x86/perfc_defn.h b/xen/include/asm-x86/perfc_defn.h
index 6c590aa..7d802cc 100644
--- a/xen/include/asm-x86/perfc_defn.h
+++ b/xen/include/asm-x86/perfc_defn.h
@@ -118,7 +118,6 @@ PERFCOUNTER(mshv_call_long_wait,        "MS Hv Notify long wait")
 PERFCOUNTER(mshv_rdmsr_osid,            "MS Hv rdmsr Guest OS ID")
 PERFCOUNTER(mshv_rdmsr_hc_page,         "MS Hv rdmsr hypercall page")
 PERFCOUNTER(mshv_rdmsr_vp_index,        "MS Hv rdmsr vp index")
-PERFCOUNTER(mshv_rdmsr_time_ref_count,  "MS Hv rdmsr time reference count")
 PERFCOUNTER(mshv_rdmsr_tsc_frequency,   "MS Hv rdmsr TSC frequency")
 PERFCOUNTER(mshv_rdmsr_apic_frequency,  "MS Hv rdmsr APIC frequency")
 PERFCOUNTER(mshv_rdmsr_icr,             "MS Hv rdmsr icr")
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Mon Jan 27 10:44:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 2014 10:44: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 1W7jfl-00050a-Hh; Mon, 27 Jan 2014 10:44: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 1W7jfj-00050S-Ln
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:07 +0000
Received: from [193.109.254.147:56043] by server-13.bemta-14.messagelabs.com
	id A6/3C-19374-77836E25; Mon, 27 Jan 2014 10:44:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1390819443!61729!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25398 invoked from network); 27 Jan 2014 10:44:04 -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;
	27 Jan 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 1W7jff-00056G-OR
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7jff-0006Sn-KO
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:03 +0000
Date: Mon, 27 Jan 2014 10:44:03 +0000
Message-Id: <E1W7jff-0006Sn-KO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "x86/viridian: Time Reference
	Count MSR"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1cd4fab14ce25859efa4a2af13475e6650a5506c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 10:19:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 10:19:53 2014 +0100

    Revert "x86/viridian: Time Reference Count MSR"
    
    This mostly reverts commit e36cd2cdc9674a7a4855d21fb7b3e6e17c4bb33b.
    hvm_get_guest_time() is not a suitable time source for this MSR, as
    is resets across migration.
    
    Conflicts:
    	xen/arch/x86/hvm/viridian.c
    	xen/include/asm-x86/perfc_defn.h
---
 xen/arch/x86/hvm/viridian.c      |    8 +-------
 xen/include/asm-x86/perfc_defn.h |    1 -
 2 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c
index 2b86d66..0fcbfd8 100644
--- a/xen/arch/x86/hvm/viridian.c
+++ b/xen/arch/x86/hvm/viridian.c
@@ -88,8 +88,7 @@ int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
         break;
     case 3:
         /* Which hypervisor MSRs are available to the guest */
-        *eax = (CPUID3A_MSR_REF_COUNT   |
-                CPUID3A_MSR_APIC_ACCESS |
+        *eax = (CPUID3A_MSR_APIC_ACCESS |
                 CPUID3A_MSR_HYPERCALL   |
                 CPUID3A_MSR_VP_INDEX    |
                 CPUID3A_MSR_FREQ);
@@ -312,11 +311,6 @@ int rdmsr_viridian_regs(uint32_t idx, uint64_t *val)
         *val = v->vcpu_id;
         break;
 
-    case VIRIDIAN_MSR_TIME_REF_COUNT:
-        perfc_incr(mshv_rdmsr_time_ref_count);
-        *val = hvm_get_guest_time(v) / 100;
-        break;
-
     case VIRIDIAN_MSR_TSC_FREQUENCY:
         perfc_incr(mshv_rdmsr_tsc_frequency);
         *val = (uint64_t)d->arch.tsc_khz * 1000ull;
diff --git a/xen/include/asm-x86/perfc_defn.h b/xen/include/asm-x86/perfc_defn.h
index 6c590aa..7d802cc 100644
--- a/xen/include/asm-x86/perfc_defn.h
+++ b/xen/include/asm-x86/perfc_defn.h
@@ -118,7 +118,6 @@ PERFCOUNTER(mshv_call_long_wait,        "MS Hv Notify long wait")
 PERFCOUNTER(mshv_rdmsr_osid,            "MS Hv rdmsr Guest OS ID")
 PERFCOUNTER(mshv_rdmsr_hc_page,         "MS Hv rdmsr hypercall page")
 PERFCOUNTER(mshv_rdmsr_vp_index,        "MS Hv rdmsr vp index")
-PERFCOUNTER(mshv_rdmsr_time_ref_count,  "MS Hv rdmsr time reference count")
 PERFCOUNTER(mshv_rdmsr_tsc_frequency,   "MS Hv rdmsr TSC frequency")
 PERFCOUNTER(mshv_rdmsr_apic_frequency,  "MS Hv rdmsr APIC frequency")
 PERFCOUNTER(mshv_rdmsr_icr,             "MS Hv rdmsr icr")
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Mon Jan 27 10:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 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 1W7jfu-00051K-Kl; Mon, 27 Jan 2014 10: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 1W7jfs-000516-Rq
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:16 +0000
Received: from [85.158.143.35:47017] by server-2.bemta-4.messagelabs.com id
	1F/60-11386-08836E25; Mon, 27 Jan 2014 10:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390819454!1010248!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4973 invoked from network); 27 Jan 2014 10:44: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;
	27 Jan 2014 10: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 1W7jfq-00056J-0Y
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7jfp-0006U3-RZ
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:13 +0000
Date: Mon, 27 Jan 2014 10:44:13 +0000
Message-Id: <E1W7jfp-0006U3-RZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:41:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:41:36 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/physdev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 1040b2c..bc0634c 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -640,7 +640,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
-            ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
+            ret = xsm_resource_setup_pci(XSM_PRIV,
+                                         (dev.seg << 16) | (dev.bus << 8) |
+                                         dev.devfn) ?:
+                  pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
                                    cmd != PHYSDEVOP_prepare_msix);
         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 Mon Jan 27 10:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 27 Jan 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 1W7jfu-00051K-Kl; Mon, 27 Jan 2014 10: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 1W7jfs-000516-Rq
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:16 +0000
Received: from [85.158.143.35:47017] by server-2.bemta-4.messagelabs.com id
	1F/60-11386-08836E25; Mon, 27 Jan 2014 10:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390819454!1010248!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4973 invoked from network); 27 Jan 2014 10:44: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;
	27 Jan 2014 10: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 1W7jfq-00056J-0Y
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7jfp-0006U3-RZ
	for xen-changelog@lists.xensource.com; Mon, 27 Jan 2014 10:44:13 +0000
Date: Mon, 27 Jan 2014 10:44:13 +0000
Message-Id: <E1W7jfp-0006U3-RZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: PHYSDEVOP_{prepare,
	release}_msix are privileged
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9c7e789a1b60b6114e0b1ef16dff95f03f532fb5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jan 24 13:41:36 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jan 24 13:41:36 2014 +0100

    x86: PHYSDEVOP_{prepare,release}_msix are privileged
    
    Yet this wasn't being enforced.
    
    This is XSA-87.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/physdev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 1040b2c..bc0634c 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -640,7 +640,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&dev, arg, 1) )
             ret = -EFAULT;
         else
-            ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
+            ret = xsm_resource_setup_pci(XSM_PRIV,
+                                         (dev.seg << 16) | (dev.bus << 8) |
+                                         dev.devfn) ?:
+                  pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
                                    cmd != PHYSDEVOP_prepare_msix);
         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 Tue Jan 28 02:22:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:22: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 1W7yJV-0001mp-CB; Tue, 28 Jan 2014 02:22: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 1W7yJT-0001mg-Ps
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:08 +0000
Received: from [193.109.254.147:13744] by server-14.bemta-14.messagelabs.com
	id 0C/9B-12628-F4417E25; Tue, 28 Jan 2014 02:22:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1390875725!239583!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8964 invoked from network); 28 Jan 2014 02:22:06 -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;
	28 Jan 2014 02:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJQ-0005y6-ON
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJQ-0000lz-JY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:04 +0000
Date: Tue, 28 Jan 2014 02:22:04 +0000
Message-Id: <E1W7yJQ-0000lz-JY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: move backends' io
	watch tag to CharDriverState
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 205cff77af9debf395610fbef34874d5e6f80cd2
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:18:29 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:17:50 2013 -0600

    char: move backends' io watch tag to CharDriverState
    
    All the backends implement an io watcher tag for callbacks.  Move it to
    CharDriverState from each backend's struct to make accessing the tag from
    backend-neutral functions easier.
    
    This will be used later to cancel a callback on chardev detach from a
    frontend.
    
    CC: <qemu-stable@nongnu.org>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 7ba9addc165b37b764baa08c02518b15b2361707)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 include/sysemu/char.h |    1 +
 qemu-char.c           |   77 +++++++++++++++++++++++++------------------------
 2 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 8053130..ad101d9 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -78,6 +78,7 @@ struct CharDriverState {
     int explicit_be_open;
     int avail_connections;
     int is_mux;
+    guint fd_in_tag;
     QemuOpts *opts;
     QTAILQ_ENTRY(CharDriverState) next;
 };
diff --git a/qemu-char.c b/qemu-char.c
index 1621fbd..1dc1646 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -798,7 +798,6 @@ static int io_channel_send(GIOChannel *fd, const void *buf, size_t len)
 typedef struct FDCharDriver {
     CharDriverState *chr;
     GIOChannel *fd_in, *fd_out;
-    guint fd_in_tag;
     int max_size;
     QTAILQ_ENTRY(FDCharDriver) node;
 } FDCharDriver;
@@ -830,9 +829,9 @@ static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     status = g_io_channel_read_chars(chan, (gchar *)buf,
                                      len, &bytes_read, NULL);
     if (status == G_IO_STATUS_EOF) {
-        if (s->fd_in_tag) {
-            io_remove_watch_poll(s->fd_in_tag);
-            s->fd_in_tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
         return FALSE;
@@ -863,13 +862,14 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (s->fd_in_tag) {
-        io_remove_watch_poll(s->fd_in_tag);
-        s->fd_in_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->fd_in) {
-        s->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll, fd_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll,
+                                           fd_chr_read, chr);
     }
 }
 
@@ -877,9 +877,9 @@ static void fd_chr_close(struct CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (s->fd_in_tag) {
-        io_remove_watch_poll(s->fd_in_tag);
-        s->fd_in_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->fd_in) {
@@ -1012,7 +1012,6 @@ static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts)
 
 typedef struct {
     GIOChannel *fd;
-    guint fd_tag;
     int connected;
     int read_bytes;
     guint timer_tag;
@@ -1123,9 +1122,9 @@ static void pty_chr_state(CharDriverState *chr, int connected)
     PtyCharDriver *s = chr->opaque;
 
     if (!connected) {
-        if (s->fd_tag) {
-            io_remove_watch_poll(s->fd_tag);
-            s->fd_tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         s->connected = 0;
         /* (re-)connect poll interval for idle guests: once per second.
@@ -1140,7 +1139,8 @@ static void pty_chr_state(CharDriverState *chr, int connected)
         if (!s->connected) {
             s->connected = 1;
             qemu_chr_be_generic_open(chr);
-            s->fd_tag = io_add_watch_poll(s->fd, pty_chr_read_poll, pty_chr_read, chr);
+            chr->fd_in_tag = io_add_watch_poll(s->fd, pty_chr_read_poll,
+                                               pty_chr_read, chr);
         }
     }
 }
@@ -1151,9 +1151,9 @@ static void pty_chr_close(struct CharDriverState *chr)
     PtyCharDriver *s = chr->opaque;
     int fd;
 
-    if (s->fd_tag) {
-        io_remove_watch_poll(s->fd_tag);
-        s->fd_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
     fd = g_io_channel_unix_get_fd(s->fd);
     g_io_channel_unref(s->fd);
@@ -2161,7 +2161,6 @@ static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts)
 typedef struct {
     int fd;
     GIOChannel *chan;
-    guint tag;
     uint8_t buf[READ_BUF_LEN];
     int bufcnt;
     int bufptr;
@@ -2217,9 +2216,9 @@ static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     s->bufcnt = bytes_read;
     s->bufptr = s->bufcnt;
     if (status != G_IO_STATUS_NORMAL) {
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         return FALSE;
     }
@@ -2238,22 +2237,23 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
 
-    if (s->tag) {
-        io_remove_watch_poll(s->tag);
-        s->tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->chan) {
-        s->tag = io_add_watch_poll(s->chan, udp_chr_read_poll, udp_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->chan, udp_chr_read_poll,
+                                           udp_chr_read, chr);
     }
 }
 
 static void udp_chr_close(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
-    if (s->tag) {
-        io_remove_watch_poll(s->tag);
-        s->tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
     if (s->chan) {
         g_io_channel_unref(s->chan);
@@ -2304,7 +2304,7 @@ static CharDriverState *qemu_chr_open_udp(QemuOpts *opts)
 typedef struct {
 
     GIOChannel *chan, *listen_chan;
-    guint tag, listen_tag;
+    guint listen_tag;
     int fd, listen_fd;
     int connected;
     int max_size;
@@ -2489,9 +2489,9 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
         if (s->listen_chan) {
             s->listen_tag = g_io_add_watch(s->listen_chan, G_IO_IN, tcp_chr_accept, chr);
         }
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         g_io_channel_unref(s->chan);
         s->chan = NULL;
@@ -2522,7 +2522,8 @@ static void tcp_chr_connect(void *opaque)
 
     s->connected = 1;
     if (s->chan) {
-        s->tag = io_add_watch_poll(s->chan, tcp_chr_read_poll, tcp_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->chan, tcp_chr_read_poll,
+                                           tcp_chr_read, chr);
     }
     qemu_chr_be_generic_open(chr);
 }
@@ -2605,9 +2606,9 @@ static void tcp_chr_close(CharDriverState *chr)
 {
     TCPCharDriver *s = chr->opaque;
     if (s->fd >= 0) {
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         if (s->chan) {
             g_io_channel_unref(s->chan);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:22: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 1W7yJV-0001mp-CB; Tue, 28 Jan 2014 02:22: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 1W7yJT-0001mg-Ps
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:08 +0000
Received: from [193.109.254.147:13744] by server-14.bemta-14.messagelabs.com
	id 0C/9B-12628-F4417E25; Tue, 28 Jan 2014 02:22:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1390875725!239583!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8964 invoked from network); 28 Jan 2014 02:22:06 -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;
	28 Jan 2014 02:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJQ-0005y6-ON
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJQ-0000lz-JY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:04 +0000
Date: Tue, 28 Jan 2014 02:22:04 +0000
Message-Id: <E1W7yJQ-0000lz-JY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: move backends' io
	watch tag to CharDriverState
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 205cff77af9debf395610fbef34874d5e6f80cd2
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:18:29 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:17:50 2013 -0600

    char: move backends' io watch tag to CharDriverState
    
    All the backends implement an io watcher tag for callbacks.  Move it to
    CharDriverState from each backend's struct to make accessing the tag from
    backend-neutral functions easier.
    
    This will be used later to cancel a callback on chardev detach from a
    frontend.
    
    CC: <qemu-stable@nongnu.org>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 7ba9addc165b37b764baa08c02518b15b2361707)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 include/sysemu/char.h |    1 +
 qemu-char.c           |   77 +++++++++++++++++++++++++------------------------
 2 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 8053130..ad101d9 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -78,6 +78,7 @@ struct CharDriverState {
     int explicit_be_open;
     int avail_connections;
     int is_mux;
+    guint fd_in_tag;
     QemuOpts *opts;
     QTAILQ_ENTRY(CharDriverState) next;
 };
diff --git a/qemu-char.c b/qemu-char.c
index 1621fbd..1dc1646 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -798,7 +798,6 @@ static int io_channel_send(GIOChannel *fd, const void *buf, size_t len)
 typedef struct FDCharDriver {
     CharDriverState *chr;
     GIOChannel *fd_in, *fd_out;
-    guint fd_in_tag;
     int max_size;
     QTAILQ_ENTRY(FDCharDriver) node;
 } FDCharDriver;
@@ -830,9 +829,9 @@ static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     status = g_io_channel_read_chars(chan, (gchar *)buf,
                                      len, &bytes_read, NULL);
     if (status == G_IO_STATUS_EOF) {
-        if (s->fd_in_tag) {
-            io_remove_watch_poll(s->fd_in_tag);
-            s->fd_in_tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
         return FALSE;
@@ -863,13 +862,14 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (s->fd_in_tag) {
-        io_remove_watch_poll(s->fd_in_tag);
-        s->fd_in_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->fd_in) {
-        s->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll, fd_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll,
+                                           fd_chr_read, chr);
     }
 }
 
@@ -877,9 +877,9 @@ static void fd_chr_close(struct CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (s->fd_in_tag) {
-        io_remove_watch_poll(s->fd_in_tag);
-        s->fd_in_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->fd_in) {
@@ -1012,7 +1012,6 @@ static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts)
 
 typedef struct {
     GIOChannel *fd;
-    guint fd_tag;
     int connected;
     int read_bytes;
     guint timer_tag;
@@ -1123,9 +1122,9 @@ static void pty_chr_state(CharDriverState *chr, int connected)
     PtyCharDriver *s = chr->opaque;
 
     if (!connected) {
-        if (s->fd_tag) {
-            io_remove_watch_poll(s->fd_tag);
-            s->fd_tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         s->connected = 0;
         /* (re-)connect poll interval for idle guests: once per second.
@@ -1140,7 +1139,8 @@ static void pty_chr_state(CharDriverState *chr, int connected)
         if (!s->connected) {
             s->connected = 1;
             qemu_chr_be_generic_open(chr);
-            s->fd_tag = io_add_watch_poll(s->fd, pty_chr_read_poll, pty_chr_read, chr);
+            chr->fd_in_tag = io_add_watch_poll(s->fd, pty_chr_read_poll,
+                                               pty_chr_read, chr);
         }
     }
 }
@@ -1151,9 +1151,9 @@ static void pty_chr_close(struct CharDriverState *chr)
     PtyCharDriver *s = chr->opaque;
     int fd;
 
-    if (s->fd_tag) {
-        io_remove_watch_poll(s->fd_tag);
-        s->fd_tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
     fd = g_io_channel_unix_get_fd(s->fd);
     g_io_channel_unref(s->fd);
@@ -2161,7 +2161,6 @@ static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts)
 typedef struct {
     int fd;
     GIOChannel *chan;
-    guint tag;
     uint8_t buf[READ_BUF_LEN];
     int bufcnt;
     int bufptr;
@@ -2217,9 +2216,9 @@ static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     s->bufcnt = bytes_read;
     s->bufptr = s->bufcnt;
     if (status != G_IO_STATUS_NORMAL) {
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         return FALSE;
     }
@@ -2238,22 +2237,23 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
 
-    if (s->tag) {
-        io_remove_watch_poll(s->tag);
-        s->tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
 
     if (s->chan) {
-        s->tag = io_add_watch_poll(s->chan, udp_chr_read_poll, udp_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->chan, udp_chr_read_poll,
+                                           udp_chr_read, chr);
     }
 }
 
 static void udp_chr_close(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
-    if (s->tag) {
-        io_remove_watch_poll(s->tag);
-        s->tag = 0;
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
     }
     if (s->chan) {
         g_io_channel_unref(s->chan);
@@ -2304,7 +2304,7 @@ static CharDriverState *qemu_chr_open_udp(QemuOpts *opts)
 typedef struct {
 
     GIOChannel *chan, *listen_chan;
-    guint tag, listen_tag;
+    guint listen_tag;
     int fd, listen_fd;
     int connected;
     int max_size;
@@ -2489,9 +2489,9 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
         if (s->listen_chan) {
             s->listen_tag = g_io_add_watch(s->listen_chan, G_IO_IN, tcp_chr_accept, chr);
         }
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         g_io_channel_unref(s->chan);
         s->chan = NULL;
@@ -2522,7 +2522,8 @@ static void tcp_chr_connect(void *opaque)
 
     s->connected = 1;
     if (s->chan) {
-        s->tag = io_add_watch_poll(s->chan, tcp_chr_read_poll, tcp_chr_read, chr);
+        chr->fd_in_tag = io_add_watch_poll(s->chan, tcp_chr_read_poll,
+                                           tcp_chr_read, chr);
     }
     qemu_chr_be_generic_open(chr);
 }
@@ -2605,9 +2606,9 @@ static void tcp_chr_close(CharDriverState *chr)
 {
     TCPCharDriver *s = chr->opaque;
     if (s->fd >= 0) {
-        if (s->tag) {
-            io_remove_watch_poll(s->tag);
-            s->tag = 0;
+        if (chr->fd_in_tag) {
+            io_remove_watch_poll(chr->fd_in_tag);
+            chr->fd_in_tag = 0;
         }
         if (s->chan) {
             g_io_channel_unref(s->chan);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yJf-0001nk-Er; Tue, 28 Jan 2014 02:22: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 1W7yJd-0001nW-Ua
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:18 +0000
Received: from [85.158.139.211:19461] by server-15.bemta-5.messagelabs.com id
	14/73-08490-95417E25; Tue, 28 Jan 2014 02:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1390875735!12313274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24702 invoked from network); 28 Jan 2014 02:22:16 -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;
	28 Jan 2014 02: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 1W7yJa-0005y9-VZ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJa-0000md-SS
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:14 +0000
Date: Tue, 28 Jan 2014 02:22:14 +0000
Message-Id: <E1W7yJa-0000md-SS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: use common function
	to disable callbacks on chardev close
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit aeefaaac83a38a563a0511d6012abea5c49a3165
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:23:37 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:17:59 2013 -0600

    char: use common function to disable callbacks on chardev close
    
    This deduplicates code used a lot of times.
    
    CC: <qemu-stable@nongnu.org>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 26da70c72524eb22c946ab19ec98a217b8252f7e)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |   62 ++++++++++++++++++----------------------------------------
 1 files changed, 19 insertions(+), 43 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 1dc1646..fa00517 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -725,6 +725,14 @@ static void io_remove_watch_poll(guint tag)
     g_source_destroy(&iwp->parent);
 }
 
+static void remove_fd_in_watch(CharDriverState *chr)
+{
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
+    }
+}
+
 #ifndef _WIN32
 static GIOChannel *io_channel_from_fd(int fd)
 {
@@ -829,10 +837,7 @@ static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     status = g_io_channel_read_chars(chan, (gchar *)buf,
                                      len, &bytes_read, NULL);
     if (status == G_IO_STATUS_EOF) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
         return FALSE;
     }
@@ -862,11 +867,7 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->fd_in) {
         chr->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll,
                                            fd_chr_read, chr);
@@ -877,11 +878,7 @@ static void fd_chr_close(struct CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->fd_in) {
         g_io_channel_unref(s->fd_in);
     }
@@ -1122,10 +1119,7 @@ static void pty_chr_state(CharDriverState *chr, int connected)
     PtyCharDriver *s = chr->opaque;
 
     if (!connected) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         s->connected = 0;
         /* (re-)connect poll interval for idle guests: once per second.
          * We check more frequently in case the guests sends data to
@@ -1151,10 +1145,7 @@ static void pty_chr_close(struct CharDriverState *chr)
     PtyCharDriver *s = chr->opaque;
     int fd;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
+    remove_fd_in_watch(chr);
     fd = g_io_channel_unix_get_fd(s->fd);
     g_io_channel_unref(s->fd);
     close(fd);
@@ -2216,10 +2207,7 @@ static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     s->bufcnt = bytes_read;
     s->bufptr = s->bufcnt;
     if (status != G_IO_STATUS_NORMAL) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         return FALSE;
     }
 
@@ -2237,11 +2225,7 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->chan) {
         chr->fd_in_tag = io_add_watch_poll(s->chan, udp_chr_read_poll,
                                            udp_chr_read, chr);
@@ -2251,10 +2235,8 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 static void udp_chr_close(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
+
+    remove_fd_in_watch(chr);
     if (s->chan) {
         g_io_channel_unref(s->chan);
         closesocket(s->fd);
@@ -2489,10 +2471,7 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
         if (s->listen_chan) {
             s->listen_tag = g_io_add_watch(s->listen_chan, G_IO_IN, tcp_chr_accept, chr);
         }
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         g_io_channel_unref(s->chan);
         s->chan = NULL;
         closesocket(s->fd);
@@ -2606,10 +2585,7 @@ static void tcp_chr_close(CharDriverState *chr)
 {
     TCPCharDriver *s = chr->opaque;
     if (s->fd >= 0) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         if (s->chan) {
             g_io_channel_unref(s->chan);
         }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yJf-0001nk-Er; Tue, 28 Jan 2014 02:22: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 1W7yJd-0001nW-Ua
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:18 +0000
Received: from [85.158.139.211:19461] by server-15.bemta-5.messagelabs.com id
	14/73-08490-95417E25; Tue, 28 Jan 2014 02:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1390875735!12313274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24702 invoked from network); 28 Jan 2014 02:22:16 -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;
	28 Jan 2014 02: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 1W7yJa-0005y9-VZ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJa-0000md-SS
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:14 +0000
Date: Tue, 28 Jan 2014 02:22:14 +0000
Message-Id: <E1W7yJa-0000md-SS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: use common function
	to disable callbacks on chardev close
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit aeefaaac83a38a563a0511d6012abea5c49a3165
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:23:37 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:17:59 2013 -0600

    char: use common function to disable callbacks on chardev close
    
    This deduplicates code used a lot of times.
    
    CC: <qemu-stable@nongnu.org>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 26da70c72524eb22c946ab19ec98a217b8252f7e)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |   62 ++++++++++++++++++----------------------------------------
 1 files changed, 19 insertions(+), 43 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 1dc1646..fa00517 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -725,6 +725,14 @@ static void io_remove_watch_poll(guint tag)
     g_source_destroy(&iwp->parent);
 }
 
+static void remove_fd_in_watch(CharDriverState *chr)
+{
+    if (chr->fd_in_tag) {
+        io_remove_watch_poll(chr->fd_in_tag);
+        chr->fd_in_tag = 0;
+    }
+}
+
 #ifndef _WIN32
 static GIOChannel *io_channel_from_fd(int fd)
 {
@@ -829,10 +837,7 @@ static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     status = g_io_channel_read_chars(chan, (gchar *)buf,
                                      len, &bytes_read, NULL);
     if (status == G_IO_STATUS_EOF) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
         return FALSE;
     }
@@ -862,11 +867,7 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->fd_in) {
         chr->fd_in_tag = io_add_watch_poll(s->fd_in, fd_chr_read_poll,
                                            fd_chr_read, chr);
@@ -877,11 +878,7 @@ static void fd_chr_close(struct CharDriverState *chr)
 {
     FDCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->fd_in) {
         g_io_channel_unref(s->fd_in);
     }
@@ -1122,10 +1119,7 @@ static void pty_chr_state(CharDriverState *chr, int connected)
     PtyCharDriver *s = chr->opaque;
 
     if (!connected) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         s->connected = 0;
         /* (re-)connect poll interval for idle guests: once per second.
          * We check more frequently in case the guests sends data to
@@ -1151,10 +1145,7 @@ static void pty_chr_close(struct CharDriverState *chr)
     PtyCharDriver *s = chr->opaque;
     int fd;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
+    remove_fd_in_watch(chr);
     fd = g_io_channel_unix_get_fd(s->fd);
     g_io_channel_unref(s->fd);
     close(fd);
@@ -2216,10 +2207,7 @@ static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
     s->bufcnt = bytes_read;
     s->bufptr = s->bufcnt;
     if (status != G_IO_STATUS_NORMAL) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         return FALSE;
     }
 
@@ -2237,11 +2225,7 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
 
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
-
+    remove_fd_in_watch(chr);
     if (s->chan) {
         chr->fd_in_tag = io_add_watch_poll(s->chan, udp_chr_read_poll,
                                            udp_chr_read, chr);
@@ -2251,10 +2235,8 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
 static void udp_chr_close(CharDriverState *chr)
 {
     NetCharDriver *s = chr->opaque;
-    if (chr->fd_in_tag) {
-        io_remove_watch_poll(chr->fd_in_tag);
-        chr->fd_in_tag = 0;
-    }
+
+    remove_fd_in_watch(chr);
     if (s->chan) {
         g_io_channel_unref(s->chan);
         closesocket(s->fd);
@@ -2489,10 +2471,7 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
         if (s->listen_chan) {
             s->listen_tag = g_io_add_watch(s->listen_chan, G_IO_IN, tcp_chr_accept, chr);
         }
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         g_io_channel_unref(s->chan);
         s->chan = NULL;
         closesocket(s->fd);
@@ -2606,10 +2585,7 @@ static void tcp_chr_close(CharDriverState *chr)
 {
     TCPCharDriver *s = chr->opaque;
     if (s->fd >= 0) {
-        if (chr->fd_in_tag) {
-            io_remove_watch_poll(chr->fd_in_tag);
-            chr->fd_in_tag = 0;
-        }
+        remove_fd_in_watch(chr);
         if (s->chan) {
             g_io_channel_unref(s->chan);
         }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:22: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 1W7yJp-0001ou-HX; Tue, 28 Jan 2014 02:22:29 +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 1W7yJn-0001oj-UP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:28 +0000
Received: from [85.158.143.35:38072] by server-2.bemta-4.messagelabs.com id
	10/D3-11386-36417E25; Tue, 28 Jan 2014 02:22:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390875745!1202570!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23756 invoked from network); 28 Jan 2014 02:22:26 -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;
	28 Jan 2014 02:22: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 1W7yJl-0005yI-4T
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJl-0000nb-2R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:25 +0000
Date: Tue, 28 Jan 2014 02:22:25 +0000
Message-Id: <E1W7yJl-0000nb-2R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: remove watch
	callback on chardev detach from frontend
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8501da4b93959ccbae4d04a673d0f1c5b72b1a4b
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:24:05 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:18:10 2013 -0600

    char: remove watch callback on chardev detach from frontend
    
    If a frontend device releases the chardev (via unplug), the chr handlers
    are set to NULL via qdev's exit callbacks invoking
    qemu_chr_add_handlers().  If the chardev had a pending operation, a
    callback will be invoked, which will try to access data in the
    just-released frontend, causing a segfault.
    
    Ensure the callbacks are disabled when frontends release chardevs.
    
    This was seen when a virtio-serial port was unplugged when heavy
    guest->host IO was in progress (causing a callback to be registered).
    In the window in which the throttling was active, unplugging ports
    caused a qemu segfault.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=985205
    
    CC: <qemu-stable@nongnu.org>
    Reported-by: Sibiao Luo <sluo@redhat.com>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 386a5a1e0057e220f79c48fe3689e3dfb17f1b09)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index fa00517..fc1c23d 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -193,6 +193,8 @@ void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
     va_end(ap);
 }
 
+static void remove_fd_in_watch(CharDriverState *chr);
+
 void qemu_chr_add_handlers(CharDriverState *s,
                            IOCanReadHandler *fd_can_read,
                            IOReadHandler *fd_read,
@@ -203,6 +205,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
 
     if (!opaque && !fd_can_read && !fd_read && !fd_event) {
         fe_open = 0;
+        remove_fd_in_watch(s);
     } else {
         fe_open = 1;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:22: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 1W7yJp-0001ou-HX; Tue, 28 Jan 2014 02:22:29 +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 1W7yJn-0001oj-UP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:28 +0000
Received: from [85.158.143.35:38072] by server-2.bemta-4.messagelabs.com id
	10/D3-11386-36417E25; Tue, 28 Jan 2014 02:22:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390875745!1202570!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23756 invoked from network); 28 Jan 2014 02:22:26 -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;
	28 Jan 2014 02:22: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 1W7yJl-0005yI-4T
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJl-0000nb-2R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:25 +0000
Date: Tue, 28 Jan 2014 02:22:25 +0000
Message-Id: <E1W7yJl-0000nb-2R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] char: remove watch
	callback on chardev detach from frontend
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 8501da4b93959ccbae4d04a673d0f1c5b72b1a4b
Author:     Amit Shah <amit.shah@redhat.com>
AuthorDate: Wed Aug 28 15:24:05 2013 +0530
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:18:10 2013 -0600

    char: remove watch callback on chardev detach from frontend
    
    If a frontend device releases the chardev (via unplug), the chr handlers
    are set to NULL via qdev's exit callbacks invoking
    qemu_chr_add_handlers().  If the chardev had a pending operation, a
    callback will be invoked, which will try to access data in the
    just-released frontend, causing a segfault.
    
    Ensure the callbacks are disabled when frontends release chardevs.
    
    This was seen when a virtio-serial port was unplugged when heavy
    guest->host IO was in progress (causing a callback to be registered).
    In the window in which the throttling was active, unplugging ports
    caused a qemu segfault.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=985205
    
    CC: <qemu-stable@nongnu.org>
    Reported-by: Sibiao Luo <sluo@redhat.com>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    (cherry picked from commit 386a5a1e0057e220f79c48fe3689e3dfb17f1b09)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index fa00517..fc1c23d 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -193,6 +193,8 @@ void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
     va_end(ap);
 }
 
+static void remove_fd_in_watch(CharDriverState *chr);
+
 void qemu_chr_add_handlers(CharDriverState *s,
                            IOCanReadHandler *fd_can_read,
                            IOReadHandler *fd_read,
@@ -203,6 +205,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
 
     if (!opaque && !fd_can_read && !fd_read && !fd_event) {
         fe_open = 0;
+        remove_fd_in_watch(s);
     } else {
         fe_open = 1;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yJz-0001qG-KF; Tue, 28 Jan 2014 02:22: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 1W7yJy-0001q0-0J
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:38 +0000
Received: from [193.109.254.147:14756] by server-13.bemta-14.messagelabs.com
	id 33/7E-19374-D6417E25; Tue, 28 Jan 2014 02:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1390875755!242964!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4130 invoked from network); 28 Jan 2014 02:22: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;
	28 Jan 2014 02: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 1W7yJv-0005yQ-93
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJv-0000o1-7K
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:35 +0000
Date: Tue, 28 Jan 2014 02:22:35 +0000
Message-Id: <E1W7yJv-0000o1-7K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: Fix schema parser
	test for in-tree build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8711840840884629839=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 7038fe818e40f8633b81462f0152a9630acdb704
Author:     Markus Armbruster <armbru@redhat.com>
AuthorDate: Tue Sep 24 09:43:39 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:23:18 2013 -0600

    tests: Fix schema parser test for in-tree build
    
    Commit 4f193e3 added the test, but screwed up in-tree builds
    (SRCDIR=.): the tests's output overwrites the expected output, and is
    thus compared to itself.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit d8039e58b1ecfdc9af171502c83e3949f6dafb95)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/.gitignore |    1 +
 tests/Makefile   |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/.gitignore b/tests/.gitignore
index fb05c2a..d9c2ef4 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -19,3 +19,4 @@ test-thread-pool
 test-x86-cpuid
 test-xbzrle
 *-test
+qapi-schema/*.test.*
diff --git a/tests/Makefile b/tests/Makefile
index d044908..ad98439 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -247,10 +247,10 @@ check-tests/test-qapi.py: tests/test-qapi.py
 
 .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
 $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
-	$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.out 2>$*.err; echo $$? >$*.exit, "  TEST  $*.out")
-	@diff -q $(SRC_PATH)/$*.out $*.out
-	@diff -q $(SRC_PATH)/$*.err $*.err
-	@diff -q $(SRC_PATH)/$*.exit $*.exit
+	$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.test.out 2>$*.test.err; echo $$? >$*.test.exit, "  TEST  $*.out")
+	@diff -q $(SRC_PATH)/$*.out $*.test.out
+	@diff -q $(SRC_PATH)/$*.err $*.test.err
+	@diff -q $(SRC_PATH)/$*.exit $*.test.exit
 
 # Consolidated targets
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yJz-0001qG-KF; Tue, 28 Jan 2014 02:22: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 1W7yJy-0001q0-0J
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:38 +0000
Received: from [193.109.254.147:14756] by server-13.bemta-14.messagelabs.com
	id 33/7E-19374-D6417E25; Tue, 28 Jan 2014 02:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1390875755!242964!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4130 invoked from network); 28 Jan 2014 02:22: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;
	28 Jan 2014 02: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 1W7yJv-0005yQ-93
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yJv-0000o1-7K
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:35 +0000
Date: Tue, 28 Jan 2014 02:22:35 +0000
Message-Id: <E1W7yJv-0000o1-7K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: Fix schema parser
	test for in-tree build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8711840840884629839=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 7038fe818e40f8633b81462f0152a9630acdb704
Author:     Markus Armbruster <armbru@redhat.com>
AuthorDate: Tue Sep 24 09:43:39 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:23:18 2013 -0600

    tests: Fix schema parser test for in-tree build
    
    Commit 4f193e3 added the test, but screwed up in-tree builds
    (SRCDIR=.): the tests's output overwrites the expected output, and is
    thus compared to itself.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit d8039e58b1ecfdc9af171502c83e3949f6dafb95)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/.gitignore |    1 +
 tests/Makefile   |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/.gitignore b/tests/.gitignore
index fb05c2a..d9c2ef4 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -19,3 +19,4 @@ test-thread-pool
 test-x86-cpuid
 test-xbzrle
 *-test
+qapi-schema/*.test.*
diff --git a/tests/Makefile b/tests/Makefile
index d044908..ad98439 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -247,10 +247,10 @@ check-tests/test-qapi.py: tests/test-qapi.py
 
 .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
 $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
-	$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.out 2>$*.err; echo $$? >$*.exit, "  TEST  $*.out")
-	@diff -q $(SRC_PATH)/$*.out $*.out
-	@diff -q $(SRC_PATH)/$*.err $*.err
-	@diff -q $(SRC_PATH)/$*.exit $*.exit
+	$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.test.out 2>$*.test.err; echo $$? >$*.test.exit, "  TEST  $*.out")
+	@diff -q $(SRC_PATH)/$*.out $*.test.out
+	@diff -q $(SRC_PATH)/$*.err $*.test.err
+	@diff -q $(SRC_PATH)/$*.exit $*.test.exit
 
 # Consolidated targets
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yK9-0001ru-N3; Tue, 28 Jan 2014 02:22: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 1W7yK8-0001rf-3J
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:48 +0000
Received: from [193.109.254.147:63975] by server-6.bemta-14.messagelabs.com id
	83/20-14958-77417E25; Tue, 28 Jan 2014 02:22:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1390875765!238669!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23053 invoked from network); 28 Jan 2014 02:22:46 -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;
	28 Jan 2014 02: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 1W7yK5-0005yW-Dq
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yK5-0000oX-Bw
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:45 +0000
Date: Tue, 28 Jan 2014 02:22:45 +0000
Message-Id: <E1W7yK5-0000oX-Bw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: Update .gitignore
	for test-int128 and test-bitops
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0036561989747466740=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 98384a92cce4b090c6fad734bbc7a9572c246201
Author:     Markus Armbruster <armbru@redhat.com>
AuthorDate: Tue Sep 24 09:43:40 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:25:59 2013 -0600

    tests: Update .gitignore for test-int128 and test-bitops
    
    Forgotten in commit 6046c62 and 3464700.
    
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit 9dbb52e862458935c250bac9e71d5a87da4e33e9)
    
    Conflicts:
    
    	tests/.gitignore
    
    *removed post-1.6 additions from diff
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/.gitignore |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/.gitignore b/tests/.gitignore
index d9c2ef4..9ac044d 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,8 +5,10 @@ check-qjson
 check-qlist
 check-qstring
 test-aio
+test-bitops
 test-cutils
 test-hbitmap
+test-int128
 test-iov
 test-mul64
 test-qapi-types.[ch]
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yK9-0001ru-N3; Tue, 28 Jan 2014 02:22: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 1W7yK8-0001rf-3J
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:48 +0000
Received: from [193.109.254.147:63975] by server-6.bemta-14.messagelabs.com id
	83/20-14958-77417E25; Tue, 28 Jan 2014 02:22:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1390875765!238669!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23053 invoked from network); 28 Jan 2014 02:22:46 -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;
	28 Jan 2014 02: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 1W7yK5-0005yW-Dq
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yK5-0000oX-Bw
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:45 +0000
Date: Tue, 28 Jan 2014 02:22:45 +0000
Message-Id: <E1W7yK5-0000oX-Bw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: Update .gitignore
	for test-int128 and test-bitops
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============0036561989747466740=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 98384a92cce4b090c6fad734bbc7a9572c246201
Author:     Markus Armbruster <armbru@redhat.com>
AuthorDate: Tue Sep 24 09:43:40 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:25:59 2013 -0600

    tests: Update .gitignore for test-int128 and test-bitops
    
    Forgotten in commit 6046c62 and 3464700.
    
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit 9dbb52e862458935c250bac9e71d5a87da4e33e9)
    
    Conflicts:
    
    	tests/.gitignore
    
    *removed post-1.6 additions from diff
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/.gitignore |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/.gitignore b/tests/.gitignore
index d9c2ef4..9ac044d 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,8 +5,10 @@ check-qjson
 check-qlist
 check-qstring
 test-aio
+test-bitops
 test-cutils
 test-hbitmap
+test-int128
 test-iov
 test-mul64
 test-qapi-types.[ch]
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23: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 1W7yKK-0001tZ-1L; Tue, 28 Jan 2014 02:23:00 +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 1W7yKI-0001tM-Bj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:58 +0000
Received: from [85.158.139.211:25446] by server-11.bemta-5.messagelabs.com id
	D7/3E-23268-18417E25; Tue, 28 Jan 2014 02:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390875775!12300834!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4533 invoked from network); 28 Jan 2014 02:22:56 -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;
	28 Jan 2014 02: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 1W7yKF-0005yf-IY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKF-0000ov-H8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:55 +0000
Date: Tue, 28 Jan 2014 02:22:55 +0000
Message-Id: <E1W7yKF-0000ov-H8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tci: Add implementation of
	rotl_i64, rotr_i64
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2c342444a0938a064d2a24e0c6ef28cce4737524
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:11 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:30:40 2013 -0600

    tci: Add implementation of rotl_i64, rotr_i64
    
    It is used by qemu-ppc64 when running Debian's busybox-static.
    
    Cc: qemu-stable <qemu-stable@nongnu.org>
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    (cherry picked from commit d285bf784b6234e994ce73c05c82c9fb6429df00)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tcg/tci/tcg-target.c |    1 -
 tci.c                |   10 +++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.c
index e118bc7..7f86a7f 100644
--- a/tcg/tci/tcg-target.c
+++ b/tcg/tci/tcg-target.c
@@ -677,7 +677,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
     case INDEX_op_shl_i64:
     case INDEX_op_shr_i64:
     case INDEX_op_sar_i64:
-        /* TODO: Implementation of rotl_i64, rotr_i64 missing in tci.c. */
     case INDEX_op_rotl_i64:     /* Optional (TCG_TARGET_HAS_rot_i64). */
     case INDEX_op_rotr_i64:     /* Optional (TCG_TARGET_HAS_rot_i64). */
         tcg_out_r(s, args[0]);
diff --git a/tci.c b/tci.c
index af58576..b09ad25 100644
--- a/tci.c
+++ b/tci.c
@@ -952,8 +952,16 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             break;
 #if TCG_TARGET_HAS_rot_i64
         case INDEX_op_rotl_i64:
+            t0 = *tb_ptr++;
+            t1 = tci_read_ri64(&tb_ptr);
+            t2 = tci_read_ri64(&tb_ptr);
+            tci_write_reg64(t0, (t1 << t2) | (t1 >> (64 - t2)));
+            break;
         case INDEX_op_rotr_i64:
-            TODO();
+            t0 = *tb_ptr++;
+            t1 = tci_read_ri64(&tb_ptr);
+            t2 = tci_read_ri64(&tb_ptr);
+            tci_write_reg64(t0, (t1 >> t2) | (t1 << (64 - t2)));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i64
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23: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 1W7yKK-0001tZ-1L; Tue, 28 Jan 2014 02:23:00 +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 1W7yKI-0001tM-Bj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:58 +0000
Received: from [85.158.139.211:25446] by server-11.bemta-5.messagelabs.com id
	D7/3E-23268-18417E25; Tue, 28 Jan 2014 02:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390875775!12300834!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4533 invoked from network); 28 Jan 2014 02:22:56 -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;
	28 Jan 2014 02: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 1W7yKF-0005yf-IY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKF-0000ov-H8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:22:55 +0000
Date: Tue, 28 Jan 2014 02:22:55 +0000
Message-Id: <E1W7yKF-0000ov-H8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tci: Add implementation of
	rotl_i64, rotr_i64
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2c342444a0938a064d2a24e0c6ef28cce4737524
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:11 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:30:40 2013 -0600

    tci: Add implementation of rotl_i64, rotr_i64
    
    It is used by qemu-ppc64 when running Debian's busybox-static.
    
    Cc: qemu-stable <qemu-stable@nongnu.org>
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    (cherry picked from commit d285bf784b6234e994ce73c05c82c9fb6429df00)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tcg/tci/tcg-target.c |    1 -
 tci.c                |   10 +++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.c
index e118bc7..7f86a7f 100644
--- a/tcg/tci/tcg-target.c
+++ b/tcg/tci/tcg-target.c
@@ -677,7 +677,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
     case INDEX_op_shl_i64:
     case INDEX_op_shr_i64:
     case INDEX_op_sar_i64:
-        /* TODO: Implementation of rotl_i64, rotr_i64 missing in tci.c. */
     case INDEX_op_rotl_i64:     /* Optional (TCG_TARGET_HAS_rot_i64). */
     case INDEX_op_rotr_i64:     /* Optional (TCG_TARGET_HAS_rot_i64). */
         tcg_out_r(s, args[0]);
diff --git a/tci.c b/tci.c
index af58576..b09ad25 100644
--- a/tci.c
+++ b/tci.c
@@ -952,8 +952,16 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             break;
 #if TCG_TARGET_HAS_rot_i64
         case INDEX_op_rotl_i64:
+            t0 = *tb_ptr++;
+            t1 = tci_read_ri64(&tb_ptr);
+            t2 = tci_read_ri64(&tb_ptr);
+            tci_write_reg64(t0, (t1 << t2) | (t1 >> (64 - t2)));
+            break;
         case INDEX_op_rotr_i64:
-            TODO();
+            t0 = *tb_ptr++;
+            t1 = tci_read_ri64(&tb_ptr);
+            t2 = tci_read_ri64(&tb_ptr);
+            tci_write_reg64(t0, (t1 >> t2) | (t1 << (64 - t2)));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i64
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yKW-0001wB-9i; Tue, 28 Jan 2014 02:23: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 1W7yKU-0001vq-4k
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:10 +0000
Received: from [85.158.143.35:46408] by server-1.bemta-4.messagelabs.com id
	B6/2C-02132-D8417E25; Tue, 28 Jan 2014 02:23:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390875785!1195484!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16594 invoked from network); 28 Jan 2014 02:23: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;
	28 Jan 2014 02: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 1W7yKP-0005zE-QX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKP-0000pb-Ll
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:05 +0000
Date: Tue, 28 Jan 2014 02:23:05 +0000
Message-Id: <E1W7yKP-0000pb-Ll@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] bitops: Add rotate
	functions (rol8, ror8, ...)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 927fab3e061eba4feaaaa0c7409b431f4340197d
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:12 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:30:55 2013 -0600

    bitops: Add rotate functions (rol8, ror8, ...)
    
    These functions were copies from include/linux/bitopts.h.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    (cherry picked from commit 6aa25b4a7bb10c48c3054f268d5be98e42ea42c0)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 include/qemu/bitops.h |   80 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h
index 06e2e6f..304c90c 100644
--- a/include/qemu/bitops.h
+++ b/include/qemu/bitops.h
@@ -184,6 +184,86 @@ static inline unsigned long hweight_long(unsigned long w)
 }
 
 /**
+ * rol8 - rotate an 8-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint8_t rol8(uint8_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (8 - shift));
+}
+
+/**
+ * ror8 - rotate an 8-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint8_t ror8(uint8_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (8 - shift));
+}
+
+/**
+ * rol16 - rotate a 16-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint16_t rol16(uint16_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (16 - shift));
+}
+
+/**
+ * ror16 - rotate a 16-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint16_t ror16(uint16_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (16 - shift));
+}
+
+/**
+ * rol32 - rotate a 32-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint32_t rol32(uint32_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (32 - shift));
+}
+
+/**
+ * ror32 - rotate a 32-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint32_t ror32(uint32_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (32 - shift));
+}
+
+/**
+ * rol64 - rotate a 64-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint64_t rol64(uint64_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (64 - shift));
+}
+
+/**
+ * ror64 - rotate a 64-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint64_t ror64(uint64_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (64 - shift));
+}
+
+/**
  * extract32:
  * @value: the value to extract the bit field from
  * @start: the lowest bit in the bit field (numbered from 0)
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yKW-0001wB-9i; Tue, 28 Jan 2014 02:23: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 1W7yKU-0001vq-4k
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:10 +0000
Received: from [85.158.143.35:46408] by server-1.bemta-4.messagelabs.com id
	B6/2C-02132-D8417E25; Tue, 28 Jan 2014 02:23:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390875785!1195484!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16594 invoked from network); 28 Jan 2014 02:23: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;
	28 Jan 2014 02: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 1W7yKP-0005zE-QX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKP-0000pb-Ll
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:05 +0000
Date: Tue, 28 Jan 2014 02:23:05 +0000
Message-Id: <E1W7yKP-0000pb-Ll@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] bitops: Add rotate
	functions (rol8, ror8, ...)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 927fab3e061eba4feaaaa0c7409b431f4340197d
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:12 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:30:55 2013 -0600

    bitops: Add rotate functions (rol8, ror8, ...)
    
    These functions were copies from include/linux/bitopts.h.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    (cherry picked from commit 6aa25b4a7bb10c48c3054f268d5be98e42ea42c0)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 include/qemu/bitops.h |   80 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h
index 06e2e6f..304c90c 100644
--- a/include/qemu/bitops.h
+++ b/include/qemu/bitops.h
@@ -184,6 +184,86 @@ static inline unsigned long hweight_long(unsigned long w)
 }
 
 /**
+ * rol8 - rotate an 8-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint8_t rol8(uint8_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (8 - shift));
+}
+
+/**
+ * ror8 - rotate an 8-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint8_t ror8(uint8_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (8 - shift));
+}
+
+/**
+ * rol16 - rotate a 16-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint16_t rol16(uint16_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (16 - shift));
+}
+
+/**
+ * ror16 - rotate a 16-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint16_t ror16(uint16_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (16 - shift));
+}
+
+/**
+ * rol32 - rotate a 32-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint32_t rol32(uint32_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (32 - shift));
+}
+
+/**
+ * ror32 - rotate a 32-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint32_t ror32(uint32_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (32 - shift));
+}
+
+/**
+ * rol64 - rotate a 64-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint64_t rol64(uint64_t word, unsigned int shift)
+{
+    return (word << shift) | (word >> (64 - shift));
+}
+
+/**
+ * ror64 - rotate a 64-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline uint64_t ror64(uint64_t word, unsigned int shift)
+{
+    return (word >> shift) | (word << (64 - shift));
+}
+
+/**
  * extract32:
  * @value: the value to extract the bit field from
  * @start: the lowest bit in the bit field (numbered from 0)
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yKd-0001y8-Gr; Tue, 28 Jan 2014 02:23: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 1W7yKc-0001xq-T9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:19 +0000
Received: from [193.109.254.147:41801] by server-7.bemta-14.messagelabs.com id
	95/73-15500-69417E25; Tue, 28 Jan 2014 02:23:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1390875796!237538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9174 invoked from network); 28 Jan 2014 02:23:17 -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;
	28 Jan 2014 02: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 1W7yKZ-0005zK-W4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKZ-0000qC-Ta
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:15 +0000
Date: Tue, 28 Jan 2014 02:23:15 +0000
Message-Id: <E1W7yKZ-0000qC-Ta@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] misc: Use new rotate
	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 a2c9dc504a28d07284d87a4ef10ad66f6f864b42
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:13 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:31:11 2013 -0600

    misc: Use new rotate functions
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    (cherry picked from commit 3df2b8fde949be86d8a78923c992fdd698d4ea4c)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target-arm/iwmmxt_helper.c |    2 +-
 tcg/optimize.c             |   12 ++++--------
 tci.c                      |    8 ++++----
 3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/target-arm/iwmmxt_helper.c b/target-arm/iwmmxt_helper.c
index 7953b53..e6cfa62 100644
--- a/target-arm/iwmmxt_helper.c
+++ b/target-arm/iwmmxt_helper.c
@@ -577,7 +577,7 @@ uint64_t HELPER(iwmmxt_rorl)(CPUARMState *env, uint64_t x, uint32_t n)
 
 uint64_t HELPER(iwmmxt_rorq)(CPUARMState *env, uint64_t x, uint32_t n)
 {
-    x = (x >> n) | (x << (64 - n));
+    x = ror64(x, n);
     env->iwmmxt.cregs[ARM_IWMMXT_wCASF] = NZBIT64(x);
     return x;
 }
diff --git a/tcg/optimize.c b/tcg/optimize.c
index b35868a..adb5258 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -236,20 +236,16 @@ static TCGArg do_constant_folding_2(TCGOpcode op, TCGArg x, TCGArg y)
         return (int64_t)x >> (int64_t)y;
 
     case INDEX_op_rotr_i32:
-        x = ((uint32_t)x << (32 - y)) | ((uint32_t)x >> y);
-        return x;
+        return ror32(x, y);
 
     case INDEX_op_rotr_i64:
-        x = ((uint64_t)x << (64 - y)) | ((uint64_t)x >> y);
-        return x;
+        return ror64(x, y);
 
     case INDEX_op_rotl_i32:
-        x = ((uint32_t)x << y) | ((uint32_t)x >> (32 - y));
-        return x;
+        return rol32(x, y);
 
     case INDEX_op_rotl_i64:
-        x = ((uint64_t)x << y) | ((uint64_t)x >> (64 - y));
-        return x;
+        return rol64(x, y);
 
     CASE_OP_32_64(not):
         return ~x;
diff --git a/tci.c b/tci.c
index b09ad25..53c4b66 100644
--- a/tci.c
+++ b/tci.c
@@ -688,13 +688,13 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             t0 = *tb_ptr++;
             t1 = tci_read_ri32(&tb_ptr);
             t2 = tci_read_ri32(&tb_ptr);
-            tci_write_reg32(t0, (t1 << t2) | (t1 >> (32 - t2)));
+            tci_write_reg32(t0, rol32(t1, t2));
             break;
         case INDEX_op_rotr_i32:
             t0 = *tb_ptr++;
             t1 = tci_read_ri32(&tb_ptr);
             t2 = tci_read_ri32(&tb_ptr);
-            tci_write_reg32(t0, (t1 >> t2) | (t1 << (32 - t2)));
+            tci_write_reg32(t0, ror32(t1, t2));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i32
@@ -955,13 +955,13 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             t0 = *tb_ptr++;
             t1 = tci_read_ri64(&tb_ptr);
             t2 = tci_read_ri64(&tb_ptr);
-            tci_write_reg64(t0, (t1 << t2) | (t1 >> (64 - t2)));
+            tci_write_reg64(t0, rol64(t1, t2));
             break;
         case INDEX_op_rotr_i64:
             t0 = *tb_ptr++;
             t1 = tci_read_ri64(&tb_ptr);
             t2 = tci_read_ri64(&tb_ptr);
-            tci_write_reg64(t0, (t1 >> t2) | (t1 << (64 - t2)));
+            tci_write_reg64(t0, ror64(t1, t2));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i64
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yKd-0001y8-Gr; Tue, 28 Jan 2014 02:23: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 1W7yKc-0001xq-T9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:19 +0000
Received: from [193.109.254.147:41801] by server-7.bemta-14.messagelabs.com id
	95/73-15500-69417E25; Tue, 28 Jan 2014 02:23:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1390875796!237538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9174 invoked from network); 28 Jan 2014 02:23:17 -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;
	28 Jan 2014 02: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 1W7yKZ-0005zK-W4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKZ-0000qC-Ta
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:15 +0000
Date: Tue, 28 Jan 2014 02:23:15 +0000
Message-Id: <E1W7yKZ-0000qC-Ta@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] misc: Use new rotate
	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 a2c9dc504a28d07284d87a4ef10ad66f6f864b42
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Thu Sep 12 21:13:13 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:31:11 2013 -0600

    misc: Use new rotate functions
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    (cherry picked from commit 3df2b8fde949be86d8a78923c992fdd698d4ea4c)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target-arm/iwmmxt_helper.c |    2 +-
 tcg/optimize.c             |   12 ++++--------
 tci.c                      |    8 ++++----
 3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/target-arm/iwmmxt_helper.c b/target-arm/iwmmxt_helper.c
index 7953b53..e6cfa62 100644
--- a/target-arm/iwmmxt_helper.c
+++ b/target-arm/iwmmxt_helper.c
@@ -577,7 +577,7 @@ uint64_t HELPER(iwmmxt_rorl)(CPUARMState *env, uint64_t x, uint32_t n)
 
 uint64_t HELPER(iwmmxt_rorq)(CPUARMState *env, uint64_t x, uint32_t n)
 {
-    x = (x >> n) | (x << (64 - n));
+    x = ror64(x, n);
     env->iwmmxt.cregs[ARM_IWMMXT_wCASF] = NZBIT64(x);
     return x;
 }
diff --git a/tcg/optimize.c b/tcg/optimize.c
index b35868a..adb5258 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -236,20 +236,16 @@ static TCGArg do_constant_folding_2(TCGOpcode op, TCGArg x, TCGArg y)
         return (int64_t)x >> (int64_t)y;
 
     case INDEX_op_rotr_i32:
-        x = ((uint32_t)x << (32 - y)) | ((uint32_t)x >> y);
-        return x;
+        return ror32(x, y);
 
     case INDEX_op_rotr_i64:
-        x = ((uint64_t)x << (64 - y)) | ((uint64_t)x >> y);
-        return x;
+        return ror64(x, y);
 
     case INDEX_op_rotl_i32:
-        x = ((uint32_t)x << y) | ((uint32_t)x >> (32 - y));
-        return x;
+        return rol32(x, y);
 
     case INDEX_op_rotl_i64:
-        x = ((uint64_t)x << y) | ((uint64_t)x >> (64 - y));
-        return x;
+        return rol64(x, y);
 
     CASE_OP_32_64(not):
         return ~x;
diff --git a/tci.c b/tci.c
index b09ad25..53c4b66 100644
--- a/tci.c
+++ b/tci.c
@@ -688,13 +688,13 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             t0 = *tb_ptr++;
             t1 = tci_read_ri32(&tb_ptr);
             t2 = tci_read_ri32(&tb_ptr);
-            tci_write_reg32(t0, (t1 << t2) | (t1 >> (32 - t2)));
+            tci_write_reg32(t0, rol32(t1, t2));
             break;
         case INDEX_op_rotr_i32:
             t0 = *tb_ptr++;
             t1 = tci_read_ri32(&tb_ptr);
             t2 = tci_read_ri32(&tb_ptr);
-            tci_write_reg32(t0, (t1 >> t2) | (t1 << (32 - t2)));
+            tci_write_reg32(t0, ror32(t1, t2));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i32
@@ -955,13 +955,13 @@ tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
             t0 = *tb_ptr++;
             t1 = tci_read_ri64(&tb_ptr);
             t2 = tci_read_ri64(&tb_ptr);
-            tci_write_reg64(t0, (t1 << t2) | (t1 >> (64 - t2)));
+            tci_write_reg64(t0, rol64(t1, t2));
             break;
         case INDEX_op_rotr_i64:
             t0 = *tb_ptr++;
             t1 = tci_read_ri64(&tb_ptr);
             t2 = tci_read_ri64(&tb_ptr);
-            tci_write_reg64(t0, (t1 >> t2) | (t1 << (64 - t2)));
+            tci_write_reg64(t0, ror64(t1, t2));
             break;
 #endif
 #if TCG_TARGET_HAS_deposit_i64
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yKn-00020O-Jy; Tue, 28 Jan 2014 02:23: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 1W7yKm-000203-TA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:29 +0000
Received: from [85.158.139.211:12923] by server-12.bemta-5.messagelabs.com id
	A5/F7-30017-0A417E25; Tue, 28 Jan 2014 02:23:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390875806!12103875!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3599 invoked from network); 28 Jan 2014 02:23:27 -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;
	28 Jan 2014 02:23: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 1W7yKk-0005zQ-4U
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKk-0000rH-2x
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:26 +0000
Date: Tue, 28 Jan 2014 02:23:26 +0000
Message-Id: <E1W7yKk-0000rH-2x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu-char: Fix potential
	out of bounds access to local arrays
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4048932353192476555=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 78bd79fac33a56156d1d05a7f0547a0b7c282225
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Mon Sep 30 23:04:49 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:43:54 2013 -0600

    qemu-char: Fix potential out of bounds access to local arrays
    
    Latest gcc-4.8 supports a new option -fsanitize=address which activates
    an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation
    very early because two character arrays of size 8 are potentially written
    with 9 bytes.
    
    Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code.
    
    There is no obvious reason why width or height could need 8 characters,
    so reduce it to 7 characters which together with the terminating '\0'
    fit into the arrays.
    
    Cc: qemu-stable <qemu-stable@nongnu.org>
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Alex Bennée <alex@bennee.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit 49aa4058ac6dd0081aaa45776f07c98df397ca5e)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index fc1c23d..649c9f9 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2969,11 +2969,11 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
     if (strstart(filename, "vc", &p)) {
         qemu_opt_set(opts, "backend", "vc");
         if (*p == ':') {
-            if (sscanf(p+1, "%8[0-9]x%8[0-9]", width, height) == 2) {
+            if (sscanf(p+1, "%7[0-9]x%7[0-9]", width, height) == 2) {
                 /* pixels */
                 qemu_opt_set(opts, "width", width);
                 qemu_opt_set(opts, "height", height);
-            } else if (sscanf(p+1, "%8[0-9]Cx%8[0-9]C", width, height) == 2) {
+            } else if (sscanf(p+1, "%7[0-9]Cx%7[0-9]C", width, height) == 2) {
                 /* chars */
                 qemu_opt_set(opts, "cols", width);
                 qemu_opt_set(opts, "rows", height);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yKn-00020O-Jy; Tue, 28 Jan 2014 02:23: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 1W7yKm-000203-TA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:29 +0000
Received: from [85.158.139.211:12923] by server-12.bemta-5.messagelabs.com id
	A5/F7-30017-0A417E25; Tue, 28 Jan 2014 02:23:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390875806!12103875!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3599 invoked from network); 28 Jan 2014 02:23:27 -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;
	28 Jan 2014 02:23: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 1W7yKk-0005zQ-4U
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKk-0000rH-2x
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:26 +0000
Date: Tue, 28 Jan 2014 02:23:26 +0000
Message-Id: <E1W7yKk-0000rH-2x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu-char: Fix potential
	out of bounds access to local arrays
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4048932353192476555=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 78bd79fac33a56156d1d05a7f0547a0b7c282225
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Mon Sep 30 23:04:49 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 2 21:43:54 2013 -0600

    qemu-char: Fix potential out of bounds access to local arrays
    
    Latest gcc-4.8 supports a new option -fsanitize=address which activates
    an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation
    very early because two character arrays of size 8 are potentially written
    with 9 bytes.
    
    Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code.
    
    There is no obvious reason why width or height could need 8 characters,
    so reduce it to 7 characters which together with the terminating '\0'
    fit into the arrays.
    
    Cc: qemu-stable <qemu-stable@nongnu.org>
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Alex Bennée <alex@bennee.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (cherry picked from commit 49aa4058ac6dd0081aaa45776f07c98df397ca5e)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-char.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index fc1c23d..649c9f9 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2969,11 +2969,11 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
     if (strstart(filename, "vc", &p)) {
         qemu_opt_set(opts, "backend", "vc");
         if (*p == ':') {
-            if (sscanf(p+1, "%8[0-9]x%8[0-9]", width, height) == 2) {
+            if (sscanf(p+1, "%7[0-9]x%7[0-9]", width, height) == 2) {
                 /* pixels */
                 qemu_opt_set(opts, "width", width);
                 qemu_opt_set(opts, "height", height);
-            } else if (sscanf(p+1, "%8[0-9]Cx%8[0-9]C", width, height) == 2) {
+            } else if (sscanf(p+1, "%7[0-9]Cx%7[0-9]C", width, height) == 2) {
                 /* chars */
                 qemu_opt_set(opts, "cols", width);
                 qemu_opt_set(opts, "rows", height);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23: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 1W7yKx-00022N-NJ; Tue, 28 Jan 2014 02:23: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 1W7yKw-00022E-Qo
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:39 +0000
Received: from [193.109.254.147:20600] by server-4.bemta-14.messagelabs.com id
	5D/D5-03916-AA417E25; Tue, 28 Jan 2014 02:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1390875816!235010!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28786 invoked from network); 28 Jan 2014 02:23:37 -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;
	28 Jan 2014 02: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 1W7yKu-0005zY-9F
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKu-0000rt-7r
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:36 +0000
Date: Tue, 28 Jan 2014 02:23:36 +0000
Message-Id: <E1W7yKu-0000rt-7r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen_disk: mark ioreq as
	mapped before unmapping in error case
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 99b5b999a4fc03ad6164b71af97406657c1ff14a
Author:     Matthew Daley <mattjd@gmail.com>
AuthorDate: Thu Oct 10 14:10:48 2013 +0000
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 14:07:20 2013 -0600

    xen_disk: mark ioreq as mapped before unmapping in error case
    
    Commit 4472beae modified the semantics of ioreq_{un,}map so that they are
    idempotent if called when they're not needed (ie., twice in a row). However,
    it neglected to handle the case where batch mapping is not being used (the
    default), and one of the grants fails to map. In this case, ioreq_unmap will
    be called to unwind and unmap any mappings already performed, but ioreq_unmap
    simply returns due to the aforementioned change (the ioreq has not already
    been marked as mapped).
    
    The frontend user can therefore force xen_disk to leak grant mappings, a
    per-domain limited resource.
    
    Fix by marking the ioreq as mapped before calling ioreq_unmap in this
    situation.
    
    Signed-off-by: Matthew Daley <mattjd@gmail.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    (cherry picked from commit a76f48e53382e6f039db6278443e3ce437653302)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/block/xen_disk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 727f433..03e30d7 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -405,6 +405,7 @@ static int ioreq_map(struct ioreq *ioreq)
                 xen_be_printf(&ioreq->blkdev->xendev, 0,
                               "can't map grant ref %d (%s, %d maps)\n",
                               refs[i], strerror(errno), ioreq->blkdev->cnt_map);
+                ioreq->mapped = 1;
                 ioreq_unmap(ioreq);
                 return -1;
             }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:23: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 1W7yKx-00022N-NJ; Tue, 28 Jan 2014 02:23: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 1W7yKw-00022E-Qo
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:39 +0000
Received: from [193.109.254.147:20600] by server-4.bemta-14.messagelabs.com id
	5D/D5-03916-AA417E25; Tue, 28 Jan 2014 02:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1390875816!235010!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28786 invoked from network); 28 Jan 2014 02:23:37 -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;
	28 Jan 2014 02: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 1W7yKu-0005zY-9F
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yKu-0000rt-7r
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:36 +0000
Date: Tue, 28 Jan 2014 02:23:36 +0000
Message-Id: <E1W7yKu-0000rt-7r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen_disk: mark ioreq as
	mapped before unmapping in error case
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 99b5b999a4fc03ad6164b71af97406657c1ff14a
Author:     Matthew Daley <mattjd@gmail.com>
AuthorDate: Thu Oct 10 14:10:48 2013 +0000
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 14:07:20 2013 -0600

    xen_disk: mark ioreq as mapped before unmapping in error case
    
    Commit 4472beae modified the semantics of ioreq_{un,}map so that they are
    idempotent if called when they're not needed (ie., twice in a row). However,
    it neglected to handle the case where batch mapping is not being used (the
    default), and one of the grants fails to map. In this case, ioreq_unmap will
    be called to unwind and unmap any mappings already performed, but ioreq_unmap
    simply returns due to the aforementioned change (the ioreq has not already
    been marked as mapped).
    
    The frontend user can therefore force xen_disk to leak grant mappings, a
    per-domain limited resource.
    
    Fix by marking the ioreq as mapped before calling ioreq_unmap in this
    situation.
    
    Signed-off-by: Matthew Daley <mattjd@gmail.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    (cherry picked from commit a76f48e53382e6f039db6278443e3ce437653302)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/block/xen_disk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 727f433..03e30d7 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -405,6 +405,7 @@ static int ioreq_map(struct ioreq *ioreq)
                 xen_be_printf(&ioreq->blkdev->xendev, 0,
                               "can't map grant ref %d (%s, %d maps)\n",
                               refs[i], strerror(errno), ioreq->blkdev->cnt_map);
+                ioreq->mapped = 1;
                 ioreq_unmap(ioreq);
                 return -1;
             }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yL8-000246-1f; Tue, 28 Jan 2014 02:23: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 1W7yL6-00023x-QI
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:48 +0000
Received: from [193.109.254.147:20920] by server-13.bemta-14.messagelabs.com
	id 05/CE-19374-4B417E25; Tue, 28 Jan 2014 02:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1390875826!238744!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25356 invoked from network); 28 Jan 2014 02:23:47 -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;
	28 Jan 2014 02: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 1W7yL4-0005ze-Di
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yL4-0000si-CD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:46 +0000
Date: Tue, 28 Jan 2014 02:23:46 +0000
Message-Id: <E1W7yL4-0000si-CD@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vmdk: Fix
	vmdk_parse_extents
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b685f6af6f3aa34a845f156b334c1e24661fd344
Author:     Fam Zheng <famz@redhat.com>
AuthorDate: Fri Oct 11 19:48:29 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 14:08:26 2013 -0600

    vmdk: Fix vmdk_parse_extents
    
    An extra 'p++' after while loop when *p == '\n' will move p to unknown
    data position, risking parsing junk data or memory access violation.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Fam Zheng <famz@redhat.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 899f1ae219d5eaa96a53c996026cb0178d62a86d)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/vmdk.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 258a24f..dcee07a 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -755,10 +755,13 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
         }
 next_line:
         /* move to next line */
-        while (*p && *p != '\n') {
+        while (*p) {
+            if (*p == '\n') {
+                p++;
+                break;
+            }
             p++;
         }
-        p++;
     }
     return 0;
 }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yL8-000246-1f; Tue, 28 Jan 2014 02:23: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 1W7yL6-00023x-QI
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:48 +0000
Received: from [193.109.254.147:20920] by server-13.bemta-14.messagelabs.com
	id 05/CE-19374-4B417E25; Tue, 28 Jan 2014 02:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1390875826!238744!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25356 invoked from network); 28 Jan 2014 02:23:47 -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;
	28 Jan 2014 02: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 1W7yL4-0005ze-Di
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yL4-0000si-CD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:46 +0000
Date: Tue, 28 Jan 2014 02:23:46 +0000
Message-Id: <E1W7yL4-0000si-CD@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vmdk: Fix
	vmdk_parse_extents
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b685f6af6f3aa34a845f156b334c1e24661fd344
Author:     Fam Zheng <famz@redhat.com>
AuthorDate: Fri Oct 11 19:48:29 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 14:08:26 2013 -0600

    vmdk: Fix vmdk_parse_extents
    
    An extra 'p++' after while loop when *p == '\n' will move p to unknown
    data position, risking parsing junk data or memory access violation.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Fam Zheng <famz@redhat.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 899f1ae219d5eaa96a53c996026cb0178d62a86d)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/vmdk.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 258a24f..dcee07a 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -755,10 +755,13 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
         }
 next_line:
         /* move to next line */
-        while (*p && *p != '\n') {
+        while (*p) {
+            if (*p == '\n') {
+                p++;
+                break;
+            }
             p++;
         }
-        p++;
     }
     return 0;
 }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLI-00025g-6v; Tue, 28 Jan 2014 02:24:00 +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 1W7yLH-00025V-0Y
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:59 +0000
Received: from [85.158.143.35:48158] by server-1.bemta-4.messagelabs.com id
	26/7C-02132-EB417E25; Tue, 28 Jan 2014 02:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1390875836!1200940!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8920 invoked from network); 28 Jan 2014 02:23:57 -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;
	28 Jan 2014 02: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 1W7yLE-0005zn-Ii
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLE-0000tB-HA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:56 +0000
Date: Tue, 28 Jan 2014 02:23:56 +0000
Message-Id: <E1W7yLE-0000tB-HA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] audio: honor
	QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 91a2cf3d0b367c3f009a83637fc5255fdf2cf8eb
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Wed Oct 9 21:33:44 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 15:59:25 2013 -0600

    audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second
    
    Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has
    clearly shown it self by trying to make a timer fire every nano second.
    
    Note we have a similar problem in 1.6, 1.5 and older but there
    MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to
    4000 times / second. This still causes a host cpu load of 50 % for simply
    playing audio, where as with this patch git master is at 13%, so we should
    backport this to 1.5 and 1.6 too.
    
    Note this will not apply to 1.5 and 1.6 as is.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    (cherry picked from commit b4350deed67b95651896ddb60cf9f765093a4848)
    
    Conflicts:
    
    	audio/audio.c
    
    *fixed to reflect 1.6 timer function/clock names
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 audio/audio.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 02bb886..bcd41a9 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1124,7 +1124,8 @@ static int audio_is_timer_needed (void)
 static void audio_reset_timer (AudioState *s)
 {
     if (audio_is_timer_needed ()) {
-        qemu_mod_timer (s->ts, qemu_get_clock_ns (vm_clock) + 1);
+        qemu_mod_timer (s->ts,
+            qemu_get_clock_ns(vm_clock) + conf.period.ticks);
     }
     else {
         qemu_del_timer (s->ts);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLI-00025g-6v; Tue, 28 Jan 2014 02:24:00 +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 1W7yLH-00025V-0Y
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:59 +0000
Received: from [85.158.143.35:48158] by server-1.bemta-4.messagelabs.com id
	26/7C-02132-EB417E25; Tue, 28 Jan 2014 02:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1390875836!1200940!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8920 invoked from network); 28 Jan 2014 02:23:57 -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;
	28 Jan 2014 02: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 1W7yLE-0005zn-Ii
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLE-0000tB-HA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:23:56 +0000
Date: Tue, 28 Jan 2014 02:23:56 +0000
Message-Id: <E1W7yLE-0000tB-HA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] audio: honor
	QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 91a2cf3d0b367c3f009a83637fc5255fdf2cf8eb
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Wed Oct 9 21:33:44 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 15:59:25 2013 -0600

    audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second
    
    Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has
    clearly shown it self by trying to make a timer fire every nano second.
    
    Note we have a similar problem in 1.6, 1.5 and older but there
    MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to
    4000 times / second. This still causes a host cpu load of 50 % for simply
    playing audio, where as with this patch git master is at 13%, so we should
    backport this to 1.5 and 1.6 too.
    
    Note this will not apply to 1.5 and 1.6 as is.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    (cherry picked from commit b4350deed67b95651896ddb60cf9f765093a4848)
    
    Conflicts:
    
    	audio/audio.c
    
    *fixed to reflect 1.6 timer function/clock names
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 audio/audio.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 02bb886..bcd41a9 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1124,7 +1124,8 @@ static int audio_is_timer_needed (void)
 static void audio_reset_timer (AudioState *s)
 {
     if (audio_is_timer_needed ()) {
-        qemu_mod_timer (s->ts, qemu_get_clock_ns (vm_clock) + 1);
+        qemu_mod_timer (s->ts,
+            qemu_get_clock_ns(vm_clock) + conf.period.ticks);
     }
     else {
         qemu_del_timer (s->ts);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLT-00027G-Aa; Tue, 28 Jan 2014 02:24:11 +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 1W7yLR-000277-HX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:09 +0000
Received: from [85.158.139.211:33443] by server-1.bemta-5.messagelabs.com id
	38/EF-21065-8C417E25; Tue, 28 Jan 2014 02:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1390875847!12295823!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22881 invoked from network); 28 Jan 2014 02:24:08 -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;
	28 Jan 2014 02:24:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLO-00060M-PB
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLO-0000tn-MO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:06 +0000
Date: Tue, 28 Jan 2014 02:24:06 +0000
Message-Id: <E1W7yLO-0000tn-MO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] monitor: eliminate
	monitor_event_state_lock
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7bda8555de4507685bc5713d1239f341718bbf1d
Author:     Paolo Bonzini <pbonzini@redhat.com>
AuthorDate: Wed Oct 16 19:17:08 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:04:30 2013 -0600

    monitor: eliminate monitor_event_state_lock
    
    This lock does not protect anything that the BQL does not already
    protect.  Furthermore, with -nodefaults and no monitor, the mutex
    is not initialized but monitor_protocol_event_queue is called
    anyway, which causes a crash under mingw (and only works by luck.
    under Linux or other POSIX OSes).
    
    Reported-by: Orx Goshen <orx.goshen@intel.com>
    Cc: Daniel Berrange <berrange@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    (cherry picked from commit c20b7fa4b2fedd979bcb0cc974bb5d08a10e3448)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 monitor.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/monitor.c b/monitor.c
index 5dc0aa9..99bfcd9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -508,7 +508,6 @@ static const char *monitor_event_names[] = {
 QEMU_BUILD_BUG_ON(ARRAY_SIZE(monitor_event_names) != QEVENT_MAX)
 
 MonitorEventState monitor_event_state[QEVENT_MAX];
-QemuMutex monitor_event_state_lock;
 
 /*
  * Emits the event to every monitor instance
@@ -540,7 +539,6 @@ monitor_protocol_event_queue(MonitorEvent event,
     int64_t now = qemu_get_clock_ns(rt_clock);
     assert(event < QEVENT_MAX);
 
-    qemu_mutex_lock(&monitor_event_state_lock);
     evstate = &(monitor_event_state[event]);
     trace_monitor_protocol_event_queue(event,
                                        data,
@@ -573,7 +571,6 @@ monitor_protocol_event_queue(MonitorEvent event,
             evstate->last = now;
         }
     }
-    qemu_mutex_unlock(&monitor_event_state_lock);
 }
 
 
@@ -586,7 +583,6 @@ static void monitor_protocol_event_handler(void *opaque)
     MonitorEventState *evstate = opaque;
     int64_t now = qemu_get_clock_ns(rt_clock);
 
-    qemu_mutex_lock(&monitor_event_state_lock);
 
     trace_monitor_protocol_event_handler(evstate->event,
                                          evstate->data,
@@ -598,7 +594,6 @@ static void monitor_protocol_event_handler(void *opaque)
         evstate->data = NULL;
     }
     evstate->last = now;
-    qemu_mutex_unlock(&monitor_event_state_lock);
 }
 
 
@@ -635,7 +630,6 @@ monitor_protocol_event_throttle(MonitorEvent event,
  * and initialize state */
 static void monitor_protocol_event_init(void)
 {
-    qemu_mutex_init(&monitor_event_state_lock);
     /* Limit RTC & BALLOON events to 1 per second */
     monitor_protocol_event_throttle(QEVENT_RTC_CHANGE, 1000);
     monitor_protocol_event_throttle(QEVENT_BALLOON_CHANGE, 1000);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLT-00027G-Aa; Tue, 28 Jan 2014 02:24:11 +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 1W7yLR-000277-HX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:09 +0000
Received: from [85.158.139.211:33443] by server-1.bemta-5.messagelabs.com id
	38/EF-21065-8C417E25; Tue, 28 Jan 2014 02:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1390875847!12295823!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22881 invoked from network); 28 Jan 2014 02:24:08 -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;
	28 Jan 2014 02:24:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLO-00060M-PB
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLO-0000tn-MO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:06 +0000
Date: Tue, 28 Jan 2014 02:24:06 +0000
Message-Id: <E1W7yLO-0000tn-MO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] monitor: eliminate
	monitor_event_state_lock
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7bda8555de4507685bc5713d1239f341718bbf1d
Author:     Paolo Bonzini <pbonzini@redhat.com>
AuthorDate: Wed Oct 16 19:17:08 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:04:30 2013 -0600

    monitor: eliminate monitor_event_state_lock
    
    This lock does not protect anything that the BQL does not already
    protect.  Furthermore, with -nodefaults and no monitor, the mutex
    is not initialized but monitor_protocol_event_queue is called
    anyway, which causes a crash under mingw (and only works by luck.
    under Linux or other POSIX OSes).
    
    Reported-by: Orx Goshen <orx.goshen@intel.com>
    Cc: Daniel Berrange <berrange@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    (cherry picked from commit c20b7fa4b2fedd979bcb0cc974bb5d08a10e3448)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 monitor.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/monitor.c b/monitor.c
index 5dc0aa9..99bfcd9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -508,7 +508,6 @@ static const char *monitor_event_names[] = {
 QEMU_BUILD_BUG_ON(ARRAY_SIZE(monitor_event_names) != QEVENT_MAX)
 
 MonitorEventState monitor_event_state[QEVENT_MAX];
-QemuMutex monitor_event_state_lock;
 
 /*
  * Emits the event to every monitor instance
@@ -540,7 +539,6 @@ monitor_protocol_event_queue(MonitorEvent event,
     int64_t now = qemu_get_clock_ns(rt_clock);
     assert(event < QEVENT_MAX);
 
-    qemu_mutex_lock(&monitor_event_state_lock);
     evstate = &(monitor_event_state[event]);
     trace_monitor_protocol_event_queue(event,
                                        data,
@@ -573,7 +571,6 @@ monitor_protocol_event_queue(MonitorEvent event,
             evstate->last = now;
         }
     }
-    qemu_mutex_unlock(&monitor_event_state_lock);
 }
 
 
@@ -586,7 +583,6 @@ static void monitor_protocol_event_handler(void *opaque)
     MonitorEventState *evstate = opaque;
     int64_t now = qemu_get_clock_ns(rt_clock);
 
-    qemu_mutex_lock(&monitor_event_state_lock);
 
     trace_monitor_protocol_event_handler(evstate->event,
                                          evstate->data,
@@ -598,7 +594,6 @@ static void monitor_protocol_event_handler(void *opaque)
         evstate->data = NULL;
     }
     evstate->last = now;
-    qemu_mutex_unlock(&monitor_event_state_lock);
 }
 
 
@@ -635,7 +630,6 @@ monitor_protocol_event_throttle(MonitorEvent event,
  * and initialize state */
 static void monitor_protocol_event_init(void)
 {
-    qemu_mutex_init(&monitor_event_state_lock);
     /* Limit RTC & BALLOON events to 1 per second */
     monitor_protocol_event_throttle(QEVENT_RTC_CHANGE, 1000);
     monitor_protocol_event_throttle(QEVENT_BALLOON_CHANGE, 1000);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLd-000297-Iw; Tue, 28 Jan 2014 02:24: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 1W7yLb-00028o-6w
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:20 +0000
Received: from [193.109.254.147:21823] by server-15.bemta-14.messagelabs.com
	id 2D/D5-22186-2D417E25; Tue, 28 Jan 2014 02:24:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1390875857!242605!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4501 invoked from network); 28 Jan 2014 02:24:18 -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;
	28 Jan 2014 02: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 1W7yLY-00060f-Tr
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLY-0000uB-S8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:16 +0000
Date: Tue, 28 Jan 2014 02:24:16 +0000
Message-Id: <E1W7yLY-0000uB-S8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] memory: fix 128 arithmetic
	in info mtree
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit bd821a9bc3cc4fc5fe8912deac883e6a4b00bc6a
Author:     Alexey Kardashevskiy <aik@ozlabs.ru>
AuthorDate: Fri Aug 30 18:10:38 2013 +1000
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:05:41 2013 -0600

    memory: fix 128 arithmetic in info mtree
    
    mtree_print_mr() calls int128_get64() in 3 places but only 2 places
    handle 2^64 correctly.
    
    This fixes the third call of int128_get64().
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit a66670c79c5c7d530d818430ffcdaa25cbf2c2ab)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 memory.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index 5a10fd0..7f1f266 100644
--- a/memory.c
+++ b/memory.c
@@ -1809,7 +1809,9 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
                    mr->alias->name,
                    mr->alias_offset,
                    mr->alias_offset
-                   + (hwaddr)int128_get64(mr->size) - 1);
+                   + (int128_nz(mr->size) ?
+                      (hwaddr)int128_get64(int128_sub(mr->size,
+                                                      int128_one())) : 0));
     } else {
         mon_printf(f,
                    TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %c%c): %s\n",
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yLd-000297-Iw; Tue, 28 Jan 2014 02:24: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 1W7yLb-00028o-6w
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:20 +0000
Received: from [193.109.254.147:21823] by server-15.bemta-14.messagelabs.com
	id 2D/D5-22186-2D417E25; Tue, 28 Jan 2014 02:24:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1390875857!242605!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4501 invoked from network); 28 Jan 2014 02:24:18 -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;
	28 Jan 2014 02: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 1W7yLY-00060f-Tr
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLY-0000uB-S8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:16 +0000
Date: Tue, 28 Jan 2014 02:24:16 +0000
Message-Id: <E1W7yLY-0000uB-S8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] memory: fix 128 arithmetic
	in info mtree
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit bd821a9bc3cc4fc5fe8912deac883e6a4b00bc6a
Author:     Alexey Kardashevskiy <aik@ozlabs.ru>
AuthorDate: Fri Aug 30 18:10:38 2013 +1000
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:05:41 2013 -0600

    memory: fix 128 arithmetic in info mtree
    
    mtree_print_mr() calls int128_get64() in 3 places but only 2 places
    handle 2^64 correctly.
    
    This fixes the third call of int128_get64().
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit a66670c79c5c7d530d818430ffcdaa25cbf2c2ab)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 memory.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index 5a10fd0..7f1f266 100644
--- a/memory.c
+++ b/memory.c
@@ -1809,7 +1809,9 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
                    mr->alias->name,
                    mr->alias_offset,
                    mr->alias_offset
-                   + (hwaddr)int128_get64(mr->size) - 1);
+                   + (int128_nz(mr->size) ?
+                      (hwaddr)int128_get64(int128_sub(mr->size,
+                                                      int128_one())) : 0));
     } else {
         mon_printf(f,
                    TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %c%c): %s\n",
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yLn-0002Aq-Ll; Tue, 28 Jan 2014 02:24: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 1W7yLl-0002AU-MG
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:29 +0000
Received: from [193.109.254.147:49801] by server-8.bemta-14.messagelabs.com id
	76/D5-30921-DD417E25; Tue, 28 Jan 2014 02:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390875867!243596!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4416 invoked from network); 28 Jan 2014 02:24:28 -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;
	28 Jan 2014 02: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 1W7yLj-00060l-1u
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLj-0000w3-0R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:27 +0000
Date: Tue, 28 Jan 2014 02:24:27 +0000
Message-Id: <E1W7yLj-0000w3-0R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Adjust qapi-visit for
	python-2.4.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0ca1774b619dc53db5eb1419d12efcd433f9fe3d
Author:     Richard Henderson <rth@twiddle.net>
AuthorDate: Thu Oct 31 13:26:01 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:09:50 2013 -0600

    Adjust qapi-visit for python-2.4.3
    
    We say we support python 2.4, but python 2.4.3 does not
    support the "expr if test else expr" syntax used here.
    
    This allows QEMU to compile on RHEL 5.3, the last release for ia64.
    
    Signed-off-by: Richard Henderson <rth@twiddle.net>
    Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    (cherry picked from commit 7b75d9d61bf9b7b43f6df2fb2fbfc38c4eb9d2e9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 scripts/qapi-visit.py |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index 597cca4..02e16bb 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -20,7 +20,10 @@ import errno
 def generate_visit_struct_fields(name, field_prefix, fn_prefix, members):
     substructs = []
     ret = ''
-    full_name = name if not fn_prefix else "%s_%s" % (name, fn_prefix)
+    if not fn_prefix:
+        full_name = name
+    else:
+        full_name = "%s_%s" % (name, fn_prefix)
 
     for argname, argentry, optional, structured in parse_args(members):
         if structured:
@@ -84,7 +87,10 @@ if (!error_is_set(errp)) {
 ''')
     push_indent()
 
-    full_name = name if not field_prefix else "%s_%s" % (field_prefix, name)
+    if not field_prefix:
+        full_name = name
+    else:
+        full_name = "%s_%s" % (field_prefix, name)
 
     if len(field_prefix):
         ret += mcgen('''
@@ -265,12 +271,17 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error **
             name=name)
 
     pop_indent()
+
+    if not discriminator:
+        desc_type = "type"
+    else:
+        desc_type = discriminator
     ret += mcgen('''
         visit_type_%(name)sKind(m, &(*obj)->kind, "%(type)s", &err);
         if (!err) {
             switch ((*obj)->kind) {
 ''',
-                 name=name, type="type" if not discriminator else discriminator)
+                 name=name, type=desc_type)
 
     for key in members:
         if not discriminator:
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yLn-0002Aq-Ll; Tue, 28 Jan 2014 02:24: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 1W7yLl-0002AU-MG
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:29 +0000
Received: from [193.109.254.147:49801] by server-8.bemta-14.messagelabs.com id
	76/D5-30921-DD417E25; Tue, 28 Jan 2014 02:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390875867!243596!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4416 invoked from network); 28 Jan 2014 02:24:28 -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;
	28 Jan 2014 02: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 1W7yLj-00060l-1u
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLj-0000w3-0R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:27 +0000
Date: Tue, 28 Jan 2014 02:24:27 +0000
Message-Id: <E1W7yLj-0000w3-0R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Adjust qapi-visit for
	python-2.4.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0ca1774b619dc53db5eb1419d12efcd433f9fe3d
Author:     Richard Henderson <rth@twiddle.net>
AuthorDate: Thu Oct 31 13:26:01 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 16:09:50 2013 -0600

    Adjust qapi-visit for python-2.4.3
    
    We say we support python 2.4, but python 2.4.3 does not
    support the "expr if test else expr" syntax used here.
    
    This allows QEMU to compile on RHEL 5.3, the last release for ia64.
    
    Signed-off-by: Richard Henderson <rth@twiddle.net>
    Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    (cherry picked from commit 7b75d9d61bf9b7b43f6df2fb2fbfc38c4eb9d2e9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 scripts/qapi-visit.py |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index 597cca4..02e16bb 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -20,7 +20,10 @@ import errno
 def generate_visit_struct_fields(name, field_prefix, fn_prefix, members):
     substructs = []
     ret = ''
-    full_name = name if not fn_prefix else "%s_%s" % (name, fn_prefix)
+    if not fn_prefix:
+        full_name = name
+    else:
+        full_name = "%s_%s" % (name, fn_prefix)
 
     for argname, argentry, optional, structured in parse_args(members):
         if structured:
@@ -84,7 +87,10 @@ if (!error_is_set(errp)) {
 ''')
     push_indent()
 
-    full_name = name if not field_prefix else "%s_%s" % (field_prefix, name)
+    if not field_prefix:
+        full_name = name
+    else:
+        full_name = "%s_%s" % (field_prefix, name)
 
     if len(field_prefix):
         ret += mcgen('''
@@ -265,12 +271,17 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error **
             name=name)
 
     pop_indent()
+
+    if not discriminator:
+        desc_type = "type"
+    else:
+        desc_type = discriminator
     ret += mcgen('''
         visit_type_%(name)sKind(m, &(*obj)->kind, "%(type)s", &err);
         if (!err) {
             switch ((*obj)->kind) {
 ''',
-                 name=name, type="type" if not discriminator else discriminator)
+                 name=name, type=desc_type)
 
     for key in members:
         if not discriminator:
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yLy-0002Ci-Mv; Tue, 28 Jan 2014 02:24:42 +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 1W7yLw-0002CD-0N
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:40 +0000
Received: from [85.158.139.211:38170] by server-2.bemta-5.messagelabs.com id
	78/09-29392-7E417E25; Tue, 28 Jan 2014 02:24:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1390875877!432935!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3904 invoked from network); 28 Jan 2014 02:24: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;
	28 Jan 2014 02:24: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 1W7yLt-00060t-Ac
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLt-0000wU-51
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:37 +0000
Date: Tue, 28 Jan 2014 02:24:37 +0000
Message-Id: <E1W7yLt-0000wU-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: detect endian
	via compile test
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ba3b29e04bab5b1c79920a38e88201c171b5ece4
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Sun Jun 30 23:30:18 2013 -0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:06:05 2013 -0600

    configure: detect endian via compile test
    
    This avoids needing to execute a program and keeping an (incomplete)
    list when cross-compiling.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Tested-by: James Hogan <james.hogan@imgtec.com> [mips]
    Message-id: 1372649418-4987-1-git-send-email-vapier@gentoo.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 61cc919f73ea7ca134c0ac41b748981ad63a253b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |   40 ++++++++++++++--------------------------
 1 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/configure b/configure
index 4cf672d..1399de2 100755
--- a/configure
+++ b/configure
@@ -1394,39 +1394,27 @@ feature_not_found() {
       "configure was not able to find it"
 }
 
-if test -z "$cross_prefix" ; then
-
 # ---
 # big/little endian test
 cat > $TMPC << EOF
-#include <inttypes.h>
-int main(void) {
-        volatile uint32_t i=0x01234567;
-        return (*((uint8_t*)(&i))) == 0x67;
+short big_endian[] = { 0x4269, 0x4765, 0x4e64, 0x4961, 0x4e00, 0, };
+short little_endian[] = { 0x694c, 0x7454, 0x654c, 0x6e45, 0x6944, 0x6e41, 0, };
+extern int foo(short *, short *);
+int main(int argc, char *argv[]) {
+    return foo(big_endian, little_endian);
 }
 EOF
 
-if compile_prog "" "" ; then
-$TMPE && bigendian="yes"
-else
-echo big/little test failed
-fi
-
-else
-
-# if cross compiling, cannot launch a program, so make a static guess
-case "$cpu" in
-  arm)
-    # ARM can be either way; ask the compiler which one we are
-    if check_define __ARMEB__; then
-      bigendian=yes
+if compile_object ; then
+    if grep -q BiGeNdIaN $TMPO ; then
+        bigendian="yes"
+    elif grep -q LiTtLeEnDiAn $TMPO ; then
+        bigendian="no"
+    else
+        echo big/little test failed
     fi
-  ;;
-  hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
-    bigendian=yes
-  ;;
-esac
-
+else
+    echo big/little test failed
 fi
 
 ##########################################
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02: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 1W7yLy-0002Ci-Mv; Tue, 28 Jan 2014 02:24:42 +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 1W7yLw-0002CD-0N
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:40 +0000
Received: from [85.158.139.211:38170] by server-2.bemta-5.messagelabs.com id
	78/09-29392-7E417E25; Tue, 28 Jan 2014 02:24:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1390875877!432935!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3904 invoked from network); 28 Jan 2014 02:24: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;
	28 Jan 2014 02:24: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 1W7yLt-00060t-Ac
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yLt-0000wU-51
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:37 +0000
Date: Tue, 28 Jan 2014 02:24:37 +0000
Message-Id: <E1W7yLt-0000wU-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: detect endian
	via compile test
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ba3b29e04bab5b1c79920a38e88201c171b5ece4
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Sun Jun 30 23:30:18 2013 -0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:06:05 2013 -0600

    configure: detect endian via compile test
    
    This avoids needing to execute a program and keeping an (incomplete)
    list when cross-compiling.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Tested-by: James Hogan <james.hogan@imgtec.com> [mips]
    Message-id: 1372649418-4987-1-git-send-email-vapier@gentoo.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 61cc919f73ea7ca134c0ac41b748981ad63a253b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |   40 ++++++++++++++--------------------------
 1 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/configure b/configure
index 4cf672d..1399de2 100755
--- a/configure
+++ b/configure
@@ -1394,39 +1394,27 @@ feature_not_found() {
       "configure was not able to find it"
 }
 
-if test -z "$cross_prefix" ; then
-
 # ---
 # big/little endian test
 cat > $TMPC << EOF
-#include <inttypes.h>
-int main(void) {
-        volatile uint32_t i=0x01234567;
-        return (*((uint8_t*)(&i))) == 0x67;
+short big_endian[] = { 0x4269, 0x4765, 0x4e64, 0x4961, 0x4e00, 0, };
+short little_endian[] = { 0x694c, 0x7454, 0x654c, 0x6e45, 0x6944, 0x6e41, 0, };
+extern int foo(short *, short *);
+int main(int argc, char *argv[]) {
+    return foo(big_endian, little_endian);
 }
 EOF
 
-if compile_prog "" "" ; then
-$TMPE && bigendian="yes"
-else
-echo big/little test failed
-fi
-
-else
-
-# if cross compiling, cannot launch a program, so make a static guess
-case "$cpu" in
-  arm)
-    # ARM can be either way; ask the compiler which one we are
-    if check_define __ARMEB__; then
-      bigendian=yes
+if compile_object ; then
+    if grep -q BiGeNdIaN $TMPO ; then
+        bigendian="yes"
+    elif grep -q LiTtLeEnDiAn $TMPO ; then
+        bigendian="no"
+    else
+        echo big/little test failed
     fi
-  ;;
-  hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
-    bigendian=yes
-  ;;
-esac
-
+else
+    echo big/little test failed
 fi
 
 ##########################################
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yM6-0002EV-Qr; Tue, 28 Jan 2014 02:24: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 1W7yM6-0002EI-8U
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:50 +0000
Received: from [85.158.139.211:14992] by server-11.bemta-5.messagelabs.com id
	28/EE-23268-1F417E25; Tue, 28 Jan 2014 02:24:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1390875887!12300137!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27410 invoked from network); 28 Jan 2014 02:24:48 -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;
	28 Jan 2014 02: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 1W7yM3-00060z-F3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yM3-0000wu-Dj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:47 +0000
Date: Tue, 28 Jan 2014 02:24:47 +0000
Message-Id: <E1W7yM3-0000wu-Dj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qapi: fix memleak by
	adding implict struct functions in dealloc visitor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 08e2f35c65b0864fbe0d2e8d5df330316b4dd742
Author:     Wenchao Xia <xiawenc@linux.vnet.ibm.com>
AuthorDate: Wed Nov 6 02:35:50 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:07:13 2013 -0600

    qapi: fix memleak by adding implict struct functions in dealloc visitor
    
    Otherwise member "base" is leaked in a qapi_free_STRUCTURE() call.
    
    Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-id: 1383676551-18806-2-git-send-email-xiawenc@linux.vnet.ibm.com
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 3dce9cad5a6c0b0dbe0830973b270c9466c8ab4b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qapi/qapi-dealloc-visitor.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index 1334de3..dc53545 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -76,6 +76,24 @@ static void qapi_dealloc_end_struct(Visitor *v, Error **errp)
     }
 }
 
+static void qapi_dealloc_start_implicit_struct(Visitor *v,
+                                               void **obj,
+                                               size_t size,
+                                               Error **errp)
+{
+    QapiDeallocVisitor *qov = to_qov(v);
+    qapi_dealloc_push(qov, obj);
+}
+
+static void qapi_dealloc_end_implicit_struct(Visitor *v, Error **errp)
+{
+    QapiDeallocVisitor *qov = to_qov(v);
+    void **obj = qapi_dealloc_pop(qov);
+    if (obj) {
+        g_free(*obj);
+    }
+}
+
 static void qapi_dealloc_start_list(Visitor *v, const char *name, Error **errp)
 {
     QapiDeallocVisitor *qov = to_qov(v);
@@ -162,6 +180,8 @@ QapiDeallocVisitor *qapi_dealloc_visitor_new(void)
 
     v->visitor.start_struct = qapi_dealloc_start_struct;
     v->visitor.end_struct = qapi_dealloc_end_struct;
+    v->visitor.start_implicit_struct = qapi_dealloc_start_implicit_struct;
+    v->visitor.end_implicit_struct = qapi_dealloc_end_implicit_struct;
     v->visitor.start_list = qapi_dealloc_start_list;
     v->visitor.next_list = qapi_dealloc_next_list;
     v->visitor.end_list = qapi_dealloc_end_list;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:24:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:24: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 1W7yM6-0002EV-Qr; Tue, 28 Jan 2014 02:24: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 1W7yM6-0002EI-8U
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:50 +0000
Received: from [85.158.139.211:14992] by server-11.bemta-5.messagelabs.com id
	28/EE-23268-1F417E25; Tue, 28 Jan 2014 02:24:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1390875887!12300137!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27410 invoked from network); 28 Jan 2014 02:24:48 -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;
	28 Jan 2014 02: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 1W7yM3-00060z-F3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yM3-0000wu-Dj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:47 +0000
Date: Tue, 28 Jan 2014 02:24:47 +0000
Message-Id: <E1W7yM3-0000wu-Dj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qapi: fix memleak by
	adding implict struct functions in dealloc visitor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 08e2f35c65b0864fbe0d2e8d5df330316b4dd742
Author:     Wenchao Xia <xiawenc@linux.vnet.ibm.com>
AuthorDate: Wed Nov 6 02:35:50 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:07:13 2013 -0600

    qapi: fix memleak by adding implict struct functions in dealloc visitor
    
    Otherwise member "base" is leaked in a qapi_free_STRUCTURE() call.
    
    Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-id: 1383676551-18806-2-git-send-email-xiawenc@linux.vnet.ibm.com
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 3dce9cad5a6c0b0dbe0830973b270c9466c8ab4b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qapi/qapi-dealloc-visitor.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index 1334de3..dc53545 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -76,6 +76,24 @@ static void qapi_dealloc_end_struct(Visitor *v, Error **errp)
     }
 }
 
+static void qapi_dealloc_start_implicit_struct(Visitor *v,
+                                               void **obj,
+                                               size_t size,
+                                               Error **errp)
+{
+    QapiDeallocVisitor *qov = to_qov(v);
+    qapi_dealloc_push(qov, obj);
+}
+
+static void qapi_dealloc_end_implicit_struct(Visitor *v, Error **errp)
+{
+    QapiDeallocVisitor *qov = to_qov(v);
+    void **obj = qapi_dealloc_pop(qov);
+    if (obj) {
+        g_free(*obj);
+    }
+}
+
 static void qapi_dealloc_start_list(Visitor *v, const char *name, Error **errp)
 {
     QapiDeallocVisitor *qov = to_qov(v);
@@ -162,6 +180,8 @@ QapiDeallocVisitor *qapi_dealloc_visitor_new(void)
 
     v->visitor.start_struct = qapi_dealloc_start_struct;
     v->visitor.end_struct = qapi_dealloc_end_struct;
+    v->visitor.start_implicit_struct = qapi_dealloc_start_implicit_struct;
+    v->visitor.end_implicit_struct = qapi_dealloc_end_implicit_struct;
     v->visitor.start_list = qapi_dealloc_start_list;
     v->visitor.next_list = qapi_dealloc_next_list;
     v->visitor.end_list = qapi_dealloc_end_list;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMG-0002G0-Tl; Tue, 28 Jan 2014 02:25:00 +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 1W7yMG-0002Fn-7d
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:00 +0000
Received: from [85.158.139.211:15180] by server-12.bemta-5.messagelabs.com id
	66/88-30017-BF417E25; Tue, 28 Jan 2014 02:24:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1390875897!1528351!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27988 invoked from network); 28 Jan 2014 02:24:58 -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;
	28 Jan 2014 02:24: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 1W7yMD-000618-Ix
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMD-0000xG-Hv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:57 +0000
Date: Tue, 28 Jan 2014 02:24:57 +0000
Message-Id: <E1W7yMD-0000xG-Hv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: fix memleak in
	error path test for input visitor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c1fecf20854020dfc24a9e47adc7a49b4cd5fbce
Author:     Wenchao Xia <xiawenc@linux.vnet.ibm.com>
AuthorDate: Wed Nov 6 02:35:51 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:07:32 2013 -0600

    tests: fix memleak in error path test for input visitor
    
    Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-id: 1383676551-18806-3-git-send-email-xiawenc@linux.vnet.ibm.com
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 8aa15b6e527f234e491a6d354bed4d10da3a01a7)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/test-qmp-input-visitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 0beb8fb..1e1c6fa 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -604,6 +604,7 @@ static void test_visitor_in_errors(TestInputVisitorData *data,
     g_assert(error_is_set(&errp));
     g_assert(p->string == NULL);
 
+    error_free(errp);
     g_free(p->string);
     g_free(p);
 }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMG-0002G0-Tl; Tue, 28 Jan 2014 02:25:00 +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 1W7yMG-0002Fn-7d
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:00 +0000
Received: from [85.158.139.211:15180] by server-12.bemta-5.messagelabs.com id
	66/88-30017-BF417E25; Tue, 28 Jan 2014 02:24:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1390875897!1528351!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27988 invoked from network); 28 Jan 2014 02:24:58 -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;
	28 Jan 2014 02:24: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 1W7yMD-000618-Ix
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMD-0000xG-Hv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:24:57 +0000
Date: Tue, 28 Jan 2014 02:24:57 +0000
Message-Id: <E1W7yMD-0000xG-Hv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] tests: fix memleak in
	error path test for input visitor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c1fecf20854020dfc24a9e47adc7a49b4cd5fbce
Author:     Wenchao Xia <xiawenc@linux.vnet.ibm.com>
AuthorDate: Wed Nov 6 02:35:51 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 18:07:32 2013 -0600

    tests: fix memleak in error path test for input visitor
    
    Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-id: 1383676551-18806-3-git-send-email-xiawenc@linux.vnet.ibm.com
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 8aa15b6e527f234e491a6d354bed4d10da3a01a7)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/test-qmp-input-visitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 0beb8fb..1e1c6fa 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -604,6 +604,7 @@ static void test_visitor_in_errors(TestInputVisitorData *data,
     g_assert(error_is_set(&errp));
     g_assert(p->string == NULL);
 
+    error_free(errp);
     g_free(p->string);
     g_free(p);
 }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMc-0002ID-1U; Tue, 28 Jan 2014 02:25: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 1W7yMb-0002I5-10
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:21 +0000
Received: from [85.158.137.68:29396] by server-2.bemta-3.messagelabs.com id
	32/DB-17329-01517E25; Tue, 28 Jan 2014 02:25:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1390875918!11652281!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14931 invoked from network); 28 Jan 2014 02:25:19 -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;
	28 Jan 2014 02:25: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 1W7yMY-00061k-3V
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMY-0000yH-1x
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:18 +0000
Date: Tue, 28 Jan 2014 02:25:18 +0000
Message-Id: <E1W7yMY-0000yH-1x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] linux-user: Fix stat64
	syscall for SPARC64
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3bd74d1712c33a746b1aee45b809647f9353238c
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Wed Oct 30 22:52:24 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:53:12 2013 -0600

    linux-user: Fix stat64 syscall for SPARC64
    
    Some targets use a stat64 structure for the stat64 syscall while others
    use a stat structure. SPARC64 used the wrong kind.
    
    Instead of extending the conditional compilation in syscall.c, now a
    macro TARGET_HAS_STRUCT_STAT64 is defined whenever a target has a
    target_stat64.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Erik de Castro Lopo <erikd@mega-nerd.com>
    (cherry picked from commit 20d155bc902f41c5b354937e730ad85b43614ae9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 linux-user/syscall.c      |    6 +++---
 linux-user/syscall_defs.h |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f986548..c510975 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4764,10 +4764,10 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
     } else
 #endif
     {
-#if TARGET_ABI_BITS == 64 && !defined(TARGET_ALPHA)
-        struct target_stat *target_st;
-#else
+#if defined(TARGET_HAS_STRUCT_STAT64)
         struct target_stat64 *target_st;
+#else
+        struct target_stat *target_st;
 #endif
 
         if (!lock_user_struct(VERIFY_WRITE, target_st, target_addr, 0))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 086fbff..dd0d5a9 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1165,6 +1165,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned short	st_dev;
 	unsigned char	__pad0[10];
@@ -1200,6 +1201,7 @@ struct target_stat64 {
 } QEMU_PACKED;
 
 #ifdef TARGET_ARM
+#define TARGET_HAS_STRUCT_STAT64
 struct target_eabi_stat64 {
         unsigned long long st_dev;
         unsigned int    __pad1;
@@ -1249,6 +1251,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1304,6 +1307,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1371,6 +1375,8 @@ struct target_stat {
 #endif
 };
 
+#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long st_dev;
         unsigned long long st_ino;
@@ -1393,6 +1399,7 @@ struct QEMU_PACKED target_stat64 {
         unsigned int   __unused4;
         unsigned int   __unused5;
 };
+#endif
 
 #elif defined(TARGET_MICROBLAZE)
 
@@ -1418,6 +1425,7 @@ struct target_stat {
 };
 
 /* FIXME: Microblaze no-mmu user-space has a difference stat64 layout...  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	uint64_t st_dev;
 #define TARGET_STAT64_HAS_BROKEN_ST_INO 1
@@ -1473,6 +1481,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad1[2];
@@ -1581,6 +1590,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned int	st_dev;
 	unsigned int	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1652,6 +1662,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	abi_ulong	st_dev;
 	abi_ulong	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1708,6 +1719,7 @@ struct target_stat {
        unsigned int    st_gen;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
        abi_ulong    st_dev;
        abi_ulong    st_ino;
@@ -1757,6 +1769,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad0[4];
@@ -1862,6 +1875,7 @@ struct target_stat {
     unsigned int __unused5;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
     uint64_t st_dev;
     uint64_t st_ino;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMc-0002ID-1U; Tue, 28 Jan 2014 02:25: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 1W7yMb-0002I5-10
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:21 +0000
Received: from [85.158.137.68:29396] by server-2.bemta-3.messagelabs.com id
	32/DB-17329-01517E25; Tue, 28 Jan 2014 02:25:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1390875918!11652281!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14931 invoked from network); 28 Jan 2014 02:25:19 -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;
	28 Jan 2014 02:25: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 1W7yMY-00061k-3V
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMY-0000yH-1x
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:18 +0000
Date: Tue, 28 Jan 2014 02:25:18 +0000
Message-Id: <E1W7yMY-0000yH-1x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] linux-user: Fix stat64
	syscall for SPARC64
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3bd74d1712c33a746b1aee45b809647f9353238c
Author:     Stefan Weil <sw@weilnetz.de>
AuthorDate: Wed Oct 30 22:52:24 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:53:12 2013 -0600

    linux-user: Fix stat64 syscall for SPARC64
    
    Some targets use a stat64 structure for the stat64 syscall while others
    use a stat structure. SPARC64 used the wrong kind.
    
    Instead of extending the conditional compilation in syscall.c, now a
    macro TARGET_HAS_STRUCT_STAT64 is defined whenever a target has a
    target_stat64.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Reviewed-by: Erik de Castro Lopo <erikd@mega-nerd.com>
    (cherry picked from commit 20d155bc902f41c5b354937e730ad85b43614ae9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 linux-user/syscall.c      |    6 +++---
 linux-user/syscall_defs.h |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f986548..c510975 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4764,10 +4764,10 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
     } else
 #endif
     {
-#if TARGET_ABI_BITS == 64 && !defined(TARGET_ALPHA)
-        struct target_stat *target_st;
-#else
+#if defined(TARGET_HAS_STRUCT_STAT64)
         struct target_stat64 *target_st;
+#else
+        struct target_stat *target_st;
 #endif
 
         if (!lock_user_struct(VERIFY_WRITE, target_st, target_addr, 0))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 086fbff..dd0d5a9 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1165,6 +1165,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned short	st_dev;
 	unsigned char	__pad0[10];
@@ -1200,6 +1201,7 @@ struct target_stat64 {
 } QEMU_PACKED;
 
 #ifdef TARGET_ARM
+#define TARGET_HAS_STRUCT_STAT64
 struct target_eabi_stat64 {
         unsigned long long st_dev;
         unsigned int    __pad1;
@@ -1249,6 +1251,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1304,6 +1307,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1371,6 +1375,8 @@ struct target_stat {
 #endif
 };
 
+#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long st_dev;
         unsigned long long st_ino;
@@ -1393,6 +1399,7 @@ struct QEMU_PACKED target_stat64 {
         unsigned int   __unused4;
         unsigned int   __unused5;
 };
+#endif
 
 #elif defined(TARGET_MICROBLAZE)
 
@@ -1418,6 +1425,7 @@ struct target_stat {
 };
 
 /* FIXME: Microblaze no-mmu user-space has a difference stat64 layout...  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	uint64_t st_dev;
 #define TARGET_STAT64_HAS_BROKEN_ST_INO 1
@@ -1473,6 +1481,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad1[2];
@@ -1581,6 +1590,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned int	st_dev;
 	unsigned int	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1652,6 +1662,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	abi_ulong	st_dev;
 	abi_ulong	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1708,6 +1719,7 @@ struct target_stat {
        unsigned int    st_gen;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
        abi_ulong    st_dev;
        abi_ulong    st_ino;
@@ -1757,6 +1769,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad0[4];
@@ -1862,6 +1875,7 @@ struct target_stat {
     unsigned int __unused5;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
     uint64_t st_dev;
     uint64_t st_ino;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMh-0002J0-Cc; Tue, 28 Jan 2014 02:25:27 +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 1W7yMf-0002Im-Lt
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:25 +0000
Received: from [193.109.254.147:51277] by server-5.bemta-14.messagelabs.com id
	C2/FD-03510-41517E25; Tue, 28 Jan 2014 02:25:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1390875908!237641!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3187 invoked from network); 28 Jan 2014 02:25:23 -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;
	28 Jan 2014 02:25: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 1W7yMN-00061h-T6
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMN-0000xr-S8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:07 +0000
Date: Tue, 28 Jan 2014 02:25:07 +0000
Message-Id: <E1W7yMN-0000xr-S8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Explicitly set
	ARFLAGS so we can build with GNU Make 4.0
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c554ddb901f7716e3288a555a0b4fd0cd1f028ab
Author:     Peter Maydell <peter.maydell@linaro.org>
AuthorDate: Mon Oct 21 21:03:06 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:46:18 2013 -0600

    configure: Explicitly set ARFLAGS so we can build with GNU Make 4.0
    
    Our rules.mak adds '-rR' to MAKEFLAGS to indicate that we will be
    explicitly specifying everything and not relying on any default
    variables or rules. However we were accidentally relying on the
    default ARFLAGS ("rv"). This went unnoticed because of a bug in
    GNU Make 3.82 and earlier which meant that adding -rR to MAKEFLAGS
    only affected submakes, not the currently running instance.
    Explicitly set ARFLAGS in config-host.mak, in the same way we
    handle CFLAGS and LDFLAGS; this will allow us to work with
    Make 4.0.
    
    Thanks to Paul Smith for analyzing this bug for us.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: Ken Moffat <zarniwhoop@ntlworld.com>
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit 45d285abd7028ac72418c1a22f9298bb898fbfb8)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 1399de2..ff7933b 100755
--- a/configure
+++ b/configure
@@ -298,6 +298,9 @@ query_pkg_config() {
 pkg_config=query_pkg_config
 sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
 
+# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
+ARFLAGS="${ARFLAGS-rv}"
+
 # default flags for all hosts
 QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
@@ -3529,6 +3532,7 @@ echo "Source path       $source_path"
 echo "C compiler        $cc"
 echo "Host C compiler   $host_cc"
 echo "Objective-C compiler $objcc"
+echo "ARFLAGS           $ARFLAGS"
 echo "CFLAGS            $CFLAGS"
 echo "QEMU_CFLAGS       $QEMU_CFLAGS"
 echo "LDFLAGS           $LDFLAGS"
@@ -4117,6 +4121,7 @@ echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
 echo "AR=$ar" >> $config_host_mak
+echo "ARFLAGS=$ARFLAGS" >> $config_host_mak
 echo "AS=$as" >> $config_host_mak
 echo "CPP=$cpp" >> $config_host_mak
 echo "OBJCOPY=$objcopy" >> $config_host_mak
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMh-0002J0-Cc; Tue, 28 Jan 2014 02:25:27 +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 1W7yMf-0002Im-Lt
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:25 +0000
Received: from [193.109.254.147:51277] by server-5.bemta-14.messagelabs.com id
	C2/FD-03510-41517E25; Tue, 28 Jan 2014 02:25:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1390875908!237641!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3187 invoked from network); 28 Jan 2014 02:25:23 -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;
	28 Jan 2014 02:25: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 1W7yMN-00061h-T6
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMN-0000xr-S8
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:07 +0000
Date: Tue, 28 Jan 2014 02:25:07 +0000
Message-Id: <E1W7yMN-0000xr-S8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Explicitly set
	ARFLAGS so we can build with GNU Make 4.0
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c554ddb901f7716e3288a555a0b4fd0cd1f028ab
Author:     Peter Maydell <peter.maydell@linaro.org>
AuthorDate: Mon Oct 21 21:03:06 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:46:18 2013 -0600

    configure: Explicitly set ARFLAGS so we can build with GNU Make 4.0
    
    Our rules.mak adds '-rR' to MAKEFLAGS to indicate that we will be
    explicitly specifying everything and not relying on any default
    variables or rules. However we were accidentally relying on the
    default ARFLAGS ("rv"). This went unnoticed because of a bug in
    GNU Make 3.82 and earlier which meant that adding -rR to MAKEFLAGS
    only affected submakes, not the currently running instance.
    Explicitly set ARFLAGS in config-host.mak, in the same way we
    handle CFLAGS and LDFLAGS; this will allow us to work with
    Make 4.0.
    
    Thanks to Paul Smith for analyzing this bug for us.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: Ken Moffat <zarniwhoop@ntlworld.com>
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit 45d285abd7028ac72418c1a22f9298bb898fbfb8)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 1399de2..ff7933b 100755
--- a/configure
+++ b/configure
@@ -298,6 +298,9 @@ query_pkg_config() {
 pkg_config=query_pkg_config
 sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
 
+# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
+ARFLAGS="${ARFLAGS-rv}"
+
 # default flags for all hosts
 QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
@@ -3529,6 +3532,7 @@ echo "Source path       $source_path"
 echo "C compiler        $cc"
 echo "Host C compiler   $host_cc"
 echo "Objective-C compiler $objcc"
+echo "ARFLAGS           $ARFLAGS"
 echo "CFLAGS            $CFLAGS"
 echo "QEMU_CFLAGS       $QEMU_CFLAGS"
 echo "LDFLAGS           $LDFLAGS"
@@ -4117,6 +4121,7 @@ echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
 echo "AR=$ar" >> $config_host_mak
+echo "ARFLAGS=$ARFLAGS" >> $config_host_mak
 echo "AS=$as" >> $config_host_mak
 echo "CPP=$cpp" >> $config_host_mak
 echo "OBJCOPY=$objcopy" >> $config_host_mak
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMm-0002KM-5d; Tue, 28 Jan 2014 02:25:32 +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 1W7yMk-0002Jy-Sj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:31 +0000
Received: from [85.158.143.35:52965] by server-3.bemta-4.messagelabs.com id
	F6/12-32360-A1517E25; Tue, 28 Jan 2014 02:25:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1390875928!1195446!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8903 invoked from network); 28 Jan 2014 02:25:29 -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;
	28 Jan 2014 02:25: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 1W7yMi-00061s-8M
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMi-0000zN-6g
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:28 +0000
Date: Tue, 28 Jan 2014 02:25:28 +0000
Message-Id: <E1W7yMi-0000zN-6g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] virtio-net: only delete bh
	that existed
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5326636ff2390bb260b3d8d14899b04db205992d
Author:     Jason Wang <jasowang@redhat.com>
AuthorDate: Wed Nov 6 16:58:08 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:56:56 2013 -0600

    virtio-net: only delete bh that existed
    
    We delete without check whether it existed during exit. This will lead NULL
    pointer deference since it was created conditionally depends on guest driver
    status and features. So add a check of existence before trying to delete it.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Message-id: 1383728288-28469-1-git-send-email-jasowang@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit fe2dafa02de4f80ab36f6e0f4ddfcd6418c03c49)
    
    Conflicts:
    
    	hw/net/virtio-net.c
    
    *modified to reflect timer function names for 1.6
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/net/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index aa1880c..bb757b3 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1600,7 +1600,7 @@ static int virtio_net_device_exit(DeviceState *qdev)
         if (q->tx_timer) {
             qemu_del_timer(q->tx_timer);
             qemu_free_timer(q->tx_timer);
-        } else {
+        } else if (q->tx_bh) {
             qemu_bh_delete(q->tx_bh);
         }
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMm-0002KM-5d; Tue, 28 Jan 2014 02:25:32 +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 1W7yMk-0002Jy-Sj
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:31 +0000
Received: from [85.158.143.35:52965] by server-3.bemta-4.messagelabs.com id
	F6/12-32360-A1517E25; Tue, 28 Jan 2014 02:25:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1390875928!1195446!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8903 invoked from network); 28 Jan 2014 02:25:29 -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;
	28 Jan 2014 02:25: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 1W7yMi-00061s-8M
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMi-0000zN-6g
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:28 +0000
Date: Tue, 28 Jan 2014 02:25:28 +0000
Message-Id: <E1W7yMi-0000zN-6g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] virtio-net: only delete bh
	that existed
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5326636ff2390bb260b3d8d14899b04db205992d
Author:     Jason Wang <jasowang@redhat.com>
AuthorDate: Wed Nov 6 16:58:08 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:56:56 2013 -0600

    virtio-net: only delete bh that existed
    
    We delete without check whether it existed during exit. This will lead NULL
    pointer deference since it was created conditionally depends on guest driver
    status and features. So add a check of existence before trying to delete it.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Message-id: 1383728288-28469-1-git-send-email-jasowang@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit fe2dafa02de4f80ab36f6e0f4ddfcd6418c03c49)
    
    Conflicts:
    
    	hw/net/virtio-net.c
    
    *modified to reflect timer function names for 1.6
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/net/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index aa1880c..bb757b3 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1600,7 +1600,7 @@ static int virtio_net_device_exit(DeviceState *qdev)
         if (q->tx_timer) {
             qemu_del_timer(q->tx_timer);
             qemu_free_timer(q->tx_timer);
-        } else {
+        } else if (q->tx_bh) {
             qemu_bh_delete(q->tx_bh);
         }
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMx-0002ML-8k; Tue, 28 Jan 2014 02:25: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 1W7yMv-0002Ls-1o
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:41 +0000
Received: from [193.109.254.147:28412] by server-11.bemta-14.messagelabs.com
	id 7D/18-20576-42517E25; Tue, 28 Jan 2014 02:25:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390875938!243698!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7984 invoked from network); 28 Jan 2014 02:25:39 -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;
	28 Jan 2014 02:25: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 1W7yMs-000621-DX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMs-0000zz-BK
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:38 +0000
Date: Tue, 28 Jan 2014 02:25:38 +0000
Message-Id: <E1W7yMs-0000zz-BK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] exec: fix
	breakpoint_invalidate when pc may not be translated
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2c8187434f90fceb20ee1f0031fb591e5382674d
Author:     Max Filippov <jcmvbkbc@gmail.com>
AuthorDate: Fri Sep 27 22:29:17 2013 +0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:59:05 2013 -0600

    exec: fix breakpoint_invalidate when pc may not be translated
    
    This fixes qemu abort with the following message:
    
        include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
    
    which happens due to attempt to invalidate breakpoint by virtual address
    for which get_phys_page_debug couldn't find mapping.
    
    For more details see
    http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg04582.html
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit e8262a1b5b7cfbcbc80c46e4ce6ff7c517b7b2f6)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 exec.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/exec.c b/exec.c
index f6674e5..667a718 100644
--- a/exec.c
+++ b/exec.c
@@ -425,8 +425,10 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
 #else
 static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
 {
-    tb_invalidate_phys_addr(cpu_get_phys_page_debug(cpu, pc) |
-            (pc & ~TARGET_PAGE_MASK));
+    hwaddr phys = cpu_get_phys_page_debug(cpu, pc);
+    if (phys != -1) {
+        tb_invalidate_phys_addr(phys | (pc & ~TARGET_PAGE_MASK));
+    }
 }
 #endif
 #endif /* TARGET_HAS_ICE */
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yMx-0002ML-8k; Tue, 28 Jan 2014 02:25: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 1W7yMv-0002Ls-1o
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:41 +0000
Received: from [193.109.254.147:28412] by server-11.bemta-14.messagelabs.com
	id 7D/18-20576-42517E25; Tue, 28 Jan 2014 02:25:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1390875938!243698!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7984 invoked from network); 28 Jan 2014 02:25:39 -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;
	28 Jan 2014 02:25: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 1W7yMs-000621-DX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yMs-0000zz-BK
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:38 +0000
Date: Tue, 28 Jan 2014 02:25:38 +0000
Message-Id: <E1W7yMs-0000zz-BK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] exec: fix
	breakpoint_invalidate when pc may not be translated
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 2c8187434f90fceb20ee1f0031fb591e5382674d
Author:     Max Filippov <jcmvbkbc@gmail.com>
AuthorDate: Fri Sep 27 22:29:17 2013 +0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Tue Dec 3 19:59:05 2013 -0600

    exec: fix breakpoint_invalidate when pc may not be translated
    
    This fixes qemu abort with the following message:
    
        include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
    
    which happens due to attempt to invalidate breakpoint by virtual address
    for which get_phys_page_debug couldn't find mapping.
    
    For more details see
    http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg04582.html
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit e8262a1b5b7cfbcbc80c46e4ce6ff7c517b7b2f6)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 exec.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/exec.c b/exec.c
index f6674e5..667a718 100644
--- a/exec.c
+++ b/exec.c
@@ -425,8 +425,10 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
 #else
 static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
 {
-    tb_invalidate_phys_addr(cpu_get_phys_page_debug(cpu, pc) |
-            (pc & ~TARGET_PAGE_MASK));
+    hwaddr phys = cpu_get_phys_page_debug(cpu, pc);
+    if (phys != -1) {
+        tb_invalidate_phys_addr(phys | (pc & ~TARGET_PAGE_MASK));
+    }
 }
 #endif
 #endif /* TARGET_HAS_ICE */
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yN7-0002OI-Ct; Tue, 28 Jan 2014 02:25:53 +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 1W7yN5-0002Nw-HL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:51 +0000
Received: from [85.158.137.68:39178] by server-1.bemta-3.messagelabs.com id
	E5/76-29598-E2517E25; Tue, 28 Jan 2014 02:25:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390875948!11660640!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27257 invoked from network); 28 Jan 2014 02:25:49 -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;
	28 Jan 2014 02:25: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 1W7yN2-000627-IQ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yN2-00010L-Gb
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:48 +0000
Date: Tue, 28 Jan 2014 02:25:48 +0000
Message-Id: <E1W7yN2-00010L-Gb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix pc migration from qemu
	<= 1.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 53e8cf93b3ecdb32ca4aa93d04b0a959988456fa
Author:     Cole Robinson <crobinso@redhat.com>
AuthorDate: Tue Nov 5 18:46:27 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:20 2013 -0600

    Fix pc migration from qemu <= 1.5
    
    The following commit introduced a migration incompatibility:
    
    commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe
    Author: David Gibson <david@gibson.dropbear.id.au>
    Date:   Thu Jun 6 18:48:49 2013 +1000
    
        pci: Replace pci_find_domain() with more general pci_root_bus_path()
    
    The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
    0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
    1.6 machine types.
    
    Add a compat property to maintain the busted idstr for the 1.6 machine
    types, but revert to the old style format for 1.7+, and <= 1.5.
    
    Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Cole Robinson <crobinso@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit 04c7d8b8dea724f1007f0f6e76047ff03b4cb24f)
    
    Conflicts:
    
    	include/hw/i386/pc.h
    
    *removed 1.6 compat properties
    *enabled short_root_bus by default to enable for 1.6 (no 1.6 compat
     fields to do so in 1.6.x)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/pci-host/piix.c        |    9 ++++++++-
 hw/pci-host/q35.c         |   10 ++++++++--
 include/hw/i386/pc.h      |    8 ++++++++
 include/hw/pci-host/q35.h |    1 +
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 221d82b..18177429 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,6 +48,7 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
+    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -706,13 +707,19 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
+    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
+
     /* For backwards compat with old device paths */
-    return "0000";
+    if (s->short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 4febd24..e7724d5 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    /* For backwards compat with old device paths */
-    return "0000";
+    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+     /* For backwards compat with old device paths */
+    if (s->mch.short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -108,6 +113,7 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 475ba9e..dc7e3f5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,6 +258,14 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
+        },{\
+            .driver   = "i440FX-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "q35-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 6eb7ab6..95a3cc2 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,6 +61,7 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
+    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:25:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:25: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 1W7yN7-0002OI-Ct; Tue, 28 Jan 2014 02:25:53 +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 1W7yN5-0002Nw-HL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:51 +0000
Received: from [85.158.137.68:39178] by server-1.bemta-3.messagelabs.com id
	E5/76-29598-E2517E25; Tue, 28 Jan 2014 02:25:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390875948!11660640!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27257 invoked from network); 28 Jan 2014 02:25:49 -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;
	28 Jan 2014 02:25: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 1W7yN2-000627-IQ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yN2-00010L-Gb
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:48 +0000
Date: Tue, 28 Jan 2014 02:25:48 +0000
Message-Id: <E1W7yN2-00010L-Gb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix pc migration from qemu
	<= 1.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 53e8cf93b3ecdb32ca4aa93d04b0a959988456fa
Author:     Cole Robinson <crobinso@redhat.com>
AuthorDate: Tue Nov 5 18:46:27 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:20 2013 -0600

    Fix pc migration from qemu <= 1.5
    
    The following commit introduced a migration incompatibility:
    
    commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe
    Author: David Gibson <david@gibson.dropbear.id.au>
    Date:   Thu Jun 6 18:48:49 2013 +1000
    
        pci: Replace pci_find_domain() with more general pci_root_bus_path()
    
    The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
    0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
    1.6 machine types.
    
    Add a compat property to maintain the busted idstr for the 1.6 machine
    types, but revert to the old style format for 1.7+, and <= 1.5.
    
    Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Cole Robinson <crobinso@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit 04c7d8b8dea724f1007f0f6e76047ff03b4cb24f)
    
    Conflicts:
    
    	include/hw/i386/pc.h
    
    *removed 1.6 compat properties
    *enabled short_root_bus by default to enable for 1.6 (no 1.6 compat
     fields to do so in 1.6.x)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/pci-host/piix.c        |    9 ++++++++-
 hw/pci-host/q35.c         |   10 ++++++++--
 include/hw/i386/pc.h      |    8 ++++++++
 include/hw/pci-host/q35.h |    1 +
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 221d82b..18177429 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,6 +48,7 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
+    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -706,13 +707,19 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
+    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
+
     /* For backwards compat with old device paths */
-    return "0000";
+    if (s->short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 4febd24..e7724d5 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    /* For backwards compat with old device paths */
-    return "0000";
+    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+     /* For backwards compat with old device paths */
+    if (s->mch.short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -108,6 +113,7 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 475ba9e..dc7e3f5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,6 +258,14 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
+        },{\
+            .driver   = "i440FX-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "q35-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 6eb7ab6..95a3cc2 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,6 +61,7 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
+    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNI-0002Pp-Fq; Tue, 28 Jan 2014 02:26: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 1W7yNF-0002Pa-9i
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:01 +0000
Received: from [85.158.139.211:42781] by server-7.bemta-5.messagelabs.com id
	7C/65-04824-83517E25; Tue, 28 Jan 2014 02:26:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390875958!12304465!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13250 invoked from network); 28 Jan 2014 02:25:59 -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;
	28 Jan 2014 02:25: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 1W7yNC-00062G-N1
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNC-00010x-LP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:58 +0000
Date: Tue, 28 Jan 2014 02:25:58 +0000
Message-Id: <E1W7yNC-00010x-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2:
	count_contiguous_clusters and compression
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4a5bf69f78e20a64f35770612ee897da4d80082e
Author:     Max Reitz <mreitz@redhat.com>
AuthorDate: Fri Sep 27 12:14:15 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: count_contiguous_clusters and compression
    
    The function is not intended to be used on compressed clusters and will
    not work correctly, if used anyway, since L2E_OFFSET_MASK is not the
    right mask for determining the offset of compressed clusters. Therefore,
    assert that the first cluster is not compressed and always include the
    compression flag in the mask of significant flags, i.e., stop the search
    as soon as a compressed cluster occurs.
    
    Signed-off-by: Max Reitz <mreitz@redhat.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 15684a474286cc2c6106c756ddd095a21d058970)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2-cluster.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index cca76d4..fd3054b 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -266,12 +266,15 @@ static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
         uint64_t *l2_table, uint64_t start, uint64_t stop_flags)
 {
     int i;
-    uint64_t mask = stop_flags | L2E_OFFSET_MASK;
-    uint64_t offset = be64_to_cpu(l2_table[0]) & mask;
+    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW2_CLUSTER_COMPRESSED;
+    uint64_t first_entry = be64_to_cpu(l2_table[0]);
+    uint64_t offset = first_entry & mask;
 
     if (!offset)
         return 0;
 
+    assert(qcow2_get_cluster_type(first_entry) != QCOW2_CLUSTER_COMPRESSED);
+
     for (i = start; i < start + nb_clusters; i++) {
         uint64_t l2_entry = be64_to_cpu(l2_table[i]) & mask;
         if (offset + (uint64_t) i * cluster_size != l2_entry) {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNI-0002Pp-Fq; Tue, 28 Jan 2014 02:26: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 1W7yNF-0002Pa-9i
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:01 +0000
Received: from [85.158.139.211:42781] by server-7.bemta-5.messagelabs.com id
	7C/65-04824-83517E25; Tue, 28 Jan 2014 02:26:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390875958!12304465!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13250 invoked from network); 28 Jan 2014 02:25:59 -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;
	28 Jan 2014 02:25: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 1W7yNC-00062G-N1
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNC-00010x-LP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:25:58 +0000
Date: Tue, 28 Jan 2014 02:25:58 +0000
Message-Id: <E1W7yNC-00010x-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2:
	count_contiguous_clusters and compression
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4a5bf69f78e20a64f35770612ee897da4d80082e
Author:     Max Reitz <mreitz@redhat.com>
AuthorDate: Fri Sep 27 12:14:15 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: count_contiguous_clusters and compression
    
    The function is not intended to be used on compressed clusters and will
    not work correctly, if used anyway, since L2E_OFFSET_MASK is not the
    right mask for determining the offset of compressed clusters. Therefore,
    assert that the first cluster is not compressed and always include the
    compression flag in the mask of significant flags, i.e., stop the search
    as soon as a compressed cluster occurs.
    
    Signed-off-by: Max Reitz <mreitz@redhat.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 15684a474286cc2c6106c756ddd095a21d058970)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2-cluster.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index cca76d4..fd3054b 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -266,12 +266,15 @@ static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
         uint64_t *l2_table, uint64_t start, uint64_t stop_flags)
 {
     int i;
-    uint64_t mask = stop_flags | L2E_OFFSET_MASK;
-    uint64_t offset = be64_to_cpu(l2_table[0]) & mask;
+    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW2_CLUSTER_COMPRESSED;
+    uint64_t first_entry = be64_to_cpu(l2_table[0]);
+    uint64_t offset = first_entry & mask;
 
     if (!offset)
         return 0;
 
+    assert(qcow2_get_cluster_type(first_entry) != QCOW2_CLUSTER_COMPRESSED);
+
     for (i = start; i < start + nb_clusters; i++) {
         uint64_t l2_entry = be64_to_cpu(l2_table[i]) & mask;
         if (offset + (uint64_t) i * cluster_size != l2_entry) {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yNQ-0002RF-JQ; Tue, 28 Jan 2014 02:26:12 +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 1W7yNP-0002R6-NO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:11 +0000
Received: from [85.158.139.211:43105] by server-15.bemta-5.messagelabs.com id
	19/F4-08490-34517E25; Tue, 28 Jan 2014 02:26:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390875969!12104114!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12762 invoked from network); 28 Jan 2014 02:26:10 -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;
	28 Jan 2014 02:26: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 1W7yNM-00062m-RL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNM-00011V-Py
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:08 +0000
Date: Tue, 28 Jan 2014 02:26:08 +0000
Message-Id: <E1W7yNM-00011V-Py@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2: fix possible
	corruption when reading multiple clusters
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4d2f39a918ab4ccac7255da143b4322a9b4b204a
Author:     Peter Lieven <pl@kamp.de>
AuthorDate: Tue Nov 12 13:48:07 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: fix possible corruption when reading multiple clusters
    
    if multiple sectors spanning multiple clusters are read the
    function count_contiguous_clusters should ensure that the
    cluster type should not change between the clusters.
    
    Especially the for-loop should break when we have one
    or more normal clusters followed by a compressed cluster.
    
    Unfortunately the wrong macro was used in the mask to
    compare the flags.
    
    This was discovered while debugging a data corruption
    issue when converting a compressed qcow2 image to raw.
    qemu-img reads 2MB chunks which span multiple clusters.
    
    CC: qemu-stable@nongnu.org
    Signed-off-by: Peter Lieven <pl@kamp.de>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 78a52ad5acca7053b774fcc80290e7b7e224c80a)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2-cluster.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index fd3054b..b558eb0 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -266,7 +266,7 @@ static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
         uint64_t *l2_table, uint64_t start, uint64_t stop_flags)
 {
     int i;
-    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW2_CLUSTER_COMPRESSED;
+    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
     uint64_t first_entry = be64_to_cpu(l2_table[0]);
     uint64_t offset = first_entry & mask;
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:12 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yNQ-0002RF-JQ; Tue, 28 Jan 2014 02:26:12 +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 1W7yNP-0002R6-NO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:11 +0000
Received: from [85.158.139.211:43105] by server-15.bemta-5.messagelabs.com id
	19/F4-08490-34517E25; Tue, 28 Jan 2014 02:26:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390875969!12104114!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12762 invoked from network); 28 Jan 2014 02:26:10 -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;
	28 Jan 2014 02:26: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 1W7yNM-00062m-RL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNM-00011V-Py
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:08 +0000
Date: Tue, 28 Jan 2014 02:26:08 +0000
Message-Id: <E1W7yNM-00011V-Py@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2: fix possible
	corruption when reading multiple clusters
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4d2f39a918ab4ccac7255da143b4322a9b4b204a
Author:     Peter Lieven <pl@kamp.de>
AuthorDate: Tue Nov 12 13:48:07 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: fix possible corruption when reading multiple clusters
    
    if multiple sectors spanning multiple clusters are read the
    function count_contiguous_clusters should ensure that the
    cluster type should not change between the clusters.
    
    Especially the for-loop should break when we have one
    or more normal clusters followed by a compressed cluster.
    
    Unfortunately the wrong macro was used in the mask to
    compare the flags.
    
    This was discovered while debugging a data corruption
    issue when converting a compressed qcow2 image to raw.
    qemu-img reads 2MB chunks which span multiple clusters.
    
    CC: qemu-stable@nongnu.org
    Signed-off-by: Peter Lieven <pl@kamp.de>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 78a52ad5acca7053b774fcc80290e7b7e224c80a)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2-cluster.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index fd3054b..b558eb0 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -266,7 +266,7 @@ static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
         uint64_t *l2_table, uint64_t start, uint64_t stop_flags)
 {
     int i;
-    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW2_CLUSTER_COMPRESSED;
+    uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
     uint64_t first_entry = be64_to_cpu(l2_table[0]);
     uint64_t offset = first_entry & mask;
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNa-0002Sp-Py; Tue, 28 Jan 2014 02:26: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 1W7yNZ-0002Sa-PA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:21 +0000
Received: from [85.158.137.68:30972] by server-1.bemta-3.messagelabs.com id
	08/A6-29598-C4517E25; Tue, 28 Jan 2014 02:26:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1390875979!11695893!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4933 invoked from network); 28 Jan 2014 02:26:20 -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;
	28 Jan 2014 02:26: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 1W7yNW-00062v-VP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNW-00012B-UO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:18 +0000
Date: Tue, 28 Jan 2014 02:26:18 +0000
Message-Id: <E1W7yNW-00012B-UO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vfio-pci: Fix
	multifunction=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 37da395651cd1279a8f111b5c8fc31d6f547f67f
Author:     Alex Williamson <alex.williamson@redhat.com>
AuthorDate: Tue Nov 12 11:53:24 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vfio-pci: Fix multifunction=on
    
    When an assigned device is initialized it copies the device config
    space into the emulated config space.  Unfortunately multifunction is
    setup prior to the device initfn and gets clobbered.  We need to
    restore it just like pci-assign does.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit 8d07d6c46597a885eb38d99cc6fff399ce69cd21)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/misc/vfio.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 017e693..d9e78e1 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3142,6 +3142,13 @@ static int vfio_initfn(PCIDevice *pdev)
     vdev->emulated_config_bits[PCI_HEADER_TYPE] =
                                               PCI_HEADER_TYPE_MULTI_FUNCTION;
 
+    /* Restore or clear multifunction, this is always controlled by QEMU */
+    if (vdev->pdev.cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
+        vdev->pdev.config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
+    } else {
+        vdev->pdev.config[PCI_HEADER_TYPE] &= ~PCI_HEADER_TYPE_MULTI_FUNCTION;
+    }
+
     /*
      * Clear host resource mapping info.  If we choose not to register a
      * BAR, such as might be the case with the option ROM, we can get
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNa-0002Sp-Py; Tue, 28 Jan 2014 02:26: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 1W7yNZ-0002Sa-PA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:21 +0000
Received: from [85.158.137.68:30972] by server-1.bemta-3.messagelabs.com id
	08/A6-29598-C4517E25; Tue, 28 Jan 2014 02:26:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1390875979!11695893!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4933 invoked from network); 28 Jan 2014 02:26:20 -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;
	28 Jan 2014 02:26: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 1W7yNW-00062v-VP
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNW-00012B-UO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:18 +0000
Date: Tue, 28 Jan 2014 02:26:18 +0000
Message-Id: <E1W7yNW-00012B-UO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vfio-pci: Fix
	multifunction=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 37da395651cd1279a8f111b5c8fc31d6f547f67f
Author:     Alex Williamson <alex.williamson@redhat.com>
AuthorDate: Tue Nov 12 11:53:24 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vfio-pci: Fix multifunction=on
    
    When an assigned device is initialized it copies the device config
    space into the emulated config space.  Unfortunately multifunction is
    setup prior to the device initfn and gets clobbered.  We need to
    restore it just like pci-assign does.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit 8d07d6c46597a885eb38d99cc6fff399ce69cd21)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/misc/vfio.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 017e693..d9e78e1 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3142,6 +3142,13 @@ static int vfio_initfn(PCIDevice *pdev)
     vdev->emulated_config_bits[PCI_HEADER_TYPE] =
                                               PCI_HEADER_TYPE_MULTI_FUNCTION;
 
+    /* Restore or clear multifunction, this is always controlled by QEMU */
+    if (vdev->pdev.cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
+        vdev->pdev.config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
+    } else {
+        vdev->pdev.config[PCI_HEADER_TYPE] &= ~PCI_HEADER_TYPE_MULTI_FUNCTION;
+    }
+
     /*
      * Clear host resource mapping info.  If we choose not to register a
      * BAR, such as might be the case with the option ROM, we can get
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:33 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNk-0002UU-T0; Tue, 28 Jan 2014 02:26: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 1W7yNj-0002UG-Ou
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:31 +0000
Received: from [85.158.137.68:27781] by server-10.bemta-3.messagelabs.com id
	8E/D1-23989-75517E25; Tue, 28 Jan 2014 02:26:31 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1390875989!11670335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8238 invoked from network); 28 Jan 2014 02:26:30 -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;
	28 Jan 2014 02:26: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 1W7yNh-000633-3S
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNh-000136-21
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:29 +0000
Date: Tue, 28 Jan 2014 02:26:29 +0000
Message-Id: <E1W7yNh-000136-21@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] virtio-net: fix the memory
	leak in rxfilter_notify()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============8297576186532895968=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 817a872cc6e52abe304ec8c0a94c69d4f2b450ec
Author:     Amos Kong <akong@redhat.com>
AuthorDate: Mon Nov 18 23:32:17 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    virtio-net: fix the memory leak in rxfilter_notify()
    
    object_get_canonical_path() returns a gchar*, it should be freed by the
    caller.
    
    Signed-off-by: Amos Kong <akong@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit 96e35046e4a97df5b4e1e24e217eb1e1701c7c71)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/net/virtio-net.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index bb757b3..5320aab 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -200,16 +200,16 @@ static void rxfilter_notify(NetClientState *nc)
     VirtIONet *n = qemu_get_nic_opaque(nc);
 
     if (nc->rxfilter_notify_enabled) {
+        gchar *path = object_get_canonical_path(OBJECT(n->qdev));
         if (n->netclient_name) {
             event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
-                                    n->netclient_name,
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+                                    n->netclient_name, path);
         } else {
-            event_data = qobject_from_jsonf("{ 'path': %s }",
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+            event_data = qobject_from_jsonf("{ 'path': %s }", path);
         }
         monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
         qobject_decref(event_data);
+        g_free(path);
 
         /* disable event notification to avoid events flooding */
         nc->rxfilter_notify_enabled = 0;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:33 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNk-0002UU-T0; Tue, 28 Jan 2014 02:26: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 1W7yNj-0002UG-Ou
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:31 +0000
Received: from [85.158.137.68:27781] by server-10.bemta-3.messagelabs.com id
	8E/D1-23989-75517E25; Tue, 28 Jan 2014 02:26:31 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1390875989!11670335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8238 invoked from network); 28 Jan 2014 02:26:30 -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;
	28 Jan 2014 02:26: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 1W7yNh-000633-3S
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNh-000136-21
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:29 +0000
Date: Tue, 28 Jan 2014 02:26:29 +0000
Message-Id: <E1W7yNh-000136-21@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] virtio-net: fix the memory
	leak in rxfilter_notify()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============8297576186532895968=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 817a872cc6e52abe304ec8c0a94c69d4f2b450ec
Author:     Amos Kong <akong@redhat.com>
AuthorDate: Mon Nov 18 23:32:17 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    virtio-net: fix the memory leak in rxfilter_notify()
    
    object_get_canonical_path() returns a gchar*, it should be freed by the
    caller.
    
    Signed-off-by: Amos Kong <akong@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit 96e35046e4a97df5b4e1e24e217eb1e1701c7c71)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/net/virtio-net.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index bb757b3..5320aab 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -200,16 +200,16 @@ static void rxfilter_notify(NetClientState *nc)
     VirtIONet *n = qemu_get_nic_opaque(nc);
 
     if (nc->rxfilter_notify_enabled) {
+        gchar *path = object_get_canonical_path(OBJECT(n->qdev));
         if (n->netclient_name) {
             event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
-                                    n->netclient_name,
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+                                    n->netclient_name, path);
         } else {
-            event_data = qobject_from_jsonf("{ 'path': %s }",
-                                    object_get_canonical_path(OBJECT(n->qdev)));
+            event_data = qobject_from_jsonf("{ 'path': %s }", path);
         }
         monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
         qobject_decref(event_data);
+        g_free(path);
 
         /* disable event notification to avoid events flooding */
         nc->rxfilter_notify_enabled = 0;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNv-0002WN-9t; Tue, 28 Jan 2014 02:26: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 1W7yNt-0002WB-R4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:42 +0000
Received: from [193.109.254.147:31815] by server-8.bemta-14.messagelabs.com id
	D5/76-30921-16517E25; Tue, 28 Jan 2014 02:26:41 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1390875999!235276!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5117 invoked from network); 28 Jan 2014 02:26:40 -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;
	28 Jan 2014 02:26: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 1W7yNr-000639-7Z
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:39 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNr-00013w-6P
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:39 +0000
Date: Tue, 28 Jan 2014 02:26:39 +0000
Message-Id: <E1W7yNr-00013w-6P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qom: Fix memory leak in
	object_property_set_link()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4422655020333750223=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 991a5f378261b759b2af2354703c504906418d35
Author:     Vlad Yasevich <vyasevic@redhat.com>
AuthorDate: Fri Nov 15 12:09:47 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qom: Fix memory leak in object_property_set_link()
    
    Save the result of the call to object_get_canonical_path()
    so we can free it.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
    Reviewed-by: Amos Kong <akong@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit 2d3aa28cc2cf382aa04cd577e0be542175eea9bd)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qom/object.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index b2479d1..333f807 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -823,8 +823,9 @@ char *object_property_get_str(Object *obj, const char *name,
 void object_property_set_link(Object *obj, Object *value,
                               const char *name, Error **errp)
 {
-    object_property_set_str(obj, object_get_canonical_path(value),
-                            name, errp);
+    gchar *path = object_get_canonical_path(value);
+    object_property_set_str(obj, path, name, errp);
+    g_free(path);
 }
 
 Object *object_property_get_link(Object *obj, const char *name,
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yNv-0002WN-9t; Tue, 28 Jan 2014 02:26: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 1W7yNt-0002WB-R4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:42 +0000
Received: from [193.109.254.147:31815] by server-8.bemta-14.messagelabs.com id
	D5/76-30921-16517E25; Tue, 28 Jan 2014 02:26:41 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1390875999!235276!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5117 invoked from network); 28 Jan 2014 02:26:40 -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;
	28 Jan 2014 02:26: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 1W7yNr-000639-7Z
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:39 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yNr-00013w-6P
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:39 +0000
Date: Tue, 28 Jan 2014 02:26:39 +0000
Message-Id: <E1W7yNr-00013w-6P@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qom: Fix memory leak in
	object_property_set_link()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4422655020333750223=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 991a5f378261b759b2af2354703c504906418d35
Author:     Vlad Yasevich <vyasevic@redhat.com>
AuthorDate: Fri Nov 15 12:09:47 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qom: Fix memory leak in object_property_set_link()
    
    Save the result of the call to object_get_canonical_path()
    so we can free it.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
    Reviewed-by: Amos Kong <akong@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit 2d3aa28cc2cf382aa04cd577e0be542175eea9bd)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qom/object.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index b2479d1..333f807 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -823,8 +823,9 @@ char *object_property_get_str(Object *obj, const char *name,
 void object_property_set_link(Object *obj, Object *value,
                               const char *name, Error **errp)
 {
-    object_property_set_str(obj, object_get_canonical_path(value),
-                            name, errp);
+    gchar *path = object_get_canonical_path(value);
+    object_property_set_str(obj, path, name, errp);
+    g_free(path);
 }
 
 Object *object_property_get_link(Object *obj, const char *name,
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yO5-0002Xd-Eg; Tue, 28 Jan 2014 02:26: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 1W7yO3-0002XU-PD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:51 +0000
Received: from [85.158.143.35:61953] by server-1.bemta-4.messagelabs.com id
	B2/7D-02132-B6517E25; Tue, 28 Jan 2014 02:26:51 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1390876009!1203548!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12375 invoked from network); 28 Jan 2014 02:26:50 -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;
	28 Jan 2014 02:26: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 1W7yO1-00063H-Bg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yO1-00014V-AS
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:49 +0000
Date: Tue, 28 Jan 2014 02:26:49 +0000
Message-Id: <E1W7yO1-00014V-AS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qdev-monitor: Fix crash
	when device_add is called with abstract driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0615589743065874581=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 2cafbbf1e03b954dedd3643ab3a4ffe685a63ccf
Author:     Igor Mammedov <imammedo@redhat.com>
AuthorDate: Tue Sep 17 15:32:32 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qdev-monitor: Fix crash when device_add is called with abstract driver
    
    User is able to crash running QEMU when following monitor
    command is called:
    
     device_add intel-hda-generic
    
    Crash is caused by assertion in object_initialize_with_type()
    when type is abstract.
    
    Checking if type is abstract before instance is created in
    qdev_device_add() allows to prevent crash on incorrect user input.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit 2fa4e56d88aa0039062bbc7f9a88e9f90c77ed94)
    
    Conflicts:
    
    	qdev-monitor.c
    
    *updated to reflect different 1.6 variable names
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qdev-monitor.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 410cdcb..bb2e1b6 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -472,6 +472,12 @@ DeviceState *qdev_device_add(QemuOpts *opts)
         return NULL;
     }
 
+    if (object_class_is_abstract(obj)) {
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
+                      "non-abstract device type");
+        return NULL;
+    }
+
     k = DEVICE_CLASS(obj);
 
     /* find bus */
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:26:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:26: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 1W7yO5-0002Xd-Eg; Tue, 28 Jan 2014 02:26: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 1W7yO3-0002XU-PD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:51 +0000
Received: from [85.158.143.35:61953] by server-1.bemta-4.messagelabs.com id
	B2/7D-02132-B6517E25; Tue, 28 Jan 2014 02:26:51 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1390876009!1203548!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12375 invoked from network); 28 Jan 2014 02:26:50 -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;
	28 Jan 2014 02:26: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 1W7yO1-00063H-Bg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yO1-00014V-AS
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:49 +0000
Date: Tue, 28 Jan 2014 02:26:49 +0000
Message-Id: <E1W7yO1-00014V-AS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qdev-monitor: Fix crash
	when device_add is called with abstract driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0615589743065874581=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 2cafbbf1e03b954dedd3643ab3a4ffe685a63ccf
Author:     Igor Mammedov <imammedo@redhat.com>
AuthorDate: Tue Sep 17 15:32:32 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qdev-monitor: Fix crash when device_add is called with abstract driver
    
    User is able to crash running QEMU when following monitor
    command is called:
    
     device_add intel-hda-generic
    
    Crash is caused by assertion in object_initialize_with_type()
    when type is abstract.
    
    Checking if type is abstract before instance is created in
    qdev_device_add() allows to prevent crash on incorrect user input.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit 2fa4e56d88aa0039062bbc7f9a88e9f90c77ed94)
    
    Conflicts:
    
    	qdev-monitor.c
    
    *updated to reflect different 1.6 variable names
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qdev-monitor.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 410cdcb..bb2e1b6 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -472,6 +472,12 @@ DeviceState *qdev_device_add(QemuOpts *opts)
         return NULL;
     }
 
+    if (object_class_is_abstract(obj)) {
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
+                      "non-abstract device type");
+        return NULL;
+    }
+
     k = DEVICE_CLASS(obj);
 
     /* find bus */
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOG-0002ZL-Hk; Tue, 28 Jan 2014 02:27:04 +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 1W7yOD-0002Z4-UJ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:02 +0000
Received: from [85.158.143.35:62247] by server-2.bemta-4.messagelabs.com id
	D3/65-11386-57517E25; Tue, 28 Jan 2014 02:27:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390876019!1195784!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27474 invoked from network); 28 Jan 2014 02:27:00 -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;
	28 Jan 2014 02:27: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 1W7yOB-00063S-Ge
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOB-00014w-FE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:59 +0000
Date: Tue, 28 Jan 2014 02:26:59 +0000
Message-Id: <E1W7yOB-00014w-FE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qdev-monitor: Unref device
	when device_add fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4586405405225519659=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 03060dc086ec8a75929b7bb58df9e67a305a810d
Author:     Stefan Hajnoczi <stefanha@redhat.com>
AuthorDate: Tue Sep 10 18:21:08 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qdev-monitor: Unref device when device_add fails
    
    qdev_device_add() leaks the created device upon failure.  I suspect this
    problem crept in because qdev_free() unparents the device but does not
    drop a reference - confusing name.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit ee6abeb6ec08473713848ce9028110f1684853b7)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qdev-monitor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index bb2e1b6..1b2c606 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -518,6 +518,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
     }
     if (qemu_opt_foreach(opts, set_property, qdev, 1) != 0) {
         qdev_free(qdev);
+        object_unref(OBJECT(qdev));
         return NULL;
     }
     if (qdev->id) {
@@ -531,6 +532,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
         g_free(name);
     }        
     if (qdev_init(qdev) < 0) {
+        object_unref(OBJECT(qdev));
         qerror_report(QERR_DEVICE_INIT_FAILED, driver);
         return NULL;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOG-0002ZL-Hk; Tue, 28 Jan 2014 02:27:04 +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 1W7yOD-0002Z4-UJ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:02 +0000
Received: from [85.158.143.35:62247] by server-2.bemta-4.messagelabs.com id
	D3/65-11386-57517E25; Tue, 28 Jan 2014 02:27:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1390876019!1195784!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27474 invoked from network); 28 Jan 2014 02:27:00 -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;
	28 Jan 2014 02:27: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 1W7yOB-00063S-Ge
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOB-00014w-FE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:26:59 +0000
Date: Tue, 28 Jan 2014 02:26:59 +0000
Message-Id: <E1W7yOB-00014w-FE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qdev-monitor: Unref device
	when device_add fails
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============4586405405225519659=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 03060dc086ec8a75929b7bb58df9e67a305a810d
Author:     Stefan Hajnoczi <stefanha@redhat.com>
AuthorDate: Tue Sep 10 18:21:08 2013 +0200
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qdev-monitor: Unref device when device_add fails
    
    qdev_device_add() leaks the created device upon failure.  I suspect this
    problem crept in because qdev_free() unparents the device but does not
    drop a reference - confusing name.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit ee6abeb6ec08473713848ce9028110f1684853b7)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qdev-monitor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index bb2e1b6..1b2c606 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -518,6 +518,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
     }
     if (qemu_opt_foreach(opts, set_property, qdev, 1) != 0) {
         qdev_free(qdev);
+        object_unref(OBJECT(qdev));
         return NULL;
     }
     if (qdev->id) {
@@ -531,6 +532,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
         g_free(name);
     }        
     if (qdev_init(qdev) < 0) {
+        object_unref(OBJECT(qdev));
         qerror_report(QERR_DEVICE_INIT_FAILED, driver);
         return NULL;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOQ-0002b0-Sg; Tue, 28 Jan 2014 02:27: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 1W7yOO-0002ab-C5
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:12 +0000
Received: from [85.158.139.211:46627] by server-9.bemta-5.messagelabs.com id
	C4/43-15098-F7517E25; Tue, 28 Jan 2014 02:27:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1390876029!12251553!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19969 invoked from network); 28 Jan 2014 02:27:10 -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;
	28 Jan 2014 02:27: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 1W7yOL-000641-Ki
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOL-00015U-Jf
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:09 +0000
Date: Tue, 28 Jan 2014 02:27:09 +0000
Message-Id: <E1W7yOL-00015U-Jf@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] pci: unregister
	vmstate_pcibus on unplug
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============6892892566896715771=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 0f6298786f0d88a29d150a19870f2ea7bc5c01a5
Author:     Bandan Das <bsd@redhat.com>
AuthorDate: Wed Nov 6 17:52:17 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    pci: unregister vmstate_pcibus on unplug
    
    PCIBus registers a vmstate during init. Unregister it upon
    removal/unplug.
    
    Signed-off-by: Bandan Das <bsd@redhat.com>
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit 5c397242d5d53c1adecce31817bb439383cf8228)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/pci/pci.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 4c004f5..dc5b788 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -47,6 +47,7 @@ static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent);
 static char *pcibus_get_dev_path(DeviceState *dev);
 static char *pcibus_get_fw_dev_path(DeviceState *dev);
 static int pcibus_reset(BusState *qbus);
+static void pci_bus_finalize(Object *obj);
 
 static Property pci_props[] = {
     DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
@@ -73,6 +74,7 @@ static const TypeInfo pci_bus_info = {
     .name = TYPE_PCI_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(PCIBus),
+    .instance_finalize = pci_bus_finalize,
     .class_init = pci_bus_class_init,
 };
 
@@ -375,6 +377,12 @@ int pci_bus_num(PCIBus *s)
     return s->parent_dev->config[PCI_SECONDARY_BUS];
 }
 
+static void pci_bus_finalize(Object *obj)
+{
+    PCIBus *bus = PCI_BUS(obj);
+    vmstate_unregister(NULL, &vmstate_pcibus, bus);
+}
+
 static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)
 {
     PCIDevice *s = container_of(pv, PCIDevice, config);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOQ-0002b0-Sg; Tue, 28 Jan 2014 02:27: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 1W7yOO-0002ab-C5
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:12 +0000
Received: from [85.158.139.211:46627] by server-9.bemta-5.messagelabs.com id
	C4/43-15098-F7517E25; Tue, 28 Jan 2014 02:27:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1390876029!12251553!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19969 invoked from network); 28 Jan 2014 02:27:10 -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;
	28 Jan 2014 02:27: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 1W7yOL-000641-Ki
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOL-00015U-Jf
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:09 +0000
Date: Tue, 28 Jan 2014 02:27:09 +0000
Message-Id: <E1W7yOL-00015U-Jf@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] pci: unregister
	vmstate_pcibus on unplug
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://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="===============6892892566896715771=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

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

commit 0f6298786f0d88a29d150a19870f2ea7bc5c01a5
Author:     Bandan Das <bsd@redhat.com>
AuthorDate: Wed Nov 6 17:52:17 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    pci: unregister vmstate_pcibus on unplug
    
    PCIBus registers a vmstate during init. Unregister it upon
    removal/unplug.
    
    Signed-off-by: Bandan Das <bsd@redhat.com>
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit 5c397242d5d53c1adecce31817bb439383cf8228)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/pci/pci.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 4c004f5..dc5b788 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -47,6 +47,7 @@ static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent);
 static char *pcibus_get_dev_path(DeviceState *dev);
 static char *pcibus_get_fw_dev_path(DeviceState *dev);
 static int pcibus_reset(BusState *qbus);
+static void pci_bus_finalize(Object *obj);
 
 static Property pci_props[] = {
     DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
@@ -73,6 +74,7 @@ static const TypeInfo pci_bus_info = {
     .name = TYPE_PCI_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(PCIBus),
+    .instance_finalize = pci_bus_finalize,
     .class_init = pci_bus_class_init,
 };
 
@@ -375,6 +377,12 @@ int pci_bus_num(PCIBus *s)
     return s->parent_dev->config[PCI_SECONDARY_BUS];
 }
 
+static void pci_bus_finalize(Object *obj)
+{
+    PCIBus *bus = PCI_BUS(obj);
+    vmstate_unregister(NULL, &vmstate_pcibus, bus);
+}
+
 static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)
 {
     PCIDevice *s = container_of(pv, PCIDevice, config);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git


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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOZ-0002cS-AI; Tue, 28 Jan 2014 02:27:23 +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 1W7yOY-0002cF-Bg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:22 +0000
Received: from [85.158.143.35:58685] by server-1.bemta-4.messagelabs.com id
	3C/9D-02132-98517E25; Tue, 28 Jan 2014 02:27:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390876040!1196601!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28940 invoked from network); 28 Jan 2014 02:27:20 -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;
	28 Jan 2014 02:27: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 1W7yOV-000647-R9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOV-00015v-NY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:19 +0000
Date: Tue, 28 Jan 2014 02:27:19 +0000
Message-Id: <E1W7yOV-00015v-NY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] rng-egd: offset the point
	when repeatedly read from the buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7cfd037403ba34e8ed1ebfa4e7d6abec738e2000
Author:     Amos Kong <akong@redhat.com>
AuthorDate: Thu Nov 21 16:42:51 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    rng-egd: offset the point when repeatedly read from the buffer
    
    The buffer content might be read out more than once, currently
    we just repeatedly read the first data block, buffer offset is
    missing.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Amos Kong <akong@redhat.com>
    Message-id: 1385023371-8198-3-git-send-email-akong@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 1eb1bd9eafa890f1f4d16ef5cb8b9239a86874d9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 backends/rng-egd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/backends/rng-egd.c b/backends/rng-egd.c
index 9e5a536..2962795 100644
--- a/backends/rng-egd.c
+++ b/backends/rng-egd.c
@@ -91,12 +91,14 @@ static int rng_egd_chr_can_read(void *opaque)
 static void rng_egd_chr_read(void *opaque, const uint8_t *buf, int size)
 {
     RngEgd *s = RNG_EGD(opaque);
+    size_t buf_offset = 0;
 
     while (size > 0 && s->requests) {
         RngRequest *req = s->requests->data;
         int len = MIN(size, req->size - req->offset);
 
-        memcpy(req->data + req->offset, buf, len);
+        memcpy(req->data + req->offset, buf + buf_offset, len);
+        buf_offset += len;
         req->offset += len;
         size -= len;
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOZ-0002cS-AI; Tue, 28 Jan 2014 02:27:23 +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 1W7yOY-0002cF-Bg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:22 +0000
Received: from [85.158.143.35:58685] by server-1.bemta-4.messagelabs.com id
	3C/9D-02132-98517E25; Tue, 28 Jan 2014 02:27:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390876040!1196601!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28940 invoked from network); 28 Jan 2014 02:27:20 -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;
	28 Jan 2014 02:27: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 1W7yOV-000647-R9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOV-00015v-NY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:19 +0000
Date: Tue, 28 Jan 2014 02:27:19 +0000
Message-Id: <E1W7yOV-00015v-NY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] rng-egd: offset the point
	when repeatedly read from the buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 7cfd037403ba34e8ed1ebfa4e7d6abec738e2000
Author:     Amos Kong <akong@redhat.com>
AuthorDate: Thu Nov 21 16:42:51 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    rng-egd: offset the point when repeatedly read from the buffer
    
    The buffer content might be read out more than once, currently
    we just repeatedly read the first data block, buffer offset is
    missing.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Amos Kong <akong@redhat.com>
    Message-id: 1385023371-8198-3-git-send-email-akong@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@amazon.com>
    (cherry picked from commit 1eb1bd9eafa890f1f4d16ef5cb8b9239a86874d9)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 backends/rng-egd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/backends/rng-egd.c b/backends/rng-egd.c
index 9e5a536..2962795 100644
--- a/backends/rng-egd.c
+++ b/backends/rng-egd.c
@@ -91,12 +91,14 @@ static int rng_egd_chr_can_read(void *opaque)
 static void rng_egd_chr_read(void *opaque, const uint8_t *buf, int size)
 {
     RngEgd *s = RNG_EGD(opaque);
+    size_t buf_offset = 0;
 
     while (size > 0 && s->requests) {
         RngRequest *req = s->requests->data;
         int len = MIN(size, req->size - req->offset);
 
-        memcpy(req->data + req->offset, buf, len);
+        memcpy(req->data + req->offset, buf + buf_offset, len);
+        buf_offset += len;
         req->offset += len;
         size -= len;
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOk-0002eD-DT; Tue, 28 Jan 2014 02:27:34 +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 1W7yOi-0002dx-QA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:33 +0000
Received: from [85.158.137.68:35233] by server-6.bemta-3.messagelabs.com id
	49/59-04868-49517E25; Tue, 28 Jan 2014 02:27:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1390876050!11705785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3477 invoked from network); 28 Jan 2014 02:27:31 -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;
	28 Jan 2014 02:27: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 1W7yOf-00064F-WB
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOf-000171-UQ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:29 +0000
Date: Tue, 28 Jan 2014 02:27:29 +0000
Message-Id: <E1W7yOf-000171-UQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vfio-pci: Release all
	MSI-X vectors when disabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d90ff19d0a664400232ae062163790937068a0f8
Author:     Alex Williamson <alex.williamson@redhat.com>
AuthorDate: Fri Dec 6 11:16:40 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vfio-pci: Release all MSI-X vectors when disabled
    
    We were relying on msix_unset_vector_notifiers() to release all the
    vectors when we disable MSI-X, but this only happens when MSI-X is
    still enabled on the device.  Perform further cleanup by releasing
    any remaining vectors listed as in-use after this call.  This caused
    a leak of IRQ routes on hotplug depending on how the guest OS prepared
    the device for removal.
    
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Cc: qemu-stable@nongnu.org
    (cherry picked from commit 3e40ba0faf0822fa78336fe6cd9d677ea9b14f1b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/misc/vfio.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index d9e78e1..2bb2d09 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -873,8 +873,20 @@ static void vfio_disable_msi_common(VFIODevice *vdev)
 
 static void vfio_disable_msix(VFIODevice *vdev)
 {
+    int i;
+
     msix_unset_vector_notifiers(&vdev->pdev);
 
+    /*
+     * MSI-X will only release vectors if MSI-X is still enabled on the
+     * device, check through the rest and release it ourselves if necessary.
+     */
+    for (i = 0; i < vdev->nr_vectors; i++) {
+        if (vdev->msi_vectors[i].use) {
+            vfio_msix_vector_release(&vdev->pdev, i);
+        }
+    }
+
     if (vdev->nr_vectors) {
         vfio_disable_irqindex(vdev, VFIO_PCI_MSIX_IRQ_INDEX);
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOk-0002eD-DT; Tue, 28 Jan 2014 02:27:34 +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 1W7yOi-0002dx-QA
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:33 +0000
Received: from [85.158.137.68:35233] by server-6.bemta-3.messagelabs.com id
	49/59-04868-49517E25; Tue, 28 Jan 2014 02:27:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1390876050!11705785!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3477 invoked from network); 28 Jan 2014 02:27:31 -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;
	28 Jan 2014 02:27: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 1W7yOf-00064F-WB
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOf-000171-UQ
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:29 +0000
Date: Tue, 28 Jan 2014 02:27:29 +0000
Message-Id: <E1W7yOf-000171-UQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vfio-pci: Release all
	MSI-X vectors when disabled
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d90ff19d0a664400232ae062163790937068a0f8
Author:     Alex Williamson <alex.williamson@redhat.com>
AuthorDate: Fri Dec 6 11:16:40 2013 -0700
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vfio-pci: Release all MSI-X vectors when disabled
    
    We were relying on msix_unset_vector_notifiers() to release all the
    vectors when we disable MSI-X, but this only happens when MSI-X is
    still enabled on the device.  Perform further cleanup by releasing
    any remaining vectors listed as in-use after this call.  This caused
    a leak of IRQ routes on hotplug depending on how the guest OS prepared
    the device for removal.
    
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Cc: qemu-stable@nongnu.org
    (cherry picked from commit 3e40ba0faf0822fa78336fe6cd9d677ea9b14f1b)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/misc/vfio.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index d9e78e1..2bb2d09 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -873,8 +873,20 @@ static void vfio_disable_msi_common(VFIODevice *vdev)
 
 static void vfio_disable_msix(VFIODevice *vdev)
 {
+    int i;
+
     msix_unset_vector_notifiers(&vdev->pdev);
 
+    /*
+     * MSI-X will only release vectors if MSI-X is still enabled on the
+     * device, check through the rest and release it ourselves if necessary.
+     */
+    for (i = 0; i < vdev->nr_vectors; i++) {
+        if (vdev->msi_vectors[i].use) {
+            vfio_msix_vector_release(&vdev->pdev, i);
+        }
+    }
+
     if (vdev->nr_vectors) {
         vfio_disable_irqindex(vdev, VFIO_PCI_MSIX_IRQ_INDEX);
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOu-0002ft-Gu; Tue, 28 Jan 2014 02:27:44 +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 1W7yOs-0002fc-Lc
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:42 +0000
Received: from [193.109.254.147:36219] by server-16.bemta-14.messagelabs.com
	id 20/C9-20600-E9517E25; Tue, 28 Jan 2014 02:27:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1390876060!237923!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21431 invoked from network); 28 Jan 2014 02:27:41 -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;
	28 Jan 2014 02:27: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 1W7yOq-00064L-3w
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOq-00017T-2s
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:40 +0000
Date: Tue, 28 Jan 2014 02:27:40 +0000
Message-Id: <E1W7yOq-00017T-2s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2: Zero-initialise
	first cluster for new images
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 982c8c5e209d0331f06c0d6bd9a440aa67a5e721
Author:     Kevin Wolf <kwolf@redhat.com>
AuthorDate: Wed Dec 4 11:06:36 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: Zero-initialise first cluster for new images
    
    Strictly speaking, this is only required for has_zero_init() == false,
    but it's easy enough to just do a cluster-aligned write that is padded
    with zeros after the header.
    
    This fixes that after 'qemu-img create' header extensions are attempted
    to be parsed that are really just random leftover data.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Reviewed-by: Fam Zheng <famz@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit f8413b3c23b08a547ce18609acc6fae5fd04ed5c)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2.c |   36 ++++++++++++++++++++----------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 7f7282e..3bf932b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1285,7 +1285,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
      * size for any qcow2 image.
      */
     BlockDriverState* bs;
-    QCowHeader header;
+    QCowHeader *header;
     uint8_t* refcount_table;
     int ret;
 
@@ -1300,30 +1300,34 @@ static int qcow2_create2(const char *filename, int64_t total_size,
     }
 
     /* Write the header */
-    memset(&header, 0, sizeof(header));
-    header.magic = cpu_to_be32(QCOW_MAGIC);
-    header.version = cpu_to_be32(version);
-    header.cluster_bits = cpu_to_be32(cluster_bits);
-    header.size = cpu_to_be64(0);
-    header.l1_table_offset = cpu_to_be64(0);
-    header.l1_size = cpu_to_be32(0);
-    header.refcount_table_offset = cpu_to_be64(cluster_size);
-    header.refcount_table_clusters = cpu_to_be32(1);
-    header.refcount_order = cpu_to_be32(3 + REFCOUNT_SHIFT);
-    header.header_length = cpu_to_be32(sizeof(header));
+    QEMU_BUILD_BUG_ON((1 << MIN_CLUSTER_BITS) < sizeof(*header));
+    header = g_malloc0(cluster_size);
+    *header = (QCowHeader) {
+        .magic                      = cpu_to_be32(QCOW_MAGIC),
+        .version                    = cpu_to_be32(version),
+        .cluster_bits               = cpu_to_be32(cluster_bits),
+        .size                       = cpu_to_be64(0),
+        .l1_table_offset            = cpu_to_be64(0),
+        .l1_size                    = cpu_to_be32(0),
+        .refcount_table_offset      = cpu_to_be64(cluster_size),
+        .refcount_table_clusters    = cpu_to_be32(1),
+        .refcount_order             = cpu_to_be32(3 + REFCOUNT_SHIFT),
+        .header_length              = cpu_to_be32(sizeof(*header)),
+    };
 
     if (flags & BLOCK_FLAG_ENCRYPT) {
-        header.crypt_method = cpu_to_be32(QCOW_CRYPT_AES);
+        header->crypt_method = cpu_to_be32(QCOW_CRYPT_AES);
     } else {
-        header.crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
+        header->crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
     }
 
     if (flags & BLOCK_FLAG_LAZY_REFCOUNTS) {
-        header.compatible_features |=
+        header->compatible_features |=
             cpu_to_be64(QCOW2_COMPAT_LAZY_REFCOUNTS);
     }
 
-    ret = bdrv_pwrite(bs, 0, &header, sizeof(header));
+    ret = bdrv_pwrite(bs, 0, header, cluster_size);
+    g_free(header);
     if (ret < 0) {
         goto out;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yOu-0002ft-Gu; Tue, 28 Jan 2014 02:27:44 +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 1W7yOs-0002fc-Lc
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:42 +0000
Received: from [193.109.254.147:36219] by server-16.bemta-14.messagelabs.com
	id 20/C9-20600-E9517E25; Tue, 28 Jan 2014 02:27:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1390876060!237923!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21431 invoked from network); 28 Jan 2014 02:27:41 -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;
	28 Jan 2014 02:27: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 1W7yOq-00064L-3w
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yOq-00017T-2s
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:40 +0000
Date: Tue, 28 Jan 2014 02:27:40 +0000
Message-Id: <E1W7yOq-00017T-2s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qcow2: Zero-initialise
	first cluster for new images
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 982c8c5e209d0331f06c0d6bd9a440aa67a5e721
Author:     Kevin Wolf <kwolf@redhat.com>
AuthorDate: Wed Dec 4 11:06:36 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    qcow2: Zero-initialise first cluster for new images
    
    Strictly speaking, this is only required for has_zero_init() == false,
    but it's easy enough to just do a cluster-aligned write that is padded
    with zeros after the header.
    
    This fixes that after 'qemu-img create' header extensions are attempted
    to be parsed that are really just random leftover data.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Reviewed-by: Fam Zheng <famz@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit f8413b3c23b08a547ce18609acc6fae5fd04ed5c)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2.c |   36 ++++++++++++++++++++----------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 7f7282e..3bf932b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1285,7 +1285,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
      * size for any qcow2 image.
      */
     BlockDriverState* bs;
-    QCowHeader header;
+    QCowHeader *header;
     uint8_t* refcount_table;
     int ret;
 
@@ -1300,30 +1300,34 @@ static int qcow2_create2(const char *filename, int64_t total_size,
     }
 
     /* Write the header */
-    memset(&header, 0, sizeof(header));
-    header.magic = cpu_to_be32(QCOW_MAGIC);
-    header.version = cpu_to_be32(version);
-    header.cluster_bits = cpu_to_be32(cluster_bits);
-    header.size = cpu_to_be64(0);
-    header.l1_table_offset = cpu_to_be64(0);
-    header.l1_size = cpu_to_be32(0);
-    header.refcount_table_offset = cpu_to_be64(cluster_size);
-    header.refcount_table_clusters = cpu_to_be32(1);
-    header.refcount_order = cpu_to_be32(3 + REFCOUNT_SHIFT);
-    header.header_length = cpu_to_be32(sizeof(header));
+    QEMU_BUILD_BUG_ON((1 << MIN_CLUSTER_BITS) < sizeof(*header));
+    header = g_malloc0(cluster_size);
+    *header = (QCowHeader) {
+        .magic                      = cpu_to_be32(QCOW_MAGIC),
+        .version                    = cpu_to_be32(version),
+        .cluster_bits               = cpu_to_be32(cluster_bits),
+        .size                       = cpu_to_be64(0),
+        .l1_table_offset            = cpu_to_be64(0),
+        .l1_size                    = cpu_to_be32(0),
+        .refcount_table_offset      = cpu_to_be64(cluster_size),
+        .refcount_table_clusters    = cpu_to_be32(1),
+        .refcount_order             = cpu_to_be32(3 + REFCOUNT_SHIFT),
+        .header_length              = cpu_to_be32(sizeof(*header)),
+    };
 
     if (flags & BLOCK_FLAG_ENCRYPT) {
-        header.crypt_method = cpu_to_be32(QCOW_CRYPT_AES);
+        header->crypt_method = cpu_to_be32(QCOW_CRYPT_AES);
     } else {
-        header.crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
+        header->crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
     }
 
     if (flags & BLOCK_FLAG_LAZY_REFCOUNTS) {
-        header.compatible_features |=
+        header->compatible_features |=
             cpu_to_be64(QCOW2_COMPAT_LAZY_REFCOUNTS);
     }
 
-    ret = bdrv_pwrite(bs, 0, &header, sizeof(header));
+    ret = bdrv_pwrite(bs, 0, header, cluster_size);
+    g_free(header);
     if (ret < 0) {
         goto out;
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:57 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yP7-0002hG-KL; Tue, 28 Jan 2014 02:27:57 +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 1W7yP5-0002h6-E0
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:55 +0000
Received: from [193.109.254.147:36624] by server-7.bemta-14.messagelabs.com id
	8F/B4-15500-AA517E25; Tue, 28 Jan 2014 02:27:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1390876070!239791!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17072 invoked from network); 28 Jan 2014 02:27:51 -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;
	28 Jan 2014 02:27: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 1W7yP0-00064R-8f
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yP0-00017p-7A
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:50 +0000
Date: Tue, 28 Jan 2014 02:27:50 +0000
Message-Id: <E1W7yP0-00017p-7A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vmdk: Fix creating big
	description file
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 12f741031feb870b9b4ed6819b3c16ca5f2c6816
Author:     Fam Zheng <famz@redhat.com>
AuthorDate: Tue Dec 3 10:41:05 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vmdk: Fix creating big description file
    
    The buffer for description file was 4096 which only covers a few
    hundred of extents. This changes the buffer to dynamic allocated with
    g_strdup_printf in order to support bigger cases.
    
    Signed-off-by: Fam Zheng <famz@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit af057fe74092df2e7a576448ddbdc0daac1370bf)
    
    Conflicts:
    
    	block/vmdk.c
    	tests/qemu-iotests/059
    	tests/qemu-iotests/059.out
    
    *removed dependencies on 4823970b and 4f6fd349
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/vmdk.c               |   59 +-
 tests/qemu-iotests/059     |    5 +
 tests/qemu-iotests/059.out | 2027 +++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 2060 insertions(+), 31 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index dcee07a..71c21de 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1538,7 +1538,7 @@ static int filename_decompose(const char *filename, char *path, char *prefix,
 static int vmdk_create(const char *filename, QEMUOptionParameter *options)
 {
     int fd, idx = 0;
-    char desc[BUF_SIZE];
+    char *desc = NULL;
     int64_t total_size = 0, filesize;
     const char *adapter_type = NULL;
     const char *backing_file = NULL;
@@ -1546,7 +1546,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
     int flags = 0;
     int ret = 0;
     bool flat, split, compress;
-    char ext_desc_lines[BUF_SIZE] = "";
+    GString *ext_desc_lines;
     char path[PATH_MAX], prefix[PATH_MAX], postfix[PATH_MAX];
     const int64_t split_size = 0x80000000;  /* VMDK has constant split size */
     const char *desc_extent_line;
@@ -1574,8 +1574,11 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
         "ddb.geometry.sectors = \"63\"\n"
         "ddb.adapterType = \"%s\"\n";
 
+    ext_desc_lines = g_string_new(NULL);
+
     if (filename_decompose(filename, path, prefix, postfix, PATH_MAX)) {
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     /* Read out options */
     while (options && options->name) {
@@ -1601,7 +1604,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                strcmp(adapter_type, "lsilogic") &&
                strcmp(adapter_type, "legacyESX")) {
         fprintf(stderr, "VMDK: Unknown adapter type: '%s'.\n", adapter_type);
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     if (strcmp(adapter_type, "ide") != 0) {
         /* that's the number of heads with which vmware operates when
@@ -1617,7 +1621,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                strcmp(fmt, "twoGbMaxExtentFlat") &&
                strcmp(fmt, "streamOptimized")) {
         fprintf(stderr, "VMDK: Unknown subformat: %s\n", fmt);
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     split = !(strcmp(fmt, "twoGbMaxExtentFlat") &&
               strcmp(fmt, "twoGbMaxExtentSparse"));
@@ -1631,18 +1636,20 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
     }
     if (flat && backing_file) {
         /* not supporting backing file for flat image */
-        return -ENOTSUP;
+        ret = -ENOTSUP;
+        goto exit;
     }
     if (backing_file) {
         BlockDriverState *bs = bdrv_new("");
         ret = bdrv_open(bs, backing_file, NULL, 0, NULL);
         if (ret != 0) {
             bdrv_delete(bs);
-            return ret;
+            goto exit;
         }
         if (strcmp(bs->drv->format_name, "vmdk")) {
             bdrv_delete(bs);
-            return -EINVAL;
+            ret = -EINVAL;
+            goto exit;
         }
         parent_cid = vmdk_read_cid(bs, 0);
         bdrv_delete(bs);
@@ -1676,25 +1683,27 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
 
         if (vmdk_create_extent(ext_filename, size,
                                flat, compress, zeroed_grain)) {
-            return -EINVAL;
+            ret = -EINVAL;
+            goto exit;
         }
         filesize -= size;
 
         /* Format description line */
         snprintf(desc_line, sizeof(desc_line),
                     desc_extent_line, size / 512, desc_filename);
-        pstrcat(ext_desc_lines, sizeof(ext_desc_lines), desc_line);
+        g_string_append(ext_desc_lines, desc_line);
     }
     /* generate descriptor file */
-    snprintf(desc, sizeof(desc), desc_template,
-            (unsigned int)time(NULL),
-            parent_cid,
-            fmt,
-            parent_desc_line,
-            ext_desc_lines,
-            (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
-            total_size / (int64_t)(63 * number_heads * 512), number_heads,
-                adapter_type);
+    desc = g_strdup_printf(desc_template,
+                           (unsigned int)time(NULL),
+                           parent_cid,
+                           fmt,
+                           parent_desc_line,
+                           ext_desc_lines->str,
+                           (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
+                           total_size / (int64_t)(63 * number_heads * 512),
+                           number_heads,
+                           adapter_type);
     if (split || flat) {
         fd = qemu_open(filename,
                        O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
@@ -1705,21 +1714,25 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                        0644);
     }
     if (fd < 0) {
-        return -errno;
+        ret = -errno;
+        goto exit;
     }
     /* the descriptor offset = 0x200 */
     if (!split && !flat && 0x200 != lseek(fd, 0x200, SEEK_SET)) {
         ret = -errno;
-        goto exit;
+        goto close_exit;
     }
     ret = qemu_write_full(fd, desc, strlen(desc));
     if (ret != strlen(desc)) {
         ret = -errno;
-        goto exit;
+        goto close_exit;
     }
     ret = 0;
-exit:
+close_exit:
     qemu_close(fd);
+exit:
+    g_free(desc);
+    g_string_free(ext_desc_lines, true);
     return ret;
 }
 
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index b03429d..5d61a60 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -66,6 +66,11 @@ poke_file "$TEST_IMG" "$capacity_offset" "\xff\xff\xff\xff"
 poke_file "$TEST_IMG" "$grain_table_size_offset" "\x01\x00\x00\x00"
 { $QEMU_IO -c "read 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
 
+echo
+echo "=== Testing big twoGbMaxExtentFlat ==="
+IMGOPTS="subformat=twoGbMaxExtentFlat" _make_test_img 1000G
+$QEMU_IMG info $TEST_IMG | _filter_testdir | sed -e 's/cid: [0-9]*/cid: XXXXXXXX/'
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out
index 9e715e5..115602a 100644
--- a/tests/qemu-iotests/059.out
+++ b/tests/qemu-iotests/059.out
@@ -1,20 +1,2031 @@
 QA output created by 059
-=== Testing invalid granularity ===
 
+=== Testing invalid granularity ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-invalid granularity, image may be corrupt
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: Invalid granularity, image may be corrupt
 no file open, try 'help open'
-=== Testing too big L2 table size ===
 
+=== Testing too big L2 table size ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
 L2 table size too big
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: Could not open 'TEST_DIR/t.vmdk': Wrong medium type
 no file open, try 'help open'
-=== Testing too big L1 table size ===
 
+=== Testing too big L1 table size ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-L1 size too big
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: L1 size too big
 no file open, try 'help open'
+
+=== Testing big twoGbMaxExtentFlat ===
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824000
+image: TEST_DIR/t.vmdk
+file format: vmdk
+virtual size: 1.0T (1073741824000 bytes)
+disk size: 16K
+Format specific information:
+    cid: XXXXXXXX
+    parent cid: XXXXXXXX
+    create type: twoGbMaxExtentFlat
+    extents:
+        [0]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f001.vmdk
+            format: FLAT
+        [1]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f002.vmdk
+            format: FLAT
+        [2]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f003.vmdk
+            format: FLAT
+        [3]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f004.vmdk
+            format: FLAT
+        [4]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f005.vmdk
+            format: FLAT
+        [5]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f006.vmdk
+            format: FLAT
+        [6]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f007.vmdk
+            format: FLAT
+        [7]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f008.vmdk
+            format: FLAT
+        [8]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f009.vmdk
+            format: FLAT
+        [9]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f010.vmdk
+            format: FLAT
+        [10]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f011.vmdk
+            format: FLAT
+        [11]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f012.vmdk
+            format: FLAT
+        [12]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f013.vmdk
+            format: FLAT
+        [13]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f014.vmdk
+            format: FLAT
+        [14]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f015.vmdk
+            format: FLAT
+        [15]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f016.vmdk
+            format: FLAT
+        [16]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f017.vmdk
+            format: FLAT
+        [17]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f018.vmdk
+            format: FLAT
+        [18]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f019.vmdk
+            format: FLAT
+        [19]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f020.vmdk
+            format: FLAT
+        [20]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f021.vmdk
+            format: FLAT
+        [21]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f022.vmdk
+            format: FLAT
+        [22]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f023.vmdk
+            format: FLAT
+        [23]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f024.vmdk
+            format: FLAT
+        [24]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f025.vmdk
+            format: FLAT
+        [25]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f026.vmdk
+            format: FLAT
+        [26]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f027.vmdk
+            format: FLAT
+        [27]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f028.vmdk
+            format: FLAT
+        [28]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f029.vmdk
+            format: FLAT
+        [29]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f030.vmdk
+            format: FLAT
+        [30]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f031.vmdk
+            format: FLAT
+        [31]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f032.vmdk
+            format: FLAT
+        [32]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f033.vmdk
+            format: FLAT
+        [33]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f034.vmdk
+            format: FLAT
+        [34]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f035.vmdk
+            format: FLAT
+        [35]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f036.vmdk
+            format: FLAT
+        [36]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f037.vmdk
+            format: FLAT
+        [37]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f038.vmdk
+            format: FLAT
+        [38]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f039.vmdk
+            format: FLAT
+        [39]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f040.vmdk
+            format: FLAT
+        [40]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f041.vmdk
+            format: FLAT
+        [41]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f042.vmdk
+            format: FLAT
+        [42]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f043.vmdk
+            format: FLAT
+        [43]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f044.vmdk
+            format: FLAT
+        [44]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f045.vmdk
+            format: FLAT
+        [45]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f046.vmdk
+            format: FLAT
+        [46]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f047.vmdk
+            format: FLAT
+        [47]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f048.vmdk
+            format: FLAT
+        [48]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f049.vmdk
+            format: FLAT
+        [49]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f050.vmdk
+            format: FLAT
+        [50]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f051.vmdk
+            format: FLAT
+        [51]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f052.vmdk
+            format: FLAT
+        [52]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f053.vmdk
+            format: FLAT
+        [53]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f054.vmdk
+            format: FLAT
+        [54]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f055.vmdk
+            format: FLAT
+        [55]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f056.vmdk
+            format: FLAT
+        [56]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f057.vmdk
+            format: FLAT
+        [57]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f058.vmdk
+            format: FLAT
+        [58]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f059.vmdk
+            format: FLAT
+        [59]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f060.vmdk
+            format: FLAT
+        [60]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f061.vmdk
+            format: FLAT
+        [61]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f062.vmdk
+            format: FLAT
+        [62]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f063.vmdk
+            format: FLAT
+        [63]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f064.vmdk
+            format: FLAT
+        [64]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f065.vmdk
+            format: FLAT
+        [65]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f066.vmdk
+            format: FLAT
+        [66]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f067.vmdk
+            format: FLAT
+        [67]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f068.vmdk
+            format: FLAT
+        [68]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f069.vmdk
+            format: FLAT
+        [69]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f070.vmdk
+            format: FLAT
+        [70]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f071.vmdk
+            format: FLAT
+        [71]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f072.vmdk
+            format: FLAT
+        [72]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f073.vmdk
+            format: FLAT
+        [73]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f074.vmdk
+            format: FLAT
+        [74]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f075.vmdk
+            format: FLAT
+        [75]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f076.vmdk
+            format: FLAT
+        [76]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f077.vmdk
+            format: FLAT
+        [77]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f078.vmdk
+            format: FLAT
+        [78]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f079.vmdk
+            format: FLAT
+        [79]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f080.vmdk
+            format: FLAT
+        [80]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f081.vmdk
+            format: FLAT
+        [81]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f082.vmdk
+            format: FLAT
+        [82]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f083.vmdk
+            format: FLAT
+        [83]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f084.vmdk
+            format: FLAT
+        [84]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f085.vmdk
+            format: FLAT
+        [85]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f086.vmdk
+            format: FLAT
+        [86]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f087.vmdk
+            format: FLAT
+        [87]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f088.vmdk
+            format: FLAT
+        [88]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f089.vmdk
+            format: FLAT
+        [89]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f090.vmdk
+            format: FLAT
+        [90]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f091.vmdk
+            format: FLAT
+        [91]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f092.vmdk
+            format: FLAT
+        [92]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f093.vmdk
+            format: FLAT
+        [93]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f094.vmdk
+            format: FLAT
+        [94]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f095.vmdk
+            format: FLAT
+        [95]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f096.vmdk
+            format: FLAT
+        [96]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f097.vmdk
+            format: FLAT
+        [97]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f098.vmdk
+            format: FLAT
+        [98]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f099.vmdk
+            format: FLAT
+        [99]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f100.vmdk
+            format: FLAT
+        [100]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f101.vmdk
+            format: FLAT
+        [101]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f102.vmdk
+            format: FLAT
+        [102]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f103.vmdk
+            format: FLAT
+        [103]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f104.vmdk
+            format: FLAT
+        [104]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f105.vmdk
+            format: FLAT
+        [105]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f106.vmdk
+            format: FLAT
+        [106]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f107.vmdk
+            format: FLAT
+        [107]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f108.vmdk
+            format: FLAT
+        [108]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f109.vmdk
+            format: FLAT
+        [109]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f110.vmdk
+            format: FLAT
+        [110]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f111.vmdk
+            format: FLAT
+        [111]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f112.vmdk
+            format: FLAT
+        [112]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f113.vmdk
+            format: FLAT
+        [113]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f114.vmdk
+            format: FLAT
+        [114]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f115.vmdk
+            format: FLAT
+        [115]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f116.vmdk
+            format: FLAT
+        [116]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f117.vmdk
+            format: FLAT
+        [117]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f118.vmdk
+            format: FLAT
+        [118]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f119.vmdk
+            format: FLAT
+        [119]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f120.vmdk
+            format: FLAT
+        [120]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f121.vmdk
+            format: FLAT
+        [121]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f122.vmdk
+            format: FLAT
+        [122]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f123.vmdk
+            format: FLAT
+        [123]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f124.vmdk
+            format: FLAT
+        [124]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f125.vmdk
+            format: FLAT
+        [125]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f126.vmdk
+            format: FLAT
+        [126]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f127.vmdk
+            format: FLAT
+        [127]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f128.vmdk
+            format: FLAT
+        [128]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f129.vmdk
+            format: FLAT
+        [129]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f130.vmdk
+            format: FLAT
+        [130]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f131.vmdk
+            format: FLAT
+        [131]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f132.vmdk
+            format: FLAT
+        [132]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f133.vmdk
+            format: FLAT
+        [133]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f134.vmdk
+            format: FLAT
+        [134]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f135.vmdk
+            format: FLAT
+        [135]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f136.vmdk
+            format: FLAT
+        [136]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f137.vmdk
+            format: FLAT
+        [137]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f138.vmdk
+            format: FLAT
+        [138]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f139.vmdk
+            format: FLAT
+        [139]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f140.vmdk
+            format: FLAT
+        [140]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f141.vmdk
+            format: FLAT
+        [141]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f142.vmdk
+            format: FLAT
+        [142]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f143.vmdk
+            format: FLAT
+        [143]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f144.vmdk
+            format: FLAT
+        [144]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f145.vmdk
+            format: FLAT
+        [145]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f146.vmdk
+            format: FLAT
+        [146]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f147.vmdk
+            format: FLAT
+        [147]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f148.vmdk
+            format: FLAT
+        [148]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f149.vmdk
+            format: FLAT
+        [149]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f150.vmdk
+            format: FLAT
+        [150]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f151.vmdk
+            format: FLAT
+        [151]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f152.vmdk
+            format: FLAT
+        [152]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f153.vmdk
+            format: FLAT
+        [153]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f154.vmdk
+            format: FLAT
+        [154]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f155.vmdk
+            format: FLAT
+        [155]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f156.vmdk
+            format: FLAT
+        [156]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f157.vmdk
+            format: FLAT
+        [157]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f158.vmdk
+            format: FLAT
+        [158]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f159.vmdk
+            format: FLAT
+        [159]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f160.vmdk
+            format: FLAT
+        [160]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f161.vmdk
+            format: FLAT
+        [161]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f162.vmdk
+            format: FLAT
+        [162]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f163.vmdk
+            format: FLAT
+        [163]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f164.vmdk
+            format: FLAT
+        [164]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f165.vmdk
+            format: FLAT
+        [165]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f166.vmdk
+            format: FLAT
+        [166]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f167.vmdk
+            format: FLAT
+        [167]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f168.vmdk
+            format: FLAT
+        [168]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f169.vmdk
+            format: FLAT
+        [169]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f170.vmdk
+            format: FLAT
+        [170]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f171.vmdk
+            format: FLAT
+        [171]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f172.vmdk
+            format: FLAT
+        [172]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f173.vmdk
+            format: FLAT
+        [173]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f174.vmdk
+            format: FLAT
+        [174]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f175.vmdk
+            format: FLAT
+        [175]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f176.vmdk
+            format: FLAT
+        [176]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f177.vmdk
+            format: FLAT
+        [177]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f178.vmdk
+            format: FLAT
+        [178]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f179.vmdk
+            format: FLAT
+        [179]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f180.vmdk
+            format: FLAT
+        [180]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f181.vmdk
+            format: FLAT
+        [181]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f182.vmdk
+            format: FLAT
+        [182]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f183.vmdk
+            format: FLAT
+        [183]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f184.vmdk
+            format: FLAT
+        [184]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f185.vmdk
+            format: FLAT
+        [185]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f186.vmdk
+            format: FLAT
+        [186]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f187.vmdk
+            format: FLAT
+        [187]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f188.vmdk
+            format: FLAT
+        [188]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f189.vmdk
+            format: FLAT
+        [189]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f190.vmdk
+            format: FLAT
+        [190]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f191.vmdk
+            format: FLAT
+        [191]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f192.vmdk
+            format: FLAT
+        [192]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f193.vmdk
+            format: FLAT
+        [193]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f194.vmdk
+            format: FLAT
+        [194]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f195.vmdk
+            format: FLAT
+        [195]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f196.vmdk
+            format: FLAT
+        [196]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f197.vmdk
+            format: FLAT
+        [197]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f198.vmdk
+            format: FLAT
+        [198]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f199.vmdk
+            format: FLAT
+        [199]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f200.vmdk
+            format: FLAT
+        [200]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f201.vmdk
+            format: FLAT
+        [201]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f202.vmdk
+            format: FLAT
+        [202]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f203.vmdk
+            format: FLAT
+        [203]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f204.vmdk
+            format: FLAT
+        [204]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f205.vmdk
+            format: FLAT
+        [205]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f206.vmdk
+            format: FLAT
+        [206]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f207.vmdk
+            format: FLAT
+        [207]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f208.vmdk
+            format: FLAT
+        [208]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f209.vmdk
+            format: FLAT
+        [209]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f210.vmdk
+            format: FLAT
+        [210]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f211.vmdk
+            format: FLAT
+        [211]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f212.vmdk
+            format: FLAT
+        [212]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f213.vmdk
+            format: FLAT
+        [213]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f214.vmdk
+            format: FLAT
+        [214]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f215.vmdk
+            format: FLAT
+        [215]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f216.vmdk
+            format: FLAT
+        [216]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f217.vmdk
+            format: FLAT
+        [217]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f218.vmdk
+            format: FLAT
+        [218]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f219.vmdk
+            format: FLAT
+        [219]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f220.vmdk
+            format: FLAT
+        [220]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f221.vmdk
+            format: FLAT
+        [221]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f222.vmdk
+            format: FLAT
+        [222]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f223.vmdk
+            format: FLAT
+        [223]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f224.vmdk
+            format: FLAT
+        [224]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f225.vmdk
+            format: FLAT
+        [225]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f226.vmdk
+            format: FLAT
+        [226]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f227.vmdk
+            format: FLAT
+        [227]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f228.vmdk
+            format: FLAT
+        [228]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f229.vmdk
+            format: FLAT
+        [229]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f230.vmdk
+            format: FLAT
+        [230]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f231.vmdk
+            format: FLAT
+        [231]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f232.vmdk
+            format: FLAT
+        [232]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f233.vmdk
+            format: FLAT
+        [233]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f234.vmdk
+            format: FLAT
+        [234]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f235.vmdk
+            format: FLAT
+        [235]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f236.vmdk
+            format: FLAT
+        [236]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f237.vmdk
+            format: FLAT
+        [237]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f238.vmdk
+            format: FLAT
+        [238]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f239.vmdk
+            format: FLAT
+        [239]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f240.vmdk
+            format: FLAT
+        [240]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f241.vmdk
+            format: FLAT
+        [241]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f242.vmdk
+            format: FLAT
+        [242]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f243.vmdk
+            format: FLAT
+        [243]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f244.vmdk
+            format: FLAT
+        [244]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f245.vmdk
+            format: FLAT
+        [245]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f246.vmdk
+            format: FLAT
+        [246]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f247.vmdk
+            format: FLAT
+        [247]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f248.vmdk
+            format: FLAT
+        [248]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f249.vmdk
+            format: FLAT
+        [249]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f250.vmdk
+            format: FLAT
+        [250]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f251.vmdk
+            format: FLAT
+        [251]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f252.vmdk
+            format: FLAT
+        [252]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f253.vmdk
+            format: FLAT
+        [253]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f254.vmdk
+            format: FLAT
+        [254]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f255.vmdk
+            format: FLAT
+        [255]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f256.vmdk
+            format: FLAT
+        [256]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f257.vmdk
+            format: FLAT
+        [257]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f258.vmdk
+            format: FLAT
+        [258]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f259.vmdk
+            format: FLAT
+        [259]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f260.vmdk
+            format: FLAT
+        [260]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f261.vmdk
+            format: FLAT
+        [261]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f262.vmdk
+            format: FLAT
+        [262]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f263.vmdk
+            format: FLAT
+        [263]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f264.vmdk
+            format: FLAT
+        [264]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f265.vmdk
+            format: FLAT
+        [265]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f266.vmdk
+            format: FLAT
+        [266]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f267.vmdk
+            format: FLAT
+        [267]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f268.vmdk
+            format: FLAT
+        [268]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f269.vmdk
+            format: FLAT
+        [269]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f270.vmdk
+            format: FLAT
+        [270]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f271.vmdk
+            format: FLAT
+        [271]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f272.vmdk
+            format: FLAT
+        [272]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f273.vmdk
+            format: FLAT
+        [273]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f274.vmdk
+            format: FLAT
+        [274]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f275.vmdk
+            format: FLAT
+        [275]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f276.vmdk
+            format: FLAT
+        [276]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f277.vmdk
+            format: FLAT
+        [277]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f278.vmdk
+            format: FLAT
+        [278]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f279.vmdk
+            format: FLAT
+        [279]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f280.vmdk
+            format: FLAT
+        [280]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f281.vmdk
+            format: FLAT
+        [281]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f282.vmdk
+            format: FLAT
+        [282]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f283.vmdk
+            format: FLAT
+        [283]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f284.vmdk
+            format: FLAT
+        [284]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f285.vmdk
+            format: FLAT
+        [285]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f286.vmdk
+            format: FLAT
+        [286]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f287.vmdk
+            format: FLAT
+        [287]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f288.vmdk
+            format: FLAT
+        [288]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f289.vmdk
+            format: FLAT
+        [289]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f290.vmdk
+            format: FLAT
+        [290]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f291.vmdk
+            format: FLAT
+        [291]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f292.vmdk
+            format: FLAT
+        [292]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f293.vmdk
+            format: FLAT
+        [293]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f294.vmdk
+            format: FLAT
+        [294]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f295.vmdk
+            format: FLAT
+        [295]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f296.vmdk
+            format: FLAT
+        [296]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f297.vmdk
+            format: FLAT
+        [297]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f298.vmdk
+            format: FLAT
+        [298]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f299.vmdk
+            format: FLAT
+        [299]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f300.vmdk
+            format: FLAT
+        [300]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f301.vmdk
+            format: FLAT
+        [301]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f302.vmdk
+            format: FLAT
+        [302]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f303.vmdk
+            format: FLAT
+        [303]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f304.vmdk
+            format: FLAT
+        [304]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f305.vmdk
+            format: FLAT
+        [305]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f306.vmdk
+            format: FLAT
+        [306]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f307.vmdk
+            format: FLAT
+        [307]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f308.vmdk
+            format: FLAT
+        [308]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f309.vmdk
+            format: FLAT
+        [309]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f310.vmdk
+            format: FLAT
+        [310]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f311.vmdk
+            format: FLAT
+        [311]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f312.vmdk
+            format: FLAT
+        [312]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f313.vmdk
+            format: FLAT
+        [313]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f314.vmdk
+            format: FLAT
+        [314]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f315.vmdk
+            format: FLAT
+        [315]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f316.vmdk
+            format: FLAT
+        [316]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f317.vmdk
+            format: FLAT
+        [317]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f318.vmdk
+            format: FLAT
+        [318]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f319.vmdk
+            format: FLAT
+        [319]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f320.vmdk
+            format: FLAT
+        [320]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f321.vmdk
+            format: FLAT
+        [321]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f322.vmdk
+            format: FLAT
+        [322]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f323.vmdk
+            format: FLAT
+        [323]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f324.vmdk
+            format: FLAT
+        [324]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f325.vmdk
+            format: FLAT
+        [325]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f326.vmdk
+            format: FLAT
+        [326]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f327.vmdk
+            format: FLAT
+        [327]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f328.vmdk
+            format: FLAT
+        [328]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f329.vmdk
+            format: FLAT
+        [329]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f330.vmdk
+            format: FLAT
+        [330]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f331.vmdk
+            format: FLAT
+        [331]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f332.vmdk
+            format: FLAT
+        [332]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f333.vmdk
+            format: FLAT
+        [333]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f334.vmdk
+            format: FLAT
+        [334]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f335.vmdk
+            format: FLAT
+        [335]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f336.vmdk
+            format: FLAT
+        [336]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f337.vmdk
+            format: FLAT
+        [337]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f338.vmdk
+            format: FLAT
+        [338]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f339.vmdk
+            format: FLAT
+        [339]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f340.vmdk
+            format: FLAT
+        [340]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f341.vmdk
+            format: FLAT
+        [341]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f342.vmdk
+            format: FLAT
+        [342]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f343.vmdk
+            format: FLAT
+        [343]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f344.vmdk
+            format: FLAT
+        [344]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f345.vmdk
+            format: FLAT
+        [345]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f346.vmdk
+            format: FLAT
+        [346]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f347.vmdk
+            format: FLAT
+        [347]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f348.vmdk
+            format: FLAT
+        [348]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f349.vmdk
+            format: FLAT
+        [349]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f350.vmdk
+            format: FLAT
+        [350]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f351.vmdk
+            format: FLAT
+        [351]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f352.vmdk
+            format: FLAT
+        [352]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f353.vmdk
+            format: FLAT
+        [353]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f354.vmdk
+            format: FLAT
+        [354]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f355.vmdk
+            format: FLAT
+        [355]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f356.vmdk
+            format: FLAT
+        [356]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f357.vmdk
+            format: FLAT
+        [357]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f358.vmdk
+            format: FLAT
+        [358]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f359.vmdk
+            format: FLAT
+        [359]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f360.vmdk
+            format: FLAT
+        [360]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f361.vmdk
+            format: FLAT
+        [361]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f362.vmdk
+            format: FLAT
+        [362]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f363.vmdk
+            format: FLAT
+        [363]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f364.vmdk
+            format: FLAT
+        [364]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f365.vmdk
+            format: FLAT
+        [365]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f366.vmdk
+            format: FLAT
+        [366]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f367.vmdk
+            format: FLAT
+        [367]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f368.vmdk
+            format: FLAT
+        [368]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f369.vmdk
+            format: FLAT
+        [369]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f370.vmdk
+            format: FLAT
+        [370]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f371.vmdk
+            format: FLAT
+        [371]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f372.vmdk
+            format: FLAT
+        [372]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f373.vmdk
+            format: FLAT
+        [373]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f374.vmdk
+            format: FLAT
+        [374]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f375.vmdk
+            format: FLAT
+        [375]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f376.vmdk
+            format: FLAT
+        [376]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f377.vmdk
+            format: FLAT
+        [377]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f378.vmdk
+            format: FLAT
+        [378]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f379.vmdk
+            format: FLAT
+        [379]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f380.vmdk
+            format: FLAT
+        [380]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f381.vmdk
+            format: FLAT
+        [381]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f382.vmdk
+            format: FLAT
+        [382]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f383.vmdk
+            format: FLAT
+        [383]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f384.vmdk
+            format: FLAT
+        [384]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f385.vmdk
+            format: FLAT
+        [385]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f386.vmdk
+            format: FLAT
+        [386]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f387.vmdk
+            format: FLAT
+        [387]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f388.vmdk
+            format: FLAT
+        [388]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f389.vmdk
+            format: FLAT
+        [389]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f390.vmdk
+            format: FLAT
+        [390]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f391.vmdk
+            format: FLAT
+        [391]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f392.vmdk
+            format: FLAT
+        [392]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f393.vmdk
+            format: FLAT
+        [393]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f394.vmdk
+            format: FLAT
+        [394]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f395.vmdk
+            format: FLAT
+        [395]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f396.vmdk
+            format: FLAT
+        [396]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f397.vmdk
+            format: FLAT
+        [397]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f398.vmdk
+            format: FLAT
+        [398]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f399.vmdk
+            format: FLAT
+        [399]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f400.vmdk
+            format: FLAT
+        [400]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f401.vmdk
+            format: FLAT
+        [401]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f402.vmdk
+            format: FLAT
+        [402]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f403.vmdk
+            format: FLAT
+        [403]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f404.vmdk
+            format: FLAT
+        [404]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f405.vmdk
+            format: FLAT
+        [405]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f406.vmdk
+            format: FLAT
+        [406]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f407.vmdk
+            format: FLAT
+        [407]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f408.vmdk
+            format: FLAT
+        [408]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f409.vmdk
+            format: FLAT
+        [409]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f410.vmdk
+            format: FLAT
+        [410]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f411.vmdk
+            format: FLAT
+        [411]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f412.vmdk
+            format: FLAT
+        [412]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f413.vmdk
+            format: FLAT
+        [413]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f414.vmdk
+            format: FLAT
+        [414]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f415.vmdk
+            format: FLAT
+        [415]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f416.vmdk
+            format: FLAT
+        [416]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f417.vmdk
+            format: FLAT
+        [417]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f418.vmdk
+            format: FLAT
+        [418]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f419.vmdk
+            format: FLAT
+        [419]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f420.vmdk
+            format: FLAT
+        [420]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f421.vmdk
+            format: FLAT
+        [421]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f422.vmdk
+            format: FLAT
+        [422]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f423.vmdk
+            format: FLAT
+        [423]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f424.vmdk
+            format: FLAT
+        [424]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f425.vmdk
+            format: FLAT
+        [425]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f426.vmdk
+            format: FLAT
+        [426]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f427.vmdk
+            format: FLAT
+        [427]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f428.vmdk
+            format: FLAT
+        [428]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f429.vmdk
+            format: FLAT
+        [429]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f430.vmdk
+            format: FLAT
+        [430]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f431.vmdk
+            format: FLAT
+        [431]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f432.vmdk
+            format: FLAT
+        [432]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f433.vmdk
+            format: FLAT
+        [433]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f434.vmdk
+            format: FLAT
+        [434]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f435.vmdk
+            format: FLAT
+        [435]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f436.vmdk
+            format: FLAT
+        [436]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f437.vmdk
+            format: FLAT
+        [437]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f438.vmdk
+            format: FLAT
+        [438]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f439.vmdk
+            format: FLAT
+        [439]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f440.vmdk
+            format: FLAT
+        [440]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f441.vmdk
+            format: FLAT
+        [441]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f442.vmdk
+            format: FLAT
+        [442]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f443.vmdk
+            format: FLAT
+        [443]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f444.vmdk
+            format: FLAT
+        [444]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f445.vmdk
+            format: FLAT
+        [445]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f446.vmdk
+            format: FLAT
+        [446]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f447.vmdk
+            format: FLAT
+        [447]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f448.vmdk
+            format: FLAT
+        [448]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f449.vmdk
+            format: FLAT
+        [449]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f450.vmdk
+            format: FLAT
+        [450]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f451.vmdk
+            format: FLAT
+        [451]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f452.vmdk
+            format: FLAT
+        [452]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f453.vmdk
+            format: FLAT
+        [453]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f454.vmdk
+            format: FLAT
+        [454]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f455.vmdk
+            format: FLAT
+        [455]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f456.vmdk
+            format: FLAT
+        [456]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f457.vmdk
+            format: FLAT
+        [457]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f458.vmdk
+            format: FLAT
+        [458]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f459.vmdk
+            format: FLAT
+        [459]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f460.vmdk
+            format: FLAT
+        [460]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f461.vmdk
+            format: FLAT
+        [461]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f462.vmdk
+            format: FLAT
+        [462]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f463.vmdk
+            format: FLAT
+        [463]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f464.vmdk
+            format: FLAT
+        [464]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f465.vmdk
+            format: FLAT
+        [465]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f466.vmdk
+            format: FLAT
+        [466]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f467.vmdk
+            format: FLAT
+        [467]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f468.vmdk
+            format: FLAT
+        [468]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f469.vmdk
+            format: FLAT
+        [469]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f470.vmdk
+            format: FLAT
+        [470]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f471.vmdk
+            format: FLAT
+        [471]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f472.vmdk
+            format: FLAT
+        [472]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f473.vmdk
+            format: FLAT
+        [473]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f474.vmdk
+            format: FLAT
+        [474]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f475.vmdk
+            format: FLAT
+        [475]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f476.vmdk
+            format: FLAT
+        [476]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f477.vmdk
+            format: FLAT
+        [477]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f478.vmdk
+            format: FLAT
+        [478]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f479.vmdk
+            format: FLAT
+        [479]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f480.vmdk
+            format: FLAT
+        [480]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f481.vmdk
+            format: FLAT
+        [481]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f482.vmdk
+            format: FLAT
+        [482]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f483.vmdk
+            format: FLAT
+        [483]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f484.vmdk
+            format: FLAT
+        [484]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f485.vmdk
+            format: FLAT
+        [485]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f486.vmdk
+            format: FLAT
+        [486]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f487.vmdk
+            format: FLAT
+        [487]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f488.vmdk
+            format: FLAT
+        [488]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f489.vmdk
+            format: FLAT
+        [489]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f490.vmdk
+            format: FLAT
+        [490]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f491.vmdk
+            format: FLAT
+        [491]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f492.vmdk
+            format: FLAT
+        [492]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f493.vmdk
+            format: FLAT
+        [493]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f494.vmdk
+            format: FLAT
+        [494]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f495.vmdk
+            format: FLAT
+        [495]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f496.vmdk
+            format: FLAT
+        [496]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f497.vmdk
+            format: FLAT
+        [497]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f498.vmdk
+            format: FLAT
+        [498]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f499.vmdk
+            format: FLAT
+        [499]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f500.vmdk
+            format: FLAT
+
 *** done
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:27:57 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:27: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 1W7yP7-0002hG-KL; Tue, 28 Jan 2014 02:27:57 +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 1W7yP5-0002h6-E0
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:55 +0000
Received: from [193.109.254.147:36624] by server-7.bemta-14.messagelabs.com id
	8F/B4-15500-AA517E25; Tue, 28 Jan 2014 02:27:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1390876070!239791!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17072 invoked from network); 28 Jan 2014 02:27:51 -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;
	28 Jan 2014 02:27: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 1W7yP0-00064R-8f
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yP0-00017p-7A
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:27:50 +0000
Date: Tue, 28 Jan 2014 02:27:50 +0000
Message-Id: <E1W7yP0-00017p-7A@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] vmdk: Fix creating big
	description file
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 12f741031feb870b9b4ed6819b3c16ca5f2c6816
Author:     Fam Zheng <famz@redhat.com>
AuthorDate: Tue Dec 3 10:41:05 2013 +0800
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    vmdk: Fix creating big description file
    
    The buffer for description file was 4096 which only covers a few
    hundred of extents. This changes the buffer to dynamic allocated with
    g_strdup_printf in order to support bigger cases.
    
    Signed-off-by: Fam Zheng <famz@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit af057fe74092df2e7a576448ddbdc0daac1370bf)
    
    Conflicts:
    
    	block/vmdk.c
    	tests/qemu-iotests/059
    	tests/qemu-iotests/059.out
    
    *removed dependencies on 4823970b and 4f6fd349
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/vmdk.c               |   59 +-
 tests/qemu-iotests/059     |    5 +
 tests/qemu-iotests/059.out | 2027 +++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 2060 insertions(+), 31 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index dcee07a..71c21de 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1538,7 +1538,7 @@ static int filename_decompose(const char *filename, char *path, char *prefix,
 static int vmdk_create(const char *filename, QEMUOptionParameter *options)
 {
     int fd, idx = 0;
-    char desc[BUF_SIZE];
+    char *desc = NULL;
     int64_t total_size = 0, filesize;
     const char *adapter_type = NULL;
     const char *backing_file = NULL;
@@ -1546,7 +1546,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
     int flags = 0;
     int ret = 0;
     bool flat, split, compress;
-    char ext_desc_lines[BUF_SIZE] = "";
+    GString *ext_desc_lines;
     char path[PATH_MAX], prefix[PATH_MAX], postfix[PATH_MAX];
     const int64_t split_size = 0x80000000;  /* VMDK has constant split size */
     const char *desc_extent_line;
@@ -1574,8 +1574,11 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
         "ddb.geometry.sectors = \"63\"\n"
         "ddb.adapterType = \"%s\"\n";
 
+    ext_desc_lines = g_string_new(NULL);
+
     if (filename_decompose(filename, path, prefix, postfix, PATH_MAX)) {
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     /* Read out options */
     while (options && options->name) {
@@ -1601,7 +1604,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                strcmp(adapter_type, "lsilogic") &&
                strcmp(adapter_type, "legacyESX")) {
         fprintf(stderr, "VMDK: Unknown adapter type: '%s'.\n", adapter_type);
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     if (strcmp(adapter_type, "ide") != 0) {
         /* that's the number of heads with which vmware operates when
@@ -1617,7 +1621,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                strcmp(fmt, "twoGbMaxExtentFlat") &&
                strcmp(fmt, "streamOptimized")) {
         fprintf(stderr, "VMDK: Unknown subformat: %s\n", fmt);
-        return -EINVAL;
+        ret = -EINVAL;
+        goto exit;
     }
     split = !(strcmp(fmt, "twoGbMaxExtentFlat") &&
               strcmp(fmt, "twoGbMaxExtentSparse"));
@@ -1631,18 +1636,20 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
     }
     if (flat && backing_file) {
         /* not supporting backing file for flat image */
-        return -ENOTSUP;
+        ret = -ENOTSUP;
+        goto exit;
     }
     if (backing_file) {
         BlockDriverState *bs = bdrv_new("");
         ret = bdrv_open(bs, backing_file, NULL, 0, NULL);
         if (ret != 0) {
             bdrv_delete(bs);
-            return ret;
+            goto exit;
         }
         if (strcmp(bs->drv->format_name, "vmdk")) {
             bdrv_delete(bs);
-            return -EINVAL;
+            ret = -EINVAL;
+            goto exit;
         }
         parent_cid = vmdk_read_cid(bs, 0);
         bdrv_delete(bs);
@@ -1676,25 +1683,27 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
 
         if (vmdk_create_extent(ext_filename, size,
                                flat, compress, zeroed_grain)) {
-            return -EINVAL;
+            ret = -EINVAL;
+            goto exit;
         }
         filesize -= size;
 
         /* Format description line */
         snprintf(desc_line, sizeof(desc_line),
                     desc_extent_line, size / 512, desc_filename);
-        pstrcat(ext_desc_lines, sizeof(ext_desc_lines), desc_line);
+        g_string_append(ext_desc_lines, desc_line);
     }
     /* generate descriptor file */
-    snprintf(desc, sizeof(desc), desc_template,
-            (unsigned int)time(NULL),
-            parent_cid,
-            fmt,
-            parent_desc_line,
-            ext_desc_lines,
-            (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
-            total_size / (int64_t)(63 * number_heads * 512), number_heads,
-                adapter_type);
+    desc = g_strdup_printf(desc_template,
+                           (unsigned int)time(NULL),
+                           parent_cid,
+                           fmt,
+                           parent_desc_line,
+                           ext_desc_lines->str,
+                           (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
+                           total_size / (int64_t)(63 * number_heads * 512),
+                           number_heads,
+                           adapter_type);
     if (split || flat) {
         fd = qemu_open(filename,
                        O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
@@ -1705,21 +1714,25 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
                        0644);
     }
     if (fd < 0) {
-        return -errno;
+        ret = -errno;
+        goto exit;
     }
     /* the descriptor offset = 0x200 */
     if (!split && !flat && 0x200 != lseek(fd, 0x200, SEEK_SET)) {
         ret = -errno;
-        goto exit;
+        goto close_exit;
     }
     ret = qemu_write_full(fd, desc, strlen(desc));
     if (ret != strlen(desc)) {
         ret = -errno;
-        goto exit;
+        goto close_exit;
     }
     ret = 0;
-exit:
+close_exit:
     qemu_close(fd);
+exit:
+    g_free(desc);
+    g_string_free(ext_desc_lines, true);
     return ret;
 }
 
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index b03429d..5d61a60 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -66,6 +66,11 @@ poke_file "$TEST_IMG" "$capacity_offset" "\xff\xff\xff\xff"
 poke_file "$TEST_IMG" "$grain_table_size_offset" "\x01\x00\x00\x00"
 { $QEMU_IO -c "read 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
 
+echo
+echo "=== Testing big twoGbMaxExtentFlat ==="
+IMGOPTS="subformat=twoGbMaxExtentFlat" _make_test_img 1000G
+$QEMU_IMG info $TEST_IMG | _filter_testdir | sed -e 's/cid: [0-9]*/cid: XXXXXXXX/'
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out
index 9e715e5..115602a 100644
--- a/tests/qemu-iotests/059.out
+++ b/tests/qemu-iotests/059.out
@@ -1,20 +1,2031 @@
 QA output created by 059
-=== Testing invalid granularity ===
 
+=== Testing invalid granularity ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-invalid granularity, image may be corrupt
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: Invalid granularity, image may be corrupt
 no file open, try 'help open'
-=== Testing too big L2 table size ===
 
+=== Testing too big L2 table size ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
 L2 table size too big
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: Could not open 'TEST_DIR/t.vmdk': Wrong medium type
 no file open, try 'help open'
-=== Testing too big L1 table size ===
 
+=== Testing too big L1 table size ===
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-L1 size too big
-qemu-io: can't open device TEST_DIR/t.vmdk
+qemu-io: can't open device TEST_DIR/t.vmdk: L1 size too big
 no file open, try 'help open'
+
+=== Testing big twoGbMaxExtentFlat ===
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824000
+image: TEST_DIR/t.vmdk
+file format: vmdk
+virtual size: 1.0T (1073741824000 bytes)
+disk size: 16K
+Format specific information:
+    cid: XXXXXXXX
+    parent cid: XXXXXXXX
+    create type: twoGbMaxExtentFlat
+    extents:
+        [0]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f001.vmdk
+            format: FLAT
+        [1]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f002.vmdk
+            format: FLAT
+        [2]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f003.vmdk
+            format: FLAT
+        [3]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f004.vmdk
+            format: FLAT
+        [4]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f005.vmdk
+            format: FLAT
+        [5]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f006.vmdk
+            format: FLAT
+        [6]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f007.vmdk
+            format: FLAT
+        [7]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f008.vmdk
+            format: FLAT
+        [8]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f009.vmdk
+            format: FLAT
+        [9]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f010.vmdk
+            format: FLAT
+        [10]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f011.vmdk
+            format: FLAT
+        [11]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f012.vmdk
+            format: FLAT
+        [12]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f013.vmdk
+            format: FLAT
+        [13]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f014.vmdk
+            format: FLAT
+        [14]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f015.vmdk
+            format: FLAT
+        [15]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f016.vmdk
+            format: FLAT
+        [16]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f017.vmdk
+            format: FLAT
+        [17]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f018.vmdk
+            format: FLAT
+        [18]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f019.vmdk
+            format: FLAT
+        [19]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f020.vmdk
+            format: FLAT
+        [20]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f021.vmdk
+            format: FLAT
+        [21]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f022.vmdk
+            format: FLAT
+        [22]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f023.vmdk
+            format: FLAT
+        [23]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f024.vmdk
+            format: FLAT
+        [24]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f025.vmdk
+            format: FLAT
+        [25]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f026.vmdk
+            format: FLAT
+        [26]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f027.vmdk
+            format: FLAT
+        [27]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f028.vmdk
+            format: FLAT
+        [28]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f029.vmdk
+            format: FLAT
+        [29]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f030.vmdk
+            format: FLAT
+        [30]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f031.vmdk
+            format: FLAT
+        [31]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f032.vmdk
+            format: FLAT
+        [32]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f033.vmdk
+            format: FLAT
+        [33]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f034.vmdk
+            format: FLAT
+        [34]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f035.vmdk
+            format: FLAT
+        [35]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f036.vmdk
+            format: FLAT
+        [36]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f037.vmdk
+            format: FLAT
+        [37]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f038.vmdk
+            format: FLAT
+        [38]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f039.vmdk
+            format: FLAT
+        [39]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f040.vmdk
+            format: FLAT
+        [40]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f041.vmdk
+            format: FLAT
+        [41]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f042.vmdk
+            format: FLAT
+        [42]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f043.vmdk
+            format: FLAT
+        [43]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f044.vmdk
+            format: FLAT
+        [44]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f045.vmdk
+            format: FLAT
+        [45]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f046.vmdk
+            format: FLAT
+        [46]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f047.vmdk
+            format: FLAT
+        [47]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f048.vmdk
+            format: FLAT
+        [48]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f049.vmdk
+            format: FLAT
+        [49]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f050.vmdk
+            format: FLAT
+        [50]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f051.vmdk
+            format: FLAT
+        [51]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f052.vmdk
+            format: FLAT
+        [52]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f053.vmdk
+            format: FLAT
+        [53]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f054.vmdk
+            format: FLAT
+        [54]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f055.vmdk
+            format: FLAT
+        [55]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f056.vmdk
+            format: FLAT
+        [56]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f057.vmdk
+            format: FLAT
+        [57]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f058.vmdk
+            format: FLAT
+        [58]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f059.vmdk
+            format: FLAT
+        [59]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f060.vmdk
+            format: FLAT
+        [60]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f061.vmdk
+            format: FLAT
+        [61]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f062.vmdk
+            format: FLAT
+        [62]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f063.vmdk
+            format: FLAT
+        [63]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f064.vmdk
+            format: FLAT
+        [64]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f065.vmdk
+            format: FLAT
+        [65]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f066.vmdk
+            format: FLAT
+        [66]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f067.vmdk
+            format: FLAT
+        [67]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f068.vmdk
+            format: FLAT
+        [68]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f069.vmdk
+            format: FLAT
+        [69]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f070.vmdk
+            format: FLAT
+        [70]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f071.vmdk
+            format: FLAT
+        [71]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f072.vmdk
+            format: FLAT
+        [72]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f073.vmdk
+            format: FLAT
+        [73]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f074.vmdk
+            format: FLAT
+        [74]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f075.vmdk
+            format: FLAT
+        [75]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f076.vmdk
+            format: FLAT
+        [76]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f077.vmdk
+            format: FLAT
+        [77]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f078.vmdk
+            format: FLAT
+        [78]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f079.vmdk
+            format: FLAT
+        [79]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f080.vmdk
+            format: FLAT
+        [80]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f081.vmdk
+            format: FLAT
+        [81]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f082.vmdk
+            format: FLAT
+        [82]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f083.vmdk
+            format: FLAT
+        [83]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f084.vmdk
+            format: FLAT
+        [84]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f085.vmdk
+            format: FLAT
+        [85]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f086.vmdk
+            format: FLAT
+        [86]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f087.vmdk
+            format: FLAT
+        [87]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f088.vmdk
+            format: FLAT
+        [88]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f089.vmdk
+            format: FLAT
+        [89]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f090.vmdk
+            format: FLAT
+        [90]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f091.vmdk
+            format: FLAT
+        [91]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f092.vmdk
+            format: FLAT
+        [92]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f093.vmdk
+            format: FLAT
+        [93]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f094.vmdk
+            format: FLAT
+        [94]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f095.vmdk
+            format: FLAT
+        [95]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f096.vmdk
+            format: FLAT
+        [96]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f097.vmdk
+            format: FLAT
+        [97]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f098.vmdk
+            format: FLAT
+        [98]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f099.vmdk
+            format: FLAT
+        [99]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f100.vmdk
+            format: FLAT
+        [100]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f101.vmdk
+            format: FLAT
+        [101]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f102.vmdk
+            format: FLAT
+        [102]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f103.vmdk
+            format: FLAT
+        [103]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f104.vmdk
+            format: FLAT
+        [104]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f105.vmdk
+            format: FLAT
+        [105]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f106.vmdk
+            format: FLAT
+        [106]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f107.vmdk
+            format: FLAT
+        [107]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f108.vmdk
+            format: FLAT
+        [108]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f109.vmdk
+            format: FLAT
+        [109]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f110.vmdk
+            format: FLAT
+        [110]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f111.vmdk
+            format: FLAT
+        [111]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f112.vmdk
+            format: FLAT
+        [112]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f113.vmdk
+            format: FLAT
+        [113]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f114.vmdk
+            format: FLAT
+        [114]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f115.vmdk
+            format: FLAT
+        [115]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f116.vmdk
+            format: FLAT
+        [116]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f117.vmdk
+            format: FLAT
+        [117]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f118.vmdk
+            format: FLAT
+        [118]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f119.vmdk
+            format: FLAT
+        [119]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f120.vmdk
+            format: FLAT
+        [120]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f121.vmdk
+            format: FLAT
+        [121]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f122.vmdk
+            format: FLAT
+        [122]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f123.vmdk
+            format: FLAT
+        [123]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f124.vmdk
+            format: FLAT
+        [124]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f125.vmdk
+            format: FLAT
+        [125]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f126.vmdk
+            format: FLAT
+        [126]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f127.vmdk
+            format: FLAT
+        [127]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f128.vmdk
+            format: FLAT
+        [128]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f129.vmdk
+            format: FLAT
+        [129]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f130.vmdk
+            format: FLAT
+        [130]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f131.vmdk
+            format: FLAT
+        [131]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f132.vmdk
+            format: FLAT
+        [132]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f133.vmdk
+            format: FLAT
+        [133]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f134.vmdk
+            format: FLAT
+        [134]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f135.vmdk
+            format: FLAT
+        [135]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f136.vmdk
+            format: FLAT
+        [136]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f137.vmdk
+            format: FLAT
+        [137]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f138.vmdk
+            format: FLAT
+        [138]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f139.vmdk
+            format: FLAT
+        [139]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f140.vmdk
+            format: FLAT
+        [140]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f141.vmdk
+            format: FLAT
+        [141]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f142.vmdk
+            format: FLAT
+        [142]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f143.vmdk
+            format: FLAT
+        [143]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f144.vmdk
+            format: FLAT
+        [144]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f145.vmdk
+            format: FLAT
+        [145]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f146.vmdk
+            format: FLAT
+        [146]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f147.vmdk
+            format: FLAT
+        [147]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f148.vmdk
+            format: FLAT
+        [148]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f149.vmdk
+            format: FLAT
+        [149]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f150.vmdk
+            format: FLAT
+        [150]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f151.vmdk
+            format: FLAT
+        [151]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f152.vmdk
+            format: FLAT
+        [152]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f153.vmdk
+            format: FLAT
+        [153]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f154.vmdk
+            format: FLAT
+        [154]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f155.vmdk
+            format: FLAT
+        [155]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f156.vmdk
+            format: FLAT
+        [156]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f157.vmdk
+            format: FLAT
+        [157]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f158.vmdk
+            format: FLAT
+        [158]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f159.vmdk
+            format: FLAT
+        [159]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f160.vmdk
+            format: FLAT
+        [160]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f161.vmdk
+            format: FLAT
+        [161]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f162.vmdk
+            format: FLAT
+        [162]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f163.vmdk
+            format: FLAT
+        [163]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f164.vmdk
+            format: FLAT
+        [164]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f165.vmdk
+            format: FLAT
+        [165]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f166.vmdk
+            format: FLAT
+        [166]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f167.vmdk
+            format: FLAT
+        [167]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f168.vmdk
+            format: FLAT
+        [168]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f169.vmdk
+            format: FLAT
+        [169]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f170.vmdk
+            format: FLAT
+        [170]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f171.vmdk
+            format: FLAT
+        [171]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f172.vmdk
+            format: FLAT
+        [172]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f173.vmdk
+            format: FLAT
+        [173]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f174.vmdk
+            format: FLAT
+        [174]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f175.vmdk
+            format: FLAT
+        [175]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f176.vmdk
+            format: FLAT
+        [176]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f177.vmdk
+            format: FLAT
+        [177]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f178.vmdk
+            format: FLAT
+        [178]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f179.vmdk
+            format: FLAT
+        [179]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f180.vmdk
+            format: FLAT
+        [180]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f181.vmdk
+            format: FLAT
+        [181]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f182.vmdk
+            format: FLAT
+        [182]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f183.vmdk
+            format: FLAT
+        [183]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f184.vmdk
+            format: FLAT
+        [184]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f185.vmdk
+            format: FLAT
+        [185]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f186.vmdk
+            format: FLAT
+        [186]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f187.vmdk
+            format: FLAT
+        [187]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f188.vmdk
+            format: FLAT
+        [188]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f189.vmdk
+            format: FLAT
+        [189]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f190.vmdk
+            format: FLAT
+        [190]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f191.vmdk
+            format: FLAT
+        [191]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f192.vmdk
+            format: FLAT
+        [192]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f193.vmdk
+            format: FLAT
+        [193]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f194.vmdk
+            format: FLAT
+        [194]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f195.vmdk
+            format: FLAT
+        [195]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f196.vmdk
+            format: FLAT
+        [196]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f197.vmdk
+            format: FLAT
+        [197]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f198.vmdk
+            format: FLAT
+        [198]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f199.vmdk
+            format: FLAT
+        [199]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f200.vmdk
+            format: FLAT
+        [200]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f201.vmdk
+            format: FLAT
+        [201]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f202.vmdk
+            format: FLAT
+        [202]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f203.vmdk
+            format: FLAT
+        [203]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f204.vmdk
+            format: FLAT
+        [204]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f205.vmdk
+            format: FLAT
+        [205]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f206.vmdk
+            format: FLAT
+        [206]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f207.vmdk
+            format: FLAT
+        [207]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f208.vmdk
+            format: FLAT
+        [208]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f209.vmdk
+            format: FLAT
+        [209]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f210.vmdk
+            format: FLAT
+        [210]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f211.vmdk
+            format: FLAT
+        [211]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f212.vmdk
+            format: FLAT
+        [212]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f213.vmdk
+            format: FLAT
+        [213]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f214.vmdk
+            format: FLAT
+        [214]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f215.vmdk
+            format: FLAT
+        [215]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f216.vmdk
+            format: FLAT
+        [216]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f217.vmdk
+            format: FLAT
+        [217]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f218.vmdk
+            format: FLAT
+        [218]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f219.vmdk
+            format: FLAT
+        [219]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f220.vmdk
+            format: FLAT
+        [220]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f221.vmdk
+            format: FLAT
+        [221]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f222.vmdk
+            format: FLAT
+        [222]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f223.vmdk
+            format: FLAT
+        [223]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f224.vmdk
+            format: FLAT
+        [224]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f225.vmdk
+            format: FLAT
+        [225]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f226.vmdk
+            format: FLAT
+        [226]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f227.vmdk
+            format: FLAT
+        [227]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f228.vmdk
+            format: FLAT
+        [228]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f229.vmdk
+            format: FLAT
+        [229]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f230.vmdk
+            format: FLAT
+        [230]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f231.vmdk
+            format: FLAT
+        [231]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f232.vmdk
+            format: FLAT
+        [232]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f233.vmdk
+            format: FLAT
+        [233]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f234.vmdk
+            format: FLAT
+        [234]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f235.vmdk
+            format: FLAT
+        [235]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f236.vmdk
+            format: FLAT
+        [236]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f237.vmdk
+            format: FLAT
+        [237]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f238.vmdk
+            format: FLAT
+        [238]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f239.vmdk
+            format: FLAT
+        [239]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f240.vmdk
+            format: FLAT
+        [240]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f241.vmdk
+            format: FLAT
+        [241]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f242.vmdk
+            format: FLAT
+        [242]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f243.vmdk
+            format: FLAT
+        [243]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f244.vmdk
+            format: FLAT
+        [244]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f245.vmdk
+            format: FLAT
+        [245]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f246.vmdk
+            format: FLAT
+        [246]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f247.vmdk
+            format: FLAT
+        [247]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f248.vmdk
+            format: FLAT
+        [248]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f249.vmdk
+            format: FLAT
+        [249]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f250.vmdk
+            format: FLAT
+        [250]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f251.vmdk
+            format: FLAT
+        [251]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f252.vmdk
+            format: FLAT
+        [252]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f253.vmdk
+            format: FLAT
+        [253]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f254.vmdk
+            format: FLAT
+        [254]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f255.vmdk
+            format: FLAT
+        [255]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f256.vmdk
+            format: FLAT
+        [256]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f257.vmdk
+            format: FLAT
+        [257]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f258.vmdk
+            format: FLAT
+        [258]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f259.vmdk
+            format: FLAT
+        [259]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f260.vmdk
+            format: FLAT
+        [260]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f261.vmdk
+            format: FLAT
+        [261]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f262.vmdk
+            format: FLAT
+        [262]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f263.vmdk
+            format: FLAT
+        [263]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f264.vmdk
+            format: FLAT
+        [264]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f265.vmdk
+            format: FLAT
+        [265]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f266.vmdk
+            format: FLAT
+        [266]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f267.vmdk
+            format: FLAT
+        [267]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f268.vmdk
+            format: FLAT
+        [268]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f269.vmdk
+            format: FLAT
+        [269]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f270.vmdk
+            format: FLAT
+        [270]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f271.vmdk
+            format: FLAT
+        [271]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f272.vmdk
+            format: FLAT
+        [272]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f273.vmdk
+            format: FLAT
+        [273]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f274.vmdk
+            format: FLAT
+        [274]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f275.vmdk
+            format: FLAT
+        [275]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f276.vmdk
+            format: FLAT
+        [276]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f277.vmdk
+            format: FLAT
+        [277]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f278.vmdk
+            format: FLAT
+        [278]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f279.vmdk
+            format: FLAT
+        [279]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f280.vmdk
+            format: FLAT
+        [280]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f281.vmdk
+            format: FLAT
+        [281]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f282.vmdk
+            format: FLAT
+        [282]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f283.vmdk
+            format: FLAT
+        [283]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f284.vmdk
+            format: FLAT
+        [284]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f285.vmdk
+            format: FLAT
+        [285]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f286.vmdk
+            format: FLAT
+        [286]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f287.vmdk
+            format: FLAT
+        [287]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f288.vmdk
+            format: FLAT
+        [288]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f289.vmdk
+            format: FLAT
+        [289]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f290.vmdk
+            format: FLAT
+        [290]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f291.vmdk
+            format: FLAT
+        [291]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f292.vmdk
+            format: FLAT
+        [292]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f293.vmdk
+            format: FLAT
+        [293]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f294.vmdk
+            format: FLAT
+        [294]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f295.vmdk
+            format: FLAT
+        [295]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f296.vmdk
+            format: FLAT
+        [296]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f297.vmdk
+            format: FLAT
+        [297]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f298.vmdk
+            format: FLAT
+        [298]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f299.vmdk
+            format: FLAT
+        [299]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f300.vmdk
+            format: FLAT
+        [300]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f301.vmdk
+            format: FLAT
+        [301]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f302.vmdk
+            format: FLAT
+        [302]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f303.vmdk
+            format: FLAT
+        [303]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f304.vmdk
+            format: FLAT
+        [304]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f305.vmdk
+            format: FLAT
+        [305]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f306.vmdk
+            format: FLAT
+        [306]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f307.vmdk
+            format: FLAT
+        [307]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f308.vmdk
+            format: FLAT
+        [308]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f309.vmdk
+            format: FLAT
+        [309]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f310.vmdk
+            format: FLAT
+        [310]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f311.vmdk
+            format: FLAT
+        [311]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f312.vmdk
+            format: FLAT
+        [312]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f313.vmdk
+            format: FLAT
+        [313]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f314.vmdk
+            format: FLAT
+        [314]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f315.vmdk
+            format: FLAT
+        [315]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f316.vmdk
+            format: FLAT
+        [316]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f317.vmdk
+            format: FLAT
+        [317]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f318.vmdk
+            format: FLAT
+        [318]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f319.vmdk
+            format: FLAT
+        [319]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f320.vmdk
+            format: FLAT
+        [320]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f321.vmdk
+            format: FLAT
+        [321]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f322.vmdk
+            format: FLAT
+        [322]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f323.vmdk
+            format: FLAT
+        [323]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f324.vmdk
+            format: FLAT
+        [324]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f325.vmdk
+            format: FLAT
+        [325]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f326.vmdk
+            format: FLAT
+        [326]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f327.vmdk
+            format: FLAT
+        [327]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f328.vmdk
+            format: FLAT
+        [328]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f329.vmdk
+            format: FLAT
+        [329]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f330.vmdk
+            format: FLAT
+        [330]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f331.vmdk
+            format: FLAT
+        [331]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f332.vmdk
+            format: FLAT
+        [332]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f333.vmdk
+            format: FLAT
+        [333]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f334.vmdk
+            format: FLAT
+        [334]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f335.vmdk
+            format: FLAT
+        [335]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f336.vmdk
+            format: FLAT
+        [336]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f337.vmdk
+            format: FLAT
+        [337]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f338.vmdk
+            format: FLAT
+        [338]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f339.vmdk
+            format: FLAT
+        [339]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f340.vmdk
+            format: FLAT
+        [340]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f341.vmdk
+            format: FLAT
+        [341]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f342.vmdk
+            format: FLAT
+        [342]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f343.vmdk
+            format: FLAT
+        [343]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f344.vmdk
+            format: FLAT
+        [344]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f345.vmdk
+            format: FLAT
+        [345]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f346.vmdk
+            format: FLAT
+        [346]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f347.vmdk
+            format: FLAT
+        [347]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f348.vmdk
+            format: FLAT
+        [348]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f349.vmdk
+            format: FLAT
+        [349]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f350.vmdk
+            format: FLAT
+        [350]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f351.vmdk
+            format: FLAT
+        [351]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f352.vmdk
+            format: FLAT
+        [352]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f353.vmdk
+            format: FLAT
+        [353]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f354.vmdk
+            format: FLAT
+        [354]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f355.vmdk
+            format: FLAT
+        [355]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f356.vmdk
+            format: FLAT
+        [356]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f357.vmdk
+            format: FLAT
+        [357]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f358.vmdk
+            format: FLAT
+        [358]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f359.vmdk
+            format: FLAT
+        [359]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f360.vmdk
+            format: FLAT
+        [360]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f361.vmdk
+            format: FLAT
+        [361]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f362.vmdk
+            format: FLAT
+        [362]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f363.vmdk
+            format: FLAT
+        [363]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f364.vmdk
+            format: FLAT
+        [364]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f365.vmdk
+            format: FLAT
+        [365]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f366.vmdk
+            format: FLAT
+        [366]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f367.vmdk
+            format: FLAT
+        [367]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f368.vmdk
+            format: FLAT
+        [368]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f369.vmdk
+            format: FLAT
+        [369]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f370.vmdk
+            format: FLAT
+        [370]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f371.vmdk
+            format: FLAT
+        [371]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f372.vmdk
+            format: FLAT
+        [372]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f373.vmdk
+            format: FLAT
+        [373]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f374.vmdk
+            format: FLAT
+        [374]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f375.vmdk
+            format: FLAT
+        [375]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f376.vmdk
+            format: FLAT
+        [376]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f377.vmdk
+            format: FLAT
+        [377]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f378.vmdk
+            format: FLAT
+        [378]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f379.vmdk
+            format: FLAT
+        [379]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f380.vmdk
+            format: FLAT
+        [380]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f381.vmdk
+            format: FLAT
+        [381]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f382.vmdk
+            format: FLAT
+        [382]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f383.vmdk
+            format: FLAT
+        [383]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f384.vmdk
+            format: FLAT
+        [384]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f385.vmdk
+            format: FLAT
+        [385]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f386.vmdk
+            format: FLAT
+        [386]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f387.vmdk
+            format: FLAT
+        [387]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f388.vmdk
+            format: FLAT
+        [388]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f389.vmdk
+            format: FLAT
+        [389]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f390.vmdk
+            format: FLAT
+        [390]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f391.vmdk
+            format: FLAT
+        [391]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f392.vmdk
+            format: FLAT
+        [392]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f393.vmdk
+            format: FLAT
+        [393]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f394.vmdk
+            format: FLAT
+        [394]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f395.vmdk
+            format: FLAT
+        [395]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f396.vmdk
+            format: FLAT
+        [396]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f397.vmdk
+            format: FLAT
+        [397]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f398.vmdk
+            format: FLAT
+        [398]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f399.vmdk
+            format: FLAT
+        [399]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f400.vmdk
+            format: FLAT
+        [400]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f401.vmdk
+            format: FLAT
+        [401]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f402.vmdk
+            format: FLAT
+        [402]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f403.vmdk
+            format: FLAT
+        [403]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f404.vmdk
+            format: FLAT
+        [404]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f405.vmdk
+            format: FLAT
+        [405]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f406.vmdk
+            format: FLAT
+        [406]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f407.vmdk
+            format: FLAT
+        [407]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f408.vmdk
+            format: FLAT
+        [408]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f409.vmdk
+            format: FLAT
+        [409]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f410.vmdk
+            format: FLAT
+        [410]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f411.vmdk
+            format: FLAT
+        [411]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f412.vmdk
+            format: FLAT
+        [412]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f413.vmdk
+            format: FLAT
+        [413]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f414.vmdk
+            format: FLAT
+        [414]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f415.vmdk
+            format: FLAT
+        [415]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f416.vmdk
+            format: FLAT
+        [416]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f417.vmdk
+            format: FLAT
+        [417]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f418.vmdk
+            format: FLAT
+        [418]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f419.vmdk
+            format: FLAT
+        [419]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f420.vmdk
+            format: FLAT
+        [420]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f421.vmdk
+            format: FLAT
+        [421]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f422.vmdk
+            format: FLAT
+        [422]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f423.vmdk
+            format: FLAT
+        [423]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f424.vmdk
+            format: FLAT
+        [424]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f425.vmdk
+            format: FLAT
+        [425]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f426.vmdk
+            format: FLAT
+        [426]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f427.vmdk
+            format: FLAT
+        [427]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f428.vmdk
+            format: FLAT
+        [428]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f429.vmdk
+            format: FLAT
+        [429]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f430.vmdk
+            format: FLAT
+        [430]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f431.vmdk
+            format: FLAT
+        [431]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f432.vmdk
+            format: FLAT
+        [432]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f433.vmdk
+            format: FLAT
+        [433]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f434.vmdk
+            format: FLAT
+        [434]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f435.vmdk
+            format: FLAT
+        [435]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f436.vmdk
+            format: FLAT
+        [436]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f437.vmdk
+            format: FLAT
+        [437]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f438.vmdk
+            format: FLAT
+        [438]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f439.vmdk
+            format: FLAT
+        [439]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f440.vmdk
+            format: FLAT
+        [440]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f441.vmdk
+            format: FLAT
+        [441]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f442.vmdk
+            format: FLAT
+        [442]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f443.vmdk
+            format: FLAT
+        [443]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f444.vmdk
+            format: FLAT
+        [444]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f445.vmdk
+            format: FLAT
+        [445]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f446.vmdk
+            format: FLAT
+        [446]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f447.vmdk
+            format: FLAT
+        [447]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f448.vmdk
+            format: FLAT
+        [448]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f449.vmdk
+            format: FLAT
+        [449]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f450.vmdk
+            format: FLAT
+        [450]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f451.vmdk
+            format: FLAT
+        [451]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f452.vmdk
+            format: FLAT
+        [452]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f453.vmdk
+            format: FLAT
+        [453]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f454.vmdk
+            format: FLAT
+        [454]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f455.vmdk
+            format: FLAT
+        [455]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f456.vmdk
+            format: FLAT
+        [456]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f457.vmdk
+            format: FLAT
+        [457]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f458.vmdk
+            format: FLAT
+        [458]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f459.vmdk
+            format: FLAT
+        [459]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f460.vmdk
+            format: FLAT
+        [460]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f461.vmdk
+            format: FLAT
+        [461]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f462.vmdk
+            format: FLAT
+        [462]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f463.vmdk
+            format: FLAT
+        [463]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f464.vmdk
+            format: FLAT
+        [464]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f465.vmdk
+            format: FLAT
+        [465]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f466.vmdk
+            format: FLAT
+        [466]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f467.vmdk
+            format: FLAT
+        [467]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f468.vmdk
+            format: FLAT
+        [468]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f469.vmdk
+            format: FLAT
+        [469]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f470.vmdk
+            format: FLAT
+        [470]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f471.vmdk
+            format: FLAT
+        [471]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f472.vmdk
+            format: FLAT
+        [472]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f473.vmdk
+            format: FLAT
+        [473]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f474.vmdk
+            format: FLAT
+        [474]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f475.vmdk
+            format: FLAT
+        [475]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f476.vmdk
+            format: FLAT
+        [476]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f477.vmdk
+            format: FLAT
+        [477]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f478.vmdk
+            format: FLAT
+        [478]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f479.vmdk
+            format: FLAT
+        [479]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f480.vmdk
+            format: FLAT
+        [480]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f481.vmdk
+            format: FLAT
+        [481]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f482.vmdk
+            format: FLAT
+        [482]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f483.vmdk
+            format: FLAT
+        [483]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f484.vmdk
+            format: FLAT
+        [484]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f485.vmdk
+            format: FLAT
+        [485]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f486.vmdk
+            format: FLAT
+        [486]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f487.vmdk
+            format: FLAT
+        [487]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f488.vmdk
+            format: FLAT
+        [488]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f489.vmdk
+            format: FLAT
+        [489]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f490.vmdk
+            format: FLAT
+        [490]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f491.vmdk
+            format: FLAT
+        [491]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f492.vmdk
+            format: FLAT
+        [492]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f493.vmdk
+            format: FLAT
+        [493]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f494.vmdk
+            format: FLAT
+        [494]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f495.vmdk
+            format: FLAT
+        [495]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f496.vmdk
+            format: FLAT
+        [496]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f497.vmdk
+            format: FLAT
+        [497]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f498.vmdk
+            format: FLAT
+        [498]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f499.vmdk
+            format: FLAT
+        [499]:
+            virtual size: 2147483648
+            filename: TEST_DIR/t-f500.vmdk
+            format: FLAT
+
 *** done
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPE-0002iV-TN; Tue, 28 Jan 2014 02:28:04 +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 1W7yPC-0002i4-UH
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:03 +0000
Received: from [85.158.143.35:60018] by server-1.bemta-4.messagelabs.com id
	95/DD-02132-2B517E25; Tue, 28 Jan 2014 02:28:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390876080!1196666!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30111 invoked from network); 28 Jan 2014 02:28:01 -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;
	28 Jan 2014 02:28: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 1W7yPA-00064X-DO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPA-00018D-Bn
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:00 +0000
Date: Tue, 28 Jan 2014 02:28:00 +0000
Message-Id: <E1W7yPA-00018D-Bn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] seccomp: add kill() to the
	syscall whitelist
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 08dde5b17b56d64c1536177866eafa98db4fba74
Author:     Paul Moore <pmoore@redhat.com>
AuthorDate: Thu Nov 21 10:40:15 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    seccomp: add kill() to the syscall whitelist
    
    The kill() syscall is triggered with the following command:
    
     # qemu -sandbox on -monitor stdio \
            -device intel-hda -device hda-duplex -vnc :0
    
    The resulting syslog/audit message:
    
     # ausearch -m SECCOMP
     ----
     time->Wed Nov 20 09:52:08 2013
     type=SECCOMP msg=audit(1384912328.482:6656): auid=0 uid=0 gid=0 ses=854
      subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12087
      comm="qemu-kvm" sig=31 syscall=62 compat=0 ip=0x7f7a1d2abc67 code=0x0
     # scmp_sys_resolver 62
     kill
    
    Reported-by: CongLi <coli@redhat.com>
    Tested-by: CongLi <coli@redhat.com>
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
    (cherry picked from commit e9eecb5bf82a71564bf018fcbbfc6cda19cab6c2)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-seccomp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 37d38f8..fb3cbfd 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -113,6 +113,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(write), 244 },
     { SCMP_SYS(fcntl), 243 },
     { SCMP_SYS(tgkill), 242 },
+    { SCMP_SYS(kill), 242 },
     { SCMP_SYS(rt_sigaction), 242 },
     { SCMP_SYS(pipe2), 242 },
     { SCMP_SYS(munmap), 242 },
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPE-0002iV-TN; Tue, 28 Jan 2014 02:28:04 +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 1W7yPC-0002i4-UH
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:03 +0000
Received: from [85.158.143.35:60018] by server-1.bemta-4.messagelabs.com id
	95/DD-02132-2B517E25; Tue, 28 Jan 2014 02:28:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390876080!1196666!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30111 invoked from network); 28 Jan 2014 02:28:01 -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;
	28 Jan 2014 02:28: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 1W7yPA-00064X-DO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPA-00018D-Bn
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:00 +0000
Date: Tue, 28 Jan 2014 02:28:00 +0000
Message-Id: <E1W7yPA-00018D-Bn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] seccomp: add kill() to the
	syscall whitelist
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 08dde5b17b56d64c1536177866eafa98db4fba74
Author:     Paul Moore <pmoore@redhat.com>
AuthorDate: Thu Nov 21 10:40:15 2013 -0500
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 11:40:30 2013 -0600

    seccomp: add kill() to the syscall whitelist
    
    The kill() syscall is triggered with the following command:
    
     # qemu -sandbox on -monitor stdio \
            -device intel-hda -device hda-duplex -vnc :0
    
    The resulting syslog/audit message:
    
     # ausearch -m SECCOMP
     ----
     time->Wed Nov 20 09:52:08 2013
     type=SECCOMP msg=audit(1384912328.482:6656): auid=0 uid=0 gid=0 ses=854
      subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12087
      comm="qemu-kvm" sig=31 syscall=62 compat=0 ip=0x7f7a1d2abc67 code=0x0
     # scmp_sys_resolver 62
     kill
    
    Reported-by: CongLi <coli@redhat.com>
    Tested-by: CongLi <coli@redhat.com>
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
    (cherry picked from commit e9eecb5bf82a71564bf018fcbbfc6cda19cab6c2)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-seccomp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 37d38f8..fb3cbfd 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -113,6 +113,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(write), 244 },
     { SCMP_SYS(fcntl), 243 },
     { SCMP_SYS(tgkill), 242 },
+    { SCMP_SYS(kill), 242 },
     { SCMP_SYS(rt_sigaction), 242 },
     { SCMP_SYS(pipe2), 242 },
     { SCMP_SYS(munmap), 242 },
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yPO-0002kD-7M; Tue, 28 Jan 2014 02:28: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 1W7yPN-0002k3-6C
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:13 +0000
Received: from [85.158.139.211:48294] by server-4.bemta-5.messagelabs.com id
	F3/52-26791-CB517E25; Tue, 28 Jan 2014 02:28:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1390876090!433200!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13875 invoked from network); 28 Jan 2014 02:28:11 -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;
	28 Jan 2014 02:28: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 1W7yPK-000659-In
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPK-00018k-HE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:10 +0000
Date: Tue, 28 Jan 2014 02:28:10 +0000
Message-Id: <E1W7yPK-00018k-HE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] target-mips: fix 64-bit
	FPU config for user-mode emulation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 68a1ac19a1a24bc47c8c6db1bca7026e2199cc32
Author:     Petar Jovanovic <petar.jovanovic@imgtec.com>
AuthorDate: Fri Nov 29 17:27:42 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:42:33 2013 -0600

    target-mips: fix 64-bit FPU config for user-mode emulation
    
    FR bit should be initialized to 1 for MIPS64, under condition that this
    bit is writable and that CPU has an FPU unit. It should be initialized to
    zero for MIPS32.
    This fixes different MIPS32 issues with FPU instructions whose behaviour
    defaulted to 64-bit FPU mode.
    
    Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 4d66261f71f2efa31e1052e4041c5ee505572fe5)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target-mips/translate.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index e2eb908..cf29e71 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -15988,10 +15988,13 @@ void cpu_state_reset(CPUMIPSState *env)
     if (env->CP0_Config3 & (1 << CP0C3_DSPP)) {
         env->CP0_Status |= (1 << CP0St_MX);
     }
-    /* Enable 64-bit FPU if the target cpu supports it.  */
-    if (env->active_fpu.fcr0 & (1 << FCR0_F64)) {
+# if defined(TARGET_MIPS64)
+    /* For MIPS64, init FR bit to 1 if FPU unit is there and bit is writable. */
+    if ((env->CP0_Config1 & (1 << CP0C1_FP)) &&
+        (env->CP0_Status_rw_bitmask & (1 << CP0St_FR))) {
         env->CP0_Status |= (1 << CP0St_FR);
     }
+# endif
 #else
     if (env->hflags & MIPS_HFLAG_BMASK) {
         /* If the exception was raised from a delay slot,
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:14 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yPO-0002kD-7M; Tue, 28 Jan 2014 02:28: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 1W7yPN-0002k3-6C
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:13 +0000
Received: from [85.158.139.211:48294] by server-4.bemta-5.messagelabs.com id
	F3/52-26791-CB517E25; Tue, 28 Jan 2014 02:28:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1390876090!433200!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13875 invoked from network); 28 Jan 2014 02:28:11 -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;
	28 Jan 2014 02:28: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 1W7yPK-000659-In
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPK-00018k-HE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:10 +0000
Date: Tue, 28 Jan 2014 02:28:10 +0000
Message-Id: <E1W7yPK-00018k-HE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] target-mips: fix 64-bit
	FPU config for user-mode emulation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 68a1ac19a1a24bc47c8c6db1bca7026e2199cc32
Author:     Petar Jovanovic <petar.jovanovic@imgtec.com>
AuthorDate: Fri Nov 29 17:27:42 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:42:33 2013 -0600

    target-mips: fix 64-bit FPU config for user-mode emulation
    
    FR bit should be initialized to 1 for MIPS64, under condition that this
    bit is writable and that CPU has an FPU unit. It should be initialized to
    zero for MIPS32.
    This fixes different MIPS32 issues with FPU instructions whose behaviour
    defaulted to 64-bit FPU mode.
    
    Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 4d66261f71f2efa31e1052e4041c5ee505572fe5)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target-mips/translate.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index e2eb908..cf29e71 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -15988,10 +15988,13 @@ void cpu_state_reset(CPUMIPSState *env)
     if (env->CP0_Config3 & (1 << CP0C3_DSPP)) {
         env->CP0_Status |= (1 << CP0St_MX);
     }
-    /* Enable 64-bit FPU if the target cpu supports it.  */
-    if (env->active_fpu.fcr0 & (1 << FCR0_F64)) {
+# if defined(TARGET_MIPS64)
+    /* For MIPS64, init FR bit to 1 if FPU unit is there and bit is writable. */
+    if ((env->CP0_Config1 & (1 << CP0C1_FP)) &&
+        (env->CP0_Status_rw_bitmask & (1 << CP0St_FR))) {
         env->CP0_Status |= (1 << CP0St_FR);
     }
+# endif
 #else
     if (env->hflags & MIPS_HFLAG_BMASK) {
         /* If the exception was raised from a delay slot,
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPY-0002lk-A2; Tue, 28 Jan 2014 02:28:24 +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 1W7yPX-0002lb-H0
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:23 +0000
Received: from [85.158.137.68:47326] by server-1.bemta-3.messagelabs.com id
	BC/57-29598-6C517E25; Tue, 28 Jan 2014 02:28:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1390876100!11631225!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15750 invoked from network); 28 Jan 2014 02:28:21 -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;
	28 Jan 2014 02:28: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 1W7yPU-00065F-Mk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPU-000196-Lh
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:20 +0000
Date: Tue, 28 Jan 2014 02:28:20 +0000
Message-Id: <E1W7yPU-000196-Lh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu-ga: execute
	fsfreeze-freeze in reverse order of mounts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9388fdb603e69d1c251f9bdfaac575ad3258583a
Author:     Tomoki Sekiyama <tomoki.sekiyama@hds.com>
AuthorDate: Tue Oct 1 17:09:53 2013 -0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:45:41 2013 -0600

    qemu-ga: execute fsfreeze-freeze in reverse order of mounts
    
    Currently, fsfreeze-freeze may cause deadlock if a guest has loopback mounts
    of image files in its disk; e.g.:
    
        # mount | grep ^/
        /dev/vda1 / type ext4 (rw,noatime,seclabel,data=ordered)
        /tmp/disk.img on /mnt type ext4 (rw,relatime,seclabel)
    
    To avoid the deadlock, this freezes filesystems in reverse order of mounts.
    
    Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    *fix up commit msg
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    (cherry picked from commit e5d9adbdab972a2172815c1174aed3fabcc448f1)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands-posix.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index e199738..f453132 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -566,7 +566,7 @@ typedef struct FsMount {
     QTAILQ_ENTRY(FsMount) next;
 } FsMount;
 
-typedef QTAILQ_HEAD(, FsMount) FsMountList;
+typedef QTAILQ_HEAD(FsMountList, FsMount) FsMountList;
 
 static void free_fs_mount_list(FsMountList *mounts)
 {
@@ -728,7 +728,7 @@ int64_t qmp_guest_fsfreeze_freeze(Error **err)
     /* cannot risk guest agent blocking itself on a write in this state */
     ga_set_frozen(ga_state);
 
-    QTAILQ_FOREACH(mount, &mounts, next) {
+    QTAILQ_FOREACH_REVERSE(mount, &mounts, FsMountList, next) {
         fd = qemu_open(mount->dirname, O_RDONLY);
         if (fd == -1) {
             error_setg_errno(err, errno, "failed to open %s", mount->dirname);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPY-0002lk-A2; Tue, 28 Jan 2014 02:28:24 +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 1W7yPX-0002lb-H0
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:23 +0000
Received: from [85.158.137.68:47326] by server-1.bemta-3.messagelabs.com id
	BC/57-29598-6C517E25; Tue, 28 Jan 2014 02:28:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1390876100!11631225!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15750 invoked from network); 28 Jan 2014 02:28:21 -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;
	28 Jan 2014 02:28: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 1W7yPU-00065F-Mk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPU-000196-Lh
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:20 +0000
Date: Tue, 28 Jan 2014 02:28:20 +0000
Message-Id: <E1W7yPU-000196-Lh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu-ga: execute
	fsfreeze-freeze in reverse order of mounts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 9388fdb603e69d1c251f9bdfaac575ad3258583a
Author:     Tomoki Sekiyama <tomoki.sekiyama@hds.com>
AuthorDate: Tue Oct 1 17:09:53 2013 -0400
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:45:41 2013 -0600

    qemu-ga: execute fsfreeze-freeze in reverse order of mounts
    
    Currently, fsfreeze-freeze may cause deadlock if a guest has loopback mounts
    of image files in its disk; e.g.:
    
        # mount | grep ^/
        /dev/vda1 / type ext4 (rw,noatime,seclabel,data=ordered)
        /tmp/disk.img on /mnt type ext4 (rw,relatime,seclabel)
    
    To avoid the deadlock, this freezes filesystems in reverse order of mounts.
    
    Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    *fix up commit msg
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    (cherry picked from commit e5d9adbdab972a2172815c1174aed3fabcc448f1)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands-posix.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index e199738..f453132 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -566,7 +566,7 @@ typedef struct FsMount {
     QTAILQ_ENTRY(FsMount) next;
 } FsMount;
 
-typedef QTAILQ_HEAD(, FsMount) FsMountList;
+typedef QTAILQ_HEAD(FsMountList, FsMount) FsMountList;
 
 static void free_fs_mount_list(FsMountList *mounts)
 {
@@ -728,7 +728,7 @@ int64_t qmp_guest_fsfreeze_freeze(Error **err)
     /* cannot risk guest agent blocking itself on a write in this state */
     ga_set_frozen(ga_state);
 
-    QTAILQ_FOREACH(mount, &mounts, next) {
+    QTAILQ_FOREACH_REVERSE(mount, &mounts, FsMountList, next) {
         fd = qemu_open(mount->dirname, O_RDONLY);
         if (fd == -1) {
             error_setg_errno(err, errno, "failed to open %s", mount->dirname);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPi-0002ne-F1; Tue, 28 Jan 2014 02:28:34 +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 1W7yPh-0002nV-Oz
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:33 +0000
Received: from [85.158.137.68:42737] by server-15.bemta-3.messagelabs.com id
	26/EF-11556-1D517E25; Tue, 28 Jan 2014 02:28:33 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390876111!11660864!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1360 invoked from network); 28 Jan 2014 02:28:32 -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;
	28 Jan 2014 02:28: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 1W7yPe-00065N-UL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPe-0001A3-QO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:30 +0000
Date: Tue, 28 Jan 2014 02:28:30 +0000
Message-Id: <E1W7yPe-0001A3-QO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable]
	scsi_target_send_command(): amend stable-1.6 port of the
	CVE-2013-4344 fix
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 192d2f4cc7931668d4e4f10e882af3c097193c47
Author:     Laszlo Ersek <lersek@redhat.com>
AuthorDate: Sat Nov 2 20:14:21 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:49:49 2013 -0600

    scsi_target_send_command(): amend stable-1.6 port of the CVE-2013-4344 fix
    
    The originally suggested fix for CVE-2013-4344 introduced a regression in
    scsi_target_send_command() / REQUEST_SENSE; the third argument passed to
    scsi_device_get_sense() -- for the "len" parameter -- ignored the
    possibility of the guest SCSI driver requesting truncated (or shorter than
    full) sense data.
    
    This could result in (r->len > req->cmd.xfer) on return, which is not
    valid SCSI.
    
    The problem was addressed in the second round, and the commit on the
    master branch (84642435) is correct. However the stable-1.6 branch (the
    v1.6.1 release) has the original, regressive fix (commit fdcbe7d5); let's
    update it.
    
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/scsi/scsi-bus.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index ad26c25..d352da7 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -460,7 +460,8 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
         break;
     case REQUEST_SENSE:
         scsi_target_alloc_buf(&r->req, SCSI_SENSE_LEN);
-        r->len = scsi_device_get_sense(r->req.dev, r->buf, r->buf_len,
+        r->len = scsi_device_get_sense(r->req.dev, r->buf,
+                                       MIN(req->cmd.xfer, r->buf_len),
                                        (req->cmd.buf[1] & 1) == 0);
         if (r->req.dev->sense_is_ua) {
             scsi_device_unit_attention_reported(req->dev);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPi-0002ne-F1; Tue, 28 Jan 2014 02:28:34 +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 1W7yPh-0002nV-Oz
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:33 +0000
Received: from [85.158.137.68:42737] by server-15.bemta-3.messagelabs.com id
	26/EF-11556-1D517E25; Tue, 28 Jan 2014 02:28:33 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390876111!11660864!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1360 invoked from network); 28 Jan 2014 02:28:32 -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;
	28 Jan 2014 02:28: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 1W7yPe-00065N-UL
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPe-0001A3-QO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:30 +0000
Date: Tue, 28 Jan 2014 02:28:30 +0000
Message-Id: <E1W7yPe-0001A3-QO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable]
	scsi_target_send_command(): amend stable-1.6 port of the
	CVE-2013-4344 fix
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 192d2f4cc7931668d4e4f10e882af3c097193c47
Author:     Laszlo Ersek <lersek@redhat.com>
AuthorDate: Sat Nov 2 20:14:21 2013 +0100
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 14:49:49 2013 -0600

    scsi_target_send_command(): amend stable-1.6 port of the CVE-2013-4344 fix
    
    The originally suggested fix for CVE-2013-4344 introduced a regression in
    scsi_target_send_command() / REQUEST_SENSE; the third argument passed to
    scsi_device_get_sense() -- for the "len" parameter -- ignored the
    possibility of the guest SCSI driver requesting truncated (or shorter than
    full) sense data.
    
    This could result in (r->len > req->cmd.xfer) on return, which is not
    valid SCSI.
    
    The problem was addressed in the second round, and the commit on the
    master branch (84642435) is correct. However the stable-1.6 branch (the
    v1.6.1 release) has the original, regressive fix (commit fdcbe7d5); let's
    update it.
    
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/scsi/scsi-bus.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index ad26c25..d352da7 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -460,7 +460,8 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
         break;
     case REQUEST_SENSE:
         scsi_target_alloc_buf(&r->req, SCSI_SENSE_LEN);
-        r->len = scsi_device_get_sense(r->req.dev, r->buf, r->buf_len,
+        r->len = scsi_device_get_sense(r->req.dev, r->buf,
+                                       MIN(req->cmd.xfer, r->buf_len),
                                        (req->cmd.buf[1] & 1) == 0);
         if (r->req.dev->sense_is_ua) {
             scsi_device_unit_attention_reported(req->dev);
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPs-0002q8-Hw; Tue, 28 Jan 2014 02:28:44 +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 1W7yPr-0002pr-DR
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:43 +0000
Received: from [193.109.254.147:11649] by server-9.bemta-14.messagelabs.com id
	1F/C6-13957-AD517E25; Tue, 28 Jan 2014 02:28:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1390876121!239475!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5992 invoked from network); 28 Jan 2014 02:28:42 -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;
	28 Jan 2014 02:28:42 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPp-00065T-1o
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:41 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPp-0001AX-0p
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:41 +0000
Date: Tue, 28 Jan 2014 02:28:41 +0000
Message-Id: <E1W7yPp-0001AX-0p@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Update VERSION for 1.6.2
	release
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e82ee0845c3240541e79b9bf21779b3f8743f1b4
Author:     Michael Roth <mdroth@linux.vnet.ibm.com>
AuthorDate: Mon Dec 9 18:19:25 2013 -0600
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 18:21:01 2013 -0600

    Update VERSION for 1.6.2 release
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 VERSION |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/VERSION b/VERSION
index 9c6d629..fdd3be6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.6.1
+1.6.2
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28: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 1W7yPs-0002q8-Hw; Tue, 28 Jan 2014 02:28:44 +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 1W7yPr-0002pr-DR
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:43 +0000
Received: from [193.109.254.147:11649] by server-9.bemta-14.messagelabs.com id
	1F/C6-13957-AD517E25; Tue, 28 Jan 2014 02:28:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1390876121!239475!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5992 invoked from network); 28 Jan 2014 02:28:42 -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;
	28 Jan 2014 02:28:42 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPp-00065T-1o
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:41 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPp-0001AX-0p
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:41 +0000
Date: Tue, 28 Jan 2014 02:28:41 +0000
Message-Id: <E1W7yPp-0001AX-0p@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Update VERSION for 1.6.2
	release
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e82ee0845c3240541e79b9bf21779b3f8743f1b4
Author:     Michael Roth <mdroth@linux.vnet.ibm.com>
AuthorDate: Mon Dec 9 18:19:25 2013 -0600
Commit:     Michael Roth <mdroth@linux.vnet.ibm.com>
CommitDate: Mon Dec 9 18:21:01 2013 -0600

    Update VERSION for 1.6.2 release
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 VERSION |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/VERSION b/VERSION
index 9c6d629..fdd3be6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.6.1
+1.6.2
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:54 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yQ2-0002tx-LI; Tue, 28 Jan 2014 02:28:54 +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 1W7yQ1-0002th-Pz
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:53 +0000
Received: from [85.158.139.211:29339] by server-5.bemta-5.messagelabs.com id
	CF/63-14928-4E517E25; Tue, 28 Jan 2014 02:28:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390876131!12104324!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18952 invoked from network); 28 Jan 2014 02:28:52 -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;
	28 Jan 2014 02:28: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 1W7yPz-00065Z-76
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:51 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPz-0001Au-5S
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:51 +0000
Date: Tue, 28 Jan 2014 02:28:51 +0000
Message-Id: <E1W7yPz-0001Au-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Merge remote-tracking
	branch 'xen-staging/master' into ppp27
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e7e4fbe629e2e094e20e32ac7a8fa63830c4c159
Merge: e82ee0845c3240541e79b9bf21779b3f8743f1b4 b97307ecaad98360f41ea36cd9674ef810c4f8cf
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Jan 24 15:59:08 2014 +0000
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 15:59:08 2014 +0000

    Merge remote-tracking branch 'xen-staging/master' into ppp27

--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:28:54 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:28:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yQ2-0002tx-LI; Tue, 28 Jan 2014 02:28:54 +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 1W7yQ1-0002th-Pz
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:53 +0000
Received: from [85.158.139.211:29339] by server-5.bemta-5.messagelabs.com id
	CF/63-14928-4E517E25; Tue, 28 Jan 2014 02:28:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1390876131!12104324!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18952 invoked from network); 28 Jan 2014 02:28:52 -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;
	28 Jan 2014 02:28: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 1W7yPz-00065Z-76
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:51 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yPz-0001Au-5S
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:28:51 +0000
Date: Tue, 28 Jan 2014 02:28:51 +0000
Message-Id: <E1W7yPz-0001Au-5S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Merge remote-tracking
	branch 'xen-staging/master' into ppp27
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit e7e4fbe629e2e094e20e32ac7a8fa63830c4c159
Merge: e82ee0845c3240541e79b9bf21779b3f8743f1b4 b97307ecaad98360f41ea36cd9674ef810c4f8cf
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Jan 24 15:59:08 2014 +0000
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 15:59:08 2014 +0000

    Merge remote-tracking branch 'xen-staging/master' into ppp27

--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:29:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:29: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 1W7yQC-0002w2-Sq; Tue, 28 Jan 2014 02:29:04 +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 1W7yQB-0002vp-Rb
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:04 +0000
Received: from [85.158.143.35:64032] by server-2.bemta-4.messagelabs.com id
	95/16-11386-FE517E25; Tue, 28 Jan 2014 02:29:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390876141!1202118!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2147 invoked from network); 28 Jan 2014 02:29:02 -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;
	28 Jan 2014 02:29: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 1W7yQ9-00065i-Bm
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:01 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yQ9-0001BQ-A4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:01 +0000
Date: Tue, 28 Jan 2014 02:29:01 +0000
Message-Id: <E1W7yQ9-0001BQ-A4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Revert "Fix pc migration
	from qemu <= 1.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 67fc29f33afaf53a12776d9bd502e51a66b5ad5f
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Jan 24 19:26:12 2014 +0000
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 19:26:12 2014 +0000

    Revert "Fix pc migration from qemu <= 1.5"
    
    This reverts commit 53e8cf93b3ecdb32ca4aa93d04b0a959988456fa.
---
 hw/pci-host/piix.c        |    9 +--------
 hw/pci-host/q35.c         |   10 ++--------
 include/hw/i386/pc.h      |    8 --------
 include/hw/pci-host/q35.h |    1 -
 4 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 18177429..221d82b 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,7 +48,6 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
-    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -707,19 +706,13 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
-    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
-
     /* For backwards compat with old device paths */
-    if (s->short_root_bus) {
-        return "0000";
-    }
-    return "0000:00";
+    return "0000";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
-    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index e7724d5..4febd24 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,13 +61,8 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
-
-     /* For backwards compat with old device paths */
-    if (s->mch.short_root_bus) {
-        return "0000";
-    }
-    return "0000:00";
+    /* For backwards compat with old device paths */
+    return "0000";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -113,7 +108,6 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
-    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index dc7e3f5..475ba9e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,14 +258,6 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
-        },{\
-            .driver   = "i440FX-pcihost",\
-            .property = "short_root_bus",\
-            .value    = stringify(0),\
-        },{\
-            .driver   = "q35-pcihost",\
-            .property = "short_root_bus",\
-            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 95a3cc2..6eb7ab6 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,7 +61,6 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
-    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:29:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:29: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 1W7yQC-0002w2-Sq; Tue, 28 Jan 2014 02:29:04 +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 1W7yQB-0002vp-Rb
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:04 +0000
Received: from [85.158.143.35:64032] by server-2.bemta-4.messagelabs.com id
	95/16-11386-FE517E25; Tue, 28 Jan 2014 02:29:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1390876141!1202118!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2147 invoked from network); 28 Jan 2014 02:29:02 -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;
	28 Jan 2014 02:29: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 1W7yQ9-00065i-Bm
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:01 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yQ9-0001BQ-A4
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:01 +0000
Date: Tue, 28 Jan 2014 02:29:01 +0000
Message-Id: <E1W7yQ9-0001BQ-A4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Revert "Fix pc migration
	from qemu <= 1.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 67fc29f33afaf53a12776d9bd502e51a66b5ad5f
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Jan 24 19:26:12 2014 +0000
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 19:26:12 2014 +0000

    Revert "Fix pc migration from qemu <= 1.5"
    
    This reverts commit 53e8cf93b3ecdb32ca4aa93d04b0a959988456fa.
---
 hw/pci-host/piix.c        |    9 +--------
 hw/pci-host/q35.c         |   10 ++--------
 include/hw/i386/pc.h      |    8 --------
 include/hw/pci-host/q35.h |    1 -
 4 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 18177429..221d82b 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,7 +48,6 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
-    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -707,19 +706,13 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
-    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
-
     /* For backwards compat with old device paths */
-    if (s->short_root_bus) {
-        return "0000";
-    }
-    return "0000:00";
+    return "0000";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
-    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index e7724d5..4febd24 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,13 +61,8 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
-
-     /* For backwards compat with old device paths */
-    if (s->mch.short_root_bus) {
-        return "0000";
-    }
-    return "0000:00";
+    /* For backwards compat with old device paths */
+    return "0000";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -113,7 +108,6 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
-    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index dc7e3f5..475ba9e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,14 +258,6 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
-        },{\
-            .driver   = "i440FX-pcihost",\
-            .property = "short_root_bus",\
-            .value    = stringify(0),\
-        },{\
-            .driver   = "q35-pcihost",\
-            .property = "short_root_bus",\
-            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 95a3cc2..6eb7ab6 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,7 +61,6 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
-    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:29:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:29:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yQO-0002zK-5Y; Tue, 28 Jan 2014 02:29:16 +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 1W7yQM-0002yW-Ce
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:14 +0000
Received: from [85.158.137.68:45132] by server-10.bemta-3.messagelabs.com id
	E4/C2-23989-9F517E25; Tue, 28 Jan 2014 02:29:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1390876151!11702866!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28589 invoked from network); 28 Jan 2014 02:29:12 -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;
	28 Jan 2014 02:29: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 1W7yQJ-00066H-GX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yQJ-0001Bo-Eg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:11 +0000
Date: Tue, 28 Jan 2014 02:29:11 +0000
Message-Id: <E1W7yQJ-0001Bo-Eg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix pc migration from qemu
	<= 1.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 11f6a1cedb8d759fd64d7dd5db95b747591f2ca7
Author:     Cole Robinson <crobinso@redhat.com>
AuthorDate: Tue Nov 5 18:46:27 2013 -0500
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 19:31:59 2014 +0000

    Fix pc migration from qemu <= 1.5
    
    The following commit introduced a migration incompatibility:
    
    commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe
    Author: David Gibson <david@gibson.dropbear.id.au>
    Date:   Thu Jun 6 18:48:49 2013 +1000
    
        pci: Replace pci_find_domain() with more general pci_root_bus_path()
    
    The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
    0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
    1.6 machine types.
    
    Add a compat property to maintain the busted idstr for the 1.6 machine
    types, but revert to the old style format for 1.7+, and <= 1.5.
    
    Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Cole Robinson <crobinso@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    Conflicts:
    	include/hw/i386/pc.h
---
 hw/pci-host/piix.c        |    9 ++++++++-
 hw/pci-host/q35.c         |   10 ++++++++--
 include/hw/i386/pc.h      |    8 ++++++++
 include/hw/pci-host/q35.h |    1 +
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 221d82b..967f949 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,6 +48,7 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
+    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -706,13 +707,19 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
+    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
+
     /* For backwards compat with old device paths */
-    return "0000";
+    if (s->short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 0),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 4febd24..f762053 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    /* For backwards compat with old device paths */
-    return "0000";
+    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+     /* For backwards compat with old device paths */
+    if (s->mch.short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -108,6 +113,7 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 0),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 475ba9e..dc7e3f5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,6 +258,14 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
+        },{\
+            .driver   = "i440FX-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "q35-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 6eb7ab6..95a3cc2 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,6 +61,7 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
+    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 02:29:16 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 02:29:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W7yQO-0002zK-5Y; Tue, 28 Jan 2014 02:29:16 +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 1W7yQM-0002yW-Ce
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:14 +0000
Received: from [85.158.137.68:45132] by server-10.bemta-3.messagelabs.com id
	E4/C2-23989-9F517E25; Tue, 28 Jan 2014 02:29:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1390876151!11702866!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28589 invoked from network); 28 Jan 2014 02:29:12 -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;
	28 Jan 2014 02:29: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 1W7yQJ-00066H-GX
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W7yQJ-0001Bo-Eg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 02:29:11 +0000
Date: Tue, 28 Jan 2014 02:29:11 +0000
Message-Id: <E1W7yQJ-0001Bo-Eg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix pc migration from qemu
	<= 1.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 11f6a1cedb8d759fd64d7dd5db95b747591f2ca7
Author:     Cole Robinson <crobinso@redhat.com>
AuthorDate: Tue Nov 5 18:46:27 2013 -0500
Commit:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CommitDate: Fri Jan 24 19:31:59 2014 +0000

    Fix pc migration from qemu <= 1.5
    
    The following commit introduced a migration incompatibility:
    
    commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe
    Author: David Gibson <david@gibson.dropbear.id.au>
    Date:   Thu Jun 6 18:48:49 2013 +1000
    
        pci: Replace pci_find_domain() with more general pci_root_bus_path()
    
    The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
    0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
    1.6 machine types.
    
    Add a compat property to maintain the busted idstr for the 1.6 machine
    types, but revert to the old style format for 1.7+, and <= 1.5.
    
    Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Cole Robinson <crobinso@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    Conflicts:
    	include/hw/i386/pc.h
---
 hw/pci-host/piix.c        |    9 ++++++++-
 hw/pci-host/q35.c         |   10 ++++++++--
 include/hw/i386/pc.h      |    8 ++++++++
 include/hw/pci-host/q35.h |    1 +
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 221d82b..967f949 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,6 +48,7 @@ typedef struct I440FXState {
     PCIHostState parent_obj;
     PcPciInfo pci_info;
     uint64_t pci_hole64_size;
+    uint32_t short_root_bus;
 } I440FXState;
 
 #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
@@ -706,13 +707,19 @@ static const TypeInfo i440fx_info = {
 static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
                                                 PCIBus *rootbus)
 {
+    I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
+
     /* For backwards compat with old device paths */
-    return "0000";
+    if (s->short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static Property i440fx_props[] = {
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
                      pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 0),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 4febd24..f762053 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
 static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
                                           PCIBus *rootbus)
 {
-    /* For backwards compat with old device paths */
-    return "0000";
+    Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+     /* For backwards compat with old device paths */
+    if (s->mch.short_root_bus) {
+        return "0000";
+    }
+    return "0000:00";
 }
 
 static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -108,6 +113,7 @@ static Property mch_props[] = {
                         MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
     DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
                      mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+    DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 0),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 475ba9e..dc7e3f5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -258,6 +258,14 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
             .driver = TYPE_X86_CPU,\
             .property = "pmu",\
             .value = "on",\
+        },{\
+            .driver   = "i440FX-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "q35-pcihost",\
+            .property = "short_root_bus",\
+            .value    = stringify(0),\
         }
 
 #define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 6eb7ab6..95a3cc2 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,6 +61,7 @@ typedef struct MCHPCIState {
     ram_addr_t above_4g_mem_size;
     uint64_t pci_hole64_size;
     PcGuestInfo *guest_info;
+    uint32_t short_root_bus;
 } MCHPCIState;
 
 typedef struct Q35PCIHost {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:11:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:11: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 1W88RY-0005LY-3h; Tue, 28 Jan 2014 13:11:08 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RW-0005LF-R7
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:07 +0000
Received: from [85.158.143.35:3263] by server-1.bemta-4.messagelabs.com id
	A7/B5-02132-A6CA7E25; Tue, 28 Jan 2014 13:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-21.messagelabs.com!1390914664!1356965!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5532 invoked from network); 28 Jan 2014 13:11:05 -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;
	28 Jan 2014 13:11:05 -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 1W88RT-0005Bv-W3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RT-0003xk-TV
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Message-Id: <E1W88RT-0003xk-TV@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:11: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] privcmd: sprinkle around
	cond_resched() calls in mmap ioctl 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390913431 -3600
# Node ID a2107a5b5b79e2bd5097166d542780be7936343e
# Parent  f2e452d986249c934ed1ab0c73d3c73b6cbc2b26
privcmd: sprinkle around cond_resched() calls in mmap ioctl handling

Many of these operations can be arbitrarily long, which can become a
problem irrespective of them being exposed to privileged users only.

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


diff -r f2e452d98624 -r a2107a5b5b79 drivers/xen/privcmd/privcmd.c
--- a/drivers/xen/privcmd/privcmd.c	Tue Jan 28 13:38:34 2014 +0100
+++ b/drivers/xen/privcmd/privcmd.c	Tue Jan 28 13:50:31 2014 +0100
@@ -126,6 +126,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = mmapcmd.entry;
 		for (i = 0; i < mmapcmd.num;) {
+			if (i)
+				cond_resched();
+
 			nr = min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -158,6 +161,9 @@ static long privcmd_ioctl(struct file *f
 
 		i = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			msg = (privcmd_mmap_entry_t*)(l + 1);
@@ -186,6 +192,9 @@ static long privcmd_ioctl(struct file *f
 		addr = vma->vm_start;
 		i = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			msg = (privcmd_mmap_entry_t*)(l + 1);
@@ -209,8 +218,12 @@ static long privcmd_ioctl(struct file *f
 
 	mmap_out:
 		up_write(&mm->mmap_sem);
-		list_for_each_safe(l,l2,&pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 	}
 #undef MMAP_NR_PER_PAGE
 	break;
@@ -236,6 +249,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = m.arr;
 		for (i=0; i<nr_pages; )	{
+			if (i)
+				cond_resched();
+
 			nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -270,6 +286,9 @@ static long privcmd_ioctl(struct file *f
 		ret = 0;
 		paged_out = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 			mfn = (unsigned long *)(l + 1);
 
@@ -302,6 +321,9 @@ static long privcmd_ioctl(struct file *f
 			else
 				ret = 0;
 			list_for_each(l, &pagelist) {
+				if (i)
+					cond_resched();
+
 				nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 				mfn = (unsigned long *)(l + 1);
 				if (copy_to_user(p, mfn, nr*sizeof(*mfn)))
@@ -310,8 +332,12 @@ static long privcmd_ioctl(struct file *f
 			}
 		}
 	mmapbatch_out:
-		list_for_each_safe(l,l2,&pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 	}
 	break;
 
@@ -335,6 +361,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = m.arr;
 		for (i = 0; i < nr_pages; i += nr, p += nr) {
+			if (i)
+				cond_resched();
+
 			nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -367,6 +396,9 @@ static long privcmd_ioctl(struct file *f
 		ret = 0;
 		paged_out = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 			mfn = (void *)(l + 1);
 			err = (void *)(l + 1);
@@ -397,6 +429,9 @@ static long privcmd_ioctl(struct file *f
 			ret = paged_out ? -ENOENT : 0;
 			i = 0;
 			list_for_each(l, &pagelist) {
+				if (i)
+					cond_resched();
+
 				nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 				err = (void *)(l + 1);
 				if (copy_to_user(p, err, nr * sizeof(*err)))
@@ -407,8 +442,12 @@ static long privcmd_ioctl(struct file *f
 			ret = -EFAULT;
 
 	mmapbatch_v2_out:
-		list_for_each_safe(l, l2, &pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 #undef MMAPBATCH_NR_PER_PAGE
 	}
 	break;

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:11:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:11: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 1W88RY-0005LY-3h; Tue, 28 Jan 2014 13:11:08 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RW-0005LF-R7
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:07 +0000
Received: from [85.158.143.35:3263] by server-1.bemta-4.messagelabs.com id
	A7/B5-02132-A6CA7E25; Tue, 28 Jan 2014 13:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-21.messagelabs.com!1390914664!1356965!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5532 invoked from network); 28 Jan 2014 13:11:05 -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;
	28 Jan 2014 13:11:05 -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 1W88RT-0005Bv-W3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RT-0003xk-TV
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Message-Id: <E1W88RT-0003xk-TV@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:11: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] privcmd: sprinkle around
	cond_resched() calls in mmap ioctl 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390913431 -3600
# Node ID a2107a5b5b79e2bd5097166d542780be7936343e
# Parent  f2e452d986249c934ed1ab0c73d3c73b6cbc2b26
privcmd: sprinkle around cond_resched() calls in mmap ioctl handling

Many of these operations can be arbitrarily long, which can become a
problem irrespective of them being exposed to privileged users only.

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


diff -r f2e452d98624 -r a2107a5b5b79 drivers/xen/privcmd/privcmd.c
--- a/drivers/xen/privcmd/privcmd.c	Tue Jan 28 13:38:34 2014 +0100
+++ b/drivers/xen/privcmd/privcmd.c	Tue Jan 28 13:50:31 2014 +0100
@@ -126,6 +126,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = mmapcmd.entry;
 		for (i = 0; i < mmapcmd.num;) {
+			if (i)
+				cond_resched();
+
 			nr = min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -158,6 +161,9 @@ static long privcmd_ioctl(struct file *f
 
 		i = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			msg = (privcmd_mmap_entry_t*)(l + 1);
@@ -186,6 +192,9 @@ static long privcmd_ioctl(struct file *f
 		addr = vma->vm_start;
 		i = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(mmapcmd.num - i, MMAP_NR_PER_PAGE);
 
 			msg = (privcmd_mmap_entry_t*)(l + 1);
@@ -209,8 +218,12 @@ static long privcmd_ioctl(struct file *f
 
 	mmap_out:
 		up_write(&mm->mmap_sem);
-		list_for_each_safe(l,l2,&pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 	}
 #undef MMAP_NR_PER_PAGE
 	break;
@@ -236,6 +249,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = m.arr;
 		for (i=0; i<nr_pages; )	{
+			if (i)
+				cond_resched();
+
 			nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -270,6 +286,9 @@ static long privcmd_ioctl(struct file *f
 		ret = 0;
 		paged_out = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 			mfn = (unsigned long *)(l + 1);
 
@@ -302,6 +321,9 @@ static long privcmd_ioctl(struct file *f
 			else
 				ret = 0;
 			list_for_each(l, &pagelist) {
+				if (i)
+					cond_resched();
+
 				nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 				mfn = (unsigned long *)(l + 1);
 				if (copy_to_user(p, mfn, nr*sizeof(*mfn)))
@@ -310,8 +332,12 @@ static long privcmd_ioctl(struct file *f
 			}
 		}
 	mmapbatch_out:
-		list_for_each_safe(l,l2,&pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 	}
 	break;
 
@@ -335,6 +361,9 @@ static long privcmd_ioctl(struct file *f
 
 		p = m.arr;
 		for (i = 0; i < nr_pages; i += nr, p += nr) {
+			if (i)
+				cond_resched();
+
 			nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 
 			ret = -ENOMEM;
@@ -367,6 +396,9 @@ static long privcmd_ioctl(struct file *f
 		ret = 0;
 		paged_out = 0;
 		list_for_each(l, &pagelist) {
+			if (i)
+				cond_resched();
+
 			nr = i + min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 			mfn = (void *)(l + 1);
 			err = (void *)(l + 1);
@@ -397,6 +429,9 @@ static long privcmd_ioctl(struct file *f
 			ret = paged_out ? -ENOENT : 0;
 			i = 0;
 			list_for_each(l, &pagelist) {
+				if (i)
+					cond_resched();
+
 				nr = min(nr_pages - i, MMAPBATCH_NR_PER_PAGE);
 				err = (void *)(l + 1);
 				if (copy_to_user(p, err, nr * sizeof(*err)))
@@ -407,8 +442,12 @@ static long privcmd_ioctl(struct file *f
 			ret = -EFAULT;
 
 	mmapbatch_v2_out:
-		list_for_each_safe(l, l2, &pagelist)
+		i = 0;
+		list_for_each_safe(l, l2, &pagelist) {
+			if (!(++i & 7))
+				cond_resched();
 			free_page((unsigned long)l);
+		}
 #undef MMAPBATCH_NR_PER_PAGE
 	}
 	break;

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:11:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:11: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 1W88RX-0005LK-1N; Tue, 28 Jan 2014 13:11:07 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RW-0005LE-FW
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:06 +0000
Received: from [85.158.143.35:37549] by server-3.bemta-4.messagelabs.com id
	B1/53-32360-96CA7E25; Tue, 28 Jan 2014 13:11:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1390914664!1358319!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2236 invoked from network); 28 Jan 2014 13:11:05 -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;
	28 Jan 2014 13:11:05 -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 1W88RT-0005Bt-Us
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RT-0003xV-Ew
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Message-Id: <E1W88RT-0003xV-Ew@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:11: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] usbback: fix after c/s
	1232:8806dfb939d4
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390912714 -3600
# Node ID f2e452d986249c934ed1ab0c73d3c73b6cbc2b26
# Parent  6ea18f7269166802f9c03c4bf48e362e89dfdad5
usbback: fix after c/s 1232:8806dfb939d4

That c/s ("backends: Check for insane amounts of requests on the ring")
copied from blkback/blktap/scsiback a switch statement that is valid
there, but not here - the return value from usbbk_start_submit_urb()
could be any positive value, not just one.

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


diff -r 6ea18f726916 -r f2e452d98624 drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c	Mon Jan 20 10:44:19 2014 +0100
+++ b/drivers/xen/usbback/usbback.c	Tue Jan 28 13:38:34 2014 +0100
@@ -1013,7 +1013,7 @@ static int usbbk_start_submit_urb(usbif_
 
 	RING_FINAL_CHECK_FOR_REQUESTS(&usbif->urb_ring, more_to_do);
 
-	return more_to_do;
+	return !!more_to_do;
 }
 
 void usbbk_hotplug_notify(usbif_t *usbif, int portnum, int speed)

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:11:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:11: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 1W88RX-0005LK-1N; Tue, 28 Jan 2014 13:11:07 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RW-0005LE-FW
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:06 +0000
Received: from [85.158.143.35:37549] by server-3.bemta-4.messagelabs.com id
	B1/53-32360-96CA7E25; Tue, 28 Jan 2014 13:11:05 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1390914664!1358319!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2236 invoked from network); 28 Jan 2014 13:11:05 -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;
	28 Jan 2014 13:11:05 -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 1W88RT-0005Bt-Us
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88RT-0003xV-Ew
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:11:03 +0000
Message-Id: <E1W88RT-0003xV-Ew@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:11: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] usbback: fix after c/s
	1232:8806dfb939d4
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390912714 -3600
# Node ID f2e452d986249c934ed1ab0c73d3c73b6cbc2b26
# Parent  6ea18f7269166802f9c03c4bf48e362e89dfdad5
usbback: fix after c/s 1232:8806dfb939d4

That c/s ("backends: Check for insane amounts of requests on the ring")
copied from blkback/blktap/scsiback a switch statement that is valid
there, but not here - the return value from usbbk_start_submit_urb()
could be any positive value, not just one.

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


diff -r 6ea18f726916 -r f2e452d98624 drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c	Mon Jan 20 10:44:19 2014 +0100
+++ b/drivers/xen/usbback/usbback.c	Tue Jan 28 13:38:34 2014 +0100
@@ -1013,7 +1013,7 @@ static int usbbk_start_submit_urb(usbif_
 
 	RING_FINAL_CHECK_FOR_REQUESTS(&usbif->urb_ring, more_to_do);
 
-	return more_to_do;
+	return !!more_to_do;
 }
 
 void usbbk_hotplug_notify(usbif_t *usbif, int portnum, int speed)

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:22: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 1W88cC-0005eq-92; Tue, 28 Jan 2014 13:22:08 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88cB-0005ei-0Y
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:07 +0000
Received: from [85.158.143.35:5345] by server-2.bemta-4.messagelabs.com id
	96/A2-11386-EFEA7E25; Tue, 28 Jan 2014 13:22:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390915323!1346372!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2696 invoked from network); 28 Jan 2014 13:22:04 -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;
	28 Jan 2014 13:22:04 -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 1W88c6-0005Ij-Vt
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88c6-0004Jp-Rg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:02 +0000
Message-Id: <E1W88c6-0004Jp-Rg@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:22:02 +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] sync Xen public 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

# HG changeset patch
# User Jan Beulich
# Date 1390914484 -3600
# Node ID c5f5087bd3c729b875beba524f32e0f7e0ca3fb5
# Parent  a2107a5b5b79e2bd5097166d542780be7936343e
sync Xen public headers

(as before without dropping ia64 bits)
---


diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/arch-arm.h
--- a/include/xen/interface/arch-arm.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/arch-arm.h	Tue Jan 28 14:08:04 2014 +0100
@@ -27,8 +27,8 @@
 #ifndef __XEN_PUBLIC_ARCH_ARM_H__
 #define __XEN_PUBLIC_ARCH_ARM_H__
 
-/* hypercall calling convention
- * ----------------------------
+/*
+ * `incontents 50 arm_abi Hypercall Calling Convention
  *
  * A hypercall is issued using the ARM HVC instruction.
  *
@@ -58,6 +58,114 @@
  * (AAPCS64). Where there is a conflict the 64-bit standard should be
  * used regardless of guest type. Structures which are passed as
  * hypercall arguments are always little endian.
+ *
+ * All memory which is shared with other entities in the system
+ * (including the hypervisor and other guests) must reside in memory
+ * which is mapped as Normal Inner-cacheable. This applies to:
+ *  - hypercall arguments passed via a pointer to guest memory.
+ *  - memory shared via the grant table mechanism (including PV I/O
+ *    rings etc).
+ *  - memory shared with the hypervisor (struct shared_info, struct
+ *    vcpu_info, the grant table, etc).
+ *
+ * Any Inner cache allocation strategy (Write-Back, Write-Through etc)
+ * is acceptable. There is no restriction on the Outer-cacheability.
+ */
+
+/*
+ * `incontents 55 arm_hcall Supported Hypercalls
+ *
+ * Xen on ARM makes extensive use of hardware facilities and therefore
+ * only a subset of the potential hypercalls are required.
+ *
+ * Since ARM uses second stage paging any machine/physical addresses
+ * passed to hypercalls are Guest Physical Addresses (Intermediate
+ * Physical Addresses) unless otherwise noted.
+ *
+ * The following hypercalls (and sub operations) are supported on the
+ * ARM platform. Other hypercalls should be considered
+ * unavailable/unsupported.
+ *
+ *  HYPERVISOR_memory_op
+ *   All generic sub-operations.
+ *
+ *   In addition the following arch specific sub-ops:
+ *    * XENMEM_add_to_physmap
+ *    * XENMEM_add_to_physmap_batch
+ *
+ *  HYPERVISOR_domctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_DOMCTL_iomem_permission (not yet implemented)
+ *    * XEN_DOMCTL_irq_permission (not yet implemented)
+ *
+ *  HYPERVISOR_sched_op
+ *   All generic sub-operations, with the exception of:
+ *    * SCHEDOP_block -- prefer wfi hardware instruction
+ *
+ *  HYPERVISOR_console_io
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_xen_version
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_event_channel_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_physdev_op
+ *   No sub-operations are currenty supported
+ *
+ *  HYPERVISOR_sysctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_SYSCTL_page_offline_op
+ *    * XEN_SYSCTL_get_pmstat
+ *    * XEN_SYSCTL_pm_op
+ *
+ *  HYPERVISOR_hvm_op
+ *   Exactly these sub-operations are supported:
+ *    * HVMOP_set_param
+ *    * HVMOP_get_param
+ *
+ *  HYPERVISOR_grant_table_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_vcpu_op
+ *   Exactly these sub-operations are supported:
+ *    * VCPUOP_register_vcpu_info
+ *    * VCPUOP_register_runstate_memory_area
+ *
+ *
+ * Other notes on the ARM ABI:
+ *
+ * - struct start_info is not exported to ARM guests.
+ *
+ * - struct shared_info is mapped by ARM guests using the
+ *   HYPERVISOR_memory_op sub-op XENMEM_add_to_physmap, passing
+ *   XENMAPSPACE_shared_info as space parameter.
+ *
+ * - All the per-cpu struct vcpu_info are mapped by ARM guests using the
+ *   HYPERVISOR_vcpu_op sub-op VCPUOP_register_vcpu_info, including cpu0
+ *   struct vcpu_info.
+ *
+ * - The grant table is mapped using the HYPERVISOR_memory_op sub-op
+ *   XENMEM_add_to_physmap, passing XENMAPSPACE_grant_table as space
+ *   parameter. The memory range specified under the Xen compatible
+ *   hypervisor node on device tree can be used as target gpfn for the
+ *   mapping.
+ *
+ * - Xenstore is initialized by using the two hvm_params
+ *   HVM_PARAM_STORE_PFN and HVM_PARAM_STORE_EVTCHN. They can be read
+ *   with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - The paravirtualized console is initialized by using the two
+ *   hvm_params HVM_PARAM_CONSOLE_PFN and HVM_PARAM_CONSOLE_EVTCHN. They
+ *   can be read with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - Event channel notifications are delivered using the percpu GIC
+ *   interrupt specified under the Xen compatible hypervisor node on
+ *   device tree.
+ *
+ * - The device tree Xen compatible node is fully described under Linux
+ *   at Documentation/devicetree/bindings/arm/xen.txt.
  */
 
 #define XEN_HYPERCALL_TAG   0XEA1
@@ -182,6 +290,7 @@ typedef uint64_t xen_pfn_t;
 typedef uint64_t xen_ulong_t;
 #define PRI_xen_ulong PRIx64
 
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 struct vcpu_guest_context {
 #define _VGCF_online                   0
 #define VGCF_online                    (1<<_VGCF_online)
@@ -189,23 +298,37 @@ struct vcpu_guest_context {
 
     struct vcpu_guest_core_regs user_regs;  /* Core CPU registers */
 
-    uint32_t sctlr, ttbcr;
-    uint64_t ttbr0, ttbr1;
+    uint32_t sctlr;
+    uint64_t ttbcr, ttbr0, ttbr1;
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
+#endif
 
-struct arch_vcpu_info { };
+struct arch_vcpu_info {
+};
 typedef struct arch_vcpu_info arch_vcpu_info_t;
 
-struct arch_shared_info { };
+struct arch_shared_info {
+};
 typedef struct arch_shared_info arch_shared_info_t;
 typedef uint64_t xen_callback_t;
 
-#endif /* ifndef __ASSEMBLY __ */
+#endif
+
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 
 /* PSR bits (CPSR, SPSR)*/
 
+#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
+#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
+#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
+#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
+#define PSR_BIG_ENDIAN  (1<<9)        /* arm32: Big Endian Mode */
+#define PSR_DBG_MASK    (1<<9)        /* arm64: Debug Exception mask */
+#define PSR_IT_MASK     (0x0600fc00)  /* Thumb If-Then Mask */
+#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
+
 /* 32 bit modes */
 #define PSR_MODE_USR 0x10
 #define PSR_MODE_FIQ 0x11
@@ -218,7 +341,6 @@ typedef uint64_t xen_callback_t;
 #define PSR_MODE_SYS 0x1f
 
 /* 64 bit modes */
-#ifdef __aarch64__
 #define PSR_MODE_BIT  0x10 /* Set iff AArch32 */
 #define PSR_MODE_EL3h 0x0d
 #define PSR_MODE_EL3t 0x0c
@@ -227,18 +349,45 @@ typedef uint64_t xen_callback_t;
 #define PSR_MODE_EL1h 0x05
 #define PSR_MODE_EL1t 0x04
 #define PSR_MODE_EL0t 0x00
+
+#define PSR_GUEST32_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
+#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+
+#define SCTLR_GUEST_INIT    0x00c50078
+
+/*
+ * Virtual machine platform (memory layout, interrupts)
+ *
+ * These are defined for consistency between the tools and the
+ * hypervisor. Guests must not rely on these hardcoded values but
+ * should instead use the FDT.
+ */
+
+/* Physical Address Space */
+#define GUEST_GICD_BASE   0x2c001000ULL
+#define GUEST_GICD_SIZE   0x1000ULL
+#define GUEST_GICC_BASE   0x2c002000ULL
+#define GUEST_GICC_SIZE   0x100ULL
+
+#define GUEST_RAM_BASE    0x80000000ULL
+
+#define GUEST_GNTTAB_BASE 0xb0000000ULL
+#define GUEST_GNTTAB_SIZE 0x00020000ULL
+
+/* Interrupts */
+#define GUEST_TIMER_VIRT_PPI    27
+#define GUEST_TIMER_PHYS_S_PPI  29
+#define GUEST_TIMER_PHYS_NS_PPI 30
+#define GUEST_EVTCHN_PPI        31
+
+/* PSCI functions */
+#define PSCI_cpu_suspend 0
+#define PSCI_cpu_off     1
+#define PSCI_cpu_on      2
+#define PSCI_migrate     3
+
 #endif
 
-#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
-#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
-#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
-#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
-#define PSR_BIG_ENDIAN  (1<<9)        /* Big Endian Mode */
-#define PSR_IT_MASK     (0x0600fc00)  /* Thumb If-Then Mask */
-#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
-
-#define PSR_GUEST_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-
 #endif /*  __XEN_PUBLIC_ARCH_ARM_H__ */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/arch-x86/xen.h
--- a/include/xen/interface/arch-x86/xen.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/arch-x86/xen.h	Tue Jan 28 14:08:04 2014 +0100
@@ -70,6 +70,10 @@ typedef unsigned long xen_pfn_t;
 #define PRI_xen_pfn "lx"
 #endif
 
+#define XEN_HAVE_PV_GUEST_ENTRY 1
+
+#define XEN_HAVE_PV_UPCALL_MASK 1
+
 /*
  * `incontents 200 segdesc Segment Descriptor Tables
  */
@@ -150,6 +154,15 @@ typedef uint64_t tsc_timestamp_t; /* RDT
 /*
  * The following is all CPU context. Note that the fpu_ctxt block is filled 
  * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
+ *
+ * Also note that when calling DOMCTL_setvcpucontext and VCPU_initialise
+ * for HVM and PVH guests, not all information in this structure is updated:
+ *
+ * - For HVM guests, the structures read include: fpu_ctxt (if
+ * VGCT_I387_VALID is set), flags, user_regs, debugreg[*]
+ *
+ * - PVH guests are the same as HVM guests, but additionally use ctrlreg[3] to
+ * set cr3. All other fields not used should be set to 0.
  */
 struct vcpu_guest_context {
     /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/domctl.h	Tue Jan 28 14:08:04 2014 +0100
@@ -47,7 +47,7 @@ struct xen_domctl_createdomain {
     /* IN parameters */
     uint32_t ssidref;
     xen_domain_handle_t handle;
- /* Is this an HVM guest (as opposed to a PV guest)? */
+ /* Is this an HVM guest (as opposed to a PVH or PV guest)? */
 #define _XEN_DOMCTL_CDF_hvm_guest     0
 #define XEN_DOMCTL_CDF_hvm_guest      (1U<<_XEN_DOMCTL_CDF_hvm_guest)
  /* Use hardware-assisted paging if available? */
@@ -59,6 +59,9 @@ struct xen_domctl_createdomain {
  /* Disable out-of-sync shadow page tables? */
 #define _XEN_DOMCTL_CDF_oos_off       3
 #define XEN_DOMCTL_CDF_oos_off        (1U<<_XEN_DOMCTL_CDF_oos_off)
+ /* Is this a PVH guest (as opposed to an HVM or PV guest)? */
+#define _XEN_DOMCTL_CDF_pvh_guest     4
+#define XEN_DOMCTL_CDF_pvh_guest      (1U<<_XEN_DOMCTL_CDF_pvh_guest)
     uint32_t flags;
 };
 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
@@ -89,6 +92,9 @@ struct xen_domctl_getdomaininfo {
  /* Being debugged.  */
 #define _XEN_DOMINF_debugged  6
 #define XEN_DOMINF_debugged   (1U<<_XEN_DOMINF_debugged)
+/* domain is PVH */
+#define _XEN_DOMINF_pvh_guest 7
+#define XEN_DOMINF_pvh_guest  (1U<<_XEN_DOMINF_pvh_guest)
  /* XEN_DOMINF_shutdown guest-supplied code.  */
 #define XEN_DOMINF_shutdownmask 255
 #define XEN_DOMINF_shutdownshift 16
@@ -635,6 +641,22 @@ typedef struct xen_domctl_cpuid xen_domc
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
 #endif
 
+/*
+ * Arranges that if the domain suspends (specifically, if it shuts
+ * down with code SHUTDOWN_suspend), this event channel will be
+ * notified.
+ *
+ * This is _instead of_ the usual notification to the global
+ * VIRQ_DOM_EXC.  (In most systems that pirq is owned by xenstored.)
+ *
+ * Only one subscription per domain is possible.  Last subscriber
+ * wins; others are silently displaced.
+ *
+ * NB that contrary to the rather general name, it only applies to
+ * domain shutdown with code suspend.  Shutdown for other reasons
+ * (including crash), and domain death, are notified to VIRQ_DOM_EXC
+ * regardless.
+ */
 /* XEN_DOMCTL_subscribe */
 struct xen_domctl_subscribe {
     uint32_t port; /* IN */
@@ -874,6 +896,17 @@ struct xen_domctl_set_broken_page_p2m {
 typedef struct xen_domctl_set_broken_page_p2m xen_domctl_set_broken_page_p2m_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_broken_page_p2m_t);
 
+/*
+ * XEN_DOMCTL_set_max_evtchn: sets the maximum event channel port
+ * number the guest may use.  Use this limit the amount of resources
+ * (global mapping space, xenheap) a guest may use for event channels.
+ */
+struct xen_domctl_set_max_evtchn {
+    uint32_t max_port;
+};
+typedef struct xen_domctl_set_max_evtchn xen_domctl_set_max_evtchn_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_max_evtchn_t);
+
 struct xen_domctl {
     uint32_t cmd;
 #define XEN_DOMCTL_createdomain                   1
@@ -942,6 +975,7 @@ struct xen_domctl {
 #define XEN_DOMCTL_set_broken_page_p2m           67
 #define XEN_DOMCTL_setnodeaffinity               68
 #define XEN_DOMCTL_getnodeaffinity               69
+#define XEN_DOMCTL_set_max_evtchn                70
 #define XEN_DOMCTL_gdbsx_guestmemio            1000
 #define XEN_DOMCTL_gdbsx_pausevcpu             1001
 #define XEN_DOMCTL_gdbsx_unpausevcpu           1002
@@ -998,6 +1032,7 @@ struct xen_domctl {
         struct xen_domctl_set_access_required access_required;
         struct xen_domctl_audit_p2m         audit_p2m;
         struct xen_domctl_set_virq_handler  set_virq_handler;
+        struct xen_domctl_set_max_evtchn    set_max_evtchn;
         struct xen_domctl_gdbsx_memio       gdbsx_guest_memio;
         struct xen_domctl_set_broken_page_p2m set_broken_page_p2m;
         struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/elfnote.h
--- a/include/xen/interface/elfnote.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/elfnote.h	Tue Jan 28 14:08:04 2014 +0100
@@ -71,8 +71,8 @@
 #define XEN_ELFNOTE_VIRT_BASE      3
 
 /*
- * The offset of the ELF paddr field from the acutal required
- * psuedo-physical address (numeric).
+ * The offset of the ELF paddr field from the actual required
+ * pseudo-physical address (numeric).
  *
  * This is used to maintain backwards compatibility with older kernels
  * which wrote __PAGE_OFFSET into that field. This field defaults to 0
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/event_channel.h
--- a/include/xen/interface/event_channel.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/event_channel.h	Tue Jan 28 14:08:04 2014 +0100
@@ -71,6 +71,9 @@
 #define EVTCHNOP_bind_vcpu        8
 #define EVTCHNOP_unmask           9
 #define EVTCHNOP_reset           10
+#define EVTCHNOP_init_control    11
+#define EVTCHNOP_expand_array    12
+#define EVTCHNOP_set_priority    13
 /* ` } */
 
 typedef uint32_t evtchn_port_t;
@@ -98,6 +101,17 @@ typedef struct evtchn_alloc_unbound evtc
  * a port that is unbound and marked as accepting bindings from the calling
  * domain. A fresh port is allocated in the calling domain and returned as
  * <local_port>.
+ *
+ * In case the peer domain has already tried to set our event channel
+ * pending, before it was bound, EVTCHNOP_bind_interdomain always sets
+ * the local event channel pending.
+ *
+ * The usual pattern of use, in the guest's upcall (or subsequent
+ * handler) is as follows: (Re-enable the event channel for subsequent
+ * signalling and then) check for the existence of whatever condition
+ * is being waited for by other means, and take whatever action is
+ * needed (if any).
+ *
  * NOTES:
  *  1. <remote_dom> may be DOMID_SELF, allowing loopback connections.
  */
@@ -258,6 +272,43 @@ struct evtchn_reset {
 typedef struct evtchn_reset evtchn_reset_t;
 
 /*
+ * EVTCHNOP_init_control: initialize the control block for the FIFO ABI.
+ *
+ * Note: any events that are currently pending will not be resent and
+ * will be lost.  Guests should call this before binding any event to
+ * avoid losing any events.
+ */
+struct evtchn_init_control {
+    /* IN parameters. */
+    uint64_t control_gfn;
+    uint32_t offset;
+    uint32_t vcpu;
+    /* OUT parameters. */
+    uint8_t link_bits;
+    uint8_t _pad[7];
+};
+typedef struct evtchn_init_control evtchn_init_control_t;
+
+/*
+ * EVTCHNOP_expand_array: add an additional page to the event array.
+ */
+struct evtchn_expand_array {
+    /* IN parameters. */
+    uint64_t array_gfn;
+};
+typedef struct evtchn_expand_array evtchn_expand_array_t;
+
+/*
+ * EVTCHNOP_set_priority: set the priority for an event channel.
+ */
+struct evtchn_set_priority {
+    /* IN parameters. */
+    uint32_t port;
+    uint32_t priority;
+};
+typedef struct evtchn_set_priority evtchn_set_priority_t;
+
+/*
  * ` enum neg_errnoval
  * ` HYPERVISOR_event_channel_op_compat(struct evtchn_op *op)
  * `
@@ -281,6 +332,42 @@ struct evtchn_op {
 typedef struct evtchn_op evtchn_op_t;
 DEFINE_XEN_GUEST_HANDLE(evtchn_op_t);
 
+/*
+ * 2-level ABI
+ */
+
+#define EVTCHN_2L_NR_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+
+/*
+ * FIFO ABI
+ */
+
+/* Events may have priorities from 0 (highest) to 15 (lowest). */
+#define EVTCHN_FIFO_PRIORITY_MAX     0
+#define EVTCHN_FIFO_PRIORITY_DEFAULT 7
+#define EVTCHN_FIFO_PRIORITY_MIN     15
+
+#define EVTCHN_FIFO_MAX_QUEUES (EVTCHN_FIFO_PRIORITY_MIN + 1)
+
+typedef uint32_t event_word_t;
+
+#define EVTCHN_FIFO_PENDING 31
+#define EVTCHN_FIFO_MASKED  30
+#define EVTCHN_FIFO_LINKED  29
+#define EVTCHN_FIFO_BUSY    28
+
+#define EVTCHN_FIFO_LINK_BITS 17
+#define EVTCHN_FIFO_LINK_MASK ((1 << EVTCHN_FIFO_LINK_BITS) - 1)
+
+#define EVTCHN_FIFO_NR_CHANNELS (1 << EVTCHN_FIFO_LINK_BITS)
+
+struct evtchn_fifo_control_block {
+    uint32_t ready;
+    uint32_t _rsvd;
+    uint32_t head[EVTCHN_FIFO_MAX_QUEUES];
+};
+typedef struct evtchn_fifo_control_block evtchn_fifo_control_block_t;
+
 #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/hvm/hvm_xs_strings.h
--- a/include/xen/interface/hvm/hvm_xs_strings.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/hvm/hvm_xs_strings.h	Tue Jan 28 14:08:04 2014 +0100
@@ -28,6 +28,7 @@
 #define HVM_XS_HVMLOADER               "hvmloader"
 #define HVM_XS_BIOS                    "hvmloader/bios"
 #define HVM_XS_GENERATION_ID_ADDRESS   "hvmloader/generation-id-address"
+#define HVM_XS_ALLOW_MEMORY_RELOCATE   "hvmloader/allow-memory-relocate"
 
 /* The following values allow additional ACPI tables to be added to the
  * virtual ACPI BIOS that hvmloader constructs. The values specify the guest
@@ -74,6 +75,6 @@
 /* 1 to 99 OEM strings can be set in xenstore using values of the form
  * below. These strings will be loaded into the SMBIOS type 11 structure.
  */
-#define HVM_XS_OEM_STRINGS             "bios-strings/oem-%02d"
+#define HVM_XS_OEM_STRINGS             "bios-strings/oem-%d"
 
 #endif /* __XEN_PUBLIC_HVM_HVM_XS_STRINGS_H__ */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/hvm/pvdrivers.h
--- a/include/xen/interface/hvm/pvdrivers.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/hvm/pvdrivers.h	Tue Jan 28 14:08:04 2014 +0100
@@ -38,10 +38,12 @@
  * indicate a driver which is yet to be released.
  */
 
-#define PVDRIVERS_PRODUCT_LIST(EACH)                         \
-        EACH("xensource-windows", 0x0001) /* Citrix */       \
-        EACH("gplpv-windows",     0x0002) /* James Harper */ \
-        EACH("linux",             0x0003)                    \
-        EACH("experimental",      0xffff)
+#define PVDRIVERS_PRODUCT_LIST(EACH)                               \
+        EACH("xensource-windows",       0x0001) /* Citrix */       \
+        EACH("gplpv-windows",           0x0002) /* James Harper */ \
+        EACH("linux",                   0x0003)                    \
+        EACH("xenserver-windows-v7.0+", 0x0004) /* Citrix */       \
+        EACH("xenserver-windows-v7.2+", 0x0005) /* Citrix */       \
+        EACH("experimental",            0xffff)
 
 #endif /* _XEN_PUBLIC_PVDRIVERS_H_ */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/blkif.h
--- a/include/xen/interface/io/blkif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/blkif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -468,6 +468,30 @@
 #define BLKIF_OP_DISCARD           5
 
 /*
+ * Recognized if "feature-max-indirect-segments" in present in the backend
+ * xenbus info. The "feature-max-indirect-segments" node contains the maximum
+ * number of segments allowed by the backend per request. If the node is
+ * present, the frontend might use blkif_request_indirect structs in order to
+ * issue requests with more than BLKIF_MAX_SEGMENTS_PER_REQUEST (11). The
+ * maximum number of indirect segments is fixed by the backend, but the
+ * frontend can issue requests with any number of indirect segments as long as
+ * it's less than the number provided by the backend. The indirect_grefs field
+ * in blkif_request_indirect should be filled by the frontend with the
+ * grant references of the pages that are holding the indirect segments.
+ * This pages are filled with an array of blkif_request_segment_aligned
+ * that hold the information about the segments. The number of indirect
+ * pages to use is determined by the maximum number of segments
+ * an indirect request contains. Every indirect page can contain a maximum
+ * of 512 segments (PAGE_SIZE/sizeof(blkif_request_segment_aligned)),
+ * so to calculate the number of indirect pages to use we have to do
+ * ceil(indirect_segments/512).
+ *
+ * If a backend does not recognize BLKIF_OP_INDIRECT, it should *not*
+ * create the "feature-max-indirect-segments" node!
+ */
+#define BLKIF_OP_INDIRECT          6
+
+/*
  * Maximum scatter/gather segments per request.
  * This is carefully chosen so that sizeof(blkif_ring_t) <= PAGE_SIZE.
  * NB. This could be 12 if the ring indexes weren't stored in the same page.
@@ -475,6 +499,11 @@
 #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
 
 /*
+ * Maximum number of indirect pages to use per request.
+ */
+#define BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST 8
+
+/*
  * NB. first_sect and last_sect in blkif_request_segment, as well as
  * sector_number in blkif_request, are always expressed in 512-byte units.
  * However they must be properly aligned to the real sector size of the
@@ -517,6 +546,28 @@ struct blkif_request_discard {
 };
 typedef struct blkif_request_discard blkif_request_discard_t;
 
+struct blkif_request_indirect {
+    uint8_t        operation;    /* BLKIF_OP_INDIRECT                    */
+    uint8_t        indirect_op;  /* BLKIF_OP_{READ/WRITE}                */
+    uint16_t       nr_segments;  /* number of segments                   */
+    uint64_t       id;           /* private guest value, echoed in resp  */
+    blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
+    blkif_vdev_t   handle;       /* same as for read/write requests      */
+    grant_ref_t    indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST];
+#ifdef __i386__
+    uint64_t       pad;          /* Make it 64 byte aligned on i386      */
+#endif
+};
+typedef struct blkif_request_indirect blkif_request_indirect_t;
+
+struct blkif_request_segment_aligned {
+    grant_ref_t gref;            /* reference to I/O buffer frame        */
+    /* @first_sect: first sector in frame to transfer (inclusive).   */
+    /* @last_sect: last sector in frame to transfer (inclusive).     */
+    uint8_t     first_sect, last_sect;
+    uint16_t    _pad; /* padding to make it 8 bytes, so it's cache-aligned */
+};
+
 struct blkif_response {
     uint64_t        id;              /* copied from request */
     uint8_t         operation;       /* copied from request */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/netif.h
--- a/include/xen/interface/io/netif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/netif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -69,6 +69,20 @@
  */
 
 /*
+ * "feature-no-csum-offload" should be used to turn IPv4 TCP/UDP checksum
+ * offload off or on. If it is missing then the feature is assumed to be on.
+ * "feature-ipv6-csum-offload" should be used to turn IPv6 TCP/UDP checksum
+ * offload on or off. If it is missing then the feature is assumed to be off.
+ */
+
+/*
+ * "feature-gso-tcpv4" and "feature-gso-tcpv6" advertise the capability to
+ * handle large TCP packets (in IPv4 or IPv6 form respectively). Neither
+ * frontends nor backends are assumed to be capable unless the flags are
+ * present.
+ */
+
+/*
  * This is the 'wire' format for packets:
  *  Request 1: netif_tx_request -- NETTXF_* (any flags)
  * [Request 2: netif_tx_extra]  (only if request 1 has NETTXF_extra_info)
@@ -116,8 +130,10 @@ typedef struct netif_tx_request netif_tx
 #define _XEN_NETIF_EXTRA_FLAG_MORE (0)
 #define XEN_NETIF_EXTRA_FLAG_MORE  (1U<<_XEN_NETIF_EXTRA_FLAG_MORE)
 
-/* GSO types - only TCPv4 currently supported. */
+/* GSO types */
+#define XEN_NETIF_GSO_TYPE_NONE         (0)
 #define XEN_NETIF_GSO_TYPE_TCPV4        (1)
+#define XEN_NETIF_GSO_TYPE_TCPV6        (2)
 
 /*
  * This structure needs to fit within both netif_tx_request and
@@ -206,7 +222,7 @@ struct netif_rx_response {
     uint16_t id;
     uint16_t offset;       /* Offset in page of start of received packet  */
     uint16_t flags;        /* NETRXF_* */
-    int16_t  status;       /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
+    int16_t  status;       /* -ve: NETIF_RSP_* ; +ve: Rx'ed pkt size. */
 };
 typedef struct netif_rx_response netif_rx_response_t;
 
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/pciif.h
--- a/include/xen/interface/io/pciif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/pciif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -46,6 +46,7 @@
 #define XEN_PCI_OP_aer_resume		(7)
 #define XEN_PCI_OP_aer_mmio		(8)
 #define XEN_PCI_OP_aer_slotreset	(9)
+#define XEN_PCI_OP_enable_multi_msi	(10)
 
 /* xen_pci_op error numbers */
 #define XEN_PCI_ERR_success          (0)
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/xs_wire.h
--- a/include/xen/interface/io/xs_wire.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/xs_wire.h	Tue Jan 28 14:08:04 2014 +0100
@@ -83,7 +83,8 @@ __attribute__((unused))
     XSD_ERROR(EROFS),
     XSD_ERROR(EBUSY),
     XSD_ERROR(EAGAIN),
-    XSD_ERROR(EISCONN)
+    XSD_ERROR(EISCONN),
+    XSD_ERROR(E2BIG)
 };
 #endif
 
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/kexec.h
--- a/include/xen/interface/kexec.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/kexec.h	Tue Jan 28 14:08:04 2014 +0100
@@ -108,6 +108,20 @@ typedef struct xen_kexec_image {
  * Perform kexec having previously loaded a kexec or kdump kernel
  * as appropriate.
  * type == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
+ *
+ * Control is transferred to the image entry point with the host in
+ * the following state.
+ *
+ * - The image may be executed on any PCPU and all other PCPUs are
+ *   stopped.
+ *
+ * - Local interrupts are disabled.
+ *
+ * - Register values are undefined.
+ *
+ * - The image segments have writeable 1:1 virtual to machine
+ *   mappings.  The location of any page tables is undefined and these
+ *   page table frames are not be mapped.
  */
 #define KEXEC_CMD_kexec                 0
 typedef struct xen_kexec_exec {
@@ -119,12 +133,12 @@ typedef struct xen_kexec_exec {
  * type  == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
  * image == relocation information for kexec (ignored for unload) [in]
  */
-#define KEXEC_CMD_kexec_load            1
-#define KEXEC_CMD_kexec_unload          2
-typedef struct xen_kexec_load {
+#define KEXEC_CMD_kexec_load_v1         1 /* obsolete since 0x00040400 */
+#define KEXEC_CMD_kexec_unload_v1       2 /* obsolete since 0x00040400 */
+typedef struct xen_kexec_load_v1 {
     int type;
     xen_kexec_image_t image;
-} xen_kexec_load_t;
+} xen_kexec_load_v1_t;
 
 #define KEXEC_RANGE_MA_CRASH      0 /* machine address and size of crash area */
 #define KEXEC_RANGE_MA_XEN        1 /* machine address and size of Xen itself */
@@ -155,6 +169,76 @@ typedef struct xen_kexec_range {
     unsigned long start;
 } xen_kexec_range_t;
 
+#if __XEN_INTERFACE_VERSION__ >= 0x00040400
+/*
+ * A contiguous chunk of a kexec image and it's destination machine
+ * address.
+ */
+typedef struct xen_kexec_segment {
+    union {
+        XEN_GUEST_HANDLE(const_void) h;
+        uint64_t _pad;
+    } buf;
+    uint64_t buf_size;
+    uint64_t dest_maddr;
+    uint64_t dest_size;
+} xen_kexec_segment_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_segment_t);
+
+/*
+ * Load a kexec image into memory.
+ *
+ * For KEXEC_TYPE_DEFAULT images, the segments may be anywhere in RAM.
+ * The image is relocated prior to being executed.
+ *
+ * For KEXEC_TYPE_CRASH images, each segment of the image must reside
+ * in the memory region reserved for kexec (KEXEC_RANGE_MA_CRASH) and
+ * the entry point must be within the image. The caller is responsible
+ * for ensuring that multiple images do not overlap.
+ *
+ * All image segments will be loaded to their destination machine
+ * addresses prior to being executed.  The trailing portion of any
+ * segments with a source buffer (from dest_maddr + buf_size to
+ * dest_maddr + dest_size) will be zeroed.
+ *
+ * Segments with no source buffer will be accessible to the image when
+ * it is executed.
+ */
+
+#define KEXEC_CMD_kexec_load 4
+typedef struct xen_kexec_load {
+    uint8_t  type;        /* One of KEXEC_TYPE_* */
+    uint8_t  _pad;
+    uint16_t arch;        /* ELF machine type (EM_*). */
+    uint32_t nr_segments;
+    union {
+        XEN_GUEST_HANDLE(xen_kexec_segment_t) h;
+        uint64_t _pad;
+    } segments;
+    uint64_t entry_maddr; /* image entry point machine address. */
+} xen_kexec_load_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_load_t);
+
+/*
+ * Unload a kexec image.
+ *
+ * Type must be one of KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ */
+#define KEXEC_CMD_kexec_unload 5
+typedef struct xen_kexec_unload {
+    uint8_t type;
+} xen_kexec_unload_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_unload_t);
+
+#else /* __XEN_INTERFACE_VERSION__ < 0x00040400 */
+
+#define KEXEC_CMD_kexec_load KEXEC_CMD_kexec_load_v1
+#define KEXEC_CMD_kexec_unload KEXEC_CMD_kexec_unload_v1
+#define xen_kexec_load xen_kexec_load_v1
+#define xen_kexec_load_t xen_kexec_load_v1_t
+
+#endif
+
 #endif /* _XEN_PUBLIC_KEXEC_H */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/memory.h
--- a/include/xen/interface/memory.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/memory.h	Tue Jan 28 14:08:04 2014 +0100
@@ -207,8 +207,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_map
 #define XENMAPSPACE_gmfn         2 /* GMFN */
 #define XENMAPSPACE_gmfn_range   3 /* GMFN range, XENMEM_add_to_physmap only. */
 #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another dom,
-                                    * XENMEM_add_to_physmap_range only.
-                                    */
+                                    * XENMEM_add_to_physmap_batch only. */
 /* ` } */
 
 /*
@@ -238,8 +237,8 @@ typedef struct xen_add_to_physmap xen_ad
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
 /* A batched version of add_to_physmap. */
-#define XENMEM_add_to_physmap_range 23
-struct xen_add_to_physmap_range {
+#define XENMEM_add_to_physmap_batch 23
+struct xen_add_to_physmap_batch {
     /* IN */
     /* Which domain to change the mapping for. */
     domid_t domid;
@@ -260,8 +259,15 @@ struct xen_add_to_physmap_range {
     /* Per index error code. */
     XEN_GUEST_HANDLE(int) errs;
 };
-typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t;
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_batch_t;
+DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_batch_t);
+
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define XENMEM_add_to_physmap_range XENMEM_add_to_physmap_batch
+#define xen_add_to_physmap_range xen_add_to_physmap_batch
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_range_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
+#endif
 
 /*
  * Unmaps the page appearing at a particular GPFN from the specified guest's
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/physdev.h
--- a/include/xen/interface/physdev.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/physdev.h	Tue Jan 28 14:08:04 2014 +0100
@@ -151,21 +151,22 @@ DEFINE_XEN_GUEST_HANDLE(physdev_irq_t);
 #define MAP_PIRQ_TYPE_GSI               0x1
 #define MAP_PIRQ_TYPE_UNKNOWN           0x2
 #define MAP_PIRQ_TYPE_MSI_SEG           0x3
+#define MAP_PIRQ_TYPE_MULTI_MSI         0x4
 
 #define PHYSDEVOP_map_pirq               13
 struct physdev_map_pirq {
     domid_t domid;
     /* IN */
     int type;
-    /* IN */
+    /* IN (ignored for ..._MULTI_MSI) */
     int index;
     /* IN or OUT */
     int pirq;
-    /* IN - high 16 bits hold segment for MAP_PIRQ_TYPE_MSI_SEG */
+    /* IN - high 16 bits hold segment for ..._MSI_SEG and ..._MULTI_MSI */
     int bus;
     /* IN */
     int devfn;
-    /* IN */
+    /* IN (also OUT for ..._MULTI_MSI) */
     int entry_nr;
     /* IN */
     uint64_t table_base;
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/tmem.h
--- a/include/xen/interface/tmem.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/tmem.h	Tue Jan 28 14:08:04 2014 +0100
@@ -36,14 +36,16 @@
 #define TMEM_CONTROL               0
 #define TMEM_NEW_POOL              1
 #define TMEM_DESTROY_POOL          2
-#define TMEM_NEW_PAGE              3
 #define TMEM_PUT_PAGE              4
 #define TMEM_GET_PAGE              5
 #define TMEM_FLUSH_PAGE            6
 #define TMEM_FLUSH_OBJECT          7
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define TMEM_NEW_PAGE              3
 #define TMEM_READ                  8
 #define TMEM_WRITE                 9
 #define TMEM_XCHG                 10
+#endif
 
 /* Privileged commands to HYPERVISOR_tmem_op() */
 #define TMEM_AUTH                 101 
@@ -95,7 +97,9 @@
 
 
 #ifndef __ASSEMBLY__
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
 typedef xen_pfn_t tmem_cli_mfn_t;
+#endif
 typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
 struct tmem_op {
     uint32_t cmd;
@@ -121,7 +125,7 @@ struct tmem_op {
             uint32_t tmem_offset;
             uint32_t pfn_offset;
             uint32_t len;
-            tmem_cli_mfn_t cmfn; /* client machine page frame */
+            xen_pfn_t cmfn; /* client machine page frame */
         } gen; /* for all other cmd ("generic") */
     } u;
 };
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/xen-compat.h
--- a/include/xen/interface/xen-compat.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/xen-compat.h	Tue Jan 28 14:08:04 2014 +0100
@@ -27,7 +27,7 @@
 #ifndef __XEN_PUBLIC_XEN_COMPAT_H__
 #define __XEN_PUBLIC_XEN_COMPAT_H__
 
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040300
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040400
 
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
 /* Xen is built with matching headers and implements the latest interface. */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/xen.h
--- a/include/xen/interface/xen.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/xen.h	Tue Jan 28 14:08:04 2014 +0100
@@ -279,15 +279,15 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
  *  refer to Intel SDM 10.12. The PAT allows to set the caching attributes of
  *  pages instead of using MTRRs.
  *
- *  The PAT MSR is as follow (it is a 64-bit value, each entry is 8 bits):
- *             PAT4                 PAT0
- *   +---+----+----+----+-----+----+----+
- *    WC | WC | WB | UC | UC- | WC | WB |  <= Linux
- *   +---+----+----+----+-----+----+----+
- *    WC | WT | WB | UC | UC- | WT | WB |  <= BIOS (default when machine boots)
- *   +---+----+----+----+-----+----+----+
- *    WC | WP | WC | UC | UC- | WT | WB |  <= Xen
- *   +---+----+----+----+-----+----+----+
+ *  The PAT MSR is as follows (it is a 64-bit value, each entry is 8 bits):
+ *                    PAT4                 PAT0
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | UC  | UC- | WC | WB | UC | UC- | WC | WB |  <= Linux
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | UC  | UC- | WT | WB | UC | UC- | WT | WB |  <= BIOS (default when machine boots)
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | rsv | rsv | WP | WC | UC | UC- | WT | WB |  <= Xen
+ *  +-----+-----+----+----+----+-----+----+----+
  *
  *  The lookup of this index table translates to looking up
  *  Bit 7, Bit 4, and Bit 3 of val entry:
@@ -554,11 +554,13 @@ struct multicall_entry {
 typedef struct multicall_entry multicall_entry_t;
 DEFINE_XEN_GUEST_HANDLE(multicall_entry_t);
 
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
 /*
- * Event channel endpoints per domain:
+ * Event channel endpoints per domain (when using the 2-level ABI):
  *  1024 if a long is 32 bits; 4096 if a long is 64 bits.
  */
-#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+#define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS
+#endif
 
 struct vcpu_time_info {
     /*
@@ -614,7 +616,11 @@ struct vcpu_info {
      * to block: this avoids wakeup-waiting races.
      */
     uint8_t evtchn_upcall_pending;
+#ifdef XEN_HAVE_PV_UPCALL_MASK
     uint8_t evtchn_upcall_mask;
+#else /* XEN_HAVE_PV_UPCALL_MASK */
+    uint8_t pad0;
+#endif /* XEN_HAVE_PV_UPCALL_MASK */
     xen_ulong_t evtchn_pending_sel;
     struct arch_vcpu_info arch;
     struct vcpu_time_info time;
@@ -718,8 +724,7 @@ typedef struct shared_info shared_info_t
  * 32-bit and runs under a 64-bit hypervisor should _NOT_ use two of the
  * pages preceding pt_base and mark them as reserved/unused.
  */
-
-#define MAX_GUEST_CMDLINE 1024
+#ifdef XEN_HAVE_PV_GUEST_ENTRY
 struct start_info {
     /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
     char magic[32];             /* "xen-<version>-<platform>".            */
@@ -746,6 +751,7 @@ struct start_info {
                                 /* (PFN of pre-loaded module if           */
                                 /*  SIF_MOD_START_PFN set in flags).      */
     unsigned long mod_len;      /* Size (bytes) of pre-loaded module.     */
+#define MAX_GUEST_CMDLINE 1024
     int8_t cmd_line[MAX_GUEST_CMDLINE];
     /* The pfn range here covers both page table and p->m table frames.   */
     unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table.    */
@@ -758,6 +764,7 @@ typedef struct start_info start_info_t;
 #define console_mfn    console.domU.mfn
 #define console_evtchn console.domU.evtchn
 #endif
+#endif /* XEN_HAVE_PV_GUEST_ENTRY */
 
 /* These flags are passed in the 'flags' field of start_info_t. */
 #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 13:22:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 13:22: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 1W88cC-0005eq-92; Tue, 28 Jan 2014 13:22:08 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88cB-0005ei-0Y
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:07 +0000
Received: from [85.158.143.35:5345] by server-2.bemta-4.messagelabs.com id
	96/A2-11386-EFEA7E25; Tue, 28 Jan 2014 13:22:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1390915323!1346372!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2696 invoked from network); 28 Jan 2014 13:22:04 -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;
	28 Jan 2014 13:22:04 -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 1W88c6-0005Ij-Vt
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W88c6-0004Jp-Rg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 13:22:02 +0000
Message-Id: <E1W88c6-0004Jp-Rg@xenbits.xen.org>
Date: Tue, 28 Jan 2014 13:22:02 +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] sync Xen public 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

# HG changeset patch
# User Jan Beulich
# Date 1390914484 -3600
# Node ID c5f5087bd3c729b875beba524f32e0f7e0ca3fb5
# Parent  a2107a5b5b79e2bd5097166d542780be7936343e
sync Xen public headers

(as before without dropping ia64 bits)
---


diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/arch-arm.h
--- a/include/xen/interface/arch-arm.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/arch-arm.h	Tue Jan 28 14:08:04 2014 +0100
@@ -27,8 +27,8 @@
 #ifndef __XEN_PUBLIC_ARCH_ARM_H__
 #define __XEN_PUBLIC_ARCH_ARM_H__
 
-/* hypercall calling convention
- * ----------------------------
+/*
+ * `incontents 50 arm_abi Hypercall Calling Convention
  *
  * A hypercall is issued using the ARM HVC instruction.
  *
@@ -58,6 +58,114 @@
  * (AAPCS64). Where there is a conflict the 64-bit standard should be
  * used regardless of guest type. Structures which are passed as
  * hypercall arguments are always little endian.
+ *
+ * All memory which is shared with other entities in the system
+ * (including the hypervisor and other guests) must reside in memory
+ * which is mapped as Normal Inner-cacheable. This applies to:
+ *  - hypercall arguments passed via a pointer to guest memory.
+ *  - memory shared via the grant table mechanism (including PV I/O
+ *    rings etc).
+ *  - memory shared with the hypervisor (struct shared_info, struct
+ *    vcpu_info, the grant table, etc).
+ *
+ * Any Inner cache allocation strategy (Write-Back, Write-Through etc)
+ * is acceptable. There is no restriction on the Outer-cacheability.
+ */
+
+/*
+ * `incontents 55 arm_hcall Supported Hypercalls
+ *
+ * Xen on ARM makes extensive use of hardware facilities and therefore
+ * only a subset of the potential hypercalls are required.
+ *
+ * Since ARM uses second stage paging any machine/physical addresses
+ * passed to hypercalls are Guest Physical Addresses (Intermediate
+ * Physical Addresses) unless otherwise noted.
+ *
+ * The following hypercalls (and sub operations) are supported on the
+ * ARM platform. Other hypercalls should be considered
+ * unavailable/unsupported.
+ *
+ *  HYPERVISOR_memory_op
+ *   All generic sub-operations.
+ *
+ *   In addition the following arch specific sub-ops:
+ *    * XENMEM_add_to_physmap
+ *    * XENMEM_add_to_physmap_batch
+ *
+ *  HYPERVISOR_domctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_DOMCTL_iomem_permission (not yet implemented)
+ *    * XEN_DOMCTL_irq_permission (not yet implemented)
+ *
+ *  HYPERVISOR_sched_op
+ *   All generic sub-operations, with the exception of:
+ *    * SCHEDOP_block -- prefer wfi hardware instruction
+ *
+ *  HYPERVISOR_console_io
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_xen_version
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_event_channel_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_physdev_op
+ *   No sub-operations are currenty supported
+ *
+ *  HYPERVISOR_sysctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_SYSCTL_page_offline_op
+ *    * XEN_SYSCTL_get_pmstat
+ *    * XEN_SYSCTL_pm_op
+ *
+ *  HYPERVISOR_hvm_op
+ *   Exactly these sub-operations are supported:
+ *    * HVMOP_set_param
+ *    * HVMOP_get_param
+ *
+ *  HYPERVISOR_grant_table_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_vcpu_op
+ *   Exactly these sub-operations are supported:
+ *    * VCPUOP_register_vcpu_info
+ *    * VCPUOP_register_runstate_memory_area
+ *
+ *
+ * Other notes on the ARM ABI:
+ *
+ * - struct start_info is not exported to ARM guests.
+ *
+ * - struct shared_info is mapped by ARM guests using the
+ *   HYPERVISOR_memory_op sub-op XENMEM_add_to_physmap, passing
+ *   XENMAPSPACE_shared_info as space parameter.
+ *
+ * - All the per-cpu struct vcpu_info are mapped by ARM guests using the
+ *   HYPERVISOR_vcpu_op sub-op VCPUOP_register_vcpu_info, including cpu0
+ *   struct vcpu_info.
+ *
+ * - The grant table is mapped using the HYPERVISOR_memory_op sub-op
+ *   XENMEM_add_to_physmap, passing XENMAPSPACE_grant_table as space
+ *   parameter. The memory range specified under the Xen compatible
+ *   hypervisor node on device tree can be used as target gpfn for the
+ *   mapping.
+ *
+ * - Xenstore is initialized by using the two hvm_params
+ *   HVM_PARAM_STORE_PFN and HVM_PARAM_STORE_EVTCHN. They can be read
+ *   with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - The paravirtualized console is initialized by using the two
+ *   hvm_params HVM_PARAM_CONSOLE_PFN and HVM_PARAM_CONSOLE_EVTCHN. They
+ *   can be read with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - Event channel notifications are delivered using the percpu GIC
+ *   interrupt specified under the Xen compatible hypervisor node on
+ *   device tree.
+ *
+ * - The device tree Xen compatible node is fully described under Linux
+ *   at Documentation/devicetree/bindings/arm/xen.txt.
  */
 
 #define XEN_HYPERCALL_TAG   0XEA1
@@ -182,6 +290,7 @@ typedef uint64_t xen_pfn_t;
 typedef uint64_t xen_ulong_t;
 #define PRI_xen_ulong PRIx64
 
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 struct vcpu_guest_context {
 #define _VGCF_online                   0
 #define VGCF_online                    (1<<_VGCF_online)
@@ -189,23 +298,37 @@ struct vcpu_guest_context {
 
     struct vcpu_guest_core_regs user_regs;  /* Core CPU registers */
 
-    uint32_t sctlr, ttbcr;
-    uint64_t ttbr0, ttbr1;
+    uint32_t sctlr;
+    uint64_t ttbcr, ttbr0, ttbr1;
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
+#endif
 
-struct arch_vcpu_info { };
+struct arch_vcpu_info {
+};
 typedef struct arch_vcpu_info arch_vcpu_info_t;
 
-struct arch_shared_info { };
+struct arch_shared_info {
+};
 typedef struct arch_shared_info arch_shared_info_t;
 typedef uint64_t xen_callback_t;
 
-#endif /* ifndef __ASSEMBLY __ */
+#endif
+
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 
 /* PSR bits (CPSR, SPSR)*/
 
+#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
+#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
+#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
+#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
+#define PSR_BIG_ENDIAN  (1<<9)        /* arm32: Big Endian Mode */
+#define PSR_DBG_MASK    (1<<9)        /* arm64: Debug Exception mask */
+#define PSR_IT_MASK     (0x0600fc00)  /* Thumb If-Then Mask */
+#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
+
 /* 32 bit modes */
 #define PSR_MODE_USR 0x10
 #define PSR_MODE_FIQ 0x11
@@ -218,7 +341,6 @@ typedef uint64_t xen_callback_t;
 #define PSR_MODE_SYS 0x1f
 
 /* 64 bit modes */
-#ifdef __aarch64__
 #define PSR_MODE_BIT  0x10 /* Set iff AArch32 */
 #define PSR_MODE_EL3h 0x0d
 #define PSR_MODE_EL3t 0x0c
@@ -227,18 +349,45 @@ typedef uint64_t xen_callback_t;
 #define PSR_MODE_EL1h 0x05
 #define PSR_MODE_EL1t 0x04
 #define PSR_MODE_EL0t 0x00
+
+#define PSR_GUEST32_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
+#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+
+#define SCTLR_GUEST_INIT    0x00c50078
+
+/*
+ * Virtual machine platform (memory layout, interrupts)
+ *
+ * These are defined for consistency between the tools and the
+ * hypervisor. Guests must not rely on these hardcoded values but
+ * should instead use the FDT.
+ */
+
+/* Physical Address Space */
+#define GUEST_GICD_BASE   0x2c001000ULL
+#define GUEST_GICD_SIZE   0x1000ULL
+#define GUEST_GICC_BASE   0x2c002000ULL
+#define GUEST_GICC_SIZE   0x100ULL
+
+#define GUEST_RAM_BASE    0x80000000ULL
+
+#define GUEST_GNTTAB_BASE 0xb0000000ULL
+#define GUEST_GNTTAB_SIZE 0x00020000ULL
+
+/* Interrupts */
+#define GUEST_TIMER_VIRT_PPI    27
+#define GUEST_TIMER_PHYS_S_PPI  29
+#define GUEST_TIMER_PHYS_NS_PPI 30
+#define GUEST_EVTCHN_PPI        31
+
+/* PSCI functions */
+#define PSCI_cpu_suspend 0
+#define PSCI_cpu_off     1
+#define PSCI_cpu_on      2
+#define PSCI_migrate     3
+
 #endif
 
-#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
-#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
-#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
-#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
-#define PSR_BIG_ENDIAN  (1<<9)        /* Big Endian Mode */
-#define PSR_IT_MASK     (0x0600fc00)  /* Thumb If-Then Mask */
-#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
-
-#define PSR_GUEST_INIT  (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-
 #endif /*  __XEN_PUBLIC_ARCH_ARM_H__ */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/arch-x86/xen.h
--- a/include/xen/interface/arch-x86/xen.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/arch-x86/xen.h	Tue Jan 28 14:08:04 2014 +0100
@@ -70,6 +70,10 @@ typedef unsigned long xen_pfn_t;
 #define PRI_xen_pfn "lx"
 #endif
 
+#define XEN_HAVE_PV_GUEST_ENTRY 1
+
+#define XEN_HAVE_PV_UPCALL_MASK 1
+
 /*
  * `incontents 200 segdesc Segment Descriptor Tables
  */
@@ -150,6 +154,15 @@ typedef uint64_t tsc_timestamp_t; /* RDT
 /*
  * The following is all CPU context. Note that the fpu_ctxt block is filled 
  * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
+ *
+ * Also note that when calling DOMCTL_setvcpucontext and VCPU_initialise
+ * for HVM and PVH guests, not all information in this structure is updated:
+ *
+ * - For HVM guests, the structures read include: fpu_ctxt (if
+ * VGCT_I387_VALID is set), flags, user_regs, debugreg[*]
+ *
+ * - PVH guests are the same as HVM guests, but additionally use ctrlreg[3] to
+ * set cr3. All other fields not used should be set to 0.
  */
 struct vcpu_guest_context {
     /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/domctl.h	Tue Jan 28 14:08:04 2014 +0100
@@ -47,7 +47,7 @@ struct xen_domctl_createdomain {
     /* IN parameters */
     uint32_t ssidref;
     xen_domain_handle_t handle;
- /* Is this an HVM guest (as opposed to a PV guest)? */
+ /* Is this an HVM guest (as opposed to a PVH or PV guest)? */
 #define _XEN_DOMCTL_CDF_hvm_guest     0
 #define XEN_DOMCTL_CDF_hvm_guest      (1U<<_XEN_DOMCTL_CDF_hvm_guest)
  /* Use hardware-assisted paging if available? */
@@ -59,6 +59,9 @@ struct xen_domctl_createdomain {
  /* Disable out-of-sync shadow page tables? */
 #define _XEN_DOMCTL_CDF_oos_off       3
 #define XEN_DOMCTL_CDF_oos_off        (1U<<_XEN_DOMCTL_CDF_oos_off)
+ /* Is this a PVH guest (as opposed to an HVM or PV guest)? */
+#define _XEN_DOMCTL_CDF_pvh_guest     4
+#define XEN_DOMCTL_CDF_pvh_guest      (1U<<_XEN_DOMCTL_CDF_pvh_guest)
     uint32_t flags;
 };
 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
@@ -89,6 +92,9 @@ struct xen_domctl_getdomaininfo {
  /* Being debugged.  */
 #define _XEN_DOMINF_debugged  6
 #define XEN_DOMINF_debugged   (1U<<_XEN_DOMINF_debugged)
+/* domain is PVH */
+#define _XEN_DOMINF_pvh_guest 7
+#define XEN_DOMINF_pvh_guest  (1U<<_XEN_DOMINF_pvh_guest)
  /* XEN_DOMINF_shutdown guest-supplied code.  */
 #define XEN_DOMINF_shutdownmask 255
 #define XEN_DOMINF_shutdownshift 16
@@ -635,6 +641,22 @@ typedef struct xen_domctl_cpuid xen_domc
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
 #endif
 
+/*
+ * Arranges that if the domain suspends (specifically, if it shuts
+ * down with code SHUTDOWN_suspend), this event channel will be
+ * notified.
+ *
+ * This is _instead of_ the usual notification to the global
+ * VIRQ_DOM_EXC.  (In most systems that pirq is owned by xenstored.)
+ *
+ * Only one subscription per domain is possible.  Last subscriber
+ * wins; others are silently displaced.
+ *
+ * NB that contrary to the rather general name, it only applies to
+ * domain shutdown with code suspend.  Shutdown for other reasons
+ * (including crash), and domain death, are notified to VIRQ_DOM_EXC
+ * regardless.
+ */
 /* XEN_DOMCTL_subscribe */
 struct xen_domctl_subscribe {
     uint32_t port; /* IN */
@@ -874,6 +896,17 @@ struct xen_domctl_set_broken_page_p2m {
 typedef struct xen_domctl_set_broken_page_p2m xen_domctl_set_broken_page_p2m_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_broken_page_p2m_t);
 
+/*
+ * XEN_DOMCTL_set_max_evtchn: sets the maximum event channel port
+ * number the guest may use.  Use this limit the amount of resources
+ * (global mapping space, xenheap) a guest may use for event channels.
+ */
+struct xen_domctl_set_max_evtchn {
+    uint32_t max_port;
+};
+typedef struct xen_domctl_set_max_evtchn xen_domctl_set_max_evtchn_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_max_evtchn_t);
+
 struct xen_domctl {
     uint32_t cmd;
 #define XEN_DOMCTL_createdomain                   1
@@ -942,6 +975,7 @@ struct xen_domctl {
 #define XEN_DOMCTL_set_broken_page_p2m           67
 #define XEN_DOMCTL_setnodeaffinity               68
 #define XEN_DOMCTL_getnodeaffinity               69
+#define XEN_DOMCTL_set_max_evtchn                70
 #define XEN_DOMCTL_gdbsx_guestmemio            1000
 #define XEN_DOMCTL_gdbsx_pausevcpu             1001
 #define XEN_DOMCTL_gdbsx_unpausevcpu           1002
@@ -998,6 +1032,7 @@ struct xen_domctl {
         struct xen_domctl_set_access_required access_required;
         struct xen_domctl_audit_p2m         audit_p2m;
         struct xen_domctl_set_virq_handler  set_virq_handler;
+        struct xen_domctl_set_max_evtchn    set_max_evtchn;
         struct xen_domctl_gdbsx_memio       gdbsx_guest_memio;
         struct xen_domctl_set_broken_page_p2m set_broken_page_p2m;
         struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/elfnote.h
--- a/include/xen/interface/elfnote.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/elfnote.h	Tue Jan 28 14:08:04 2014 +0100
@@ -71,8 +71,8 @@
 #define XEN_ELFNOTE_VIRT_BASE      3
 
 /*
- * The offset of the ELF paddr field from the acutal required
- * psuedo-physical address (numeric).
+ * The offset of the ELF paddr field from the actual required
+ * pseudo-physical address (numeric).
  *
  * This is used to maintain backwards compatibility with older kernels
  * which wrote __PAGE_OFFSET into that field. This field defaults to 0
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/event_channel.h
--- a/include/xen/interface/event_channel.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/event_channel.h	Tue Jan 28 14:08:04 2014 +0100
@@ -71,6 +71,9 @@
 #define EVTCHNOP_bind_vcpu        8
 #define EVTCHNOP_unmask           9
 #define EVTCHNOP_reset           10
+#define EVTCHNOP_init_control    11
+#define EVTCHNOP_expand_array    12
+#define EVTCHNOP_set_priority    13
 /* ` } */
 
 typedef uint32_t evtchn_port_t;
@@ -98,6 +101,17 @@ typedef struct evtchn_alloc_unbound evtc
  * a port that is unbound and marked as accepting bindings from the calling
  * domain. A fresh port is allocated in the calling domain and returned as
  * <local_port>.
+ *
+ * In case the peer domain has already tried to set our event channel
+ * pending, before it was bound, EVTCHNOP_bind_interdomain always sets
+ * the local event channel pending.
+ *
+ * The usual pattern of use, in the guest's upcall (or subsequent
+ * handler) is as follows: (Re-enable the event channel for subsequent
+ * signalling and then) check for the existence of whatever condition
+ * is being waited for by other means, and take whatever action is
+ * needed (if any).
+ *
  * NOTES:
  *  1. <remote_dom> may be DOMID_SELF, allowing loopback connections.
  */
@@ -258,6 +272,43 @@ struct evtchn_reset {
 typedef struct evtchn_reset evtchn_reset_t;
 
 /*
+ * EVTCHNOP_init_control: initialize the control block for the FIFO ABI.
+ *
+ * Note: any events that are currently pending will not be resent and
+ * will be lost.  Guests should call this before binding any event to
+ * avoid losing any events.
+ */
+struct evtchn_init_control {
+    /* IN parameters. */
+    uint64_t control_gfn;
+    uint32_t offset;
+    uint32_t vcpu;
+    /* OUT parameters. */
+    uint8_t link_bits;
+    uint8_t _pad[7];
+};
+typedef struct evtchn_init_control evtchn_init_control_t;
+
+/*
+ * EVTCHNOP_expand_array: add an additional page to the event array.
+ */
+struct evtchn_expand_array {
+    /* IN parameters. */
+    uint64_t array_gfn;
+};
+typedef struct evtchn_expand_array evtchn_expand_array_t;
+
+/*
+ * EVTCHNOP_set_priority: set the priority for an event channel.
+ */
+struct evtchn_set_priority {
+    /* IN parameters. */
+    uint32_t port;
+    uint32_t priority;
+};
+typedef struct evtchn_set_priority evtchn_set_priority_t;
+
+/*
  * ` enum neg_errnoval
  * ` HYPERVISOR_event_channel_op_compat(struct evtchn_op *op)
  * `
@@ -281,6 +332,42 @@ struct evtchn_op {
 typedef struct evtchn_op evtchn_op_t;
 DEFINE_XEN_GUEST_HANDLE(evtchn_op_t);
 
+/*
+ * 2-level ABI
+ */
+
+#define EVTCHN_2L_NR_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+
+/*
+ * FIFO ABI
+ */
+
+/* Events may have priorities from 0 (highest) to 15 (lowest). */
+#define EVTCHN_FIFO_PRIORITY_MAX     0
+#define EVTCHN_FIFO_PRIORITY_DEFAULT 7
+#define EVTCHN_FIFO_PRIORITY_MIN     15
+
+#define EVTCHN_FIFO_MAX_QUEUES (EVTCHN_FIFO_PRIORITY_MIN + 1)
+
+typedef uint32_t event_word_t;
+
+#define EVTCHN_FIFO_PENDING 31
+#define EVTCHN_FIFO_MASKED  30
+#define EVTCHN_FIFO_LINKED  29
+#define EVTCHN_FIFO_BUSY    28
+
+#define EVTCHN_FIFO_LINK_BITS 17
+#define EVTCHN_FIFO_LINK_MASK ((1 << EVTCHN_FIFO_LINK_BITS) - 1)
+
+#define EVTCHN_FIFO_NR_CHANNELS (1 << EVTCHN_FIFO_LINK_BITS)
+
+struct evtchn_fifo_control_block {
+    uint32_t ready;
+    uint32_t _rsvd;
+    uint32_t head[EVTCHN_FIFO_MAX_QUEUES];
+};
+typedef struct evtchn_fifo_control_block evtchn_fifo_control_block_t;
+
 #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/hvm/hvm_xs_strings.h
--- a/include/xen/interface/hvm/hvm_xs_strings.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/hvm/hvm_xs_strings.h	Tue Jan 28 14:08:04 2014 +0100
@@ -28,6 +28,7 @@
 #define HVM_XS_HVMLOADER               "hvmloader"
 #define HVM_XS_BIOS                    "hvmloader/bios"
 #define HVM_XS_GENERATION_ID_ADDRESS   "hvmloader/generation-id-address"
+#define HVM_XS_ALLOW_MEMORY_RELOCATE   "hvmloader/allow-memory-relocate"
 
 /* The following values allow additional ACPI tables to be added to the
  * virtual ACPI BIOS that hvmloader constructs. The values specify the guest
@@ -74,6 +75,6 @@
 /* 1 to 99 OEM strings can be set in xenstore using values of the form
  * below. These strings will be loaded into the SMBIOS type 11 structure.
  */
-#define HVM_XS_OEM_STRINGS             "bios-strings/oem-%02d"
+#define HVM_XS_OEM_STRINGS             "bios-strings/oem-%d"
 
 #endif /* __XEN_PUBLIC_HVM_HVM_XS_STRINGS_H__ */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/hvm/pvdrivers.h
--- a/include/xen/interface/hvm/pvdrivers.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/hvm/pvdrivers.h	Tue Jan 28 14:08:04 2014 +0100
@@ -38,10 +38,12 @@
  * indicate a driver which is yet to be released.
  */
 
-#define PVDRIVERS_PRODUCT_LIST(EACH)                         \
-        EACH("xensource-windows", 0x0001) /* Citrix */       \
-        EACH("gplpv-windows",     0x0002) /* James Harper */ \
-        EACH("linux",             0x0003)                    \
-        EACH("experimental",      0xffff)
+#define PVDRIVERS_PRODUCT_LIST(EACH)                               \
+        EACH("xensource-windows",       0x0001) /* Citrix */       \
+        EACH("gplpv-windows",           0x0002) /* James Harper */ \
+        EACH("linux",                   0x0003)                    \
+        EACH("xenserver-windows-v7.0+", 0x0004) /* Citrix */       \
+        EACH("xenserver-windows-v7.2+", 0x0005) /* Citrix */       \
+        EACH("experimental",            0xffff)
 
 #endif /* _XEN_PUBLIC_PVDRIVERS_H_ */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/blkif.h
--- a/include/xen/interface/io/blkif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/blkif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -468,6 +468,30 @@
 #define BLKIF_OP_DISCARD           5
 
 /*
+ * Recognized if "feature-max-indirect-segments" in present in the backend
+ * xenbus info. The "feature-max-indirect-segments" node contains the maximum
+ * number of segments allowed by the backend per request. If the node is
+ * present, the frontend might use blkif_request_indirect structs in order to
+ * issue requests with more than BLKIF_MAX_SEGMENTS_PER_REQUEST (11). The
+ * maximum number of indirect segments is fixed by the backend, but the
+ * frontend can issue requests with any number of indirect segments as long as
+ * it's less than the number provided by the backend. The indirect_grefs field
+ * in blkif_request_indirect should be filled by the frontend with the
+ * grant references of the pages that are holding the indirect segments.
+ * This pages are filled with an array of blkif_request_segment_aligned
+ * that hold the information about the segments. The number of indirect
+ * pages to use is determined by the maximum number of segments
+ * an indirect request contains. Every indirect page can contain a maximum
+ * of 512 segments (PAGE_SIZE/sizeof(blkif_request_segment_aligned)),
+ * so to calculate the number of indirect pages to use we have to do
+ * ceil(indirect_segments/512).
+ *
+ * If a backend does not recognize BLKIF_OP_INDIRECT, it should *not*
+ * create the "feature-max-indirect-segments" node!
+ */
+#define BLKIF_OP_INDIRECT          6
+
+/*
  * Maximum scatter/gather segments per request.
  * This is carefully chosen so that sizeof(blkif_ring_t) <= PAGE_SIZE.
  * NB. This could be 12 if the ring indexes weren't stored in the same page.
@@ -475,6 +499,11 @@
 #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
 
 /*
+ * Maximum number of indirect pages to use per request.
+ */
+#define BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST 8
+
+/*
  * NB. first_sect and last_sect in blkif_request_segment, as well as
  * sector_number in blkif_request, are always expressed in 512-byte units.
  * However they must be properly aligned to the real sector size of the
@@ -517,6 +546,28 @@ struct blkif_request_discard {
 };
 typedef struct blkif_request_discard blkif_request_discard_t;
 
+struct blkif_request_indirect {
+    uint8_t        operation;    /* BLKIF_OP_INDIRECT                    */
+    uint8_t        indirect_op;  /* BLKIF_OP_{READ/WRITE}                */
+    uint16_t       nr_segments;  /* number of segments                   */
+    uint64_t       id;           /* private guest value, echoed in resp  */
+    blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
+    blkif_vdev_t   handle;       /* same as for read/write requests      */
+    grant_ref_t    indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST];
+#ifdef __i386__
+    uint64_t       pad;          /* Make it 64 byte aligned on i386      */
+#endif
+};
+typedef struct blkif_request_indirect blkif_request_indirect_t;
+
+struct blkif_request_segment_aligned {
+    grant_ref_t gref;            /* reference to I/O buffer frame        */
+    /* @first_sect: first sector in frame to transfer (inclusive).   */
+    /* @last_sect: last sector in frame to transfer (inclusive).     */
+    uint8_t     first_sect, last_sect;
+    uint16_t    _pad; /* padding to make it 8 bytes, so it's cache-aligned */
+};
+
 struct blkif_response {
     uint64_t        id;              /* copied from request */
     uint8_t         operation;       /* copied from request */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/netif.h
--- a/include/xen/interface/io/netif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/netif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -69,6 +69,20 @@
  */
 
 /*
+ * "feature-no-csum-offload" should be used to turn IPv4 TCP/UDP checksum
+ * offload off or on. If it is missing then the feature is assumed to be on.
+ * "feature-ipv6-csum-offload" should be used to turn IPv6 TCP/UDP checksum
+ * offload on or off. If it is missing then the feature is assumed to be off.
+ */
+
+/*
+ * "feature-gso-tcpv4" and "feature-gso-tcpv6" advertise the capability to
+ * handle large TCP packets (in IPv4 or IPv6 form respectively). Neither
+ * frontends nor backends are assumed to be capable unless the flags are
+ * present.
+ */
+
+/*
  * This is the 'wire' format for packets:
  *  Request 1: netif_tx_request -- NETTXF_* (any flags)
  * [Request 2: netif_tx_extra]  (only if request 1 has NETTXF_extra_info)
@@ -116,8 +130,10 @@ typedef struct netif_tx_request netif_tx
 #define _XEN_NETIF_EXTRA_FLAG_MORE (0)
 #define XEN_NETIF_EXTRA_FLAG_MORE  (1U<<_XEN_NETIF_EXTRA_FLAG_MORE)
 
-/* GSO types - only TCPv4 currently supported. */
+/* GSO types */
+#define XEN_NETIF_GSO_TYPE_NONE         (0)
 #define XEN_NETIF_GSO_TYPE_TCPV4        (1)
+#define XEN_NETIF_GSO_TYPE_TCPV6        (2)
 
 /*
  * This structure needs to fit within both netif_tx_request and
@@ -206,7 +222,7 @@ struct netif_rx_response {
     uint16_t id;
     uint16_t offset;       /* Offset in page of start of received packet  */
     uint16_t flags;        /* NETRXF_* */
-    int16_t  status;       /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
+    int16_t  status;       /* -ve: NETIF_RSP_* ; +ve: Rx'ed pkt size. */
 };
 typedef struct netif_rx_response netif_rx_response_t;
 
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/pciif.h
--- a/include/xen/interface/io/pciif.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/pciif.h	Tue Jan 28 14:08:04 2014 +0100
@@ -46,6 +46,7 @@
 #define XEN_PCI_OP_aer_resume		(7)
 #define XEN_PCI_OP_aer_mmio		(8)
 #define XEN_PCI_OP_aer_slotreset	(9)
+#define XEN_PCI_OP_enable_multi_msi	(10)
 
 /* xen_pci_op error numbers */
 #define XEN_PCI_ERR_success          (0)
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/io/xs_wire.h
--- a/include/xen/interface/io/xs_wire.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/io/xs_wire.h	Tue Jan 28 14:08:04 2014 +0100
@@ -83,7 +83,8 @@ __attribute__((unused))
     XSD_ERROR(EROFS),
     XSD_ERROR(EBUSY),
     XSD_ERROR(EAGAIN),
-    XSD_ERROR(EISCONN)
+    XSD_ERROR(EISCONN),
+    XSD_ERROR(E2BIG)
 };
 #endif
 
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/kexec.h
--- a/include/xen/interface/kexec.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/kexec.h	Tue Jan 28 14:08:04 2014 +0100
@@ -108,6 +108,20 @@ typedef struct xen_kexec_image {
  * Perform kexec having previously loaded a kexec or kdump kernel
  * as appropriate.
  * type == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
+ *
+ * Control is transferred to the image entry point with the host in
+ * the following state.
+ *
+ * - The image may be executed on any PCPU and all other PCPUs are
+ *   stopped.
+ *
+ * - Local interrupts are disabled.
+ *
+ * - Register values are undefined.
+ *
+ * - The image segments have writeable 1:1 virtual to machine
+ *   mappings.  The location of any page tables is undefined and these
+ *   page table frames are not be mapped.
  */
 #define KEXEC_CMD_kexec                 0
 typedef struct xen_kexec_exec {
@@ -119,12 +133,12 @@ typedef struct xen_kexec_exec {
  * type  == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
  * image == relocation information for kexec (ignored for unload) [in]
  */
-#define KEXEC_CMD_kexec_load            1
-#define KEXEC_CMD_kexec_unload          2
-typedef struct xen_kexec_load {
+#define KEXEC_CMD_kexec_load_v1         1 /* obsolete since 0x00040400 */
+#define KEXEC_CMD_kexec_unload_v1       2 /* obsolete since 0x00040400 */
+typedef struct xen_kexec_load_v1 {
     int type;
     xen_kexec_image_t image;
-} xen_kexec_load_t;
+} xen_kexec_load_v1_t;
 
 #define KEXEC_RANGE_MA_CRASH      0 /* machine address and size of crash area */
 #define KEXEC_RANGE_MA_XEN        1 /* machine address and size of Xen itself */
@@ -155,6 +169,76 @@ typedef struct xen_kexec_range {
     unsigned long start;
 } xen_kexec_range_t;
 
+#if __XEN_INTERFACE_VERSION__ >= 0x00040400
+/*
+ * A contiguous chunk of a kexec image and it's destination machine
+ * address.
+ */
+typedef struct xen_kexec_segment {
+    union {
+        XEN_GUEST_HANDLE(const_void) h;
+        uint64_t _pad;
+    } buf;
+    uint64_t buf_size;
+    uint64_t dest_maddr;
+    uint64_t dest_size;
+} xen_kexec_segment_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_segment_t);
+
+/*
+ * Load a kexec image into memory.
+ *
+ * For KEXEC_TYPE_DEFAULT images, the segments may be anywhere in RAM.
+ * The image is relocated prior to being executed.
+ *
+ * For KEXEC_TYPE_CRASH images, each segment of the image must reside
+ * in the memory region reserved for kexec (KEXEC_RANGE_MA_CRASH) and
+ * the entry point must be within the image. The caller is responsible
+ * for ensuring that multiple images do not overlap.
+ *
+ * All image segments will be loaded to their destination machine
+ * addresses prior to being executed.  The trailing portion of any
+ * segments with a source buffer (from dest_maddr + buf_size to
+ * dest_maddr + dest_size) will be zeroed.
+ *
+ * Segments with no source buffer will be accessible to the image when
+ * it is executed.
+ */
+
+#define KEXEC_CMD_kexec_load 4
+typedef struct xen_kexec_load {
+    uint8_t  type;        /* One of KEXEC_TYPE_* */
+    uint8_t  _pad;
+    uint16_t arch;        /* ELF machine type (EM_*). */
+    uint32_t nr_segments;
+    union {
+        XEN_GUEST_HANDLE(xen_kexec_segment_t) h;
+        uint64_t _pad;
+    } segments;
+    uint64_t entry_maddr; /* image entry point machine address. */
+} xen_kexec_load_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_load_t);
+
+/*
+ * Unload a kexec image.
+ *
+ * Type must be one of KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ */
+#define KEXEC_CMD_kexec_unload 5
+typedef struct xen_kexec_unload {
+    uint8_t type;
+} xen_kexec_unload_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_unload_t);
+
+#else /* __XEN_INTERFACE_VERSION__ < 0x00040400 */
+
+#define KEXEC_CMD_kexec_load KEXEC_CMD_kexec_load_v1
+#define KEXEC_CMD_kexec_unload KEXEC_CMD_kexec_unload_v1
+#define xen_kexec_load xen_kexec_load_v1
+#define xen_kexec_load_t xen_kexec_load_v1_t
+
+#endif
+
 #endif /* _XEN_PUBLIC_KEXEC_H */
 
 /*
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/memory.h
--- a/include/xen/interface/memory.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/memory.h	Tue Jan 28 14:08:04 2014 +0100
@@ -207,8 +207,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_map
 #define XENMAPSPACE_gmfn         2 /* GMFN */
 #define XENMAPSPACE_gmfn_range   3 /* GMFN range, XENMEM_add_to_physmap only. */
 #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another dom,
-                                    * XENMEM_add_to_physmap_range only.
-                                    */
+                                    * XENMEM_add_to_physmap_batch only. */
 /* ` } */
 
 /*
@@ -238,8 +237,8 @@ typedef struct xen_add_to_physmap xen_ad
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
 /* A batched version of add_to_physmap. */
-#define XENMEM_add_to_physmap_range 23
-struct xen_add_to_physmap_range {
+#define XENMEM_add_to_physmap_batch 23
+struct xen_add_to_physmap_batch {
     /* IN */
     /* Which domain to change the mapping for. */
     domid_t domid;
@@ -260,8 +259,15 @@ struct xen_add_to_physmap_range {
     /* Per index error code. */
     XEN_GUEST_HANDLE(int) errs;
 };
-typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t;
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_batch_t;
+DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_batch_t);
+
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define XENMEM_add_to_physmap_range XENMEM_add_to_physmap_batch
+#define xen_add_to_physmap_range xen_add_to_physmap_batch
+typedef struct xen_add_to_physmap_batch xen_add_to_physmap_range_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
+#endif
 
 /*
  * Unmaps the page appearing at a particular GPFN from the specified guest's
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/physdev.h
--- a/include/xen/interface/physdev.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/physdev.h	Tue Jan 28 14:08:04 2014 +0100
@@ -151,21 +151,22 @@ DEFINE_XEN_GUEST_HANDLE(physdev_irq_t);
 #define MAP_PIRQ_TYPE_GSI               0x1
 #define MAP_PIRQ_TYPE_UNKNOWN           0x2
 #define MAP_PIRQ_TYPE_MSI_SEG           0x3
+#define MAP_PIRQ_TYPE_MULTI_MSI         0x4
 
 #define PHYSDEVOP_map_pirq               13
 struct physdev_map_pirq {
     domid_t domid;
     /* IN */
     int type;
-    /* IN */
+    /* IN (ignored for ..._MULTI_MSI) */
     int index;
     /* IN or OUT */
     int pirq;
-    /* IN - high 16 bits hold segment for MAP_PIRQ_TYPE_MSI_SEG */
+    /* IN - high 16 bits hold segment for ..._MSI_SEG and ..._MULTI_MSI */
     int bus;
     /* IN */
     int devfn;
-    /* IN */
+    /* IN (also OUT for ..._MULTI_MSI) */
     int entry_nr;
     /* IN */
     uint64_t table_base;
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/tmem.h
--- a/include/xen/interface/tmem.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/tmem.h	Tue Jan 28 14:08:04 2014 +0100
@@ -36,14 +36,16 @@
 #define TMEM_CONTROL               0
 #define TMEM_NEW_POOL              1
 #define TMEM_DESTROY_POOL          2
-#define TMEM_NEW_PAGE              3
 #define TMEM_PUT_PAGE              4
 #define TMEM_GET_PAGE              5
 #define TMEM_FLUSH_PAGE            6
 #define TMEM_FLUSH_OBJECT          7
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
+#define TMEM_NEW_PAGE              3
 #define TMEM_READ                  8
 #define TMEM_WRITE                 9
 #define TMEM_XCHG                 10
+#endif
 
 /* Privileged commands to HYPERVISOR_tmem_op() */
 #define TMEM_AUTH                 101 
@@ -95,7 +97,9 @@
 
 
 #ifndef __ASSEMBLY__
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
 typedef xen_pfn_t tmem_cli_mfn_t;
+#endif
 typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
 struct tmem_op {
     uint32_t cmd;
@@ -121,7 +125,7 @@ struct tmem_op {
             uint32_t tmem_offset;
             uint32_t pfn_offset;
             uint32_t len;
-            tmem_cli_mfn_t cmfn; /* client machine page frame */
+            xen_pfn_t cmfn; /* client machine page frame */
         } gen; /* for all other cmd ("generic") */
     } u;
 };
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/xen-compat.h
--- a/include/xen/interface/xen-compat.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/xen-compat.h	Tue Jan 28 14:08:04 2014 +0100
@@ -27,7 +27,7 @@
 #ifndef __XEN_PUBLIC_XEN_COMPAT_H__
 #define __XEN_PUBLIC_XEN_COMPAT_H__
 
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040300
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040400
 
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
 /* Xen is built with matching headers and implements the latest interface. */
diff -r a2107a5b5b79 -r c5f5087bd3c7 include/xen/interface/xen.h
--- a/include/xen/interface/xen.h	Tue Jan 28 13:50:31 2014 +0100
+++ b/include/xen/interface/xen.h	Tue Jan 28 14:08:04 2014 +0100
@@ -279,15 +279,15 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
  *  refer to Intel SDM 10.12. The PAT allows to set the caching attributes of
  *  pages instead of using MTRRs.
  *
- *  The PAT MSR is as follow (it is a 64-bit value, each entry is 8 bits):
- *             PAT4                 PAT0
- *   +---+----+----+----+-----+----+----+
- *    WC | WC | WB | UC | UC- | WC | WB |  <= Linux
- *   +---+----+----+----+-----+----+----+
- *    WC | WT | WB | UC | UC- | WT | WB |  <= BIOS (default when machine boots)
- *   +---+----+----+----+-----+----+----+
- *    WC | WP | WC | UC | UC- | WT | WB |  <= Xen
- *   +---+----+----+----+-----+----+----+
+ *  The PAT MSR is as follows (it is a 64-bit value, each entry is 8 bits):
+ *                    PAT4                 PAT0
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | UC  | UC- | WC | WB | UC | UC- | WC | WB |  <= Linux
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | UC  | UC- | WT | WB | UC | UC- | WT | WB |  <= BIOS (default when machine boots)
+ *  +-----+-----+----+----+----+-----+----+----+
+ *  | rsv | rsv | WP | WC | UC | UC- | WT | WB |  <= Xen
+ *  +-----+-----+----+----+----+-----+----+----+
  *
  *  The lookup of this index table translates to looking up
  *  Bit 7, Bit 4, and Bit 3 of val entry:
@@ -554,11 +554,13 @@ struct multicall_entry {
 typedef struct multicall_entry multicall_entry_t;
 DEFINE_XEN_GUEST_HANDLE(multicall_entry_t);
 
+#if __XEN_INTERFACE_VERSION__ < 0x00040400
 /*
- * Event channel endpoints per domain:
+ * Event channel endpoints per domain (when using the 2-level ABI):
  *  1024 if a long is 32 bits; 4096 if a long is 64 bits.
  */
-#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+#define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS
+#endif
 
 struct vcpu_time_info {
     /*
@@ -614,7 +616,11 @@ struct vcpu_info {
      * to block: this avoids wakeup-waiting races.
      */
     uint8_t evtchn_upcall_pending;
+#ifdef XEN_HAVE_PV_UPCALL_MASK
     uint8_t evtchn_upcall_mask;
+#else /* XEN_HAVE_PV_UPCALL_MASK */
+    uint8_t pad0;
+#endif /* XEN_HAVE_PV_UPCALL_MASK */
     xen_ulong_t evtchn_pending_sel;
     struct arch_vcpu_info arch;
     struct vcpu_time_info time;
@@ -718,8 +724,7 @@ typedef struct shared_info shared_info_t
  * 32-bit and runs under a 64-bit hypervisor should _NOT_ use two of the
  * pages preceding pt_base and mark them as reserved/unused.
  */
-
-#define MAX_GUEST_CMDLINE 1024
+#ifdef XEN_HAVE_PV_GUEST_ENTRY
 struct start_info {
     /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
     char magic[32];             /* "xen-<version>-<platform>".            */
@@ -746,6 +751,7 @@ struct start_info {
                                 /* (PFN of pre-loaded module if           */
                                 /*  SIF_MOD_START_PFN set in flags).      */
     unsigned long mod_len;      /* Size (bytes) of pre-loaded module.     */
+#define MAX_GUEST_CMDLINE 1024
     int8_t cmd_line[MAX_GUEST_CMDLINE];
     /* The pfn range here covers both page table and p->m table frames.   */
     unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table.    */
@@ -758,6 +764,7 @@ typedef struct start_info start_info_t;
 #define console_mfn    console.domU.mfn
 #define console_evtchn console.domU.evtchn
 #endif
+#endif /* XEN_HAVE_PV_GUEST_ENTRY */
 
 /* These flags are passed in the 'flags' field of start_info_t. */
 #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 14:11:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 14:11: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 1W89Nc-0007k2-Kk; Tue, 28 Jan 2014 14:11:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W89Na-0007jq-Pg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:07 +0000
Received: from [193.109.254.147:21636] by server-13.bemta-14.messagelabs.com
	id DB/2D-19374-A7AB7E25; Tue, 28 Jan 2014 14:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1390918263!363438!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25641 invoked from network); 28 Jan 2014 14:11:04 -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;
	28 Jan 2014 14:11:04 -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 1W89NX-0005sC-CO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W89NX-0005gz-95
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:03 +0000
Message-Id: <E1W89NX-0005gz-95@xenbits.xen.org>
Date: Tue, 28 Jan 2014 14:11:02 +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] update to latest interface
	version (4.4.0)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390917611 -3600
# Node ID ac24179a78750ed99a8bee90e523af7c28962b3f
# Parent  c5f5087bd3c729b875beba524f32e0f7e0ca3fb5
update to latest interface version (4.4.0)

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


diff -r c5f5087bd3c7 -r ac24179a7875 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/ia64/xen/hypervisor.c	Tue Jan 28 15:00:11 2014 +0100
@@ -260,7 +260,7 @@ xen_limit_pages_to_max_mfn(struct page *
 #include <xen/interface/xen.h>
 #include <xen/gnttab.h>
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	return __va(frames[0] << PAGE_SHIFT);
 }
diff -r c5f5087bd3c7 -r ac24179a7875 arch/ia64/xen/xcom_hcall.c
--- a/arch/ia64/xen/xcom_hcall.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/ia64/xen/xcom_hcall.c	Tue Jan 28 15:00:11 2014 +0100
@@ -721,9 +721,9 @@ xencomm_hypercall_kexec_op(int cmd, void
 	case KEXEC_CMD_kexec_get_range:
 		argsize = sizeof(xen_kexec_range_t);
 		break;
-	case KEXEC_CMD_kexec_load:
-	case KEXEC_CMD_kexec_unload:
-		argsize = sizeof(xen_kexec_load_t);
+	case KEXEC_CMD_kexec_load_v1:
+	case KEXEC_CMD_kexec_unload_v1:
+		argsize = sizeof(xen_kexec_load_v1_t);
 		break;
 	case KEXEC_CMD_kexec:
 		argsize = sizeof(xen_kexec_exec_t);
diff -r c5f5087bd3c7 -r ac24179a7875 arch/powerpc/platforms/xen/gnttab.c
--- a/arch/powerpc/platforms/xen/gnttab.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/powerpc/platforms/xen/gnttab.c	Tue Jan 28 15:00:11 2014 +0100
@@ -448,7 +448,7 @@ static void setup_grant_area(void)
 	foreign_map_pgs = pgs;
 }
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	void *shared;
 	ulong pa = frames[0] << PAGE_SHIFT;
diff -r c5f5087bd3c7 -r ac24179a7875 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/powerpc/platforms/xen/hcall.c	Tue Jan 28 15:00:11 2014 +0100
@@ -242,11 +242,9 @@ int HYPERVISOR_kexec_op(unsigned long op
 		case KEXEC_CMD_kexec_get_range:
 			argsize = sizeof(struct xen_kexec_range);
 			break;
-		case KEXEC_CMD_kexec_load:
-			argsize = sizeof(struct xen_kexec_load);
-			break;
-		case KEXEC_CMD_kexec_unload:
-			argsize = sizeof(struct xen_kexec_load);
+		case KEXEC_CMD_kexec_load_v1:
+		case KEXEC_CMD_kexec_unload_v1:
+			argsize = sizeof(struct xen_kexec_load_v1);
 			break;
 		case KEXEC_CMD_kexec:
 			argsize = sizeof(struct xen_kexec_exec);
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/Kconfig	Tue Jan 28 15:00:11 2014 +0100
@@ -10,7 +10,7 @@ config XEN
 if XEN
 config XEN_INTERFACE_VERSION
 	hex
-	default 0x00040200
+	default 0x00040400
 
 menu "XEN"
 
@@ -342,6 +342,12 @@ choice
 	config XEN_COMPAT_040200_AND_LATER
 		bool "4.2.0 and later"
 
+	config XEN_COMPAT_040300_AND_LATER
+		bool "4.3.0 and later"
+
+	config XEN_COMPAT_040400_AND_LATER
+		bool "4.4.0 and later"
+
 	config XEN_COMPAT_LATEST_ONLY
 		bool "no compatibility code"
 
@@ -350,6 +356,8 @@ endchoice
 config XEN_COMPAT
 	hex
 	default 0xffffff if XEN_COMPAT_LATEST_ONLY
+	default 0x040400 if XEN_COMPAT_040400_AND_LATER
+	default 0x040300 if XEN_COMPAT_040300_AND_LATER
 	default 0x040200 if XEN_COMPAT_040200_AND_LATER
 	default 0x040100 if XEN_COMPAT_040100_AND_LATER
 	default 0x040000 if XEN_COMPAT_040000_AND_LATER
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/evtchn.c	Tue Jan 28 15:00:11 2014 +0100
@@ -54,8 +54,8 @@
 static DEFINE_SPINLOCK(irq_mapping_update_lock);
 
 /* IRQ <-> event-channel mappings. */
-static int evtchn_to_irq[NR_EVENT_CHANNELS] = {
-	[0 ...  NR_EVENT_CHANNELS-1] = -1 };
+static int evtchn_to_irq[EVTCHN_2L_NR_CHANNELS] = {
+	[0 ...  EVTCHN_2L_NR_CHANNELS-1] = -1 };
 
 /* Packed IRQ information: binding type, sub-type index, and event channel. */
 static u32 irq_info[NR_IRQS];
@@ -85,7 +85,7 @@ static inline u32 mk_irq_info(u32 type, 
 	BUILD_BUG_ON(NR_IPIS > (1U << _INDEX_BITS));
 	BUG_ON(index >> _INDEX_BITS);
 
-	BUILD_BUG_ON(NR_EVENT_CHANNELS > (1U << _EVTCHN_BITS));
+	BUILD_BUG_ON(EVTCHN_2L_NR_CHANNELS > (1U << _EVTCHN_BITS));
 
 	return ((type << (32 - _IRQT_BITS)) | (index << _EVTCHN_BITS) | evtchn);
 }
@@ -126,8 +126,8 @@ static int irq_bindcount[NR_IRQS];
 
 #ifdef CONFIG_SMP
 
-static u8 cpu_evtchn[NR_EVENT_CHANNELS];
-static unsigned long cpu_evtchn_mask[NR_CPUS][NR_EVENT_CHANNELS/BITS_PER_LONG];
+static u8 cpu_evtchn[EVTCHN_2L_NR_CHANNELS];
+static unsigned long cpu_evtchn_mask[NR_CPUS][EVTCHN_2L_NR_CHANNELS/BITS_PER_LONG];
 
 static inline unsigned long active_evtchns(unsigned int cpu, shared_info_t *sh,
 					   unsigned int idx)
@@ -1006,7 +1006,7 @@ void disable_all_local_evtchn(void)
 	unsigned i, cpu = smp_processor_id();
 	shared_info_t *s = HYPERVISOR_shared_info;
 
-	for (i = 0; i < NR_EVENT_CHANNELS; ++i)
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; ++i)
 		if (cpu_from_evtchn(i) == cpu)
 			synch_set_bit(i, &s->evtchn_mask[0]);
 }
@@ -1085,7 +1085,7 @@ void irq_resume(void)
 	}
 
 	/* New event-channel space is not 'live' yet. */
-	for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
+	for (evtchn = 0; evtchn < EVTCHN_2L_NR_CHANNELS; evtchn++)
 		mask_evtchn(evtchn);
 
 	/* Check that no PIRQs are still bound. */
@@ -1095,7 +1095,7 @@ void irq_resume(void)
 	/* No IRQ <-> event-channel mappings. */
 	for (irq = 0; irq < NR_IRQS; irq++)
 		irq_info[irq] &= ~((1U << _EVTCHN_BITS) - 1);
-	for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
+	for (evtchn = 0; evtchn < EVTCHN_2L_NR_CHANNELS; evtchn++)
 		evtchn_to_irq[evtchn] = -1;
 
 	for_each_possible_cpu(cpu) {
@@ -1181,7 +1181,7 @@ void __init xen_init_IRQ(void)
 		pirq_eoi_does_unmask = 1;
 
 	/* No event channels are 'live' right now. */
-	for (i = 0; i < NR_EVENT_CHANNELS; i++)
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++)
 		mask_evtchn(i);
 
 	/* No IRQ -> event-channel mappings. */
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/gnttab.c	Tue Jan 28 15:00:11 2014 +0100
@@ -542,7 +542,7 @@ static int unmap_pte_fn(pte_t *pte, stru
 	return 0;
 }
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	struct vm_struct *area;
 	area = alloc_vm_area(PAGE_SIZE * max_nr_grant_frames());
@@ -554,11 +554,11 @@ void *arch_gnttab_alloc_shared(unsigned 
 static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
 {
 	struct gnttab_setup_table setup;
-	unsigned long *frames;
+	xen_pfn_t *frames;
 	unsigned int nr_gframes = end_idx + 1;
 	int rc;
 
-	frames = kmalloc(nr_gframes * sizeof(unsigned long), GFP_ATOMIC);
+	frames = kmalloc(nr_gframes * sizeof(*frames), GFP_ATOMIC);
 	if (!frames)
 		return -ENOMEM;
 
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/machine_kexec.c
--- a/drivers/xen/core/machine_kexec.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/machine_kexec.c	Tue Jan 28 15:00:11 2014 +0100
@@ -186,12 +186,12 @@ static void setup_load_arg(xen_kexec_ima
  */
 int xen_machine_kexec_load(struct kimage *image)
 {
-	xen_kexec_load_t xkl;
+	xen_kexec_load_v1_t xkl;
 
 	memset(&xkl, 0, sizeof(xkl));
 	xkl.type = image->type;
 	setup_load_arg(&xkl.image, image);
-	return HYPERVISOR_kexec_op(KEXEC_CMD_kexec_load, &xkl);
+	return HYPERVISOR_kexec_op(KEXEC_CMD_kexec_load_v1, &xkl);
 }
 
 /*
@@ -202,11 +202,11 @@ int xen_machine_kexec_load(struct kimage
  */
 void xen_machine_kexec_unload(struct kimage *image)
 {
-	xen_kexec_load_t xkl;
+	xen_kexec_load_v1_t xkl;
 
 	memset(&xkl, 0, sizeof(xkl));
 	xkl.type = image->type;
-	WARN_ON(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload, &xkl));
+	WARN_ON(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload_v1, &xkl));
 }
 
 /*
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/evtchn/evtchn.c
--- a/drivers/xen/evtchn/evtchn.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/evtchn/evtchn.c	Tue Jan 28 15:00:11 2014 +0100
@@ -69,7 +69,7 @@ struct per_user_data {
 };
 
 /* Who's bound to each port? */
-static struct per_user_data *port_user[NR_EVENT_CHANNELS];
+static struct per_user_data *port_user[EVTCHN_2L_NR_CHANNELS];
 static spinlock_t port_user_lock;
 
 void evtchn_device_upcall(int port)
@@ -115,7 +115,7 @@ static void evtchn_check_wrong_delivery(
 
 	spin_lock_irq(&port_user_lock);
 
-	for (port = 0; port < NR_EVENT_CHANNELS; port++)
+	for (port = 0; port < EVTCHN_2L_NR_CHANNELS; port++)
 		if (port_user[port] == u)
 			rebind_evtchn_to_cpu(port, current_cpu);
 
@@ -223,7 +223,7 @@ static ssize_t evtchn_write(struct file 
 
 	spin_lock_irq(&port_user_lock);
 	for (i = 0; i < (count/sizeof(evtchn_port_t)); i++)
-		if ((kbuf[i] < NR_EVENT_CHANNELS) && (port_user[kbuf[i]] == u))
+		if ((kbuf[i] < EVTCHN_2L_NR_CHANNELS) && (port_user[kbuf[i]] == u))
 			unmask_evtchn(kbuf[i]);
 	spin_unlock_irq(&port_user_lock);
 
@@ -338,7 +338,7 @@ static long evtchn_ioctl(struct file *fi
 			break;
 
 		rc = -EINVAL;
-		if (unbind.port >= NR_EVENT_CHANNELS)
+		if (unbind.port >= EVTCHN_2L_NR_CHANNELS)
 			break;
 
 		spin_lock_irq(&port_user_lock);
@@ -370,7 +370,7 @@ static long evtchn_ioctl(struct file *fi
 		if (copy_from_user(&notify, uarg, sizeof(notify)))
 			break;
 
-		if (notify.port >= NR_EVENT_CHANNELS) {
+		if (notify.port >= EVTCHN_2L_NR_CHANNELS) {
 			rc = -EINVAL;
 		} else if (port_user[notify.port] != u) {
 			rc = -ENOTCONN;
@@ -454,7 +454,7 @@ static int evtchn_release(struct inode *
 
 	free_page((unsigned long)u->ring);
 
-	for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) {
 		int ret;
 		if (port_user[i] != u)
 			continue;
@@ -505,12 +505,12 @@ static int evtchn_cpu_notify(struct noti
 	case CPU_DOWN_PREPARE:
 		cpu_clear(hotcpu, map);
 		spin_lock_irq(&port_user_lock);
-		for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+		for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) {
 			u = port_user[i];
 			if ((u == NULL) || (u->bind_cpu != hotcpu))
 				continue;
 			newcpu = next_bind_cpu(map);
-			for (j = i; j < NR_EVENT_CHANNELS; j++)
+			for (j = i; j < EVTCHN_2L_NR_CHANNELS; j++)
 				if (port_user[j] == u)
 					rebind_evtchn_to_cpu(j, newcpu);
 			u->bind_cpu = newcpu;
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-i386/acpi.h
--- a/include/asm-i386/acpi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-i386/acpi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -161,16 +161,15 @@ extern int acpi_irq_balance_set(char *st
 
 #ifdef CONFIG_XEN
 static inline int acpi_notify_hypervisor_state(u8 sleep_state,
-					       u32 pm1a_cnt_val,
-					       u32 pm1b_cnt_val)
+					       u32 val_a, u32 val_b)
 {
 	struct xen_platform_op op = {
 		.cmd = XENPF_enter_acpi_sleep,
 		.interface_version = XENPF_INTERFACE_VERSION,
 		.u = {
 			.enter_acpi_sleep = {
-				.pm1a_cnt_val = pm1a_cnt_val,
-				.pm1b_cnt_val = pm1b_cnt_val,
+				.val_a = val_a,
+				.val_b = val_b,
 				.sleep_state = sleep_state,
 			},
 		},
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-i386/mach-xen/mach_traps.h
--- a/include/asm-i386/mach-xen/mach_traps.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-i386/mach-xen/mach_traps.h	Tue Jan 28 15:00:11 2014 +0100
@@ -22,7 +22,7 @@ static inline unsigned char get_nmi_reas
 	 */
 	if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
 		reason |= 0x40;
-	if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
+	if (test_bit(_XEN_NMIREASON_pci_serr, &s->arch.nmi_reason))
 		reason |= 0x80;
 
         return reason;
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-x86_64/acpi.h
--- a/include/asm-x86_64/acpi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-x86_64/acpi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -134,16 +134,15 @@ extern int acpi_irq_balance_set(char *st
 
 #ifdef CONFIG_XEN
 static inline int acpi_notify_hypervisor_state(u8 sleep_state,
-					       u32 pm1a_cnt_val,
-					       u32 pm1b_cnt_val)
+					       u32 val_a, u32 val_b)
 {
 	struct xen_platform_op op = {
 		.cmd = XENPF_enter_acpi_sleep,
 		.interface_version = XENPF_INTERFACE_VERSION,
 		.u = {
 			.enter_acpi_sleep = {
-				.pm1a_cnt_val = pm1a_cnt_val,
-				.pm1b_cnt_val = pm1b_cnt_val,
+				.val_a = val_a,
+				.val_b = val_b,
 				.sleep_state = sleep_state,
 			},
 		},
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-x86_64/mach-xen/asm/nmi.h
--- a/include/asm-x86_64/mach-xen/asm/nmi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-x86_64/mach-xen/asm/nmi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -62,7 +62,7 @@ static inline unsigned char get_nmi_reas
          */
         if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
                 reason |= 0x40;
-        if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
+        if (test_bit(_XEN_NMIREASON_pci_serr, &s->arch.nmi_reason))
                 reason |= 0x80;
 
         return reason;
diff -r c5f5087bd3c7 -r ac24179a7875 include/xen/gnttab.h
--- a/include/xen/gnttab.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/xen/gnttab.h	Tue Jan 28 15:00:11 2014 +0100
@@ -116,7 +116,7 @@ void gnttab_reset_grant_page(struct page
 int gnttab_suspend(void);
 int gnttab_resume(void);
 
-void *arch_gnttab_alloc_shared(unsigned long *frames);
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames);
 
 static inline void
 gnttab_set_map_op(struct gnttab_map_grant_ref *map, maddr_t addr,

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 14:11:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 14:11: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 1W89Nc-0007k2-Kk; Tue, 28 Jan 2014 14:11:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W89Na-0007jq-Pg
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:07 +0000
Received: from [193.109.254.147:21636] by server-13.bemta-14.messagelabs.com
	id DB/2D-19374-A7AB7E25; Tue, 28 Jan 2014 14:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1390918263!363438!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25641 invoked from network); 28 Jan 2014 14:11:04 -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;
	28 Jan 2014 14:11:04 -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 1W89NX-0005sC-CO
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1W89NX-0005gz-95
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 14:11:03 +0000
Message-Id: <E1W89NX-0005gz-95@xenbits.xen.org>
Date: Tue, 28 Jan 2014 14:11:02 +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] update to latest interface
	version (4.4.0)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1390917611 -3600
# Node ID ac24179a78750ed99a8bee90e523af7c28962b3f
# Parent  c5f5087bd3c729b875beba524f32e0f7e0ca3fb5
update to latest interface version (4.4.0)

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


diff -r c5f5087bd3c7 -r ac24179a7875 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/ia64/xen/hypervisor.c	Tue Jan 28 15:00:11 2014 +0100
@@ -260,7 +260,7 @@ xen_limit_pages_to_max_mfn(struct page *
 #include <xen/interface/xen.h>
 #include <xen/gnttab.h>
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	return __va(frames[0] << PAGE_SHIFT);
 }
diff -r c5f5087bd3c7 -r ac24179a7875 arch/ia64/xen/xcom_hcall.c
--- a/arch/ia64/xen/xcom_hcall.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/ia64/xen/xcom_hcall.c	Tue Jan 28 15:00:11 2014 +0100
@@ -721,9 +721,9 @@ xencomm_hypercall_kexec_op(int cmd, void
 	case KEXEC_CMD_kexec_get_range:
 		argsize = sizeof(xen_kexec_range_t);
 		break;
-	case KEXEC_CMD_kexec_load:
-	case KEXEC_CMD_kexec_unload:
-		argsize = sizeof(xen_kexec_load_t);
+	case KEXEC_CMD_kexec_load_v1:
+	case KEXEC_CMD_kexec_unload_v1:
+		argsize = sizeof(xen_kexec_load_v1_t);
 		break;
 	case KEXEC_CMD_kexec:
 		argsize = sizeof(xen_kexec_exec_t);
diff -r c5f5087bd3c7 -r ac24179a7875 arch/powerpc/platforms/xen/gnttab.c
--- a/arch/powerpc/platforms/xen/gnttab.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/powerpc/platforms/xen/gnttab.c	Tue Jan 28 15:00:11 2014 +0100
@@ -448,7 +448,7 @@ static void setup_grant_area(void)
 	foreign_map_pgs = pgs;
 }
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	void *shared;
 	ulong pa = frames[0] << PAGE_SHIFT;
diff -r c5f5087bd3c7 -r ac24179a7875 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/arch/powerpc/platforms/xen/hcall.c	Tue Jan 28 15:00:11 2014 +0100
@@ -242,11 +242,9 @@ int HYPERVISOR_kexec_op(unsigned long op
 		case KEXEC_CMD_kexec_get_range:
 			argsize = sizeof(struct xen_kexec_range);
 			break;
-		case KEXEC_CMD_kexec_load:
-			argsize = sizeof(struct xen_kexec_load);
-			break;
-		case KEXEC_CMD_kexec_unload:
-			argsize = sizeof(struct xen_kexec_load);
+		case KEXEC_CMD_kexec_load_v1:
+		case KEXEC_CMD_kexec_unload_v1:
+			argsize = sizeof(struct xen_kexec_load_v1);
 			break;
 		case KEXEC_CMD_kexec:
 			argsize = sizeof(struct xen_kexec_exec);
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/Kconfig	Tue Jan 28 15:00:11 2014 +0100
@@ -10,7 +10,7 @@ config XEN
 if XEN
 config XEN_INTERFACE_VERSION
 	hex
-	default 0x00040200
+	default 0x00040400
 
 menu "XEN"
 
@@ -342,6 +342,12 @@ choice
 	config XEN_COMPAT_040200_AND_LATER
 		bool "4.2.0 and later"
 
+	config XEN_COMPAT_040300_AND_LATER
+		bool "4.3.0 and later"
+
+	config XEN_COMPAT_040400_AND_LATER
+		bool "4.4.0 and later"
+
 	config XEN_COMPAT_LATEST_ONLY
 		bool "no compatibility code"
 
@@ -350,6 +356,8 @@ endchoice
 config XEN_COMPAT
 	hex
 	default 0xffffff if XEN_COMPAT_LATEST_ONLY
+	default 0x040400 if XEN_COMPAT_040400_AND_LATER
+	default 0x040300 if XEN_COMPAT_040300_AND_LATER
 	default 0x040200 if XEN_COMPAT_040200_AND_LATER
 	default 0x040100 if XEN_COMPAT_040100_AND_LATER
 	default 0x040000 if XEN_COMPAT_040000_AND_LATER
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/evtchn.c	Tue Jan 28 15:00:11 2014 +0100
@@ -54,8 +54,8 @@
 static DEFINE_SPINLOCK(irq_mapping_update_lock);
 
 /* IRQ <-> event-channel mappings. */
-static int evtchn_to_irq[NR_EVENT_CHANNELS] = {
-	[0 ...  NR_EVENT_CHANNELS-1] = -1 };
+static int evtchn_to_irq[EVTCHN_2L_NR_CHANNELS] = {
+	[0 ...  EVTCHN_2L_NR_CHANNELS-1] = -1 };
 
 /* Packed IRQ information: binding type, sub-type index, and event channel. */
 static u32 irq_info[NR_IRQS];
@@ -85,7 +85,7 @@ static inline u32 mk_irq_info(u32 type, 
 	BUILD_BUG_ON(NR_IPIS > (1U << _INDEX_BITS));
 	BUG_ON(index >> _INDEX_BITS);
 
-	BUILD_BUG_ON(NR_EVENT_CHANNELS > (1U << _EVTCHN_BITS));
+	BUILD_BUG_ON(EVTCHN_2L_NR_CHANNELS > (1U << _EVTCHN_BITS));
 
 	return ((type << (32 - _IRQT_BITS)) | (index << _EVTCHN_BITS) | evtchn);
 }
@@ -126,8 +126,8 @@ static int irq_bindcount[NR_IRQS];
 
 #ifdef CONFIG_SMP
 
-static u8 cpu_evtchn[NR_EVENT_CHANNELS];
-static unsigned long cpu_evtchn_mask[NR_CPUS][NR_EVENT_CHANNELS/BITS_PER_LONG];
+static u8 cpu_evtchn[EVTCHN_2L_NR_CHANNELS];
+static unsigned long cpu_evtchn_mask[NR_CPUS][EVTCHN_2L_NR_CHANNELS/BITS_PER_LONG];
 
 static inline unsigned long active_evtchns(unsigned int cpu, shared_info_t *sh,
 					   unsigned int idx)
@@ -1006,7 +1006,7 @@ void disable_all_local_evtchn(void)
 	unsigned i, cpu = smp_processor_id();
 	shared_info_t *s = HYPERVISOR_shared_info;
 
-	for (i = 0; i < NR_EVENT_CHANNELS; ++i)
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; ++i)
 		if (cpu_from_evtchn(i) == cpu)
 			synch_set_bit(i, &s->evtchn_mask[0]);
 }
@@ -1085,7 +1085,7 @@ void irq_resume(void)
 	}
 
 	/* New event-channel space is not 'live' yet. */
-	for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
+	for (evtchn = 0; evtchn < EVTCHN_2L_NR_CHANNELS; evtchn++)
 		mask_evtchn(evtchn);
 
 	/* Check that no PIRQs are still bound. */
@@ -1095,7 +1095,7 @@ void irq_resume(void)
 	/* No IRQ <-> event-channel mappings. */
 	for (irq = 0; irq < NR_IRQS; irq++)
 		irq_info[irq] &= ~((1U << _EVTCHN_BITS) - 1);
-	for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
+	for (evtchn = 0; evtchn < EVTCHN_2L_NR_CHANNELS; evtchn++)
 		evtchn_to_irq[evtchn] = -1;
 
 	for_each_possible_cpu(cpu) {
@@ -1181,7 +1181,7 @@ void __init xen_init_IRQ(void)
 		pirq_eoi_does_unmask = 1;
 
 	/* No event channels are 'live' right now. */
-	for (i = 0; i < NR_EVENT_CHANNELS; i++)
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++)
 		mask_evtchn(i);
 
 	/* No IRQ -> event-channel mappings. */
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/gnttab.c	Tue Jan 28 15:00:11 2014 +0100
@@ -542,7 +542,7 @@ static int unmap_pte_fn(pte_t *pte, stru
 	return 0;
 }
 
-void *arch_gnttab_alloc_shared(unsigned long *frames)
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames)
 {
 	struct vm_struct *area;
 	area = alloc_vm_area(PAGE_SIZE * max_nr_grant_frames());
@@ -554,11 +554,11 @@ void *arch_gnttab_alloc_shared(unsigned 
 static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
 {
 	struct gnttab_setup_table setup;
-	unsigned long *frames;
+	xen_pfn_t *frames;
 	unsigned int nr_gframes = end_idx + 1;
 	int rc;
 
-	frames = kmalloc(nr_gframes * sizeof(unsigned long), GFP_ATOMIC);
+	frames = kmalloc(nr_gframes * sizeof(*frames), GFP_ATOMIC);
 	if (!frames)
 		return -ENOMEM;
 
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/core/machine_kexec.c
--- a/drivers/xen/core/machine_kexec.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/core/machine_kexec.c	Tue Jan 28 15:00:11 2014 +0100
@@ -186,12 +186,12 @@ static void setup_load_arg(xen_kexec_ima
  */
 int xen_machine_kexec_load(struct kimage *image)
 {
-	xen_kexec_load_t xkl;
+	xen_kexec_load_v1_t xkl;
 
 	memset(&xkl, 0, sizeof(xkl));
 	xkl.type = image->type;
 	setup_load_arg(&xkl.image, image);
-	return HYPERVISOR_kexec_op(KEXEC_CMD_kexec_load, &xkl);
+	return HYPERVISOR_kexec_op(KEXEC_CMD_kexec_load_v1, &xkl);
 }
 
 /*
@@ -202,11 +202,11 @@ int xen_machine_kexec_load(struct kimage
  */
 void xen_machine_kexec_unload(struct kimage *image)
 {
-	xen_kexec_load_t xkl;
+	xen_kexec_load_v1_t xkl;
 
 	memset(&xkl, 0, sizeof(xkl));
 	xkl.type = image->type;
-	WARN_ON(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload, &xkl));
+	WARN_ON(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload_v1, &xkl));
 }
 
 /*
diff -r c5f5087bd3c7 -r ac24179a7875 drivers/xen/evtchn/evtchn.c
--- a/drivers/xen/evtchn/evtchn.c	Tue Jan 28 14:08:04 2014 +0100
+++ b/drivers/xen/evtchn/evtchn.c	Tue Jan 28 15:00:11 2014 +0100
@@ -69,7 +69,7 @@ struct per_user_data {
 };
 
 /* Who's bound to each port? */
-static struct per_user_data *port_user[NR_EVENT_CHANNELS];
+static struct per_user_data *port_user[EVTCHN_2L_NR_CHANNELS];
 static spinlock_t port_user_lock;
 
 void evtchn_device_upcall(int port)
@@ -115,7 +115,7 @@ static void evtchn_check_wrong_delivery(
 
 	spin_lock_irq(&port_user_lock);
 
-	for (port = 0; port < NR_EVENT_CHANNELS; port++)
+	for (port = 0; port < EVTCHN_2L_NR_CHANNELS; port++)
 		if (port_user[port] == u)
 			rebind_evtchn_to_cpu(port, current_cpu);
 
@@ -223,7 +223,7 @@ static ssize_t evtchn_write(struct file 
 
 	spin_lock_irq(&port_user_lock);
 	for (i = 0; i < (count/sizeof(evtchn_port_t)); i++)
-		if ((kbuf[i] < NR_EVENT_CHANNELS) && (port_user[kbuf[i]] == u))
+		if ((kbuf[i] < EVTCHN_2L_NR_CHANNELS) && (port_user[kbuf[i]] == u))
 			unmask_evtchn(kbuf[i]);
 	spin_unlock_irq(&port_user_lock);
 
@@ -338,7 +338,7 @@ static long evtchn_ioctl(struct file *fi
 			break;
 
 		rc = -EINVAL;
-		if (unbind.port >= NR_EVENT_CHANNELS)
+		if (unbind.port >= EVTCHN_2L_NR_CHANNELS)
 			break;
 
 		spin_lock_irq(&port_user_lock);
@@ -370,7 +370,7 @@ static long evtchn_ioctl(struct file *fi
 		if (copy_from_user(&notify, uarg, sizeof(notify)))
 			break;
 
-		if (notify.port >= NR_EVENT_CHANNELS) {
+		if (notify.port >= EVTCHN_2L_NR_CHANNELS) {
 			rc = -EINVAL;
 		} else if (port_user[notify.port] != u) {
 			rc = -ENOTCONN;
@@ -454,7 +454,7 @@ static int evtchn_release(struct inode *
 
 	free_page((unsigned long)u->ring);
 
-	for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+	for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) {
 		int ret;
 		if (port_user[i] != u)
 			continue;
@@ -505,12 +505,12 @@ static int evtchn_cpu_notify(struct noti
 	case CPU_DOWN_PREPARE:
 		cpu_clear(hotcpu, map);
 		spin_lock_irq(&port_user_lock);
-		for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+		for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) {
 			u = port_user[i];
 			if ((u == NULL) || (u->bind_cpu != hotcpu))
 				continue;
 			newcpu = next_bind_cpu(map);
-			for (j = i; j < NR_EVENT_CHANNELS; j++)
+			for (j = i; j < EVTCHN_2L_NR_CHANNELS; j++)
 				if (port_user[j] == u)
 					rebind_evtchn_to_cpu(j, newcpu);
 			u->bind_cpu = newcpu;
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-i386/acpi.h
--- a/include/asm-i386/acpi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-i386/acpi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -161,16 +161,15 @@ extern int acpi_irq_balance_set(char *st
 
 #ifdef CONFIG_XEN
 static inline int acpi_notify_hypervisor_state(u8 sleep_state,
-					       u32 pm1a_cnt_val,
-					       u32 pm1b_cnt_val)
+					       u32 val_a, u32 val_b)
 {
 	struct xen_platform_op op = {
 		.cmd = XENPF_enter_acpi_sleep,
 		.interface_version = XENPF_INTERFACE_VERSION,
 		.u = {
 			.enter_acpi_sleep = {
-				.pm1a_cnt_val = pm1a_cnt_val,
-				.pm1b_cnt_val = pm1b_cnt_val,
+				.val_a = val_a,
+				.val_b = val_b,
 				.sleep_state = sleep_state,
 			},
 		},
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-i386/mach-xen/mach_traps.h
--- a/include/asm-i386/mach-xen/mach_traps.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-i386/mach-xen/mach_traps.h	Tue Jan 28 15:00:11 2014 +0100
@@ -22,7 +22,7 @@ static inline unsigned char get_nmi_reas
 	 */
 	if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
 		reason |= 0x40;
-	if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
+	if (test_bit(_XEN_NMIREASON_pci_serr, &s->arch.nmi_reason))
 		reason |= 0x80;
 
         return reason;
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-x86_64/acpi.h
--- a/include/asm-x86_64/acpi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-x86_64/acpi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -134,16 +134,15 @@ extern int acpi_irq_balance_set(char *st
 
 #ifdef CONFIG_XEN
 static inline int acpi_notify_hypervisor_state(u8 sleep_state,
-					       u32 pm1a_cnt_val,
-					       u32 pm1b_cnt_val)
+					       u32 val_a, u32 val_b)
 {
 	struct xen_platform_op op = {
 		.cmd = XENPF_enter_acpi_sleep,
 		.interface_version = XENPF_INTERFACE_VERSION,
 		.u = {
 			.enter_acpi_sleep = {
-				.pm1a_cnt_val = pm1a_cnt_val,
-				.pm1b_cnt_val = pm1b_cnt_val,
+				.val_a = val_a,
+				.val_b = val_b,
 				.sleep_state = sleep_state,
 			},
 		},
diff -r c5f5087bd3c7 -r ac24179a7875 include/asm-x86_64/mach-xen/asm/nmi.h
--- a/include/asm-x86_64/mach-xen/asm/nmi.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/asm-x86_64/mach-xen/asm/nmi.h	Tue Jan 28 15:00:11 2014 +0100
@@ -62,7 +62,7 @@ static inline unsigned char get_nmi_reas
          */
         if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
                 reason |= 0x40;
-        if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
+        if (test_bit(_XEN_NMIREASON_pci_serr, &s->arch.nmi_reason))
                 reason |= 0x80;
 
         return reason;
diff -r c5f5087bd3c7 -r ac24179a7875 include/xen/gnttab.h
--- a/include/xen/gnttab.h	Tue Jan 28 14:08:04 2014 +0100
+++ b/include/xen/gnttab.h	Tue Jan 28 15:00:11 2014 +0100
@@ -116,7 +116,7 @@ void gnttab_reset_grant_page(struct page
 int gnttab_suspend(void);
 int gnttab_resume(void);
 
-void *arch_gnttab_alloc_shared(unsigned long *frames);
+void *arch_gnttab_alloc_shared(xen_pfn_t *frames);
 
 static inline void
 gnttab_set_map_op(struct gnttab_map_grant_ref *map, maddr_t addr,

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

From xen-changelog-bounces@lists.xen.org Tue Jan 28 20:11:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F00-0006MD-2G; Tue, 28 Jan 2014 20:11: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 1W8Ezy-0006M0-Pv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:07 +0000
Received: from [85.158.143.35:65435] by server-3.bemta-4.messagelabs.com id
	6C/5C-32360-ADE08E25; Tue, 28 Jan 2014 20:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1390939863!1459292!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9306 invoked from network); 28 Jan 2014 20:11:04 -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;
	28 Jan 2014 20:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Ezv-0001mz-Jc
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Ezv-0007cl-8R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:03 +0000
Date: Tue, 28 Jan 2014 20:11:03 +0000
Message-Id: <E1W8Ezv-0007cl-8R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] mini-os: Fix stubdom build failures on
	gcc 4.8
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5fd5df08710fd1daac5d5faecd40cb2520ff52db
Author:     Mike Neilsen <mneilsen@acm.org>
AuthorDate: Wed Jan 22 11:41:11 2014 -0600
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:11:00 2014 +0000

    mini-os: Fix stubdom build failures on gcc 4.8
    
    This is a fix for bug 35:
    http://bugs.xenproject.org/xen/bug/35
    
    This bug report describes several format string mismatches which prevent
    building the stubdom target in Xen 4.3 and Xen 4.4-rc2 on gcc 4.8.  This is a
    copy of Alex Sharp's original patch with the following modifications:
    
    * Andrew Cooper's recommendation applied to extras/mini-os/xenbus/xenbus.c to
      avoid stack corruption
    * Samuel Thibault's recommendation to make "fun" an unsigned int rather than an
      unsigned long in pcifront_physical_to_virtual and related functions
      (extras/mini-os/include/pcifront.h and extras/mini-os/pcifront.c)
    
    Tested on x86_64 gcc Ubuntu/Linaro 4.8.1-10ubuntu9.
    
    Coverity-IDs: 1055807 1055808 1055809 1055810
    Signed-off-by: Mike Neilsen <mneilsen@acm.org>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 extras/mini-os/fbfront.c          |    4 ++--
 extras/mini-os/include/pcifront.h |   12 ++++++------
 extras/mini-os/pcifront.c         |   14 +++++++-------
 extras/mini-os/xenbus/xenbus.c    |    5 +++--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index 1e01513..9cc07b4 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -105,7 +105,7 @@ again:
         free(err);
     }
 
-    err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+    err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
     if (err) {
         message = "writing page-ref";
         goto abort_transaction;
@@ -468,7 +468,7 @@ again:
         free(err);
     }
 
-    err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+    err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
     if (err) {
         message = "writing page-ref";
         goto abort_transaction;
diff --git a/extras/mini-os/include/pcifront.h b/extras/mini-os/include/pcifront.h
index 0a6be8e..1b05963 100644
--- a/extras/mini-os/include/pcifront.h
+++ b/extras/mini-os/include/pcifront.h
@@ -7,23 +7,23 @@ void pcifront_op(struct pcifront_dev *dev, struct xen_pci_op *op);
 void pcifront_scan(struct pcifront_dev *dev, void (*fun)(unsigned int domain, unsigned int bus, unsigned slot, unsigned int fun));
 int pcifront_conf_read(struct pcifront_dev *dev,
                        unsigned int dom,
-                       unsigned int bus, unsigned int slot, unsigned long fun,
+                       unsigned int bus, unsigned int slot, unsigned int fun,
                        unsigned int off, unsigned int size, unsigned int *val);
 int pcifront_conf_write(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun,
+                        unsigned int bus, unsigned int slot, unsigned int fun,
                         unsigned int off, unsigned int size, unsigned int val);
 int pcifront_enable_msi(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun);
+                        unsigned int bus, unsigned int slot, unsigned int fun);
 int pcifront_disable_msi(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun);
+                         unsigned int bus, unsigned int slot, unsigned int fun);
 int pcifront_enable_msix(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun,
+                         unsigned int bus, unsigned int slot, unsigned int fun,
                          struct xen_msix_entry *entries, int n);
 int pcifront_disable_msix(struct pcifront_dev *dev,
                           unsigned int dom,
-                          unsigned int bus, unsigned int slot, unsigned long fun);
+                          unsigned int bus, unsigned int slot, unsigned int fun);
 void shutdown_pcifront(struct pcifront_dev *dev);
diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
index 16a4b49..0fc5b30 100644
--- a/extras/mini-os/pcifront.c
+++ b/extras/mini-os/pcifront.c
@@ -384,7 +384,7 @@ int pcifront_physical_to_virtual (struct pcifront_dev *dev,
                                   unsigned int *dom,
                                   unsigned int *bus,
                                   unsigned int *slot,
-                                  unsigned long *fun)
+                                  unsigned int *fun)
 {
     /* FIXME: the buffer sizing is a little lazy here. 10 extra bytes
        should be enough to hold the paths we need to construct, even
@@ -456,7 +456,7 @@ void pcifront_op(struct pcifront_dev *dev, struct xen_pci_op *op)
 
 int pcifront_conf_read(struct pcifront_dev *dev,
                        unsigned int dom,
-                       unsigned int bus, unsigned int slot, unsigned long fun,
+                       unsigned int bus, unsigned int slot, unsigned int fun,
                        unsigned int off, unsigned int size, unsigned int *val)
 {
     struct xen_pci_op op;
@@ -486,7 +486,7 @@ int pcifront_conf_read(struct pcifront_dev *dev,
 
 int pcifront_conf_write(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun,
+                        unsigned int bus, unsigned int slot, unsigned int fun,
                         unsigned int off, unsigned int size, unsigned int val)
 {
     struct xen_pci_op op;
@@ -513,7 +513,7 @@ int pcifront_conf_write(struct pcifront_dev *dev,
 
 int pcifront_enable_msi(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun)
+                        unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
@@ -538,7 +538,7 @@ int pcifront_enable_msi(struct pcifront_dev *dev,
 
 int pcifront_disable_msi(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun)
+                         unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
@@ -560,7 +560,7 @@ int pcifront_disable_msi(struct pcifront_dev *dev,
 
 int pcifront_enable_msix(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun,
+                         unsigned int bus, unsigned int slot, unsigned int fun,
                          struct xen_msix_entry *entries, int n)
 {
     struct xen_pci_op op;
@@ -595,7 +595,7 @@ int pcifront_enable_msix(struct pcifront_dev *dev,
 
 int pcifront_disable_msix(struct pcifront_dev *dev,
                           unsigned int dom,
-                          unsigned int bus, unsigned int slot, unsigned long fun)
+                          unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c
index ee1691b..c5d9b02 100644
--- a/extras/mini-os/xenbus/xenbus.c
+++ b/extras/mini-os/xenbus/xenbus.c
@@ -15,6 +15,7 @@
  *
  ****************************************************************************
  **/
+#include <inttypes.h>
 #include <mini-os/os.h>
 #include <mini-os/mm.h>
 #include <mini-os/traps.h>
@@ -672,7 +673,7 @@ char *xenbus_transaction_start(xenbus_transaction_t *xbt)
     err = errmsg(rep);
     if (err)
 	return err;
-    sscanf((char *)(rep + 1), "%u", xbt);
+    sscanf((char *)(rep + 1), "%lu", xbt);
     free(rep);
     return NULL;
 }
@@ -769,7 +770,7 @@ domid_t xenbus_get_self_id(void)
     domid_t ret;
 
     BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
-    sscanf(dom_id, "%d", &ret);
+    sscanf(dom_id, "%"SCNd16, &ret);
 
     return 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 Tue Jan 28 20:11:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F00-0006MD-2G; Tue, 28 Jan 2014 20:11: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 1W8Ezy-0006M0-Pv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:07 +0000
Received: from [85.158.143.35:65435] by server-3.bemta-4.messagelabs.com id
	6C/5C-32360-ADE08E25; Tue, 28 Jan 2014 20:11:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1390939863!1459292!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9306 invoked from network); 28 Jan 2014 20:11:04 -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;
	28 Jan 2014 20:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Ezv-0001mz-Jc
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Ezv-0007cl-8R
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:03 +0000
Date: Tue, 28 Jan 2014 20:11:03 +0000
Message-Id: <E1W8Ezv-0007cl-8R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] mini-os: Fix stubdom build failures on
	gcc 4.8
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5fd5df08710fd1daac5d5faecd40cb2520ff52db
Author:     Mike Neilsen <mneilsen@acm.org>
AuthorDate: Wed Jan 22 11:41:11 2014 -0600
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:11:00 2014 +0000

    mini-os: Fix stubdom build failures on gcc 4.8
    
    This is a fix for bug 35:
    http://bugs.xenproject.org/xen/bug/35
    
    This bug report describes several format string mismatches which prevent
    building the stubdom target in Xen 4.3 and Xen 4.4-rc2 on gcc 4.8.  This is a
    copy of Alex Sharp's original patch with the following modifications:
    
    * Andrew Cooper's recommendation applied to extras/mini-os/xenbus/xenbus.c to
      avoid stack corruption
    * Samuel Thibault's recommendation to make "fun" an unsigned int rather than an
      unsigned long in pcifront_physical_to_virtual and related functions
      (extras/mini-os/include/pcifront.h and extras/mini-os/pcifront.c)
    
    Tested on x86_64 gcc Ubuntu/Linaro 4.8.1-10ubuntu9.
    
    Coverity-IDs: 1055807 1055808 1055809 1055810
    Signed-off-by: Mike Neilsen <mneilsen@acm.org>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 extras/mini-os/fbfront.c          |    4 ++--
 extras/mini-os/include/pcifront.h |   12 ++++++------
 extras/mini-os/pcifront.c         |   14 +++++++-------
 extras/mini-os/xenbus/xenbus.c    |    5 +++--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index 1e01513..9cc07b4 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -105,7 +105,7 @@ again:
         free(err);
     }
 
-    err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+    err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
     if (err) {
         message = "writing page-ref";
         goto abort_transaction;
@@ -468,7 +468,7 @@ again:
         free(err);
     }
 
-    err = xenbus_printf(xbt, nodename, "page-ref","%u", virt_to_mfn(s));
+    err = xenbus_printf(xbt, nodename, "page-ref","%lu", virt_to_mfn(s));
     if (err) {
         message = "writing page-ref";
         goto abort_transaction;
diff --git a/extras/mini-os/include/pcifront.h b/extras/mini-os/include/pcifront.h
index 0a6be8e..1b05963 100644
--- a/extras/mini-os/include/pcifront.h
+++ b/extras/mini-os/include/pcifront.h
@@ -7,23 +7,23 @@ void pcifront_op(struct pcifront_dev *dev, struct xen_pci_op *op);
 void pcifront_scan(struct pcifront_dev *dev, void (*fun)(unsigned int domain, unsigned int bus, unsigned slot, unsigned int fun));
 int pcifront_conf_read(struct pcifront_dev *dev,
                        unsigned int dom,
-                       unsigned int bus, unsigned int slot, unsigned long fun,
+                       unsigned int bus, unsigned int slot, unsigned int fun,
                        unsigned int off, unsigned int size, unsigned int *val);
 int pcifront_conf_write(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun,
+                        unsigned int bus, unsigned int slot, unsigned int fun,
                         unsigned int off, unsigned int size, unsigned int val);
 int pcifront_enable_msi(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun);
+                        unsigned int bus, unsigned int slot, unsigned int fun);
 int pcifront_disable_msi(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun);
+                         unsigned int bus, unsigned int slot, unsigned int fun);
 int pcifront_enable_msix(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun,
+                         unsigned int bus, unsigned int slot, unsigned int fun,
                          struct xen_msix_entry *entries, int n);
 int pcifront_disable_msix(struct pcifront_dev *dev,
                           unsigned int dom,
-                          unsigned int bus, unsigned int slot, unsigned long fun);
+                          unsigned int bus, unsigned int slot, unsigned int fun);
 void shutdown_pcifront(struct pcifront_dev *dev);
diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
index 16a4b49..0fc5b30 100644
--- a/extras/mini-os/pcifront.c
+++ b/extras/mini-os/pcifront.c
@@ -384,7 +384,7 @@ int pcifront_physical_to_virtual (struct pcifront_dev *dev,
                                   unsigned int *dom,
                                   unsigned int *bus,
                                   unsigned int *slot,
-                                  unsigned long *fun)
+                                  unsigned int *fun)
 {
     /* FIXME: the buffer sizing is a little lazy here. 10 extra bytes
        should be enough to hold the paths we need to construct, even
@@ -456,7 +456,7 @@ void pcifront_op(struct pcifront_dev *dev, struct xen_pci_op *op)
 
 int pcifront_conf_read(struct pcifront_dev *dev,
                        unsigned int dom,
-                       unsigned int bus, unsigned int slot, unsigned long fun,
+                       unsigned int bus, unsigned int slot, unsigned int fun,
                        unsigned int off, unsigned int size, unsigned int *val)
 {
     struct xen_pci_op op;
@@ -486,7 +486,7 @@ int pcifront_conf_read(struct pcifront_dev *dev,
 
 int pcifront_conf_write(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun,
+                        unsigned int bus, unsigned int slot, unsigned int fun,
                         unsigned int off, unsigned int size, unsigned int val)
 {
     struct xen_pci_op op;
@@ -513,7 +513,7 @@ int pcifront_conf_write(struct pcifront_dev *dev,
 
 int pcifront_enable_msi(struct pcifront_dev *dev,
                         unsigned int dom,
-                        unsigned int bus, unsigned int slot, unsigned long fun)
+                        unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
@@ -538,7 +538,7 @@ int pcifront_enable_msi(struct pcifront_dev *dev,
 
 int pcifront_disable_msi(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun)
+                         unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
@@ -560,7 +560,7 @@ int pcifront_disable_msi(struct pcifront_dev *dev,
 
 int pcifront_enable_msix(struct pcifront_dev *dev,
                          unsigned int dom,
-                         unsigned int bus, unsigned int slot, unsigned long fun,
+                         unsigned int bus, unsigned int slot, unsigned int fun,
                          struct xen_msix_entry *entries, int n)
 {
     struct xen_pci_op op;
@@ -595,7 +595,7 @@ int pcifront_enable_msix(struct pcifront_dev *dev,
 
 int pcifront_disable_msix(struct pcifront_dev *dev,
                           unsigned int dom,
-                          unsigned int bus, unsigned int slot, unsigned long fun)
+                          unsigned int bus, unsigned int slot, unsigned int fun)
 {
     struct xen_pci_op op;
 
diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c
index ee1691b..c5d9b02 100644
--- a/extras/mini-os/xenbus/xenbus.c
+++ b/extras/mini-os/xenbus/xenbus.c
@@ -15,6 +15,7 @@
  *
  ****************************************************************************
  **/
+#include <inttypes.h>
 #include <mini-os/os.h>
 #include <mini-os/mm.h>
 #include <mini-os/traps.h>
@@ -672,7 +673,7 @@ char *xenbus_transaction_start(xenbus_transaction_t *xbt)
     err = errmsg(rep);
     if (err)
 	return err;
-    sscanf((char *)(rep + 1), "%u", xbt);
+    sscanf((char *)(rep + 1), "%lu", xbt);
     free(rep);
     return NULL;
 }
@@ -769,7 +770,7 @@ domid_t xenbus_get_self_id(void)
     domid_t ret;
 
     BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
-    sscanf(dom_id, "%d", &ret);
+    sscanf(dom_id, "%"SCNd16, &ret);
 
     return 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 Tue Jan 28 20:11:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W8F09-0006Nu-5j; Tue, 28 Jan 2014 20:11: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 1W8F08-0006Ne-Dv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:16 +0000
Received: from [85.158.139.211:49002] by server-2.bemta-5.messagelabs.com id
	E7/67-23037-3EE08E25; Tue, 28 Jan 2014 20:11:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1390939874!210358!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25063 invoked from network); 28 Jan 2014 20:11:14 -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;
	28 Jan 2014 20:11: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 1W8F05-0001n5-QC
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F05-0007d9-Mk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:13 +0000
Date: Tue, 28 Jan 2014 20:11:13 +0000
Message-Id: <E1W8F05-0007d9-Mk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc/unlz4: always set an error
	return code on failures
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cbe6ab84f6dbf68a5c79cb70e09f5c3a8f77b9e1
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Fri Jan 24 08:01:21 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:13:07 2014 +0000

    libxc/unlz4: always set an error return code on failures
    
    "ret", being set to -1 early on, gets cleared by the first invocation
    of lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence
    subsequent failures wouldn't be noticed by the caller without setting
    it back to -1 right after those calls.
    
    Linux commit: 2a1d689c9ba42a6066540fb221b6ecbd6298b728
    
    Reported-by: Matthew Daley <mattjd@gmail.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_dom_decompress_lz4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xc_dom_decompress_lz4.c
index 4787535..08272fe 100644
--- a/tools/libxc/xc_dom_decompress_lz4.c
+++ b/tools/libxc/xc_dom_decompress_lz4.c
@@ -98,6 +98,7 @@ int xc_try_lz4_decode(
 			goto exit_2;
 		}
 
+		ret = -1;
 		outp += dest_len;
 		size -= chunksize;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W8F09-0006Nu-5j; Tue, 28 Jan 2014 20:11: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 1W8F08-0006Ne-Dv
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:16 +0000
Received: from [85.158.139.211:49002] by server-2.bemta-5.messagelabs.com id
	E7/67-23037-3EE08E25; Tue, 28 Jan 2014 20:11:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1390939874!210358!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25063 invoked from network); 28 Jan 2014 20:11:14 -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;
	28 Jan 2014 20:11: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 1W8F05-0001n5-QC
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F05-0007d9-Mk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:13 +0000
Date: Tue, 28 Jan 2014 20:11:13 +0000
Message-Id: <E1W8F05-0007d9-Mk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc/unlz4: always set an error
	return code on failures
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cbe6ab84f6dbf68a5c79cb70e09f5c3a8f77b9e1
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Fri Jan 24 08:01:21 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:13:07 2014 +0000

    libxc/unlz4: always set an error return code on failures
    
    "ret", being set to -1 early on, gets cleared by the first invocation
    of lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence
    subsequent failures wouldn't be noticed by the caller without setting
    it back to -1 right after those calls.
    
    Linux commit: 2a1d689c9ba42a6066540fb221b6ecbd6298b728
    
    Reported-by: Matthew Daley <mattjd@gmail.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_dom_decompress_lz4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xc_dom_decompress_lz4.c
index 4787535..08272fe 100644
--- a/tools/libxc/xc_dom_decompress_lz4.c
+++ b/tools/libxc/xc_dom_decompress_lz4.c
@@ -98,6 +98,7 @@ int xc_try_lz4_decode(
 			goto exit_2;
 		}
 
+		ret = -1;
 		outp += dest_len;
 		size -= chunksize;
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W8F0K-0006Pi-8e; Tue, 28 Jan 2014 20:11: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 1W8F0I-0006PR-Lk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:26 +0000
Received: from [85.158.139.211:49462] by server-9.bemta-5.messagelabs.com id
	0C/D9-15098-DEE08E25; Tue, 28 Jan 2014 20:11:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390939884!215988!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9664 invoked from network); 28 Jan 2014 20:11:25 -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;
	28 Jan 2014 20: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 1W8F0G-0001nB-3k
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0F-0007dV-Uy
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:23 +0000
Date: Tue, 28 Jan 2014 20:11:23 +0000
Message-Id: <E1W8F0F-0007dV-Uy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: platforms: Adding reset
	support for xgene arm64 platform.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b88641348817bb9039ad81259681064ec4bfdb09
Author:     Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
AuthorDate: Mon Jan 27 17:04:48 2014 +0530
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:17:52 2014 +0000

    xen: arm: platforms: Adding reset support for xgene arm64 platform.
    
    This patch adds a reset support for xgene arm64 platform.
    
    Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
    Signed-off-by: Anup Patel <anup.patel@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/platforms/xgene-storm.c |   72 ++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c
index 5b0bd5f..4fc185b 100644
--- a/xen/arch/arm/platforms/xgene-storm.c
+++ b/xen/arch/arm/platforms/xgene-storm.c
@@ -20,8 +20,16 @@
 
 #include <xen/config.h>
 #include <asm/platform.h>
+#include <xen/stdbool.h>
+#include <xen/vmap.h>
+#include <asm/io.h>
 #include <asm/gic.h>
 
+/* Variables to save reset address of soc during platform initialization. */
+static u64 reset_addr, reset_size;
+static u32 reset_mask;
+static bool reset_vals_valid = false;
+
 static uint32_t xgene_storm_quirks(void)
 {
     return PLATFORM_QUIRK_GIC_64K_STRIDE;
@@ -107,6 +115,68 @@ err:
     return ret;
 }
 
+static void xgene_storm_reset(void)
+{
+    void __iomem *addr;
+
+    if ( !reset_vals_valid )
+    {
+        printk("XGENE: Invalid reset values, can not reset XGENE...\n");
+        return;
+    }
+
+    addr = ioremap_nocache(reset_addr, reset_size);
+
+    if ( !addr )
+    {
+        printk("XGENE: Unable to map xgene reset address, can not reset XGENE...\n");
+        return;
+    }
+
+    /* Write reset mask to base address */
+    writel(reset_mask, addr);
+
+    iounmap(addr);
+}
+
+static int xgene_storm_init(void)
+{
+    static const struct dt_device_match reset_ids[] __initconst =
+    {
+        DT_MATCH_COMPATIBLE("apm,xgene-reboot"),
+        {},
+    };
+    struct dt_device_node *dev;
+    int res;
+
+    dev = dt_find_matching_node(NULL, reset_ids);
+    if ( !dev )
+    {
+        printk("XGENE: Unable to find a compatible reset node in the device tree");
+        return 0;
+    }
+
+    dt_device_set_used_by(dev, DOMID_XEN);
+
+    /* Retrieve base address and size */
+    res = dt_device_get_address(dev, 0, &reset_addr, &reset_size);
+    if ( res )
+    {
+        printk("XGENE: Unable to retrieve the base address for reset\n");
+        return 0;
+    }
+
+    /* Get reset mask */
+    res = dt_property_read_u32(dev, "mask", &reset_mask);
+    if ( !res )
+    {
+        printk("XGENE: Unable to retrieve the reset mask\n");
+        return 0;
+    }
+
+    reset_vals_valid = true;
+    return 0;
+}
 
 static const char * const xgene_storm_dt_compat[] __initconst =
 {
@@ -116,6 +186,8 @@ static const char * const xgene_storm_dt_compat[] __initconst =
 
 PLATFORM_START(xgene_storm, "APM X-GENE STORM")
     .compatible = xgene_storm_dt_compat,
+    .init = xgene_storm_init,
+    .reset = xgene_storm_reset,
     .quirks = xgene_storm_quirks,
     .specific_mapping = xgene_storm_specific_mapping,
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1W8F0K-0006Pi-8e; Tue, 28 Jan 2014 20:11: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 1W8F0I-0006PR-Lk
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:26 +0000
Received: from [85.158.139.211:49462] by server-9.bemta-5.messagelabs.com id
	0C/D9-15098-DEE08E25; Tue, 28 Jan 2014 20:11:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390939884!215988!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9664 invoked from network); 28 Jan 2014 20:11:25 -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;
	28 Jan 2014 20: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 1W8F0G-0001nB-3k
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0F-0007dV-Uy
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:23 +0000
Date: Tue, 28 Jan 2014 20:11:23 +0000
Message-Id: <E1W8F0F-0007dV-Uy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: platforms: Adding reset
	support for xgene arm64 platform.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b88641348817bb9039ad81259681064ec4bfdb09
Author:     Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
AuthorDate: Mon Jan 27 17:04:48 2014 +0530
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:17:52 2014 +0000

    xen: arm: platforms: Adding reset support for xgene arm64 platform.
    
    This patch adds a reset support for xgene arm64 platform.
    
    Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
    Signed-off-by: Anup Patel <anup.patel@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/platforms/xgene-storm.c |   72 ++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c
index 5b0bd5f..4fc185b 100644
--- a/xen/arch/arm/platforms/xgene-storm.c
+++ b/xen/arch/arm/platforms/xgene-storm.c
@@ -20,8 +20,16 @@
 
 #include <xen/config.h>
 #include <asm/platform.h>
+#include <xen/stdbool.h>
+#include <xen/vmap.h>
+#include <asm/io.h>
 #include <asm/gic.h>
 
+/* Variables to save reset address of soc during platform initialization. */
+static u64 reset_addr, reset_size;
+static u32 reset_mask;
+static bool reset_vals_valid = false;
+
 static uint32_t xgene_storm_quirks(void)
 {
     return PLATFORM_QUIRK_GIC_64K_STRIDE;
@@ -107,6 +115,68 @@ err:
     return ret;
 }
 
+static void xgene_storm_reset(void)
+{
+    void __iomem *addr;
+
+    if ( !reset_vals_valid )
+    {
+        printk("XGENE: Invalid reset values, can not reset XGENE...\n");
+        return;
+    }
+
+    addr = ioremap_nocache(reset_addr, reset_size);
+
+    if ( !addr )
+    {
+        printk("XGENE: Unable to map xgene reset address, can not reset XGENE...\n");
+        return;
+    }
+
+    /* Write reset mask to base address */
+    writel(reset_mask, addr);
+
+    iounmap(addr);
+}
+
+static int xgene_storm_init(void)
+{
+    static const struct dt_device_match reset_ids[] __initconst =
+    {
+        DT_MATCH_COMPATIBLE("apm,xgene-reboot"),
+        {},
+    };
+    struct dt_device_node *dev;
+    int res;
+
+    dev = dt_find_matching_node(NULL, reset_ids);
+    if ( !dev )
+    {
+        printk("XGENE: Unable to find a compatible reset node in the device tree");
+        return 0;
+    }
+
+    dt_device_set_used_by(dev, DOMID_XEN);
+
+    /* Retrieve base address and size */
+    res = dt_device_get_address(dev, 0, &reset_addr, &reset_size);
+    if ( res )
+    {
+        printk("XGENE: Unable to retrieve the base address for reset\n");
+        return 0;
+    }
+
+    /* Get reset mask */
+    res = dt_property_read_u32(dev, "mask", &reset_mask);
+    if ( !res )
+    {
+        printk("XGENE: Unable to retrieve the reset mask\n");
+        return 0;
+    }
+
+    reset_vals_valid = true;
+    return 0;
+}
 
 static const char * const xgene_storm_dt_compat[] __initconst =
 {
@@ -116,6 +186,8 @@ static const char * const xgene_storm_dt_compat[] __initconst =
 
 PLATFORM_START(xgene_storm, "APM X-GENE STORM")
     .compatible = xgene_storm_dt_compat,
+    .init = xgene_storm_init,
+    .reset = xgene_storm_reset,
     .quirks = xgene_storm_quirks,
     .specific_mapping = xgene_storm_specific_mapping,
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20: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 1W8F0V-0006S9-G3; Tue, 28 Jan 2014 20: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 1W8F0U-0006Rg-90
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:38 +0000
Received: from [85.158.137.68:6296] by server-13.bemta-3.messagelabs.com id
	97/67-28603-8FE08E25; Tue, 28 Jan 2014 20:11:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1390939894!11900358!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28751 invoked from network); 28 Jan 2014 20:11:35 -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;
	28 Jan 2014 20: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 1W8F0Q-0001nJ-FW
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0Q-0007dv-7O
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:34 +0000
Date: Tue, 28 Jan 2014 20:11:34 +0000
Message-Id: <E1W8F0Q-0007dv-7O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/hotplug: fix bug on xendomains
	using xl
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d3b483f9776fbae19a2354a2a3c81536fcbdd37a
Author:     Fabio Fantoni <fabio.fantoni@m2r.biz>
AuthorDate: Tue Jan 21 14:51:08 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:18:30 2014 +0000

    tools/hotplug: fix bug on xendomains using xl
    
    Make rdname function work with xl.
    
    The rdname function not support json output of xl commands and this cause
    problems using xl, for example the check if domUs are already running (because
    they have been restored) on domUs autostart does not succeed and the domain is
    created in any case, causing xl create to fail.
    
    Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/hotplug/Linux/init.d/xendomains |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/hotplug/Linux/init.d/xendomains b/tools/hotplug/Linux/init.d/xendomains
index 38371af..59f1e3d 100644
--- a/tools/hotplug/Linux/init.d/xendomains
+++ b/tools/hotplug/Linux/init.d/xendomains
@@ -186,7 +186,7 @@ contains_something()
 rdname()
 {
     NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-         sed -n 's/^.*(name \(.*\))$/\1/p')
+         sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
 }
 
 rdnames()
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20: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 1W8F0V-0006S9-G3; Tue, 28 Jan 2014 20: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 1W8F0U-0006Rg-90
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:38 +0000
Received: from [85.158.137.68:6296] by server-13.bemta-3.messagelabs.com id
	97/67-28603-8FE08E25; Tue, 28 Jan 2014 20:11:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1390939894!11900358!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28751 invoked from network); 28 Jan 2014 20:11:35 -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;
	28 Jan 2014 20: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 1W8F0Q-0001nJ-FW
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0Q-0007dv-7O
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:34 +0000
Date: Tue, 28 Jan 2014 20:11:34 +0000
Message-Id: <E1W8F0Q-0007dv-7O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/hotplug: fix bug on xendomains
	using xl
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d3b483f9776fbae19a2354a2a3c81536fcbdd37a
Author:     Fabio Fantoni <fabio.fantoni@m2r.biz>
AuthorDate: Tue Jan 21 14:51:08 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:18:30 2014 +0000

    tools/hotplug: fix bug on xendomains using xl
    
    Make rdname function work with xl.
    
    The rdname function not support json output of xl commands and this cause
    problems using xl, for example the check if domUs are already running (because
    they have been restored) on domUs autostart does not succeed and the domain is
    created in any case, causing xl create to fail.
    
    Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/hotplug/Linux/init.d/xendomains |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/hotplug/Linux/init.d/xendomains b/tools/hotplug/Linux/init.d/xendomains
index 38371af..59f1e3d 100644
--- a/tools/hotplug/Linux/init.d/xendomains
+++ b/tools/hotplug/Linux/init.d/xendomains
@@ -186,7 +186,7 @@ contains_something()
 rdname()
 {
     NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-         sed -n 's/^.*(name \(.*\))$/\1/p')
+         sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
 }
 
 rdnames()
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F0e-0006UP-J6; Tue, 28 Jan 2014 20:11: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 1W8F0d-0006U4-DK
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:47 +0000
Received: from [85.158.143.35:7754] by server-1.bemta-4.messagelabs.com id
	25/22-02132-20F08E25; Tue, 28 Jan 2014 20:11:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390939904!1445736!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23627 invoked from network); 28 Jan 2014 20:11:45 -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;
	28 Jan 2014 20: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 1W8F0a-0001nT-K9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0a-0007eH-J3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:44 +0000
Date: Tue, 28 Jan 2014 20:11:44 +0000
Message-Id: <E1W8F0a-0007eH-J3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: events: Pass correct nfds to
	poll
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4b01bd9d3e4d9933d282ad2a36da9cc110a4a1a9
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:48 2014 +0000

    libxl: events: Pass correct nfds to poll
    
    libxl_event.c:eventloop_iteration would pass the allocated pollfds
    array size, rather than the used size, to poll (and to
    afterpoll_internal).
    
    The effect is that if the number of fds to poll on reduces, libxl will
    poll on stale entries.  Because of the way the return value from poll
    is processed these stale entries are often harmless because any events
    coming back from poll ignored by libxl.  However, it could cause
    malfunctions:
    
    It could result in unwanted SIGTTIN/SIGTTOU/SIGPIPE, for example, if
    the fd has been reused to refer to an object which can generate those
    signals.  Alternatively, it could result in libxl spinning if the
    stale entry refers to an fd which happens now to be ready for the
    previously-requested operation.
    
    I have tested this with a localhost migration and inspected the strace
    output.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Jim Fehlig <jfehlig@suse.com>
    Cc: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/libxl/libxl_event.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index bdef7ac..1c48fee 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -1386,7 +1386,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
      * can unlock it when it polls.
      */
     EGC_GC;
-    int rc;
+    int rc, nfds;
     struct timeval now;
     
     rc = libxl__gettimeofday(gc, &now);
@@ -1395,7 +1395,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     int timeout;
 
     for (;;) {
-        int nfds = poller->fd_polls_allocd;
+        nfds = poller->fd_polls_allocd;
         timeout = -1;
         rc = beforepoll_internal(gc, poller, &nfds, poller->fd_polls,
                                  &timeout, now);
@@ -1413,7 +1413,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     }
 
     CTX_UNLOCK;
-    rc = poll(poller->fd_polls, poller->fd_polls_allocd, timeout);
+    rc = poll(poller->fd_polls, nfds, timeout);
     CTX_LOCK;
 
     if (rc < 0) {
@@ -1428,8 +1428,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     rc = libxl__gettimeofday(gc, &now);
     if (rc) goto out;
 
-    afterpoll_internal(egc, poller,
-                       poller->fd_polls_allocd, poller->fd_polls, now);
+    afterpoll_internal(egc, poller, nfds, poller->fd_polls, now);
 
     rc = 0;
  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 Tue Jan 28 20:11:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F0e-0006UP-J6; Tue, 28 Jan 2014 20:11: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 1W8F0d-0006U4-DK
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:47 +0000
Received: from [85.158.143.35:7754] by server-1.bemta-4.messagelabs.com id
	25/22-02132-20F08E25; Tue, 28 Jan 2014 20:11:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1390939904!1445736!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23627 invoked from network); 28 Jan 2014 20:11:45 -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;
	28 Jan 2014 20: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 1W8F0a-0001nT-K9
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0a-0007eH-J3
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:44 +0000
Date: Tue, 28 Jan 2014 20:11:44 +0000
Message-Id: <E1W8F0a-0007eH-J3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: events: Pass correct nfds to
	poll
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4b01bd9d3e4d9933d282ad2a36da9cc110a4a1a9
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:48 2014 +0000

    libxl: events: Pass correct nfds to poll
    
    libxl_event.c:eventloop_iteration would pass the allocated pollfds
    array size, rather than the used size, to poll (and to
    afterpoll_internal).
    
    The effect is that if the number of fds to poll on reduces, libxl will
    poll on stale entries.  Because of the way the return value from poll
    is processed these stale entries are often harmless because any events
    coming back from poll ignored by libxl.  However, it could cause
    malfunctions:
    
    It could result in unwanted SIGTTIN/SIGTTOU/SIGPIPE, for example, if
    the fd has been reused to refer to an object which can generate those
    signals.  Alternatively, it could result in libxl spinning if the
    stale entry refers to an fd which happens now to be ready for the
    previously-requested operation.
    
    I have tested this with a localhost migration and inspected the strace
    output.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Jim Fehlig <jfehlig@suse.com>
    Cc: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/libxl/libxl_event.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index bdef7ac..1c48fee 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -1386,7 +1386,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
      * can unlock it when it polls.
      */
     EGC_GC;
-    int rc;
+    int rc, nfds;
     struct timeval now;
     
     rc = libxl__gettimeofday(gc, &now);
@@ -1395,7 +1395,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     int timeout;
 
     for (;;) {
-        int nfds = poller->fd_polls_allocd;
+        nfds = poller->fd_polls_allocd;
         timeout = -1;
         rc = beforepoll_internal(gc, poller, &nfds, poller->fd_polls,
                                  &timeout, now);
@@ -1413,7 +1413,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     }
 
     CTX_UNLOCK;
-    rc = poll(poller->fd_polls, poller->fd_polls_allocd, timeout);
+    rc = poll(poller->fd_polls, nfds, timeout);
     CTX_LOCK;
 
     if (rc < 0) {
@@ -1428,8 +1428,7 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) {
     rc = libxl__gettimeofday(gc, &now);
     if (rc) goto out;
 
-    afterpoll_internal(egc, poller,
-                       poller->fd_polls_allocd, poller->fd_polls, now);
+    afterpoll_internal(egc, poller, nfds, poller->fd_polls, now);
 
     rc = 0;
  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 Tue Jan 28 20:11:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F0o-0006Wg-M3; Tue, 28 Jan 2014 20:11: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 1W8F0n-0006WN-Lf
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:57 +0000
Received: from [85.158.137.68:25502] by server-16.bemta-3.messagelabs.com id
	FD/23-26128-C0F08E25; Tue, 28 Jan 2014 20:11:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390939915!11889247!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21390 invoked from network); 28 Jan 2014 20:11:56 -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;
	28 Jan 2014 20:11: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 1W8F0k-0001nc-QC
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0k-0007f9-OU
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:54 +0000
Date: Tue, 28 Jan 2014 20:11:54 +0000
Message-Id: <E1W8F0k-0007f9-OU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: Free optdata_begin when saving
	domain config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5561194ed953c88d6238b1135dcad6c69fa0accb
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:30 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:49 2014 +0000

    xl: Free optdata_begin when saving domain config
    
    This makes valgrind a bit happier.
    
    It is also
    Coverity-CID: 1055903
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index d93e01b..aff6f90 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3442,6 +3442,8 @@ static void save_domain_core_writeconfig(int fd, const char *source,
                      ctx, fd, optdata_begin, hdr.optional_data_len,
                      source, "header"));
 
+    free(optdata_begin);
+
     fprintf(stderr, "Saving to %s new xl format (info"
             " 0x%"PRIx32"/0x%"PRIx32"/%"PRIu32")\n",
             source, hdr.mandatory_flags, hdr.optional_flags,
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:11:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:11: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 1W8F0o-0006Wg-M3; Tue, 28 Jan 2014 20:11: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 1W8F0n-0006WN-Lf
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:57 +0000
Received: from [85.158.137.68:25502] by server-16.bemta-3.messagelabs.com id
	FD/23-26128-C0F08E25; Tue, 28 Jan 2014 20:11:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1390939915!11889247!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21390 invoked from network); 28 Jan 2014 20:11:56 -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;
	28 Jan 2014 20:11: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 1W8F0k-0001nc-QC
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0k-0007f9-OU
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:11:54 +0000
Date: Tue, 28 Jan 2014 20:11:54 +0000
Message-Id: <E1W8F0k-0007f9-OU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xl: Free optdata_begin when saving
	domain config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 5561194ed953c88d6238b1135dcad6c69fa0accb
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:30 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:49 2014 +0000

    xl: Free optdata_begin when saving domain config
    
    This makes valgrind a bit happier.
    
    It is also
    Coverity-CID: 1055903
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Cc: Ian Campbell <Ian.Campbell@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index d93e01b..aff6f90 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3442,6 +3442,8 @@ static void save_domain_core_writeconfig(int fd, const char *source,
                      ctx, fd, optdata_begin, hdr.optional_data_len,
                      source, "header"));
 
+    free(optdata_begin);
+
     fprintf(stderr, "Saving to %s new xl format (info"
             " 0x%"PRIx32"/0x%"PRIx32"/%"PRIu32")\n",
             source, hdr.mandatory_flags, hdr.optional_flags,
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:12:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:12: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 1W8F10-0006ZG-PX; Tue, 28 Jan 2014 20:12:10 +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 1W8F0y-0006Yf-WD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:09 +0000
Received: from [85.158.139.211:5700] by server-12.bemta-5.messagelabs.com id
	E0/3B-30017-61F08E25; Tue, 28 Jan 2014 20:12:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390939925!214235!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15730 invoked from network); 28 Jan 2014 20:12:06 -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;
	28 Jan 2014 20: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 1W8F0u-0001oB-Vu
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0u-0007ff-UE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:04 +0000
Date: Tue, 28 Jan 2014 20:12:04 +0000
Message-Id: <E1W8F0u-0007ff-UE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenstore: xs_suspend_evtchn_port:
	always free portstr
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 21b73527fb9615012b7d386357d31ff66b629cb8
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:31 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:49 2014 +0000

    xenstore: xs_suspend_evtchn_port: always free portstr
    
    If portstr!=NULL but plen==0 this function would leak portstr.
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/xenstore/xs.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index a636498..dd03a85 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1095,12 +1095,15 @@ int xs_suspend_evtchn_port(int domid)
     portstr = xs_read(xs, XBT_NULL, path, &plen);
     xs_daemon_close(xs);
 
-    if (!portstr || !plen)
-        return -1;
+    if (!portstr || !plen) {
+        port = -1;
+        goto out;
+    }
 
     port = atoi(portstr);
-    free(portstr);
 
+out:
+    free(portstr);
     return port;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:12:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:12: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 1W8F10-0006ZG-PX; Tue, 28 Jan 2014 20:12:10 +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 1W8F0y-0006Yf-WD
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:09 +0000
Received: from [85.158.139.211:5700] by server-12.bemta-5.messagelabs.com id
	E0/3B-30017-61F08E25; Tue, 28 Jan 2014 20:12:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390939925!214235!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15730 invoked from network); 28 Jan 2014 20:12:06 -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;
	28 Jan 2014 20: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 1W8F0u-0001oB-Vu
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F0u-0007ff-UE
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:04 +0000
Date: Tue, 28 Jan 2014 20:12:04 +0000
Message-Id: <E1W8F0u-0007ff-UE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenstore: xs_suspend_evtchn_port:
	always free portstr
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 21b73527fb9615012b7d386357d31ff66b629cb8
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Jan 21 18:45:31 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:21:49 2014 +0000

    xenstore: xs_suspend_evtchn_port: always free portstr
    
    If portstr!=NULL but plen==0 this function would leak portstr.
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
 tools/xenstore/xs.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index a636498..dd03a85 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -1095,12 +1095,15 @@ int xs_suspend_evtchn_port(int domid)
     portstr = xs_read(xs, XBT_NULL, path, &plen);
     xs_daemon_close(xs);
 
-    if (!portstr || !plen)
-        return -1;
+    if (!portstr || !plen) {
+        port = -1;
+        goto out;
+    }
 
     port = atoi(portstr);
-    free(portstr);
 
+out:
+    free(portstr);
     return port;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:12:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:12: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 1W8F18-0006b4-SL; Tue, 28 Jan 2014 20:12: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 1W8F17-0006ak-IY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:17 +0000
Received: from [85.158.143.35:57387] by server-2.bemta-4.messagelabs.com id
	5F/6B-11386-02F08E25; Tue, 28 Jan 2014 20:12:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390939935!1462194!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20464 invoked from network); 28 Jan 2014 20:12:16 -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;
	28 Jan 2014 20: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 1W8F15-0001oH-4m
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F15-0007g3-3K
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:15 +0000
Date: Tue, 28 Jan 2014 20:12:15 +0000
Message-Id: <E1W8F15-0007g3-3K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] minios: Correct HYPERVISOR_physdev_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 3c80caee183124b2a0d1f7e0dae062fd794d6321
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 24 18:28:11 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:24:53 2014 +0000

    minios: Correct HYPERVISOR_physdev_op()
    
    A physdev_op is a two argument hypercall, taking a command parameter and an
    optional pointer to a structure.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../mini-os/include/x86/x86_32/hypercall-x86_32.h  |    4 ++--
 .../mini-os/include/x86/x86_64/hypercall-x86_64.h  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
index ef52ecd..dcfbe41 100644
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
@@ -255,9 +255,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
index 513d74e..7083763 100644
--- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
+++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
@@ -256,9 +256,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 20:12:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 20:12: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 1W8F18-0006b4-SL; Tue, 28 Jan 2014 20:12: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 1W8F17-0006ak-IY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:17 +0000
Received: from [85.158.143.35:57387] by server-2.bemta-4.messagelabs.com id
	5F/6B-11386-02F08E25; Tue, 28 Jan 2014 20:12:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1390939935!1462194!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20464 invoked from network); 28 Jan 2014 20:12:16 -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;
	28 Jan 2014 20: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 1W8F15-0001oH-4m
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8F15-0007g3-3K
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 20:12:15 +0000
Date: Tue, 28 Jan 2014 20:12:15 +0000
Message-Id: <E1W8F15-0007g3-3K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] minios: Correct HYPERVISOR_physdev_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 3c80caee183124b2a0d1f7e0dae062fd794d6321
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jan 24 18:28:11 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Jan 28 11:24:53 2014 +0000

    minios: Correct HYPERVISOR_physdev_op()
    
    A physdev_op is a two argument hypercall, taking a command parameter and an
    optional pointer to a structure.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../mini-os/include/x86/x86_32/hypercall-x86_32.h  |    4 ++--
 .../mini-os/include/x86/x86_64/hypercall-x86_64.h  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
index ef52ecd..dcfbe41 100644
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
@@ -255,9 +255,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
index 513d74e..7083763 100644
--- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
+++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
@@ -256,9 +256,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 28 21:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 21:33: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 1W8GHK-0001EX-S1; Tue, 28 Jan 2014 21:33:06 +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 1W8GHJ-0001EQ-PT
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:05 +0000
Received: from [85.158.139.211:64302] by server-11.bemta-5.messagelabs.com id
	89/E7-23886-11228E25; Tue, 28 Jan 2014 21:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390944783!223217!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7452 invoked from network); 28 Jan 2014 21:33:04 -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;
	28 Jan 2014 21:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8GHH-0002mT-0G
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8GHG-0001YN-OY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:02 +0000
Date: Tue, 28 Jan 2014 21:33:02 +0000
Message-Id: <E1W8GHG-0001YN-OY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] update Xen version to 4.2.4-rc1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b06c0fd1e6be40843084442ebdb377b16f110602
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 28 15:52:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 28 15:52:53 2014 +0100

    update Xen version to 4.2.4-rc1
---
 Config.mk    |    4 ++--
 xen/Makefile |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 638b1f5..c7a3de5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -203,7 +203,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-4.2-testing.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.2.3
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.2.4-rc1
 SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 # Sun Mar 11 09:27:07 2012 -0400
 # Update version to 1.6.3.2
@@ -215,7 +215,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 8d7e96f625c4a58d721db413b032fd0bb5671b96
+QEMU_TAG ?= xen-4.2.4-rc1
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 2c1c7ee..ce1d0ae 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc1$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
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 Jan 28 21:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Jan 2014 21:33: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 1W8GHK-0001EX-S1; Tue, 28 Jan 2014 21:33:06 +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 1W8GHJ-0001EQ-PT
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:05 +0000
Received: from [85.158.139.211:64302] by server-11.bemta-5.messagelabs.com id
	89/E7-23886-11228E25; Tue, 28 Jan 2014 21:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1390944783!223217!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7452 invoked from network); 28 Jan 2014 21:33:04 -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;
	28 Jan 2014 21:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8GHH-0002mT-0G
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8GHG-0001YN-OY
	for xen-changelog@lists.xensource.com; Tue, 28 Jan 2014 21:33:02 +0000
Date: Tue, 28 Jan 2014 21:33:02 +0000
Message-Id: <E1W8GHG-0001YN-OY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] update Xen version to 4.2.4-rc1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit b06c0fd1e6be40843084442ebdb377b16f110602
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 28 15:52:53 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 28 15:52:53 2014 +0100

    update Xen version to 4.2.4-rc1
---
 Config.mk    |    4 ++--
 xen/Makefile |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 638b1f5..c7a3de5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -203,7 +203,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-4.2-testing.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.2.3
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.2.4-rc1
 SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 # Sun Mar 11 09:27:07 2012 -0400
 # Update version to 1.6.3.2
@@ -215,7 +215,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 8d7e96f625c4a58d721db413b032fd0bb5671b96
+QEMU_TAG ?= xen-4.2.4-rc1
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 2c1c7ee..ce1d0ae 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc1$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
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 Jan 29 07:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 29 Jan 2014 07:33: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 1W8Pdz-0000S7-K9; Wed, 29 Jan 2014 07:33: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 1W8Pdy-0000S0-AO
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:06 +0000
Received: from [85.158.139.211:29787] by server-2.bemta-5.messagelabs.com id
	8D/9B-23037-1BEA8E25; Wed, 29 Jan 2014 07:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390980783!281609!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29429 invoked from network); 29 Jan 2014 07:33:04 -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;
	29 Jan 2014 07:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Pdv-00082K-49
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Pdu-0002ES-Vm
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:03 +0000
Date: Wed, 29 Jan 2014 07:33:02 +0000
Message-Id: <E1W8Pdu-0002ES-Vm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] update Xen version to 4.3.2-rc1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0ac5c121734c5055ba2b500b7f515a71800c7b20
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 28 15:51:06 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 28 15:51:06 2014 +0100

    update Xen version to 4.3.2-rc1
---
 Config.mk    |    4 ++--
 xen/Makefile |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 820753c..83fb486 100644
--- a/Config.mk
+++ b/Config.mk
@@ -212,7 +212,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-4.3-testing.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.3.1
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.3.2-rc1
 SEABIOS_UPSTREAM_TAG ?= 3a28511b46f0c2af5fae1b6ed2b0c19d7913cee3
 # Wed Jun 26 16:30:45 2013 +0100
 # xen: Don't perform SMP setup.
@@ -224,7 +224,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 044c9e608e67defea4fc9c9ef4286e85a99d68c2
+QEMU_TAG ?= xen-4.3.2-rc1
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 8a11b41..2a5e78f 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 3
-export XEN_EXTRAVERSION ?= .2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .2-rc1$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
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 Jan 29 07:33:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 29 Jan 2014 07:33: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 1W8Pdz-0000S7-K9; Wed, 29 Jan 2014 07:33: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 1W8Pdy-0000S0-AO
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:06 +0000
Received: from [85.158.139.211:29787] by server-2.bemta-5.messagelabs.com id
	8D/9B-23037-1BEA8E25; Wed, 29 Jan 2014 07:33:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1390980783!281609!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29429 invoked from network); 29 Jan 2014 07:33:04 -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;
	29 Jan 2014 07:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Pdv-00082K-49
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W8Pdu-0002ES-Vm
	for xen-changelog@lists.xensource.com; Wed, 29 Jan 2014 07:33:03 +0000
Date: Wed, 29 Jan 2014 07:33:02 +0000
Message-Id: <E1W8Pdu-0002ES-Vm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] update Xen version to 4.3.2-rc1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 0ac5c121734c5055ba2b500b7f515a71800c7b20
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Jan 28 15:51:06 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Jan 28 15:51:06 2014 +0100

    update Xen version to 4.3.2-rc1
---
 Config.mk    |    4 ++--
 xen/Makefile |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 820753c..83fb486 100644
--- a/Config.mk
+++ b/Config.mk
@@ -212,7 +212,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-4.3-testing.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.3.1
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.3.2-rc1
 SEABIOS_UPSTREAM_TAG ?= 3a28511b46f0c2af5fae1b6ed2b0c19d7913cee3
 # Wed Jun 26 16:30:45 2013 +0100
 # xen: Don't perform SMP setup.
@@ -224,7 +224,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 044c9e608e67defea4fc9c9ef4286e85a99d68c2
+QEMU_TAG ?= xen-4.3.2-rc1
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
diff --git a/xen/Makefile b/xen/Makefile
index 8a11b41..2a5e78f 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 3
-export XEN_EXTRAVERSION ?= .2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .2-rc1$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
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 Fri Jan 31 11:22:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Jan 2014 11:22: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 1W9CAl-0004pK-9N; Fri, 31 Jan 2014 11:22:11 +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 1W9CAk-0004pF-DR
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:10 +0000
Received: from [85.158.137.68:38442] by server-3.bemta-3.messagelabs.com id
	24/30-14520-1678BE25; Fri, 31 Jan 2014 11:22:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1391167322!12537924!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10384 invoked from network); 31 Jan 2014 11:22:04 -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;
	31 Jan 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 1W9CAc-0007W9-KO
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W9CAc-0007Ly-Fj
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:02 +0000
Date: Fri, 31 Jan 2014 11:22:02 +0000
Message-Id: <E1W9CAc-0007Ly-Fj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Update QEMU_TAG and
	QEMU_UPSTREAM_REVISION for 4.4.0-rc3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a731bb25c072004a7c073625eb6ef14cc9011c74
Author:     Ian Jackson <Ian.Jackson@eu.citrix.com>
AuthorDate: Tue Jan 28 16:48:55 2014 +0100
Commit:     Ian Jackson <ijackson@chiark.greenend.org.uk>
CommitDate: Fri Jan 31 11:17:39 2014 +0000

    Update QEMU_TAG and QEMU_UPSTREAM_REVISION for 4.4.0-rc3
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit a96bbe5fd79ea8ac6b40e90965f84aab839d3391)
---
 Config.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index 55dce20..e061a9f 100644
--- a/Config.mk
+++ b/Config.mk
@@ -234,7 +234,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.4.0-rc1
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.4.0-rc3
 SEABIOS_UPSTREAM_TAG ?= rel-1.7.3.1
 # Fri Aug 2 14:12:09 2013 -0400
 # Fix bug in CBFS file walking with compressed files.
@@ -246,7 +246,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.4.0-rc2
+QEMU_TAG ?= xen-4.4.0-rc3
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
--
generated by git-patchbot for /home/xen/git/xen.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 Jan 31 11:22:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Jan 2014 11:22: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 1W9CAl-0004pK-9N; Fri, 31 Jan 2014 11:22:11 +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 1W9CAk-0004pF-DR
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:10 +0000
Received: from [85.158.137.68:38442] by server-3.bemta-3.messagelabs.com id
	24/30-14520-1678BE25; Fri, 31 Jan 2014 11:22:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1391167322!12537924!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.9.16; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10384 invoked from network); 31 Jan 2014 11:22:04 -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;
	31 Jan 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 1W9CAc-0007W9-KO
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1W9CAc-0007Ly-Fj
	for xen-changelog@lists.xensource.com; Fri, 31 Jan 2014 11:22:02 +0000
Date: Fri, 31 Jan 2014 11:22:02 +0000
Message-Id: <E1W9CAc-0007Ly-Fj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Update QEMU_TAG and
	QEMU_UPSTREAM_REVISION for 4.4.0-rc3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit a731bb25c072004a7c073625eb6ef14cc9011c74
Author:     Ian Jackson <Ian.Jackson@eu.citrix.com>
AuthorDate: Tue Jan 28 16:48:55 2014 +0100
Commit:     Ian Jackson <ijackson@chiark.greenend.org.uk>
CommitDate: Fri Jan 31 11:17:39 2014 +0000

    Update QEMU_TAG and QEMU_UPSTREAM_REVISION for 4.4.0-rc3
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    (cherry picked from commit a96bbe5fd79ea8ac6b40e90965f84aab839d3391)
---
 Config.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index 55dce20..e061a9f 100644
--- a/Config.mk
+++ b/Config.mk
@@ -234,7 +234,7 @@ QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
-QEMU_UPSTREAM_REVISION ?= qemu-xen-4.4.0-rc1
+QEMU_UPSTREAM_REVISION ?= qemu-xen-4.4.0-rc3
 SEABIOS_UPSTREAM_TAG ?= rel-1.7.3.1
 # Fri Aug 2 14:12:09 2013 -0400
 # Fix bug in CBFS file walking with compressed files.
@@ -246,7 +246,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.4.0-rc2
+QEMU_TAG ?= xen-4.4.0-rc3
 # Wed Dec 18 15:25:14 2013 +0000
 # qemu-traditional: Fix build warnings on Wheezy
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

