From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007Vo-Do; Sat, 02 Jun 2012 03:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007V7-E0
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from [85.158.143.99:40206] by server-2.bemta-4.messagelabs.com id
	4D/EF-11595-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1338606672!25684025!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5101 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JZ-Ok
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0003Tp-Ne
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Message-Id: <E1SaekB-0003Tp-Ne@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement event injection
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542435 -3600
# Node ID 3585dd50af3bb623fecca6ba5febbf328a87d811
# Parent  4406628d77edb1a7040ee9574debcdb013b2c003
arm: implement event injection

Implement vcpu_mark_events_pending using the vgic to inject PPI 31, that
we reserve for Xen usage.
In the future the interrupt used for event injection might be dynamic
and could be written into the device tree.
Otherwise it could be an SGI choosen by the guest and passed to Xen
through an hypercall.

Considering that:

- it is easy to determine if an event notification
interrupt has already been EOI'd by the guest just looking at the
evtchn_upcall_pending bit in the shared_info page;

- we can safely assume that there is at most one event notification
interrupt pending at any time in any set of LR registers because we
never inject more than a single event notification interrupt in one vcpu
(see vcpu_mark_events_pending);

we can avoid requesting maintenance interrupts for
VGIC_IRQ_EVTCHN_CALLBACK, provided that we check for event notification
interrupts that need to be cleared in the following places:

- maintenance interrupt entry;

- gic_set_guest_irq;

that is every time we are about to write to an LR.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/domain.c	Fri Jun 01 10:20:35 2012 +0100
@@ -232,6 +232,17 @@ void arch_dump_vcpu_info(struct vcpu *v)
 {
 }
 
+void vcpu_mark_events_pending(struct vcpu *v)
+{
+    int already_pending = test_and_set_bit(
+        0, (unsigned long *)&vcpu_info(v, evtchn_upcall_pending));
+
+    if ( already_pending )
+        return;
+
+    vgic_vcpu_inject_irq(v, VGIC_IRQ_EVTCHN_CALLBACK, 1);
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/dummy.S	Fri Jun 01 10:20:35 2012 +0100
@@ -27,7 +27,6 @@ DUMMY(arch_vcpu_reset);
 DUMMY(free_vcpu_guest_context);
 DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
-DUMMY(vcpu_mark_events_pending);
 DUMMY(vcpu_show_execution_state);
 
 /* Page Reference & Type Maintenance */
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -37,6 +37,7 @@
                                      + (GIC_CR_OFFSET & 0xfff)))
 #define GICH ((volatile uint32_t *) (FIXMAP_ADDR(FIXMAP_GICH)  \
                                      + (GIC_HR_OFFSET & 0xfff)))
+static void events_maintenance(struct vcpu *v);
 
 /* Global state */
 static struct {
@@ -46,6 +47,7 @@ static struct {
     unsigned int lines;
     unsigned int cpus;
     spinlock_t lock;
+    uint64_t event_mask;
     uint64_t lr_mask;
     /* lr_pending is used to queue IRQs (struct pending_irq) that the
      * vgic tried to inject in the guest (calling gic_set_guest_irq) but
@@ -293,6 +295,7 @@ int __init gic_init(void)
     gic_hyp_init();
 
     gic.lr_mask = 0ULL;
+    gic.event_mask = 0ULL;
     INIT_LIST_HEAD(&gic.lr_pending);
 
     spin_unlock(&gic.lock);
@@ -392,9 +395,15 @@ int __init setup_irq(unsigned int irq, s
 static inline void gic_set_lr(int lr, unsigned int virtual_irq,
         unsigned int state, unsigned int priority)
 {
+    int maintenance_int = GICH_LR_MAINTENANCE_IRQ;
+
     BUG_ON(lr > nr_lrs);
+
+    if (virtual_irq == VGIC_IRQ_EVTCHN_CALLBACK && nr_lrs > 1)
+        maintenance_int = 0;
+
     GICH[GICH_LR + lr] = state |
-        GICH_LR_MAINTENANCE_IRQ |
+        maintenance_int |
         ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
         ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
 }
@@ -405,6 +414,8 @@ void gic_set_guest_irq(unsigned int virt
     int i;
     struct pending_irq *iter, *n;
 
+    events_maintenance(current);
+
     spin_lock(&gic.lock);
 
     if ( list_empty(&gic.lr_pending) )
@@ -412,6 +423,8 @@ void gic_set_guest_irq(unsigned int virt
         i = find_first_zero_bit(&gic.lr_mask, nr_lrs);
         if (i < nr_lrs) {
             set_bit(i, &gic.lr_mask);
+            if ( virtual_irq == VGIC_IRQ_EVTCHN_CALLBACK )
+                set_bit(i, &gic.event_mask);
             gic_set_lr(i, virtual_irq, state, priority);
             goto out;
         }
@@ -515,12 +528,35 @@ void gicv_setup(struct domain *d)
                         GIC_BASE_ADDRESS + GIC_VR_OFFSET);
 }
 
+static void events_maintenance(struct vcpu *v)
+{
+    int i = 0;
+    int already_pending = test_bit(0,
+            (unsigned long *)&vcpu_info(v, evtchn_upcall_pending));
+
+    if (!already_pending && gic.event_mask != 0) {
+        spin_lock(&gic.lock);
+        while ((i = find_next_bit((const long unsigned int *) &gic.event_mask,
+                        sizeof(uint64_t), i)) < sizeof(uint64_t)) {
+
+            GICH[GICH_LR + i] = 0;
+            clear_bit(i, &gic.lr_mask);
+            clear_bit(i, &gic.event_mask);
+
+            i++;
+        }
+        spin_unlock(&gic.lock);
+    }
+}
+
 static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
     int i = 0, virq;
     uint32_t lr;
     uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32);
 
+    events_maintenance(current);
+
     while ((i = find_next_bit((const long unsigned int *) &eisr,
                               sizeof(eisr), i)) < sizeof(eisr)) {
         struct pending_irq *p;
@@ -536,6 +572,8 @@ static void maintenance_interrupt(int ir
             gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
             list_del_init(&p->lr_queue);
             set_bit(i, &gic.lr_mask);
+            if ( p->irq == VGIC_IRQ_EVTCHN_CALLBACK )
+                set_bit(i, &gic.event_mask);
         } else {
             gic_inject_irq_stop();
         }
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
@@ -121,6 +121,9 @@
 #define GICH_LR_CPUID_SHIFT     9
 #define GICH_VTR_NRLRGS         0x3f
 
+/* XXX: write this into the DT */
+#define VGIC_IRQ_EVTCHN_CALLBACK 31
+
 extern int domain_vgic_init(struct domain *d);
 extern int vcpu_vgic_init(struct vcpu *v);
 extern void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq,int virtual);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007Vt-Gk; Sat, 02 Jun 2012 03:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007VB-KL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from [85.158.143.99:40210] by server-1.bemta-4.messagelabs.com id
	EB/DD-27869-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-216.messagelabs.com!1338606672!25729308!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32446 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0000Jc-Ag
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0003U4-8l
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Message-Id: <E1SaekC-0003U4-8l@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: More interrupt setup at
	start-of-day for secondary CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542436 -3600
# Node ID 99641bdf1a6783e309133230ed141042c322e51e
# Parent  3585dd50af3bb623fecca6ba5febbf328a87d811
arm: More interrupt setup at start-of-day for secondary CPUs

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


diff -r 3585dd50af3b -r 99641bdf1a67 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:36 2012 +0100
@@ -107,6 +107,8 @@ void __cpuinit start_secondary(unsigned 
 
     mmu_init_secondary_cpu();
     gic_init_secondary_cpu();
+    init_timer_interrupt();
+    gic_route_irqs();
 
     set_current(idle_vcpu[cpuid]);
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekE-0007Ut-6H; Sat, 02 Jun 2012 03:11:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0007UW-56
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from [85.158.138.51:48323] by server-6.bemta-3.messagelabs.com id
	7C/72-23455-05489CF4; Sat, 02 Jun 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1338606669!26397883!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.0 required=7.0 tests=SUBJECT_RANDOMQ
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29010 invoked from network); 2 Jun 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0000JJ-Eu
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0003Sa-0J
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Message-Id: <E1Saek9-0003Sa-0J@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: support fewer LR registers than
	virtual irqs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542431 -3600
# Node ID ded5cb662d6ed8d14417c37c0565d2683dbde92d
# Parent  d7318231cfe3498947bf75f09d6675407d7b4e76
arm: support fewer LR registers than virtual irqs

If the vgic needs to inject a virtual irq into the guest, but no free
LR registers are available, add the irq to a list and return.
Whenever an LR register becomes available we add the queued irq to it
and remove it from the list.
We use the gic lock to protect the list and the bitmask.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d7318231cfe3 -r ded5cb662d6e xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Thu May 31 10:18:52 2012 +0200
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:31 2012 +0100
@@ -25,6 +25,7 @@
 #include <xen/sched.h>
 #include <xen/errno.h>
 #include <xen/softirq.h>
+#include <xen/list.h>
 #include <asm/p2m.h>
 #include <asm/domain.h>
 
@@ -45,6 +46,14 @@ static struct {
     unsigned int lines;
     unsigned int cpus;
     spinlock_t lock;
+    uint64_t lr_mask;
+    /* lr_pending is used to queue IRQs (struct pending_irq) that the
+     * vgic tried to inject in the guest (calling gic_set_guest_irq) but
+     * no LRs were available at the time.
+     * As soon as an LR is freed we remove the first IRQ from this
+     * list and write it to the LR register.
+     * lr_pending is a subset of vgic.inflight_irqs. */
+    struct list_head lr_pending;
 } gic;
 
 irq_desc_t irq_desc[NR_IRQS];
@@ -283,6 +292,9 @@ int __init gic_init(void)
     gic_cpu_init();
     gic_hyp_init();
 
+    gic.lr_mask = 0ULL;
+    INIT_LIST_HEAD(&gic.lr_pending);
+
     spin_unlock(&gic.lock);
 
     return gic.cpus;
@@ -377,14 +389,48 @@ int __init setup_irq(unsigned int irq, s
     return rc;
 }
 
+static inline void gic_set_lr(int lr, unsigned int virtual_irq,
+        unsigned int state, unsigned int priority)
+{
+    BUG_ON(lr > nr_lrs);
+    GICH[GICH_LR + lr] = state |
+        GICH_LR_MAINTENANCE_IRQ |
+        ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
+        ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
+}
+
 void gic_set_guest_irq(unsigned int virtual_irq,
         unsigned int state, unsigned int priority)
 {
-    BUG_ON(virtual_irq > nr_lrs);
-    GICH[GICH_LR + virtual_irq] = state |
-        GICH_LR_MAINTENANCE_IRQ |
-        ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
-        ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
+    int i;
+    struct pending_irq *iter, *n;
+
+    spin_lock(&gic.lock);
+
+    if ( list_empty(&gic.lr_pending) )
+    {
+        i = find_first_zero_bit(&gic.lr_mask, nr_lrs);
+        if (i < nr_lrs) {
+            set_bit(i, &gic.lr_mask);
+            gic_set_lr(i, virtual_irq, state, priority);
+            goto out;
+        }
+    }
+
+    n = irq_to_pending(current, virtual_irq);
+    list_for_each_entry ( iter, &gic.lr_pending, lr_queue )
+    {
+        if ( iter->priority > priority )
+        {
+            list_add_tail(&n->lr_queue, &iter->lr_queue);
+            goto out;
+        }
+    }
+    list_add_tail(&n->lr_queue, &gic.lr_pending);
+
+out:
+    spin_unlock(&gic.lock);
+    return;
 }
 
 void gic_inject_irq_start(void)
@@ -463,30 +509,42 @@ void gicv_setup(struct domain *d)
 
 static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
-    int i, virq;
+    int i = 0, virq;
     uint32_t lr;
     uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32);
 
-    for ( i = 0; i < 64; i++ ) {
-        if ( eisr & ((uint64_t)1 << i) ) {
-            struct pending_irq *p;
+    while ((i = find_next_bit((const long unsigned int *) &eisr,
+                              sizeof(eisr), i)) < sizeof(eisr)) {
+        struct pending_irq *p;
 
-            lr = GICH[GICH_LR + i];
-            virq = lr & GICH_LR_VIRTUAL_MASK;
-            GICH[GICH_LR + i] = 0;
+        spin_lock(&gic.lock);
+        lr = GICH[GICH_LR + i];
+        virq = lr & GICH_LR_VIRTUAL_MASK;
+        GICH[GICH_LR + i] = 0;
+        clear_bit(i, &gic.lr_mask);
 
-            spin_lock(&current->arch.vgic.lock);
-            p = irq_to_pending(current, virq);
-            if ( p->desc != NULL ) {
-                p->desc->status &= ~IRQ_INPROGRESS;
-                GICC[GICC_DIR] = virq;
-            }
+        if ( !list_empty(&gic.lr_pending) ) {
+            p = list_entry(gic.lr_pending.next, typeof(*p), lr_queue);
+            gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
+            list_del_init(&p->lr_queue);
+            set_bit(i, &gic.lr_mask);
+        } else {
             gic_inject_irq_stop();
-            list_del(&p->inflight);
-            INIT_LIST_HEAD(&p->inflight);
-            cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
-            spin_unlock(&current->arch.vgic.lock);
         }
+        spin_unlock(&gic.lock);
+
+        spin_lock(&current->arch.vgic.lock);
+        p = irq_to_pending(current, virq);
+        if ( p->desc != NULL ) {
+            p->desc->status &= ~IRQ_INPROGRESS;
+            GICC[GICC_DIR] = virq;
+        }
+        list_del(&p->inflight);
+        INIT_LIST_HEAD(&p->inflight);
+        cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
+        spin_unlock(&current->arch.vgic.lock);
+
+        i++;
     }
 }
 
diff -r d7318231cfe3 -r ded5cb662d6e xen/include/asm-arm/domain.h
--- a/xen/include/asm-arm/domain.h	Thu May 31 10:18:52 2012 +0200
+++ b/xen/include/asm-arm/domain.h	Fri Jun 01 10:20:31 2012 +0100
@@ -23,6 +23,9 @@ struct pending_irq
     /* inflight is used to append instances of pending_irq to
      * vgic.inflight_irqs */
     struct list_head inflight;
+    /* lr_queue is used to append instances of pending_irq to
+     * gic.lr_pending */
+    struct list_head lr_queue;
 };
 
 struct arch_domain
@@ -75,6 +78,13 @@ struct arch_vcpu
 
     struct {
         struct vgic_irq_rank private_irqs;
+        /* This list is ordered by IRQ priority and it is used to keep
+         * track of the IRQs that the VGIC injected into the guest.
+         * Depending on the availability of LR registers, the IRQs might
+         * actually be in an LR, and therefore injected into the guest,
+         * or queued in gic.lr_pending.
+         * As soon as an IRQ is EOI'd by the guest and removed from the
+         * corresponding LR it is also removed from this list. */
         struct list_head inflight_irqs;
         spinlock_t lock;
     } vgic;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007Vo-Do; Sat, 02 Jun 2012 03:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007V7-E0
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from [85.158.143.99:40206] by server-2.bemta-4.messagelabs.com id
	4D/EF-11595-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1338606672!25684025!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5101 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JZ-Ok
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0003Tp-Ne
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Message-Id: <E1SaekB-0003Tp-Ne@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement event injection
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542435 -3600
# Node ID 3585dd50af3bb623fecca6ba5febbf328a87d811
# Parent  4406628d77edb1a7040ee9574debcdb013b2c003
arm: implement event injection

Implement vcpu_mark_events_pending using the vgic to inject PPI 31, that
we reserve for Xen usage.
In the future the interrupt used for event injection might be dynamic
and could be written into the device tree.
Otherwise it could be an SGI choosen by the guest and passed to Xen
through an hypercall.

Considering that:

- it is easy to determine if an event notification
interrupt has already been EOI'd by the guest just looking at the
evtchn_upcall_pending bit in the shared_info page;

- we can safely assume that there is at most one event notification
interrupt pending at any time in any set of LR registers because we
never inject more than a single event notification interrupt in one vcpu
(see vcpu_mark_events_pending);

we can avoid requesting maintenance interrupts for
VGIC_IRQ_EVTCHN_CALLBACK, provided that we check for event notification
interrupts that need to be cleared in the following places:

- maintenance interrupt entry;

- gic_set_guest_irq;

that is every time we are about to write to an LR.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/domain.c	Fri Jun 01 10:20:35 2012 +0100
@@ -232,6 +232,17 @@ void arch_dump_vcpu_info(struct vcpu *v)
 {
 }
 
+void vcpu_mark_events_pending(struct vcpu *v)
+{
+    int already_pending = test_and_set_bit(
+        0, (unsigned long *)&vcpu_info(v, evtchn_upcall_pending));
+
+    if ( already_pending )
+        return;
+
+    vgic_vcpu_inject_irq(v, VGIC_IRQ_EVTCHN_CALLBACK, 1);
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/dummy.S	Fri Jun 01 10:20:35 2012 +0100
@@ -27,7 +27,6 @@ DUMMY(arch_vcpu_reset);
 DUMMY(free_vcpu_guest_context);
 DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
-DUMMY(vcpu_mark_events_pending);
 DUMMY(vcpu_show_execution_state);
 
 /* Page Reference & Type Maintenance */
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -37,6 +37,7 @@
                                      + (GIC_CR_OFFSET & 0xfff)))
 #define GICH ((volatile uint32_t *) (FIXMAP_ADDR(FIXMAP_GICH)  \
                                      + (GIC_HR_OFFSET & 0xfff)))
+static void events_maintenance(struct vcpu *v);
 
 /* Global state */
 static struct {
@@ -46,6 +47,7 @@ static struct {
     unsigned int lines;
     unsigned int cpus;
     spinlock_t lock;
+    uint64_t event_mask;
     uint64_t lr_mask;
     /* lr_pending is used to queue IRQs (struct pending_irq) that the
      * vgic tried to inject in the guest (calling gic_set_guest_irq) but
@@ -293,6 +295,7 @@ int __init gic_init(void)
     gic_hyp_init();
 
     gic.lr_mask = 0ULL;
+    gic.event_mask = 0ULL;
     INIT_LIST_HEAD(&gic.lr_pending);
 
     spin_unlock(&gic.lock);
@@ -392,9 +395,15 @@ int __init setup_irq(unsigned int irq, s
 static inline void gic_set_lr(int lr, unsigned int virtual_irq,
         unsigned int state, unsigned int priority)
 {
+    int maintenance_int = GICH_LR_MAINTENANCE_IRQ;
+
     BUG_ON(lr > nr_lrs);
+
+    if (virtual_irq == VGIC_IRQ_EVTCHN_CALLBACK && nr_lrs > 1)
+        maintenance_int = 0;
+
     GICH[GICH_LR + lr] = state |
-        GICH_LR_MAINTENANCE_IRQ |
+        maintenance_int |
         ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
         ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
 }
@@ -405,6 +414,8 @@ void gic_set_guest_irq(unsigned int virt
     int i;
     struct pending_irq *iter, *n;
 
+    events_maintenance(current);
+
     spin_lock(&gic.lock);
 
     if ( list_empty(&gic.lr_pending) )
@@ -412,6 +423,8 @@ void gic_set_guest_irq(unsigned int virt
         i = find_first_zero_bit(&gic.lr_mask, nr_lrs);
         if (i < nr_lrs) {
             set_bit(i, &gic.lr_mask);
+            if ( virtual_irq == VGIC_IRQ_EVTCHN_CALLBACK )
+                set_bit(i, &gic.event_mask);
             gic_set_lr(i, virtual_irq, state, priority);
             goto out;
         }
@@ -515,12 +528,35 @@ void gicv_setup(struct domain *d)
                         GIC_BASE_ADDRESS + GIC_VR_OFFSET);
 }
 
+static void events_maintenance(struct vcpu *v)
+{
+    int i = 0;
+    int already_pending = test_bit(0,
+            (unsigned long *)&vcpu_info(v, evtchn_upcall_pending));
+
+    if (!already_pending && gic.event_mask != 0) {
+        spin_lock(&gic.lock);
+        while ((i = find_next_bit((const long unsigned int *) &gic.event_mask,
+                        sizeof(uint64_t), i)) < sizeof(uint64_t)) {
+
+            GICH[GICH_LR + i] = 0;
+            clear_bit(i, &gic.lr_mask);
+            clear_bit(i, &gic.event_mask);
+
+            i++;
+        }
+        spin_unlock(&gic.lock);
+    }
+}
+
 static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
     int i = 0, virq;
     uint32_t lr;
     uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32);
 
+    events_maintenance(current);
+
     while ((i = find_next_bit((const long unsigned int *) &eisr,
                               sizeof(eisr), i)) < sizeof(eisr)) {
         struct pending_irq *p;
@@ -536,6 +572,8 @@ static void maintenance_interrupt(int ir
             gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
             list_del_init(&p->lr_queue);
             set_bit(i, &gic.lr_mask);
+            if ( p->irq == VGIC_IRQ_EVTCHN_CALLBACK )
+                set_bit(i, &gic.event_mask);
         } else {
             gic_inject_irq_stop();
         }
diff -r 4406628d77ed -r 3585dd50af3b xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
@@ -121,6 +121,9 @@
 #define GICH_LR_CPUID_SHIFT     9
 #define GICH_VTR_NRLRGS         0x3f
 
+/* XXX: write this into the DT */
+#define VGIC_IRQ_EVTCHN_CALLBACK 31
+
 extern int domain_vgic_init(struct domain *d);
 extern int vcpu_vgic_init(struct vcpu *v);
 extern void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq,int virtual);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007W2-JG; Sat, 02 Jun 2012 03:11:16 +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 1SaekF-0007VN-Uc
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [193.109.254.147:20063] by server-12.bemta-14.messagelabs.com
	id 78/8D-12643-35489CF4; Sat, 02 Jun 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1338606673!11586628!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8500 invoked from network); 2 Jun 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0000Ji-JH
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0003UZ-Aj
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Message-Id: <E1SaekD-0003UZ-Aj@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: avoid memory write in switch to
	Hyp mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542438 -3600
# Node ID b2d9f2411d711d8177acf1af0fbe9f0c9115c7ef
# Parent  b2649ecbe06f5624ca42066ea9d506eed1562d55
arm: avoid memory write in switch to Hyp mode

Assemble the new CPSR in registers instead.  It's slightly cleaner,
And makes it possible to have a read-only text section.

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


diff -r b2649ecbe06f -r b2d9f2411d71 xen/arch/arm/mode_switch.S
--- a/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:37 2012 +0100
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:38 2012 +0100
@@ -66,11 +66,7 @@ enter_hyp_mode:
 	mcr   CP32(r0, FCSEIDR)
 	mcr   CP32(r0, CONTEXTIDR)
 	/* FIXME: ought to reset some other NS control regs here */
-	adr   r1, 1f                 /* Store return address */
-	str   r3, [r1]               /* where we can use it for RFE */
-	isb                          /* Ensure we see the stored address */
-	rfeia r1                     /* Enter Hyp mode */
-
-1:	.word 0                      /* PC to enter Hyp mode at */
-	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
-
+	mrs   r0, cpsr               /* Copy the CPSR */
+	add   r0, r0, #0x4           /* 0x16 (Monitor) -> 0x1a (Hyp) */
+	msr   spsr_cxsf, r0          /* into the SPSR */
+	movs  pc, r3                 /* Exception-return into Hyp mode */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekF-0007VI-BU; Sat, 02 Jun 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0007Ul-Cw
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from [85.158.138.51:48381] by server-9.bemta-3.messagelabs.com id
	47/AA-21565-15489CF4; Sat, 02 Jun 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606671!24093803!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15939 invoked from network); 2 Jun 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JW-E6
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0003Ta-6D
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Message-Id: <E1SaekB-0003Ta-6D@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove VGIC_SOFTIRQ
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542435 -3600
# Node ID 4406628d77edb1a7040ee9574debcdb013b2c003
# Parent  ebf41e3d1ee3041a96d84e2a6f7576171179772b
arm: remove VGIC_SOFTIRQ

Instead of using a softirq to check whether we need to set the VI bit in
the HCR (IRQ injection in the guest), always check the lr_mask on
leave_hypervisor_tail.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -433,7 +433,7 @@ out:
     return;
 }
 
-void gic_inject_irq_start(void)
+static void gic_inject_irq_start(void)
 {
     uint32_t hcr;
     hcr = READ_CP32(HCR);
@@ -441,7 +441,7 @@ void gic_inject_irq_start(void)
     isb();
 }
 
-void gic_inject_irq_stop(void)
+static void gic_inject_irq_stop(void)
 {
     uint32_t hcr;
     hcr = READ_CP32(HCR);
@@ -451,6 +451,14 @@ void gic_inject_irq_stop(void)
     }
 }
 
+void gic_inject(void)
+{
+    if (!gic.lr_mask)
+        gic_inject_irq_stop();
+    else
+        gic_inject_irq_start();
+}
+
 int gic_route_irq_to_guest(struct domain *d, unsigned int irq,
                            const char * devname)
 {
@@ -540,7 +548,6 @@ static void maintenance_interrupt(int ir
             GICC[GICC_DIR] = virq;
         }
         list_del_init(&p->inflight);
-        cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
         spin_unlock(&current->arch.vgic.lock);
 
         i++;
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
@@ -128,11 +128,11 @@ extern struct pending_irq *irq_to_pendin
 
 extern void gic_route_irqs(void);
 
+extern void gic_inject(void);
+
 extern void __cpuinit init_maintenance_interrupt(void);
 extern void gic_set_guest_irq(unsigned int irq,
         unsigned int state, unsigned int priority);
-extern void gic_inject_irq_start(void);
-extern void gic_inject_irq_stop(void);
 extern int gic_route_irq_to_guest(struct domain *d, unsigned int irq,
                                   const char * devname);
 
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/traps.c	Fri Jun 01 10:20:35 2012 +0100
@@ -608,8 +608,10 @@ asmlinkage void leave_hypervisor_tail(vo
     while (1)
     {
         local_irq_disable();
-        if (!softirq_pending(smp_processor_id()))
+        if (!softirq_pending(smp_processor_id())) {
+            gic_inject();
             return;
+        }
         local_irq_enable();
         do_softirq();
     }
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/vgic.c
--- a/xen/arch/arm/vgic.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/vgic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -577,23 +577,8 @@ void vgic_vcpu_inject_irq(struct vcpu *v
     list_add_tail(&n->inflight, &v->arch.vgic.inflight_irqs);
     spin_unlock(&v->arch.vgic.lock);
     /* we have a new higher priority irq, inject it into the guest */
-    cpu_raise_softirq(v->processor, VGIC_SOFTIRQ);
 }
 
-static void vgic_softirq(void)
-{
-    if (list_empty(&current->arch.vgic.inflight_irqs))
-        return;
-
-    gic_inject_irq_start();
-}
-
-static int __init init_vgic_softirq(void)
-{
-    open_softirq(VGIC_SOFTIRQ, vgic_softirq);
-    return 0;
-}
-__initcall(init_vgic_softirq);
 /*
  * Local variables:
  * mode: C
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/include/asm-arm/softirq.h
--- a/xen/include/asm-arm/softirq.h	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/include/asm-arm/softirq.h	Fri Jun 01 10:20:35 2012 +0100
@@ -1,8 +1,7 @@
 #ifndef __ASM_SOFTIRQ_H__
 #define __ASM_SOFTIRQ_H__
 
-#define VGIC_SOFTIRQ        (NR_COMMON_SOFTIRQS + 0)
-#define NR_ARCH_SOFTIRQS       1
+#define NR_ARCH_SOFTIRQS       0
 
 #endif /* __ASM_SOFTIRQ_H__ */
 /*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekJ-0007XS-3V; Sat, 02 Jun 2012 03:11:19 +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 1SaekH-0007WK-PJ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from [193.109.254.147:20119] by server-1.bemta-14.messagelabs.com id
	10/FB-07411-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1338606675!7312698!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18271 invoked from network); 2 Jun 2012 03:11:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0000Js-1z
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0003VI-TT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Message-Id: <E1SaekE-0003VI-TT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Enable VFP at 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

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542440 -3600
# Node ID 137b02968b406c19124819d00cba46a990834b52
# Parent  8b7e5f6b1f7f84fd9aa170dc43ac88dad5e8e446
arm: Enable VFP at boot

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


diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/Rules.mk
--- a/xen/arch/arm/Rules.mk	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/Rules.mk	Fri Jun 01 10:20:40 2012 +0100
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
-CFLAGS += -march=armv7-a -mcpu=cortex-a15
+CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/setup.c	Fri Jun 01 10:20:40 2012 +0100
@@ -36,6 +36,7 @@
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
+#include <asm/vfp.h>
 #include "gic.h"
 
 static __attribute_used__ void init_done(void)
@@ -192,6 +193,8 @@ void __init start_xen(unsigned long boot
 
     processor_id();
 
+    enable_vfp();
+
     softirq_init();
 
     tasklet_subsys_init();
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:40 2012 +0100
@@ -26,6 +26,7 @@
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/softirq.h>
+#include <asm/vfp.h>
 #include "gic.h"
 
 cpumask_t cpu_online_map;
@@ -106,6 +107,8 @@ void __cpuinit start_secondary(unsigned 
     WRITE_CP32((uint32_t) hyp_traps_vector, HVBAR);
 
     mmu_init_secondary_cpu();
+    enable_vfp();
+
     gic_init_secondary_cpu();
     init_timer_interrupt();
     gic_route_irqs();
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/include/asm-arm/vfp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-arm/vfp.h	Fri Jun 01 10:20:40 2012 +0100
@@ -0,0 +1,35 @@
+#ifndef __ARM_VFP_H_
+#define __ARM_VFP_H_
+
+#include <xen/types.h>
+
+#define FPEXC_EN (1u << 30)
+
+/* Save and restore FP state.
+ * Ought to be using the new vmrs/vmsr names, but older binutils has a
+ * bug where it only allows them to target fpscr (and not, say, fpexc). */
+#define READ_FP(reg) ({                                 \
+    uint32_t val;                                       \
+    asm volatile ("fmrx %0, fp" #reg : "=r" (val));     \
+    val; })
+
+#define WRITE_FP(reg, val) do {                         \
+    asm volatile ("fmxr fp" #reg ", %0" : : "r" (val)); \
+} while (0)
+
+
+/* Start-of-day: Turn on VFP */
+static inline void enable_vfp(void)
+{
+    WRITE_FP(exc, READ_FP(exc) | FPEXC_EN);
+}
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wh-Sv; Sat, 02 Jun 2012 03:11:17 +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 1SaekG-0007Va-Ew
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.138.51:48439] by server-10.bemta-3.messagelabs.com id
	FF/34-12071-35489CF4; Sat, 02 Jun 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606673!24093805!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16025 invoked from network); 2 Jun 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0000Jf-Rt
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0003UK-QL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Message-Id: <E1SaekC-0003UK-QL@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Move hyp-mode entry code out of
	line.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542437 -3600
# Node ID b2649ecbe06f5624ca42066ea9d506eed1562d55
# Parent  99641bdf1a6783e309133230ed141042c322e51e
arm: Move hyp-mode entry code out of line.

This code is grottier than the rest of the start-of-day code and
very specific to the software model we're developing on.
Segregate it accordingly, by putting it in its own file.

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


diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/Makefile
--- a/xen/arch/arm/Makefile	Fri Jun 01 10:20:36 2012 +0100
+++ b/xen/arch/arm/Makefile	Fri Jun 01 10:20:37 2012 +0100
@@ -12,6 +12,7 @@ obj-y += io.o
 obj-y += irq.o
 obj-y += kernel.o
 obj-y += mm.o
+obj-y += mode_switch.o
 obj-y += p2m.o
 obj-y += percpu.o
 obj-y += guestcopy.o
diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/head.S
--- a/xen/arch/arm/head.S	Fri Jun 01 10:20:36 2012 +0100
+++ b/xen/arch/arm/head.S	Fri Jun 01 10:20:37 2012 +0100
@@ -122,50 +122,9 @@ 1:
 1:
 	/* OK, we're in Secure state. */
 	PRINT("- Started in Secure state -\r\n- Entering Hyp mode -\r\n")
-
-	/* Dance into Hyp mode */
-	cpsid aif, #0x16             /* Enter Monitor mode */
-	mrc   CP32(r0, SCR)
-	orr   r0, r0, #0x100         /* Set HCE */
-	orr   r0, r0, #0xb1          /* Set SCD, AW, FW and NS */
-	bic   r0, r0, #0xe           /* Clear EA, FIQ and IRQ */
-	mcr   CP32(r0, SCR)
-	/* Ugly: the system timer's frequency register is only
-	 * programmable in Secure state.  Since we don't know where its
-	 * memory-mapped control registers live, we can't find out the
-	 * right frequency.  Use the VE model's default frequency here. */
-	ldr   r0, =0x5f5e100         /* 100 MHz */
-	mcr   CP32(r0, CNTFRQ)
-	ldr   r0, =0x40c00           /* SMP, c11, c10 in non-secure mode */
-	mcr   CP32(r0, NSACR)
-	/* Continuing ugliness: Set up the GIC so NS state owns interrupts */
-	mov   r0, #GIC_BASE_ADDRESS
-	add   r0, r0, #GIC_DR_OFFSET
-	mov   r1, #0
-	str   r1, [r0]               /* Disable delivery in the distributor */
-	add   r0, r0, #0x80          /* GICD_IGROUP0 */
-	mov   r2, #0xffffffff        /* All interrupts to group 1 */
-	str   r2, [r0]
-	str   r2, [r0, #4]
-	str   r2, [r0, #8]
-	/* Must drop priority mask below 0x80 before entering NS state */
-	mov   r0, #GIC_BASE_ADDRESS
-	add   r0, r0, #GIC_CR_OFFSET
-	ldr   r1, =0xff
-	str   r1, [r0, #0x4]         /* -> GICC_PMR */
-	/* Reset a few config registers */
-	mov   r0, #0
-	mcr   CP32(r0, FCSEIDR)
-	mcr   CP32(r0, CONTEXTIDR)
-	/* FIXME: ought to reset some other NS control regs here */
-	adr   r1, 1f
-	adr   r0, hyp                /* Store paddr (hyp entry point) */
-	str   r0, [r1]               /* where we can use it for RFE */
-	isb                          /* Ensure we see the stored target address */
-	rfeia r1                     /* Enter Hyp mode */
-
-1:	.word 0                      /* PC to enter Hyp mode at */
-	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
+	ldr   r0, =enter_hyp_mode    /* VA of function */
+	adr   lr, hyp                /* Set return address for call */
+	add   pc, r0, r10            /* Call PA of function */
 
 hyp:
 	PRINT("- Setting up control registers -\r\n")
diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/mode_switch.S
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:37 2012 +0100
@@ -0,0 +1,76 @@
+/*
+ * xen/arch/arm/mode_switch.S
+ *
+ * Start-of day code to take a CPU from Secure mode to Hyp mode.
+ *
+ * Tim Deegan <tim@xen.org>
+ * Copyright (c) 2011-2012 Citrix Systems.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <asm/config.h>
+#include <asm/page.h>
+#include <asm/asm_defns.h>
+
+/* Get up a CPU into Hyp mode.  Clobbers r0-r3.
+ *
+ * This code is specific to the VE model, and not intended to be used
+ * on production systems.  As such it's a bit hackier than the main
+ * boot code in head.S.  In future it will be replaced by better
+ * integration with the bootloader/firmware so that Xen always starts
+ * in Hyp mode. */
+
+.globl enter_hyp_mode
+enter_hyp_mode:
+	mov   r3, lr                 /* Put return address in non-banked reg */
+	cpsid aif, #0x16             /* Enter Monitor mode */
+	mrc   CP32(r0, SCR)
+	orr   r0, r0, #0x100         /* Set HCE */
+	orr   r0, r0, #0xb1          /* Set SCD, AW, FW and NS */
+	bic   r0, r0, #0xe           /* Clear EA, FIQ and IRQ */
+	mcr   CP32(r0, SCR)
+	/* Ugly: the system timer's frequency register is only
+	 * programmable in Secure state.  Since we don't know where its
+	 * memory-mapped control registers live, we can't find out the
+	 * right frequency.  Use the VE model's default frequency here. */
+	ldr   r0, =0x5f5e100         /* 100 MHz */
+	mcr   CP32(r0, CNTFRQ)
+	ldr   r0, =0x40c00           /* SMP, c11, c10 in non-secure mode */
+	mcr   CP32(r0, NSACR)
+	/* Continuing ugliness: Set up the GIC so NS state owns interrupts */
+	mov   r0, #GIC_BASE_ADDRESS
+	add   r0, r0, #GIC_DR_OFFSET
+	mov   r1, #0
+	str   r1, [r0]               /* Disable delivery in the distributor */
+	add   r0, r0, #0x80          /* GICD_IGROUP0 */
+	mov   r2, #0xffffffff        /* All interrupts to group 1 */
+	str   r2, [r0]
+	str   r2, [r0, #4]
+	str   r2, [r0, #8]
+	/* Must drop priority mask below 0x80 before entering NS state */
+	mov   r0, #GIC_BASE_ADDRESS
+	add   r0, r0, #GIC_CR_OFFSET
+	ldr   r1, =0xff
+	str   r1, [r0, #0x4]         /* -> GICC_PMR */
+	/* Reset a few config registers */
+	mov   r0, #0
+	mcr   CP32(r0, FCSEIDR)
+	mcr   CP32(r0, CONTEXTIDR)
+	/* FIXME: ought to reset some other NS control regs here */
+	adr   r1, 1f                 /* Store return address */
+	str   r3, [r1]               /* where we can use it for RFE */
+	isb                          /* Ensure we see the stored address */
+	rfeia r1                     /* Enter Hyp mode */
+
+1:	.word 0                      /* PC to enter Hyp mode at */
+	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
+

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007WU-O6; Sat, 02 Jun 2012 03:11:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007VC-TX
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.139.83:50087] by server-4.bemta-5.messagelabs.com id
	F1/AF-05858-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-182.messagelabs.com!1338606672!17840631!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26380 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JP-68
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekA-0003T4-2q
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:10 +0000
Message-Id: <E1SaekA-0003T4-2q@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: shared_info page allocation and
	mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542433 -3600
# Node ID dde175688d5f0b53779fb96987138a477c62e887
# Parent  3fd1f4d540947c766e8cfef696879fdc55cde4e5
arm: shared_info page allocation and mapping

Allocate the shared_info page at domain creation.

Implement arch_memory_op, only for XENMEM_add_to_physmap with space ==
XENMAPSPACE_shared_info, so that the guest can map the shared_info page.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/domain.c	Fri Jun 01 10:20:33 2012 +0100
@@ -192,6 +192,17 @@ int arch_domain_create(struct domain *d,
     if ( (rc = p2m_init(d)) != 0 )
         goto fail;
 
+    if ( !is_idle_domain(d) )
+    {
+        rc = -ENOMEM;
+        if ( (d->shared_info = alloc_xenheap_pages(0, 0)) == NULL )
+            goto fail;
+
+        clear_page(d->shared_info);
+        share_xen_page_with_guest(
+                virt_to_page(d->shared_info), d, XENSHARE_writable);
+    }
+
     d->max_vcpus = 8;
 
     if ( (rc = domain_vgic_init(d)) != 0 )
diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/mm.c	Fri Jun 01 10:20:33 2012 +0100
@@ -25,8 +25,11 @@
 #include <xen/mm.h>
 #include <xen/preempt.h>
 #include <xen/errno.h>
+#include <xen/guest_access.h>
 #include <asm/page.h>
 #include <asm/current.h>
+#include <public/memory.h>
+#include <xen/sched.h>
 
 struct domain *dom_xen, *dom_io;
 
@@ -376,17 +379,104 @@ void arch_dump_shared_mem_info(void)
 {
 }
 
-long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
-{
-    return -ENOSYS;
-}
-
 int donate_page(struct domain *d, struct page_info *page, unsigned int memflags)
 {
     ASSERT(0);
     return -ENOSYS;
 }
 
+void share_xen_page_with_guest(struct page_info *page,
+                          struct domain *d, int readonly)
+{
+    if ( page_get_owner(page) == d )
+        return;
+
+    spin_lock(&d->page_alloc_lock);
+
+    /* The incremented type count pins as writable or read-only. */
+    page->u.inuse.type_info  = (readonly ? PGT_none : PGT_writable_page);
+    page->u.inuse.type_info |= PGT_validated | 1;
+
+    page_set_owner(page, d);
+    wmb(); /* install valid domain ptr before updating refcnt. */
+    ASSERT((page->count_info & ~PGC_xen_heap) == 0);
+
+    /* Only add to the allocation list if the domain isn't dying. */
+    if ( !d->is_dying )
+    {
+        page->count_info |= PGC_allocated | 1;
+        if ( unlikely(d->xenheap_pages++ == 0) )
+            get_knownalive_domain(d);
+        page_list_add_tail(page, &d->xenpage_list);
+    }
+
+    spin_unlock(&d->page_alloc_lock);
+}
+
+static int xenmem_add_to_physmap_once(
+    struct domain *d,
+    const struct xen_add_to_physmap *xatp)
+{
+    unsigned long mfn = 0;
+    int rc;
+
+    switch ( xatp->space )
+    {
+        case XENMAPSPACE_shared_info:
+            if ( xatp->idx == 0 )
+                mfn = virt_to_mfn(d->shared_info);
+            break;
+        default:
+            return -ENOSYS;
+    }
+
+    domain_lock(d);
+
+    /* Map at new location. */
+    rc = guest_physmap_add_page(d, xatp->gpfn, mfn, 0);
+
+    domain_unlock(d);
+
+    return rc;
+}
+
+static int xenmem_add_to_physmap(struct domain *d,
+                                 struct xen_add_to_physmap *xatp)
+{
+    return xenmem_add_to_physmap_once(d, xatp);
+}
+
+long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
+{
+    int rc;
+
+    switch ( op )
+    {
+    case XENMEM_add_to_physmap:
+    {
+        struct xen_add_to_physmap xatp;
+        struct domain *d;
+
+        if ( copy_from_guest(&xatp, arg, 1) )
+            return -EFAULT;
+
+        rc = rcu_lock_target_domain_by_id(xatp.domid, &d);
+        if ( rc != 0 )
+            return rc;
+
+        rc = xenmem_add_to_physmap(d, &xatp);
+
+        rcu_unlock_domain(d);
+
+        return rc;
+    }
+
+    default:
+        return -ENOSYS;
+    }
+
+    return 0;
+}
 /*
  * Local variables:
  * mode: C
diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/p2m.c	Fri Jun 01 10:20:33 2012 +0100
@@ -118,7 +118,12 @@ static int create_p2m_entries(struct dom
         }
         /* else: third already valid */
 
-        BUG_ON(third[third_table_offset(addr)].p2m.valid);
+        if ( third[third_table_offset(addr)].p2m.valid )
+        {
+            /* p2m entry already present */
+            free_domheap_page(
+                    mfn_to_page(third[third_table_offset(addr)].p2m.base));
+        }
 
         /* Allocate a new RAM page and attach */
         if (alloc)
@@ -172,6 +177,23 @@ int map_mmio_regions(struct domain *d,
     return create_p2m_entries(d, 0, start_gaddr, end_gaddr, maddr);
 }
 
+int guest_physmap_add_page(struct domain *d,
+                           unsigned long gpfn,
+                           unsigned long mfn,
+                           unsigned int page_order)
+{
+    return create_p2m_entries(d, 0, gpfn << PAGE_SHIFT,
+                              (gpfn + (1<<page_order)) << PAGE_SHIFT,
+                              mfn << PAGE_SHIFT);
+}
+
+void guest_physmap_remove_page(struct domain *d,
+                               unsigned long gpfn,
+                               unsigned long mfn, unsigned int page_order)
+{
+    ASSERT(0);
+}
+
 int p2m_alloc_table(struct domain *d)
 {
     struct p2m_domain *p2m = &d->arch.p2m;
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/config.h
--- a/xen/include/asm-arm/config.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/config.h	Fri Jun 01 10:20:33 2012 +0100
@@ -7,6 +7,8 @@
 #ifndef __ARM_CONFIG_H__
 #define __ARM_CONFIG_H__
 
+#define CONFIG_PAGING_ASSISTANCE 1
+
 #define CONFIG_PAGING_LEVELS 3
 
 #define CONFIG_ARM 1
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/mm.h
--- a/xen/include/asm-arm/mm.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/mm.h	Fri Jun 01 10:20:33 2012 +0100
@@ -78,6 +78,10 @@ struct page_info
 #define _PGT_pinned       PG_shift(5)
 #define PGT_pinned        PG_mask(1, 5)
 
+ /* Has this page been validated for use as its current type? */
+#define _PGT_validated    PG_shift(6)
+#define PGT_validated     PG_mask(1, 6)
+
  /* Count of uses of this frame as its current type. */
 #define PGT_count_width   PG_shift(9)
 #define PGT_count_mask    ((1UL<<PGT_count_width)-1)
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/p2m.h
--- a/xen/include/asm-arm/p2m.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/p2m.h	Fri Jun 01 10:20:33 2012 +0100
@@ -40,6 +40,15 @@ int p2m_populate_ram(struct domain *d, p
 int map_mmio_regions(struct domain *d, paddr_t start_gaddr,
                      paddr_t end_gaddr, paddr_t maddr);
 
+/* Untyped version for RAM only, for compatibility */
+int guest_physmap_add_page(struct domain *d,
+                           unsigned long gfn,
+                           unsigned long mfn,
+                           unsigned int page_order);
+void guest_physmap_remove_page(struct domain *d,
+                               unsigned long gpfn,
+                               unsigned long mfn, unsigned int page_order);
+
 unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn);
 
 /*
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/paging.h
--- a/xen/include/asm-arm/paging.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/paging.h	Fri Jun 01 10:20:33 2012 +0100
@@ -1,6 +1,9 @@
 #ifndef _XEN_PAGING_H
 #define _XEN_PAGING_H
 
+#define paging_mode_translate(d)              (0)
+#define paging_mode_external(d)               (0)
+
 #endif /* XEN_PAGING_H */
 
 /*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007W2-JG; Sat, 02 Jun 2012 03:11:16 +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 1SaekF-0007VN-Uc
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [193.109.254.147:20063] by server-12.bemta-14.messagelabs.com
	id 78/8D-12643-35489CF4; Sat, 02 Jun 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1338606673!11586628!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8500 invoked from network); 2 Jun 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0000Ji-JH
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0003UZ-Aj
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Message-Id: <E1SaekD-0003UZ-Aj@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: avoid memory write in switch to
	Hyp mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542438 -3600
# Node ID b2d9f2411d711d8177acf1af0fbe9f0c9115c7ef
# Parent  b2649ecbe06f5624ca42066ea9d506eed1562d55
arm: avoid memory write in switch to Hyp mode

Assemble the new CPSR in registers instead.  It's slightly cleaner,
And makes it possible to have a read-only text section.

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


diff -r b2649ecbe06f -r b2d9f2411d71 xen/arch/arm/mode_switch.S
--- a/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:37 2012 +0100
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:38 2012 +0100
@@ -66,11 +66,7 @@ enter_hyp_mode:
 	mcr   CP32(r0, FCSEIDR)
 	mcr   CP32(r0, CONTEXTIDR)
 	/* FIXME: ought to reset some other NS control regs here */
-	adr   r1, 1f                 /* Store return address */
-	str   r3, [r1]               /* where we can use it for RFE */
-	isb                          /* Ensure we see the stored address */
-	rfeia r1                     /* Enter Hyp mode */
-
-1:	.word 0                      /* PC to enter Hyp mode at */
-	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
-
+	mrs   r0, cpsr               /* Copy the CPSR */
+	add   r0, r0, #0x4           /* 0x16 (Monitor) -> 0x1a (Hyp) */
+	msr   spsr_cxsf, r0          /* into the SPSR */
+	movs  pc, r3                 /* Exception-return into Hyp mode */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekE-0007Ut-6H; Sat, 02 Jun 2012 03:11:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0007UW-56
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from [85.158.138.51:48323] by server-6.bemta-3.messagelabs.com id
	7C/72-23455-05489CF4; Sat, 02 Jun 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1338606669!26397883!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.0 required=7.0 tests=SUBJECT_RANDOMQ
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29010 invoked from network); 2 Jun 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0000JJ-Eu
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0003Sa-0J
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Message-Id: <E1Saek9-0003Sa-0J@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: support fewer LR registers than
	virtual irqs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542431 -3600
# Node ID ded5cb662d6ed8d14417c37c0565d2683dbde92d
# Parent  d7318231cfe3498947bf75f09d6675407d7b4e76
arm: support fewer LR registers than virtual irqs

If the vgic needs to inject a virtual irq into the guest, but no free
LR registers are available, add the irq to a list and return.
Whenever an LR register becomes available we add the queued irq to it
and remove it from the list.
We use the gic lock to protect the list and the bitmask.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d7318231cfe3 -r ded5cb662d6e xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Thu May 31 10:18:52 2012 +0200
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:31 2012 +0100
@@ -25,6 +25,7 @@
 #include <xen/sched.h>
 #include <xen/errno.h>
 #include <xen/softirq.h>
+#include <xen/list.h>
 #include <asm/p2m.h>
 #include <asm/domain.h>
 
@@ -45,6 +46,14 @@ static struct {
     unsigned int lines;
     unsigned int cpus;
     spinlock_t lock;
+    uint64_t lr_mask;
+    /* lr_pending is used to queue IRQs (struct pending_irq) that the
+     * vgic tried to inject in the guest (calling gic_set_guest_irq) but
+     * no LRs were available at the time.
+     * As soon as an LR is freed we remove the first IRQ from this
+     * list and write it to the LR register.
+     * lr_pending is a subset of vgic.inflight_irqs. */
+    struct list_head lr_pending;
 } gic;
 
 irq_desc_t irq_desc[NR_IRQS];
@@ -283,6 +292,9 @@ int __init gic_init(void)
     gic_cpu_init();
     gic_hyp_init();
 
+    gic.lr_mask = 0ULL;
+    INIT_LIST_HEAD(&gic.lr_pending);
+
     spin_unlock(&gic.lock);
 
     return gic.cpus;
@@ -377,14 +389,48 @@ int __init setup_irq(unsigned int irq, s
     return rc;
 }
 
+static inline void gic_set_lr(int lr, unsigned int virtual_irq,
+        unsigned int state, unsigned int priority)
+{
+    BUG_ON(lr > nr_lrs);
+    GICH[GICH_LR + lr] = state |
+        GICH_LR_MAINTENANCE_IRQ |
+        ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
+        ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
+}
+
 void gic_set_guest_irq(unsigned int virtual_irq,
         unsigned int state, unsigned int priority)
 {
-    BUG_ON(virtual_irq > nr_lrs);
-    GICH[GICH_LR + virtual_irq] = state |
-        GICH_LR_MAINTENANCE_IRQ |
-        ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
-        ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
+    int i;
+    struct pending_irq *iter, *n;
+
+    spin_lock(&gic.lock);
+
+    if ( list_empty(&gic.lr_pending) )
+    {
+        i = find_first_zero_bit(&gic.lr_mask, nr_lrs);
+        if (i < nr_lrs) {
+            set_bit(i, &gic.lr_mask);
+            gic_set_lr(i, virtual_irq, state, priority);
+            goto out;
+        }
+    }
+
+    n = irq_to_pending(current, virtual_irq);
+    list_for_each_entry ( iter, &gic.lr_pending, lr_queue )
+    {
+        if ( iter->priority > priority )
+        {
+            list_add_tail(&n->lr_queue, &iter->lr_queue);
+            goto out;
+        }
+    }
+    list_add_tail(&n->lr_queue, &gic.lr_pending);
+
+out:
+    spin_unlock(&gic.lock);
+    return;
 }
 
 void gic_inject_irq_start(void)
@@ -463,30 +509,42 @@ void gicv_setup(struct domain *d)
 
 static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
-    int i, virq;
+    int i = 0, virq;
     uint32_t lr;
     uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32);
 
-    for ( i = 0; i < 64; i++ ) {
-        if ( eisr & ((uint64_t)1 << i) ) {
-            struct pending_irq *p;
+    while ((i = find_next_bit((const long unsigned int *) &eisr,
+                              sizeof(eisr), i)) < sizeof(eisr)) {
+        struct pending_irq *p;
 
-            lr = GICH[GICH_LR + i];
-            virq = lr & GICH_LR_VIRTUAL_MASK;
-            GICH[GICH_LR + i] = 0;
+        spin_lock(&gic.lock);
+        lr = GICH[GICH_LR + i];
+        virq = lr & GICH_LR_VIRTUAL_MASK;
+        GICH[GICH_LR + i] = 0;
+        clear_bit(i, &gic.lr_mask);
 
-            spin_lock(&current->arch.vgic.lock);
-            p = irq_to_pending(current, virq);
-            if ( p->desc != NULL ) {
-                p->desc->status &= ~IRQ_INPROGRESS;
-                GICC[GICC_DIR] = virq;
-            }
+        if ( !list_empty(&gic.lr_pending) ) {
+            p = list_entry(gic.lr_pending.next, typeof(*p), lr_queue);
+            gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
+            list_del_init(&p->lr_queue);
+            set_bit(i, &gic.lr_mask);
+        } else {
             gic_inject_irq_stop();
-            list_del(&p->inflight);
-            INIT_LIST_HEAD(&p->inflight);
-            cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
-            spin_unlock(&current->arch.vgic.lock);
         }
+        spin_unlock(&gic.lock);
+
+        spin_lock(&current->arch.vgic.lock);
+        p = irq_to_pending(current, virq);
+        if ( p->desc != NULL ) {
+            p->desc->status &= ~IRQ_INPROGRESS;
+            GICC[GICC_DIR] = virq;
+        }
+        list_del(&p->inflight);
+        INIT_LIST_HEAD(&p->inflight);
+        cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
+        spin_unlock(&current->arch.vgic.lock);
+
+        i++;
     }
 }
 
diff -r d7318231cfe3 -r ded5cb662d6e xen/include/asm-arm/domain.h
--- a/xen/include/asm-arm/domain.h	Thu May 31 10:18:52 2012 +0200
+++ b/xen/include/asm-arm/domain.h	Fri Jun 01 10:20:31 2012 +0100
@@ -23,6 +23,9 @@ struct pending_irq
     /* inflight is used to append instances of pending_irq to
      * vgic.inflight_irqs */
     struct list_head inflight;
+    /* lr_queue is used to append instances of pending_irq to
+     * gic.lr_pending */
+    struct list_head lr_queue;
 };
 
 struct arch_domain
@@ -75,6 +78,13 @@ struct arch_vcpu
 
     struct {
         struct vgic_irq_rank private_irqs;
+        /* This list is ordered by IRQ priority and it is used to keep
+         * track of the IRQs that the VGIC injected into the guest.
+         * Depending on the availability of LR registers, the IRQs might
+         * actually be in an LR, and therefore injected into the guest,
+         * or queued in gic.lr_pending.
+         * As soon as an IRQ is EOI'd by the guest and removed from the
+         * corresponding LR it is also removed from this list. */
         struct list_head inflight_irqs;
         spinlock_t lock;
     } vgic;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekG-0007Vt-Gk; Sat, 02 Jun 2012 03:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007VB-KL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from [85.158.143.99:40210] by server-1.bemta-4.messagelabs.com id
	EB/DD-27869-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-216.messagelabs.com!1338606672!25729308!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32446 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0000Jc-Ag
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0003U4-8l
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Message-Id: <E1SaekC-0003U4-8l@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: More interrupt setup at
	start-of-day for secondary CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542436 -3600
# Node ID 99641bdf1a6783e309133230ed141042c322e51e
# Parent  3585dd50af3bb623fecca6ba5febbf328a87d811
arm: More interrupt setup at start-of-day for secondary CPUs

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


diff -r 3585dd50af3b -r 99641bdf1a67 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:35 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:36 2012 +0100
@@ -107,6 +107,8 @@ void __cpuinit start_secondary(unsigned 
 
     mmu_init_secondary_cpu();
     gic_init_secondary_cpu();
+    init_timer_interrupt();
+    gic_route_irqs();
 
     set_current(idle_vcpu[cpuid]);
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekJ-0007XS-3V; Sat, 02 Jun 2012 03:11:19 +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 1SaekH-0007WK-PJ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from [193.109.254.147:20119] by server-1.bemta-14.messagelabs.com id
	10/FB-07411-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1338606675!7312698!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18271 invoked from network); 2 Jun 2012 03:11:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0000Js-1z
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0003VI-TT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Message-Id: <E1SaekE-0003VI-TT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Enable VFP at 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

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542440 -3600
# Node ID 137b02968b406c19124819d00cba46a990834b52
# Parent  8b7e5f6b1f7f84fd9aa170dc43ac88dad5e8e446
arm: Enable VFP at boot

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


diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/Rules.mk
--- a/xen/arch/arm/Rules.mk	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/Rules.mk	Fri Jun 01 10:20:40 2012 +0100
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
-CFLAGS += -march=armv7-a -mcpu=cortex-a15
+CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/setup.c	Fri Jun 01 10:20:40 2012 +0100
@@ -36,6 +36,7 @@
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
+#include <asm/vfp.h>
 #include "gic.h"
 
 static __attribute_used__ void init_done(void)
@@ -192,6 +193,8 @@ void __init start_xen(unsigned long boot
 
     processor_id();
 
+    enable_vfp();
+
     softirq_init();
 
     tasklet_subsys_init();
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Fri Jun 01 10:20:40 2012 +0100
@@ -26,6 +26,7 @@
 #include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/softirq.h>
+#include <asm/vfp.h>
 #include "gic.h"
 
 cpumask_t cpu_online_map;
@@ -106,6 +107,8 @@ void __cpuinit start_secondary(unsigned 
     WRITE_CP32((uint32_t) hyp_traps_vector, HVBAR);
 
     mmu_init_secondary_cpu();
+    enable_vfp();
+
     gic_init_secondary_cpu();
     init_timer_interrupt();
     gic_route_irqs();
diff -r 8b7e5f6b1f7f -r 137b02968b40 xen/include/asm-arm/vfp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-arm/vfp.h	Fri Jun 01 10:20:40 2012 +0100
@@ -0,0 +1,35 @@
+#ifndef __ARM_VFP_H_
+#define __ARM_VFP_H_
+
+#include <xen/types.h>
+
+#define FPEXC_EN (1u << 30)
+
+/* Save and restore FP state.
+ * Ought to be using the new vmrs/vmsr names, but older binutils has a
+ * bug where it only allows them to target fpscr (and not, say, fpexc). */
+#define READ_FP(reg) ({                                 \
+    uint32_t val;                                       \
+    asm volatile ("fmrx %0, fp" #reg : "=r" (val));     \
+    val; })
+
+#define WRITE_FP(reg, val) do {                         \
+    asm volatile ("fmxr fp" #reg ", %0" : : "r" (val)); \
+} while (0)
+
+
+/* Start-of-day: Turn on VFP */
+static inline void enable_vfp(void)
+{
+    WRITE_FP(exc, READ_FP(exc) | FPEXC_EN);
+}
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekF-0007VD-8j; Sat, 02 Jun 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0007Uk-3U
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from [85.158.138.51:48360] by server-12.bemta-3.messagelabs.com id
	19/35-29860-15489CF4; Sat, 02 Jun 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606671!24093802!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15922 invoked from network); 2 Jun 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JQ-2c
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekA-0003TJ-JF
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:10 +0000
Message-Id: <E1SaekA-0003TJ-JF@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement flush_tlb_all_local
	and flush_tlb_local
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542434 -3600
# Node ID ebf41e3d1ee3041a96d84e2a6f7576171179772b
# Parent  dde175688d5f0b53779fb96987138a477c62e887
arm: implement flush_tlb_all_local and flush_tlb_local

Call flush_tlb_all_local from create_p2m_entries after removing a page
from the p2m.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r dde175688d5f -r ebf41e3d1ee3 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/arch/arm/p2m.c	Fri Jun 01 10:20:34 2012 +0100
@@ -3,6 +3,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/domain_page.h>
+#include <asm/flushtlb.h>
 
 void p2m_load_VTTBR(struct domain *d)
 {
@@ -123,6 +124,7 @@ static int create_p2m_entries(struct dom
             /* p2m entry already present */
             free_domheap_page(
                     mfn_to_page(third[third_table_offset(addr)].p2m.base));
+            flush_tlb_all_local();
         }
 
         /* Allocate a new RAM page and attach */
diff -r dde175688d5f -r ebf41e3d1ee3 xen/include/asm-arm/flushtlb.h
--- a/xen/include/asm-arm/flushtlb.h	Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/include/asm-arm/flushtlb.h	Fri Jun 01 10:20:34 2012 +0100
@@ -14,8 +14,27 @@ do {                                    
 
 #define tlbflush_current_time()                 (0)
 
-/* Flush local TLBs */
-void flush_tlb_local(void);
+/* Flush local TLBs, current VMID only */
+static inline void flush_tlb_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLIS);
+
+    dsb();
+    isb();
+}
+
+/* Flush local TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+    dsb();
+    isb();
+}
 
 /* Flush specified CPUs' TLBs */
 void flush_tlb_mask(const cpumask_t *mask);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wb-QN; Sat, 02 Jun 2012 03:11:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0007VB-DI
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.143.35:24515] by server-1.bemta-4.messagelabs.com id
	FC/DD-27869-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1338606674!17211337!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15908 invoked from network); 2 Jun 2012 03:11:15 -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;
	2 Jun 2012 03:11:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0000Jl-Ti
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0003Uo-S5
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Message-Id: <E1SaekD-0003Uo-S5@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: missing __init annotation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542439 -3600
# Node ID 10bb1cc00ab66e794831e0553d9045197be1d327
# Parent  b2d9f2411d711d8177acf1af0fbe9f0c9115c7ef
arm: missing __init annotation

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


diff -r b2d9f2411d71 -r 10bb1cc00ab6 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Fri Jun 01 10:20:38 2012 +0100
+++ b/xen/arch/arm/setup.c	Fri Jun 01 10:20:39 2012 +0100
@@ -51,7 +51,7 @@ static void __init init_idle_domain(void
         /* TODO: setup_idle_pagetable(); */
 }
 
-static void processor_id(void)
+static void __init processor_id(void)
 {
     printk("Processor Features: %08x %08x\n",
            READ_CP32(ID_PFR0), READ_CP32(ID_PFR0));

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekF-0007VD-8j; Sat, 02 Jun 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0007Uk-3U
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from [85.158.138.51:48360] by server-12.bemta-3.messagelabs.com id
	19/35-29860-15489CF4; Sat, 02 Jun 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606671!24093802!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15922 invoked from network); 2 Jun 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JQ-2c
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekA-0003TJ-JF
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:10 +0000
Message-Id: <E1SaekA-0003TJ-JF@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement flush_tlb_all_local
	and flush_tlb_local
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542434 -3600
# Node ID ebf41e3d1ee3041a96d84e2a6f7576171179772b
# Parent  dde175688d5f0b53779fb96987138a477c62e887
arm: implement flush_tlb_all_local and flush_tlb_local

Call flush_tlb_all_local from create_p2m_entries after removing a page
from the p2m.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r dde175688d5f -r ebf41e3d1ee3 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/arch/arm/p2m.c	Fri Jun 01 10:20:34 2012 +0100
@@ -3,6 +3,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/domain_page.h>
+#include <asm/flushtlb.h>
 
 void p2m_load_VTTBR(struct domain *d)
 {
@@ -123,6 +124,7 @@ static int create_p2m_entries(struct dom
             /* p2m entry already present */
             free_domheap_page(
                     mfn_to_page(third[third_table_offset(addr)].p2m.base));
+            flush_tlb_all_local();
         }
 
         /* Allocate a new RAM page and attach */
diff -r dde175688d5f -r ebf41e3d1ee3 xen/include/asm-arm/flushtlb.h
--- a/xen/include/asm-arm/flushtlb.h	Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/include/asm-arm/flushtlb.h	Fri Jun 01 10:20:34 2012 +0100
@@ -14,8 +14,27 @@ do {                                    
 
 #define tlbflush_current_time()                 (0)
 
-/* Flush local TLBs */
-void flush_tlb_local(void);
+/* Flush local TLBs, current VMID only */
+static inline void flush_tlb_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLIS);
+
+    dsb();
+    isb();
+}
+
+/* Flush local TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+    dsb();
+    isb();
+}
 
 /* Flush specified CPUs' TLBs */
 void flush_tlb_mask(const cpumask_t *mask);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007WU-O6; Sat, 02 Jun 2012 03:11:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0007VC-TX
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.139.83:50087] by server-4.bemta-5.messagelabs.com id
	F1/AF-05858-25489CF4; Sat, 02 Jun 2012 03:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-182.messagelabs.com!1338606672!17840631!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26380 invoked from network); 2 Jun 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JP-68
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekA-0003T4-2q
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:10 +0000
Message-Id: <E1SaekA-0003T4-2q@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: shared_info page allocation and
	mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542433 -3600
# Node ID dde175688d5f0b53779fb96987138a477c62e887
# Parent  3fd1f4d540947c766e8cfef696879fdc55cde4e5
arm: shared_info page allocation and mapping

Allocate the shared_info page at domain creation.

Implement arch_memory_op, only for XENMEM_add_to_physmap with space ==
XENMAPSPACE_shared_info, so that the guest can map the shared_info page.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/domain.c	Fri Jun 01 10:20:33 2012 +0100
@@ -192,6 +192,17 @@ int arch_domain_create(struct domain *d,
     if ( (rc = p2m_init(d)) != 0 )
         goto fail;
 
+    if ( !is_idle_domain(d) )
+    {
+        rc = -ENOMEM;
+        if ( (d->shared_info = alloc_xenheap_pages(0, 0)) == NULL )
+            goto fail;
+
+        clear_page(d->shared_info);
+        share_xen_page_with_guest(
+                virt_to_page(d->shared_info), d, XENSHARE_writable);
+    }
+
     d->max_vcpus = 8;
 
     if ( (rc = domain_vgic_init(d)) != 0 )
diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/mm.c	Fri Jun 01 10:20:33 2012 +0100
@@ -25,8 +25,11 @@
 #include <xen/mm.h>
 #include <xen/preempt.h>
 #include <xen/errno.h>
+#include <xen/guest_access.h>
 #include <asm/page.h>
 #include <asm/current.h>
+#include <public/memory.h>
+#include <xen/sched.h>
 
 struct domain *dom_xen, *dom_io;
 
@@ -376,17 +379,104 @@ void arch_dump_shared_mem_info(void)
 {
 }
 
-long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
-{
-    return -ENOSYS;
-}
-
 int donate_page(struct domain *d, struct page_info *page, unsigned int memflags)
 {
     ASSERT(0);
     return -ENOSYS;
 }
 
+void share_xen_page_with_guest(struct page_info *page,
+                          struct domain *d, int readonly)
+{
+    if ( page_get_owner(page) == d )
+        return;
+
+    spin_lock(&d->page_alloc_lock);
+
+    /* The incremented type count pins as writable or read-only. */
+    page->u.inuse.type_info  = (readonly ? PGT_none : PGT_writable_page);
+    page->u.inuse.type_info |= PGT_validated | 1;
+
+    page_set_owner(page, d);
+    wmb(); /* install valid domain ptr before updating refcnt. */
+    ASSERT((page->count_info & ~PGC_xen_heap) == 0);
+
+    /* Only add to the allocation list if the domain isn't dying. */
+    if ( !d->is_dying )
+    {
+        page->count_info |= PGC_allocated | 1;
+        if ( unlikely(d->xenheap_pages++ == 0) )
+            get_knownalive_domain(d);
+        page_list_add_tail(page, &d->xenpage_list);
+    }
+
+    spin_unlock(&d->page_alloc_lock);
+}
+
+static int xenmem_add_to_physmap_once(
+    struct domain *d,
+    const struct xen_add_to_physmap *xatp)
+{
+    unsigned long mfn = 0;
+    int rc;
+
+    switch ( xatp->space )
+    {
+        case XENMAPSPACE_shared_info:
+            if ( xatp->idx == 0 )
+                mfn = virt_to_mfn(d->shared_info);
+            break;
+        default:
+            return -ENOSYS;
+    }
+
+    domain_lock(d);
+
+    /* Map at new location. */
+    rc = guest_physmap_add_page(d, xatp->gpfn, mfn, 0);
+
+    domain_unlock(d);
+
+    return rc;
+}
+
+static int xenmem_add_to_physmap(struct domain *d,
+                                 struct xen_add_to_physmap *xatp)
+{
+    return xenmem_add_to_physmap_once(d, xatp);
+}
+
+long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
+{
+    int rc;
+
+    switch ( op )
+    {
+    case XENMEM_add_to_physmap:
+    {
+        struct xen_add_to_physmap xatp;
+        struct domain *d;
+
+        if ( copy_from_guest(&xatp, arg, 1) )
+            return -EFAULT;
+
+        rc = rcu_lock_target_domain_by_id(xatp.domid, &d);
+        if ( rc != 0 )
+            return rc;
+
+        rc = xenmem_add_to_physmap(d, &xatp);
+
+        rcu_unlock_domain(d);
+
+        return rc;
+    }
+
+    default:
+        return -ENOSYS;
+    }
+
+    return 0;
+}
 /*
  * Local variables:
  * mode: C
diff -r 3fd1f4d54094 -r dde175688d5f xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/arch/arm/p2m.c	Fri Jun 01 10:20:33 2012 +0100
@@ -118,7 +118,12 @@ static int create_p2m_entries(struct dom
         }
         /* else: third already valid */
 
-        BUG_ON(third[third_table_offset(addr)].p2m.valid);
+        if ( third[third_table_offset(addr)].p2m.valid )
+        {
+            /* p2m entry already present */
+            free_domheap_page(
+                    mfn_to_page(third[third_table_offset(addr)].p2m.base));
+        }
 
         /* Allocate a new RAM page and attach */
         if (alloc)
@@ -172,6 +177,23 @@ int map_mmio_regions(struct domain *d,
     return create_p2m_entries(d, 0, start_gaddr, end_gaddr, maddr);
 }
 
+int guest_physmap_add_page(struct domain *d,
+                           unsigned long gpfn,
+                           unsigned long mfn,
+                           unsigned int page_order)
+{
+    return create_p2m_entries(d, 0, gpfn << PAGE_SHIFT,
+                              (gpfn + (1<<page_order)) << PAGE_SHIFT,
+                              mfn << PAGE_SHIFT);
+}
+
+void guest_physmap_remove_page(struct domain *d,
+                               unsigned long gpfn,
+                               unsigned long mfn, unsigned int page_order)
+{
+    ASSERT(0);
+}
+
 int p2m_alloc_table(struct domain *d)
 {
     struct p2m_domain *p2m = &d->arch.p2m;
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/config.h
--- a/xen/include/asm-arm/config.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/config.h	Fri Jun 01 10:20:33 2012 +0100
@@ -7,6 +7,8 @@
 #ifndef __ARM_CONFIG_H__
 #define __ARM_CONFIG_H__
 
+#define CONFIG_PAGING_ASSISTANCE 1
+
 #define CONFIG_PAGING_LEVELS 3
 
 #define CONFIG_ARM 1
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/mm.h
--- a/xen/include/asm-arm/mm.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/mm.h	Fri Jun 01 10:20:33 2012 +0100
@@ -78,6 +78,10 @@ struct page_info
 #define _PGT_pinned       PG_shift(5)
 #define PGT_pinned        PG_mask(1, 5)
 
+ /* Has this page been validated for use as its current type? */
+#define _PGT_validated    PG_shift(6)
+#define PGT_validated     PG_mask(1, 6)
+
  /* Count of uses of this frame as its current type. */
 #define PGT_count_width   PG_shift(9)
 #define PGT_count_mask    ((1UL<<PGT_count_width)-1)
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/p2m.h
--- a/xen/include/asm-arm/p2m.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/p2m.h	Fri Jun 01 10:20:33 2012 +0100
@@ -40,6 +40,15 @@ int p2m_populate_ram(struct domain *d, p
 int map_mmio_regions(struct domain *d, paddr_t start_gaddr,
                      paddr_t end_gaddr, paddr_t maddr);
 
+/* Untyped version for RAM only, for compatibility */
+int guest_physmap_add_page(struct domain *d,
+                           unsigned long gfn,
+                           unsigned long mfn,
+                           unsigned int page_order);
+void guest_physmap_remove_page(struct domain *d,
+                               unsigned long gpfn,
+                               unsigned long mfn, unsigned int page_order);
+
 unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn);
 
 /*
diff -r 3fd1f4d54094 -r dde175688d5f xen/include/asm-arm/paging.h
--- a/xen/include/asm-arm/paging.h	Fri Jun 01 10:20:32 2012 +0100
+++ b/xen/include/asm-arm/paging.h	Fri Jun 01 10:20:33 2012 +0100
@@ -1,6 +1,9 @@
 #ifndef _XEN_PAGING_H
 #define _XEN_PAGING_H
 
+#define paging_mode_translate(d)              (0)
+#define paging_mode_external(d)               (0)
+
 #endif /* XEN_PAGING_H */
 
 /*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wn-VA; Sat, 02 Jun 2012 03:11:17 +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 1SaekG-0007Vm-Oq
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [193.109.254.147:48382] by server-8.bemta-14.messagelabs.com id
	6D/02-04215-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1338606674!4547769!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18418 invoked from network); 2 Jun 2012 03:11:15 -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;
	2 Jun 2012 03:11:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0000Jo-EF
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0003V3-Ch
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Message-Id: <E1SaekE-0003V3-Ch@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allow ourselves access to all
	coprocessors in non-secure mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542439 -3600
# Node ID 8b7e5f6b1f7f84fd9aa170dc43ac88dad5e8e446
# Parent  10bb1cc00ab66e794831e0553d9045197be1d327
arm: allow ourselves access to all coprocessors in non-secure mode

We'll need it to be able to use the VFP extensions, for example.

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


diff -r 10bb1cc00ab6 -r 8b7e5f6b1f7f xen/arch/arm/mode_switch.S
--- a/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:39 2012 +0100
@@ -65,7 +65,10 @@ enter_hyp_mode:
 	mov   r0, #0
 	mcr   CP32(r0, FCSEIDR)
 	mcr   CP32(r0, CONTEXTIDR)
-	/* FIXME: ought to reset some other NS control regs here */
+	/* Allow non-secure access to coprocessors, FIQs, VFP and NEON */
+	ldr   r1, =0x3fff            /* 14 CP bits set, all others clear */
+	mcr   CP32(r1, NSACR)
+
 	mrs   r0, cpsr               /* Copy the CPSR */
 	add   r0, r0, #0x4           /* 0x16 (Monitor) -> 0x1a (Hyp) */
 	msr   spsr_cxsf, r0          /* into the SPSR */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekF-0007VI-BU; Sat, 02 Jun 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0007Ul-Cw
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from [85.158.138.51:48381] by server-9.bemta-3.messagelabs.com id
	47/AA-21565-15489CF4; Sat, 02 Jun 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606671!24093803!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15939 invoked from network); 2 Jun 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0000JW-E6
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekB-0003Ta-6D
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:11 +0000
Message-Id: <E1SaekB-0003Ta-6D@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove VGIC_SOFTIRQ
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542435 -3600
# Node ID 4406628d77edb1a7040ee9574debcdb013b2c003
# Parent  ebf41e3d1ee3041a96d84e2a6f7576171179772b
arm: remove VGIC_SOFTIRQ

Instead of using a softirq to check whether we need to set the VI bit in
the HCR (IRQ injection in the guest), always check the lr_mask on
leave_hypervisor_tail.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -433,7 +433,7 @@ out:
     return;
 }
 
-void gic_inject_irq_start(void)
+static void gic_inject_irq_start(void)
 {
     uint32_t hcr;
     hcr = READ_CP32(HCR);
@@ -441,7 +441,7 @@ void gic_inject_irq_start(void)
     isb();
 }
 
-void gic_inject_irq_stop(void)
+static void gic_inject_irq_stop(void)
 {
     uint32_t hcr;
     hcr = READ_CP32(HCR);
@@ -451,6 +451,14 @@ void gic_inject_irq_stop(void)
     }
 }
 
+void gic_inject(void)
+{
+    if (!gic.lr_mask)
+        gic_inject_irq_stop();
+    else
+        gic_inject_irq_start();
+}
+
 int gic_route_irq_to_guest(struct domain *d, unsigned int irq,
                            const char * devname)
 {
@@ -540,7 +548,6 @@ static void maintenance_interrupt(int ir
             GICC[GICC_DIR] = virq;
         }
         list_del_init(&p->inflight);
-        cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
         spin_unlock(&current->arch.vgic.lock);
 
         i++;
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/gic.h	Fri Jun 01 10:20:35 2012 +0100
@@ -128,11 +128,11 @@ extern struct pending_irq *irq_to_pendin
 
 extern void gic_route_irqs(void);
 
+extern void gic_inject(void);
+
 extern void __cpuinit init_maintenance_interrupt(void);
 extern void gic_set_guest_irq(unsigned int irq,
         unsigned int state, unsigned int priority);
-extern void gic_inject_irq_start(void);
-extern void gic_inject_irq_stop(void);
 extern int gic_route_irq_to_guest(struct domain *d, unsigned int irq,
                                   const char * devname);
 
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/traps.c	Fri Jun 01 10:20:35 2012 +0100
@@ -608,8 +608,10 @@ asmlinkage void leave_hypervisor_tail(vo
     while (1)
     {
         local_irq_disable();
-        if (!softirq_pending(smp_processor_id()))
+        if (!softirq_pending(smp_processor_id())) {
+            gic_inject();
             return;
+        }
         local_irq_enable();
         do_softirq();
     }
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/arch/arm/vgic.c
--- a/xen/arch/arm/vgic.c	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/arch/arm/vgic.c	Fri Jun 01 10:20:35 2012 +0100
@@ -577,23 +577,8 @@ void vgic_vcpu_inject_irq(struct vcpu *v
     list_add_tail(&n->inflight, &v->arch.vgic.inflight_irqs);
     spin_unlock(&v->arch.vgic.lock);
     /* we have a new higher priority irq, inject it into the guest */
-    cpu_raise_softirq(v->processor, VGIC_SOFTIRQ);
 }
 
-static void vgic_softirq(void)
-{
-    if (list_empty(&current->arch.vgic.inflight_irqs))
-        return;
-
-    gic_inject_irq_start();
-}
-
-static int __init init_vgic_softirq(void)
-{
-    open_softirq(VGIC_SOFTIRQ, vgic_softirq);
-    return 0;
-}
-__initcall(init_vgic_softirq);
 /*
  * Local variables:
  * mode: C
diff -r ebf41e3d1ee3 -r 4406628d77ed xen/include/asm-arm/softirq.h
--- a/xen/include/asm-arm/softirq.h	Fri Jun 01 10:20:34 2012 +0100
+++ b/xen/include/asm-arm/softirq.h	Fri Jun 01 10:20:35 2012 +0100
@@ -1,8 +1,7 @@
 #ifndef __ASM_SOFTIRQ_H__
 #define __ASM_SOFTIRQ_H__
 
-#define VGIC_SOFTIRQ        (NR_COMMON_SOFTIRQS + 0)
-#define NR_ARCH_SOFTIRQS       1
+#define NR_ARCH_SOFTIRQS       0
 
 #endif /* __ASM_SOFTIRQ_H__ */
 /*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wb-QN; Sat, 02 Jun 2012 03:11:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0007VB-DI
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.143.35:24515] by server-1.bemta-4.messagelabs.com id
	FC/DD-27869-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1338606674!17211337!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15908 invoked from network); 2 Jun 2012 03:11:15 -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;
	2 Jun 2012 03:11:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0000Jl-Ti
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekD-0003Uo-S5
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Message-Id: <E1SaekD-0003Uo-S5@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: missing __init annotation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542439 -3600
# Node ID 10bb1cc00ab66e794831e0553d9045197be1d327
# Parent  b2d9f2411d711d8177acf1af0fbe9f0c9115c7ef
arm: missing __init annotation

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


diff -r b2d9f2411d71 -r 10bb1cc00ab6 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Fri Jun 01 10:20:38 2012 +0100
+++ b/xen/arch/arm/setup.c	Fri Jun 01 10:20:39 2012 +0100
@@ -51,7 +51,7 @@ static void __init init_idle_domain(void
         /* TODO: setup_idle_pagetable(); */
 }
 
-static void processor_id(void)
+static void __init processor_id(void)
 {
     printk("Processor Features: %08x %08x\n",
            READ_CP32(ID_PFR0), READ_CP32(ID_PFR0));

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wn-VA; Sat, 02 Jun 2012 03:11:17 +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 1SaekG-0007Vm-Oq
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [193.109.254.147:48382] by server-8.bemta-14.messagelabs.com id
	6D/02-04215-45489CF4; Sat, 02 Jun 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1338606674!4547769!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18418 invoked from network); 2 Jun 2012 03:11:15 -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;
	2 Jun 2012 03:11:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0000Jo-EF
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekE-0003V3-Ch
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:14 +0000
Message-Id: <E1SaekE-0003V3-Ch@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allow ourselves access to all
	coprocessors in non-secure mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542439 -3600
# Node ID 8b7e5f6b1f7f84fd9aa170dc43ac88dad5e8e446
# Parent  10bb1cc00ab66e794831e0553d9045197be1d327
arm: allow ourselves access to all coprocessors in non-secure mode

We'll need it to be able to use the VFP extensions, for example.

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


diff -r 10bb1cc00ab6 -r 8b7e5f6b1f7f xen/arch/arm/mode_switch.S
--- a/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:39 2012 +0100
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:39 2012 +0100
@@ -65,7 +65,10 @@ enter_hyp_mode:
 	mov   r0, #0
 	mcr   CP32(r0, FCSEIDR)
 	mcr   CP32(r0, CONTEXTIDR)
-	/* FIXME: ought to reset some other NS control regs here */
+	/* Allow non-secure access to coprocessors, FIQs, VFP and NEON */
+	ldr   r1, =0x3fff            /* 14 CP bits set, all others clear */
+	mcr   CP32(r1, NSACR)
+
 	mrs   r0, cpsr               /* Copy the CPSR */
 	add   r0, r0, #0x4           /* 0x16 (Monitor) -> 0x1a (Hyp) */
 	msr   spsr_cxsf, r0          /* into the SPSR */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekH-0007Wh-Sv; Sat, 02 Jun 2012 03:11:17 +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 1SaekG-0007Va-Ew
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from [85.158.138.51:48439] by server-10.bemta-3.messagelabs.com id
	FF/34-12071-35489CF4; Sat, 02 Jun 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1338606673!24093805!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16025 invoked from network); 2 Jun 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0000Jf-Rt
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0003UK-QL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:12 +0000
Message-Id: <E1SaekC-0003UK-QL@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Move hyp-mode entry code out of
	line.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1338542437 -3600
# Node ID b2649ecbe06f5624ca42066ea9d506eed1562d55
# Parent  99641bdf1a6783e309133230ed141042c322e51e
arm: Move hyp-mode entry code out of line.

This code is grottier than the rest of the start-of-day code and
very specific to the software model we're developing on.
Segregate it accordingly, by putting it in its own file.

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


diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/Makefile
--- a/xen/arch/arm/Makefile	Fri Jun 01 10:20:36 2012 +0100
+++ b/xen/arch/arm/Makefile	Fri Jun 01 10:20:37 2012 +0100
@@ -12,6 +12,7 @@ obj-y += io.o
 obj-y += irq.o
 obj-y += kernel.o
 obj-y += mm.o
+obj-y += mode_switch.o
 obj-y += p2m.o
 obj-y += percpu.o
 obj-y += guestcopy.o
diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/head.S
--- a/xen/arch/arm/head.S	Fri Jun 01 10:20:36 2012 +0100
+++ b/xen/arch/arm/head.S	Fri Jun 01 10:20:37 2012 +0100
@@ -122,50 +122,9 @@ 1:
 1:
 	/* OK, we're in Secure state. */
 	PRINT("- Started in Secure state -\r\n- Entering Hyp mode -\r\n")
-
-	/* Dance into Hyp mode */
-	cpsid aif, #0x16             /* Enter Monitor mode */
-	mrc   CP32(r0, SCR)
-	orr   r0, r0, #0x100         /* Set HCE */
-	orr   r0, r0, #0xb1          /* Set SCD, AW, FW and NS */
-	bic   r0, r0, #0xe           /* Clear EA, FIQ and IRQ */
-	mcr   CP32(r0, SCR)
-	/* Ugly: the system timer's frequency register is only
-	 * programmable in Secure state.  Since we don't know where its
-	 * memory-mapped control registers live, we can't find out the
-	 * right frequency.  Use the VE model's default frequency here. */
-	ldr   r0, =0x5f5e100         /* 100 MHz */
-	mcr   CP32(r0, CNTFRQ)
-	ldr   r0, =0x40c00           /* SMP, c11, c10 in non-secure mode */
-	mcr   CP32(r0, NSACR)
-	/* Continuing ugliness: Set up the GIC so NS state owns interrupts */
-	mov   r0, #GIC_BASE_ADDRESS
-	add   r0, r0, #GIC_DR_OFFSET
-	mov   r1, #0
-	str   r1, [r0]               /* Disable delivery in the distributor */
-	add   r0, r0, #0x80          /* GICD_IGROUP0 */
-	mov   r2, #0xffffffff        /* All interrupts to group 1 */
-	str   r2, [r0]
-	str   r2, [r0, #4]
-	str   r2, [r0, #8]
-	/* Must drop priority mask below 0x80 before entering NS state */
-	mov   r0, #GIC_BASE_ADDRESS
-	add   r0, r0, #GIC_CR_OFFSET
-	ldr   r1, =0xff
-	str   r1, [r0, #0x4]         /* -> GICC_PMR */
-	/* Reset a few config registers */
-	mov   r0, #0
-	mcr   CP32(r0, FCSEIDR)
-	mcr   CP32(r0, CONTEXTIDR)
-	/* FIXME: ought to reset some other NS control regs here */
-	adr   r1, 1f
-	adr   r0, hyp                /* Store paddr (hyp entry point) */
-	str   r0, [r1]               /* where we can use it for RFE */
-	isb                          /* Ensure we see the stored target address */
-	rfeia r1                     /* Enter Hyp mode */
-
-1:	.word 0                      /* PC to enter Hyp mode at */
-	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
+	ldr   r0, =enter_hyp_mode    /* VA of function */
+	adr   lr, hyp                /* Set return address for call */
+	add   pc, r0, r10            /* Call PA of function */
 
 hyp:
 	PRINT("- Setting up control registers -\r\n")
diff -r 99641bdf1a67 -r b2649ecbe06f xen/arch/arm/mode_switch.S
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/arm/mode_switch.S	Fri Jun 01 10:20:37 2012 +0100
@@ -0,0 +1,76 @@
+/*
+ * xen/arch/arm/mode_switch.S
+ *
+ * Start-of day code to take a CPU from Secure mode to Hyp mode.
+ *
+ * Tim Deegan <tim@xen.org>
+ * Copyright (c) 2011-2012 Citrix Systems.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <asm/config.h>
+#include <asm/page.h>
+#include <asm/asm_defns.h>
+
+/* Get up a CPU into Hyp mode.  Clobbers r0-r3.
+ *
+ * This code is specific to the VE model, and not intended to be used
+ * on production systems.  As such it's a bit hackier than the main
+ * boot code in head.S.  In future it will be replaced by better
+ * integration with the bootloader/firmware so that Xen always starts
+ * in Hyp mode. */
+
+.globl enter_hyp_mode
+enter_hyp_mode:
+	mov   r3, lr                 /* Put return address in non-banked reg */
+	cpsid aif, #0x16             /* Enter Monitor mode */
+	mrc   CP32(r0, SCR)
+	orr   r0, r0, #0x100         /* Set HCE */
+	orr   r0, r0, #0xb1          /* Set SCD, AW, FW and NS */
+	bic   r0, r0, #0xe           /* Clear EA, FIQ and IRQ */
+	mcr   CP32(r0, SCR)
+	/* Ugly: the system timer's frequency register is only
+	 * programmable in Secure state.  Since we don't know where its
+	 * memory-mapped control registers live, we can't find out the
+	 * right frequency.  Use the VE model's default frequency here. */
+	ldr   r0, =0x5f5e100         /* 100 MHz */
+	mcr   CP32(r0, CNTFRQ)
+	ldr   r0, =0x40c00           /* SMP, c11, c10 in non-secure mode */
+	mcr   CP32(r0, NSACR)
+	/* Continuing ugliness: Set up the GIC so NS state owns interrupts */
+	mov   r0, #GIC_BASE_ADDRESS
+	add   r0, r0, #GIC_DR_OFFSET
+	mov   r1, #0
+	str   r1, [r0]               /* Disable delivery in the distributor */
+	add   r0, r0, #0x80          /* GICD_IGROUP0 */
+	mov   r2, #0xffffffff        /* All interrupts to group 1 */
+	str   r2, [r0]
+	str   r2, [r0, #4]
+	str   r2, [r0, #8]
+	/* Must drop priority mask below 0x80 before entering NS state */
+	mov   r0, #GIC_BASE_ADDRESS
+	add   r0, r0, #GIC_CR_OFFSET
+	ldr   r1, =0xff
+	str   r1, [r0, #0x4]         /* -> GICC_PMR */
+	/* Reset a few config registers */
+	mov   r0, #0
+	mcr   CP32(r0, FCSEIDR)
+	mcr   CP32(r0, CONTEXTIDR)
+	/* FIXME: ought to reset some other NS control regs here */
+	adr   r1, 1f                 /* Store return address */
+	str   r3, [r1]               /* where we can use it for RFE */
+	isb                          /* Ensure we see the stored address */
+	rfeia r1                     /* Enter Hyp mode */
+
+1:	.word 0                      /* PC to enter Hyp mode at */
+	.word 0x000001da             /* CPSR: LE, Abort/IRQ/FIQ off, Hyp */
+

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekE-0007Un-3n; Sat, 02 Jun 2012 03:11:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0007UV-TZ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from [85.158.138.51:48306] by server-2.bemta-3.messagelabs.com id
	21/B6-17140-05489CF4; Sat, 02 Jun 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1338606670!27578216!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6220 invoked from network); 2 Jun 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0000JM-Q1
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0003Sp-IL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Message-Id: <E1Saek9-0003Sp-IL@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: replace list_del and
	INIT_LIST_HEAD with list_del_init
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542432 -3600
# Node ID 3fd1f4d540947c766e8cfef696879fdc55cde4e5
# Parent  ded5cb662d6ed8d14417c37c0565d2683dbde92d
arm: replace list_del and INIT_LIST_HEAD with list_del_init

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ded5cb662d6e -r 3fd1f4d54094 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:31 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:32 2012 +0100
@@ -539,8 +539,7 @@ static void maintenance_interrupt(int ir
             p->desc->status &= ~IRQ_INPROGRESS;
             GICC[GICC_DIR] = virq;
         }
-        list_del(&p->inflight);
-        INIT_LIST_HEAD(&p->inflight);
+        list_del_init(&p->inflight);
         cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
         spin_unlock(&current->arch.vgic.lock);
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekK-0007YS-6H; Sat, 02 Jun 2012 03:11:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0007VB-MZ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Received: from [85.158.143.35:24589] by server-1.bemta-4.messagelabs.com id
	0E/DD-27869-65489CF4; Sat, 02 Jun 2012 03:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1338606676!18531088!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6041 invoked from network); 2 Jun 2012 03:11:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0000Jz-3h
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0003WV-2d
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Message-Id: <E1SaekG-0003WV-2d@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: rename libxl_sched_params to
	libxl_domain_sched_params
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548779 -3600
# Node ID 648508ee27a22b724b8d2d636550af2c25a9a38a
# Parent  7d15860d75abcb1e81982edaa1d0c2aacb4ef70c
libxl: rename libxl_sched_params to libxl_domain_sched_params

Remove credit scheduler global options from the struct, they were never used
anyway.

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


diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:19 2012 +0100
@@ -42,7 +42,8 @@ libxl_domain_type libxl__domain_type(lib
         return LIBXL_DOMAIN_TYPE_PV;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams)
+int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                            libxl_domain_sched_params *scparams)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     libxl_scheduler sched;
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:19 2012 +0100
@@ -742,7 +742,8 @@ _hidden libxl_domain_type libxl__domain_
 _hidden int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid);
 _hidden libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid);
-_hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams);
+_hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                                    libxl_domain_sched_params *scparams);
 #define LIBXL__DOMAIN_IS_TYPE(gc, domid, type) \
     libxl__domain_type((gc), (domid)) == LIBXL_DOMAIN_TYPE_##type
 typedef struct {
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:19 2012 +0100
@@ -224,11 +224,9 @@ libxl_domain_create_info = Struct("domai
 
 MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT")
 
-libxl_sched_params = Struct("sched_params",[
+libxl_domain_sched_params = Struct("domain_sched_params",[
     ("weight",       integer),
     ("cap",          integer),
-    ("tslice_ms",    integer),
-    ("ratelimit_us", integer),
     ("period",       integer),
     ("slice",        integer),
     ("latency",      integer),
@@ -263,7 +261,7 @@ libxl_domain_build_info = Struct("domain
     # extra parameters pass directly to qemu for HVM guest, NULL terminated
     ("extra_hvm",        libxl_string_list),
     #  parameters for all type of scheduler
-    ("sched_params",     libxl_sched_params),
+    ("sched_params",     libxl_domain_sched_params),
 
     ("u", KeyedUnion(None, libxl_domain_type, "type",
                 [("hvm", Struct(None, [("firmware",         string),
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:19 2012 +0100
@@ -635,10 +635,6 @@ static void parse_config_data(const char
         b_info->sched_params.weight = l;
     if (!xlu_cfg_get_long (config, "cap", &l, 0))
         b_info->sched_params.cap = l;
-    if (!xlu_cfg_get_long (config, "tslice_ms", &l, 0))
-        b_info->sched_params.tslice_ms = l;
-    if (!xlu_cfg_get_long (config, "ratelimit_us", &l, 0))
-        b_info->sched_params.ratelimit_us = l;
     if (!xlu_cfg_get_long (config, "period", &l, 0))
         b_info->sched_params.period = l;
     if (!xlu_cfg_get_long (config, "slice", &l, 0))

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekK-0007YS-6H; Sat, 02 Jun 2012 03:11:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0007VB-MZ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Received: from [85.158.143.35:24589] by server-1.bemta-4.messagelabs.com id
	0E/DD-27869-65489CF4; Sat, 02 Jun 2012 03:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1338606676!18531088!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6041 invoked from network); 2 Jun 2012 03:11:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0000Jz-3h
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0003WV-2d
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Message-Id: <E1SaekG-0003WV-2d@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: rename libxl_sched_params to
	libxl_domain_sched_params
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548779 -3600
# Node ID 648508ee27a22b724b8d2d636550af2c25a9a38a
# Parent  7d15860d75abcb1e81982edaa1d0c2aacb4ef70c
libxl: rename libxl_sched_params to libxl_domain_sched_params

Remove credit scheduler global options from the struct, they were never used
anyway.

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


diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:19 2012 +0100
@@ -42,7 +42,8 @@ libxl_domain_type libxl__domain_type(lib
         return LIBXL_DOMAIN_TYPE_PV;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams)
+int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                            libxl_domain_sched_params *scparams)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     libxl_scheduler sched;
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:19 2012 +0100
@@ -742,7 +742,8 @@ _hidden libxl_domain_type libxl__domain_
 _hidden int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid);
 _hidden libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid);
-_hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams);
+_hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                                    libxl_domain_sched_params *scparams);
 #define LIBXL__DOMAIN_IS_TYPE(gc, domid, type) \
     libxl__domain_type((gc), (domid)) == LIBXL_DOMAIN_TYPE_##type
 typedef struct {
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:19 2012 +0100
@@ -224,11 +224,9 @@ libxl_domain_create_info = Struct("domai
 
 MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT")
 
-libxl_sched_params = Struct("sched_params",[
+libxl_domain_sched_params = Struct("domain_sched_params",[
     ("weight",       integer),
     ("cap",          integer),
-    ("tslice_ms",    integer),
-    ("ratelimit_us", integer),
     ("period",       integer),
     ("slice",        integer),
     ("latency",      integer),
@@ -263,7 +261,7 @@ libxl_domain_build_info = Struct("domain
     # extra parameters pass directly to qemu for HVM guest, NULL terminated
     ("extra_hvm",        libxl_string_list),
     #  parameters for all type of scheduler
-    ("sched_params",     libxl_sched_params),
+    ("sched_params",     libxl_domain_sched_params),
 
     ("u", KeyedUnion(None, libxl_domain_type, "type",
                 [("hvm", Struct(None, [("firmware",         string),
diff -r 7d15860d75ab -r 648508ee27a2 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:18 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:19 2012 +0100
@@ -635,10 +635,6 @@ static void parse_config_data(const char
         b_info->sched_params.weight = l;
     if (!xlu_cfg_get_long (config, "cap", &l, 0))
         b_info->sched_params.cap = l;
-    if (!xlu_cfg_get_long (config, "tslice_ms", &l, 0))
-        b_info->sched_params.tslice_ms = l;
-    if (!xlu_cfg_get_long (config, "ratelimit_us", &l, 0))
-        b_info->sched_params.ratelimit_us = l;
     if (!xlu_cfg_get_long (config, "period", &l, 0))
         b_info->sched_params.period = l;
     if (!xlu_cfg_get_long (config, "slice", &l, 0))

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekE-0007Un-3n; Sat, 02 Jun 2012 03:11:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekC-0007UV-TZ
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:13 +0000
Received: from [85.158.138.51:48306] by server-2.bemta-3.messagelabs.com id
	21/B6-17140-05489CF4; Sat, 02 Jun 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1338606670!27578216!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6220 invoked from network); 2 Jun 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0000JM-Q1
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Saek9-0003Sp-IL
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:09 +0000
Message-Id: <E1Saek9-0003Sp-IL@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: replace list_del and
	INIT_LIST_HEAD with list_del_init
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
# Date 1338542432 -3600
# Node ID 3fd1f4d540947c766e8cfef696879fdc55cde4e5
# Parent  ded5cb662d6ed8d14417c37c0565d2683dbde92d
arm: replace list_del and INIT_LIST_HEAD with list_del_init

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ded5cb662d6e -r 3fd1f4d54094 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Jun 01 10:20:31 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Jun 01 10:20:32 2012 +0100
@@ -539,8 +539,7 @@ static void maintenance_interrupt(int ir
             p->desc->status &= ~IRQ_INPROGRESS;
             GICC[GICC_DIR] = virq;
         }
-        list_del(&p->inflight);
-        INIT_LIST_HEAD(&p->inflight);
+        list_del_init(&p->inflight);
         cpu_raise_softirq(current->processor, VGIC_SOFTIRQ);
         spin_unlock(&current->arch.vgic.lock);
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekM-0007bP-EQ; Sat, 02 Jun 2012 03:11:22 +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 1SaekJ-0007V7-KX
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from [85.158.143.35:24625] by server-2.bemta-4.messagelabs.com id
	01/FF-11595-75489CF4; Sat, 02 Jun 2012 03:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1338606677!15924062!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11483 invoked from network); 2 Jun 2012 03:11:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0000K5-7t
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0003X1-6o
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Message-Id: <E1SaekH-0003X1-6o@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: move libxl__sched_set_params
	into libxl.c
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548780 -3600
# Node ID 4f743faf755977697ad0060f888a93753dc40f54
# Parent  53a905c9bb9a784e205c29a39f76153399e27ee0
libxl: move libxl__sched_set_params into libxl.c

All the other sched functions are here and I'm just about to make those static
functions as I make libxl__sched_set_params the public function.

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


diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -3549,6 +3549,33 @@ int libxl_sched_sedf_domain_set(libxl_ct
     return 0;
 }
 
+int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                            libxl_domain_sched_params *scparams)
+{
+    libxl_scheduler sched = scparams->sched;
+    int ret;
+
+    if (sched == LIBXL_SCHEDULER_UNKNOWN)
+        sched = libxl__domain_scheduler(gc, domid);
+
+    switch (sched) {
+    case LIBXL_SCHEDULER_SEDF:
+        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        break;
+    case LIBXL_SCHEDULER_CREDIT:
+        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        break;
+    case LIBXL_SCHEDULER_CREDIT2:
+        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        break;
+    default:
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
+    }
+    return ret;
+}
+
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid)
 {
diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
@@ -42,33 +42,6 @@ libxl_domain_type libxl__domain_type(lib
         return LIBXL_DOMAIN_TYPE_PV;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
-                            libxl_domain_sched_params *scparams)
-{
-    libxl_scheduler sched = scparams->sched;
-    int ret;
-
-    if (sched == LIBXL_SCHEDULER_UNKNOWN)
-        sched = libxl__domain_scheduler(gc, domid);
-
-    switch (sched) {
-    case LIBXL_SCHEDULER_SEDF:
-        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
-        break;
-    case LIBXL_SCHEDULER_CREDIT:
-        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
-        break;
-    case LIBXL_SCHEDULER_CREDIT2:
-        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
-        break;
-    default:
-        LOG(ERROR, "Unknown scheduler");
-        ret=ERROR_INVAL;
-        break;
-    }
-    return ret;
-}
-
 int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekM-0007bP-EQ; Sat, 02 Jun 2012 03:11:22 +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 1SaekJ-0007V7-KX
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from [85.158.143.35:24625] by server-2.bemta-4.messagelabs.com id
	01/FF-11595-75489CF4; Sat, 02 Jun 2012 03:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1338606677!15924062!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11483 invoked from network); 2 Jun 2012 03:11:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0000K5-7t
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0003X1-6o
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Message-Id: <E1SaekH-0003X1-6o@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: move libxl__sched_set_params
	into libxl.c
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548780 -3600
# Node ID 4f743faf755977697ad0060f888a93753dc40f54
# Parent  53a905c9bb9a784e205c29a39f76153399e27ee0
libxl: move libxl__sched_set_params into libxl.c

All the other sched functions are here and I'm just about to make those static
functions as I make libxl__sched_set_params the public function.

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


diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -3549,6 +3549,33 @@ int libxl_sched_sedf_domain_set(libxl_ct
     return 0;
 }
 
+int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
+                            libxl_domain_sched_params *scparams)
+{
+    libxl_scheduler sched = scparams->sched;
+    int ret;
+
+    if (sched == LIBXL_SCHEDULER_UNKNOWN)
+        sched = libxl__domain_scheduler(gc, domid);
+
+    switch (sched) {
+    case LIBXL_SCHEDULER_SEDF:
+        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        break;
+    case LIBXL_SCHEDULER_CREDIT:
+        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        break;
+    case LIBXL_SCHEDULER_CREDIT2:
+        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        break;
+    default:
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
+    }
+    return ret;
+}
+
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid)
 {
diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
@@ -42,33 +42,6 @@ libxl_domain_type libxl__domain_type(lib
         return LIBXL_DOMAIN_TYPE_PV;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
-                            libxl_domain_sched_params *scparams)
-{
-    libxl_scheduler sched = scparams->sched;
-    int ret;
-
-    if (sched == LIBXL_SCHEDULER_UNKNOWN)
-        sched = libxl__domain_scheduler(gc, domid);
-
-    switch (sched) {
-    case LIBXL_SCHEDULER_SEDF:
-        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
-        break;
-    case LIBXL_SCHEDULER_CREDIT:
-        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
-        break;
-    case LIBXL_SCHEDULER_CREDIT2:
-        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
-        break;
-    default:
-        LOG(ERROR, "Unknown scheduler");
-        ret=ERROR_INVAL;
-        break;
-    }
-    return ret;
-}
-
 int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekL-0007ao-Av; Sat, 02 Jun 2012 03:11:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0007XF-6w
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from [85.158.143.99:26059] by server-3.bemta-4.messagelabs.com id
	99/6F-04252-65489CF4; Sat, 02 Jun 2012 03:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1338606675!21229070!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15783 invoked from network); 2 Jun 2012 03:11:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0000Jw-II
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0003WG-Gr
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Message-Id: <E1SaekF-0003WG-Gr@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: add internal function to get
	a domain's scheduler
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548778 -3600
# Node ID 7d15860d75abcb1e81982edaa1d0c2aacb4ef70c
# Parent  137b02968b406c19124819d00cba46a990834b52
libxl: add internal function to get a domain's scheduler

This takes into account cpupools.

Add a helper to get the info for a single cpu pool, refactor libxl_list_cpupool
t use this. While there fix the leaks due to not disposing the partial list on
realloc failure in that function.

Fix the failure of sched_domain_output to free the poolinfo list.

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


diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:18 2012 +0100
@@ -552,41 +552,70 @@ int libxl_domain_info(libxl_ctx *ctx, li
     return 0;
 }
 
+static int cpupool_info(libxl__gc *gc,
+                        libxl_cpupoolinfo *info,
+                        uint32_t poolid,
+                        bool exact /* exactly poolid or >= poolid */)
+{
+    xc_cpupoolinfo_t *xcinfo;
+    int rc = ERROR_FAIL;
+
+    xcinfo = xc_cpupool_getinfo(CTX->xch, poolid);
+    if (xcinfo == NULL)
+        return ERROR_FAIL;
+
+    if (exact && xcinfo->cpupool_id != poolid)
+        goto out;
+
+    info->poolid = xcinfo->cpupool_id;
+    info->sched = xcinfo->sched_id;
+    info->n_dom = xcinfo->n_dom;
+    if (libxl_cpumap_alloc(CTX, &info->cpumap))
+        goto out;
+    memcpy(info->cpumap.map, xcinfo->cpumap, info->cpumap.size);
+
+    rc = 0;
+out:
+    xc_cpupool_infofree(CTX->xch, xcinfo);
+    return rc;
+}
+
+int libxl_cpupool_info(libxl_ctx *ctx,
+                       libxl_cpupoolinfo *info, uint32_t poolid)
+{
+    GC_INIT(ctx);
+    int rc = cpupool_info(gc, info, poolid, true);
+    GC_FREE;
+    return rc;
+}
+
 libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx *ctx, int *nb_pool)
 {
-    libxl_cpupoolinfo *ptr, *tmp;
+    GC_INIT(ctx);
+    libxl_cpupoolinfo info, *ptr, *tmp;
     int i;
-    xc_cpupoolinfo_t *info;
     uint32_t poolid;
 
     ptr = NULL;
 
     poolid = 0;
     for (i = 0;; i++) {
-        info = xc_cpupool_getinfo(ctx->xch, poolid);
-        if (info == NULL)
+        if (cpupool_info(gc, &info, poolid, false))
             break;
         tmp = realloc(ptr, (i + 1) * sizeof(libxl_cpupoolinfo));
         if (!tmp) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpupool info");
-            free(ptr);
-            xc_cpupool_infofree(ctx->xch, info);
-            return NULL;
+            libxl_cpupoolinfo_list_free(ptr, i);
+            goto out;
         }
         ptr = tmp;
-        ptr[i].poolid = info->cpupool_id;
-        ptr[i].sched = info->sched_id;
-        ptr[i].n_dom = info->n_dom;
-        if (libxl_cpumap_alloc(ctx, &ptr[i].cpumap)) {
-            xc_cpupool_infofree(ctx->xch, info);
-            break;
-        }
-        memcpy(ptr[i].cpumap.map, info->cpumap, ptr[i].cpumap.size);
-        poolid = info->cpupool_id + 1;
-        xc_cpupool_infofree(ctx->xch, info);
+        ptr[i] = info;
+        poolid = info.poolid + 1;
     }
 
     *nb_pool = i;
+out:
+    GC_FREE;
     return ptr;
 }
 
@@ -4031,14 +4060,10 @@ int libxl_cpupool_cpuremove_node(libxl_c
         }
     }
 
-    for (cpu = 0; cpu < nr_cpus; cpu++)
-        libxl_cputopology_dispose(&topology[cpu]);
-    free(topology);
+    libxl_cputopology_list_free(topology, nr_cpus);
 
 out:
-    for (p = 0; p < n_pools; p++) {
-        libxl_cpupoolinfo_dispose(poolinfo + p);
-    }
+    libxl_cpupoolinfo_list_free(poolinfo, n_pools);
 
     return ret;
 }
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:18 2012 +0100
@@ -576,6 +576,7 @@ int libxl_domain_info(libxl_ctx*, libxl_
 libxl_dominfo * libxl_list_domain(libxl_ctx*, int *nb_domain);
 void libxl_dominfo_list_free(libxl_dominfo *list, int nr);
 libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx*, int *nb_pool);
+void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nr);
 libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm);
 void libxl_vminfo_list_free(libxl_vminfo *list, int nr);
 
@@ -822,6 +823,7 @@ int libxl_cpupool_cpuadd_node(libxl_ctx 
 int libxl_cpupool_cpuremove(libxl_ctx *ctx, uint32_t poolid, int cpu);
 int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus);
 int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid);
+int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_t poolid);
 
 int libxl_domid_valid_guest(uint32_t domid);
 
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:18 2012 +0100
@@ -93,6 +93,41 @@ int libxl__domain_shutdown_reason(libxl_
     return (info.flags >> XEN_DOMINF_shutdownshift) & XEN_DOMINF_shutdownmask;
 }
 
+int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid)
+{
+    xc_domaininfo_t info;
+    int ret;
+
+    ret = xc_domain_getinfolist(CTX->xch, domid, 1, &info);
+    if (ret != 1)
+        return ERROR_FAIL;
+    if (info.domain != domid)
+        return ERROR_FAIL;
+
+    return info.cpupool;
+}
+
+libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid)
+{
+    uint32_t cpupool = libxl__domain_cpupool(gc, domid);
+    libxl_cpupoolinfo poolinfo;
+    libxl_scheduler sched = LIBXL_SCHEDULER_UNKNOWN;
+    int rc;
+
+    if (cpupool < 0)
+        return sched;
+
+    rc = libxl_cpupool_info(CTX, &poolinfo, cpupool);
+    if (rc < 0)
+        goto out;
+
+    sched = poolinfo.sched;
+
+out:
+    libxl_cpupoolinfo_dispose(&poolinfo);
+    return sched;
+}
+
 int libxl__build_pre(libxl__gc *gc, uint32_t domid,
               libxl_domain_build_info *info, libxl__domain_build_state *state)
 {
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:18 2012 +0100
@@ -740,6 +740,8 @@ _hidden int libxl__file_reference_unmap(
 /* from xl_dom */
 _hidden libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid);
+_hidden int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid);
+_hidden libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams);
 #define LIBXL__DOMAIN_IS_TYPE(gc, domid, type) \
     libxl__domain_type((gc), (domid)) == LIBXL_DOMAIN_TYPE_##type
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:18 2012 +0100
@@ -107,7 +107,9 @@ libxl_bios_type = Enumeration("bios_type
     ])
 
 # Consistent with values defined in domctl.h
+# Except unknown which we have made up
 libxl_scheduler = Enumeration("scheduler", [
+    (0, "unknown"),
     (4, "sedf"),
     (5, "credit"),
     (6, "credit2"),
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_utils.c	Fri Jun 01 12:06:18 2012 +0100
@@ -133,9 +133,8 @@ int libxl_name_to_cpupoolid(libxl_ctx *c
             }
             free(poolname);
         }
-        libxl_cpupoolinfo_dispose(poolinfo + i);
     }
-    free(poolinfo);
+    libxl_cpupoolinfo_list_free(poolinfo, nb_pools);
     return ret;
 }
 
@@ -688,6 +687,14 @@ void libxl_vminfo_list_free(libxl_vminfo
     free(list);
 }
 
+void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nr)
+{
+    int i;
+    for (i = 0; i < nr; i++)
+        libxl_cpupoolinfo_dispose(&list[i]);
+    free(list);
+}
+
 int libxl_domid_valid_guest(uint32_t domid)
 {
     /* returns 1 if the value _could_ be a valid guest domid, 0 otherwise
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:18 2012 +0100
@@ -4610,11 +4610,8 @@ static int sched_domain_output(libxl_sch
                 break;
         }
     }
-    if (poolinfo) {
-        for (p = 0; p < n_pools; p++) {
-            libxl_cpupoolinfo_dispose(poolinfo + p);
-        }
-    }
+    if (poolinfo)
+        libxl_cpupoolinfo_list_free(poolinfo, n_pools);
     return 0;
 }
 
@@ -6122,8 +6119,9 @@ int main_cpupoollist(int argc, char **ar
                 printf("\n");
             }
         }
-        libxl_cpupoolinfo_dispose(poolinfo + p);
-    }
+    }
+
+    libxl_cpupoolinfo_list_free(poolinfo, n_pools);
 
     return ret;
 }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekL-0007ao-Av; Sat, 02 Jun 2012 03:11:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0007XF-6w
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from [85.158.143.99:26059] by server-3.bemta-4.messagelabs.com id
	99/6F-04252-65489CF4; Sat, 02 Jun 2012 03:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1338606675!21229070!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15783 invoked from network); 2 Jun 2012 03:11:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0000Jw-II
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekF-0003WG-Gr
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:15 +0000
Message-Id: <E1SaekF-0003WG-Gr@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: add internal function to get
	a domain's scheduler
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548778 -3600
# Node ID 7d15860d75abcb1e81982edaa1d0c2aacb4ef70c
# Parent  137b02968b406c19124819d00cba46a990834b52
libxl: add internal function to get a domain's scheduler

This takes into account cpupools.

Add a helper to get the info for a single cpu pool, refactor libxl_list_cpupool
t use this. While there fix the leaks due to not disposing the partial list on
realloc failure in that function.

Fix the failure of sched_domain_output to free the poolinfo list.

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


diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:18 2012 +0100
@@ -552,41 +552,70 @@ int libxl_domain_info(libxl_ctx *ctx, li
     return 0;
 }
 
+static int cpupool_info(libxl__gc *gc,
+                        libxl_cpupoolinfo *info,
+                        uint32_t poolid,
+                        bool exact /* exactly poolid or >= poolid */)
+{
+    xc_cpupoolinfo_t *xcinfo;
+    int rc = ERROR_FAIL;
+
+    xcinfo = xc_cpupool_getinfo(CTX->xch, poolid);
+    if (xcinfo == NULL)
+        return ERROR_FAIL;
+
+    if (exact && xcinfo->cpupool_id != poolid)
+        goto out;
+
+    info->poolid = xcinfo->cpupool_id;
+    info->sched = xcinfo->sched_id;
+    info->n_dom = xcinfo->n_dom;
+    if (libxl_cpumap_alloc(CTX, &info->cpumap))
+        goto out;
+    memcpy(info->cpumap.map, xcinfo->cpumap, info->cpumap.size);
+
+    rc = 0;
+out:
+    xc_cpupool_infofree(CTX->xch, xcinfo);
+    return rc;
+}
+
+int libxl_cpupool_info(libxl_ctx *ctx,
+                       libxl_cpupoolinfo *info, uint32_t poolid)
+{
+    GC_INIT(ctx);
+    int rc = cpupool_info(gc, info, poolid, true);
+    GC_FREE;
+    return rc;
+}
+
 libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx *ctx, int *nb_pool)
 {
-    libxl_cpupoolinfo *ptr, *tmp;
+    GC_INIT(ctx);
+    libxl_cpupoolinfo info, *ptr, *tmp;
     int i;
-    xc_cpupoolinfo_t *info;
     uint32_t poolid;
 
     ptr = NULL;
 
     poolid = 0;
     for (i = 0;; i++) {
-        info = xc_cpupool_getinfo(ctx->xch, poolid);
-        if (info == NULL)
+        if (cpupool_info(gc, &info, poolid, false))
             break;
         tmp = realloc(ptr, (i + 1) * sizeof(libxl_cpupoolinfo));
         if (!tmp) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "allocating cpupool info");
-            free(ptr);
-            xc_cpupool_infofree(ctx->xch, info);
-            return NULL;
+            libxl_cpupoolinfo_list_free(ptr, i);
+            goto out;
         }
         ptr = tmp;
-        ptr[i].poolid = info->cpupool_id;
-        ptr[i].sched = info->sched_id;
-        ptr[i].n_dom = info->n_dom;
-        if (libxl_cpumap_alloc(ctx, &ptr[i].cpumap)) {
-            xc_cpupool_infofree(ctx->xch, info);
-            break;
-        }
-        memcpy(ptr[i].cpumap.map, info->cpumap, ptr[i].cpumap.size);
-        poolid = info->cpupool_id + 1;
-        xc_cpupool_infofree(ctx->xch, info);
+        ptr[i] = info;
+        poolid = info.poolid + 1;
     }
 
     *nb_pool = i;
+out:
+    GC_FREE;
     return ptr;
 }
 
@@ -4031,14 +4060,10 @@ int libxl_cpupool_cpuremove_node(libxl_c
         }
     }
 
-    for (cpu = 0; cpu < nr_cpus; cpu++)
-        libxl_cputopology_dispose(&topology[cpu]);
-    free(topology);
+    libxl_cputopology_list_free(topology, nr_cpus);
 
 out:
-    for (p = 0; p < n_pools; p++) {
-        libxl_cpupoolinfo_dispose(poolinfo + p);
-    }
+    libxl_cpupoolinfo_list_free(poolinfo, n_pools);
 
     return ret;
 }
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:18 2012 +0100
@@ -576,6 +576,7 @@ int libxl_domain_info(libxl_ctx*, libxl_
 libxl_dominfo * libxl_list_domain(libxl_ctx*, int *nb_domain);
 void libxl_dominfo_list_free(libxl_dominfo *list, int nr);
 libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx*, int *nb_pool);
+void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nr);
 libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm);
 void libxl_vminfo_list_free(libxl_vminfo *list, int nr);
 
@@ -822,6 +823,7 @@ int libxl_cpupool_cpuadd_node(libxl_ctx 
 int libxl_cpupool_cpuremove(libxl_ctx *ctx, uint32_t poolid, int cpu);
 int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus);
 int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid);
+int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_t poolid);
 
 int libxl_domid_valid_guest(uint32_t domid);
 
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:18 2012 +0100
@@ -93,6 +93,41 @@ int libxl__domain_shutdown_reason(libxl_
     return (info.flags >> XEN_DOMINF_shutdownshift) & XEN_DOMINF_shutdownmask;
 }
 
+int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid)
+{
+    xc_domaininfo_t info;
+    int ret;
+
+    ret = xc_domain_getinfolist(CTX->xch, domid, 1, &info);
+    if (ret != 1)
+        return ERROR_FAIL;
+    if (info.domain != domid)
+        return ERROR_FAIL;
+
+    return info.cpupool;
+}
+
+libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid)
+{
+    uint32_t cpupool = libxl__domain_cpupool(gc, domid);
+    libxl_cpupoolinfo poolinfo;
+    libxl_scheduler sched = LIBXL_SCHEDULER_UNKNOWN;
+    int rc;
+
+    if (cpupool < 0)
+        return sched;
+
+    rc = libxl_cpupool_info(CTX, &poolinfo, cpupool);
+    if (rc < 0)
+        goto out;
+
+    sched = poolinfo.sched;
+
+out:
+    libxl_cpupoolinfo_dispose(&poolinfo);
+    return sched;
+}
+
 int libxl__build_pre(libxl__gc *gc, uint32_t domid,
               libxl_domain_build_info *info, libxl__domain_build_state *state)
 {
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Jun 01 12:06:18 2012 +0100
@@ -740,6 +740,8 @@ _hidden int libxl__file_reference_unmap(
 /* from xl_dom */
 _hidden libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid);
+_hidden int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid);
+_hidden libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid);
 _hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams);
 #define LIBXL__DOMAIN_IS_TYPE(gc, domid, type) \
     libxl__domain_type((gc), (domid)) == LIBXL_DOMAIN_TYPE_##type
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:18 2012 +0100
@@ -107,7 +107,9 @@ libxl_bios_type = Enumeration("bios_type
     ])
 
 # Consistent with values defined in domctl.h
+# Except unknown which we have made up
 libxl_scheduler = Enumeration("scheduler", [
+    (0, "unknown"),
     (4, "sedf"),
     (5, "credit"),
     (6, "credit2"),
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/libxl_utils.c	Fri Jun 01 12:06:18 2012 +0100
@@ -133,9 +133,8 @@ int libxl_name_to_cpupoolid(libxl_ctx *c
             }
             free(poolname);
         }
-        libxl_cpupoolinfo_dispose(poolinfo + i);
     }
-    free(poolinfo);
+    libxl_cpupoolinfo_list_free(poolinfo, nb_pools);
     return ret;
 }
 
@@ -688,6 +687,14 @@ void libxl_vminfo_list_free(libxl_vminfo
     free(list);
 }
 
+void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nr)
+{
+    int i;
+    for (i = 0; i < nr; i++)
+        libxl_cpupoolinfo_dispose(&list[i]);
+    free(list);
+}
+
 int libxl_domid_valid_guest(uint32_t domid)
 {
     /* returns 1 if the value _could_ be a valid guest domid, 0 otherwise
diff -r 137b02968b40 -r 7d15860d75ab tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 10:20:40 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:18 2012 +0100
@@ -4610,11 +4610,8 @@ static int sched_domain_output(libxl_sch
                 break;
         }
     }
-    if (poolinfo) {
-        for (p = 0; p < n_pools; p++) {
-            libxl_cpupoolinfo_dispose(poolinfo + p);
-        }
-    }
+    if (poolinfo)
+        libxl_cpupoolinfo_list_free(poolinfo, n_pools);
     return 0;
 }
 
@@ -6122,8 +6119,9 @@ int main_cpupoollist(int argc, char **ar
                 printf("\n");
             }
         }
-        libxl_cpupoolinfo_dispose(poolinfo + p);
-    }
+    }
+
+    libxl_cpupoolinfo_list_free(poolinfo, n_pools);
 
     return ret;
 }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007dO-UW; Sat, 02 Jun 2012 03:11:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekL-0007ZD-3S
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.138.51:38689] by server-4.bemta-3.messagelabs.com id
	2E/38-32504-85489CF4; Sat, 02 Jun 2012 03:11:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1338606677!30430013!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.1 required=7.0 tests=BODY_RANDOM_LONG,DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29736 invoked from network); 2 Jun 2012 03:11:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0000K2-PR
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0003Wk-Ky
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Message-Id: <E1SaekG-0003Wk-Ky@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make it possible to
	explicitly specify default sched params
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548780 -3600
# Node ID 53a905c9bb9a784e205c29a39f76153399e27ee0
# Parent  648508ee27a22b724b8d2d636550af2c25a9a38a
libxl: make it possible to explicitly specify default sched params

To do so we define a discriminating value which is never a valid real value for
each parameter.

While there:

 - removed libxl_sched_*_domain in favour of libxl_domain_sched_params.
 - use this new functionality for the various xl commands which set sched
   parameters, which saves an explicit read-modify-write in xl.
 - removed call of xc_domain_getinfolist from a few functions which weren't
   actually using the result (looks like a cut and paste error)
 - fix xl which was setting period for a variety of different config keys.

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


diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -3296,19 +3296,19 @@ libxl_scheduler libxl_get_scheduler(libx
 }
 
 int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo)
+                                  libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     int rc;
 
-    libxl_sched_credit_domain_init(scinfo);
-
     rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
     if (rc != 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_CREDIT;
     scinfo->weight = sdom.weight;
     scinfo->cap = sdom.cap;
 
@@ -3316,7 +3316,7 @@ int libxl_sched_credit_domain_get(libxl_
 }
 
 int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo)
+                                  libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     xc_domaininfo_t domaininfo;
@@ -3330,22 +3330,33 @@ int libxl_sched_credit_domain_set(libxl_
     if (rc != 1 || domaininfo.domain != domid)
         return ERROR_INVAL;
 
-
-    if (scinfo->weight < 1 || scinfo->weight > 65535) {
-        LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-            "Cpu weight out of range, valid values are within range from 1 to 65535");
-        return ERROR_INVAL;
+    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    if (rc != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        return ERROR_FAIL;
     }
 
-    if (scinfo->cap < 0 || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
-        LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-            "Cpu cap out of range, valid range is from 0 to %d for specified number of vcpus",
-            ((domaininfo.max_vcpu_id + 1) * 100));
-        return ERROR_INVAL;
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
+        if (scinfo->weight < 1 || scinfo->weight > 65535) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "Cpu weight out of range, "
+                       "valid values are within range from 1 to 65535");
+            return ERROR_INVAL;
+        }
+        sdom.weight = scinfo->weight;
     }
 
-    sdom.weight = scinfo->weight;
-    sdom.cap = scinfo->cap;
+    if (scinfo->cap != LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT) {
+        if (scinfo->cap < 0
+            || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                "Cpu cap out of range, "
+                "valid range is from 0 to %d for specified number of vcpus",
+                       ((domaininfo.max_vcpu_id + 1) * 100));
+            return ERROR_INVAL;
+        }
+        sdom.cap = scinfo->cap;
+    }
 
     rc = xc_sched_credit_domain_set(ctx->xch, domid, &sdom);
     if ( rc < 0 ) {
@@ -3418,13 +3429,11 @@ int libxl_sched_credit_params_set(libxl_
 }
 
 int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo)
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    libxl_sched_credit2_domain_init(scinfo);
-
     rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
     if (rc != 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
@@ -3432,36 +3441,37 @@ int libxl_sched_credit2_domain_get(libxl
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_CREDIT2;
     scinfo->weight = sdom.weight;
 
     return 0;
 }
 
 int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo)
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
-    xc_domaininfo_t domaininfo;
     int rc;
 
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
-    if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    if (rc != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
+                         "getting domain sched credit2");
         return ERROR_FAIL;
     }
-    if (rc != 1 || domaininfo.domain != domid)
-        return ERROR_INVAL;
-
-
-    if (scinfo->weight < 1 || scinfo->weight > 65535) {
-        LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc,
-            "Cpu weight out of range, valid values are within range from "
-            "1 to 65535");
-        return ERROR_INVAL;
+
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
+        if (scinfo->weight < 1 || scinfo->weight > 65535) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "Cpu weight out of range, "
+                       "valid values are within range from "
+                       "1 to 65535");
+            return ERROR_INVAL;
+        }
+        sdom.weight = scinfo->weight;
     }
 
-    sdom.weight = scinfo->weight;
-
     rc = xc_sched_credit2_domain_set(ctx->xch, domid, &sdom);
     if ( rc < 0 ) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
@@ -3473,7 +3483,7 @@ int libxl_sched_credit2_domain_set(libxl
 }
 
 int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo)
+                                libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3482,8 +3492,6 @@ int libxl_sched_sedf_domain_get(libxl_ct
     uint16_t weight;
     int rc;
 
-    libxl_sched_sedf_domain_init(scinfo);
-
     rc = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (rc != 0) {
@@ -3491,6 +3499,8 @@ int libxl_sched_sedf_domain_get(libxl_ct
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_SEDF;
     scinfo->period = period / 1000000;
     scinfo->slice = slice / 1000000;
     scinfo->latency = latency / 1000000;
@@ -3501,24 +3511,37 @@ int libxl_sched_sedf_domain_get(libxl_ct
 }
 
 int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo)
+                                libxl_domain_sched_params *scinfo)
 {
-    xc_domaininfo_t domaininfo;
-    int rc;
-
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
-    if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+    uint64_t period;
+    uint64_t slice;
+    uint64_t latency;
+    uint16_t extratime;
+    uint16_t weight;
+
+    int ret;
+
+    ret = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+                            &extratime, &weight);
+    if (ret != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
-    if (rc != 1 || domaininfo.domain != domid)
-        return ERROR_INVAL;
-
-
-    rc = xc_sedf_domain_set(ctx->xch, domid, scinfo->period * 1000000,
-                            scinfo->slice * 1000000, scinfo->latency * 1000000,
-                            scinfo->extratime, scinfo->weight);
-    if ( rc < 0 ) {
+
+    if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
+        period = scinfo->period * 1000000;
+    if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
+        slice = scinfo->slice * 1000000;
+    if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
+        latency = scinfo->latency * 1000000;
+    if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
+        extratime = scinfo->extratime;
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
+        weight = scinfo->weight;
+
+    ret = xc_sedf_domain_set(ctx->xch, domid, period, slice, latency,
+                            extratime, weight);
+    if ( ret < 0 ) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched sedf");
         return ERROR_FAIL;
     }
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:20 2012 +0100
@@ -768,23 +768,33 @@ int libxl_set_vcpuonline(libxl_ctx *ctx,
 
 libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx);
 
-
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo);
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo);
+/* Per-scheduler parameters */
 int libxl_sched_credit_params_get(libxl_ctx *ctx, uint32_t poolid,
                                   libxl_sched_credit_params *scinfo);
 int libxl_sched_credit_params_set(libxl_ctx *ctx, uint32_t poolid,
                                   libxl_sched_credit_params *scinfo);
+
+/* Scheduler Per-domain parameters */
+
+#define LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT    -1
+#define LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT       -1
+#define LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT    -1
+#define LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT     -1
+#define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT   -1
+#define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1
+
+int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo);
+int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo);
 int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo);
+                                   libxl_domain_sched_params *scinfo);
 int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo);
+                                   libxl_domain_sched_params *scinfo);
 int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo);
+                                libxl_domain_sched_params *scinfo);
 int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo);
+                                libxl_domain_sched_params *scinfo);
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid);
 int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
@@ -45,34 +45,26 @@ libxl_domain_type libxl__domain_type(lib
 int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
                             libxl_domain_sched_params *scparams)
 {
-    libxl_ctx *ctx = libxl__gc_owner(gc);
-    libxl_scheduler sched;
-    libxl_sched_sedf_domain sedf_info;
-    libxl_sched_credit_domain credit_info;
-    libxl_sched_credit2_domain credit2_info;
+    libxl_scheduler sched = scparams->sched;
     int ret;
 
-    sched = libxl_get_scheduler (ctx);
+    if (sched == LIBXL_SCHEDULER_UNKNOWN)
+        sched = libxl__domain_scheduler(gc, domid);
+
     switch (sched) {
     case LIBXL_SCHEDULER_SEDF:
-      sedf_info.period = scparams->period;
-      sedf_info.slice = scparams->slice;
-      sedf_info.latency = scparams->latency;
-      sedf_info.extratime = scparams->extratime;
-      sedf_info.weight = scparams->weight;
-      ret=libxl_sched_sedf_domain_set(ctx, domid, &sedf_info);
-      break;
+        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        break;
     case LIBXL_SCHEDULER_CREDIT:
-      credit_info.weight = scparams->weight;
-      credit_info.cap = scparams->cap;
-      ret=libxl_sched_credit_domain_set(ctx, domid, &credit_info);
-      break;
+        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        break;
     case LIBXL_SCHEDULER_CREDIT2:
-      credit2_info.weight = scparams->weight;
-      ret=libxl_sched_credit2_domain_set(ctx, domid, &credit2_info);
-      break;
+        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        break;
     default:
-      ret=-1;
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
     }
     return ret;
 }
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:20 2012 +0100
@@ -225,12 +225,13 @@ libxl_domain_create_info = Struct("domai
 MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT")
 
 libxl_domain_sched_params = Struct("domain_sched_params",[
-    ("weight",       integer),
-    ("cap",          integer),
-    ("period",       integer),
-    ("slice",        integer),
-    ("latency",      integer),
-    ("extratime",    integer),
+    ("sched",        libxl_scheduler),
+    ("weight",       integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT'}),
+    ("cap",          integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT'}),
+    ("period",       integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT'}),
+    ("slice",        integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT'}),
+    ("latency",      integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT'}),
+    ("extratime",    integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}),
     ], dir=DIR_IN)
 
 libxl_domain_build_info = Struct("domain_build_info",[
@@ -426,28 +427,11 @@ libxl_cputopology = Struct("cputopology"
     ("node", uint32),
     ], dir=DIR_OUT)
 
-libxl_sched_credit_domain = Struct("sched_credit_domain", [
-    ("weight", integer),
-    ("cap", integer),
-    ])
-
 libxl_sched_credit_params = Struct("sched_credit_params", [
     ("tslice_ms", integer),
     ("ratelimit_us", integer),
     ], dispose_fn=None)
 
-libxl_sched_credit2_domain = Struct("sched_credit2_domain", [
-    ("weight", integer),
-    ])
-
-libxl_sched_sedf_domain = Struct("sched_sedf_domain", [
-    ("period", integer),
-    ("slice", integer),
-    ("latency", integer),
-    ("extratime", integer),
-    ("weight", integer),
-    ])
-
 libxl_domain_remus_info = Struct("domain_remus_info",[
     ("interval",     integer),
     ("blackhole",    bool),
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -630,7 +630,8 @@ static void parse_config_data(const char
     if (blkdev_start)
         b_info->blkdev_start = strdup(blkdev_start);
 
-    /* the following is the actual config parsing with overriding values in the structures */
+    /* the following is the actual config parsing with overriding
+     * values in the structures */
     if (!xlu_cfg_get_long (config, "cpu_weight", &l, 0))
         b_info->sched_params.weight = l;
     if (!xlu_cfg_get_long (config, "cap", &l, 0))
@@ -638,11 +639,11 @@ static void parse_config_data(const char
     if (!xlu_cfg_get_long (config, "period", &l, 0))
         b_info->sched_params.period = l;
     if (!xlu_cfg_get_long (config, "slice", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.slice = l;
     if (!xlu_cfg_get_long (config, "latency", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.extratime = l;
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;
@@ -4362,7 +4363,7 @@ int main_sharing(int argc, char **argv)
     return 0;
 }
 
-static int sched_credit_domain_get(int domid, libxl_sched_credit_domain *scinfo)
+static int sched_credit_domain_get(int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4373,7 +4374,7 @@ static int sched_credit_domain_get(int d
     return rc;
 }
 
-static int sched_credit_domain_set(int domid, libxl_sched_credit_domain *scinfo)
+static int sched_credit_domain_set(int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4409,7 +4410,7 @@ static int sched_credit_params_get(int p
 static int sched_credit_domain_output(int domid)
 {
     char *domname;
-    libxl_sched_credit_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4426,7 +4427,7 @@ static int sched_credit_domain_output(in
         scinfo.weight,
         scinfo.cap);
     free(domname);
-    libxl_sched_credit_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
@@ -4452,7 +4453,7 @@ static int sched_credit_pool_output(uint
 }
 
 static int sched_credit2_domain_get(
-    int domid, libxl_sched_credit2_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4464,7 +4465,7 @@ static int sched_credit2_domain_get(
 }
 
 static int sched_credit2_domain_set(
-    int domid, libxl_sched_credit2_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4479,7 +4480,7 @@ static int sched_credit2_domain_output(
     int domid)
 {
     char *domname;
-    libxl_sched_credit2_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4495,12 +4496,12 @@ static int sched_credit2_domain_output(
         domid,
         scinfo.weight);
     free(domname);
-    libxl_sched_credit2_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
 static int sched_sedf_domain_get(
-    int domid, libxl_sched_sedf_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4512,7 +4513,7 @@ static int sched_sedf_domain_get(
 }
 
 static int sched_sedf_domain_set(
-    int domid, libxl_sched_sedf_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4526,7 +4527,7 @@ static int sched_sedf_domain_output(
     int domid)
 {
     char *domname;
-    libxl_sched_sedf_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4547,7 +4548,7 @@ static int sched_sedf_domain_output(
         scinfo.extratime,
         scinfo.weight);
     free(domname);
-    libxl_sched_sedf_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
@@ -4624,7 +4625,6 @@ static int sched_domain_output(libxl_sch
  */
 int main_sched_credit(int argc, char **argv)
 {
-    libxl_sched_credit_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int weight = 256, cap = 0, opt_w = 0, opt_c = 0;
@@ -4699,7 +4699,7 @@ int main_sched_credit(int argc, char **a
     }
 
     if (opt_s) {
-        libxl_sched_credit_params  scparam;
+        libxl_sched_credit_params scparam;
         uint32_t poolid = 0;
 
         if (cpupool) {
@@ -4735,20 +4735,19 @@ int main_sched_credit(int argc, char **a
     } else {
         find_domain(dom);
 
-        rc = sched_credit_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_w && !opt_c) { /* output credit scheduler info */
             sched_credit_domain_output(-1);
             return -sched_credit_domain_output(domid);
         } else { /* set credit scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_CREDIT;
             if (opt_w)
                 scinfo.weight = weight;
             if (opt_c)
                 scinfo.cap = cap;
             rc = sched_credit_domain_set(domid, &scinfo);
-            libxl_sched_credit_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }
@@ -4759,7 +4758,6 @@ int main_sched_credit(int argc, char **a
 
 int main_sched_credit2(int argc, char **argv)
 {
-    libxl_sched_credit2_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int weight = 256, opt_w = 0;
@@ -4814,18 +4812,17 @@ int main_sched_credit2(int argc, char **
     } else {
         find_domain(dom);
 
-        rc = sched_credit2_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_w) { /* output credit2 scheduler info */
             sched_credit2_domain_output(-1);
             return -sched_credit2_domain_output(domid);
         } else { /* set credit2 scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_CREDIT2;
             if (opt_w)
                 scinfo.weight = weight;
             rc = sched_credit2_domain_set(domid, &scinfo);
-            libxl_sched_credit2_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }
@@ -4836,7 +4833,6 @@ int main_sched_credit2(int argc, char **
 
 int main_sched_sedf(int argc, char **argv)
 {
-    libxl_sched_sedf_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int period = 0, opt_p = 0;
@@ -4919,15 +4915,15 @@ int main_sched_sedf(int argc, char **arg
     } else {
         find_domain(dom);
 
-        rc = sched_sedf_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_p && !opt_s && !opt_l && !opt_e && !opt_w) {
             /* output sedf scheduler info */
             sched_sedf_domain_output(-1);
             return -sched_sedf_domain_output(domid);
         } else { /* set sedf scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_SEDF;
+
             if (opt_p) {
                 scinfo.period = period;
                 scinfo.weight = 0;
@@ -4946,7 +4942,7 @@ int main_sched_sedf(int argc, char **arg
                 scinfo.slice = 0;
             }
             rc = sched_sedf_domain_set(domid, &scinfo);
-            libxl_sched_sedf_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007dO-UW; Sat, 02 Jun 2012 03:11:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekL-0007ZD-3S
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.138.51:38689] by server-4.bemta-3.messagelabs.com id
	2E/38-32504-85489CF4; Sat, 02 Jun 2012 03:11:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1338606677!30430013!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.1 required=7.0 tests=BODY_RANDOM_LONG,DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29736 invoked from network); 2 Jun 2012 03:11:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0000K2-PR
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekG-0003Wk-Ky
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:16 +0000
Message-Id: <E1SaekG-0003Wk-Ky@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make it possible to
	explicitly specify default sched params
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548780 -3600
# Node ID 53a905c9bb9a784e205c29a39f76153399e27ee0
# Parent  648508ee27a22b724b8d2d636550af2c25a9a38a
libxl: make it possible to explicitly specify default sched params

To do so we define a discriminating value which is never a valid real value for
each parameter.

While there:

 - removed libxl_sched_*_domain in favour of libxl_domain_sched_params.
 - use this new functionality for the various xl commands which set sched
   parameters, which saves an explicit read-modify-write in xl.
 - removed call of xc_domain_getinfolist from a few functions which weren't
   actually using the result (looks like a cut and paste error)
 - fix xl which was setting period for a variety of different config keys.

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


diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -3296,19 +3296,19 @@ libxl_scheduler libxl_get_scheduler(libx
 }
 
 int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo)
+                                  libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     int rc;
 
-    libxl_sched_credit_domain_init(scinfo);
-
     rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
     if (rc != 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_CREDIT;
     scinfo->weight = sdom.weight;
     scinfo->cap = sdom.cap;
 
@@ -3316,7 +3316,7 @@ int libxl_sched_credit_domain_get(libxl_
 }
 
 int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo)
+                                  libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     xc_domaininfo_t domaininfo;
@@ -3330,22 +3330,33 @@ int libxl_sched_credit_domain_set(libxl_
     if (rc != 1 || domaininfo.domain != domid)
         return ERROR_INVAL;
 
-
-    if (scinfo->weight < 1 || scinfo->weight > 65535) {
-        LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-            "Cpu weight out of range, valid values are within range from 1 to 65535");
-        return ERROR_INVAL;
+    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    if (rc != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        return ERROR_FAIL;
     }
 
-    if (scinfo->cap < 0 || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
-        LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-            "Cpu cap out of range, valid range is from 0 to %d for specified number of vcpus",
-            ((domaininfo.max_vcpu_id + 1) * 100));
-        return ERROR_INVAL;
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
+        if (scinfo->weight < 1 || scinfo->weight > 65535) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "Cpu weight out of range, "
+                       "valid values are within range from 1 to 65535");
+            return ERROR_INVAL;
+        }
+        sdom.weight = scinfo->weight;
     }
 
-    sdom.weight = scinfo->weight;
-    sdom.cap = scinfo->cap;
+    if (scinfo->cap != LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT) {
+        if (scinfo->cap < 0
+            || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                "Cpu cap out of range, "
+                "valid range is from 0 to %d for specified number of vcpus",
+                       ((domaininfo.max_vcpu_id + 1) * 100));
+            return ERROR_INVAL;
+        }
+        sdom.cap = scinfo->cap;
+    }
 
     rc = xc_sched_credit_domain_set(ctx->xch, domid, &sdom);
     if ( rc < 0 ) {
@@ -3418,13 +3429,11 @@ int libxl_sched_credit_params_set(libxl_
 }
 
 int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo)
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    libxl_sched_credit2_domain_init(scinfo);
-
     rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
     if (rc != 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
@@ -3432,36 +3441,37 @@ int libxl_sched_credit2_domain_get(libxl
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_CREDIT2;
     scinfo->weight = sdom.weight;
 
     return 0;
 }
 
 int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo)
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
-    xc_domaininfo_t domaininfo;
     int rc;
 
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
-    if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    if (rc != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
+                         "getting domain sched credit2");
         return ERROR_FAIL;
     }
-    if (rc != 1 || domaininfo.domain != domid)
-        return ERROR_INVAL;
-
-
-    if (scinfo->weight < 1 || scinfo->weight > 65535) {
-        LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc,
-            "Cpu weight out of range, valid values are within range from "
-            "1 to 65535");
-        return ERROR_INVAL;
+
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
+        if (scinfo->weight < 1 || scinfo->weight > 65535) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "Cpu weight out of range, "
+                       "valid values are within range from "
+                       "1 to 65535");
+            return ERROR_INVAL;
+        }
+        sdom.weight = scinfo->weight;
     }
 
-    sdom.weight = scinfo->weight;
-
     rc = xc_sched_credit2_domain_set(ctx->xch, domid, &sdom);
     if ( rc < 0 ) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
@@ -3473,7 +3483,7 @@ int libxl_sched_credit2_domain_set(libxl
 }
 
 int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo)
+                                libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3482,8 +3492,6 @@ int libxl_sched_sedf_domain_get(libxl_ct
     uint16_t weight;
     int rc;
 
-    libxl_sched_sedf_domain_init(scinfo);
-
     rc = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (rc != 0) {
@@ -3491,6 +3499,8 @@ int libxl_sched_sedf_domain_get(libxl_ct
         return ERROR_FAIL;
     }
 
+    libxl_domain_sched_params_init(scinfo);
+    scinfo->sched = LIBXL_SCHEDULER_SEDF;
     scinfo->period = period / 1000000;
     scinfo->slice = slice / 1000000;
     scinfo->latency = latency / 1000000;
@@ -3501,24 +3511,37 @@ int libxl_sched_sedf_domain_get(libxl_ct
 }
 
 int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo)
+                                libxl_domain_sched_params *scinfo)
 {
-    xc_domaininfo_t domaininfo;
-    int rc;
-
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
-    if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+    uint64_t period;
+    uint64_t slice;
+    uint64_t latency;
+    uint16_t extratime;
+    uint16_t weight;
+
+    int ret;
+
+    ret = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+                            &extratime, &weight);
+    if (ret != 0) {
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
-    if (rc != 1 || domaininfo.domain != domid)
-        return ERROR_INVAL;
-
-
-    rc = xc_sedf_domain_set(ctx->xch, domid, scinfo->period * 1000000,
-                            scinfo->slice * 1000000, scinfo->latency * 1000000,
-                            scinfo->extratime, scinfo->weight);
-    if ( rc < 0 ) {
+
+    if (scinfo->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT)
+        period = scinfo->period * 1000000;
+    if (scinfo->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT)
+        slice = scinfo->slice * 1000000;
+    if (scinfo->latency != LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT)
+        latency = scinfo->latency * 1000000;
+    if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT)
+        extratime = scinfo->extratime;
+    if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
+        weight = scinfo->weight;
+
+    ret = xc_sedf_domain_set(ctx->xch, domid, period, slice, latency,
+                            extratime, weight);
+    if ( ret < 0 ) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched sedf");
         return ERROR_FAIL;
     }
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:20 2012 +0100
@@ -768,23 +768,33 @@ int libxl_set_vcpuonline(libxl_ctx *ctx,
 
 libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx);
 
-
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo);
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_sched_credit_domain *scinfo);
+/* Per-scheduler parameters */
 int libxl_sched_credit_params_get(libxl_ctx *ctx, uint32_t poolid,
                                   libxl_sched_credit_params *scinfo);
 int libxl_sched_credit_params_set(libxl_ctx *ctx, uint32_t poolid,
                                   libxl_sched_credit_params *scinfo);
+
+/* Scheduler Per-domain parameters */
+
+#define LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT    -1
+#define LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT       -1
+#define LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT    -1
+#define LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT     -1
+#define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT   -1
+#define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1
+
+int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo);
+int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo);
 int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo);
+                                   libxl_domain_sched_params *scinfo);
 int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_sched_credit2_domain *scinfo);
+                                   libxl_domain_sched_params *scinfo);
 int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo);
+                                libxl_domain_sched_params *scinfo);
 int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_sched_sedf_domain *scinfo);
+                                libxl_domain_sched_params *scinfo);
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid);
 int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
@@ -45,34 +45,26 @@ libxl_domain_type libxl__domain_type(lib
 int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
                             libxl_domain_sched_params *scparams)
 {
-    libxl_ctx *ctx = libxl__gc_owner(gc);
-    libxl_scheduler sched;
-    libxl_sched_sedf_domain sedf_info;
-    libxl_sched_credit_domain credit_info;
-    libxl_sched_credit2_domain credit2_info;
+    libxl_scheduler sched = scparams->sched;
     int ret;
 
-    sched = libxl_get_scheduler (ctx);
+    if (sched == LIBXL_SCHEDULER_UNKNOWN)
+        sched = libxl__domain_scheduler(gc, domid);
+
     switch (sched) {
     case LIBXL_SCHEDULER_SEDF:
-      sedf_info.period = scparams->period;
-      sedf_info.slice = scparams->slice;
-      sedf_info.latency = scparams->latency;
-      sedf_info.extratime = scparams->extratime;
-      sedf_info.weight = scparams->weight;
-      ret=libxl_sched_sedf_domain_set(ctx, domid, &sedf_info);
-      break;
+        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        break;
     case LIBXL_SCHEDULER_CREDIT:
-      credit_info.weight = scparams->weight;
-      credit_info.cap = scparams->cap;
-      ret=libxl_sched_credit_domain_set(ctx, domid, &credit_info);
-      break;
+        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        break;
     case LIBXL_SCHEDULER_CREDIT2:
-      credit2_info.weight = scparams->weight;
-      ret=libxl_sched_credit2_domain_set(ctx, domid, &credit2_info);
-      break;
+        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        break;
     default:
-      ret=-1;
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
     }
     return ret;
 }
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Fri Jun 01 12:06:20 2012 +0100
@@ -225,12 +225,13 @@ libxl_domain_create_info = Struct("domai
 MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT")
 
 libxl_domain_sched_params = Struct("domain_sched_params",[
-    ("weight",       integer),
-    ("cap",          integer),
-    ("period",       integer),
-    ("slice",        integer),
-    ("latency",      integer),
-    ("extratime",    integer),
+    ("sched",        libxl_scheduler),
+    ("weight",       integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT'}),
+    ("cap",          integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT'}),
+    ("period",       integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT'}),
+    ("slice",        integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT'}),
+    ("latency",      integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT'}),
+    ("extratime",    integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}),
     ], dir=DIR_IN)
 
 libxl_domain_build_info = Struct("domain_build_info",[
@@ -426,28 +427,11 @@ libxl_cputopology = Struct("cputopology"
     ("node", uint32),
     ], dir=DIR_OUT)
 
-libxl_sched_credit_domain = Struct("sched_credit_domain", [
-    ("weight", integer),
-    ("cap", integer),
-    ])
-
 libxl_sched_credit_params = Struct("sched_credit_params", [
     ("tslice_ms", integer),
     ("ratelimit_us", integer),
     ], dispose_fn=None)
 
-libxl_sched_credit2_domain = Struct("sched_credit2_domain", [
-    ("weight", integer),
-    ])
-
-libxl_sched_sedf_domain = Struct("sched_sedf_domain", [
-    ("period", integer),
-    ("slice", integer),
-    ("latency", integer),
-    ("extratime", integer),
-    ("weight", integer),
-    ])
-
 libxl_domain_remus_info = Struct("domain_remus_info",[
     ("interval",     integer),
     ("blackhole",    bool),
diff -r 648508ee27a2 -r 53a905c9bb9a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:19 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:20 2012 +0100
@@ -630,7 +630,8 @@ static void parse_config_data(const char
     if (blkdev_start)
         b_info->blkdev_start = strdup(blkdev_start);
 
-    /* the following is the actual config parsing with overriding values in the structures */
+    /* the following is the actual config parsing with overriding
+     * values in the structures */
     if (!xlu_cfg_get_long (config, "cpu_weight", &l, 0))
         b_info->sched_params.weight = l;
     if (!xlu_cfg_get_long (config, "cap", &l, 0))
@@ -638,11 +639,11 @@ static void parse_config_data(const char
     if (!xlu_cfg_get_long (config, "period", &l, 0))
         b_info->sched_params.period = l;
     if (!xlu_cfg_get_long (config, "slice", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.slice = l;
     if (!xlu_cfg_get_long (config, "latency", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.extratime = l;
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;
@@ -4362,7 +4363,7 @@ int main_sharing(int argc, char **argv)
     return 0;
 }
 
-static int sched_credit_domain_get(int domid, libxl_sched_credit_domain *scinfo)
+static int sched_credit_domain_get(int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4373,7 +4374,7 @@ static int sched_credit_domain_get(int d
     return rc;
 }
 
-static int sched_credit_domain_set(int domid, libxl_sched_credit_domain *scinfo)
+static int sched_credit_domain_set(int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4409,7 +4410,7 @@ static int sched_credit_params_get(int p
 static int sched_credit_domain_output(int domid)
 {
     char *domname;
-    libxl_sched_credit_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4426,7 +4427,7 @@ static int sched_credit_domain_output(in
         scinfo.weight,
         scinfo.cap);
     free(domname);
-    libxl_sched_credit_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
@@ -4452,7 +4453,7 @@ static int sched_credit_pool_output(uint
 }
 
 static int sched_credit2_domain_get(
-    int domid, libxl_sched_credit2_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4464,7 +4465,7 @@ static int sched_credit2_domain_get(
 }
 
 static int sched_credit2_domain_set(
-    int domid, libxl_sched_credit2_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4479,7 +4480,7 @@ static int sched_credit2_domain_output(
     int domid)
 {
     char *domname;
-    libxl_sched_credit2_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4495,12 +4496,12 @@ static int sched_credit2_domain_output(
         domid,
         scinfo.weight);
     free(domname);
-    libxl_sched_credit2_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
 static int sched_sedf_domain_get(
-    int domid, libxl_sched_sedf_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4512,7 +4513,7 @@ static int sched_sedf_domain_get(
 }
 
 static int sched_sedf_domain_set(
-    int domid, libxl_sched_sedf_domain *scinfo)
+    int domid, libxl_domain_sched_params *scinfo)
 {
     int rc;
 
@@ -4526,7 +4527,7 @@ static int sched_sedf_domain_output(
     int domid)
 {
     char *domname;
-    libxl_sched_sedf_domain scinfo;
+    libxl_domain_sched_params scinfo;
     int rc;
 
     if (domid < 0) {
@@ -4547,7 +4548,7 @@ static int sched_sedf_domain_output(
         scinfo.extratime,
         scinfo.weight);
     free(domname);
-    libxl_sched_sedf_domain_dispose(&scinfo);
+    libxl_domain_sched_params_dispose(&scinfo);
     return 0;
 }
 
@@ -4624,7 +4625,6 @@ static int sched_domain_output(libxl_sch
  */
 int main_sched_credit(int argc, char **argv)
 {
-    libxl_sched_credit_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int weight = 256, cap = 0, opt_w = 0, opt_c = 0;
@@ -4699,7 +4699,7 @@ int main_sched_credit(int argc, char **a
     }
 
     if (opt_s) {
-        libxl_sched_credit_params  scparam;
+        libxl_sched_credit_params scparam;
         uint32_t poolid = 0;
 
         if (cpupool) {
@@ -4735,20 +4735,19 @@ int main_sched_credit(int argc, char **a
     } else {
         find_domain(dom);
 
-        rc = sched_credit_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_w && !opt_c) { /* output credit scheduler info */
             sched_credit_domain_output(-1);
             return -sched_credit_domain_output(domid);
         } else { /* set credit scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_CREDIT;
             if (opt_w)
                 scinfo.weight = weight;
             if (opt_c)
                 scinfo.cap = cap;
             rc = sched_credit_domain_set(domid, &scinfo);
-            libxl_sched_credit_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }
@@ -4759,7 +4758,6 @@ int main_sched_credit(int argc, char **a
 
 int main_sched_credit2(int argc, char **argv)
 {
-    libxl_sched_credit2_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int weight = 256, opt_w = 0;
@@ -4814,18 +4812,17 @@ int main_sched_credit2(int argc, char **
     } else {
         find_domain(dom);
 
-        rc = sched_credit2_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_w) { /* output credit2 scheduler info */
             sched_credit2_domain_output(-1);
             return -sched_credit2_domain_output(domid);
         } else { /* set credit2 scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_CREDIT2;
             if (opt_w)
                 scinfo.weight = weight;
             rc = sched_credit2_domain_set(domid, &scinfo);
-            libxl_sched_credit2_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }
@@ -4836,7 +4833,6 @@ int main_sched_credit2(int argc, char **
 
 int main_sched_sedf(int argc, char **argv)
 {
-    libxl_sched_sedf_domain scinfo;
     const char *dom = NULL;
     const char *cpupool = NULL;
     int period = 0, opt_p = 0;
@@ -4919,15 +4915,15 @@ int main_sched_sedf(int argc, char **arg
     } else {
         find_domain(dom);
 
-        rc = sched_sedf_domain_get(domid, &scinfo);
-        if (rc)
-            return -rc;
-
         if (!opt_p && !opt_s && !opt_l && !opt_e && !opt_w) {
             /* output sedf scheduler info */
             sched_sedf_domain_output(-1);
             return -sched_sedf_domain_output(domid);
         } else { /* set sedf scheduler paramaters */
+            libxl_domain_sched_params scinfo;
+            libxl_domain_sched_params_init(&scinfo);
+            scinfo.sched = LIBXL_SCHEDULER_SEDF;
+
             if (opt_p) {
                 scinfo.period = period;
                 scinfo.weight = 0;
@@ -4946,7 +4942,7 @@ int main_sched_sedf(int argc, char **arg
                 scinfo.slice = 0;
             }
             rc = sched_sedf_domain_set(domid, &scinfo);
-            libxl_sched_sedf_domain_dispose(&scinfo);
+            libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
         }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekO-0007dW-0r; Sat, 02 Jun 2012 03:11:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekL-0007V7-H6
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.35:24702] by server-2.bemta-4.messagelabs.com id
	23/FF-11595-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1338606678!13211386!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.6 required=7.0 tests=DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15968 invoked from network); 2 Jun 2012 03:11:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0000K8-Tl
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0003XH-PT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Message-Id: <E1SaekH-0003XH-PT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: expose a single get/setter
	for domain scheduler 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548781 -3600
# Node ID 68d46c5ea0a3769a9ed398f8cd7542db1a346dc3
# Parent  4f743faf755977697ad0060f888a93753dc40f54
libxl: expose a single get/setter for domain scheduler parameters

This is consistent with having a single struct for all parameters.

Effectively renames and exports libxl__sched_set_params as
libxl_domain_sched_params_set. libxl_domain_sched_params_get is new.

Improve const correctness of the setters while I'm here.

Use shorter LOG macros when touching a line anyway.

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


diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:21 2012 +0100
@@ -3295,15 +3295,15 @@ libxl_scheduler libxl_get_scheduler(libx
     return sched;
 }
 
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo)
+static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     int rc;
 
-    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        LOGE(ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
@@ -3315,32 +3315,31 @@ int libxl_sched_credit_domain_get(libxl_
     return 0;
 }
 
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo)
+static int sched_credit_domain_set(libxl__gc *gc, uint32_t domid,
+                                   const libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     xc_domaininfo_t domaininfo;
     int rc;
 
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
+    rc = xc_domain_getinfolist(CTX->xch, domid, 1, &domaininfo);
     if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+        LOGE(ERROR, "getting domain info list");
         return ERROR_FAIL;
     }
     if (rc != 1 || domaininfo.domain != domid)
         return ERROR_INVAL;
 
-    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        LOGE(ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
         if (scinfo->weight < 1 || scinfo->weight > 65535) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "Cpu weight out of range, "
-                       "valid values are within range from 1 to 65535");
+            LOG(ERROR, "Cpu weight out of range, "
+                "valid values are within range from 1 to 65535");
             return ERROR_INVAL;
         }
         sdom.weight = scinfo->weight;
@@ -3349,18 +3348,17 @@ int libxl_sched_credit_domain_set(libxl_
     if (scinfo->cap != LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT) {
         if (scinfo->cap < 0
             || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                "Cpu cap out of range, "
+            LOG(ERROR, "Cpu cap out of range, "
                 "valid range is from 0 to %d for specified number of vcpus",
-                       ((domaininfo.max_vcpu_id + 1) * 100));
+                ((domaininfo.max_vcpu_id + 1) * 100));
             return ERROR_INVAL;
         }
         sdom.cap = scinfo->cap;
     }
 
-    rc = xc_sched_credit_domain_set(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_set(CTX->xch, domid, &sdom);
     if ( rc < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched credit");
+        LOGE(ERROR, "setting domain sched credit");
         return ERROR_FAIL;
     }
 
@@ -3428,16 +3426,15 @@ int libxl_sched_credit_params_set(libxl_
     return 0;
 }
 
-int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo)
+static int sched_credit2_domain_get(libxl__gc *gc, uint32_t domid,
+                                    libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "getting domain sched credit2");
+        LOGE(ERROR, "getting domain sched credit2");
         return ERROR_FAIL;
     }
 
@@ -3448,42 +3445,38 @@ int libxl_sched_credit2_domain_get(libxl
     return 0;
 }
 
-int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo)
+static int sched_credit2_domain_set(libxl__gc *gc, uint32_t domid,
+                                    const libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "getting domain sched credit2");
+        LOGE(ERROR, "getting domain sched credit2");
         return ERROR_FAIL;
     }
 
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
         if (scinfo->weight < 1 || scinfo->weight > 65535) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "Cpu weight out of range, "
-                       "valid values are within range from "
-                       "1 to 65535");
+            LOG(ERROR, "Cpu weight out of range, "
+                       "valid values are within range from 1 to 65535");
             return ERROR_INVAL;
         }
         sdom.weight = scinfo->weight;
     }
 
-    rc = xc_sched_credit2_domain_set(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_set(CTX->xch, domid, &sdom);
     if ( rc < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "setting domain sched credit2");
+        LOGE(ERROR, "setting domain sched credit2");
         return ERROR_FAIL;
     }
 
     return 0;
 }
 
-int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo)
+static int sched_sedf_domain_get(libxl__gc *gc, uint32_t domid,
+                                 libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3492,10 +3485,10 @@ int libxl_sched_sedf_domain_get(libxl_ct
     uint16_t weight;
     int rc;
 
-    rc = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+    rc = xc_sedf_domain_get(CTX->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
+        LOGE(ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
 
@@ -3510,8 +3503,8 @@ int libxl_sched_sedf_domain_get(libxl_ct
     return 0;
 }
 
-int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo)
+static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
+                                 const libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3521,10 +3514,10 @@ int libxl_sched_sedf_domain_set(libxl_ct
 
     int ret;
 
-    ret = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+    ret = xc_sedf_domain_get(CTX->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (ret != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
+        LOGE(ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
 
@@ -3539,20 +3532,21 @@ int libxl_sched_sedf_domain_set(libxl_ct
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
         weight = scinfo->weight;
 
-    ret = xc_sedf_domain_set(ctx->xch, domid, period, slice, latency,
+    ret = xc_sedf_domain_set(CTX->xch, domid, period, slice, latency,
                             extratime, weight);
     if ( ret < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched sedf");
+        LOGE(ERROR, "setting domain sched sedf");
         return ERROR_FAIL;
     }
 
     return 0;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
-                            libxl_domain_sched_params *scparams)
+int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid,
+                                  const libxl_domain_sched_params *scinfo)
 {
-    libxl_scheduler sched = scparams->sched;
+    GC_INIT(ctx);
+    libxl_scheduler sched = scinfo->sched;
     int ret;
 
     if (sched == LIBXL_SCHEDULER_UNKNOWN)
@@ -3560,19 +3554,51 @@ int libxl__sched_set_params(libxl__gc *g
 
     switch (sched) {
     case LIBXL_SCHEDULER_SEDF:
-        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        ret=sched_sedf_domain_set(gc, domid, scinfo);
         break;
     case LIBXL_SCHEDULER_CREDIT:
-        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        ret=sched_credit_domain_set(gc, domid, scinfo);
         break;
     case LIBXL_SCHEDULER_CREDIT2:
-        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        ret=sched_credit2_domain_set(gc, domid, scinfo);
         break;
     default:
         LOG(ERROR, "Unknown scheduler");
         ret=ERROR_INVAL;
         break;
     }
+
+    GC_FREE;
+    return ret;
+}
+
+int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo)
+{
+    GC_INIT(ctx);
+    int ret;
+
+    libxl_domain_sched_params_init(scinfo);
+
+    scinfo->sched = libxl__domain_scheduler(gc, domid);
+
+    switch (scinfo->sched) {
+    case LIBXL_SCHEDULER_SEDF:
+        ret=sched_sedf_domain_get(gc, domid, scinfo);
+        break;
+    case LIBXL_SCHEDULER_CREDIT:
+        ret=sched_credit_domain_get(gc, domid, scinfo);
+        break;
+    case LIBXL_SCHEDULER_CREDIT2:
+        ret=sched_credit2_domain_get(gc, domid, scinfo);
+        break;
+    default:
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
+    }
+
+    GC_FREE;
     return ret;
 }
 
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:21 2012 +0100
@@ -783,18 +783,11 @@ int libxl_sched_credit_params_set(libxl_
 #define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT   -1
 #define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1
 
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo);
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo);
-int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo);
-int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo);
-int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo);
-int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo);
+int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *params);
+int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid,
+                                  const libxl_domain_sched_params *params);
+
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid);
 int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:21 2012 +0100
@@ -174,7 +174,7 @@ int libxl__build_post(libxl__gc *gc, uin
     char **ents, **hvm_ents;
     int i;
 
-    libxl__sched_set_params (gc, domid, &(info->sched_params));
+    libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
 
     libxl_cpuid_apply_policy(ctx, domid);
     if (info->cpuid != NULL)
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:21 2012 +0100
@@ -4363,24 +4363,33 @@ int main_sharing(int argc, char **argv)
     return 0;
 }
 
-static int sched_credit_domain_get(int domid, libxl_domain_sched_params *scinfo)
+static int sched_domain_get(libxl_scheduler sched, int domid,
+                            libxl_domain_sched_params *scinfo)
 {
     int rc;
 
-    rc = libxl_sched_credit_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_credit_domain_set(int domid, libxl_domain_sched_params *scinfo)
+    rc = libxl_domain_sched_params_get(ctx, domid, scinfo);
+    if (rc) {
+        fprintf(stderr, "libxl_domain_sched_params_get failed.\n");
+        return rc;
+    }
+    if (scinfo->sched != sched) {
+        fprintf(stderr, "libxl_domain_sched_params_get returned %s not %s.\n",
+                libxl_scheduler_to_string(scinfo->sched),
+                libxl_scheduler_to_string(sched));
+        return ERROR_INVAL;
+    }
+
+    return 0;
+}
+
+static int sched_domain_set(int domid, const libxl_domain_sched_params *scinfo)
 {
     int rc;
 
-    rc = libxl_sched_credit_domain_set(ctx, domid, scinfo);
+    rc = libxl_domain_sched_params_set(ctx, domid, scinfo);
     if (rc)
-        fprintf(stderr, "libxl_sched_credit_domain_set failed.\n");
+        fprintf(stderr, "libxl_domain_sched_params_set failed.\n");
 
     return rc;
 }
@@ -4417,7 +4426,7 @@ static int sched_credit_domain_output(in
         printf("%-33s %4s %6s %4s\n", "Name", "ID", "Weight", "Cap");
         return 0;
     }
-    rc = sched_credit_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_CREDIT, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4452,30 +4461,6 @@ static int sched_credit_pool_output(uint
     return 0;
 }
 
-static int sched_credit2_domain_get(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_credit2_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit2_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_credit2_domain_set(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_credit2_domain_set(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit2_domain_set failed.\n");
-
-    return rc;
-}
-
 static int sched_credit2_domain_output(
     int domid)
 {
@@ -4487,7 +4472,7 @@ static int sched_credit2_domain_output(
         printf("%-33s %4s %6s\n", "Name", "ID", "Weight");
         return 0;
     }
-    rc = sched_credit2_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_CREDIT2, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4500,29 +4485,6 @@ static int sched_credit2_domain_output(
     return 0;
 }
 
-static int sched_sedf_domain_get(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_sedf_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_sedf_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_sedf_domain_set(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_sedf_domain_set(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_sedf_domain_set failed.\n");
-    return rc;
-}
-
 static int sched_sedf_domain_output(
     int domid)
 {
@@ -4535,7 +4497,7 @@ static int sched_sedf_domain_output(
                "Slice", "Latency", "Extra", "Weight");
         return 0;
     }
-    rc = sched_sedf_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_SEDF, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4746,7 +4708,7 @@ int main_sched_credit(int argc, char **a
                 scinfo.weight = weight;
             if (opt_c)
                 scinfo.cap = cap;
-            rc = sched_credit_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
@@ -4821,7 +4783,7 @@ int main_sched_credit2(int argc, char **
             scinfo.sched = LIBXL_SCHEDULER_CREDIT2;
             if (opt_w)
                 scinfo.weight = weight;
-            rc = sched_credit2_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
@@ -4941,7 +4903,7 @@ int main_sched_sedf(int argc, char **arg
                 scinfo.period = 0;
                 scinfo.slice = 0;
             }
-            rc = sched_sedf_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekO-0007dW-0r; Sat, 02 Jun 2012 03:11:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekL-0007V7-H6
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.35:24702] by server-2.bemta-4.messagelabs.com id
	23/FF-11595-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1338606678!13211386!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.6 required=7.0 tests=DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15968 invoked from network); 2 Jun 2012 03:11:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0000K8-Tl
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekH-0003XH-PT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:17 +0000
Message-Id: <E1SaekH-0003XH-PT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: expose a single get/setter
	for domain scheduler 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1338548781 -3600
# Node ID 68d46c5ea0a3769a9ed398f8cd7542db1a346dc3
# Parent  4f743faf755977697ad0060f888a93753dc40f54
libxl: expose a single get/setter for domain scheduler parameters

This is consistent with having a single struct for all parameters.

Effectively renames and exports libxl__sched_set_params as
libxl_domain_sched_params_set. libxl_domain_sched_params_get is new.

Improve const correctness of the setters while I'm here.

Use shorter LOG macros when touching a line anyway.

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


diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Jun 01 12:06:21 2012 +0100
@@ -3295,15 +3295,15 @@ libxl_scheduler libxl_get_scheduler(libx
     return sched;
 }
 
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo)
+static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid,
+                                   libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     int rc;
 
-    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        LOGE(ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
@@ -3315,32 +3315,31 @@ int libxl_sched_credit_domain_get(libxl_
     return 0;
 }
 
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo)
+static int sched_credit_domain_set(libxl__gc *gc, uint32_t domid,
+                                   const libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit sdom;
     xc_domaininfo_t domaininfo;
     int rc;
 
-    rc = xc_domain_getinfolist(ctx->xch, domid, 1, &domaininfo);
+    rc = xc_domain_getinfolist(CTX->xch, domid, 1, &domaininfo);
     if (rc < 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
+        LOGE(ERROR, "getting domain info list");
         return ERROR_FAIL;
     }
     if (rc != 1 || domaininfo.domain != domid)
         return ERROR_INVAL;
 
-    rc = xc_sched_credit_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched credit");
+        LOGE(ERROR, "getting domain sched credit");
         return ERROR_FAIL;
     }
 
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
         if (scinfo->weight < 1 || scinfo->weight > 65535) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "Cpu weight out of range, "
-                       "valid values are within range from 1 to 65535");
+            LOG(ERROR, "Cpu weight out of range, "
+                "valid values are within range from 1 to 65535");
             return ERROR_INVAL;
         }
         sdom.weight = scinfo->weight;
@@ -3349,18 +3348,17 @@ int libxl_sched_credit_domain_set(libxl_
     if (scinfo->cap != LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT) {
         if (scinfo->cap < 0
             || scinfo->cap > (domaininfo.max_vcpu_id + 1) * 100) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                "Cpu cap out of range, "
+            LOG(ERROR, "Cpu cap out of range, "
                 "valid range is from 0 to %d for specified number of vcpus",
-                       ((domaininfo.max_vcpu_id + 1) * 100));
+                ((domaininfo.max_vcpu_id + 1) * 100));
             return ERROR_INVAL;
         }
         sdom.cap = scinfo->cap;
     }
 
-    rc = xc_sched_credit_domain_set(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit_domain_set(CTX->xch, domid, &sdom);
     if ( rc < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched credit");
+        LOGE(ERROR, "setting domain sched credit");
         return ERROR_FAIL;
     }
 
@@ -3428,16 +3426,15 @@ int libxl_sched_credit_params_set(libxl_
     return 0;
 }
 
-int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo)
+static int sched_credit2_domain_get(libxl__gc *gc, uint32_t domid,
+                                    libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "getting domain sched credit2");
+        LOGE(ERROR, "getting domain sched credit2");
         return ERROR_FAIL;
     }
 
@@ -3448,42 +3445,38 @@ int libxl_sched_credit2_domain_get(libxl
     return 0;
 }
 
-int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo)
+static int sched_credit2_domain_set(libxl__gc *gc, uint32_t domid,
+                                    const libxl_domain_sched_params *scinfo)
 {
     struct xen_domctl_sched_credit2 sdom;
     int rc;
 
-    rc = xc_sched_credit2_domain_get(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "getting domain sched credit2");
+        LOGE(ERROR, "getting domain sched credit2");
         return ERROR_FAIL;
     }
 
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT) {
         if (scinfo->weight < 1 || scinfo->weight > 65535) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "Cpu weight out of range, "
-                       "valid values are within range from "
-                       "1 to 65535");
+            LOG(ERROR, "Cpu weight out of range, "
+                       "valid values are within range from 1 to 65535");
             return ERROR_INVAL;
         }
         sdom.weight = scinfo->weight;
     }
 
-    rc = xc_sched_credit2_domain_set(ctx->xch, domid, &sdom);
+    rc = xc_sched_credit2_domain_set(CTX->xch, domid, &sdom);
     if ( rc < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                         "setting domain sched credit2");
+        LOGE(ERROR, "setting domain sched credit2");
         return ERROR_FAIL;
     }
 
     return 0;
 }
 
-int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo)
+static int sched_sedf_domain_get(libxl__gc *gc, uint32_t domid,
+                                 libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3492,10 +3485,10 @@ int libxl_sched_sedf_domain_get(libxl_ct
     uint16_t weight;
     int rc;
 
-    rc = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+    rc = xc_sedf_domain_get(CTX->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (rc != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
+        LOGE(ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
 
@@ -3510,8 +3503,8 @@ int libxl_sched_sedf_domain_get(libxl_ct
     return 0;
 }
 
-int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo)
+static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
+                                 const libxl_domain_sched_params *scinfo)
 {
     uint64_t period;
     uint64_t slice;
@@ -3521,10 +3514,10 @@ int libxl_sched_sedf_domain_set(libxl_ct
 
     int ret;
 
-    ret = xc_sedf_domain_get(ctx->xch, domid, &period, &slice, &latency,
+    ret = xc_sedf_domain_get(CTX->xch, domid, &period, &slice, &latency,
                             &extratime, &weight);
     if (ret != 0) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain sched sedf");
+        LOGE(ERROR, "getting domain sched sedf");
         return ERROR_FAIL;
     }
 
@@ -3539,20 +3532,21 @@ int libxl_sched_sedf_domain_set(libxl_ct
     if (scinfo->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT)
         weight = scinfo->weight;
 
-    ret = xc_sedf_domain_set(ctx->xch, domid, period, slice, latency,
+    ret = xc_sedf_domain_set(CTX->xch, domid, period, slice, latency,
                             extratime, weight);
     if ( ret < 0 ) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "setting domain sched sedf");
+        LOGE(ERROR, "setting domain sched sedf");
         return ERROR_FAIL;
     }
 
     return 0;
 }
 
-int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
-                            libxl_domain_sched_params *scparams)
+int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid,
+                                  const libxl_domain_sched_params *scinfo)
 {
-    libxl_scheduler sched = scparams->sched;
+    GC_INIT(ctx);
+    libxl_scheduler sched = scinfo->sched;
     int ret;
 
     if (sched == LIBXL_SCHEDULER_UNKNOWN)
@@ -3560,19 +3554,51 @@ int libxl__sched_set_params(libxl__gc *g
 
     switch (sched) {
     case LIBXL_SCHEDULER_SEDF:
-        ret=libxl_sched_sedf_domain_set(CTX, domid, scparams);
+        ret=sched_sedf_domain_set(gc, domid, scinfo);
         break;
     case LIBXL_SCHEDULER_CREDIT:
-        ret=libxl_sched_credit_domain_set(CTX, domid, scparams);
+        ret=sched_credit_domain_set(gc, domid, scinfo);
         break;
     case LIBXL_SCHEDULER_CREDIT2:
-        ret=libxl_sched_credit2_domain_set(CTX, domid, scparams);
+        ret=sched_credit2_domain_set(gc, domid, scinfo);
         break;
     default:
         LOG(ERROR, "Unknown scheduler");
         ret=ERROR_INVAL;
         break;
     }
+
+    GC_FREE;
+    return ret;
+}
+
+int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *scinfo)
+{
+    GC_INIT(ctx);
+    int ret;
+
+    libxl_domain_sched_params_init(scinfo);
+
+    scinfo->sched = libxl__domain_scheduler(gc, domid);
+
+    switch (scinfo->sched) {
+    case LIBXL_SCHEDULER_SEDF:
+        ret=sched_sedf_domain_get(gc, domid, scinfo);
+        break;
+    case LIBXL_SCHEDULER_CREDIT:
+        ret=sched_credit_domain_get(gc, domid, scinfo);
+        break;
+    case LIBXL_SCHEDULER_CREDIT2:
+        ret=sched_credit2_domain_get(gc, domid, scinfo);
+        break;
+    default:
+        LOG(ERROR, "Unknown scheduler");
+        ret=ERROR_INVAL;
+        break;
+    }
+
+    GC_FREE;
     return ret;
 }
 
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Jun 01 12:06:21 2012 +0100
@@ -783,18 +783,11 @@ int libxl_sched_credit_params_set(libxl_
 #define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT   -1
 #define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1
 
-int libxl_sched_credit_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo);
-int libxl_sched_credit_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_domain_sched_params *scinfo);
-int libxl_sched_credit2_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo);
-int libxl_sched_credit2_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                   libxl_domain_sched_params *scinfo);
-int libxl_sched_sedf_domain_get(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo);
-int libxl_sched_sedf_domain_set(libxl_ctx *ctx, uint32_t domid,
-                                libxl_domain_sched_params *scinfo);
+int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid,
+                                  libxl_domain_sched_params *params);
+int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid,
+                                  const libxl_domain_sched_params *params);
+
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
                        libxl_trigger trigger, uint32_t vcpuid);
 int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Jun 01 12:06:21 2012 +0100
@@ -174,7 +174,7 @@ int libxl__build_post(libxl__gc *gc, uin
     char **ents, **hvm_ents;
     int i;
 
-    libxl__sched_set_params (gc, domid, &(info->sched_params));
+    libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
 
     libxl_cpuid_apply_policy(ctx, domid);
     if (info->cpuid != NULL)
diff -r 4f743faf7559 -r 68d46c5ea0a3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:20 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 01 12:06:21 2012 +0100
@@ -4363,24 +4363,33 @@ int main_sharing(int argc, char **argv)
     return 0;
 }
 
-static int sched_credit_domain_get(int domid, libxl_domain_sched_params *scinfo)
+static int sched_domain_get(libxl_scheduler sched, int domid,
+                            libxl_domain_sched_params *scinfo)
 {
     int rc;
 
-    rc = libxl_sched_credit_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_credit_domain_set(int domid, libxl_domain_sched_params *scinfo)
+    rc = libxl_domain_sched_params_get(ctx, domid, scinfo);
+    if (rc) {
+        fprintf(stderr, "libxl_domain_sched_params_get failed.\n");
+        return rc;
+    }
+    if (scinfo->sched != sched) {
+        fprintf(stderr, "libxl_domain_sched_params_get returned %s not %s.\n",
+                libxl_scheduler_to_string(scinfo->sched),
+                libxl_scheduler_to_string(sched));
+        return ERROR_INVAL;
+    }
+
+    return 0;
+}
+
+static int sched_domain_set(int domid, const libxl_domain_sched_params *scinfo)
 {
     int rc;
 
-    rc = libxl_sched_credit_domain_set(ctx, domid, scinfo);
+    rc = libxl_domain_sched_params_set(ctx, domid, scinfo);
     if (rc)
-        fprintf(stderr, "libxl_sched_credit_domain_set failed.\n");
+        fprintf(stderr, "libxl_domain_sched_params_set failed.\n");
 
     return rc;
 }
@@ -4417,7 +4426,7 @@ static int sched_credit_domain_output(in
         printf("%-33s %4s %6s %4s\n", "Name", "ID", "Weight", "Cap");
         return 0;
     }
-    rc = sched_credit_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_CREDIT, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4452,30 +4461,6 @@ static int sched_credit_pool_output(uint
     return 0;
 }
 
-static int sched_credit2_domain_get(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_credit2_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit2_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_credit2_domain_set(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_credit2_domain_set(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_credit2_domain_set failed.\n");
-
-    return rc;
-}
-
 static int sched_credit2_domain_output(
     int domid)
 {
@@ -4487,7 +4472,7 @@ static int sched_credit2_domain_output(
         printf("%-33s %4s %6s\n", "Name", "ID", "Weight");
         return 0;
     }
-    rc = sched_credit2_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_CREDIT2, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4500,29 +4485,6 @@ static int sched_credit2_domain_output(
     return 0;
 }
 
-static int sched_sedf_domain_get(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_sedf_domain_get(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_sedf_domain_get failed.\n");
-
-    return rc;
-}
-
-static int sched_sedf_domain_set(
-    int domid, libxl_domain_sched_params *scinfo)
-{
-    int rc;
-
-    rc = libxl_sched_sedf_domain_set(ctx, domid, scinfo);
-    if (rc)
-        fprintf(stderr, "libxl_sched_sedf_domain_set failed.\n");
-    return rc;
-}
-
 static int sched_sedf_domain_output(
     int domid)
 {
@@ -4535,7 +4497,7 @@ static int sched_sedf_domain_output(
                "Slice", "Latency", "Extra", "Weight");
         return 0;
     }
-    rc = sched_sedf_domain_get(domid, &scinfo);
+    rc = sched_domain_get(LIBXL_SCHEDULER_SEDF, domid, &scinfo);
     if (rc)
         return rc;
     domname = libxl_domid_to_name(ctx, domid);
@@ -4746,7 +4708,7 @@ int main_sched_credit(int argc, char **a
                 scinfo.weight = weight;
             if (opt_c)
                 scinfo.cap = cap;
-            rc = sched_credit_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
@@ -4821,7 +4783,7 @@ int main_sched_credit2(int argc, char **
             scinfo.sched = LIBXL_SCHEDULER_CREDIT2;
             if (opt_w)
                 scinfo.weight = weight;
-            rc = sched_credit2_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;
@@ -4941,7 +4903,7 @@ int main_sched_sedf(int argc, char **arg
                 scinfo.period = 0;
                 scinfo.slice = 0;
             }
-            rc = sched_sedf_domain_set(domid, &scinfo);
+            rc = sched_domain_set(domid, &scinfo);
             libxl_domain_sched_params_dispose(&scinfo);
             if (rc)
                 return -rc;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007d7-OT; Sat, 02 Jun 2012 03:11:23 +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 1SaekL-0007VB-BV
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.99:40388] by server-1.bemta-4.messagelabs.com id
	71/ED-27869-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-216.messagelabs.com!1338606679!25729314!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32494 invoked from network); 2 Jun 2012 03:11:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0000KB-LG
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0003XX-9Z
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Message-Id: <E1SaekI-0003XX-9Z@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix typos in
	libxl_cpuid_parse_config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1338548782 -3600
# Node ID 3b4346d6002e9ffcd4a9f50b031bd2a77b16b1dd
# Parent  68d46c5ea0a3769a9ed398f8cd7542db1a346dc3
libxl: fix typos in libxl_cpuid_parse_config

Fix typo in comment.
Fix cpuid_flags array init, use correct number of arguments for empty
array entry.

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


diff -r 68d46c5ea0a3 -r 3b4346d6002e tools/libxl/libxl_cpuid.c
--- a/tools/libxl/libxl_cpuid.c	Fri Jun 01 12:06:21 2012 +0100
+++ b/tools/libxl/libxl_cpuid.c	Fri Jun 01 12:06:22 2012 +0100
@@ -185,7 +185,7 @@ int libxl_cpuid_parse_config(libxl_cpuid
         {"svm_decode",   0x8000000a, NA, CPUID_REG_EDX,  7,  1},
         {"svm_pausefilt",0x8000000a, NA, CPUID_REG_EDX, 10,  1},
 
-        {NULL, 0, CPUID_REG_INV, 0, 0}
+        {NULL, 0, NA, CPUID_REG_INV, 0, 0}
     };
 #undef NA
     char *sep, *val, *endptr;
@@ -216,7 +216,7 @@ int libxl_cpuid_parse_config(libxl_cpuid
     num = strtoull(val, &endptr, 0);
     flags[flag->length] = 0;
     if (endptr != val) {
-        /* is this was a valid number, write the binary form into the string */
+        /* if this was a valid number, write the binary form into the string */
         for (i = 0; i < flag->length; i++) {
             flags[flag->length - 1 - i] = "01"[!!(num & (1 << i))];
         }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007d7-OT; Sat, 02 Jun 2012 03:11:23 +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 1SaekL-0007VB-BV
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.99:40388] by server-1.bemta-4.messagelabs.com id
	71/ED-27869-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-216.messagelabs.com!1338606679!25729314!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32494 invoked from network); 2 Jun 2012 03:11:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 03:11:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0000KB-LG
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekI-0003XX-9Z
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:18 +0000
Message-Id: <E1SaekI-0003XX-9Z@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix typos in
	libxl_cpuid_parse_config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1338548782 -3600
# Node ID 3b4346d6002e9ffcd4a9f50b031bd2a77b16b1dd
# Parent  68d46c5ea0a3769a9ed398f8cd7542db1a346dc3
libxl: fix typos in libxl_cpuid_parse_config

Fix typo in comment.
Fix cpuid_flags array init, use correct number of arguments for empty
array entry.

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


diff -r 68d46c5ea0a3 -r 3b4346d6002e tools/libxl/libxl_cpuid.c
--- a/tools/libxl/libxl_cpuid.c	Fri Jun 01 12:06:21 2012 +0100
+++ b/tools/libxl/libxl_cpuid.c	Fri Jun 01 12:06:22 2012 +0100
@@ -185,7 +185,7 @@ int libxl_cpuid_parse_config(libxl_cpuid
         {"svm_decode",   0x8000000a, NA, CPUID_REG_EDX,  7,  1},
         {"svm_pausefilt",0x8000000a, NA, CPUID_REG_EDX, 10,  1},
 
-        {NULL, 0, CPUID_REG_INV, 0, 0}
+        {NULL, 0, NA, CPUID_REG_INV, 0, 0}
     };
 #undef NA
     char *sep, *val, *endptr;
@@ -216,7 +216,7 @@ int libxl_cpuid_parse_config(libxl_cpuid
     num = strtoull(val, &endptr, 0);
     flags[flag->length] = 0;
     if (endptr != val) {
-        /* is this was a valid number, write the binary form into the string */
+        /* if this was a valid number, write the binary form into the string */
         for (i = 0; i < flag->length; i++) {
             flags[flag->length - 1 - i] = "01"[!!(num & (1 << i))];
         }

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007dG-R5; Sat, 02 Jun 2012 03:11:23 +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 1SaekL-0007XF-FD
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.35:24699] by server-3.bemta-4.messagelabs.com id
	2E/6F-04252-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1338606679!16183174!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18043 invoked from network); 2 Jun 2012 03:11:20 -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;
	2 Jun 2012 03:11:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0000KE-6a
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0003Xn-4L
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Message-Id: <E1SaekJ-0003Xn-4L@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix Makefile race bug
	relating to _paths.h
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1338570123 -3600
# Node ID 1e2ce970f0f29af4184d975c4f161f11938070cf
# Parent  3b4346d6002e9ffcd4a9f50b031bd2a77b16b1dd
libxl: fix Makefile race bug relating to _paths.h

_paths.h needs to be in AUTOINCS.  That arranges for it to be an
explicit dependency of all object files.  This is necessary so that it
is made before any compilation is attempted.

Making it a dependency of xl.h (as in 25426:e53a1d3c212c) is harmless,
but not sufficient because that only takes effect if there is already
an autogenerated .d file naming xl.h as a dependency of relevant
object files.

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


diff -r 3b4346d6002e -r 1e2ce970f0f2 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Jun 01 12:06:22 2012 +0100
+++ b/tools/libxl/Makefile	Fri Jun 01 18:02:03 2012 +0100
@@ -72,7 +72,7 @@ LIBXL_OBJS += _libxl_types.o libxl_flask
 
 $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
 
-AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h
+AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
 LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
 	libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SaekN-0007dG-R5; Sat, 02 Jun 2012 03:11:23 +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 1SaekL-0007XF-FD
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:21 +0000
Received: from [85.158.143.35:24699] by server-3.bemta-4.messagelabs.com id
	2E/6F-04252-95489CF4; Sat, 02 Jun 2012 03:11:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1338606679!16183174!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18043 invoked from network); 2 Jun 2012 03:11:20 -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;
	2 Jun 2012 03:11:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0000KE-6a
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SaekJ-0003Xn-4L
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 03:11:19 +0000
Message-Id: <E1SaekJ-0003Xn-4L@xenbits.xen.org>
Date: Sat, 02 Jun 2012 03:11:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix Makefile race bug
	relating to _paths.h
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1338570123 -3600
# Node ID 1e2ce970f0f29af4184d975c4f161f11938070cf
# Parent  3b4346d6002e9ffcd4a9f50b031bd2a77b16b1dd
libxl: fix Makefile race bug relating to _paths.h

_paths.h needs to be in AUTOINCS.  That arranges for it to be an
explicit dependency of all object files.  This is necessary so that it
is made before any compilation is attempted.

Making it a dependency of xl.h (as in 25426:e53a1d3c212c) is harmless,
but not sufficient because that only takes effect if there is already
an autogenerated .d file naming xl.h as a dependency of relevant
object files.

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


diff -r 3b4346d6002e -r 1e2ce970f0f2 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Jun 01 12:06:22 2012 +0100
+++ b/tools/libxl/Makefile	Fri Jun 01 18:02:03 2012 +0100
@@ -72,7 +72,7 @@ LIBXL_OBJS += _libxl_types.o libxl_flask
 
 $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
 
-AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h
+AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
 LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
 	libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 14:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 14:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sap2x-0001PC-VC; Sat, 02 Jun 2012 14:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2v-0001P5-Vh
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:14 +0000
Received: from [85.158.143.99:13262] by server-2.bemta-4.messagelabs.com id
	E3/38-11595-10F1ACF4; Sat, 02 Jun 2012 14:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-216.messagelabs.com!1338646270!30491139!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27859 invoked from network); 2 Jun 2012 14:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 14:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2r-0007yk-5g
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2q-0001LT-FT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:08 +0000
Message-Id: <E1Sap2q-0001LT-FT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 14:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] ocaml: fix build after
	25446:648508ee27a2, 25449:68d46c5ea0a3 et al.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1338622785 -3600
# Node ID 6bea63e6c780de6303361e5f190d6925996cd2a2
# Parent  1e2ce970f0f29af4184d975c4f161f11938070cf
ocaml: fix build after 25446:648508ee27a2, 25449:68d46c5ea0a3 et al.

These renamed a type and the associated functions and the ocaml bindings were
not updated to suit.

This also highlighted that libxl_domain_sched_params should not be DIR_IN since
it is also use as an output struct.

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


diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Sat Jun 02 08:39:45 2012 +0100
@@ -232,7 +232,7 @@ libxl_domain_sched_params = Struct("doma
     ("slice",        integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT'}),
     ("latency",      integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT'}),
     ("extratime",    integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}),
-    ], dir=DIR_IN)
+    ])
 
 libxl_domain_build_info = Struct("domain_build_info",[
     ("max_vcpus",       integer),
diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/ocaml/libs/xl/genwrap.py
--- a/tools/ocaml/libs/xl/genwrap.py	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/ocaml/libs/xl/genwrap.py	Sat Jun 02 08:39:45 2012 +0100
@@ -32,8 +32,9 @@ functions = { # ( name , [type1,type2,..
                       ],
     "cputopology":    [ ("get",            ["unit", "t array"]),
                       ],
-    "sched_credit":   [ ("domain_get",     ["domid", "t"]),
-                        ("domain_set",     ["domid", "t", "unit"]),
+    "domain_sched_params":
+                      [ ("get",            ["domid", "t"]),
+                        ("set",            ["domid", "t", "unit"]),
                       ],
 }
 def stub_fn_name(ty, name):
diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c	Sat Jun 02 08:39:45 2012 +0100
@@ -496,37 +496,37 @@ value stub_xl_cputopology_get(value unit
 	CAMLreturn(topology);
 }
 
-value stub_xl_sched_credit_domain_get(value domid)
+value stub_xl_domain_sched_params_get(value domid)
 {
 	CAMLparam1(domid);
 	CAMLlocal1(scinfo);
-	libxl_sched_credit_domain c_scinfo;
+	libxl_domain_sched_params c_scinfo;
 	int ret;
 	INIT_STRUCT();
 
 	INIT_CTX();
-	ret = libxl_sched_credit_domain_get(ctx, Int_val(domid), &c_scinfo);
+	ret = libxl_domain_sched_params_get(ctx, Int_val(domid), &c_scinfo);
 	if (ret != 0)
-		failwith_xl("sched_credit_domain_get", &lg);
+		failwith_xl("domain_sched_params_get", &lg);
 	FREE_CTX();
 
-	scinfo = Val_sched_credit_domain(&gc, &lg, &c_scinfo);
+	scinfo = Val_domain_sched_params(&gc, &lg, &c_scinfo);
 	CAMLreturn(scinfo);
 }
 
-value stub_xl_sched_credit_domain_set(value domid, value scinfo)
+value stub_xl_domain_sched_params_set(value domid, value scinfo)
 {
 	CAMLparam2(domid, scinfo);
-	libxl_sched_credit_domain c_scinfo;
+	libxl_domain_sched_params c_scinfo;
 	int ret;
 	INIT_STRUCT();
 
-	sched_credit_domain_val(&gc, &lg, &c_scinfo, scinfo);
+	domain_sched_params_val(&gc, &lg, &c_scinfo, scinfo);
 
 	INIT_CTX();
-	ret = libxl_sched_credit_domain_set(ctx, Int_val(domid), &c_scinfo);
+	ret = libxl_domain_sched_params_set(ctx, Int_val(domid), &c_scinfo);
 	if (ret != 0)
-		failwith_xl("sched_credit_domain_set", &lg);
+		failwith_xl("domain_sched_params_set", &lg);
 	FREE_CTX();
 
 	CAMLreturn(Val_unit);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 02 14:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 02 Jun 2012 14:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sap2x-0001PC-VC; Sat, 02 Jun 2012 14:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2v-0001P5-Vh
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:14 +0000
Received: from [85.158.143.99:13262] by server-2.bemta-4.messagelabs.com id
	E3/38-11595-10F1ACF4; Sat, 02 Jun 2012 14:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-216.messagelabs.com!1338646270!30491139!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27859 invoked from network); 2 Jun 2012 14:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Jun 2012 14:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2r-0007yk-5g
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sap2q-0001LT-FT
	for xen-changelog@lists.xensource.com; Sat, 02 Jun 2012 14:11:08 +0000
Message-Id: <E1Sap2q-0001LT-FT@xenbits.xen.org>
Date: Sat, 02 Jun 2012 14:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] ocaml: fix build after
	25446:648508ee27a2, 25449:68d46c5ea0a3 et al.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1338622785 -3600
# Node ID 6bea63e6c780de6303361e5f190d6925996cd2a2
# Parent  1e2ce970f0f29af4184d975c4f161f11938070cf
ocaml: fix build after 25446:648508ee27a2, 25449:68d46c5ea0a3 et al.

These renamed a type and the associated functions and the ocaml bindings were
not updated to suit.

This also highlighted that libxl_domain_sched_params should not be DIR_IN since
it is also use as an output struct.

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


diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Sat Jun 02 08:39:45 2012 +0100
@@ -232,7 +232,7 @@ libxl_domain_sched_params = Struct("doma
     ("slice",        integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT'}),
     ("latency",      integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT'}),
     ("extratime",    integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}),
-    ], dir=DIR_IN)
+    ])
 
 libxl_domain_build_info = Struct("domain_build_info",[
     ("max_vcpus",       integer),
diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/ocaml/libs/xl/genwrap.py
--- a/tools/ocaml/libs/xl/genwrap.py	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/ocaml/libs/xl/genwrap.py	Sat Jun 02 08:39:45 2012 +0100
@@ -32,8 +32,9 @@ functions = { # ( name , [type1,type2,..
                       ],
     "cputopology":    [ ("get",            ["unit", "t array"]),
                       ],
-    "sched_credit":   [ ("domain_get",     ["domid", "t"]),
-                        ("domain_set",     ["domid", "t", "unit"]),
+    "domain_sched_params":
+                      [ ("get",            ["domid", "t"]),
+                        ("set",            ["domid", "t", "unit"]),
                       ],
 }
 def stub_fn_name(ty, name):
diff -r 1e2ce970f0f2 -r 6bea63e6c780 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Jun 01 18:02:03 2012 +0100
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c	Sat Jun 02 08:39:45 2012 +0100
@@ -496,37 +496,37 @@ value stub_xl_cputopology_get(value unit
 	CAMLreturn(topology);
 }
 
-value stub_xl_sched_credit_domain_get(value domid)
+value stub_xl_domain_sched_params_get(value domid)
 {
 	CAMLparam1(domid);
 	CAMLlocal1(scinfo);
-	libxl_sched_credit_domain c_scinfo;
+	libxl_domain_sched_params c_scinfo;
 	int ret;
 	INIT_STRUCT();
 
 	INIT_CTX();
-	ret = libxl_sched_credit_domain_get(ctx, Int_val(domid), &c_scinfo);
+	ret = libxl_domain_sched_params_get(ctx, Int_val(domid), &c_scinfo);
 	if (ret != 0)
-		failwith_xl("sched_credit_domain_get", &lg);
+		failwith_xl("domain_sched_params_get", &lg);
 	FREE_CTX();
 
-	scinfo = Val_sched_credit_domain(&gc, &lg, &c_scinfo);
+	scinfo = Val_domain_sched_params(&gc, &lg, &c_scinfo);
 	CAMLreturn(scinfo);
 }
 
-value stub_xl_sched_credit_domain_set(value domid, value scinfo)
+value stub_xl_domain_sched_params_set(value domid, value scinfo)
 {
 	CAMLparam2(domid, scinfo);
-	libxl_sched_credit_domain c_scinfo;
+	libxl_domain_sched_params c_scinfo;
 	int ret;
 	INIT_STRUCT();
 
-	sched_credit_domain_val(&gc, &lg, &c_scinfo, scinfo);
+	domain_sched_params_val(&gc, &lg, &c_scinfo, scinfo);
 
 	INIT_CTX();
-	ret = libxl_sched_credit_domain_set(ctx, Int_val(domid), &c_scinfo);
+	ret = libxl_domain_sched_params_set(ctx, Int_val(domid), &c_scinfo);
 	if (ret != 0)
-		failwith_xl("sched_credit_domain_set", &lg);
+		failwith_xl("domain_sched_params_set", &lg);
 	FREE_CTX();
 
 	CAMLreturn(Val_unit);

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

From xen-changelog-bounces@lists.xen.org Mon Jun 04 09:11:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 04 Jun 2012 09:11: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 1SbTJd-00016t-C1; Mon, 04 Jun 2012 09:11:09 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJb-00016o-OH
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:08 +0000
Received: from [85.158.139.83:9698] by server-5.bemta-5.messagelabs.com id
	11/7A-04481-AAB7CCF4; Mon, 04 Jun 2012 09:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1338801064!31350348!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22844 invoked from network); 4 Jun 2012 09:11:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Jun 2012 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 1SbTJY-00067n-15
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJX-0001Ud-Be
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:03 +0000
Message-Id: <E1SbTJX-0001Ud-Be@xenbits.xen.org>
Date: Mon, 04 Jun 2012 09: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
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338799085 -7200
# Node ID 07b22ab8d245b2485ae524de8c5888e327445175
# Parent  90a9c811f4c0bac5a16a9c038deb7d8ce5438723
update to latest interface version

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


diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/i386/kernel/setup-xen.c	Mon Jun 04 10:38:05 2012 +0200
@@ -1756,8 +1756,6 @@ void __init setup_arch(char **cmdline_p)
 		 * kernel parameter); shrink reservation with the HV
 		 */
 		struct xen_memory_reservation reservation = {
-			.address_bits = 0,
-			.extent_order = 0,
 			.domid = DOMID_SELF
 		};
 		unsigned int difference;
diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/i386/mm/hypervisor.c
--- a/arch/i386/mm/hypervisor.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/i386/mm/hypervisor.c	Mon Jun 04 10:38:05 2012 +0200
@@ -266,7 +266,7 @@ int xen_create_contiguous_region(
 		.out = {
 			.nr_extents   = 1,
 			.extent_order = order,
-			.address_bits = address_bits,
+			.mem_flags    = XENMEMF_address_bits(address_bits),
 			.domid        = DOMID_SELF
 		}
 	};
@@ -457,7 +457,7 @@ int xen_limit_pages_to_max_mfn(
 		},
 		.out = {
 			.extent_order = 0,
-			.address_bits = address_bits,
+			.mem_flags    = XENMEMF_address_bits(address_bits),
 			.domid        = DOMID_SELF
 		}
 	};
diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/x86_64/kernel/setup-xen.c	Mon Jun 04 10:38:05 2012 +0200
@@ -787,8 +787,6 @@ void __init setup_arch(char **cmdline_p)
 			 * kernel parameter); shrink reservation with the HV
 			 */
 			struct xen_memory_reservation reservation = {
-				.address_bits = 0,
-				.extent_order = 0,
 				.domid = DOMID_SELF
 			};
 			unsigned int difference;
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/Kconfig	Mon Jun 04 10:38:05 2012 +0200
@@ -10,7 +10,7 @@ config XEN
 if XEN
 config XEN_INTERFACE_VERSION
 	hex
-	default 0x00030207
+	default 0x00040200
 
 menu "XEN"
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/balloon/balloon.c	Mon Jun 04 10:38:05 2012 +0200
@@ -244,9 +244,7 @@ static int increase_reservation(unsigned
 	struct page   *page;
 	long           rc;
 	struct xen_memory_reservation reservation = {
-		.address_bits = 0,
-		.extent_order = 0,
-		.domid        = DOMID_SELF
+		.domid = DOMID_SELF
 	};
 
 	if (nr_pages > ARRAY_SIZE(frame_list))
@@ -312,9 +310,7 @@ static int decrease_reservation(unsigned
 	int            need_sleep = 0;
 	int ret;
 	struct xen_memory_reservation reservation = {
-		.address_bits = 0,
-		.extent_order = 0,
-		.domid        = DOMID_SELF
+		.domid = DOMID_SELF
 	};
 
 	if (nr_pages > ARRAY_SIZE(frame_list))
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blkback/common.h
--- a/drivers/xen/blkback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blkback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -33,6 +33,7 @@
 #include <linux/blkdev.h>
 #include <linux/wait.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blkfront/block.h
--- a/drivers/xen/blkfront/block.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blkfront/block.h	Mon Jun 04 10:38:05 2012 +0200
@@ -47,6 +47,7 @@
 #include <linux/blkdev.h>
 #include <linux/major.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/gnttab.h>
 #include <xen/interface/xen.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blktap/common.h
--- a/drivers/xen/blktap/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blktap/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -32,6 +32,7 @@
 #include <linux/slab.h>
 #include <linux/blkdev.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blktap2/blktap.h
--- a/drivers/xen/blktap2/blktap.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blktap2/blktap.h	Mon Jun 04 10:38:05 2012 +0200
@@ -6,6 +6,7 @@
 #include <linux/cdev.h>
 #include <linux/init.h>
 #include <linux/scatterlist.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/gnttab.h>
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/core/evtchn.c	Mon Jun 04 10:38:05 2012 +0200
@@ -1065,7 +1065,8 @@ void irq_resume(void)
 		struct physdev_pirq_eoi_gmfn eoi_gmfn;
 
 		eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
-		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
+		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1,
+					  &eoi_gmfn))
 			BUG();
 	}
 
@@ -1162,7 +1163,7 @@ void __init xen_init_IRQ(void)
 	pirq_needs_eoi = alloc_bootmem_pages(sizeof(unsigned long)
 		* BITS_TO_LONGS(ALIGN(NR_PIRQS, PAGE_SIZE * 8)));
  	eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
-	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
+	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1, &eoi_gmfn) == 0)
 		pirq_eoi_does_unmask = 1;
 
 	/* No event channels are 'live' right now. */
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/core/gnttab.c	Mon Jun 04 10:38:05 2012 +0200
@@ -53,7 +53,7 @@
 /* External tools reserve first few grant table entries. */
 #define NR_RESERVED_ENTRIES 8
 #define GNTTAB_LIST_END 0xffffffff
-#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_t))
+#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_v1_t))
 
 static grant_ref_t **gnttab_list;
 static unsigned int nr_grant_frames;
@@ -62,7 +62,7 @@ static int gnttab_free_count;
 static grant_ref_t gnttab_free_head;
 static DEFINE_SPINLOCK(gnttab_list_lock);
 
-static struct grant_entry *shared;
+static struct grant_entry_v1 *shared;
 
 static struct gnttab_free_callback *gnttab_free_callback_list;
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netback/common.h
--- a/drivers/xen/netback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -38,6 +38,7 @@
 #include <linux/etherdevice.h>
 #include <linux/wait.h>
 #include <xen/interface/io/netif.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/event_channel.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netfront/netfront.c	Mon Jun 04 10:38:05 2012 +0200
@@ -719,7 +719,6 @@ static void network_alloc_rx_buffers(str
 	struct page *page;
 	int i, batch_target, notify;
 	RING_IDX req_prod = np->rx.req_prod_pvt;
-	struct xen_memory_reservation reservation;
 	grant_ref_t ref;
  	unsigned long pfn;
  	void *vaddr;
@@ -824,16 +823,17 @@ no_skb:
 		req->gref = ref;
 	}
 
-	if ( nr_flips != 0 ) {
+	if (nr_flips) {
+		struct xen_memory_reservation reservation = {
+			.nr_extents = nr_flips,
+			.domid      = DOMID_SELF,
+		};
+
 		/* Tell the ballon driver what is going on. */
 		balloon_update_driver_allowance(i);
 
 		set_xen_guest_handle(reservation.extent_start,
 				     np->rx_pfn_array);
-		reservation.nr_extents   = nr_flips;
-		reservation.extent_order = 0;
-		reservation.address_bits = 0;
-		reservation.domid        = DOMID_SELF;
 
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
 			/* After all PTEs have been zapped, flush the TLB. */
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netfront/netfront.h
--- a/drivers/xen/netfront/netfront.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netfront/netfront.h	Mon Jun 04 10:38:05 2012 +0200
@@ -33,6 +33,7 @@
 #ifndef NETFRONT_H
 #define NETFRONT_H
 
+#include <xen/barrier.h>
 #include <xen/interface/io/netif.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/scsiback/common.h
--- a/drivers/xen/scsiback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/scsiback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -47,6 +47,7 @@
 #include <scsi/scsi_dbg.h>
 #include <scsi/scsi_eh.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/io/ring.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/scsifront/common.h
--- a/drivers/xen/scsifront/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/scsifront/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -45,6 +45,7 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/gnttab.h>
 #include <xen/evtchn.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/usbback/usbback.h
--- a/drivers/xen/usbback/usbback.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/usbback/usbback.h	Mon Jun 04 10:38:05 2012 +0200
@@ -54,6 +54,7 @@
 #include <linux/wait.h>
 #include <linux/list.h>
 #include <linux/kref.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/event_channel.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/usbfront/usbfront.h
--- a/drivers/xen/usbfront/usbfront.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/usbfront/usbfront.h	Mon Jun 04 10:38:05 2012 +0200
@@ -52,6 +52,7 @@
 #include <linux/kthread.h>
 #include <linux/wait.h>
 #include <asm/io.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/evtchn.h>
 #include <xen/gnttab.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 include/xen/barrier.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/barrier.h	Mon Jun 04 10:38:05 2012 +0200
@@ -0,0 +1,10 @@
+#ifndef __XEN_BARRIER_H__
+#define __XEN_BARRIER_H__
+
+#include <asm/system.h>
+
+#define xen_mb()  mb()
+#define xen_rmb() rmb()
+#define xen_wmb() wmb()
+
+#endif /* __XEN_BARRIER_H__ */

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

From xen-changelog-bounces@lists.xen.org Mon Jun 04 09:11:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 04 Jun 2012 09:11: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 1SbTJd-00016t-C1; Mon, 04 Jun 2012 09:11:09 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJb-00016o-OH
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:08 +0000
Received: from [85.158.139.83:9698] by server-5.bemta-5.messagelabs.com id
	11/7A-04481-AAB7CCF4; Mon, 04 Jun 2012 09:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1338801064!31350348!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22844 invoked from network); 4 Jun 2012 09:11:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Jun 2012 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 1SbTJY-00067n-15
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJX-0001Ud-Be
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:03 +0000
Message-Id: <E1SbTJX-0001Ud-Be@xenbits.xen.org>
Date: Mon, 04 Jun 2012 09: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
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338799085 -7200
# Node ID 07b22ab8d245b2485ae524de8c5888e327445175
# Parent  90a9c811f4c0bac5a16a9c038deb7d8ce5438723
update to latest interface version

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


diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/i386/kernel/setup-xen.c	Mon Jun 04 10:38:05 2012 +0200
@@ -1756,8 +1756,6 @@ void __init setup_arch(char **cmdline_p)
 		 * kernel parameter); shrink reservation with the HV
 		 */
 		struct xen_memory_reservation reservation = {
-			.address_bits = 0,
-			.extent_order = 0,
 			.domid = DOMID_SELF
 		};
 		unsigned int difference;
diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/i386/mm/hypervisor.c
--- a/arch/i386/mm/hypervisor.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/i386/mm/hypervisor.c	Mon Jun 04 10:38:05 2012 +0200
@@ -266,7 +266,7 @@ int xen_create_contiguous_region(
 		.out = {
 			.nr_extents   = 1,
 			.extent_order = order,
-			.address_bits = address_bits,
+			.mem_flags    = XENMEMF_address_bits(address_bits),
 			.domid        = DOMID_SELF
 		}
 	};
@@ -457,7 +457,7 @@ int xen_limit_pages_to_max_mfn(
 		},
 		.out = {
 			.extent_order = 0,
-			.address_bits = address_bits,
+			.mem_flags    = XENMEMF_address_bits(address_bits),
 			.domid        = DOMID_SELF
 		}
 	};
diff -r 90a9c811f4c0 -r 07b22ab8d245 arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c	Fri May 11 17:20:53 2012 +0200
+++ b/arch/x86_64/kernel/setup-xen.c	Mon Jun 04 10:38:05 2012 +0200
@@ -787,8 +787,6 @@ void __init setup_arch(char **cmdline_p)
 			 * kernel parameter); shrink reservation with the HV
 			 */
 			struct xen_memory_reservation reservation = {
-				.address_bits = 0,
-				.extent_order = 0,
 				.domid = DOMID_SELF
 			};
 			unsigned int difference;
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/Kconfig	Mon Jun 04 10:38:05 2012 +0200
@@ -10,7 +10,7 @@ config XEN
 if XEN
 config XEN_INTERFACE_VERSION
 	hex
-	default 0x00030207
+	default 0x00040200
 
 menu "XEN"
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/balloon/balloon.c	Mon Jun 04 10:38:05 2012 +0200
@@ -244,9 +244,7 @@ static int increase_reservation(unsigned
 	struct page   *page;
 	long           rc;
 	struct xen_memory_reservation reservation = {
-		.address_bits = 0,
-		.extent_order = 0,
-		.domid        = DOMID_SELF
+		.domid = DOMID_SELF
 	};
 
 	if (nr_pages > ARRAY_SIZE(frame_list))
@@ -312,9 +310,7 @@ static int decrease_reservation(unsigned
 	int            need_sleep = 0;
 	int ret;
 	struct xen_memory_reservation reservation = {
-		.address_bits = 0,
-		.extent_order = 0,
-		.domid        = DOMID_SELF
+		.domid = DOMID_SELF
 	};
 
 	if (nr_pages > ARRAY_SIZE(frame_list))
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blkback/common.h
--- a/drivers/xen/blkback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blkback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -33,6 +33,7 @@
 #include <linux/blkdev.h>
 #include <linux/wait.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blkfront/block.h
--- a/drivers/xen/blkfront/block.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blkfront/block.h	Mon Jun 04 10:38:05 2012 +0200
@@ -47,6 +47,7 @@
 #include <linux/blkdev.h>
 #include <linux/major.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/gnttab.h>
 #include <xen/interface/xen.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blktap/common.h
--- a/drivers/xen/blktap/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blktap/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -32,6 +32,7 @@
 #include <linux/slab.h>
 #include <linux/blkdev.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/blktap2/blktap.h
--- a/drivers/xen/blktap2/blktap.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/blktap2/blktap.h	Mon Jun 04 10:38:05 2012 +0200
@@ -6,6 +6,7 @@
 #include <linux/cdev.h>
 #include <linux/init.h>
 #include <linux/scatterlist.h>
+#include <xen/barrier.h>
 #include <xen/blkif.h>
 #include <xen/gnttab.h>
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/core/evtchn.c	Mon Jun 04 10:38:05 2012 +0200
@@ -1065,7 +1065,8 @@ void irq_resume(void)
 		struct physdev_pirq_eoi_gmfn eoi_gmfn;
 
 		eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
-		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
+		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1,
+					  &eoi_gmfn))
 			BUG();
 	}
 
@@ -1162,7 +1163,7 @@ void __init xen_init_IRQ(void)
 	pirq_needs_eoi = alloc_bootmem_pages(sizeof(unsigned long)
 		* BITS_TO_LONGS(ALIGN(NR_PIRQS, PAGE_SIZE * 8)));
  	eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
-	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
+	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1, &eoi_gmfn) == 0)
 		pirq_eoi_does_unmask = 1;
 
 	/* No event channels are 'live' right now. */
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/core/gnttab.c	Mon Jun 04 10:38:05 2012 +0200
@@ -53,7 +53,7 @@
 /* External tools reserve first few grant table entries. */
 #define NR_RESERVED_ENTRIES 8
 #define GNTTAB_LIST_END 0xffffffff
-#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_t))
+#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_v1_t))
 
 static grant_ref_t **gnttab_list;
 static unsigned int nr_grant_frames;
@@ -62,7 +62,7 @@ static int gnttab_free_count;
 static grant_ref_t gnttab_free_head;
 static DEFINE_SPINLOCK(gnttab_list_lock);
 
-static struct grant_entry *shared;
+static struct grant_entry_v1 *shared;
 
 static struct gnttab_free_callback *gnttab_free_callback_list;
 
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netback/common.h
--- a/drivers/xen/netback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -38,6 +38,7 @@
 #include <linux/etherdevice.h>
 #include <linux/wait.h>
 #include <xen/interface/io/netif.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/event_channel.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netfront/netfront.c	Mon Jun 04 10:38:05 2012 +0200
@@ -719,7 +719,6 @@ static void network_alloc_rx_buffers(str
 	struct page *page;
 	int i, batch_target, notify;
 	RING_IDX req_prod = np->rx.req_prod_pvt;
-	struct xen_memory_reservation reservation;
 	grant_ref_t ref;
  	unsigned long pfn;
  	void *vaddr;
@@ -824,16 +823,17 @@ no_skb:
 		req->gref = ref;
 	}
 
-	if ( nr_flips != 0 ) {
+	if (nr_flips) {
+		struct xen_memory_reservation reservation = {
+			.nr_extents = nr_flips,
+			.domid      = DOMID_SELF,
+		};
+
 		/* Tell the ballon driver what is going on. */
 		balloon_update_driver_allowance(i);
 
 		set_xen_guest_handle(reservation.extent_start,
 				     np->rx_pfn_array);
-		reservation.nr_extents   = nr_flips;
-		reservation.extent_order = 0;
-		reservation.address_bits = 0;
-		reservation.domid        = DOMID_SELF;
 
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
 			/* After all PTEs have been zapped, flush the TLB. */
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/netfront/netfront.h
--- a/drivers/xen/netfront/netfront.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/netfront/netfront.h	Mon Jun 04 10:38:05 2012 +0200
@@ -33,6 +33,7 @@
 #ifndef NETFRONT_H
 #define NETFRONT_H
 
+#include <xen/barrier.h>
 #include <xen/interface/io/netif.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/scsiback/common.h
--- a/drivers/xen/scsiback/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/scsiback/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -47,6 +47,7 @@
 #include <scsi/scsi_dbg.h>
 #include <scsi/scsi_eh.h>
 #include <asm/hypervisor.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/io/ring.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/scsifront/common.h
--- a/drivers/xen/scsifront/common.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/scsifront/common.h	Mon Jun 04 10:38:05 2012 +0200
@@ -45,6 +45,7 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/gnttab.h>
 #include <xen/evtchn.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/usbback/usbback.h
--- a/drivers/xen/usbback/usbback.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/usbback/usbback.h	Mon Jun 04 10:38:05 2012 +0200
@@ -54,6 +54,7 @@
 #include <linux/wait.h>
 #include <linux/list.h>
 #include <linux/kref.h>
+#include <xen/barrier.h>
 #include <xen/driver_util.h>
 #include <xen/xenbus.h>
 #include <xen/interface/event_channel.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 drivers/xen/usbfront/usbfront.h
--- a/drivers/xen/usbfront/usbfront.h	Fri May 11 17:20:53 2012 +0200
+++ b/drivers/xen/usbfront/usbfront.h	Mon Jun 04 10:38:05 2012 +0200
@@ -52,6 +52,7 @@
 #include <linux/kthread.h>
 #include <linux/wait.h>
 #include <asm/io.h>
+#include <xen/barrier.h>
 #include <xen/xenbus.h>
 #include <xen/evtchn.h>
 #include <xen/gnttab.h>
diff -r 90a9c811f4c0 -r 07b22ab8d245 include/xen/barrier.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/barrier.h	Mon Jun 04 10:38:05 2012 +0200
@@ -0,0 +1,10 @@
+#ifndef __XEN_BARRIER_H__
+#define __XEN_BARRIER_H__
+
+#include <asm/system.h>
+
+#define xen_mb()  mb()
+#define xen_rmb() rmb()
+#define xen_wmb() wmb()
+
+#endif /* __XEN_BARRIER_H__ */

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

From xen-changelog-bounces@lists.xen.org Mon Jun 04 09:11:32 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 04 Jun 2012 09:11: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 1SbTJv-00017d-FL; Mon, 04 Jun 2012 09:11:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJt-00017W-P6
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:26 +0000
Received: from [85.158.143.35:64227] by server-1.bemta-4.messagelabs.com id
	E3/E0-27869-DBB7CCF4; Mon, 04 Jun 2012 09:11:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1338801064!13431767!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12773 invoked from network); 4 Jun 2012 09:11:05 -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;
	4 Jun 2012 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 1SbTJY-00067p-Ag
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJX-0001Uu-TQ
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:03 +0000
Message-Id: <E1SbTJX-0001Uu-TQ@xenbits.xen.org>
Date: Mon, 04 Jun 2012 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] widen use of (and introduce
	further) MULTI_* helpers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338800100 -7200
# Node ID b72a53f5d7563ac9b1d8e13723c5a5bc9b08e19d
# Parent  07b22ab8d245b2485ae524de8c5888e327445175
widen use of (and introduce further) MULTI_* helpers

This includes folding an MMU update and a grant table operation into a
multicall in gnttab_copy_grant_page()

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


diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/core/gnttab.c	Mon Jun 04 10:55:00 2012 +0200
@@ -607,13 +607,9 @@ static void gnttab_page_free(struct page
 int gnttab_copy_grant_page(grant_ref_t ref, struct page **pagep)
 {
 	struct gnttab_unmap_and_replace unmap;
-	mmu_update_t mmu;
-	struct page *page;
-	struct page *new_page;
-	void *new_addr;
-	void *addr;
-	paddr_t pfn;
-	maddr_t mfn;
+	struct page *page, *new_page;
+	void *addr, *new_addr;
+	unsigned long pfn;
 	maddr_t new_mfn;
 	int err;
 
@@ -631,7 +627,6 @@ int gnttab_copy_grant_page(grant_ref_t r
 	copy_page(new_addr, addr);
 
 	pfn = page_to_pfn(page);
-	mfn = pfn_to_mfn(pfn);
 	new_mfn = virt_to_mfn(new_addr);
 
 	write_seqlock(&gnttab_dma_lock);
@@ -647,28 +642,33 @@ int gnttab_copy_grant_page(grant_ref_t r
 		goto out;
 	}
 
-	if (!xen_feature(XENFEAT_auto_translated_physmap))
-		set_phys_to_machine(pfn, new_mfn);
-
 	gnttab_set_replace_op(&unmap, (unsigned long)addr,
 			      (unsigned long)new_addr, ref);
 
-	err = HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
-					&unmap, 1);
+	if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+		multicall_entry_t mc[2];
+		mmu_update_t mmu;
+
+		set_phys_to_machine(pfn, new_mfn);
+		set_phys_to_machine(page_to_pfn(new_page), INVALID_P2M_ENTRY);
+
+		MULTI_grant_table_op(&mc[0], GNTTABOP_unmap_and_replace,
+				     &unmap, 1);
+
+		mmu.ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
+		mmu.val = pfn;
+		MULTI_mmu_update(&mc[1], &mmu, 1, NULL, DOMID_SELF);
+
+		err = HYPERVISOR_multicall_check(mc, 2, NULL);
+	} else
+		err = HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
+						&unmap, 1);
+
 	BUG_ON(err);
 	BUG_ON(unmap.status != GNTST_okay);
 
 	write_sequnlock(&gnttab_dma_lock);
 
-	if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-		set_phys_to_machine(page_to_pfn(new_page), INVALID_P2M_ENTRY);
-
-		mmu.ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
-		mmu.val = pfn;
-		err = HYPERVISOR_mmu_update(&mmu, 1, NULL, DOMID_SELF);
-		BUG_ON(err);
-	}
-
 	new_page->mapping = page->mapping;
 	new_page->index = page->index;
 	set_bit(PG_foreign, &new_page->flags);
diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/netback/netback.c	Mon Jun 04 10:55:00 2012 +0200
@@ -644,29 +644,21 @@ static void net_rx_action(unsigned long 
 		BUG_ON(mcl[-1].op != __HYPERVISOR_update_va_mapping);
 		mcl[-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
 
-		mcl->op = __HYPERVISOR_mmu_update;
-		mcl->args[0] = (unsigned long)rx_mmu;
-		mcl->args[1] = npo.mmu_prod;
-		mcl->args[2] = 0;
-		mcl->args[3] = DOMID_SELF;
+		MULTI_mmu_update(mcl, rx_mmu, npo.mmu_prod, 0, DOMID_SELF);
 	}
 
 	if (npo.trans_prod) {
 		BUG_ON(npo.trans_prod > ARRAY_SIZE(grant_trans_op));
-		mcl = npo.mcl + npo.mcl_prod++;
-		mcl->op = __HYPERVISOR_grant_table_op;
-		mcl->args[0] = GNTTABOP_transfer;
-		mcl->args[1] = (unsigned long)grant_trans_op;
-		mcl->args[2] = npo.trans_prod;
+		MULTI_grant_table_op(npo.mcl + npo.mcl_prod++,
+				     GNTTABOP_transfer, grant_trans_op,
+				     npo.trans_prod);
 	}
 
 	if (npo.copy_prod) {
 		BUG_ON(npo.copy_prod > ARRAY_SIZE(grant_copy_op));
-		mcl = npo.mcl + npo.mcl_prod++;
-		mcl->op = __HYPERVISOR_grant_table_op;
-		mcl->args[0] = GNTTABOP_copy;
-		mcl->args[1] = (unsigned long)grant_copy_op;
-		mcl->args[2] = npo.copy_prod;
+		MULTI_grant_table_op(npo.mcl + npo.mcl_prod++,
+				     GNTTABOP_copy, grant_copy_op,
+				     npo.copy_prod);
 	}
 
 	/* Nothing to do? */
diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/netfront/netfront.c	Mon Jun 04 10:55:00 2012 +0200
@@ -841,9 +841,9 @@ no_skb:
 				UVMF_TLB_FLUSH|UVMF_ALL;
 
 			/* Give away a batch of pages. */
-			np->rx_mcl[i].op = __HYPERVISOR_memory_op;
-			np->rx_mcl[i].args[0] = XENMEM_decrease_reservation;
-			np->rx_mcl[i].args[1] = (unsigned long)&reservation;
+			MULTI_memory_op(np->rx_mcl + i,
+					XENMEM_decrease_reservation,
+					&reservation);
 
 			/* Zap PTEs and give away pages in one big
 			 * multicall. */
@@ -1326,7 +1326,6 @@ static int netif_poll(struct net_device 
 	struct netif_rx_response *rx = &rinfo.rx;
 	struct netif_extra_info *extras = rinfo.extras;
 	RING_IDX i, rp;
-	struct multicall_entry *mcl;
 	int work_done, budget, more_to_do = 1, accel_more_to_do = 1;
 	struct sk_buff_head rxq;
 	struct sk_buff_head errq;
@@ -1453,12 +1452,9 @@ err:
 
 		/* Do all the remapping work and M2P updates. */
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-			mcl = np->rx_mcl + pages_flipped;
-			mcl->op = __HYPERVISOR_mmu_update;
-			mcl->args[0] = (unsigned long)np->rx_mmu;
-			mcl->args[1] = pages_flipped;
-			mcl->args[2] = 0;
-			mcl->args[3] = DOMID_SELF;
+			MULTI_mmu_update(np->rx_mcl + pages_flipped,
+					 np->rx_mmu, pages_flipped, 0,
+					 DOMID_SELF);
 			err = HYPERVISOR_multicall_check(np->rx_mcl,
 							 pages_flipped + 1,
 							 NULL);
@@ -1623,14 +1619,10 @@ static void netif_release_rx_bufs_flip(s
 
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
 			/* Do all the remapping work and M2P updates. */
-			mcl->op = __HYPERVISOR_mmu_update;
-			mcl->args[0] = (unsigned long)np->rx_mmu;
-			mcl->args[1] = mmu - np->rx_mmu;
-			mcl->args[2] = 0;
-			mcl->args[3] = DOMID_SELF;
-			mcl++;
+			MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu,
+					 0, DOMID_SELF);
 			rc = HYPERVISOR_multicall_check(
-				np->rx_mcl, mcl - np->rx_mcl, NULL);
+				np->rx_mcl, mcl + 1 - np->rx_mcl, NULL);
 			BUG_ON(rc);
 		}
 	}
diff -r 07b22ab8d245 -r b72a53f5d756 include/asm-i386/mach-xen/asm/hypervisor.h
--- a/include/asm-i386/mach-xen/asm/hypervisor.h	Mon Jun 04 10:38:05 2012 +0200
+++ b/include/asm-i386/mach-xen/asm/hypervisor.h	Mon Jun 04 10:55:00 2012 +0200
@@ -243,6 +243,26 @@ MULTI_update_va_mapping(
 }
 
 static inline void
+MULTI_mmu_update(multicall_entry_t *mcl, mmu_update_t *req,
+		 unsigned int count, unsigned int *success_count,
+		 domid_t domid)
+{
+    mcl->op = __HYPERVISOR_mmu_update;
+    mcl->args[0] = (unsigned long)req;
+    mcl->args[1] = count;
+    mcl->args[2] = (unsigned long)success_count;
+    mcl->args[3] = domid;
+}
+
+static inline void
+MULTI_memory_op(multicall_entry_t *mcl, unsigned int cmd, void *arg)
+{
+	mcl->op = __HYPERVISOR_memory_op;
+	mcl->args[0] = cmd;
+	mcl->args[1] = (unsigned long)arg;
+}
+
+static inline void
 MULTI_grant_table_op(multicall_entry_t *mcl, unsigned int cmd,
 		     void *uop, unsigned int count)
 {
@@ -255,8 +275,15 @@ MULTI_grant_table_op(multicall_entry_t *
 #else /* !defined(CONFIG_XEN) */
 
 /* Multicalls not supported for HVM guests. */
-#define MULTI_update_va_mapping(a,b,c,d) ((void)0)
-#define MULTI_grant_table_op(a,b,c,d) ((void)0)
+static inline void MULTI_bug(multicall_entry_t *mcl, ...)
+{
+	BUG_ON(mcl);
+}
+
+#define MULTI_update_va_mapping	MULTI_bug
+#define MULTI_mmu_update	MULTI_bug
+#define MULTI_memory_op		MULTI_bug
+#define MULTI_grant_table_op	MULTI_bug
 
 #endif
 

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

From xen-changelog-bounces@lists.xen.org Mon Jun 04 09:11:32 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 04 Jun 2012 09:11: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 1SbTJv-00017d-FL; Mon, 04 Jun 2012 09:11:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJt-00017W-P6
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:26 +0000
Received: from [85.158.143.35:64227] by server-1.bemta-4.messagelabs.com id
	E3/E0-27869-DBB7CCF4; Mon, 04 Jun 2012 09:11:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1338801064!13431767!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12773 invoked from network); 4 Jun 2012 09:11:05 -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;
	4 Jun 2012 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 1SbTJY-00067p-Ag
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SbTJX-0001Uu-TQ
	for xen-changelog@lists.xensource.com; Mon, 04 Jun 2012 09:11:03 +0000
Message-Id: <E1SbTJX-0001Uu-TQ@xenbits.xen.org>
Date: Mon, 04 Jun 2012 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] widen use of (and introduce
	further) MULTI_* helpers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338800100 -7200
# Node ID b72a53f5d7563ac9b1d8e13723c5a5bc9b08e19d
# Parent  07b22ab8d245b2485ae524de8c5888e327445175
widen use of (and introduce further) MULTI_* helpers

This includes folding an MMU update and a grant table operation into a
multicall in gnttab_copy_grant_page()

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


diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/core/gnttab.c	Mon Jun 04 10:55:00 2012 +0200
@@ -607,13 +607,9 @@ static void gnttab_page_free(struct page
 int gnttab_copy_grant_page(grant_ref_t ref, struct page **pagep)
 {
 	struct gnttab_unmap_and_replace unmap;
-	mmu_update_t mmu;
-	struct page *page;
-	struct page *new_page;
-	void *new_addr;
-	void *addr;
-	paddr_t pfn;
-	maddr_t mfn;
+	struct page *page, *new_page;
+	void *addr, *new_addr;
+	unsigned long pfn;
 	maddr_t new_mfn;
 	int err;
 
@@ -631,7 +627,6 @@ int gnttab_copy_grant_page(grant_ref_t r
 	copy_page(new_addr, addr);
 
 	pfn = page_to_pfn(page);
-	mfn = pfn_to_mfn(pfn);
 	new_mfn = virt_to_mfn(new_addr);
 
 	write_seqlock(&gnttab_dma_lock);
@@ -647,28 +642,33 @@ int gnttab_copy_grant_page(grant_ref_t r
 		goto out;
 	}
 
-	if (!xen_feature(XENFEAT_auto_translated_physmap))
-		set_phys_to_machine(pfn, new_mfn);
-
 	gnttab_set_replace_op(&unmap, (unsigned long)addr,
 			      (unsigned long)new_addr, ref);
 
-	err = HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
-					&unmap, 1);
+	if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+		multicall_entry_t mc[2];
+		mmu_update_t mmu;
+
+		set_phys_to_machine(pfn, new_mfn);
+		set_phys_to_machine(page_to_pfn(new_page), INVALID_P2M_ENTRY);
+
+		MULTI_grant_table_op(&mc[0], GNTTABOP_unmap_and_replace,
+				     &unmap, 1);
+
+		mmu.ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
+		mmu.val = pfn;
+		MULTI_mmu_update(&mc[1], &mmu, 1, NULL, DOMID_SELF);
+
+		err = HYPERVISOR_multicall_check(mc, 2, NULL);
+	} else
+		err = HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
+						&unmap, 1);
+
 	BUG_ON(err);
 	BUG_ON(unmap.status != GNTST_okay);
 
 	write_sequnlock(&gnttab_dma_lock);
 
-	if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-		set_phys_to_machine(page_to_pfn(new_page), INVALID_P2M_ENTRY);
-
-		mmu.ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
-		mmu.val = pfn;
-		err = HYPERVISOR_mmu_update(&mmu, 1, NULL, DOMID_SELF);
-		BUG_ON(err);
-	}
-
 	new_page->mapping = page->mapping;
 	new_page->index = page->index;
 	set_bit(PG_foreign, &new_page->flags);
diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/netback/netback.c	Mon Jun 04 10:55:00 2012 +0200
@@ -644,29 +644,21 @@ static void net_rx_action(unsigned long 
 		BUG_ON(mcl[-1].op != __HYPERVISOR_update_va_mapping);
 		mcl[-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
 
-		mcl->op = __HYPERVISOR_mmu_update;
-		mcl->args[0] = (unsigned long)rx_mmu;
-		mcl->args[1] = npo.mmu_prod;
-		mcl->args[2] = 0;
-		mcl->args[3] = DOMID_SELF;
+		MULTI_mmu_update(mcl, rx_mmu, npo.mmu_prod, 0, DOMID_SELF);
 	}
 
 	if (npo.trans_prod) {
 		BUG_ON(npo.trans_prod > ARRAY_SIZE(grant_trans_op));
-		mcl = npo.mcl + npo.mcl_prod++;
-		mcl->op = __HYPERVISOR_grant_table_op;
-		mcl->args[0] = GNTTABOP_transfer;
-		mcl->args[1] = (unsigned long)grant_trans_op;
-		mcl->args[2] = npo.trans_prod;
+		MULTI_grant_table_op(npo.mcl + npo.mcl_prod++,
+				     GNTTABOP_transfer, grant_trans_op,
+				     npo.trans_prod);
 	}
 
 	if (npo.copy_prod) {
 		BUG_ON(npo.copy_prod > ARRAY_SIZE(grant_copy_op));
-		mcl = npo.mcl + npo.mcl_prod++;
-		mcl->op = __HYPERVISOR_grant_table_op;
-		mcl->args[0] = GNTTABOP_copy;
-		mcl->args[1] = (unsigned long)grant_copy_op;
-		mcl->args[2] = npo.copy_prod;
+		MULTI_grant_table_op(npo.mcl + npo.mcl_prod++,
+				     GNTTABOP_copy, grant_copy_op,
+				     npo.copy_prod);
 	}
 
 	/* Nothing to do? */
diff -r 07b22ab8d245 -r b72a53f5d756 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Mon Jun 04 10:38:05 2012 +0200
+++ b/drivers/xen/netfront/netfront.c	Mon Jun 04 10:55:00 2012 +0200
@@ -841,9 +841,9 @@ no_skb:
 				UVMF_TLB_FLUSH|UVMF_ALL;
 
 			/* Give away a batch of pages. */
-			np->rx_mcl[i].op = __HYPERVISOR_memory_op;
-			np->rx_mcl[i].args[0] = XENMEM_decrease_reservation;
-			np->rx_mcl[i].args[1] = (unsigned long)&reservation;
+			MULTI_memory_op(np->rx_mcl + i,
+					XENMEM_decrease_reservation,
+					&reservation);
 
 			/* Zap PTEs and give away pages in one big
 			 * multicall. */
@@ -1326,7 +1326,6 @@ static int netif_poll(struct net_device 
 	struct netif_rx_response *rx = &rinfo.rx;
 	struct netif_extra_info *extras = rinfo.extras;
 	RING_IDX i, rp;
-	struct multicall_entry *mcl;
 	int work_done, budget, more_to_do = 1, accel_more_to_do = 1;
 	struct sk_buff_head rxq;
 	struct sk_buff_head errq;
@@ -1453,12 +1452,9 @@ err:
 
 		/* Do all the remapping work and M2P updates. */
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-			mcl = np->rx_mcl + pages_flipped;
-			mcl->op = __HYPERVISOR_mmu_update;
-			mcl->args[0] = (unsigned long)np->rx_mmu;
-			mcl->args[1] = pages_flipped;
-			mcl->args[2] = 0;
-			mcl->args[3] = DOMID_SELF;
+			MULTI_mmu_update(np->rx_mcl + pages_flipped,
+					 np->rx_mmu, pages_flipped, 0,
+					 DOMID_SELF);
 			err = HYPERVISOR_multicall_check(np->rx_mcl,
 							 pages_flipped + 1,
 							 NULL);
@@ -1623,14 +1619,10 @@ static void netif_release_rx_bufs_flip(s
 
 		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
 			/* Do all the remapping work and M2P updates. */
-			mcl->op = __HYPERVISOR_mmu_update;
-			mcl->args[0] = (unsigned long)np->rx_mmu;
-			mcl->args[1] = mmu - np->rx_mmu;
-			mcl->args[2] = 0;
-			mcl->args[3] = DOMID_SELF;
-			mcl++;
+			MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu,
+					 0, DOMID_SELF);
 			rc = HYPERVISOR_multicall_check(
-				np->rx_mcl, mcl - np->rx_mcl, NULL);
+				np->rx_mcl, mcl + 1 - np->rx_mcl, NULL);
 			BUG_ON(rc);
 		}
 	}
diff -r 07b22ab8d245 -r b72a53f5d756 include/asm-i386/mach-xen/asm/hypervisor.h
--- a/include/asm-i386/mach-xen/asm/hypervisor.h	Mon Jun 04 10:38:05 2012 +0200
+++ b/include/asm-i386/mach-xen/asm/hypervisor.h	Mon Jun 04 10:55:00 2012 +0200
@@ -243,6 +243,26 @@ MULTI_update_va_mapping(
 }
 
 static inline void
+MULTI_mmu_update(multicall_entry_t *mcl, mmu_update_t *req,
+		 unsigned int count, unsigned int *success_count,
+		 domid_t domid)
+{
+    mcl->op = __HYPERVISOR_mmu_update;
+    mcl->args[0] = (unsigned long)req;
+    mcl->args[1] = count;
+    mcl->args[2] = (unsigned long)success_count;
+    mcl->args[3] = domid;
+}
+
+static inline void
+MULTI_memory_op(multicall_entry_t *mcl, unsigned int cmd, void *arg)
+{
+	mcl->op = __HYPERVISOR_memory_op;
+	mcl->args[0] = cmd;
+	mcl->args[1] = (unsigned long)arg;
+}
+
+static inline void
 MULTI_grant_table_op(multicall_entry_t *mcl, unsigned int cmd,
 		     void *uop, unsigned int count)
 {
@@ -255,8 +275,15 @@ MULTI_grant_table_op(multicall_entry_t *
 #else /* !defined(CONFIG_XEN) */
 
 /* Multicalls not supported for HVM guests. */
-#define MULTI_update_va_mapping(a,b,c,d) ((void)0)
-#define MULTI_grant_table_op(a,b,c,d) ((void)0)
+static inline void MULTI_bug(multicall_entry_t *mcl, ...)
+{
+	BUG_ON(mcl);
+}
+
+#define MULTI_update_va_mapping	MULTI_bug
+#define MULTI_mmu_update	MULTI_bug
+#define MULTI_memory_op		MULTI_bug
+#define MULTI_grant_table_op	MULTI_bug
 
 #endif
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShq-0006n7-GX; Thu, 07 Jun 2012 02:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShp-0006mO-3W
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:13 +0000
Received: from [85.158.138.51:58993] by server-5.bemta-3.messagelabs.com id
	EA/2D-03598-C7510DF4; Thu, 07 Jun 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-174.messagelabs.com!1339037050!31187309!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18724 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0004ht-GY
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0002je-BR
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Message-Id: <E1ScShm-0002je-BR@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: enhance dump_numa 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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1338996801 -3600
# Node ID 3537a8cb0835ce5e96813194d5b0825660108fe0
# Parent  f2f9745c81b74dac74b4d378bef4695eece181d7
xen: enhance dump_numa output

By showing the number of free pages on each node.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r f2f9745c81b7 -r 3537a8cb0835 xen/arch/x86/numa.c
--- a/xen/arch/x86/numa.c	Wed Jun 06 15:57:08 2012 +0100
+++ b/xen/arch/x86/numa.c	Wed Jun 06 16:33:21 2012 +0100
@@ -365,10 +365,11 @@ static void dump_numa(unsigned char key)
 
 	for_each_online_node(i) {
 		paddr_t pa = (paddr_t)(NODE_DATA(i)->node_start_pfn + 1)<< PAGE_SHIFT;
-		printk("idx%d -> NODE%d start->%lu size->%lu\n",
+		printk("idx%d -> NODE%d start->%lu size->%lu free->%lu\n",
 			  i, NODE_DATA(i)->node_id,
 			  NODE_DATA(i)->node_start_pfn,
-			  NODE_DATA(i)->node_spanned_pages);
+			  NODE_DATA(i)->node_spanned_pages,
+			  avail_node_heap_pages(i));
 		/* sanity check phys_to_nid() */
 		printk("phys_to_nid(%"PRIpaddr") -> %d should be %d\n", pa, phys_to_nid(pa),
 			  NODE_DATA(i)->node_id);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShq-0006n7-GX; Thu, 07 Jun 2012 02:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShp-0006mO-3W
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:13 +0000
Received: from [85.158.138.51:58993] by server-5.bemta-3.messagelabs.com id
	EA/2D-03598-C7510DF4; Thu, 07 Jun 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-174.messagelabs.com!1339037050!31187309!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18724 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0004ht-GY
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0002je-BR
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Message-Id: <E1ScShm-0002je-BR@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: enhance dump_numa 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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1338996801 -3600
# Node ID 3537a8cb0835ce5e96813194d5b0825660108fe0
# Parent  f2f9745c81b74dac74b4d378bef4695eece181d7
xen: enhance dump_numa output

By showing the number of free pages on each node.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r f2f9745c81b7 -r 3537a8cb0835 xen/arch/x86/numa.c
--- a/xen/arch/x86/numa.c	Wed Jun 06 15:57:08 2012 +0100
+++ b/xen/arch/x86/numa.c	Wed Jun 06 16:33:21 2012 +0100
@@ -365,10 +365,11 @@ static void dump_numa(unsigned char key)
 
 	for_each_online_node(i) {
 		paddr_t pa = (paddr_t)(NODE_DATA(i)->node_start_pfn + 1)<< PAGE_SHIFT;
-		printk("idx%d -> NODE%d start->%lu size->%lu\n",
+		printk("idx%d -> NODE%d start->%lu size->%lu free->%lu\n",
 			  i, NODE_DATA(i)->node_id,
 			  NODE_DATA(i)->node_start_pfn,
-			  NODE_DATA(i)->node_spanned_pages);
+			  NODE_DATA(i)->node_spanned_pages,
+			  avail_node_heap_pages(i));
 		/* sanity check phys_to_nid() */
 		printk("phys_to_nid(%"PRIpaddr") -> %d should be %d\n", pa, phys_to_nid(pa),
 			  NODE_DATA(i)->node_id);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mc-7g; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0006mN-Ta
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:58939] by server-3.bemta-3.messagelabs.com id
	9A/F7-25608-A7510DF4; Thu, 07 Jun 2012 02:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1339037049!24808064!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 310 invoked from network); 7 Jun 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0004hh-M9
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0002ig-8P
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Message-Id: <E1ScShk-0002ig-8P@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: convert malloc() to
	libxl__zalloc(NULL, ...)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1338983177 -3600
# Node ID 47e83b338c527709124437a2947e86ea01a698f3
# Parent  6bea63e6c780de6303361e5f190d6925996cd2a2
libxl: convert malloc() to libxl__zalloc(NULL, ...)

And ditch the error handling in libxl_get_cpu_topology()

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- define and use NOGC instead of NULL to allow improvements to this
          infrastructure in the future ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 6bea63e6c780 -r 47e83b338c52 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Sat Jun 02 08:39:45 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 12:46:17 2012 +0100
@@ -3116,12 +3116,7 @@ libxl_cputopology *libxl_get_cpu_topolog
     if (tinfo.max_cpu_index < max_cpus - 1)
         max_cpus = tinfo.max_cpu_index + 1;
 
-    ret = malloc(sizeof(libxl_cputopology) * max_cpus);
-    if (ret == NULL) {
-        LIBXL__LOG_ERRNOVAL(ctx, XTL_ERROR, ENOMEM,
-                            "Unable to allocate return value");
-        goto fail;
-    }
+    ret = libxl__zalloc(NOGC, sizeof(libxl_cputopology) * max_cpus);
 
     for (i = 0; i < max_cpus; i++) {
 #define V(map, i) (map[i] == INVALID_TOPOLOGY_ID) ? \
diff -r 6bea63e6c780 -r 47e83b338c52 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Sat Jun 02 08:39:45 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Wed Jun 06 12:46:17 2012 +0100
@@ -1933,6 +1933,7 @@ struct libxl__domain_create_state {
 #define GC_INIT(ctx)  libxl__gc gc[1]; LIBXL_INIT_GC(gc[0],ctx)
 #define GC_FREE       libxl__free_all(gc)
 #define CTX           libxl__gc_owner(gc)
+#define NOGC          NULL
 
 /* Allocation macros all of which use the gc. */
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mu-Ct; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScSho-0006mO-LE
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:37826] by server-5.bemta-3.messagelabs.com id
	89/2D-03598-B7510DF4; Thu, 07 Jun 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1339037049!31238551!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16613 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hn-L6
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0002jA-9o
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Message-Id: <E1ScShl-0002jA-9o@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl.cfg: document the maxmem= 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

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1338987239 -3600
# Node ID a24ffff4e18d3313be6ff66eb895071fd8dfef84
# Parent  123628d31cf2741fcbf7733c5089e3ef6b66ebfe
xl.cfg: document the maxmem= option

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


diff -r 123628d31cf2 -r a24ffff4e18d docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5	Wed Jun 06 12:46:18 2012 +0100
+++ b/docs/man/xl.cfg.pod.5	Wed Jun 06 13:53:59 2012 +0100
@@ -174,6 +174,16 @@ Honoured by the sedf scheduler.
 
 Start the guest with MBYTES megabytes of RAM.
 
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory a guest can ever see.
+The value of B<maxmem=> must be equal or greater than B<memory=>.
+
+In combination with B<memory=> it will start the guest "pre-ballooned",
+if the values of B<memory=> and B<maxmem=> differ.
+A "pre-ballooned" HVM guest needs a balloon driver, without a balloon driver
+it will crash.
+
 =item B<on_poweroff="ACTION">
 
 Specifies what should be done with the domain if it shuts itself down.
@@ -971,10 +981,6 @@ XXX
 
 XXX
 
-=item B<maxmem=NUMBER>
-
-XXX
-
 =item B<nodes=XXX>
 
 XXX

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mc-7g; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0006mN-Ta
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:58939] by server-3.bemta-3.messagelabs.com id
	9A/F7-25608-A7510DF4; Thu, 07 Jun 2012 02:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1339037049!24808064!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 310 invoked from network); 7 Jun 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0004hh-M9
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0002ig-8P
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Message-Id: <E1ScShk-0002ig-8P@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: convert malloc() to
	libxl__zalloc(NULL, ...)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1338983177 -3600
# Node ID 47e83b338c527709124437a2947e86ea01a698f3
# Parent  6bea63e6c780de6303361e5f190d6925996cd2a2
libxl: convert malloc() to libxl__zalloc(NULL, ...)

And ditch the error handling in libxl_get_cpu_topology()

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- define and use NOGC instead of NULL to allow improvements to this
          infrastructure in the future ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 6bea63e6c780 -r 47e83b338c52 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Sat Jun 02 08:39:45 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 12:46:17 2012 +0100
@@ -3116,12 +3116,7 @@ libxl_cputopology *libxl_get_cpu_topolog
     if (tinfo.max_cpu_index < max_cpus - 1)
         max_cpus = tinfo.max_cpu_index + 1;
 
-    ret = malloc(sizeof(libxl_cputopology) * max_cpus);
-    if (ret == NULL) {
-        LIBXL__LOG_ERRNOVAL(ctx, XTL_ERROR, ENOMEM,
-                            "Unable to allocate return value");
-        goto fail;
-    }
+    ret = libxl__zalloc(NOGC, sizeof(libxl_cputopology) * max_cpus);
 
     for (i = 0; i < max_cpus; i++) {
 #define V(map, i) (map[i] == INVALID_TOPOLOGY_ID) ? \
diff -r 6bea63e6c780 -r 47e83b338c52 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Sat Jun 02 08:39:45 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Wed Jun 06 12:46:17 2012 +0100
@@ -1933,6 +1933,7 @@ struct libxl__domain_create_state {
 #define GC_INIT(ctx)  libxl__gc gc[1]; LIBXL_INIT_GC(gc[0],ctx)
 #define GC_FREE       libxl__free_all(gc)
 #define CTX           libxl__gc_owner(gc)
+#define NOGC          NULL
 
 /* Allocation macros all of which use the gc. */
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mu-Ct; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScSho-0006mO-LE
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:37826] by server-5.bemta-3.messagelabs.com id
	89/2D-03598-B7510DF4; Thu, 07 Jun 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1339037049!31238551!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16613 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hn-L6
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0002jA-9o
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Message-Id: <E1ScShl-0002jA-9o@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl.cfg: document the maxmem= 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

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1338987239 -3600
# Node ID a24ffff4e18d3313be6ff66eb895071fd8dfef84
# Parent  123628d31cf2741fcbf7733c5089e3ef6b66ebfe
xl.cfg: document the maxmem= option

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


diff -r 123628d31cf2 -r a24ffff4e18d docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5	Wed Jun 06 12:46:18 2012 +0100
+++ b/docs/man/xl.cfg.pod.5	Wed Jun 06 13:53:59 2012 +0100
@@ -174,6 +174,16 @@ Honoured by the sedf scheduler.
 
 Start the guest with MBYTES megabytes of RAM.
 
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory a guest can ever see.
+The value of B<maxmem=> must be equal or greater than B<memory=>.
+
+In combination with B<memory=> it will start the guest "pre-ballooned",
+if the values of B<memory=> and B<maxmem=> differ.
+A "pre-ballooned" HVM guest needs a balloon driver, without a balloon driver
+it will crash.
+
 =item B<on_poweroff="ACTION">
 
 Specifies what should be done with the domain if it shuts itself down.
@@ -971,10 +981,6 @@ XXX
 
 XXX
 
-=item B<maxmem=NUMBER>
-
-XXX
-
 =item B<nodes=XXX>
 
 XXX

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShs-0006nd-LH; Thu, 07 Jun 2012 02:44:16 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShq-0006n6-U9
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:15 +0000
Received: from [85.158.139.83:57627] by server-5.bemta-5.messagelabs.com id
	D1/EA-04481-E7510DF4; Thu, 07 Jun 2012 02:44:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-182.messagelabs.com!1339037052!25011165!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14198 invoked from network); 7 Jun 2012 02:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0004hz-Gy
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0002kB-CV
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Message-Id: <E1ScShn-0002kB-CV@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: fix page_list_splice()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338997025 -3600
# Node ID f6bfaf9daa508c31b2bca0e461202db2759426fc
# Parent  8ec2c428f4dad55cf6d91b893a19c2218972db5e
xen: fix page_list_splice()

Other than in __list_splice(), the first element's prev pointer
doesn't need adjustment here - it already is PAGE_LIST_NULL. Rather
than fixing the assignment (to formally match __list_splice()), simply
assert that this assignment is really unnecessary.

Reported-by: Jisoo Yang <jisooy@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Also assert that the prev pointers are both PAGE_LIST_NULL.

Signed-off-by: Keir Fraser <keir@xen.org>

Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 8ec2c428f4da -r f6bfaf9daa50 xen/include/xen/mm.h
--- a/xen/include/xen/mm.h	Wed Jun 06 16:34:53 2012 +0100
+++ b/xen/include/xen/mm.h	Wed Jun 06 16:37:05 2012 +0100
@@ -270,7 +270,8 @@ page_list_splice(struct page_list_head *
     last = list->tail;
     at = head->next;
 
-    first->list.prev = page_to_pdx(head->next);
+    ASSERT(first->list.prev == PAGE_LIST_NULL);
+    ASSERT(first->list.prev == at->list.prev);
     head->next = first;
 
     last->list.next = page_to_pdx(at);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mm-AU; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScSho-0006mN-FY
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:58971] by server-3.bemta-3.messagelabs.com id
	FB/F7-25608-B7510DF4; Thu, 07 Jun 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1339037049!12470497!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4632 invoked from network); 7 Jun 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hk-9r
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0002iv-Pz
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Message-Id: <E1ScShk-0002iv-Pz@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Add API to retrieve domain
	console tty
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Bamvor Jian Zhang <bjzhang@suse.com>
# Date 1338983178 -3600
# Node ID 123628d31cf2741fcbf7733c5089e3ef6b66ebfe
# Parent  47e83b338c527709124437a2947e86ea01a698f3
libxl: Add API to retrieve domain console tty

This api retrieve domain console from xenstore. With this new api, it is easy
to implement "virsh console" command in libvirt libxl driver.

Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use NOGC instead of 0 to allow improvements to this infrastructure
         in the future ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 47e83b338c52 -r 123628d31cf2 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Jun 06 12:46:17 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 12:46:18 2012 +0100
@@ -1217,7 +1217,8 @@ out:
     return rc;
 }
 
-int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type)
+int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                       libxl_console_type type)
 {
     GC_INIT(ctx);
     char *p = libxl__sprintf(gc, "%s/xenconsole", libxl__private_bindir_path());
@@ -1243,34 +1244,116 @@ out:
     return ERROR_FAIL;
 }
 
-int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm)
+int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                          libxl_console_type type, char **path)
+{
+    GC_INIT(ctx);
+    char *dom_path;
+    char *tty_path;
+    char *tty;
+    int rc;
+
+    dom_path = libxl__xs_get_dompath(gc, domid);
+    if (!dom_path) {
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
+    switch (type) {
+    case LIBXL_CONSOLE_TYPE_SERIAL:
+        tty_path = GCSPRINTF("%s/serial/0/tty", dom_path);
+        break;
+    case LIBXL_CONSOLE_TYPE_PV:
+        if (cons_num == 0)
+            tty_path = GCSPRINTF("%s/console/tty", dom_path);
+        else
+            tty_path = GCSPRINTF("%s/device/console/%d/tty", dom_path,
+                                cons_num);
+        break;
+    default:
+        rc = ERROR_INVAL;
+        goto out;
+    }
+
+    tty = libxl__xs_read(gc, XBT_NULL, tty_path);
+    if (!tty) {
+       LOGE(ERROR,"unable to read console tty path `%s'",tty_path);
+       rc = ERROR_FAIL;
+       goto out;
+    }
+
+    *path = libxl__strdup(NOGC, tty);
+    rc = 0;
+out:
+    GC_FREE;
+    return rc;
+}
+
+static int libxl__primary_console_find(libxl_ctx *ctx, uint32_t domid_vm,
+                                       uint32_t *domid, int *cons_num,
+                                       libxl_console_type *type)
 {
     GC_INIT(ctx);
     uint32_t stubdomid = libxl_get_stubdom_id(ctx, domid_vm);
     int rc;
-    if (stubdomid)
-        rc = libxl_console_exec(ctx, stubdomid,
-                                STUBDOM_CONSOLE_SERIAL, LIBXL_CONSOLE_TYPE_PV);
-    else {
+
+    if (stubdomid) {
+        *domid = stubdomid;
+        *cons_num = STUBDOM_CONSOLE_SERIAL;
+        *type = LIBXL_CONSOLE_TYPE_PV;
+    } else {
         switch (libxl__domain_type(gc, domid_vm)) {
         case LIBXL_DOMAIN_TYPE_HVM:
-            rc = libxl_console_exec(ctx, domid_vm, 0, LIBXL_CONSOLE_TYPE_SERIAL);
+            *domid = domid_vm;
+            *cons_num = 0;
+            *type = LIBXL_CONSOLE_TYPE_SERIAL;
             break;
         case LIBXL_DOMAIN_TYPE_PV:
-            rc = libxl_console_exec(ctx, domid_vm, 0, LIBXL_CONSOLE_TYPE_PV);
+            *domid = domid_vm;
+            *cons_num = 0;
+            *type = LIBXL_CONSOLE_TYPE_PV;
             break;
         case -1:
-            LOG(ERROR,"unable to get domain type for domid=%"PRIu32,domid_vm);
-            rc = ERROR_FAIL;
+            LOG(ERROR,"unable to get domain type for domid=%"PRIu32, domid_vm);
+            rc = ERROR_INVAL;
+            goto out;
             break;
         default:
             abort();
         }
     }
+
+    rc = 0;
+out:
     GC_FREE;
     return rc;
 }
 
+int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm)
+{
+    uint32_t domid;
+    int cons_num;
+    libxl_console_type type;
+    int rc;
+
+    rc = libxl__primary_console_find(ctx, domid_vm, &domid, &cons_num, &type);
+    if ( rc ) return rc;
+    return libxl_console_exec(ctx, domid, cons_num, type);
+}
+
+int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm,
+                                  char **path)
+{
+    uint32_t domid;
+    int cons_num;
+    libxl_console_type type;
+    int rc;
+
+    rc = libxl__primary_console_find(ctx, domid_vm, &domid, &cons_num, &type);
+    if ( rc ) return rc;
+    return libxl_console_get_tty(ctx, domid, cons_num, type, path);
+}
+
 int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass)
 {
     GC_INIT(ctx);
diff -r 47e83b338c52 -r 123628d31cf2 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Wed Jun 06 12:46:17 2012 +0100
+++ b/tools/libxl/libxl.h	Wed Jun 06 12:46:18 2012 +0100
@@ -570,6 +570,18 @@ int libxl_console_exec(libxl_ctx *ctx, u
  * guests using pygrub. */
 int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm);
 
+/* libxl_console_get_tty retrieves the specified domain's console tty path
+ * and stores it in path. Caller is responsible for freeing the memory.
+ */
+int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                          libxl_console_type type, char **path);
+
+/* libxl_primary_console_get_tty retrieves the specified domain's primary
+ * console tty path and stores it in path. Caller is responsible for freeing
+ * the memory.
+ */
+int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm, char **path);
+
 /* May be called with info_r == NULL to check for domain's existance */
 int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r,
                       uint32_t domid);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShp-0006mm-AU; Thu, 07 Jun 2012 02:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScSho-0006mN-FY
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:12 +0000
Received: from [85.158.138.51:58971] by server-3.bemta-3.messagelabs.com id
	FB/F7-25608-B7510DF4; Thu, 07 Jun 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1339037049!12470497!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4632 invoked from network); 7 Jun 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hk-9r
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShk-0002iv-Pz
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:08 +0000
Message-Id: <E1ScShk-0002iv-Pz@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Add API to retrieve domain
	console tty
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Bamvor Jian Zhang <bjzhang@suse.com>
# Date 1338983178 -3600
# Node ID 123628d31cf2741fcbf7733c5089e3ef6b66ebfe
# Parent  47e83b338c527709124437a2947e86ea01a698f3
libxl: Add API to retrieve domain console tty

This api retrieve domain console from xenstore. With this new api, it is easy
to implement "virsh console" command in libvirt libxl driver.

Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use NOGC instead of 0 to allow improvements to this infrastructure
         in the future ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 47e83b338c52 -r 123628d31cf2 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Jun 06 12:46:17 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 12:46:18 2012 +0100
@@ -1217,7 +1217,8 @@ out:
     return rc;
 }
 
-int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type)
+int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                       libxl_console_type type)
 {
     GC_INIT(ctx);
     char *p = libxl__sprintf(gc, "%s/xenconsole", libxl__private_bindir_path());
@@ -1243,34 +1244,116 @@ out:
     return ERROR_FAIL;
 }
 
-int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm)
+int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                          libxl_console_type type, char **path)
+{
+    GC_INIT(ctx);
+    char *dom_path;
+    char *tty_path;
+    char *tty;
+    int rc;
+
+    dom_path = libxl__xs_get_dompath(gc, domid);
+    if (!dom_path) {
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
+    switch (type) {
+    case LIBXL_CONSOLE_TYPE_SERIAL:
+        tty_path = GCSPRINTF("%s/serial/0/tty", dom_path);
+        break;
+    case LIBXL_CONSOLE_TYPE_PV:
+        if (cons_num == 0)
+            tty_path = GCSPRINTF("%s/console/tty", dom_path);
+        else
+            tty_path = GCSPRINTF("%s/device/console/%d/tty", dom_path,
+                                cons_num);
+        break;
+    default:
+        rc = ERROR_INVAL;
+        goto out;
+    }
+
+    tty = libxl__xs_read(gc, XBT_NULL, tty_path);
+    if (!tty) {
+       LOGE(ERROR,"unable to read console tty path `%s'",tty_path);
+       rc = ERROR_FAIL;
+       goto out;
+    }
+
+    *path = libxl__strdup(NOGC, tty);
+    rc = 0;
+out:
+    GC_FREE;
+    return rc;
+}
+
+static int libxl__primary_console_find(libxl_ctx *ctx, uint32_t domid_vm,
+                                       uint32_t *domid, int *cons_num,
+                                       libxl_console_type *type)
 {
     GC_INIT(ctx);
     uint32_t stubdomid = libxl_get_stubdom_id(ctx, domid_vm);
     int rc;
-    if (stubdomid)
-        rc = libxl_console_exec(ctx, stubdomid,
-                                STUBDOM_CONSOLE_SERIAL, LIBXL_CONSOLE_TYPE_PV);
-    else {
+
+    if (stubdomid) {
+        *domid = stubdomid;
+        *cons_num = STUBDOM_CONSOLE_SERIAL;
+        *type = LIBXL_CONSOLE_TYPE_PV;
+    } else {
         switch (libxl__domain_type(gc, domid_vm)) {
         case LIBXL_DOMAIN_TYPE_HVM:
-            rc = libxl_console_exec(ctx, domid_vm, 0, LIBXL_CONSOLE_TYPE_SERIAL);
+            *domid = domid_vm;
+            *cons_num = 0;
+            *type = LIBXL_CONSOLE_TYPE_SERIAL;
             break;
         case LIBXL_DOMAIN_TYPE_PV:
-            rc = libxl_console_exec(ctx, domid_vm, 0, LIBXL_CONSOLE_TYPE_PV);
+            *domid = domid_vm;
+            *cons_num = 0;
+            *type = LIBXL_CONSOLE_TYPE_PV;
             break;
         case -1:
-            LOG(ERROR,"unable to get domain type for domid=%"PRIu32,domid_vm);
-            rc = ERROR_FAIL;
+            LOG(ERROR,"unable to get domain type for domid=%"PRIu32, domid_vm);
+            rc = ERROR_INVAL;
+            goto out;
             break;
         default:
             abort();
         }
     }
+
+    rc = 0;
+out:
     GC_FREE;
     return rc;
 }
 
+int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm)
+{
+    uint32_t domid;
+    int cons_num;
+    libxl_console_type type;
+    int rc;
+
+    rc = libxl__primary_console_find(ctx, domid_vm, &domid, &cons_num, &type);
+    if ( rc ) return rc;
+    return libxl_console_exec(ctx, domid, cons_num, type);
+}
+
+int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm,
+                                  char **path)
+{
+    uint32_t domid;
+    int cons_num;
+    libxl_console_type type;
+    int rc;
+
+    rc = libxl__primary_console_find(ctx, domid_vm, &domid, &cons_num, &type);
+    if ( rc ) return rc;
+    return libxl_console_get_tty(ctx, domid, cons_num, type, path);
+}
+
 int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass)
 {
     GC_INIT(ctx);
diff -r 47e83b338c52 -r 123628d31cf2 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Wed Jun 06 12:46:17 2012 +0100
+++ b/tools/libxl/libxl.h	Wed Jun 06 12:46:18 2012 +0100
@@ -570,6 +570,18 @@ int libxl_console_exec(libxl_ctx *ctx, u
  * guests using pygrub. */
 int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm);
 
+/* libxl_console_get_tty retrieves the specified domain's console tty path
+ * and stores it in path. Caller is responsible for freeing the memory.
+ */
+int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
+                          libxl_console_type type, char **path);
+
+/* libxl_primary_console_get_tty retrieves the specified domain's primary
+ * console tty path and stores it in path. Caller is responsible for freeing
+ * the memory.
+ */
+int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm, char **path);
+
 /* May be called with info_r == NULL to check for domain's existance */
 int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r,
                       uint32_t domid);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShs-0006nd-LH; Thu, 07 Jun 2012 02:44:16 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShq-0006n6-U9
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:15 +0000
Received: from [85.158.139.83:57627] by server-5.bemta-5.messagelabs.com id
	D1/EA-04481-E7510DF4; Thu, 07 Jun 2012 02:44:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-182.messagelabs.com!1339037052!25011165!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14198 invoked from network); 7 Jun 2012 02:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0004hz-Gy
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0002kB-CV
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Message-Id: <E1ScShn-0002kB-CV@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: fix page_list_splice()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1338997025 -3600
# Node ID f6bfaf9daa508c31b2bca0e461202db2759426fc
# Parent  8ec2c428f4dad55cf6d91b893a19c2218972db5e
xen: fix page_list_splice()

Other than in __list_splice(), the first element's prev pointer
doesn't need adjustment here - it already is PAGE_LIST_NULL. Rather
than fixing the assignment (to formally match __list_splice()), simply
assert that this assignment is really unnecessary.

Reported-by: Jisoo Yang <jisooy@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Also assert that the prev pointers are both PAGE_LIST_NULL.

Signed-off-by: Keir Fraser <keir@xen.org>

Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 8ec2c428f4da -r f6bfaf9daa50 xen/include/xen/mm.h
--- a/xen/include/xen/mm.h	Wed Jun 06 16:34:53 2012 +0100
+++ b/xen/include/xen/mm.h	Wed Jun 06 16:37:05 2012 +0100
@@ -270,7 +270,8 @@ page_list_splice(struct page_list_head *
     last = list->tail;
     at = head->next;
 
-    first->list.prev = page_to_pdx(head->next);
+    ASSERT(first->list.prev == PAGE_LIST_NULL);
+    ASSERT(first->list.prev == at->list.prev);
     head->next = first;
 
     last->list.next = page_to_pdx(at);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShs-0006ni-NY; Thu, 07 Jun 2012 02:44:16 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShq-0006n3-RE
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:15 +0000
Received: from [85.158.139.83:43935] by server-3.bemta-5.messagelabs.com id
	F3/ED-17554-D7510DF4; Thu, 07 Jun 2012 02:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1339037051!32671335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15033 invoked from network); 7 Jun 2012 02:44:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0004hw-18
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0002ju-Su
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Message-Id: <E1ScShm-0002ju-Su@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenpm,
	x86: Fix reporting of idle state average residency times
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1338996893 -3600
# Node ID 8ec2c428f4dad55cf6d91b893a19c2218972db5e
# Parent  3537a8cb0835ce5e96813194d5b0825660108fe0
xenpm, x86: Fix reporting of idle state average residency times

If CPU stays in the same idle state for the full duration of
xenpm sample then average residency may not be reported correctly
since usage counter will not be incremented.

In addition, in order to calculate averages correctly residence
time and usage counter should be read and written atomically.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 3537a8cb0835 -r 8ec2c428f4da tools/misc/xenpm.c
--- a/tools/misc/xenpm.c	Wed Jun 06 16:33:21 2012 +0100
+++ b/tools/misc/xenpm.c	Wed Jun 06 16:34:53 2012 +0100
@@ -389,7 +389,14 @@ static void signal_int_handler(int signo
                 res = ( diff >= 0 ) ? diff : 0;
                 triggers = cxstat_end[i].triggers[j] -
                     cxstat_start[i].triggers[j];
-                avg_res = (triggers==0) ? 0: (double)res/triggers/1000000.0;
+                /* 
+                 * triggers may be zero if the CPU has been in this state for
+                 * the whole sample or if it never entered the state
+                 */
+                if ( triggers == 0 && cxstat_end[i].last == j )
+                    avg_res =  (double)sum_cx[i]/1000000.0;
+                else
+                    avg_res = (triggers==0) ? 0: (double)res/triggers/1000000.0;
                 printf("  C%d\t%"PRIu64"\t(%5.2f%%)\t%.2f\n", j, res/1000000UL,
                         100 * res / (double)sum_cx[i], avg_res );
             }
diff -r 3537a8cb0835 -r 8ec2c428f4da xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c	Wed Jun 06 16:33:21 2012 +0100
+++ b/xen/arch/x86/acpi/cpu_idle.c	Wed Jun 06 16:34:53 2012 +0100
@@ -165,29 +165,35 @@ static void print_acpi_power(uint32_t cp
 {
     uint32_t i, idle_usage = 0;
     uint64_t res, idle_res = 0;
+    u32 usage;
+    u8 last_state_idx;
 
     printk("==cpu%d==\n", cpu);
-    printk("active state:\t\tC%d\n",
-           power->last_state ? power->last_state->idx : -1);
+    last_state_idx = power->last_state ? power->last_state->idx : -1;
+    printk("active state:\t\tC%d\n", last_state_idx);
     printk("max_cstate:\t\tC%d\n", max_cstate);
     printk("states:\n");
     
     for ( i = 1; i < power->count; i++ )
     {
+        spin_lock_irq(&power->stat_lock);	
         res = tick_to_ns(power->states[i].time);
-        idle_usage += power->states[i].usage;
+        usage = power->states[i].usage;
+        spin_unlock_irq(&power->stat_lock);
+
+        idle_usage += usage;
         idle_res += res;
 
-        printk((power->last_state && power->last_state->idx == i) ?
-               "   *" : "    ");
+        printk((last_state_idx == i) ? "   *" : "    ");
         printk("C%d:\t", i);
         printk("type[C%d] ", power->states[i].type);
         printk("latency[%03d] ", power->states[i].latency);
-        printk("usage[%08d] ", power->states[i].usage);
+        printk("usage[%08d] ", usage);
         printk("method[%5s] ", acpi_cstate_method_name[power->states[i].entry_method]);
         printk("duration[%"PRId64"]\n", res);
     }
-    printk("    C0:\tusage[%08d] duration[%"PRId64"]\n",
+    printk((last_state_idx == 0) ? "   *" : "    ");
+    printk("C0:\tusage[%08d] duration[%"PRId64"]\n",
            idle_usage, NOW() - idle_res);
 
     print_hw_residencies(cpu);
@@ -384,12 +390,29 @@ bool_t errata_c6_eoi_workaround(void)
     return (fix_needed && cpu_has_pending_apic_eoi());
 }
 
+static inline void acpi_update_idle_stats(struct acpi_processor_power *power,
+                                          struct acpi_processor_cx *cx,
+                                          int64_t sleep_ticks)
+{
+    /* Interrupts are disabled */
+
+    spin_lock(&power->stat_lock);
+
+    cx->usage++;
+    if ( sleep_ticks > 0 )
+    {
+        power->last_residency = tick_to_ns(sleep_ticks) / 1000UL;
+        cx->time += sleep_ticks;
+    }
+
+    spin_unlock(&power->stat_lock);
+}
+
 static void acpi_processor_idle(void)
 {
     struct acpi_processor_power *power = processor_powers[smp_processor_id()];
     struct acpi_processor_cx *cx = NULL;
     int next_state;
-    int64_t sleep_ticks = 0;
     uint64_t t1, t2 = 0;
     u32 exp = 0, pred = 0;
     u32 irq_traced[4] = { 0 };
@@ -462,10 +485,10 @@ static void acpi_processor_idle(void)
             /* Trace cpu idle exit */
             TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2,
                      irq_traced[0], irq_traced[1], irq_traced[2], irq_traced[3]);
+            /* Update statistics */
+            acpi_update_idle_stats(power, cx, ticks_elapsed(t1, t2));
             /* Re-enable interrupts */
             local_irq_enable();
-            /* Compute time (ticks) that we were actually asleep */
-            sleep_ticks = ticks_elapsed(t1, t2);
             break;
         }
 
@@ -537,28 +560,26 @@ static void acpi_processor_idle(void)
         TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2,
                  irq_traced[0], irq_traced[1], irq_traced[2], irq_traced[3]);
 
+        /* Update statistics */
+        acpi_update_idle_stats(power, cx, ticks_elapsed(t1, t2));
         /* Re-enable interrupts */
         local_irq_enable();
         /* recovering APIC */
         lapic_timer_on();
-        /* Compute time (ticks) that we were actually asleep */
-        sleep_ticks = ticks_elapsed(t1, t2);
 
         break;
 
     default:
+        /* Now in C0 */
+        power->last_state = &power->states[0];
         local_irq_enable();
         sched_tick_resume();
         cpufreq_dbs_timer_resume();
         return;
     }
 
-    cx->usage++;
-    if ( sleep_ticks > 0 )
-    {
-        power->last_residency = tick_to_ns(sleep_ticks) / 1000UL;
-        cx->time += sleep_ticks;
-    }
+    /* Now in C0 */
+    power->last_state = &power->states[0];
 
     sched_tick_resume();
     cpufreq_dbs_timer_resume();
@@ -662,6 +683,7 @@ static int cpuidle_init_cpu(int cpu)
     acpi_power->states[1].type = ACPI_STATE_C1;
     acpi_power->states[1].entry_method = ACPI_CSTATE_EM_HALT;
     acpi_power->safe_state = &acpi_power->states[1];
+    spin_lock_init(&acpi_power->stat_lock);
 
     return 0;
 }
@@ -1064,7 +1086,8 @@ uint32_t pmstat_get_cx_nr(uint32_t cpuid
 int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
 {
     struct acpi_processor_power *power = processor_powers[cpuid];
-    uint64_t usage, res, idle_usage = 0, idle_res = 0;
+    uint64_t idle_usage = 0, idle_res = 0;
+    uint64_t usage[ACPI_PROCESSOR_MAX_POWER], res[ACPI_PROCESSOR_MAX_POWER];
     int i;
     struct hw_residencies hw_res;
 
@@ -1084,16 +1107,14 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     if ( pm_idle_save == NULL )
     {
         /* C1 */
-        usage = 1;
-        res = stat->idle_time;
-        if ( copy_to_guest_offset(stat->triggers, 1, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, 1, &res, 1) )
-            return -EFAULT;
+        usage[1] = 1;
+        res[1] = stat->idle_time;
 
         /* C0 */
-        res = NOW() - res;
-        if ( copy_to_guest_offset(stat->triggers, 0, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, 0, &res, 1) )
+        res[0] = NOW() - res[1];
+
+        if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], 2) ||
+            copy_to_guest_offset(stat->residencies, 0, &res[0], 2) )
             return -EFAULT;
 
         stat->pc2 = 0;
@@ -1110,21 +1131,25 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     {
         if ( i != 0 )
         {
-            usage = power->states[i].usage;
-            res = tick_to_ns(power->states[i].time);
-            idle_usage += usage;
-            idle_res += res;
+            spin_lock_irq(&power->stat_lock);
+            usage[i] = power->states[i].usage;
+            res[i] = tick_to_ns(power->states[i].time);
+            spin_unlock_irq(&power->stat_lock);
+
+            idle_usage += usage[i];
+            idle_res += res[i];
         }
         else
         {
-            usage = idle_usage;
-            res = NOW() - idle_res;
+            usage[i] = idle_usage;
+            res[i] = NOW() - idle_res;
         }
-        if ( copy_to_guest_offset(stat->triggers, i, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, i, &res, 1) )
-            return -EFAULT;
     }
 
+    if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], power->count) ||
+        copy_to_guest_offset(stat->residencies, 0, &res[0], power->count) )
+        return -EFAULT;
+
     get_hw_residencies(cpuid, &hw_res);
 
     stat->pc2 = hw_res.pc2;
diff -r 3537a8cb0835 -r 8ec2c428f4da xen/include/xen/cpuidle.h
--- a/xen/include/xen/cpuidle.h	Wed Jun 06 16:33:21 2012 +0100
+++ b/xen/include/xen/cpuidle.h	Wed Jun 06 16:34:53 2012 +0100
@@ -28,6 +28,7 @@
 #define _XEN_CPUIDLE_H
 
 #include <xen/cpumask.h>
+#include <xen/spinlock.h>
 
 #define ACPI_PROCESSOR_MAX_POWER        8
 #define CPUIDLE_NAME_LEN                16
@@ -69,6 +70,7 @@ struct acpi_processor_power
     void *gdata; /* governor specific data */
     u32 last_residency;
     u32 count;
+    spinlock_t stat_lock;
     struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
 };
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShs-0006ni-NY; Thu, 07 Jun 2012 02:44:16 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShq-0006n3-RE
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:15 +0000
Received: from [85.158.139.83:43935] by server-3.bemta-5.messagelabs.com id
	F3/ED-17554-D7510DF4; Thu, 07 Jun 2012 02:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1339037051!32671335!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15033 invoked from network); 7 Jun 2012 02:44:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShn-0004hw-18
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShm-0002ju-Su
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:10 +0000
Message-Id: <E1ScShm-0002ju-Su@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenpm,
	x86: Fix reporting of idle state average residency times
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1338996893 -3600
# Node ID 8ec2c428f4dad55cf6d91b893a19c2218972db5e
# Parent  3537a8cb0835ce5e96813194d5b0825660108fe0
xenpm, x86: Fix reporting of idle state average residency times

If CPU stays in the same idle state for the full duration of
xenpm sample then average residency may not be reported correctly
since usage counter will not be incremented.

In addition, in order to calculate averages correctly residence
time and usage counter should be read and written atomically.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 3537a8cb0835 -r 8ec2c428f4da tools/misc/xenpm.c
--- a/tools/misc/xenpm.c	Wed Jun 06 16:33:21 2012 +0100
+++ b/tools/misc/xenpm.c	Wed Jun 06 16:34:53 2012 +0100
@@ -389,7 +389,14 @@ static void signal_int_handler(int signo
                 res = ( diff >= 0 ) ? diff : 0;
                 triggers = cxstat_end[i].triggers[j] -
                     cxstat_start[i].triggers[j];
-                avg_res = (triggers==0) ? 0: (double)res/triggers/1000000.0;
+                /* 
+                 * triggers may be zero if the CPU has been in this state for
+                 * the whole sample or if it never entered the state
+                 */
+                if ( triggers == 0 && cxstat_end[i].last == j )
+                    avg_res =  (double)sum_cx[i]/1000000.0;
+                else
+                    avg_res = (triggers==0) ? 0: (double)res/triggers/1000000.0;
                 printf("  C%d\t%"PRIu64"\t(%5.2f%%)\t%.2f\n", j, res/1000000UL,
                         100 * res / (double)sum_cx[i], avg_res );
             }
diff -r 3537a8cb0835 -r 8ec2c428f4da xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c	Wed Jun 06 16:33:21 2012 +0100
+++ b/xen/arch/x86/acpi/cpu_idle.c	Wed Jun 06 16:34:53 2012 +0100
@@ -165,29 +165,35 @@ static void print_acpi_power(uint32_t cp
 {
     uint32_t i, idle_usage = 0;
     uint64_t res, idle_res = 0;
+    u32 usage;
+    u8 last_state_idx;
 
     printk("==cpu%d==\n", cpu);
-    printk("active state:\t\tC%d\n",
-           power->last_state ? power->last_state->idx : -1);
+    last_state_idx = power->last_state ? power->last_state->idx : -1;
+    printk("active state:\t\tC%d\n", last_state_idx);
     printk("max_cstate:\t\tC%d\n", max_cstate);
     printk("states:\n");
     
     for ( i = 1; i < power->count; i++ )
     {
+        spin_lock_irq(&power->stat_lock);	
         res = tick_to_ns(power->states[i].time);
-        idle_usage += power->states[i].usage;
+        usage = power->states[i].usage;
+        spin_unlock_irq(&power->stat_lock);
+
+        idle_usage += usage;
         idle_res += res;
 
-        printk((power->last_state && power->last_state->idx == i) ?
-               "   *" : "    ");
+        printk((last_state_idx == i) ? "   *" : "    ");
         printk("C%d:\t", i);
         printk("type[C%d] ", power->states[i].type);
         printk("latency[%03d] ", power->states[i].latency);
-        printk("usage[%08d] ", power->states[i].usage);
+        printk("usage[%08d] ", usage);
         printk("method[%5s] ", acpi_cstate_method_name[power->states[i].entry_method]);
         printk("duration[%"PRId64"]\n", res);
     }
-    printk("    C0:\tusage[%08d] duration[%"PRId64"]\n",
+    printk((last_state_idx == 0) ? "   *" : "    ");
+    printk("C0:\tusage[%08d] duration[%"PRId64"]\n",
            idle_usage, NOW() - idle_res);
 
     print_hw_residencies(cpu);
@@ -384,12 +390,29 @@ bool_t errata_c6_eoi_workaround(void)
     return (fix_needed && cpu_has_pending_apic_eoi());
 }
 
+static inline void acpi_update_idle_stats(struct acpi_processor_power *power,
+                                          struct acpi_processor_cx *cx,
+                                          int64_t sleep_ticks)
+{
+    /* Interrupts are disabled */
+
+    spin_lock(&power->stat_lock);
+
+    cx->usage++;
+    if ( sleep_ticks > 0 )
+    {
+        power->last_residency = tick_to_ns(sleep_ticks) / 1000UL;
+        cx->time += sleep_ticks;
+    }
+
+    spin_unlock(&power->stat_lock);
+}
+
 static void acpi_processor_idle(void)
 {
     struct acpi_processor_power *power = processor_powers[smp_processor_id()];
     struct acpi_processor_cx *cx = NULL;
     int next_state;
-    int64_t sleep_ticks = 0;
     uint64_t t1, t2 = 0;
     u32 exp = 0, pred = 0;
     u32 irq_traced[4] = { 0 };
@@ -462,10 +485,10 @@ static void acpi_processor_idle(void)
             /* Trace cpu idle exit */
             TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2,
                      irq_traced[0], irq_traced[1], irq_traced[2], irq_traced[3]);
+            /* Update statistics */
+            acpi_update_idle_stats(power, cx, ticks_elapsed(t1, t2));
             /* Re-enable interrupts */
             local_irq_enable();
-            /* Compute time (ticks) that we were actually asleep */
-            sleep_ticks = ticks_elapsed(t1, t2);
             break;
         }
 
@@ -537,28 +560,26 @@ static void acpi_processor_idle(void)
         TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2,
                  irq_traced[0], irq_traced[1], irq_traced[2], irq_traced[3]);
 
+        /* Update statistics */
+        acpi_update_idle_stats(power, cx, ticks_elapsed(t1, t2));
         /* Re-enable interrupts */
         local_irq_enable();
         /* recovering APIC */
         lapic_timer_on();
-        /* Compute time (ticks) that we were actually asleep */
-        sleep_ticks = ticks_elapsed(t1, t2);
 
         break;
 
     default:
+        /* Now in C0 */
+        power->last_state = &power->states[0];
         local_irq_enable();
         sched_tick_resume();
         cpufreq_dbs_timer_resume();
         return;
     }
 
-    cx->usage++;
-    if ( sleep_ticks > 0 )
-    {
-        power->last_residency = tick_to_ns(sleep_ticks) / 1000UL;
-        cx->time += sleep_ticks;
-    }
+    /* Now in C0 */
+    power->last_state = &power->states[0];
 
     sched_tick_resume();
     cpufreq_dbs_timer_resume();
@@ -662,6 +683,7 @@ static int cpuidle_init_cpu(int cpu)
     acpi_power->states[1].type = ACPI_STATE_C1;
     acpi_power->states[1].entry_method = ACPI_CSTATE_EM_HALT;
     acpi_power->safe_state = &acpi_power->states[1];
+    spin_lock_init(&acpi_power->stat_lock);
 
     return 0;
 }
@@ -1064,7 +1086,8 @@ uint32_t pmstat_get_cx_nr(uint32_t cpuid
 int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
 {
     struct acpi_processor_power *power = processor_powers[cpuid];
-    uint64_t usage, res, idle_usage = 0, idle_res = 0;
+    uint64_t idle_usage = 0, idle_res = 0;
+    uint64_t usage[ACPI_PROCESSOR_MAX_POWER], res[ACPI_PROCESSOR_MAX_POWER];
     int i;
     struct hw_residencies hw_res;
 
@@ -1084,16 +1107,14 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     if ( pm_idle_save == NULL )
     {
         /* C1 */
-        usage = 1;
-        res = stat->idle_time;
-        if ( copy_to_guest_offset(stat->triggers, 1, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, 1, &res, 1) )
-            return -EFAULT;
+        usage[1] = 1;
+        res[1] = stat->idle_time;
 
         /* C0 */
-        res = NOW() - res;
-        if ( copy_to_guest_offset(stat->triggers, 0, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, 0, &res, 1) )
+        res[0] = NOW() - res[1];
+
+        if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], 2) ||
+            copy_to_guest_offset(stat->residencies, 0, &res[0], 2) )
             return -EFAULT;
 
         stat->pc2 = 0;
@@ -1110,21 +1131,25 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     {
         if ( i != 0 )
         {
-            usage = power->states[i].usage;
-            res = tick_to_ns(power->states[i].time);
-            idle_usage += usage;
-            idle_res += res;
+            spin_lock_irq(&power->stat_lock);
+            usage[i] = power->states[i].usage;
+            res[i] = tick_to_ns(power->states[i].time);
+            spin_unlock_irq(&power->stat_lock);
+
+            idle_usage += usage[i];
+            idle_res += res[i];
         }
         else
         {
-            usage = idle_usage;
-            res = NOW() - idle_res;
+            usage[i] = idle_usage;
+            res[i] = NOW() - idle_res;
         }
-        if ( copy_to_guest_offset(stat->triggers, i, &usage, 1) ||
-             copy_to_guest_offset(stat->residencies, i, &res, 1) )
-            return -EFAULT;
     }
 
+    if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], power->count) ||
+        copy_to_guest_offset(stat->residencies, 0, &res[0], power->count) )
+        return -EFAULT;
+
     get_hw_residencies(cpuid, &hw_res);
 
     stat->pc2 = hw_res.pc2;
diff -r 3537a8cb0835 -r 8ec2c428f4da xen/include/xen/cpuidle.h
--- a/xen/include/xen/cpuidle.h	Wed Jun 06 16:33:21 2012 +0100
+++ b/xen/include/xen/cpuidle.h	Wed Jun 06 16:34:53 2012 +0100
@@ -28,6 +28,7 @@
 #define _XEN_CPUIDLE_H
 
 #include <xen/cpumask.h>
+#include <xen/spinlock.h>
 
 #define ACPI_PROCESSOR_MAX_POWER        8
 #define CPUIDLE_NAME_LEN                16
@@ -69,6 +70,7 @@ struct acpi_processor_power
     void *gdata; /* governor specific data */
     u32 last_residency;
     u32 count;
+    spinlock_t stat_lock;
     struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
 };
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShq-0006nC-Ix; Thu, 07 Jun 2012 02:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShp-0006mT-1u
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:13 +0000
Received: from [85.158.138.51:58981] by server-1.bemta-3.messagelabs.com id
	A4/71-01327-C7510DF4; Thu, 07 Jun 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1339037050!31205391!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18208 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hq-Sl
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0002jP-RO
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Message-Id: <E1ScShl-0002jP-RO@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: introduce
	LIBXL_DOMAIN_TYPE_INVALID
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1338994628 -3600
# Node ID f2f9745c81b74dac74b4d378bef4695eece181d7
# Parent  a24ffff4e18d3313be6ff66eb895071fd8dfef84
libxl: introduce LIBXL_DOMAIN_TYPE_INVALID

To avoid recent gcc complaining about:
libxl.c: In function 'libxl_primary_console_exec':
libxl.c:1233:9: error: case value '4294967295' not in enumerated type 'libxl_domain_type' [-Werror=switch]

Also:
 - have all the call sites of libxl__domain_type() return with error in
   case the function returns LIBXL_DOMAIN_TYPE_INVALID;
 - adjust all other code segments where -Wswitch makes would claim that
   LIBXL_DOMAIN_TYPE_INVALID is not handled by adding a "default: abort();"
   clause.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use LIBXL_DOMAIN_TYPE_INVALID instead of -1 for
         libxl_domain_build_info.type's keyvar_init_val.
      -- what used to be libxl_primary_console_exec is now in
         libxl__primary_console_find so resolve the rejected hunk
         accordingly ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 15:57:08 2012 +0100
@@ -656,6 +656,11 @@ int libxl_domain_remus_start(libxl_ctx *
     libxl_domain_type type = libxl__domain_type(gc, domid);
     int rc = 0;
 
+    if (type == LIBXL_DOMAIN_TYPE_INVALID) {
+        rc = ERROR_FAIL;
+        goto remus_fail;
+    }
+
     if (info == NULL) {
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
                    "No remus_info structure supplied for domain %d", domid);
@@ -1313,11 +1318,9 @@ static int libxl__primary_console_find(l
             *cons_num = 0;
             *type = LIBXL_CONSOLE_TYPE_PV;
             break;
-        case -1:
-            LOG(ERROR,"unable to get domain type for domid=%"PRIu32, domid_vm);
+        case LIBXL_DOMAIN_TYPE_INVALID:
             rc = ERROR_INVAL;
             goto out;
-            break;
         default:
             abort();
         }
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Wed Jun 06 15:57:08 2012 +0100
@@ -257,6 +257,8 @@ static char ** libxl__build_device_model
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
         break;
+    default:
+        abort();
     }
     flexarray_append(dm_args, NULL);
     return (char **) flexarray_contents(dm_args);
@@ -505,6 +507,8 @@ static char ** libxl__build_device_model
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
         break;
+    default:
+        abort();
     }
 
     ram_size = libxl__sizekb_to_mb(b_info->max_memkb - b_info->video_memkb);
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Wed Jun 06 15:57:08 2012 +0100
@@ -32,10 +32,11 @@ libxl_domain_type libxl__domain_type(lib
     int ret;
 
     ret = xc_domain_getinfolist(ctx->xch, domid, 1, &info);
-    if (ret != 1)
-        return -1;
-    if (info.domain != domid)
-        return -1;
+    if (ret != 1 || info.domain != domid) {
+        LIBXL__LOG(CTX, LIBXL__LOG_ERROR,
+                   "unable to get domain type for domid=%"PRIu32, domid);
+        return LIBXL_DOMAIN_TYPE_INVALID;
+    }
     if (info.flags & XEN_DOMINF_hvm_guest)
         return LIBXL_DOMAIN_TYPE_HVM;
     else
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Wed Jun 06 15:57:08 2012 +0100
@@ -28,6 +28,7 @@ MemKB = UInt(64, init_val = "LIBXL_MEMKB
 #
 
 libxl_domain_type = Enumeration("domain_type", [
+    (-1, "INVALID"),
     (1, "HVM"),
     (2, "PV"),
     ])
@@ -310,7 +311,8 @@ libxl_domain_build_info = Struct("domain
                                       # Use host's E820 for PCI passthrough.
                                       ("e820_host", libxl_defbool),
                                       ])),
-                 ], keyvar_init_val = "-1")),
+                 ("invalid", Struct(None, [])),
+                 ], keyvar_init_val = "LIBXL_DOMAIN_TYPE_INVALID")),
     ], dir=DIR_IN
 )
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScShq-0006nC-Ix; Thu, 07 Jun 2012 02:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShp-0006mT-1u
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:13 +0000
Received: from [85.158.138.51:58981] by server-1.bemta-3.messagelabs.com id
	A4/71-01327-C7510DF4; Thu, 07 Jun 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1339037050!31205391!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18208 invoked from network); 7 Jun 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0004hq-Sl
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScShl-0002jP-RO
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 02:44:09 +0000
Message-Id: <E1ScShl-0002jP-RO@xenbits.xen.org>
Date: Thu, 07 Jun 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: introduce
	LIBXL_DOMAIN_TYPE_INVALID
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1338994628 -3600
# Node ID f2f9745c81b74dac74b4d378bef4695eece181d7
# Parent  a24ffff4e18d3313be6ff66eb895071fd8dfef84
libxl: introduce LIBXL_DOMAIN_TYPE_INVALID

To avoid recent gcc complaining about:
libxl.c: In function 'libxl_primary_console_exec':
libxl.c:1233:9: error: case value '4294967295' not in enumerated type 'libxl_domain_type' [-Werror=switch]

Also:
 - have all the call sites of libxl__domain_type() return with error in
   case the function returns LIBXL_DOMAIN_TYPE_INVALID;
 - adjust all other code segments where -Wswitch makes would claim that
   LIBXL_DOMAIN_TYPE_INVALID is not handled by adding a "default: abort();"
   clause.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use LIBXL_DOMAIN_TYPE_INVALID instead of -1 for
         libxl_domain_build_info.type's keyvar_init_val.
      -- what used to be libxl_primary_console_exec is now in
         libxl__primary_console_find so resolve the rejected hunk
         accordingly ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Jun 06 15:57:08 2012 +0100
@@ -656,6 +656,11 @@ int libxl_domain_remus_start(libxl_ctx *
     libxl_domain_type type = libxl__domain_type(gc, domid);
     int rc = 0;
 
+    if (type == LIBXL_DOMAIN_TYPE_INVALID) {
+        rc = ERROR_FAIL;
+        goto remus_fail;
+    }
+
     if (info == NULL) {
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
                    "No remus_info structure supplied for domain %d", domid);
@@ -1313,11 +1318,9 @@ static int libxl__primary_console_find(l
             *cons_num = 0;
             *type = LIBXL_CONSOLE_TYPE_PV;
             break;
-        case -1:
-            LOG(ERROR,"unable to get domain type for domid=%"PRIu32, domid_vm);
+        case LIBXL_DOMAIN_TYPE_INVALID:
             rc = ERROR_INVAL;
             goto out;
-            break;
         default:
             abort();
         }
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Wed Jun 06 15:57:08 2012 +0100
@@ -257,6 +257,8 @@ static char ** libxl__build_device_model
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
         break;
+    default:
+        abort();
     }
     flexarray_append(dm_args, NULL);
     return (char **) flexarray_contents(dm_args);
@@ -505,6 +507,8 @@ static char ** libxl__build_device_model
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
         break;
+    default:
+        abort();
     }
 
     ram_size = libxl__sizekb_to_mb(b_info->max_memkb - b_info->video_memkb);
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Wed Jun 06 15:57:08 2012 +0100
@@ -32,10 +32,11 @@ libxl_domain_type libxl__domain_type(lib
     int ret;
 
     ret = xc_domain_getinfolist(ctx->xch, domid, 1, &info);
-    if (ret != 1)
-        return -1;
-    if (info.domain != domid)
-        return -1;
+    if (ret != 1 || info.domain != domid) {
+        LIBXL__LOG(CTX, LIBXL__LOG_ERROR,
+                   "unable to get domain type for domid=%"PRIu32, domid);
+        return LIBXL_DOMAIN_TYPE_INVALID;
+    }
     if (info.flags & XEN_DOMINF_hvm_guest)
         return LIBXL_DOMAIN_TYPE_HVM;
     else
diff -r a24ffff4e18d -r f2f9745c81b7 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Wed Jun 06 13:53:59 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Wed Jun 06 15:57:08 2012 +0100
@@ -28,6 +28,7 @@ MemKB = UInt(64, init_val = "LIBXL_MEMKB
 #
 
 libxl_domain_type = Enumeration("domain_type", [
+    (-1, "INVALID"),
     (1, "HVM"),
     (2, "PV"),
     ])
@@ -310,7 +311,8 @@ libxl_domain_build_info = Struct("domain
                                       # Use host's E820 for PCI passthrough.
                                       ("e820_host", libxl_defbool),
                                       ])),
-                 ], keyvar_init_val = "-1")),
+                 ("invalid", Struct(None, [])),
+                 ], keyvar_init_val = "LIBXL_DOMAIN_TYPE_INVALID")),
     ], dir=DIR_IN
 )
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 18:55:15 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 18:55: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 1SchrT-0000R9-5o; Thu, 07 Jun 2012 18:55: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 1SchrR-0000R4-I3
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:09 +0000
Received: from [85.158.138.51:29540] by server-1.bemta-3.messagelabs.com id
	86/BF-01327-C09F0DF4; Thu, 07 Jun 2012 18:55:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-174.messagelabs.com!1339095306!12640792!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26180 invoked from network); 7 Jun 2012 18:55:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 18:55:07 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrN-00005A-0L
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrM-0000UR-PO
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:04 +0000
Date: Thu, 07 Jun 2012 18:55:04 +0000
Message-Id: <E1SchrM-0000UR-PO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad/block: use a
	character device if a block device is given
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 136f340531929c723113bbd625d99de2b552a871
Author: Christoph Egger <Christoph.Egger@amd.com>
Date:   Thu Jun 7 19:35:28 2012 +0100

    qemu-xen-trad/block: use a character device if a block device is given
    
    On NetBSD a userland process is better with the character device
    interface. In addition, a block device can't be opened twice; if a Xen
    backend opens it, qemu can't and vice-versa.
    
    This is a backport of 1de1ae0a7d956b3c87712bf2c09d277f99873f4c.
    
    Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    
    Backport-requested-by: Roger Pau Monne <roger.pau@citrix.com>
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 block-raw-posix.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index 9a02d4f..e7d7457 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -116,11 +116,54 @@ static int posix_aio_init(void);
 
 static int fd_open(BlockDriverState *bs);
 
+#if defined(__NetBSD__)
+static int raw_normalize_devicepath(const char **filename)
+{
+    static char namebuf[PATH_MAX];
+    const char *dp, *fname;
+    struct stat sb;
+
+    fname = *filename;
+    dp = strrchr(fname, '/');
+    if (lstat(fname, &sb) < 0) {
+        fprintf(stderr, "%s: stat failed: %s\n",
+            fname, strerror(errno));
+        return -errno;
+    }
+
+    if (!S_ISBLK(sb.st_mode)) {
+        return 0;
+    }
+
+    if (dp == NULL) {
+        snprintf(namebuf, PATH_MAX, "r%s", fname);
+    } else {
+        snprintf(namebuf, PATH_MAX, "%.*s/r%s",
+            (int)(dp - fname), fname, dp + 1);
+    }
+    fprintf(stderr, "%s is a block device", fname);
+    *filename = namebuf;
+    fprintf(stderr, ", using %s\n", *filename);
+
+    return 0;
+}
+#else
+static int raw_normalize_devicepath(const char **filename)
+{
+    return 0;
+}
+#endif
+
 static int raw_open(BlockDriverState *bs, const char *filename, int flags)
 {
     BDRVRawState *s = bs->opaque;
     int fd, open_flags, ret;
 
+    ret = raw_normalize_devicepath(&filename);
+    if (ret != 0) {
+        return ret;
+    }
+
     posix_aio_init();
 
     s->lseek_err_cnt = 0;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 18:55:15 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 18:55: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 1SchrT-0000R9-5o; Thu, 07 Jun 2012 18:55: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 1SchrR-0000R4-I3
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:09 +0000
Received: from [85.158.138.51:29540] by server-1.bemta-3.messagelabs.com id
	86/BF-01327-C09F0DF4; Thu, 07 Jun 2012 18:55:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-174.messagelabs.com!1339095306!12640792!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26180 invoked from network); 7 Jun 2012 18:55:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 18:55:07 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrN-00005A-0L
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrM-0000UR-PO
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:04 +0000
Date: Thu, 07 Jun 2012 18:55:04 +0000
Message-Id: <E1SchrM-0000UR-PO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad/block: use a
	character device if a block device is given
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 136f340531929c723113bbd625d99de2b552a871
Author: Christoph Egger <Christoph.Egger@amd.com>
Date:   Thu Jun 7 19:35:28 2012 +0100

    qemu-xen-trad/block: use a character device if a block device is given
    
    On NetBSD a userland process is better with the character device
    interface. In addition, a block device can't be opened twice; if a Xen
    backend opens it, qemu can't and vice-versa.
    
    This is a backport of 1de1ae0a7d956b3c87712bf2c09d277f99873f4c.
    
    Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    
    Backport-requested-by: Roger Pau Monne <roger.pau@citrix.com>
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 block-raw-posix.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index 9a02d4f..e7d7457 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -116,11 +116,54 @@ static int posix_aio_init(void);
 
 static int fd_open(BlockDriverState *bs);
 
+#if defined(__NetBSD__)
+static int raw_normalize_devicepath(const char **filename)
+{
+    static char namebuf[PATH_MAX];
+    const char *dp, *fname;
+    struct stat sb;
+
+    fname = *filename;
+    dp = strrchr(fname, '/');
+    if (lstat(fname, &sb) < 0) {
+        fprintf(stderr, "%s: stat failed: %s\n",
+            fname, strerror(errno));
+        return -errno;
+    }
+
+    if (!S_ISBLK(sb.st_mode)) {
+        return 0;
+    }
+
+    if (dp == NULL) {
+        snprintf(namebuf, PATH_MAX, "r%s", fname);
+    } else {
+        snprintf(namebuf, PATH_MAX, "%.*s/r%s",
+            (int)(dp - fname), fname, dp + 1);
+    }
+    fprintf(stderr, "%s is a block device", fname);
+    *filename = namebuf;
+    fprintf(stderr, ", using %s\n", *filename);
+
+    return 0;
+}
+#else
+static int raw_normalize_devicepath(const char **filename)
+{
+    return 0;
+}
+#endif
+
 static int raw_open(BlockDriverState *bs, const char *filename, int flags)
 {
     BDRVRawState *s = bs->opaque;
     int fd, open_flags, ret;
 
+    ret = raw_normalize_devicepath(&filename);
+    if (ret != 0) {
+        return ret;
+    }
+
     posix_aio_init();
 
     s->lseek_err_cnt = 0;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 18:55:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 18:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Schrb-0000Ri-8l; Thu, 07 Jun 2012 18:55: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 1Schra-0000Rd-GZ
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:18 +0000
Received: from [85.158.143.35:17379] by server-2.bemta-4.messagelabs.com id
	A9/51-17938-519F0DF4; Thu, 07 Jun 2012 18:55:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1339095315!14900554!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29712 invoked from network); 7 Jun 2012 18:55:16 -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;
	7 Jun 2012 18:55:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrX-00005D-9G
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrX-0000Ur-4J
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:15 +0000
Date: Thu, 07 Jun 2012 18:55:15 +0000
Message-Id: <E1SchrX-0000Ur-4J@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad/block: get right
	partition size
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
Author: Adam Hamsik <haad@netbsd.org>
Date:   Thu Jun 7 19:36:26 2012 +0100

    qemu-xen-trad/block: get right partition size
    
    use the correct way to get the size of a disk device or partition
    
    This this a backport of d1f6fd8d1400ab356aee776b1ecc3ed1e89dbeaa.
    
    From: Adam Hamsik <haad@netbsd.org>
    Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    
    Backport-requested-by: Roger Pau Monne <roger.pau@citrix.com>
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 block-raw-posix.c |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index e7d7457..795cd5b 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -60,6 +60,12 @@
 #include <signal.h>
 #include <sys/disk.h>
 #endif
+#ifdef __NetBSD__
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#include <sys/dkio.h>
+#include <sys/disk.h>
+#endif
 
 #ifdef __OpenBSD__
 #include <sys/ioctl.h>
@@ -811,7 +817,32 @@ static int64_t raw_getlength(BlockDriverState *bs)
     } else
         return st.st_size;
 }
-#else /* !__OpenBSD__ */
+#elif defined(__NetBSD__)
+static int64_t raw_getlength(BlockDriverState *bs)
+{
+    BDRVRawState *s = bs->opaque;
+    int fd = s->fd;
+    struct stat st;
+
+    if (fstat(fd, &st))
+        return -1;
+    if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
+        struct dkwedge_info dkw;
+
+        if (ioctl(fd, DIOCGWEDGEINFO, &dkw) != -1) {
+            return dkw.dkw_size * 512;
+        } else {
+            struct disklabel dl;
+
+            if (ioctl(fd, DIOCGDINFO, &dl))
+                return -1;
+            return (uint64_t)dl.d_secsize *
+                dl.d_partitions[DISKPART(st.st_rdev)].p_size;
+        }
+    } else
+        return st.st_size;
+}
+#else /* !__OpenBSD__ && !__NetBSD__ */
 static int64_t  raw_getlength(BlockDriverState *bs)
 {
     BDRVRawState *s = bs->opaque;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 18:55:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 18:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Schrb-0000Ri-8l; Thu, 07 Jun 2012 18:55: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 1Schra-0000Rd-GZ
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:18 +0000
Received: from [85.158.143.35:17379] by server-2.bemta-4.messagelabs.com id
	A9/51-17938-519F0DF4; Thu, 07 Jun 2012 18:55:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1339095315!14900554!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29712 invoked from network); 7 Jun 2012 18:55:16 -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;
	7 Jun 2012 18:55:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrX-00005D-9G
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SchrX-0000Ur-4J
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 18:55:15 +0000
Date: Thu, 07 Jun 2012 18:55:15 +0000
Message-Id: <E1SchrX-0000Ur-4J@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad/block: get right
	partition size
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
Author: Adam Hamsik <haad@netbsd.org>
Date:   Thu Jun 7 19:36:26 2012 +0100

    qemu-xen-trad/block: get right partition size
    
    use the correct way to get the size of a disk device or partition
    
    This this a backport of d1f6fd8d1400ab356aee776b1ecc3ed1e89dbeaa.
    
    From: Adam Hamsik <haad@netbsd.org>
    Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    
    Backport-requested-by: Roger Pau Monne <roger.pau@citrix.com>
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 block-raw-posix.c |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index e7d7457..795cd5b 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -60,6 +60,12 @@
 #include <signal.h>
 #include <sys/disk.h>
 #endif
+#ifdef __NetBSD__
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#include <sys/dkio.h>
+#include <sys/disk.h>
+#endif
 
 #ifdef __OpenBSD__
 #include <sys/ioctl.h>
@@ -811,7 +817,32 @@ static int64_t raw_getlength(BlockDriverState *bs)
     } else
         return st.st_size;
 }
-#else /* !__OpenBSD__ */
+#elif defined(__NetBSD__)
+static int64_t raw_getlength(BlockDriverState *bs)
+{
+    BDRVRawState *s = bs->opaque;
+    int fd = s->fd;
+    struct stat st;
+
+    if (fstat(fd, &st))
+        return -1;
+    if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
+        struct dkwedge_info dkw;
+
+        if (ioctl(fd, DIOCGWEDGEINFO, &dkw) != -1) {
+            return dkw.dkw_size * 512;
+        } else {
+            struct disklabel dl;
+
+            if (ioctl(fd, DIOCGDINFO, &dl))
+                return -1;
+            return (uint64_t)dl.d_secsize *
+                dl.d_partitions[DISKPART(st.st_rdev)].p_size;
+        }
+    } else
+        return st.st_size;
+}
+#else /* !__OpenBSD__ && !__NetBSD__ */
 static int64_t  raw_getlength(BlockDriverState *bs)
 {
     BDRVRawState *s = bs->opaque;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 19:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 19:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sci6z-00011B-OP; Thu, 07 Jun 2012 19:11:13 +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 1Sci6y-00010q-PX
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:12 +0000
Received: from [85.158.139.83:39642] by server-5.bemta-5.messagelabs.com id
	9B/53-04481-0DCF0DF4; Thu, 07 Jun 2012 19:11:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-182.messagelabs.com!1339096267!32418744!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9083 invoked from network); 7 Jun 2012 19:11:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 19:11: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 1Sci6t-0000IC-0l
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Sci6q-0000yE-Bm
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:06 +0000
Date: Thu, 07 Jun 2012 19:11:04 +0000
Message-Id: <E1Sci6q-0000yE-Bm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad: fix sys-queue.h
	usage on BSD systems
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 50c553be472c9f4b05a0526c0aae98709ca9ffff
Author: Roger Pau Monne <roger.pau@citrix.com>
Date:   Thu Jun 7 19:44:01 2012 +0100

    qemu-xen-trad: fix sys-queue.h usage on BSD systems
    
    BSD systems already have a sys/queue.h file, which has more macros
    than the one Qemu uses, and some header files depend on having that
    macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
    systems and include the native one.
    
    This is not a backport because the original patch is too dificult to
    backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
    
    Doing a diff -bB shows that the Qemu version is just a stripped
    version of the original NetBSD header, with many macros removed, but
    no new ones added.
    
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
    Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sys-queue.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sys-queue.h b/sys-queue.h
index cb6a4c8..55c26fe 100644
--- a/sys-queue.h
+++ b/sys-queue.h
@@ -36,6 +36,12 @@
  *      @(#)queue.h     8.5 (Berkeley) 8/20/94
  */
 
+#include "config-host.h"
+#ifdef _BSD
+/* include native header before sys-queue.h */
+#include <sys/queue.h>
+#endif
+
 #ifndef _SYS_QUEUE_H_
 #define _SYS_QUEUE_H_
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 07 19:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 07 Jun 2012 19:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sci6z-00011B-OP; Thu, 07 Jun 2012 19:11:13 +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 1Sci6y-00010q-PX
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:12 +0000
Received: from [85.158.139.83:39642] by server-5.bemta-5.messagelabs.com id
	9B/53-04481-0DCF0DF4; Thu, 07 Jun 2012 19:11:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-182.messagelabs.com!1339096267!32418744!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9083 invoked from network); 7 Jun 2012 19:11:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Jun 2012 19:11: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 1Sci6t-0000IC-0l
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Sci6q-0000yE-Bm
	for xen-changelog@lists.xensource.com; Thu, 07 Jun 2012 19:11:06 +0000
Date: Thu, 07 Jun 2012 19:11:04 +0000
Message-Id: <E1Sci6q-0000yE-Bm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad: fix sys-queue.h
	usage on BSD systems
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 50c553be472c9f4b05a0526c0aae98709ca9ffff
Author: Roger Pau Monne <roger.pau@citrix.com>
Date:   Thu Jun 7 19:44:01 2012 +0100

    qemu-xen-trad: fix sys-queue.h usage on BSD systems
    
    BSD systems already have a sys/queue.h file, which has more macros
    than the one Qemu uses, and some header files depend on having that
    macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
    systems and include the native one.
    
    This is not a backport because the original patch is too dificult to
    backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
    
    Doing a diff -bB shows that the Qemu version is just a stripped
    version of the original NetBSD header, with many macros removed, but
    no new ones added.
    
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
    Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sys-queue.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sys-queue.h b/sys-queue.h
index cb6a4c8..55c26fe 100644
--- a/sys-queue.h
+++ b/sys-queue.h
@@ -36,6 +36,12 @@
  *      @(#)queue.h     8.5 (Berkeley) 8/20/94
  */
 
+#include "config-host.h"
+#ifdef _BSD
+/* include native header before sys-queue.h */
+#include <sys/queue.h>
+#endif
+
 #ifndef _SYS_QUEUE_H_
 #define _SYS_QUEUE_H_
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44: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 1ScnJE-0006vd-Oy; Fri, 08 Jun 2012 00:44:12 +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 1ScnJD-0006vD-Se
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [193.109.254.147:2653] by server-10.bemta-14.messagelabs.com id
	AF/19-25709-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1339116249!8701340!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3895 invoked from network); 8 Jun 2012 00:44:10 -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 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QH-7V
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJA-0000Ac-Qi
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:08 +0000
Message-Id: <E1ScnJA-0000Ac-Qi@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenstore: set read_thread stacksize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Simon Rowe <simon.rowe@eu.citrix.com>
# Date 1339089780 -3600
# Node ID 0474a8b847622fadc20fead17c68cd3d95dc1a7f
# Parent  32a31e2cb03942f95a9453bba172e8732101761e
xenstore: set read_thread stacksize

xs_watch() creates a thread to wake watchers using default attributes. The
stacksize can be quite large (8 MB on Linux), applications that link against
xenstore end up having a larger memory footprint than necessary.

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 32a31e2cb039 -r 0474a8b84762 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c	Thu Jun 07 18:22:20 2012 +0100
+++ b/tools/xenstore/xs.c	Thu Jun 07 18:23:00 2012 +0100
@@ -702,21 +702,36 @@ bool xs_watch(struct xs_handle *h, const
 	struct iovec iov[2];
 
 #ifdef USE_PTHREAD
+#define READ_THREAD_STACKSIZE (16 * 1024)
+
 	/* We dynamically create a reader thread on demand. */
 	mutex_lock(&h->request_mutex);
 	if (!h->read_thr_exists) {
 		sigset_t set, old_set;
+		pthread_attr_t attr;
+
+		if (pthread_attr_init(&attr) != 0) {
+			mutex_unlock(&h->request_mutex);
+			return false;
+		}
+		if (pthread_attr_setstacksize(&attr, READ_THREAD_STACKSIZE) != 0) {
+			pthread_attr_destroy(&attr);
+			mutex_unlock(&h->request_mutex);
+			return false;
+		}
 
 		sigfillset(&set);
 		pthread_sigmask(SIG_SETMASK, &set, &old_set);
 
-		if (pthread_create(&h->read_thr, NULL, read_thread, h) != 0) {
+		if (pthread_create(&h->read_thr, &attr, read_thread, h) != 0) {
 			pthread_sigmask(SIG_SETMASK, &old_set, NULL);
+			pthread_attr_destroy(&attr);
 			mutex_unlock(&h->request_mutex);
 			return false;
 		}
 		h->read_thr_exists = 1;
 		pthread_sigmask(SIG_SETMASK, &old_set, NULL);
+		pthread_attr_destroy(&attr);
 	}
 	mutex_unlock(&h->request_mutex);
 #endif

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44: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 1ScnJE-0006vd-Oy; Fri, 08 Jun 2012 00:44:12 +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 1ScnJD-0006vD-Se
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [193.109.254.147:2653] by server-10.bemta-14.messagelabs.com id
	AF/19-25709-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1339116249!8701340!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3895 invoked from network); 8 Jun 2012 00:44:10 -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 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QH-7V
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJA-0000Ac-Qi
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:08 +0000
Message-Id: <E1ScnJA-0000Ac-Qi@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenstore: set read_thread stacksize
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Simon Rowe <simon.rowe@eu.citrix.com>
# Date 1339089780 -3600
# Node ID 0474a8b847622fadc20fead17c68cd3d95dc1a7f
# Parent  32a31e2cb03942f95a9453bba172e8732101761e
xenstore: set read_thread stacksize

xs_watch() creates a thread to wake watchers using default attributes. The
stacksize can be quite large (8 MB on Linux), applications that link against
xenstore end up having a larger memory footprint than necessary.

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 32a31e2cb039 -r 0474a8b84762 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c	Thu Jun 07 18:22:20 2012 +0100
+++ b/tools/xenstore/xs.c	Thu Jun 07 18:23:00 2012 +0100
@@ -702,21 +702,36 @@ bool xs_watch(struct xs_handle *h, const
 	struct iovec iov[2];
 
 #ifdef USE_PTHREAD
+#define READ_THREAD_STACKSIZE (16 * 1024)
+
 	/* We dynamically create a reader thread on demand. */
 	mutex_lock(&h->request_mutex);
 	if (!h->read_thr_exists) {
 		sigset_t set, old_set;
+		pthread_attr_t attr;
+
+		if (pthread_attr_init(&attr) != 0) {
+			mutex_unlock(&h->request_mutex);
+			return false;
+		}
+		if (pthread_attr_setstacksize(&attr, READ_THREAD_STACKSIZE) != 0) {
+			pthread_attr_destroy(&attr);
+			mutex_unlock(&h->request_mutex);
+			return false;
+		}
 
 		sigfillset(&set);
 		pthread_sigmask(SIG_SETMASK, &set, &old_set);
 
-		if (pthread_create(&h->read_thr, NULL, read_thread, h) != 0) {
+		if (pthread_create(&h->read_thr, &attr, read_thread, h) != 0) {
 			pthread_sigmask(SIG_SETMASK, &old_set, NULL);
+			pthread_attr_destroy(&attr);
 			mutex_unlock(&h->request_mutex);
 			return false;
 		}
 		h->read_thr_exists = 1;
 		pthread_sigmask(SIG_SETMASK, &old_set, NULL);
+		pthread_attr_destroy(&attr);
 	}
 	mutex_unlock(&h->request_mutex);
 #endif

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44: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 1ScnJE-0006vU-MA; Fri, 08 Jun 2012 00:44:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0006vA-Bf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from [85.158.143.99:21920] by server-1.bemta-4.messagelabs.com id
	C4/B9-10042-ADA41DF4; Fri, 08 Jun 2012 00:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-216.messagelabs.com!1339116249!24295610!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29723 invoked from network); 8 Jun 2012 00:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QE-0p
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJA-0000AN-8N
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:08 +0000
Message-Id: <E1ScnJA-0000AN-8N@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenstore: block signals in watch
	wakeup thread
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Simon Rowe <simon.rowe@eu.citrix.com>
# Date 1339089740 -3600
# Node ID 32a31e2cb03942f95a9453bba172e8732101761e
# Parent  f6bfaf9daa508c31b2bca0e461202db2759426fc
xenstore: block signals in watch wakeup thread

The thread created to wakeup watchers is not intended to handle signals
(and a later patch will reduce it's stack size which makes it unsuitable
for doing so).

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f6bfaf9daa50 -r 32a31e2cb039 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c	Wed Jun 06 16:37:05 2012 +0100
+++ b/tools/xenstore/xs.c	Thu Jun 07 18:22:20 2012 +0100
@@ -705,11 +705,18 @@ bool xs_watch(struct xs_handle *h, const
 	/* We dynamically create a reader thread on demand. */
 	mutex_lock(&h->request_mutex);
 	if (!h->read_thr_exists) {
+		sigset_t set, old_set;
+
+		sigfillset(&set);
+		pthread_sigmask(SIG_SETMASK, &set, &old_set);
+
 		if (pthread_create(&h->read_thr, NULL, read_thread, h) != 0) {
+			pthread_sigmask(SIG_SETMASK, &old_set, NULL);
 			mutex_unlock(&h->request_mutex);
 			return false;
 		}
 		h->read_thr_exists = 1;
+		pthread_sigmask(SIG_SETMASK, &old_set, NULL);
 	}
 	mutex_unlock(&h->request_mutex);
 #endif

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44: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 1ScnJE-0006vU-MA; Fri, 08 Jun 2012 00:44:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0006vA-Bf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from [85.158.143.99:21920] by server-1.bemta-4.messagelabs.com id
	C4/B9-10042-ADA41DF4; Fri, 08 Jun 2012 00:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-216.messagelabs.com!1339116249!24295610!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29723 invoked from network); 8 Jun 2012 00:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QE-0p
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJA-0000AN-8N
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:08 +0000
Message-Id: <E1ScnJA-0000AN-8N@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xenstore: block signals in watch
	wakeup thread
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Simon Rowe <simon.rowe@eu.citrix.com>
# Date 1339089740 -3600
# Node ID 32a31e2cb03942f95a9453bba172e8732101761e
# Parent  f6bfaf9daa508c31b2bca0e461202db2759426fc
xenstore: block signals in watch wakeup thread

The thread created to wakeup watchers is not intended to handle signals
(and a later patch will reduce it's stack size which makes it unsuitable
for doing so).

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f6bfaf9daa50 -r 32a31e2cb039 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c	Wed Jun 06 16:37:05 2012 +0100
+++ b/tools/xenstore/xs.c	Thu Jun 07 18:22:20 2012 +0100
@@ -705,11 +705,18 @@ bool xs_watch(struct xs_handle *h, const
 	/* We dynamically create a reader thread on demand. */
 	mutex_lock(&h->request_mutex);
 	if (!h->read_thr_exists) {
+		sigset_t set, old_set;
+
+		sigfillset(&set);
+		pthread_sigmask(SIG_SETMASK, &set, &old_set);
+
 		if (pthread_create(&h->read_thr, NULL, read_thread, h) != 0) {
+			pthread_sigmask(SIG_SETMASK, &old_set, NULL);
 			mutex_unlock(&h->request_mutex);
 			return false;
 		}
 		h->read_thr_exists = 1;
+		pthread_sigmask(SIG_SETMASK, &old_set, NULL);
 	}
 	mutex_unlock(&h->request_mutex);
 #endif

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00: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 1ScnJH-0006wQ-4A; Fri, 08 Jun 2012 00:44:15 +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 1ScnJF-0006vk-Pf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:13 +0000
Received: from [193.109.254.147:54694] by server-3.bemta-14.messagelabs.com id
	03/DE-05653-CDA41DF4; Fri, 08 Jun 2012 00:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-27.messagelabs.com!1339116251!8526399!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22638 invoked from network); 8 Jun 2012 00:44:12 -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;
	8 Jun 2012 00:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0004QT-0V
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0000Ba-Va
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Message-Id: <E1ScnJC-0000Ba-Va@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1339094423 -3600
# Node ID 15ed87e385a3828c65ca78f555d05dff3c0e44b8
# Parent  75a2bb5db2280163265c2c6b1d536869108aa9af
QEMU_TAG update
---


diff -r 75a2bb5db228 -r 15ed87e385a3 Config.mk
--- a/Config.mk	Thu Jun 07 18:51:42 2012 +0100
+++ b/Config.mk	Thu Jun 07 19:40:23 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7bde54662d45b0bbc2ee78c7a8bf2c97c6655445
-# Mon May 14 17:05:48 2012 +0100
-# xenstore: Use <xenstore.h>
+QEMU_TAG ?= cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
+# Thu Jun 7 19:36:26 2012 +0100
+# qemu-xen-trad/block: get right partition size
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00: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 1ScnJH-0006wQ-4A; Fri, 08 Jun 2012 00:44:15 +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 1ScnJF-0006vk-Pf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:13 +0000
Received: from [193.109.254.147:54694] by server-3.bemta-14.messagelabs.com id
	03/DE-05653-CDA41DF4; Fri, 08 Jun 2012 00:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-27.messagelabs.com!1339116251!8526399!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22638 invoked from network); 8 Jun 2012 00:44:12 -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;
	8 Jun 2012 00:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0004QT-0V
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0000Ba-Va
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Message-Id: <E1ScnJC-0000Ba-Va@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1339094423 -3600
# Node ID 15ed87e385a3828c65ca78f555d05dff3c0e44b8
# Parent  75a2bb5db2280163265c2c6b1d536869108aa9af
QEMU_TAG update
---


diff -r 75a2bb5db228 -r 15ed87e385a3 Config.mk
--- a/Config.mk	Thu Jun 07 18:51:42 2012 +0100
+++ b/Config.mk	Thu Jun 07 19:40:23 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 7bde54662d45b0bbc2ee78c7a8bf2c97c6655445
-# Mon May 14 17:05:48 2012 +0100
-# xenstore: Use <xenstore.h>
+QEMU_TAG ?= cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
+# Thu Jun 7 19:36:26 2012 +0100
+# qemu-xen-trad/block: get right partition size
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00: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 1ScnJF-0006vx-RX; Fri, 08 Jun 2012 00:44:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJE-0006vJ-Dq
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [85.158.139.83:6061] by server-4.bemta-5.messagelabs.com id
	25/EC-05858-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1339116249!31986062!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5273 invoked from network); 8 Jun 2012 00:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QJ-Iy
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0000Ar-DY
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Message-Id: <E1ScnJB-0000Ar-DY@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remove libxl__error_set
	prototype
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339090465 -3600
# Node ID 6e9552d15118f0d285585d44eab89585d0c35813
# Parent  0474a8b847622fadc20fead17c68cd3d95dc1a7f
libxl: remove libxl__error_set prototype

The implementation went away in 25181:26f72d923cb9 "libxl: Crash (more
sensibly) on malloc failure".

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


diff -r 0474a8b84762 -r 6e9552d15118 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Thu Jun 07 18:23:00 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Thu Jun 07 18:34:25 2012 +0100
@@ -1313,8 +1313,6 @@ struct libxl__xen_console_reader {
     unsigned int index;
 };
 
-_hidden int libxl__error_set(libxl__gc *gc, int code);
-
 /* parse the string @s as a sequence of 6 colon separated bytes in to @mac */
 _hidden int libxl__parse_mac(const char *s, libxl_mac mac);
 /* compare mac address @a and @b. 0 if the same, -ve if a<b and +ve if a>b */

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00: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 1ScnJF-0006vx-RX; Fri, 08 Jun 2012 00:44:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJE-0006vJ-Dq
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [85.158.139.83:6061] by server-4.bemta-5.messagelabs.com id
	25/EC-05858-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1339116249!31986062!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5273 invoked from network); 8 Jun 2012 00:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0004QJ-Iy
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0000Ar-DY
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Message-Id: <E1ScnJB-0000Ar-DY@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remove libxl__error_set
	prototype
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339090465 -3600
# Node ID 6e9552d15118f0d285585d44eab89585d0c35813
# Parent  0474a8b847622fadc20fead17c68cd3d95dc1a7f
libxl: remove libxl__error_set prototype

The implementation went away in 25181:26f72d923cb9 "libxl: Crash (more
sensibly) on malloc failure".

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


diff -r 0474a8b84762 -r 6e9552d15118 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Thu Jun 07 18:23:00 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Thu Jun 07 18:34:25 2012 +0100
@@ -1313,8 +1313,6 @@ struct libxl__xen_console_reader {
     unsigned int index;
 };
 
-_hidden int libxl__error_set(libxl__gc *gc, int code);
-
 /* parse the string @s as a sequence of 6 colon separated bytes in to @mac */
 _hidden int libxl__parse_mac(const char *s, libxl_mac mac);
 /* compare mac address @a and @b. 0 if the same, -ve if a<b and +ve if a>b */

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJJ-0006xA-BX; Fri, 08 Jun 2012 00:44:17 +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 1ScnJH-0006wG-7x
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:15 +0000
Received: from [85.158.138.51:56597] by server-1.bemta-3.messagelabs.com id
	67/8A-01327-EDA41DF4; Fri, 08 Jun 2012 00:44:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1339116252!28491672!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8788 invoked from network); 8 Jun 2012 00:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0004QW-Gm
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0000Bq-FV
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Message-Id: <E1ScnJD-0000Bq-FV@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: do not install qemu if just
	doing a build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1339094487 -3600
# Node ID 4195a034d81946e460182dec1f58abc4a3b7b3b9
# Parent  15ed87e385a3828c65ca78f555d05dff3c0e44b8
tools: do not install qemu if just doing a build

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 15ed87e385a3 -r 4195a034d819 tools/Makefile
--- a/tools/Makefile	Thu Jun 07 19:40:23 2012 +0100
+++ b/tools/Makefile	Thu Jun 07 19:41:27 2012 +0100
@@ -118,7 +118,14 @@ qemu-xen-traditional-dir-force-update:
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi
 
-subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
+subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
+	set -e; \
+		$(buildmakevars2shellvars); \
+		cd qemu-xen-traditional-dir; \
+		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \
+		$(MAKE) all
+
+subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
 	set -e; \
 		$(buildmakevars2shellvars); \
 		cd qemu-xen-traditional-dir; \
@@ -141,7 +148,7 @@ qemu-xen-dir-force-update:
 		$(GIT) reset --hard $(QEMU_UPSTREAM_REVISION); \
 	fi
 
-subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find
+subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	if test -d $(QEMU_UPSTREAM_URL) ; then \
 		source=$(QEMU_UPSTREAM_URL); \
 	else \
@@ -162,6 +169,10 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--disable-kvm \
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \
+	$(MAKE) all
+
+subdir-install-qemu-xen-dir: subdir-all-qemu-xen-dir
+	cd qemu-xen-dir; \
 	$(MAKE) install
 
 subdir-clean-qemu-xen-dir:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJJ-0006xA-BX; Fri, 08 Jun 2012 00:44:17 +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 1ScnJH-0006wG-7x
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:15 +0000
Received: from [85.158.138.51:56597] by server-1.bemta-3.messagelabs.com id
	67/8A-01327-EDA41DF4; Fri, 08 Jun 2012 00:44:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1339116252!28491672!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8788 invoked from network); 8 Jun 2012 00:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0004QW-Gm
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0000Bq-FV
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:11 +0000
Message-Id: <E1ScnJD-0000Bq-FV@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: do not install qemu if just
	doing a build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1339094487 -3600
# Node ID 4195a034d81946e460182dec1f58abc4a3b7b3b9
# Parent  15ed87e385a3828c65ca78f555d05dff3c0e44b8
tools: do not install qemu if just doing a build

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 15ed87e385a3 -r 4195a034d819 tools/Makefile
--- a/tools/Makefile	Thu Jun 07 19:40:23 2012 +0100
+++ b/tools/Makefile	Thu Jun 07 19:41:27 2012 +0100
@@ -118,7 +118,14 @@ qemu-xen-traditional-dir-force-update:
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi
 
-subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
+subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
+	set -e; \
+		$(buildmakevars2shellvars); \
+		cd qemu-xen-traditional-dir; \
+		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \
+		$(MAKE) all
+
+subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
 	set -e; \
 		$(buildmakevars2shellvars); \
 		cd qemu-xen-traditional-dir; \
@@ -141,7 +148,7 @@ qemu-xen-dir-force-update:
 		$(GIT) reset --hard $(QEMU_UPSTREAM_REVISION); \
 	fi
 
-subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find
+subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	if test -d $(QEMU_UPSTREAM_URL) ; then \
 		source=$(QEMU_UPSTREAM_URL); \
 	else \
@@ -162,6 +169,10 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--disable-kvm \
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \
+	$(MAKE) all
+
+subdir-install-qemu-xen-dir: subdir-all-qemu-xen-dir
+	cd qemu-xen-dir; \
 	$(MAKE) install
 
 subdir-clean-qemu-xen-dir:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJF-0006w6-VH; Fri, 08 Jun 2012 00:44:13 +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 1ScnJE-0006vL-G5
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [193.109.254.147:36712] by server-4.bemta-14.messagelabs.com id
	16/19-27598-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1339116250!8701341!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3908 invoked from network); 8 Jun 2012 00:44:11 -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 Jun 2012 00:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0004QN-6a
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0000B6-Uf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Message-Id: <E1ScnJB-0000B6-Uf@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xend: do not run a hotplug script
	from qemu on Linux
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339091122 -3600
# Node ID e41a97112e0cf37ec382fdc02761d0c45984010c
# Parent  6e9552d15118f0d285585d44eab89585d0c35813
xend: do not run a hotplug script from qemu on Linux

The current vif-hotplug-common.sh for renaming the tap device is failing
because it is racing with this script and therefore the device is unexpectedly
up when we come to rename it.

Fix this in the same way as libxl does, by disabling the script (only on
Linux).

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


diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/image.py	Thu Jun 07 18:45:22 2012 +0100
@@ -919,8 +919,13 @@ class HVMImageHandler(ImageHandler):
                        (nics, mac, model))
             vifname = "vif%d.%d-emu" % (self.vm.getDomid(), nics-1)
             ret.append("-net")
-            ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
-                       (nics, vifname, bridge))
+            if osdep.tapif_script is not None:
+                script=",script=%s,downscript=%s" % \
+                        (osdep.tapif_script, osdep.tapif_script)
+            else:
+                script=""
+            ret.append("tap,vlan=%d,ifname=%s,bridge=%s%s" %
+                       (nics, vifname, bridge, script))
 
         if nics == 0:
             ret.append("-net")
diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py	Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/osdep.py	Thu Jun 07 18:45:22 2012 +0100
@@ -30,6 +30,10 @@ _vif_script = {
     "SunOS": "vif-vnic"
 }
 
+_tapif_script = {
+    "Linux": "no",
+}
+
 PROC_XEN_BALLOON = '/proc/xen/balloon'
 SYSFS_XEN_MEMORY = '/sys/devices/system/xen_memory/xen_memory0'
 
@@ -257,6 +261,7 @@ def _get(var, default=None):
 
 xend_autorestart = _get(_xend_autorestart)
 vif_script = _get(_vif_script, "vif-bridge")
+tapif_script = _get(_tapif_script)
 lookup_balloon_stat = _get(_balloon_stat, _linux_balloon_stat)
 get_cpuinfo = _get(_get_cpuinfo, _linux_get_cpuinfo)
 prefork = _get(_get_prefork, _default_prefork)

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJF-0006w6-VH; Fri, 08 Jun 2012 00:44:13 +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 1ScnJE-0006vL-G5
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from [193.109.254.147:36712] by server-4.bemta-14.messagelabs.com id
	16/19-27598-BDA41DF4; Fri, 08 Jun 2012 00:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1339116250!8701341!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3908 invoked from network); 8 Jun 2012 00:44:11 -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 Jun 2012 00:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0004QN-6a
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJB-0000B6-Uf
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:09 +0000
Message-Id: <E1ScnJB-0000B6-Uf@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xend: do not run a hotplug script
	from qemu on Linux
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339091122 -3600
# Node ID e41a97112e0cf37ec382fdc02761d0c45984010c
# Parent  6e9552d15118f0d285585d44eab89585d0c35813
xend: do not run a hotplug script from qemu on Linux

The current vif-hotplug-common.sh for renaming the tap device is failing
because it is racing with this script and therefore the device is unexpectedly
up when we come to rename it.

Fix this in the same way as libxl does, by disabling the script (only on
Linux).

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


diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/image.py	Thu Jun 07 18:45:22 2012 +0100
@@ -919,8 +919,13 @@ class HVMImageHandler(ImageHandler):
                        (nics, mac, model))
             vifname = "vif%d.%d-emu" % (self.vm.getDomid(), nics-1)
             ret.append("-net")
-            ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
-                       (nics, vifname, bridge))
+            if osdep.tapif_script is not None:
+                script=",script=%s,downscript=%s" % \
+                        (osdep.tapif_script, osdep.tapif_script)
+            else:
+                script=""
+            ret.append("tap,vlan=%d,ifname=%s,bridge=%s%s" %
+                       (nics, vifname, bridge, script))
 
         if nics == 0:
             ret.append("-net")
diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py	Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/osdep.py	Thu Jun 07 18:45:22 2012 +0100
@@ -30,6 +30,10 @@ _vif_script = {
     "SunOS": "vif-vnic"
 }
 
+_tapif_script = {
+    "Linux": "no",
+}
+
 PROC_XEN_BALLOON = '/proc/xen/balloon'
 SYSFS_XEN_MEMORY = '/sys/devices/system/xen_memory/xen_memory0'
 
@@ -257,6 +261,7 @@ def _get(var, default=None):
 
 xend_autorestart = _get(_xend_autorestart)
 vif_script = _get(_vif_script, "vif-bridge")
+tapif_script = _get(_tapif_script)
 lookup_balloon_stat = _get(_balloon_stat, _linux_balloon_stat)
 get_cpuinfo = _get(_get_cpuinfo, _linux_get_cpuinfo)
 prefork = _get(_get_prefork, _default_prefork)

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJI-0006wl-8I; Fri, 08 Jun 2012 00:44:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJG-0006wD-Th
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:15 +0000
Received: from [85.158.138.51:56555] by server-3.bemta-3.messagelabs.com id
	20/C9-25608-DDA41DF4; Fri, 08 Jun 2012 00:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1339116252!23263277!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21395 invoked from network); 8 Jun 2012 00:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJE-0004QZ-1F
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0000C7-W9
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Message-Id: <E1ScnJD-0000C7-W9@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1339094817 -3600
# Node ID 32034d1914a607d7b6f1f060352b4cac973600f8
# Parent  4195a034d81946e460182dec1f58abc4a3b7b3b9
QEMU_TAG update
---


diff -r 4195a034d819 -r 32034d1914a6 Config.mk
--- a/Config.mk	Thu Jun 07 19:41:27 2012 +0100
+++ b/Config.mk	Thu Jun 07 19:46:57 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
-# Thu Jun 7 19:36:26 2012 +0100
-# qemu-xen-trad/block: get right partition size
+QEMU_TAG ?= 50c553be472c9f4b05a0526c0aae98709ca9ffff
+# Thu Jun 7 19:44:01 2012 +0100
+# qemu-xen-trad: fix sys-queue.h usage on BSD systems
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJI-0006wl-8I; Fri, 08 Jun 2012 00:44:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJG-0006wD-Th
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:15 +0000
Received: from [85.158.138.51:56555] by server-3.bemta-3.messagelabs.com id
	20/C9-25608-DDA41DF4; Fri, 08 Jun 2012 00:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1339116252!23263277!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21395 invoked from network); 8 Jun 2012 00:44:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJE-0004QZ-1F
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJD-0000C7-W9
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:12 +0000
Message-Id: <E1ScnJD-0000C7-W9@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1339094817 -3600
# Node ID 32034d1914a607d7b6f1f060352b4cac973600f8
# Parent  4195a034d81946e460182dec1f58abc4a3b7b3b9
QEMU_TAG update
---


diff -r 4195a034d819 -r 32034d1914a6 Config.mk
--- a/Config.mk	Thu Jun 07 19:41:27 2012 +0100
+++ b/Config.mk	Thu Jun 07 19:46:57 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= cbf0f291d4f1d40c59f56b8bd73292b8ad4f84b5
-# Thu Jun 7 19:36:26 2012 +0100
-# qemu-xen-trad/block: get right partition size
+QEMU_TAG ?= 50c553be472c9f4b05a0526c0aae98709ca9ffff
+# Thu Jun 7 19:44:01 2012 +0100
+# qemu-xen-trad: fix sys-queue.h usage on BSD systems
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJH-0006wI-1s; Fri, 08 Jun 2012 00:44:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJF-0006vj-IV
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:13 +0000
Received: from [85.158.138.51:35556] by server-12.bemta-3.messagelabs.com id
	F0/59-24185-CDA41DF4; Fri, 08 Jun 2012 00:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-174.messagelabs.com!1339116250!22462232!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26234 invoked from network); 8 Jun 2012 00:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0004QQ-Nx
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0000BL-FA
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Message-Id: <E1ScnJC-0000BL-FA@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: pass EXTRA_CFLAGS via
	environment
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1339091502 -3600
# Node ID 75a2bb5db2280163265c2c6b1d536869108aa9af
# Parent  e41a97112e0cf37ec382fdc02761d0c45984010c
tools: pass EXTRA_CFLAGS via environment

Currently qemu-xen will be compiled with CFLAGS only if CFLAGS was
already in the environment during make invocation. If CFLAGS is in
environment then make will append all of the various flags specified in
xen Makefiles to this environment variable, which is then used in qemu
configure. Since qemu-xen is not ready for compiler flags like
"-std=gnu99" compilation will fail. If CFLAGS is not in environment,
then configure will use just its own "-O2 -g" because make does not
export its own CFLAGS variable.

>From a distro perspective, it is required to build libraries and
binaries with certain global cflags (arbitrary gcc options). Up to the
point when qemu-xen was imported it worked as expected by exporting
CFLAGS before 'make tools'.  Now qemu-upstream reuses these CFLAGS, but
it cant deal with the result.

This patch extends the tools Makefiles so that three new environment
variables are recognized:
  EXTRA_CFLAGS_XEN_TOOLS= specifies CFLAGS for the tools build.
  EXTRA_CFLAGS_QEMU_TRADITIONAL= specifies CFLAGS for old qemu.
  EXTRA_CFLAGS_QEMU_XEN= specifies CFLAGS for new qemu.

Special care needs to be taken in tools/firmware because the resulting
binaries are not linked with the hosts runtime libraries. These binaries
run in guest context. To avoid build errors from gcc options like
-fstack-protector, reuse existing practice to unset the new
EXTRA_CFLAGS_XEN_TOOLS for the firmware dirs.

The new feature can be used like this in a rpm xen.spec file:

   export EXTRA_CFLAGS_XEN_TOOLS="${RPM_OPT_FLAGS}"
   export EXTRA_CFLAGS_QEMU_TRADITIONAL="${RPM_OPT_FLAGS}"
   export EXTRA_CFLAGS_QEMU_XEN="${RPM_OPT_FLAGS}"
   ./configure \
   	--libdir=%{_libdir} \
   	--prefix=/usr
   make

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


diff -r e41a97112e0c -r 75a2bb5db228 tools/Makefile
--- a/tools/Makefile	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/Makefile	Thu Jun 07 18:51:42 2012 +0100
@@ -122,7 +122,9 @@ subdir-all-qemu-xen-traditional-dir subd
 	set -e; \
 		$(buildmakevars2shellvars); \
 		cd qemu-xen-traditional-dir; \
-		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \
+		$(QEMU_ROOT)/xen-setup \
+		--extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \
+		$(IOEMU_CONFIGURE_CROSS); \
 		$(MAKE) install
 
 subdir-clean-qemu-xen-traditional-dir:
@@ -151,7 +153,8 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \
 		-I$(XEN_ROOT)/tools/libxc \
 		-I$(XEN_ROOT)/tools/xenstore \
-		-I$(XEN_ROOT)/tools/xenstore/compat" \
+		-I$(XEN_ROOT)/tools/xenstore/compat \
+		$(EXTRA_CFLAGS_QEMU_XEN)" \
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
diff -r e41a97112e0c -r 75a2bb5db228 tools/Rules.mk
--- a/tools/Rules.mk	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/Rules.mk	Thu Jun 07 18:51:42 2012 +0100
@@ -76,6 +76,8 @@ endif
 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
 CFLAGS += $(CFLAGS-y)
 
+CFLAGS += $(EXTRA_CFLAGS_XEN_TOOLS)
+
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
                         "Xen requires at least gcc-3.4")
diff -r e41a97112e0c -r 75a2bb5db228 tools/firmware/Rules.mk
--- a/tools/firmware/Rules.mk	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/firmware/Rules.mk	Thu Jun 07 18:51:42 2012 +0100
@@ -3,6 +3,7 @@ override XEN_TARGET_ARCH = x86_32
 
 # User-supplied CFLAGS are not useful here.
 CFLAGS =
+EXTRA_CFLAGS_XEN_TOOLS =
 
 include $(XEN_ROOT)/tools/Rules.mk
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 08 00:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1ScnJH-0006wI-1s; Fri, 08 Jun 2012 00:44:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJF-0006vj-IV
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:13 +0000
Received: from [85.158.138.51:35556] by server-12.bemta-3.messagelabs.com id
	F0/59-24185-CDA41DF4; Fri, 08 Jun 2012 00:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-174.messagelabs.com!1339116250!22462232!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26234 invoked from network); 8 Jun 2012 00:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Jun 2012 00:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0004QQ-Nx
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1ScnJC-0000BL-FA
	for xen-changelog@lists.xensource.com; Fri, 08 Jun 2012 00:44:10 +0000
Message-Id: <E1ScnJC-0000BL-FA@xenbits.xen.org>
Date: Fri, 08 Jun 2012 00:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: pass EXTRA_CFLAGS via
	environment
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1339091502 -3600
# Node ID 75a2bb5db2280163265c2c6b1d536869108aa9af
# Parent  e41a97112e0cf37ec382fdc02761d0c45984010c
tools: pass EXTRA_CFLAGS via environment

Currently qemu-xen will be compiled with CFLAGS only if CFLAGS was
already in the environment during make invocation. If CFLAGS is in
environment then make will append all of the various flags specified in
xen Makefiles to this environment variable, which is then used in qemu
configure. Since qemu-xen is not ready for compiler flags like
"-std=gnu99" compilation will fail. If CFLAGS is not in environment,
then configure will use just its own "-O2 -g" because make does not
export its own CFLAGS variable.

>From a distro perspective, it is required to build libraries and
binaries with certain global cflags (arbitrary gcc options). Up to the
point when qemu-xen was imported it worked as expected by exporting
CFLAGS before 'make tools'.  Now qemu-upstream reuses these CFLAGS, but
it cant deal with the result.

This patch extends the tools Makefiles so that three new environment
variables are recognized:
  EXTRA_CFLAGS_XEN_TOOLS= specifies CFLAGS for the tools build.
  EXTRA_CFLAGS_QEMU_TRADITIONAL= specifies CFLAGS for old qemu.
  EXTRA_CFLAGS_QEMU_XEN= specifies CFLAGS for new qemu.

Special care needs to be taken in tools/firmware because the resulting
binaries are not linked with the hosts runtime libraries. These binaries
run in guest context. To avoid build errors from gcc options like
-fstack-protector, reuse existing practice to unset the new
EXTRA_CFLAGS_XEN_TOOLS for the firmware dirs.

The new feature can be used like this in a rpm xen.spec file:

   export EXTRA_CFLAGS_XEN_TOOLS="${RPM_OPT_FLAGS}"
   export EXTRA_CFLAGS_QEMU_TRADITIONAL="${RPM_OPT_FLAGS}"
   export EXTRA_CFLAGS_QEMU_XEN="${RPM_OPT_FLAGS}"
   ./configure \
   	--libdir=%{_libdir} \
   	--prefix=/usr
   make

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


diff -r e41a97112e0c -r 75a2bb5db228 tools/Makefile
--- a/tools/Makefile	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/Makefile	Thu Jun 07 18:51:42 2012 +0100
@@ -122,7 +122,9 @@ subdir-all-qemu-xen-traditional-dir subd
 	set -e; \
 		$(buildmakevars2shellvars); \
 		cd qemu-xen-traditional-dir; \
-		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \
+		$(QEMU_ROOT)/xen-setup \
+		--extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \
+		$(IOEMU_CONFIGURE_CROSS); \
 		$(MAKE) install
 
 subdir-clean-qemu-xen-traditional-dir:
@@ -151,7 +153,8 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \
 		-I$(XEN_ROOT)/tools/libxc \
 		-I$(XEN_ROOT)/tools/xenstore \
-		-I$(XEN_ROOT)/tools/xenstore/compat" \
+		-I$(XEN_ROOT)/tools/xenstore/compat \
+		$(EXTRA_CFLAGS_QEMU_XEN)" \
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
diff -r e41a97112e0c -r 75a2bb5db228 tools/Rules.mk
--- a/tools/Rules.mk	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/Rules.mk	Thu Jun 07 18:51:42 2012 +0100
@@ -76,6 +76,8 @@ endif
 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
 CFLAGS += $(CFLAGS-y)
 
+CFLAGS += $(EXTRA_CFLAGS_XEN_TOOLS)
+
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
                         "Xen requires at least gcc-3.4")
diff -r e41a97112e0c -r 75a2bb5db228 tools/firmware/Rules.mk
--- a/tools/firmware/Rules.mk	Thu Jun 07 18:45:22 2012 +0100
+++ b/tools/firmware/Rules.mk	Thu Jun 07 18:51:42 2012 +0100
@@ -3,6 +3,7 @@ override XEN_TARGET_ARCH = x86_32
 
 # User-supplied CFLAGS are not useful here.
 CFLAGS =
+EXTRA_CFLAGS_XEN_TOOLS =
 
 include $(XEN_ROOT)/tools/Rules.mk
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 13:11:15 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 13: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 1SeQsG-0007vb-8G; Tue, 12 Jun 2012 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 1SeQsF-0007vW-JQ
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:07 +0000
Received: from [85.158.143.35:2936] by server-3.bemta-4.messagelabs.com id
	AD/F0-05808-AEF37DF4; Tue, 12 Jun 2012 13:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1339506664!14664222!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25235 invoked from network); 12 Jun 2012 13:11: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;
	12 Jun 2012 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 1SeQsC-0000Rb-Ft
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeQsC-00041H-EQ
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Message-Id: <E1SeQsC-00041H-EQ@xenbits.xen.org>
Date: Tue, 12 Jun 2012 13:11:04 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] drivers/xen/core/firmware.c
	should include xen/firmware.h
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1339505853 -7200
# Node ID 31e001f38b57f01265a15aa555355075a943897e
# Parent  607eb9bebe75b171c790eb104fbcc33a47d7aa35
drivers/xen/core/firmware.c should include xen/firmware.h

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


diff -r 607eb9bebe75 -r 31e001f38b57 drivers/xen/core/firmware.c
--- a/drivers/xen/core/firmware.c	Tue Jun 12 14:56:53 2012 +0200
+++ b/drivers/xen/core/firmware.c	Tue Jun 12 14:57:33 2012 +0200
@@ -4,6 +4,7 @@
 #include <linux/edd.h>
 #include <video/edid.h>
 #include <xen/interface/platform.h>
+#include <xen/firmware.h>
 #include <asm/hypervisor.h>
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 13:11:15 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 13: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 1SeQsG-0007vb-8G; Tue, 12 Jun 2012 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 1SeQsF-0007vW-JQ
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:07 +0000
Received: from [85.158.143.35:2936] by server-3.bemta-4.messagelabs.com id
	AD/F0-05808-AEF37DF4; Tue, 12 Jun 2012 13:11:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1339506664!14664222!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25235 invoked from network); 12 Jun 2012 13:11: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;
	12 Jun 2012 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 1SeQsC-0000Rb-Ft
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeQsC-00041H-EQ
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Message-Id: <E1SeQsC-00041H-EQ@xenbits.xen.org>
Date: Tue, 12 Jun 2012 13:11:04 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] drivers/xen/core/firmware.c
	should include xen/firmware.h
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1339505853 -7200
# Node ID 31e001f38b57f01265a15aa555355075a943897e
# Parent  607eb9bebe75b171c790eb104fbcc33a47d7aa35
drivers/xen/core/firmware.c should include xen/firmware.h

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


diff -r 607eb9bebe75 -r 31e001f38b57 drivers/xen/core/firmware.c
--- a/drivers/xen/core/firmware.c	Tue Jun 12 14:56:53 2012 +0200
+++ b/drivers/xen/core/firmware.c	Tue Jun 12 14:57:33 2012 +0200
@@ -4,6 +4,7 @@
 #include <linux/edd.h>
 #include <video/edid.h>
 #include <xen/interface/platform.h>
+#include <xen/firmware.h>
 #include <asm/hypervisor.h>
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 13:12:11 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 13:12: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 1SeQtA-0007xE-Co; Tue, 12 Jun 2012 13:12:04 +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 1SeQt8-0007x8-NT
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:12:02 +0000
Received: from [193.109.254.147:25626] by server-2.bemta-14.messagelabs.com id
	80/38-27740-12047DF4; Tue, 12 Jun 2012 13:12:01 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1339506664!2478531!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26761 invoked from network); 12 Jun 2012 13: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;
	12 Jun 2012 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 1SeQsC-0000RY-7s
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeQsC-000412-1y
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Message-Id: <E1SeQsC-000412-1y@xenbits.xen.org>
Date: Tue, 12 Jun 2012 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] blkfront: add logic to deal with
	misbehaving backends
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
# Date 1339505813 -7200
# Node ID 607eb9bebe75b171c790eb104fbcc33a47d7aa35
# Parent  b72a53f5d7563ac9b1d8e13723c5a5bc9b08e19d
blkfront: add logic to deal with misbehaving backends

Part of the ring structure is the 'id' field which is under control of
the frontend. The frontend stamps it with "some" value (this "some" in
this implementation being a value less than BLK_RING_SIZE), and when it
gets a response it expects said value to be in the response structure.
We have a check for the id field when spolling new requests but not
when de-spolling responses.

We also add an extra check in add_id_to_freelist to make sure that the
'struct request' was not NULL - as we cannot pass a NULL to
end_that_request_{first,last}(), otherwise they crash (and all the
operations that the response is dealing with end up calling these
functions).

Lastly we also print the name of the operation that failed.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r b72a53f5d756 -r 607eb9bebe75 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Mon Jun 04 10:55:00 2012 +0200
+++ b/drivers/xen/blkfront/blkfront.c	Tue Jun 12 14:56:53 2012 +0200
@@ -453,12 +453,33 @@ static inline int GET_ID_FROM_FREELIST(
 	return free;
 }
 
-static inline void ADD_ID_TO_FREELIST(
+static inline int ADD_ID_TO_FREELIST(
 	struct blkfront_info *info, unsigned long id)
 {
+	if (info->shadow[id].req.id != id)
+		return -EINVAL;
+	if (!info->shadow[id].request)
+		return -ENXIO;
 	info->shadow[id].req.id  = info->shadow_free;
 	info->shadow[id].request = 0;
 	info->shadow_free = id;
+	return 0;
+}
+
+static const char *op_name(unsigned int op)
+{
+	static const char *const names[] = {
+		[BLKIF_OP_READ] = "read",
+		[BLKIF_OP_WRITE] = "write",
+		[BLKIF_OP_WRITE_BARRIER] = "barrier",
+		[BLKIF_OP_FLUSH_DISKCACHE] = "flush",
+		[BLKIF_OP_DISCARD] = "discard",
+	};
+
+	if (op >= ARRAY_SIZE(names))
+		return "unknown";
+
+	return names[op] ?: "reserved";
 }
 
 static inline void flush_requests(struct blkfront_info *info)
@@ -772,19 +793,40 @@ static irqreturn_t blkif_int(int irq, vo
 		int ret;
 
 		bret = RING_GET_RESPONSE(&info->ring, i);
+		if (unlikely(bret->id >= BLK_RING_SIZE)) {
+			/*
+			 * The backend has messed up and given us an id that
+			 * we would never have given to it (we stamp it up to
+			 * BLK_RING_SIZE - see GET_ID_FROM_FREELIST()).
+			 */
+			printk(KERN_WARNING
+			       "%s: response to %s has incorrect id (%#Lx)\n",
+			       info->gd->disk_name, op_name(bret->operation),
+			       (unsigned long long)bret->id);
+			continue;
+		}
 		id   = bret->id;
 		req  = (struct request *)info->shadow[id].request;
 
 		blkif_completion(&info->shadow[id]);
 
-		ADD_ID_TO_FREELIST(info, id);
+		ret = ADD_ID_TO_FREELIST(info, id);
+		if (unlikely(ret)) {
+			printk(KERN_WARNING
+			       "%s: id %#lx (response to %s) couldn't be recycled (%d)!\n",
+			       info->gd->disk_name, id,
+			       op_name(bret->operation), ret);
+			continue;
+		}
 
 		uptodate = (bret->status == BLKIF_RSP_OKAY);
 		switch (bret->operation) {
 		case BLKIF_OP_WRITE_BARRIER:
 			if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
-				printk("blkfront: %s: write barrier op failed\n",
-				       info->gd->disk_name);
+				printk(KERN_WARNING
+				       "blkfront: %s: %s op failed\n",
+				       info->gd->disk_name,
+				       op_name(bret->operation));
 				uptodate = -EOPNOTSUPP;
 				info->feature_barrier = 0;
 			        xlvbd_barrier(info);
@@ -793,8 +835,9 @@ static irqreturn_t blkif_int(int irq, vo
 		case BLKIF_OP_READ:
 		case BLKIF_OP_WRITE:
 			if (unlikely(bret->status != BLKIF_RSP_OKAY))
-				DPRINTK("Bad return from blkdev data "
-					"request: %x\n", bret->status);
+				DPRINTK("Bad return from blkdev %s "
+					"request: %x\n", bret->status,
+					op_name(bret->operation));
 
 			ret = end_that_request_first(req, uptodate,
 				req->hard_nr_sectors);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 13:12:11 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 13:12: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 1SeQtA-0007xE-Co; Tue, 12 Jun 2012 13:12:04 +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 1SeQt8-0007x8-NT
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:12:02 +0000
Received: from [193.109.254.147:25626] by server-2.bemta-14.messagelabs.com id
	80/38-27740-12047DF4; Tue, 12 Jun 2012 13:12:01 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1339506664!2478531!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26761 invoked from network); 12 Jun 2012 13: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;
	12 Jun 2012 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 1SeQsC-0000RY-7s
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeQsC-000412-1y
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 13:11:04 +0000
Message-Id: <E1SeQsC-000412-1y@xenbits.xen.org>
Date: Tue, 12 Jun 2012 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] blkfront: add logic to deal with
	misbehaving backends
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
# Date 1339505813 -7200
# Node ID 607eb9bebe75b171c790eb104fbcc33a47d7aa35
# Parent  b72a53f5d7563ac9b1d8e13723c5a5bc9b08e19d
blkfront: add logic to deal with misbehaving backends

Part of the ring structure is the 'id' field which is under control of
the frontend. The frontend stamps it with "some" value (this "some" in
this implementation being a value less than BLK_RING_SIZE), and when it
gets a response it expects said value to be in the response structure.
We have a check for the id field when spolling new requests but not
when de-spolling responses.

We also add an extra check in add_id_to_freelist to make sure that the
'struct request' was not NULL - as we cannot pass a NULL to
end_that_request_{first,last}(), otherwise they crash (and all the
operations that the response is dealing with end up calling these
functions).

Lastly we also print the name of the operation that failed.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r b72a53f5d756 -r 607eb9bebe75 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Mon Jun 04 10:55:00 2012 +0200
+++ b/drivers/xen/blkfront/blkfront.c	Tue Jun 12 14:56:53 2012 +0200
@@ -453,12 +453,33 @@ static inline int GET_ID_FROM_FREELIST(
 	return free;
 }
 
-static inline void ADD_ID_TO_FREELIST(
+static inline int ADD_ID_TO_FREELIST(
 	struct blkfront_info *info, unsigned long id)
 {
+	if (info->shadow[id].req.id != id)
+		return -EINVAL;
+	if (!info->shadow[id].request)
+		return -ENXIO;
 	info->shadow[id].req.id  = info->shadow_free;
 	info->shadow[id].request = 0;
 	info->shadow_free = id;
+	return 0;
+}
+
+static const char *op_name(unsigned int op)
+{
+	static const char *const names[] = {
+		[BLKIF_OP_READ] = "read",
+		[BLKIF_OP_WRITE] = "write",
+		[BLKIF_OP_WRITE_BARRIER] = "barrier",
+		[BLKIF_OP_FLUSH_DISKCACHE] = "flush",
+		[BLKIF_OP_DISCARD] = "discard",
+	};
+
+	if (op >= ARRAY_SIZE(names))
+		return "unknown";
+
+	return names[op] ?: "reserved";
 }
 
 static inline void flush_requests(struct blkfront_info *info)
@@ -772,19 +793,40 @@ static irqreturn_t blkif_int(int irq, vo
 		int ret;
 
 		bret = RING_GET_RESPONSE(&info->ring, i);
+		if (unlikely(bret->id >= BLK_RING_SIZE)) {
+			/*
+			 * The backend has messed up and given us an id that
+			 * we would never have given to it (we stamp it up to
+			 * BLK_RING_SIZE - see GET_ID_FROM_FREELIST()).
+			 */
+			printk(KERN_WARNING
+			       "%s: response to %s has incorrect id (%#Lx)\n",
+			       info->gd->disk_name, op_name(bret->operation),
+			       (unsigned long long)bret->id);
+			continue;
+		}
 		id   = bret->id;
 		req  = (struct request *)info->shadow[id].request;
 
 		blkif_completion(&info->shadow[id]);
 
-		ADD_ID_TO_FREELIST(info, id);
+		ret = ADD_ID_TO_FREELIST(info, id);
+		if (unlikely(ret)) {
+			printk(KERN_WARNING
+			       "%s: id %#lx (response to %s) couldn't be recycled (%d)!\n",
+			       info->gd->disk_name, id,
+			       op_name(bret->operation), ret);
+			continue;
+		}
 
 		uptodate = (bret->status == BLKIF_RSP_OKAY);
 		switch (bret->operation) {
 		case BLKIF_OP_WRITE_BARRIER:
 			if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
-				printk("blkfront: %s: write barrier op failed\n",
-				       info->gd->disk_name);
+				printk(KERN_WARNING
+				       "blkfront: %s: %s op failed\n",
+				       info->gd->disk_name,
+				       op_name(bret->operation));
 				uptodate = -EOPNOTSUPP;
 				info->feature_barrier = 0;
 			        xlvbd_barrier(info);
@@ -793,8 +835,9 @@ static irqreturn_t blkif_int(int irq, vo
 		case BLKIF_OP_READ:
 		case BLKIF_OP_WRITE:
 			if (unlikely(bret->status != BLKIF_RSP_OKAY))
-				DPRINTK("Bad return from blkdev data "
-					"request: %x\n", bret->status);
+				DPRINTK("Bad return from blkdev %s "
+					"request: %x\n", bret->status,
+					op_name(bret->operation));
 
 			ret = end_that_request_first(req, uptodate,
 				req->hard_nr_sectors);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 14:11:12 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 14: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 1SeRoK-0000TB-UR; Tue, 12 Jun 2012 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 1SeRoJ-0000T4-VY
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:08 +0000
Received: from [193.109.254.147:10621] by server-8.bemta-14.messagelabs.com id
	42/B2-27132-BFD47DF4; Tue, 12 Jun 2012 14:11:07 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1339510263!2177294!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22223 invoked from network); 12 Jun 2012 14: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;
	12 Jun 2012 14: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 1SeRoF-0001Ac-JE
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeRoF-0005QM-Ab
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:03 +0000
Message-Id: <E1SeRoF-0005QM-Ab@xenbits.xen.org>
Date: Tue, 12 Jun 2012 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] build (with DEBUG set) fix for
	1180:607eb9bebe75
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1339509988 -7200
# Node ID 7b36058ce050a6f55f33849f0528410288e72b59
# Parent  31e001f38b57f01265a15aa555355075a943897e
build (with DEBUG set) fix for 1180:607eb9bebe75

The operands of a DPRINTK() were swapped. Also put the whole message on
a single line and adjust the status code format specifier.

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


diff -r 31e001f38b57 -r 7b36058ce050 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Tue Jun 12 14:57:33 2012 +0200
+++ b/drivers/xen/blkfront/blkfront.c	Tue Jun 12 16:06:28 2012 +0200
@@ -835,9 +835,9 @@ static irqreturn_t blkif_int(int irq, vo
 		case BLKIF_OP_READ:
 		case BLKIF_OP_WRITE:
 			if (unlikely(bret->status != BLKIF_RSP_OKAY))
-				DPRINTK("Bad return from blkdev %s "
-					"request: %x\n", bret->status,
-					op_name(bret->operation));
+				DPRINTK("Bad return from blkdev %s request: %d\n",
+					op_name(bret->operation),
+					bret->status);
 
 			ret = end_that_request_first(req, uptodate,
 				req->hard_nr_sectors);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 12 14:11:12 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 12 Jun 2012 14: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 1SeRoK-0000TB-UR; Tue, 12 Jun 2012 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 1SeRoJ-0000T4-VY
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:08 +0000
Received: from [193.109.254.147:10621] by server-8.bemta-14.messagelabs.com id
	42/B2-27132-BFD47DF4; Tue, 12 Jun 2012 14:11:07 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1339510263!2177294!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22223 invoked from network); 12 Jun 2012 14: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;
	12 Jun 2012 14: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 1SeRoF-0001Ac-JE
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SeRoF-0005QM-Ab
	for xen-changelog@lists.xensource.com; Tue, 12 Jun 2012 14:11:03 +0000
Message-Id: <E1SeRoF-0005QM-Ab@xenbits.xen.org>
Date: Tue, 12 Jun 2012 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] build (with DEBUG set) fix for
	1180:607eb9bebe75
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1339509988 -7200
# Node ID 7b36058ce050a6f55f33849f0528410288e72b59
# Parent  31e001f38b57f01265a15aa555355075a943897e
build (with DEBUG set) fix for 1180:607eb9bebe75

The operands of a DPRINTK() were swapped. Also put the whole message on
a single line and adjust the status code format specifier.

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


diff -r 31e001f38b57 -r 7b36058ce050 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c	Tue Jun 12 14:57:33 2012 +0200
+++ b/drivers/xen/blkfront/blkfront.c	Tue Jun 12 16:06:28 2012 +0200
@@ -835,9 +835,9 @@ static irqreturn_t blkif_int(int irq, vo
 		case BLKIF_OP_READ:
 		case BLKIF_OP_WRITE:
 			if (unlikely(bret->status != BLKIF_RSP_OKAY))
-				DPRINTK("Bad return from blkdev %s "
-					"request: %x\n", bret->status,
-					op_name(bret->operation));
+				DPRINTK("Bad return from blkdev %s request: %d\n",
+					op_name(bret->operation),
+					bret->status);
 
 			ret = end_that_request_first(req, uptodate,
 				req->hard_nr_sectors);

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sf944-00058j-7e; Thu, 14 Jun 2012 12:22:16 +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 1Sf942-00057b-Pc
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:14 +0000
Received: from [193.109.254.147:18765] by server-2.bemta-14.messagelabs.com id
	ED/D4-27740-677D9DF4; Thu, 14 Jun 2012 12:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1339676530!2894255!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6253 invoked from network); 14 Jun 2012 12:22:11 -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;
	14 Jun 2012 12:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0001u6-Pa
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0008DK-Eh
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93x-0008DK-Eh@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:09 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339676041 14400
# Node ID 99eb99bf917904fd404443ace49fb421023d6e1e
# Parent  89c198373f68747329fdde2e15c9e8e438854469
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 89c198373f68 -r 99eb99bf9179 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:11:04 2012 -0400
+++ b/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:14:01 2012 -0400
@@ -51,6 +51,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -61,6 +68,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sf944-00058j-7e; Thu, 14 Jun 2012 12:22:16 +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 1Sf942-00057b-Pc
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:14 +0000
Received: from [193.109.254.147:18765] by server-2.bemta-14.messagelabs.com id
	ED/D4-27740-677D9DF4; Thu, 14 Jun 2012 12:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1339676530!2894255!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6253 invoked from network); 14 Jun 2012 12:22:11 -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;
	14 Jun 2012 12:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0001u6-Pa
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0008DK-Eh
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93x-0008DK-Eh@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:09 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339676041 14400
# Node ID 99eb99bf917904fd404443ace49fb421023d6e1e
# Parent  89c198373f68747329fdde2e15c9e8e438854469
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 89c198373f68 -r 99eb99bf9179 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:11:04 2012 -0400
+++ b/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:14:01 2012 -0400
@@ -51,6 +51,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -61,6 +68,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22: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 1Sf946-00059j-Av; Thu, 14 Jun 2012 12:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf944-00058m-PM
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:16 +0000
Received: from [85.158.143.35:40019] by server-3.bemta-4.messagelabs.com id
	89/EC-05808-777D9DF4; Thu, 14 Jun 2012 12:22:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1339676529!14499847!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13395 invoked from network); 14 Jun 2012 12:22:13 -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;
	14 Jun 2012 12:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0001u4-GE
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93w-0008D5-TF
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93w-0008D5-TF@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:08 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] Update Xen version to
	3.4.5-rc1-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339675864 14400
# Node ID 89c198373f68747329fdde2e15c9e8e438854469
# Parent  ac68ad6fe4b779ca0b894ca3845b66662dd2dd9c
Update Xen version to 3.4.5-rc1-pre
---


diff -r ac68ad6fe4b7 -r 89c198373f68 xen/Makefile
--- a/xen/Makefile	Wed Jan 25 15:49:35 2012 -0500
+++ b/xen/Makefile	Thu Jun 14 08:11:04 2012 -0400
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 3
 export XEN_SUBVERSION    = 4
-export XEN_EXTRAVERSION ?= .4$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .5-rc1-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22: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 1Sf946-00059j-Av; Thu, 14 Jun 2012 12:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf944-00058m-PM
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:16 +0000
Received: from [85.158.143.35:40019] by server-3.bemta-4.messagelabs.com id
	89/EC-05808-777D9DF4; Thu, 14 Jun 2012 12:22:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1339676529!14499847!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13395 invoked from network); 14 Jun 2012 12:22:13 -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;
	14 Jun 2012 12:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0001u4-GE
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93w-0008D5-TF
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93w-0008D5-TF@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:08 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] Update Xen version to
	3.4.5-rc1-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339675864 14400
# Node ID 89c198373f68747329fdde2e15c9e8e438854469
# Parent  ac68ad6fe4b779ca0b894ca3845b66662dd2dd9c
Update Xen version to 3.4.5-rc1-pre
---


diff -r ac68ad6fe4b7 -r 89c198373f68 xen/Makefile
--- a/xen/Makefile	Wed Jan 25 15:49:35 2012 -0500
+++ b/xen/Makefile	Thu Jun 14 08:11:04 2012 -0400
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 3
 export XEN_SUBVERSION    = 4
-export XEN_EXTRAVERSION ?= .4$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .5-rc1-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sf946-00059r-Do; Thu, 14 Jun 2012 12:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf945-00058m-65
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:17 +0000
Received: from [85.158.143.35:40027] by server-3.bemta-4.messagelabs.com id
	BA/EC-05808-877D9DF4; Thu, 14 Jun 2012 12:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1339676530!13113101!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 630 invoked from network); 14 Jun 2012 12:22:14 -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;
	14 Jun 2012 12:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93y-0001uA-4N
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0008DZ-SR
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93x-0008DZ-SR@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:09 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339676141 14400
# Node ID e3a406b7e7ab37f47423cf056cc59defcb3584d6
# Parent  99eb99bf917904fd404443ace49fb421023d6e1e
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Signed-off-by: Keith Coleman <keith.coleman@n2servers.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Thu Jun 14 08:15:41 2012 -0400
@@ -90,6 +90,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/compat/entry.S	Thu Jun 14 08:15:41 2012 -0400
@@ -215,6 +215,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -231,14 +232,15 @@ ENTRY(compat_syscall)
 1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
+        jmp   .Lcompat_bounce_exception
 2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
         subl  $2,UREGS_rip(%rsp)
         movq  VCPU_gp_fault_addr(%rbx),%rax
         movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $0,TRAPBOUNCE_error_code(%rdx)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(compat_sysenter)
diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:15:41 2012 -0400
@@ -307,12 +307,14 @@ 1:      movq  VCPU_domain(%rbx),%rdi
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
+        jmp   .Lbounce_exception
 2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
         movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(int80_direct_trap)
@@ -491,6 +493,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Thu Jun 14 12:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 14 Jun 2012 12:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sf946-00059r-Do; Thu, 14 Jun 2012 12:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf945-00058m-65
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:17 +0000
Received: from [85.158.143.35:40027] by server-3.bemta-4.messagelabs.com id
	BA/EC-05808-877D9DF4; Thu, 14 Jun 2012 12:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1339676530!13113101!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 630 invoked from network); 14 Jun 2012 12:22:14 -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;
	14 Jun 2012 12:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93y-0001uA-4N
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sf93x-0008DZ-SR
	for xen-changelog@lists.xensource.com; Thu, 14 Jun 2012 12:22:09 +0000
Message-Id: <E1Sf93x-0008DZ-SR@xenbits.xen.org>
Date: Thu, 14 Jun 2012 12:22:09 +0000
From: Xen patchbot-3.4-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-3.4-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Keith Coleman <keith.coleman@n2servers.com>
# Date 1339676141 14400
# Node ID e3a406b7e7ab37f47423cf056cc59defcb3584d6
# Parent  99eb99bf917904fd404443ace49fb421023d6e1e
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Signed-off-by: Keith Coleman <keith.coleman@n2servers.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Thu Jun 14 08:15:41 2012 -0400
@@ -90,6 +90,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/compat/entry.S	Thu Jun 14 08:15:41 2012 -0400
@@ -215,6 +215,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -231,14 +232,15 @@ ENTRY(compat_syscall)
 1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
+        jmp   .Lcompat_bounce_exception
 2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
         subl  $2,UREGS_rip(%rsp)
         movq  VCPU_gp_fault_addr(%rbx),%rax
         movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $0,TRAPBOUNCE_error_code(%rdx)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(compat_sysenter)
diff -r 99eb99bf9179 -r e3a406b7e7ab xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:14:01 2012 -0400
+++ b/xen/arch/x86/x86_64/entry.S	Thu Jun 14 08:15:41 2012 -0400
@@ -307,12 +307,14 @@ 1:      movq  VCPU_domain(%rbx),%rdi
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
+        jmp   .Lbounce_exception
 2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
         movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(int80_direct_trap)
@@ -491,6 +493,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB8-0001WZ-AV; Fri, 15 Jun 2012 15:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB6-0001Vz-IT
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [85.158.143.99:32587] by server-1.bemta-4.messagelabs.com id
	91/08-24392-F805BDF4; Fri, 15 Jun 2012 15:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1339773069!24200955!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14437 invoked from network); 15 Jun 2012 15:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 15:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00053M-7G
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00063J-60
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Message-Id: <E1SfYB3-00063J-60@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86-64: detect processors subject
	to AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497777 -3600
# Node ID a9c0a89c08f2a1c92f64f001b653d7c02fbc852c
# Parent  0fec1afa463808d91defa43f12cb744d3258a868
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25481:422880dc94a4
xen-unstable date:        Tue Jun 12 11:33:42 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 0fec1afa4638 -r a9c0a89c08f2 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:46:11 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:42:57 2012 +0100
@@ -32,6 +32,9 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static int opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -620,6 +623,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MCE, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 
diff -r 0fec1afa4638 -r a9c0a89c08f2 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:46:11 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:42:57 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB8-0001WZ-AV; Fri, 15 Jun 2012 15:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB6-0001Vz-IT
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [85.158.143.99:32587] by server-1.bemta-4.messagelabs.com id
	91/08-24392-F805BDF4; Fri, 15 Jun 2012 15:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1339773069!24200955!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14437 invoked from network); 15 Jun 2012 15:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 15:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00053M-7G
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00063J-60
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Message-Id: <E1SfYB3-00063J-60@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86-64: detect processors subject
	to AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497777 -3600
# Node ID a9c0a89c08f2a1c92f64f001b653d7c02fbc852c
# Parent  0fec1afa463808d91defa43f12cb744d3258a868
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25481:422880dc94a4
xen-unstable date:        Tue Jun 12 11:33:42 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 0fec1afa4638 -r a9c0a89c08f2 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:46:11 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:42:57 2012 +0100
@@ -32,6 +32,9 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static int opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -620,6 +623,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MCE, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 
diff -r 0fec1afa4638 -r a9c0a89c08f2 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:46:11 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:42:57 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB7-0001WE-4n; Fri, 15 Jun 2012 15:11:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB6-0001Vw-5e
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [85.158.139.83:30555] by server-9.bemta-5.messagelabs.com id
	76/E4-01069-E805BDF4; Fri, 15 Jun 2012 15:11:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1339773068!20672945!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8501 invoked from network); 15 Jun 2012 15:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 15:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00053G-B7
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00062I-3N
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Message-Id: <E1SfYB2-00062I-3N@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:07 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497510 -3600
# Node ID f08e61b9b33f553b21870d58e7c4f95f2c9ac513
# Parent  435493696053a079ec17d6e1a63e5f2be3a2c9d0
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 435493696053 -r f08e61b9b33f xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Fri May 25 08:18:47 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:30 2012 +0100
@@ -40,6 +40,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -50,6 +57,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB7-0001WE-4n; Fri, 15 Jun 2012 15:11:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB6-0001Vw-5e
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [85.158.139.83:30555] by server-9.bemta-5.messagelabs.com id
	76/E4-01069-E805BDF4; Fri, 15 Jun 2012 15:11:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1339773068!20672945!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8501 invoked from network); 15 Jun 2012 15:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 15:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00053G-B7
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00062I-3N
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Message-Id: <E1SfYB2-00062I-3N@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:07 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497510 -3600
# Node ID f08e61b9b33f553b21870d58e7c4f95f2c9ac513
# Parent  435493696053a079ec17d6e1a63e5f2be3a2c9d0
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 435493696053 -r f08e61b9b33f xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Fri May 25 08:18:47 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:30 2012 +0100
@@ -40,6 +40,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -50,6 +57,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB8-0001WT-7k; Fri, 15 Jun 2012 15:11:14 +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 1SfYB6-0001Vy-Gh
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [193.109.254.147:8230] by server-9.bemta-14.messagelabs.com id
	55/DA-27072-F805BDF4; Fri, 15 Jun 2012 15:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1339773069!9922486!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25392 invoked from network); 15 Jun 2012 15:11:10 -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;
	15 Jun 2012 15:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00053J-0j
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00062c-M1
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Message-Id: <E1SfYB2-00062c-M1@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497971 -3600
# Node ID 0fec1afa463808d91defa43f12cb744d3258a868
# Parent  f08e61b9b33f553b21870d58e7c4f95f2c9ac513
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:46:11 2012 +0100
@@ -90,6 +90,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:46:11 2012 +0100
@@ -214,6 +214,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -226,19 +227,20 @@ ENTRY(compat_syscall)
         leaq  VCPU_trap_bounce(%rbx),%rdx
         testl $~3,%esi
         leal  (,%rcx,TBF_INTERRUPT),%ecx
-        jz    2f
-1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
+UNLIKELY_START(z, compat_syscall_gpf)
+        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subl  $2,UREGS_rip(%rsp)
+        movl  $0,TRAPBOUNCE_error_code(%rdx)
+        movl  VCPU_gp_fault_addr(%rbx),%eax
+        movzwl VCPU_gp_fault_sel(%rbx),%esi
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
+UNLIKELY_END(compat_syscall_gpf)
+        movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
-2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-        subl  $2,UREGS_rip(%rsp)
-        movq  VCPU_gp_fault_addr(%rbx),%rax
-        movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-        movl  $0,TRAPBOUNCE_error_code(%rdx)
-        jmp   1b
+        jmp   .Lcompat_bounce_exception
 
 ENTRY(compat_sysenter)
         cmpl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:46:11 2012 +0100
@@ -289,19 +289,21 @@ sysenter_eflags_saved:
         leaq  VCPU_trap_bounce(%rbx),%rdx
         testq %rax,%rax
         leal  (,%rcx,TBF_INTERRUPT),%ecx
-        jz    2f
-1:      movq  VCPU_domain(%rbx),%rdi
+UNLIKELY_START(z, sysenter_gpf)
+        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        movl  %eax,TRAPBOUNCE_error_code(%rdx)
+        movq  VCPU_gp_fault_addr(%rbx),%rax
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
+UNLIKELY_END(sysenter_gpf)
+        movq  VCPU_domain(%rbx),%rdi
         movq  %rax,TRAPBOUNCE_eip(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
-2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
-        movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-        jmp   1b
+        jmp   .Lbounce_exception
 
 ENTRY(int80_direct_trap)
         pushq $0
@@ -493,6 +495,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 15:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 15: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 1SfYB8-0001WT-7k; Fri, 15 Jun 2012 15:11:14 +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 1SfYB6-0001Vy-Gh
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:12 +0000
Received: from [193.109.254.147:8230] by server-9.bemta-14.messagelabs.com id
	55/DA-27072-F805BDF4; Fri, 15 Jun 2012 15:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1339773069!9922486!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25392 invoked from network); 15 Jun 2012 15:11:10 -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;
	15 Jun 2012 15:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB3-00053J-0j
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SfYB2-00062c-M1
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 15:11:08 +0000
Message-Id: <E1SfYB2-00062c-M1@xenbits.xen.org>
Date: Fri, 15 Jun 2012 15:11:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497971 -3600
# Node ID 0fec1afa463808d91defa43f12cb744d3258a868
# Parent  f08e61b9b33f553b21870d58e7c4f95f2c9ac513
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:46:11 2012 +0100
@@ -90,6 +90,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:46:11 2012 +0100
@@ -214,6 +214,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -226,19 +227,20 @@ ENTRY(compat_syscall)
         leaq  VCPU_trap_bounce(%rbx),%rdx
         testl $~3,%esi
         leal  (,%rcx,TBF_INTERRUPT),%ecx
-        jz    2f
-1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
+UNLIKELY_START(z, compat_syscall_gpf)
+        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subl  $2,UREGS_rip(%rsp)
+        movl  $0,TRAPBOUNCE_error_code(%rdx)
+        movl  VCPU_gp_fault_addr(%rbx),%eax
+        movzwl VCPU_gp_fault_sel(%rbx),%esi
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
+UNLIKELY_END(compat_syscall_gpf)
+        movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
-2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-        subl  $2,UREGS_rip(%rsp)
-        movq  VCPU_gp_fault_addr(%rbx),%rax
-        movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-        movl  $0,TRAPBOUNCE_error_code(%rdx)
-        jmp   1b
+        jmp   .Lcompat_bounce_exception
 
 ENTRY(compat_sysenter)
         cmpl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
diff -r f08e61b9b33f -r 0fec1afa4638 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:30 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:46:11 2012 +0100
@@ -289,19 +289,21 @@ sysenter_eflags_saved:
         leaq  VCPU_trap_bounce(%rbx),%rdx
         testq %rax,%rax
         leal  (,%rcx,TBF_INTERRUPT),%ecx
-        jz    2f
-1:      movq  VCPU_domain(%rbx),%rdi
+UNLIKELY_START(z, sysenter_gpf)
+        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        movl  %eax,TRAPBOUNCE_error_code(%rdx)
+        movq  VCPU_gp_fault_addr(%rbx),%rax
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
+UNLIKELY_END(sysenter_gpf)
+        movq  VCPU_domain(%rbx),%rdi
         movq  %rax,TRAPBOUNCE_eip(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
-2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
-        movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-        movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-        jmp   1b
+        jmp   .Lbounce_exception
 
 ENTRY(int80_direct_trap)
         pushq $0
@@ -493,6 +495,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQC-0002PL-NU; Fri, 15 Jun 2012 22:55:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQC-0002P0-0Z
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:16 +0000
Received: from [85.158.138.51:21503] by server-11.bemta-3.messagelabs.com id
	1C/1A-02904-35DBBDF4; Fri, 15 Jun 2012 22:55:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1339800913!27926281!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7516 invoked from network); 15 Jun 2012 22:55:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ9-0002Ji-83
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0000Sj-SC
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Message-Id: <E1SffQ8-0000Sj-SC@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:12 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86-64: detect processors subject
	to AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497777 -3600
# Node ID e35c8bb532559864faae2d640c1f668ce3ed967c
# Parent  adb943a387c8397709d411c191234de8d97dddbb
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25481:422880dc94a4
xen-unstable date:        Tue Jun 12 11:33:42 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r adb943a387c8 -r e35c8bb53255 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:39:34 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:42:57 2012 +0100
@@ -41,6 +41,9 @@ static unsigned int opt_cpuid_mask_ext_e
 integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx);
 integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx);
 
+static int opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -640,6 +643,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MCE, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 #endif
diff -r adb943a387c8 -r e35c8bb53255 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:39:34 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:42:57 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQC-0002PL-NU; Fri, 15 Jun 2012 22:55:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQC-0002P0-0Z
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:16 +0000
Received: from [85.158.138.51:21503] by server-11.bemta-3.messagelabs.com id
	1C/1A-02904-35DBBDF4; Fri, 15 Jun 2012 22:55:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1339800913!27926281!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7516 invoked from network); 15 Jun 2012 22:55:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ9-0002Ji-83
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0000Sj-SC
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Message-Id: <E1SffQ8-0000Sj-SC@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:12 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86-64: detect processors subject
	to AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497777 -3600
# Node ID e35c8bb532559864faae2d640c1f668ce3ed967c
# Parent  adb943a387c8397709d411c191234de8d97dddbb
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25481:422880dc94a4
xen-unstable date:        Tue Jun 12 11:33:42 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r adb943a387c8 -r e35c8bb53255 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:39:34 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:42:57 2012 +0100
@@ -41,6 +41,9 @@ static unsigned int opt_cpuid_mask_ext_e
 integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx);
 integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx);
 
+static int opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -640,6 +643,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MCE, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 #endif
diff -r adb943a387c8 -r e35c8bb53255 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:39:34 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:42:57 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQB-0002P1-IF; Fri, 15 Jun 2012 22:55:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQA-0002Ot-Mr
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:14 +0000
Received: from [85.158.139.83:14682] by server-12.bemta-5.messagelabs.com id
	48/C4-25233-15DBBDF4; Fri, 15 Jun 2012 22:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1339800912!25222414!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11720 invoked from network); 15 Jun 2012 22:55:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ7-0002Jc-Rf
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ7-0000SC-5Q
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:11 +0000
Message-Id: <E1SffQ7-0000SC-5Q@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:10 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497511 -3600
# Node ID dd367837e08919f10a57b7fa482e68a91e0779dc
# Parent  c6eb61ed6f04b4079525c3944b5a55268e1db4f1
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c6eb61ed6f04 -r dd367837e089 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Mon May 14 17:02:16 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:31 2012 +0100
@@ -51,6 +51,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -61,6 +68,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQB-0002P1-IF; Fri, 15 Jun 2012 22:55:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQA-0002Ot-Mr
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:14 +0000
Received: from [85.158.139.83:14682] by server-12.bemta-5.messagelabs.com id
	48/C4-25233-15DBBDF4; Fri, 15 Jun 2012 22:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1339800912!25222414!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11720 invoked from network); 15 Jun 2012 22:55:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ7-0002Jc-Rf
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ7-0000SC-5Q
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:11 +0000
Message-Id: <E1SffQ7-0000SC-5Q@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:10 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86_64: Do not execute sysret
	with a non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497511 -3600
# Node ID dd367837e08919f10a57b7fa482e68a91e0779dc
# Parent  c6eb61ed6f04b4079525c3944b5a55268e1db4f1
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

xen-unstable changeset:   25480:76eaf5966c05
xen-unstable date:        Tue Jun 12 11:33:40 2012 +0100
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c6eb61ed6f04 -r dd367837e089 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Mon May 14 17:02:16 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:31 2012 +0100
@@ -51,6 +51,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -61,6 +68,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQC-0002PG-Kt; Fri, 15 Jun 2012 22:55:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQC-0002Ou-1n
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:16 +0000
Received: from [85.158.143.99:59043] by server-3.bemta-4.messagelabs.com id
	5B/F4-05808-25DBBDF4; Fri, 15 Jun 2012 22:55:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1339800912!27630126!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8141 invoked from network); 15 Jun 2012 22:55:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0002Jf-HR
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0000SS-0m
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Message-Id: <E1SffQ8-0000SS-0m@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:11 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497574 -3600
# Node ID adb943a387c8397709d411c191234de8d97dddbb
# Parent  dd367837e08919f10a57b7fa482e68a91e0779dc
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:39:34 2012 +0100
@@ -89,6 +89,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:39:34 2012 +0100
@@ -227,6 +227,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -243,14 +244,15 @@ ENTRY(compat_syscall)
 1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
+        jmp   .Lcompat_bounce_exception
 2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
         subl  $2,UREGS_rip(%rsp)
         movq  VCPU_gp_fault_addr(%rbx),%rax
         movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $0,TRAPBOUNCE_error_code(%rdx)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(compat_sysenter)
diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:39:34 2012 +0100
@@ -309,12 +309,14 @@ 1:      movq  VCPU_domain(%rbx),%rdi
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
+        jmp   .Lbounce_exception
 2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
         movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(int80_direct_trap)
@@ -501,6 +503,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Fri Jun 15 22:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 15 Jun 2012 22:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SffQC-0002PG-Kt; Fri, 15 Jun 2012 22:55:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQC-0002Ou-1n
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:16 +0000
Received: from [85.158.143.99:59043] by server-3.bemta-4.messagelabs.com id
	5B/F4-05808-25DBBDF4; Fri, 15 Jun 2012 22:55:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1339800912!27630126!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8141 invoked from network); 15 Jun 2012 22:55:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Jun 2012 22:55:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0002Jf-HR
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SffQ8-0000SS-0m
	for xen-changelog@lists.xensource.com; Fri, 15 Jun 2012 22:55:12 +0000
Message-Id: <E1SffQ8-0000SS-0m@xenbits.xen.org>
Date: Fri, 15 Jun 2012 22:55:11 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86-64: fix #GP generation in
	assembly 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497574 -3600
# Node ID adb943a387c8397709d411c191234de8d97dddbb
# Parent  dd367837e08919f10a57b7fa482e68a91e0779dc
x86-64: fix #GP generation in assembly code

When guest use of sysenter (64-bit PV guest) or syscall (32-bit PV
guest) gets converted into a GP fault (due to no callback having got
registered), we must
- honor the GP fault handler's request the keep enabled or mask event
  delivery
- not allow TBF_EXCEPTION to remain set past the generation of the
  (guest) exception in the vCPU's trap_bounce.flags, as that would
  otherwise allow for the next exception occurring in guest mode,
  should it happen to get handled in Xen itself, to nevertheless get
  bounced to the guest kernel.

Also, just like compat mode syscall handling already did, native mode
sysenter handling should, when converting to #GP, subtract 2 from the
RIP present in the frame so that the guest's GP fault handler would
see the fault pointing to the offending instruction instead of past it.

Finally, since those exception generating code blocks needed to be
modified anyway, convert them to make use of UNLIKELY_{START,END}().

[ This bug is security vulnerability, XSA-8 / CVE-2012-0218. ]

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

xen-unstable changeset:   25200:80f4113be500 25204:569d6f05e1ef
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c	Tue Jun 12 11:39:34 2012 +0100
@@ -89,6 +89,8 @@ void __dummy__(void)
            arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
     OFFSET(VCPU_gp_fault_sel, struct vcpu,
            arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
+    OFFSET(VCPU_gp_fault_flags, struct vcpu,
+           arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
     OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
     OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
     OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/compat/entry.S	Tue Jun 12 11:39:34 2012 +0100
@@ -227,6 +227,7 @@ 1:      call  compat_create_bounce_frame
 ENTRY(compat_post_handle_exception)
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    compat_test_all_events
+.Lcompat_bounce_exception:
         call  compat_create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   compat_test_all_events
@@ -243,14 +244,15 @@ ENTRY(compat_syscall)
 1:      movq  %rax,TRAPBOUNCE_eip(%rdx)
         movw  %si,TRAPBOUNCE_cs(%rdx)
         movb  %cl,TRAPBOUNCE_flags(%rdx)
-        call  compat_create_bounce_frame
-        jmp   compat_test_all_events
+        jmp   .Lcompat_bounce_exception
 2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
         subl  $2,UREGS_rip(%rsp)
         movq  VCPU_gp_fault_addr(%rbx),%rax
         movzwl VCPU_gp_fault_sel(%rbx),%esi
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $0,TRAPBOUNCE_error_code(%rdx)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(compat_sysenter)
diff -r dd367837e089 -r adb943a387c8 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:38:31 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:39:34 2012 +0100
@@ -309,12 +309,14 @@ 1:      movq  VCPU_domain(%rbx),%rdi
         movb  %cl,TRAPBOUNCE_flags(%rdx)
         testb $1,DOMAIN_is_32bit_pv(%rdi)
         jnz   compat_sysenter
-        call  create_bounce_frame
-        jmp   test_all_events
+        jmp   .Lbounce_exception
 2:      movl  %eax,TRAPBOUNCE_error_code(%rdx)
         movq  VCPU_gp_fault_addr(%rbx),%rax
-        movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
         movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subq  $2,UREGS_rip(%rsp)
+        testb $4,VCPU_gp_fault_flags(%rbx)
+        setnz %cl
+        leal  TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
         jmp   1b
 
 ENTRY(int80_direct_trap)
@@ -501,6 +503,7 @@ 1:      movq  %rsp,%rdi
         jnz   compat_post_handle_exception
         testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
         jz    test_all_events
+.Lbounce_exception:
         call  create_bounce_frame
         movb  $0,TRAPBOUNCE_flags(%rdx)
         jmp   test_all_events

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

From xen-changelog-bounces@lists.xen.org Mon Jun 18 01:55:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 18 Jun 2012 01:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgRBP-00087b-Sb; Mon, 18 Jun 2012 01:55: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 1SgRBN-00087T-TE
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:10 +0000
Received: from [85.158.139.83:17700] by server-6.bemta-5.messagelabs.com id
	0A/58-11348-D7A8EDF4; Mon, 18 Jun 2012 01:55:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-182.messagelabs.com!1339984507!20891524!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5631 invoked from network); 18 Jun 2012 01:55:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Jun 2012 01:55: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 1SgRBK-0005cD-JD
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SgRBK-0005lC-4S
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:06 +0000
Date: Mon, 18 Jun 2012 01:55:06 +0000
Message-Id: <E1SgRBK-0005lC-4S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu/xendisk: set maximum
	number of grants to be used
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f7f8c33cd49885d69efc2e5f7f9a613d631762e2
Author: Jan Beulich <JBeulich@suse.com>
Date:   Wed Jun 13 10:45:07 2012 +0000

    qemu/xendisk: set maximum number of grants to be used
    
    Legacy (non-pvops) gntdev drivers may require this to be done when the
    number of grants intended to be used simultaneously exceeds a certain
    driver specific default limit.
    
    upstream-commit: 64c27e5b1fdb6d94bdc0bda3b1869d7383a35c65
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_disk.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index a76cd73..88544b1 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -534,6 +534,15 @@ static void blk_bh(void *opaque)
     blk_handle_requests(blkdev);
 }
 
+/*
+ * We need to account for the grant allocations requiring contiguous
+ * chunks; the worst case number would be
+ *     max_req * max_seg + (max_req - 1) * (max_seg - 1) + 1,
+ * but in order to keep things simple just use
+ *     2 * max_req * max_seg.
+ */
+#define MAX_GRANTS(max_req, max_seg) (2 * (max_req) * (max_seg))
+
 static void blk_alloc(struct XenDevice *xendev)
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -545,6 +554,11 @@ static void blk_alloc(struct XenDevice *xendev)
     if (xen_mode != XEN_EMULATE) {
         batch_maps = 1;
     }
+    if (xc_gnttab_set_max_grants(xendev->gnttabdev,
+            MAX_GRANTS(max_requests, BLKIF_MAX_SEGMENTS_PER_REQUEST)) < 0) {
+        xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants failed: %s\n",
+                      strerror(errno));
+    }
 }
 
 static int blk_init(struct XenDevice *xendev)
--
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 Mon Jun 18 01:55:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 18 Jun 2012 01:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgRBP-00087b-Sb; Mon, 18 Jun 2012 01:55: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 1SgRBN-00087T-TE
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:10 +0000
Received: from [85.158.139.83:17700] by server-6.bemta-5.messagelabs.com id
	0A/58-11348-D7A8EDF4; Mon, 18 Jun 2012 01:55:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-182.messagelabs.com!1339984507!20891524!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5631 invoked from network); 18 Jun 2012 01:55:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Jun 2012 01:55: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 1SgRBK-0005cD-JD
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SgRBK-0005lC-4S
	for xen-changelog@lists.xensource.com; Mon, 18 Jun 2012 01:55:06 +0000
Date: Mon, 18 Jun 2012 01:55:06 +0000
Message-Id: <E1SgRBK-0005lC-4S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] qemu/xendisk: set maximum
	number of grants to be used
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f7f8c33cd49885d69efc2e5f7f9a613d631762e2
Author: Jan Beulich <JBeulich@suse.com>
Date:   Wed Jun 13 10:45:07 2012 +0000

    qemu/xendisk: set maximum number of grants to be used
    
    Legacy (non-pvops) gntdev drivers may require this to be done when the
    number of grants intended to be used simultaneously exceeds a certain
    driver specific default limit.
    
    upstream-commit: 64c27e5b1fdb6d94bdc0bda3b1869d7383a35c65
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_disk.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index a76cd73..88544b1 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -534,6 +534,15 @@ static void blk_bh(void *opaque)
     blk_handle_requests(blkdev);
 }
 
+/*
+ * We need to account for the grant allocations requiring contiguous
+ * chunks; the worst case number would be
+ *     max_req * max_seg + (max_req - 1) * (max_seg - 1) + 1,
+ * but in order to keep things simple just use
+ *     2 * max_req * max_seg.
+ */
+#define MAX_GRANTS(max_req, max_seg) (2 * (max_req) * (max_seg))
+
 static void blk_alloc(struct XenDevice *xendev)
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -545,6 +554,11 @@ static void blk_alloc(struct XenDevice *xendev)
     if (xen_mode != XEN_EMULATE) {
         batch_maps = 1;
     }
+    if (xc_gnttab_set_max_grants(xendev->gnttabdev,
+            MAX_GRANTS(max_requests, BLKIF_MAX_SEGMENTS_PER_REQUEST)) < 0) {
+        xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants failed: %s\n",
+                      strerror(errno));
+    }
 }
 
 static int blk_init(struct XenDevice *xendev)
--
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 Jun 19 13:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44: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 1Sgyj7-0001Du-AT; Tue, 19 Jun 2012 13:44:13 +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 1Sgyj6-0001Dh-A6
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:12 +0000
Received: from [193.109.254.147:9110] by server-12.bemta-14.messagelabs.com id
	91/F6-30461-B2280EF4; Tue, 19 Jun 2012 13:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1340113449!10459370!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16338 invoked from network); 19 Jun 2012 13:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0007Ut-2O
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj2-0002Eo-SZ
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:08 +0000
Message-Id: <E1Sgyj2-0002Eo-SZ@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to 4.0.4-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028693 -3600
# Node ID fe1ae79f1a7f0c25445a4753aa9367b312f81910
# Parent  e35c8bb532559864faae2d640c1f668ce3ed967c
Update Xen version to 4.0.4-rc2
---


diff -r e35c8bb53255 -r fe1ae79f1a7f Config.mk
--- a/Config.mk	Tue Jun 12 11:42:57 2012 +0100
+++ b/Config.mk	Mon Jun 18 15:11:33 2012 +0100
@@ -178,7 +178,7 @@ endif
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG := xen-4.0.4-rc1
+QEMU_TAG := xen-4.0.4-rc2
 # Thu Feb 2 13:47:06 2012 +0000
 # e1000: bounds packet size against buffer size
 
diff -r e35c8bb53255 -r fe1ae79f1a7f xen/Makefile
--- a/xen/Makefile	Tue Jun 12 11:42:57 2012 +0100
+++ b/xen/Makefile	Mon Jun 18 15:11:33 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 13:44:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44: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 1Sgyj7-0001Du-AT; Tue, 19 Jun 2012 13:44:13 +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 1Sgyj6-0001Dh-A6
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:12 +0000
Received: from [193.109.254.147:9110] by server-12.bemta-14.messagelabs.com id
	91/F6-30461-B2280EF4; Tue, 19 Jun 2012 13:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1340113449!10459370!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16338 invoked from network); 19 Jun 2012 13:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0007Ut-2O
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj2-0002Eo-SZ
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:08 +0000
Message-Id: <E1Sgyj2-0002Eo-SZ@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to 4.0.4-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028693 -3600
# Node ID fe1ae79f1a7f0c25445a4753aa9367b312f81910
# Parent  e35c8bb532559864faae2d640c1f668ce3ed967c
Update Xen version to 4.0.4-rc2
---


diff -r e35c8bb53255 -r fe1ae79f1a7f Config.mk
--- a/Config.mk	Tue Jun 12 11:42:57 2012 +0100
+++ b/Config.mk	Mon Jun 18 15:11:33 2012 +0100
@@ -178,7 +178,7 @@ endif
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG := xen-4.0.4-rc1
+QEMU_TAG := xen-4.0.4-rc2
 # Thu Feb 2 13:47:06 2012 +0000
 # e1000: bounds packet size against buffer size
 
diff -r e35c8bb53255 -r fe1ae79f1a7f xen/Makefile
--- a/xen/Makefile	Tue Jun 12 11:42:57 2012 +0100
+++ b/xen/Makefile	Mon Jun 18 15:11:33 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 13:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sgyj8-0001E0-D9; Tue, 19 Jun 2012 13:44:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj7-0001Do-4T
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:13 +0000
Received: from [85.158.139.83:47177] by server-9.bemta-5.messagelabs.com id
	9F/33-01069-C2280EF4; Tue, 19 Jun 2012 13:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-182.messagelabs.com!1340113450!24560330!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8850 invoked from network); 19 Jun 2012 13:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0007Uw-Oj
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0002F3-E9
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Message-Id: <E1Sgyj3-0002F3-E9@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added tag 4.0.4-rc2 for changeset
	fe1ae79f1a7f
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028698 -3600
# Node ID 9d62e52a29329dfedf8658900728ef4eb2400da8
# Parent  fe1ae79f1a7f0c25445a4753aa9367b312f81910
Added tag 4.0.4-rc2 for changeset fe1ae79f1a7f
---


diff -r fe1ae79f1a7f -r 9d62e52a2932 .hgtags
--- a/.hgtags	Mon Jun 18 15:11:33 2012 +0100
+++ b/.hgtags	Mon Jun 18 15:11:38 2012 +0100
@@ -65,3 +65,4 @@ 8d012bc20d3063d76b851d9909da6f9fa8ef469c
 fd7c4d4e52d9aa4ad228d73d068fa7db79a0c904 4.0.3-rc3
 00b5807c08f266b11fe54de808bafc4f74dde972 RELEASE-4.0.3
 94fddf2a19482c88a60c07a1a085374586d207e8 4.0.4-rc1
+fe1ae79f1a7f0c25445a4753aa9367b312f81910 4.0.4-rc2

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 13:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Sgyj8-0001E0-D9; Tue, 19 Jun 2012 13:44:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj7-0001Do-4T
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:13 +0000
Received: from [85.158.139.83:47177] by server-9.bemta-5.messagelabs.com id
	9F/33-01069-C2280EF4; Tue, 19 Jun 2012 13:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-182.messagelabs.com!1340113450!24560330!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8850 invoked from network); 19 Jun 2012 13:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0007Uw-Oj
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0002F3-E9
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Message-Id: <E1Sgyj3-0002F3-E9@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added tag 4.0.4-rc2 for changeset
	fe1ae79f1a7f
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028698 -3600
# Node ID 9d62e52a29329dfedf8658900728ef4eb2400da8
# Parent  fe1ae79f1a7f0c25445a4753aa9367b312f81910
Added tag 4.0.4-rc2 for changeset fe1ae79f1a7f
---


diff -r fe1ae79f1a7f -r 9d62e52a2932 .hgtags
--- a/.hgtags	Mon Jun 18 15:11:33 2012 +0100
+++ b/.hgtags	Mon Jun 18 15:11:38 2012 +0100
@@ -65,3 +65,4 @@ 8d012bc20d3063d76b851d9909da6f9fa8ef469c
 fd7c4d4e52d9aa4ad228d73d068fa7db79a0c904 4.0.3-rc3
 00b5807c08f266b11fe54de808bafc4f74dde972 RELEASE-4.0.3
 94fddf2a19482c88a60c07a1a085374586d207e8 4.0.4-rc1
+fe1ae79f1a7f0c25445a4753aa9367b312f81910 4.0.4-rc2

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 13:44:41 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgyjV-0001GL-GU; Tue, 19 Jun 2012 13:44:37 +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 1SgyjU-0001G8-Oi
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:36 +0000
Received: from [85.158.143.99:20588] by server-2.bemta-4.messagelabs.com id
	73/17-17938-44280EF4; Tue, 19 Jun 2012 13:44:36 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1340113471!21047310!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22949 invoked from network); 19 Jun 2012 13:44:32 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:32 -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 1Sgyj4-0007Uy-0n
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0002FI-TA
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Message-Id: <E1Sgyj3-0002FI-TA@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added signature for changeset
	fe1ae79f1a7f
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028707 -3600
# Node ID e231998f4e3a0ba8d60fe254e46c3fd0306ca0f1
# Parent  9d62e52a29329dfedf8658900728ef4eb2400da8
Added signature for changeset fe1ae79f1a7f
---


diff -r 9d62e52a2932 -r e231998f4e3a .hgsigs
--- a/.hgsigs	Mon Jun 18 15:11:38 2012 +0100
+++ b/.hgsigs	Mon Jun 18 15:11:47 2012 +0100
@@ -18,3 +18,4 @@ 8d012bc20d3063d76b851d9909da6f9fa8ef469c
 fd7c4d4e52d9aa4ad228d73d068fa7db79a0c904 0 iQEcBAABAgAGBQJOjxDgAAoJEIP+FMlX6CvZbugIAJhthGHfoc7ln0WHj6ZAA2UVPo77l/VdceYohgCnWqgj16SyxkMgSUoieBhO1Fb/+9QzyXbV+ZAkJFCbp0lZ3bg62ZRpRjO38443D1aczabFno1GI22rUiwOkT1v6nvEQbHyc2L6lpzhDvv2h9Mv73tmti/XfM7uzfQD9Ea40BOGZ7PPOLifMnOo2FKepDyRNlo0thrz7kMpri0V9wm7Bx0Rx0SovMA3z9gtCeTYj8HgJ3niBibTe57AjCMwQCODRpAAhKdzGJ7GBxJ93q7WeJoNNxmQzYqFbUI3P3Jo/fF4APsxtnO6dC0Qt0IWVu0w6NCmfasnS9Vc/yifq7fDvLg=
 00b5807c08f266b11fe54de808bafc4f74dde972 0 iQEcBAABAgAGBQJOoE3nAAoJEIP+FMlX6CvZg6UH/1WLvfz7MiyLJ2igox5gOQdcfrMe8ohnyd/CGwG/vex+Ohc7mKXVRoIcrR02a247eA3FmJKDqj/NDAbLTjnCzFjlxWKBQo2HO1bGZSGBD8b+hbR1laBSinXB5WscQG5VO7S2uj4j0GZbZ9ATdF11qhzWTviiBxei0l/INtoOb5NhsWpkIubQWVJLBEw9X6COMvwCabcoCDa/xZUxQfOHhRfdp1ouk4V9Zf7amW3ne4p0tMHjN9e0Ic+waBDX4Fyfns4GqDKfBgTOq2AgMO8BSmUuBQtIcYw03Z5GYco1Tfz3Lk3tTq4E+TyWXKKSQ5NOFI+9AxJn813NyR+r+AwatrI=
 94fddf2a19482c88a60c07a1a085374586d207e8 0 iQEcBAABAgAGBQJPp8P7AAoJEIP+FMlX6CvZticH/jEqpGGEdlhBftLU7IeQ+0y4E25rbwH4iPpcRFctOvjWi8AsNT3u87UYvP/IqPoCg5NlNIYzmm9GO5dRV+cfKrsNQ1zKB0LETUkElfo+RM1upwGzNc4Hct87Gu8TNGYOsXSovHH868vnZXN0ZylR0PcHMrawJaOi9bJP2GkKo9XKEkmx0Pq77VQCCRUijWSaBYhRKgAbJ3VTB1/qzXDrve2v4HXCg9vFILH6DPWz5M3EhIZQh3+IIcUVlWi/6WbPergm8moKU4TXZc7kpl/hO2x+/LnneA/v96PzyQIJcl/m3PcIBjiaB17UCxwSfkS4VUZjLtfL5rRAywcnjVYXOyY=
+fe1ae79f1a7f0c25445a4753aa9367b312f81910 0 iQEcBAABAgAGBQJP3zchAAoJEIP+FMlX6CvZib0H/A5jcY9NBbd4+QxPz67tdKMX1O0wVUvy160p9Nq1vQcbtrxcpVpR0o0/Ss2pbc9wJpBzcbKsBLxWffolkIxF7Dr5OiQU9Zu6lF1ou6WoJ9wscAWYvxjJY5KrS9cu2aTZged89WUJSJOZq96BujCp0bc3+jbin70Dn/Y9UvkghbUfb2x2ZJ2Tj3yxsfsogK6ShfN7xoyRhZSqCgczzcUQ72+HGJvqpMIvwUNkeKJzymM9nqbIKiP1HKK4rB97zCflwNgBrSJ4BNLQ49cJSFrbNB+X6p6MUXrNLrlBet19WR4C/wHMK9ovnOnSWgzg3mi3zlnJ/CcKOF+XmPHhg0kmi9M=

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 13:44:41 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 13:44:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgyjV-0001GL-GU; Tue, 19 Jun 2012 13:44:37 +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 1SgyjU-0001G8-Oi
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:36 +0000
Received: from [85.158.143.99:20588] by server-2.bemta-4.messagelabs.com id
	73/17-17938-44280EF4; Tue, 19 Jun 2012 13:44:36 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1340113471!21047310!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22949 invoked from network); 19 Jun 2012 13:44:32 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 13:44:32 -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 1Sgyj4-0007Uy-0n
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgyj3-0002FI-TA
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 13:44:09 +0000
Message-Id: <E1Sgyj3-0002FI-TA@xenbits.xen.org>
Date: Tue, 19 Jun 2012 13:44:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added signature for changeset
	fe1ae79f1a7f
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028707 -3600
# Node ID e231998f4e3a0ba8d60fe254e46c3fd0306ca0f1
# Parent  9d62e52a29329dfedf8658900728ef4eb2400da8
Added signature for changeset fe1ae79f1a7f
---


diff -r 9d62e52a2932 -r e231998f4e3a .hgsigs
--- a/.hgsigs	Mon Jun 18 15:11:38 2012 +0100
+++ b/.hgsigs	Mon Jun 18 15:11:47 2012 +0100
@@ -18,3 +18,4 @@ 8d012bc20d3063d76b851d9909da6f9fa8ef469c
 fd7c4d4e52d9aa4ad228d73d068fa7db79a0c904 0 iQEcBAABAgAGBQJOjxDgAAoJEIP+FMlX6CvZbugIAJhthGHfoc7ln0WHj6ZAA2UVPo77l/VdceYohgCnWqgj16SyxkMgSUoieBhO1Fb/+9QzyXbV+ZAkJFCbp0lZ3bg62ZRpRjO38443D1aczabFno1GI22rUiwOkT1v6nvEQbHyc2L6lpzhDvv2h9Mv73tmti/XfM7uzfQD9Ea40BOGZ7PPOLifMnOo2FKepDyRNlo0thrz7kMpri0V9wm7Bx0Rx0SovMA3z9gtCeTYj8HgJ3niBibTe57AjCMwQCODRpAAhKdzGJ7GBxJ93q7WeJoNNxmQzYqFbUI3P3Jo/fF4APsxtnO6dC0Qt0IWVu0w6NCmfasnS9Vc/yifq7fDvLg=
 00b5807c08f266b11fe54de808bafc4f74dde972 0 iQEcBAABAgAGBQJOoE3nAAoJEIP+FMlX6CvZg6UH/1WLvfz7MiyLJ2igox5gOQdcfrMe8ohnyd/CGwG/vex+Ohc7mKXVRoIcrR02a247eA3FmJKDqj/NDAbLTjnCzFjlxWKBQo2HO1bGZSGBD8b+hbR1laBSinXB5WscQG5VO7S2uj4j0GZbZ9ATdF11qhzWTviiBxei0l/INtoOb5NhsWpkIubQWVJLBEw9X6COMvwCabcoCDa/xZUxQfOHhRfdp1ouk4V9Zf7amW3ne4p0tMHjN9e0Ic+waBDX4Fyfns4GqDKfBgTOq2AgMO8BSmUuBQtIcYw03Z5GYco1Tfz3Lk3tTq4E+TyWXKKSQ5NOFI+9AxJn813NyR+r+AwatrI=
 94fddf2a19482c88a60c07a1a085374586d207e8 0 iQEcBAABAgAGBQJPp8P7AAoJEIP+FMlX6CvZticH/jEqpGGEdlhBftLU7IeQ+0y4E25rbwH4iPpcRFctOvjWi8AsNT3u87UYvP/IqPoCg5NlNIYzmm9GO5dRV+cfKrsNQ1zKB0LETUkElfo+RM1upwGzNc4Hct87Gu8TNGYOsXSovHH868vnZXN0ZylR0PcHMrawJaOi9bJP2GkKo9XKEkmx0Pq77VQCCRUijWSaBYhRKgAbJ3VTB1/qzXDrve2v4HXCg9vFILH6DPWz5M3EhIZQh3+IIcUVlWi/6WbPergm8moKU4TXZc7kpl/hO2x+/LnneA/v96PzyQIJcl/m3PcIBjiaB17UCxwSfkS4VUZjLtfL5rRAywcnjVYXOyY=
+fe1ae79f1a7f0c25445a4753aa9367b312f81910 0 iQEcBAABAgAGBQJP3zchAAoJEIP+FMlX6CvZib0H/A5jcY9NBbd4+QxPz67tdKMX1O0wVUvy160p9Nq1vQcbtrxcpVpR0o0/Ss2pbc9wJpBzcbKsBLxWffolkIxF7Dr5OiQU9Zu6lF1ou6WoJ9wscAWYvxjJY5KrS9cu2aTZged89WUJSJOZq96BujCp0bc3+jbin70Dn/Y9UvkghbUfb2x2ZJ2Tj3yxsfsogK6ShfN7xoyRhZSqCgczzcUQ72+HGJvqpMIvwUNkeKJzymM9nqbIKiP1HKK4rB97zCflwNgBrSJ4BNLQ49cJSFrbNB+X6p6MUXrNLrlBet19WR4C/wHMK9ovnOnSWgzg3mi3zlnJ/CcKOF+XmPHhg0kmi9M=

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14: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 1SgzfC-00027z-DP; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfB-00027g-C9
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:13 +0000
Received: from [85.158.139.83:63010] by server-5.bemta-5.messagelabs.com id
	19/F4-02722-C3090EF4; Tue, 19 Jun 2012 14:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1340117050!24495594!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22299 invoked from network); 19 Jun 2012 14:44:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0008Ik-IO
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0003xy-GY
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Message-Id: <E1Sgzf8-0003xy-GY@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added signature for changeset
	acbd36176913
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028637 -3600
# Node ID 11dfb8e06343c1a8b3c013e7973c78b9667b9fa8
# Parent  e8ded2fee76f7e3a0eb0a3edd182ba15df7431cc
Added signature for changeset acbd36176913
---


diff -r e8ded2fee76f -r 11dfb8e06343 .hgsigs
--- a/.hgsigs	Mon Jun 18 15:10:22 2012 +0100
+++ b/.hgsigs	Mon Jun 18 15:10:37 2012 +0100
@@ -16,3 +16,4 @@ 3e6a3bf83935cc2460707b94ef2801bb6f19d581
 24041ed83728ac6c26d3c32d29d7d08eb8433149 0 iQEcBAABAgAGBQJOjxDqAAoJEIP+FMlX6CvZohIH/2krgh6rTz6hjsv6HOFWQkekqHjZyyQBgdl3tfgSN/vSd3rJPN6mvaYjh8ZltmBbcHcRCmriTr7KK9e6kOChU7hyTCBDmtGxNN5TgMoAf27pSMrFN1HvK0ohQzGXvqKLAepTXW2ew+Abno3OgKRwUMpQJVlq+ZUCuqKODYI9nRE10XV6ORAejgE5mDYNn3BbvcI07Cjmqgm7bJzi5Hv0wzscPuJxQjz4vrJ+5ne65TYOzFPNkIFKeRETP+Shd9Gkw2/w9sbzQ2hzTH/02sUrsxolXD2wexfxgVz07rTe7qgbqKruCBOPtbcnGMAbs3e5NB7V6H3HnkTRtHQ4BosUMnE=
 3eca5bf65e6cca881d599c68f2305f865e0f9fd0 0 iQEcBAABAgAGBQJOoE3xAAoJEIP+FMlX6CvZ0P4IALamOXJi4s9OzfutsjD//V5QYU972Y+NxBo2j7VNKnRaFwZ57RbxLE8dzsAufvxx/886ScyvdehAfWkpqhU+brLfKNftG54Bm3DFd+mDCdcTvHOGkKw768YUPBNjOhQZ8voVSnalrQaOlbibluRTYGK1Y4lcWXwP8SSCCR7bpm8VLrSKQoatiaPtc/OxBO+9UOlHFUR2tWt5YY4a5NczaXJ2xGERMnOssE83GjxSD/07+y9aDLNjnQiYqQfSkF46Gv4s94hPv8KeHEiGDMoZF/YqHr+4YxDCt8y39TXiQfT67O3o9xx6VfynTIHRo9CZ0qGrEqz7o8GK1vWhlfq3T5M=
 da64f68730cf1c42c06919578e70d8bc01041051 0 iQEcBAABAgAGBQJPp8OUAAoJEIP+FMlX6CvZRkEIAKp5iVEADZyijVw0Jwj1vUWKqHJYVONzNjzRcnavWAEzsuwbAxQ6QfMJIai2ThjF79M2w7fPXY03S/vCV4/bXVE9R9s2/IUmS9B6pK+DAhw3ExuNUfsxq9UZd3Iul6hWifjjouYnBmgUtpF7O5z4pfQ+r1+z58FpIYPrv39NARt5YW7tcPeUJh4gOJ0ugORc5CclZqLLiljjIbVY6DN+jJDzjqCAwbWLGbkVw4kEGAeWI6aP3/5ZDpnk9Yytp9GpZ8d3BpmlHaR/kY6xepmZUqBPFGKUGY437+1jKWGgUYPLt2RC0S88W4iLRW6b9HXd7u3bhrn36ERz8XZ10KqjH7A=
+acbd3617691397911f34e4574d03385c08aec900 0 iQEcBAABAgAGBQJP3zbaAAoJEIP+FMlX6CvZoMUH/1TQcdw+e/7BmxtXBnMIrpiTJ7/tffSBYurcoQFq1cTaJJgz5in8iq1JWHgru/ToYQ9PaWY0wVQcb1Yj40rCGNnASlSzQqgRQbYMmZpKd0+TESDtMkl6q1FXECrs8ag/HMHwkVYsgdAEmQ/7IouRK4kBOXXzSWhMRU24YkHdJAnQCcXD9L99Yjmrr5oxF/fgVG7WnhfTGlhpu7FaUeWlDjBRlIuw6HeNnXMwubAn569dGXyPdwJnbU0nCLRrQGjQn7DsmeN25gL4R5Pz+uhp4eeGB7ORYT/mj5+xeS2Cjb3XfptV3qAW2FJVYRLit7lp5cmsKvtBnr8mAO8GS0R+8Pg=

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14: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 1SgzfC-00027z-DP; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfB-00027g-C9
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:13 +0000
Received: from [85.158.139.83:63010] by server-5.bemta-5.messagelabs.com id
	19/F4-02722-C3090EF4; Tue, 19 Jun 2012 14:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1340117050!24495594!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22299 invoked from network); 19 Jun 2012 14:44:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0008Ik-IO
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0003xy-GY
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Message-Id: <E1Sgzf8-0003xy-GY@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added signature for changeset
	acbd36176913
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028637 -3600
# Node ID 11dfb8e06343c1a8b3c013e7973c78b9667b9fa8
# Parent  e8ded2fee76f7e3a0eb0a3edd182ba15df7431cc
Added signature for changeset acbd36176913
---


diff -r e8ded2fee76f -r 11dfb8e06343 .hgsigs
--- a/.hgsigs	Mon Jun 18 15:10:22 2012 +0100
+++ b/.hgsigs	Mon Jun 18 15:10:37 2012 +0100
@@ -16,3 +16,4 @@ 3e6a3bf83935cc2460707b94ef2801bb6f19d581
 24041ed83728ac6c26d3c32d29d7d08eb8433149 0 iQEcBAABAgAGBQJOjxDqAAoJEIP+FMlX6CvZohIH/2krgh6rTz6hjsv6HOFWQkekqHjZyyQBgdl3tfgSN/vSd3rJPN6mvaYjh8ZltmBbcHcRCmriTr7KK9e6kOChU7hyTCBDmtGxNN5TgMoAf27pSMrFN1HvK0ohQzGXvqKLAepTXW2ew+Abno3OgKRwUMpQJVlq+ZUCuqKODYI9nRE10XV6ORAejgE5mDYNn3BbvcI07Cjmqgm7bJzi5Hv0wzscPuJxQjz4vrJ+5ne65TYOzFPNkIFKeRETP+Shd9Gkw2/w9sbzQ2hzTH/02sUrsxolXD2wexfxgVz07rTe7qgbqKruCBOPtbcnGMAbs3e5NB7V6H3HnkTRtHQ4BosUMnE=
 3eca5bf65e6cca881d599c68f2305f865e0f9fd0 0 iQEcBAABAgAGBQJOoE3xAAoJEIP+FMlX6CvZ0P4IALamOXJi4s9OzfutsjD//V5QYU972Y+NxBo2j7VNKnRaFwZ57RbxLE8dzsAufvxx/886ScyvdehAfWkpqhU+brLfKNftG54Bm3DFd+mDCdcTvHOGkKw768YUPBNjOhQZ8voVSnalrQaOlbibluRTYGK1Y4lcWXwP8SSCCR7bpm8VLrSKQoatiaPtc/OxBO+9UOlHFUR2tWt5YY4a5NczaXJ2xGERMnOssE83GjxSD/07+y9aDLNjnQiYqQfSkF46Gv4s94hPv8KeHEiGDMoZF/YqHr+4YxDCt8y39TXiQfT67O3o9xx6VfynTIHRo9CZ0qGrEqz7o8GK1vWhlfq3T5M=
 da64f68730cf1c42c06919578e70d8bc01041051 0 iQEcBAABAgAGBQJPp8OUAAoJEIP+FMlX6CvZRkEIAKp5iVEADZyijVw0Jwj1vUWKqHJYVONzNjzRcnavWAEzsuwbAxQ6QfMJIai2ThjF79M2w7fPXY03S/vCV4/bXVE9R9s2/IUmS9B6pK+DAhw3ExuNUfsxq9UZd3Iul6hWifjjouYnBmgUtpF7O5z4pfQ+r1+z58FpIYPrv39NARt5YW7tcPeUJh4gOJ0ugORc5CclZqLLiljjIbVY6DN+jJDzjqCAwbWLGbkVw4kEGAeWI6aP3/5ZDpnk9Yytp9GpZ8d3BpmlHaR/kY6xepmZUqBPFGKUGY437+1jKWGgUYPLt2RC0S88W4iLRW6b9HXd7u3bhrn36ERz8XZ10KqjH7A=
+acbd3617691397911f34e4574d03385c08aec900 0 iQEcBAABAgAGBQJP3zbaAAoJEIP+FMlX6CvZoMUH/1TQcdw+e/7BmxtXBnMIrpiTJ7/tffSBYurcoQFq1cTaJJgz5in8iq1JWHgru/ToYQ9PaWY0wVQcb1Yj40rCGNnASlSzQqgRQbYMmZpKd0+TESDtMkl6q1FXECrs8ag/HMHwkVYsgdAEmQ/7IouRK4kBOXXzSWhMRU24YkHdJAnQCcXD9L99Yjmrr5oxF/fgVG7WnhfTGlhpu7FaUeWlDjBRlIuw6HeNnXMwubAn569dGXyPdwJnbU0nCLRrQGjQn7DsmeN25gL4R5Pz+uhp4eeGB7ORYT/mj5+xeS2Cjb3XfptV3qAW2FJVYRLit7lp5cmsKvtBnr8mAO8GS0R+8Pg=

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgzfC-00027p-8r; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfA-00027b-HX
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:12 +0000
Received: from [85.158.138.51:58685] by server-10.bemta-3.messagelabs.com id
	15/6D-01753-B3090EF4; Tue, 19 Jun 2012 14:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-174.messagelabs.com!1340117049!19556945!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3165 invoked from network); 19 Jun 2012 14:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0008Ie-Li
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0003xU-AO
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:09 +0000
Message-Id: <E1Sgzf7-0003xU-AO@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to 4.1.3-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028615 -3600
# Node ID acbd3617691397911f34e4574d03385c08aec900
# Parent  a9c0a89c08f2a1c92f64f001b653d7c02fbc852c
Update Xen version to 4.1.3-rc2
---


diff -r a9c0a89c08f2 -r acbd36176913 Config.mk
--- a/Config.mk	Tue Jun 12 11:42:57 2012 +0100
+++ b/Config.mk	Mon Jun 18 15:10:15 2012 +0100
@@ -179,7 +179,7 @@ endif
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.1.3-rc1
+QEMU_TAG ?= xen-4.1.3-rc2
 # Mon Apr 2 17:55:05 2012 +0100
 # qemu-xen-traditional: QDISK fixes
 
diff -r a9c0a89c08f2 -r acbd36176913 xen/Makefile
--- a/xen/Makefile	Tue Jun 12 11:42:57 2012 +0100
+++ b/xen/Makefile	Mon Jun 18 15:10:15 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgzfC-00027p-8r; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfA-00027b-HX
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:12 +0000
Received: from [85.158.138.51:58685] by server-10.bemta-3.messagelabs.com id
	15/6D-01753-B3090EF4; Tue, 19 Jun 2012 14:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-174.messagelabs.com!1340117049!19556945!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3165 invoked from network); 19 Jun 2012 14:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0008Ie-Li
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0003xU-AO
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:09 +0000
Message-Id: <E1Sgzf7-0003xU-AO@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to 4.1.3-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028615 -3600
# Node ID acbd3617691397911f34e4574d03385c08aec900
# Parent  a9c0a89c08f2a1c92f64f001b653d7c02fbc852c
Update Xen version to 4.1.3-rc2
---


diff -r a9c0a89c08f2 -r acbd36176913 Config.mk
--- a/Config.mk	Tue Jun 12 11:42:57 2012 +0100
+++ b/Config.mk	Mon Jun 18 15:10:15 2012 +0100
@@ -179,7 +179,7 @@ endif
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.1.3-rc1
+QEMU_TAG ?= xen-4.1.3-rc2
 # Mon Apr 2 17:55:05 2012 +0100
 # qemu-xen-traditional: QDISK fixes
 
diff -r a9c0a89c08f2 -r acbd36176913 xen/Makefile
--- a/xen/Makefile	Tue Jun 12 11:42:57 2012 +0100
+++ b/xen/Makefile	Mon Jun 18 15:10:15 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgzfC-00027u-BB; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfA-00027b-Vo
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:13 +0000
Received: from [85.158.138.51:58733] by server-10.bemta-3.messagelabs.com id
	AD/6D-01753-C3090EF4; Tue, 19 Jun 2012 14:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1340117050!28464994!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9768 invoked from network); 19 Jun 2012 14:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0008Ih-CQ
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0003xj-W4
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Message-Id: <E1Sgzf7-0003xj-W4@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added tag 4.1.3-rc2 for changeset
	acbd36176913
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028622 -3600
# Node ID e8ded2fee76f7e3a0eb0a3edd182ba15df7431cc
# Parent  acbd3617691397911f34e4574d03385c08aec900
Added tag 4.1.3-rc2 for changeset acbd36176913
---


diff -r acbd36176913 -r e8ded2fee76f .hgtags
--- a/.hgtags	Mon Jun 18 15:10:15 2012 +0100
+++ b/.hgtags	Mon Jun 18 15:10:22 2012 +0100
@@ -63,3 +63,4 @@ 3e6a3bf83935cc2460707b94ef2801bb6f19d581
 24041ed83728ac6c26d3c32d29d7d08eb8433149 4.1.2-rc3
 3eca5bf65e6cca881d599c68f2305f865e0f9fd0 RELEASE-4.1.2
 da64f68730cf1c42c06919578e70d8bc01041051 4.1.3-rc1
+acbd3617691397911f34e4574d03385c08aec900 4.1.3-rc2

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

From xen-changelog-bounces@lists.xen.org Tue Jun 19 14:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 19 Jun 2012 14:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SgzfC-00027u-BB; Tue, 19 Jun 2012 14:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SgzfA-00027b-Vo
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:13 +0000
Received: from [85.158.138.51:58733] by server-10.bemta-3.messagelabs.com id
	AD/6D-01753-C3090EF4; Tue, 19 Jun 2012 14:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1340117050!28464994!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9768 invoked from network); 19 Jun 2012 14:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	19 Jun 2012 14:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf8-0008Ih-CQ
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sgzf7-0003xj-W4
	for xen-changelog@lists.xensource.com; Tue, 19 Jun 2012 14:44:10 +0000
Message-Id: <E1Sgzf7-0003xj-W4@xenbits.xen.org>
Date: Tue, 19 Jun 2012 14:44:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added tag 4.1.3-rc2 for changeset
	acbd36176913
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340028622 -3600
# Node ID e8ded2fee76f7e3a0eb0a3edd182ba15df7431cc
# Parent  acbd3617691397911f34e4574d03385c08aec900
Added tag 4.1.3-rc2 for changeset acbd36176913
---


diff -r acbd36176913 -r e8ded2fee76f .hgtags
--- a/.hgtags	Mon Jun 18 15:10:15 2012 +0100
+++ b/.hgtags	Mon Jun 18 15:10:22 2012 +0100
@@ -63,3 +63,4 @@ 3e6a3bf83935cc2460707b94ef2801bb6f19d581
 24041ed83728ac6c26d3c32d29d7d08eb8433149 4.1.2-rc3
 3eca5bf65e6cca881d599c68f2305f865e0f9fd0 RELEASE-4.1.2
 da64f68730cf1c42c06919578e70d8bc01041051 4.1.3-rc1
+acbd3617691397911f34e4574d03385c08aec900 4.1.3-rc2

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 10:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 10: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 1Si0pf-00031j-62; Fri, 22 Jun 2012 10:11:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pd-00031R-IP
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:14 +0000
Received: from [85.158.139.83:37814] by server-7.bemta-5.messagelabs.com id
	D2/60-28276-0C444EF4; Fri, 22 Jun 2012 10:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1340359868!26261514!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21627 invoked from network); 22 Jun 2012 10:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 10:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pY-0000Jy-BM
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pY-0003j2-2P
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:08 +0000
Message-Id: <E1Si0pY-0003j2-2P@xenbits.xen.org>
Date: Fri, 22 Jun 2012 10:11:07 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86: Make asmlinkage explicitly a
	no-op, and avoid usage in arch/x86
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181640 -3600
# Node ID ffd1f786a7b502455abe03c47d76985143e38b8f
# Parent  78fa5ae882ffc5b29385eb823f59d197fdd3ad8b
x86: Make asmlinkage explicitly a no-op, and avoid usage in arch/x86

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24511:a141f6d64916
xen-unstable date:        Sun Jan 15 22:02:35 2012 +0000
---


diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/acpi/power.c	Wed Jun 20 09:40:40 2012 +0100
@@ -331,7 +331,7 @@ static void tboot_sleep(u8 sleep_state)
 }
 
 /* System is really put into sleep state by this stub */
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
 {
     acpi_status status;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:40:40 2012 +0100
@@ -38,7 +38,7 @@ void svm_asid_init(struct cpuinfo_x86 *c
  * Called directly before VMRUN.  Checks if the VCPU needs a new ASID,
  * assigns it, and if required, issues required TLB flushes.
  */
-asmlinkage void svm_asid_handle_vmrun(void)
+void svm_asid_handle_vmrun(void)
 {
     struct vcpu *curr = current;
     bool_t need_flush = hvm_asid_handle_vmenter();
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:40:40 2012 +0100
@@ -112,7 +112,7 @@ static void enable_intr_window(struct vc
     vmcb->general1_intercepts |= GENERAL1_INTERCEPT_VINTR;
 }
 
-asmlinkage void svm_intr_assist(void) 
+void svm_intr_assist(void) 
 {
     struct vcpu *v = current;
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:40:40 2012 +0100
@@ -1387,7 +1387,7 @@ static struct hvm_function_table __read_
     .set_rdtsc_exiting    = svm_set_rdtsc_exiting
 };
 
-asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
+void svm_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason;
     struct vcpu *v = current;
@@ -1643,7 +1643,7 @@ asmlinkage void svm_vmexit_handler(struc
         (vlapic_get_reg(vcpu_vlapic(v), APIC_TASKPRI) & 0xFF) >> 4;
 }
 
-asmlinkage void svm_trace_vmentry(void)
+void svm_trace_vmentry(void)
 {
     HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/vmx/intr.c
--- a/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:40:40 2012 +0100
@@ -110,7 +110,7 @@ static void enable_intr_window(struct vc
     }
 }
 
-asmlinkage void vmx_intr_assist(void)
+void vmx_intr_assist(void)
 {
     struct hvm_intack intack;
     struct vcpu *v = current;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:40:40 2012 +0100
@@ -2189,7 +2189,7 @@ static void vmx_failed_vmentry(unsigned 
     domain_crash(curr->domain);
 }
 
-asmlinkage void vmx_enter_realmode(struct cpu_user_regs *regs)
+void vmx_enter_realmode(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -2268,7 +2268,7 @@ err:
     return -1;
 }
 
-asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
+void vmx_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason, idtv_info, intr_info = 0, vector = 0;
     unsigned long exit_qualification, inst_len = 0;
@@ -2647,7 +2647,7 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_vmenter_helper(void)
+void vmx_vmenter_helper(void)
 {
     struct vcpu *curr = current;
     u32 new_asid, old_asid;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/irq.c	Wed Jun 20 09:40:40 2012 +0100
@@ -515,7 +515,7 @@ void irq_set_affinity(int irq, cpumask_t
 
 DEFINE_PER_CPU(unsigned int, irq_count);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs)
+void do_IRQ(struct cpu_user_regs *regs)
 {
     struct irqaction *action;
     uint32_t          tsc_in;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/trace.c
--- a/xen/arch/x86/trace.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/trace.c	Wed Jun 20 09:40:40 2012 +0100
@@ -11,7 +11,7 @@
 #define TRC_64_FLAG 0
 #endif
 
-asmlinkage void trace_hypercall(void)
+void trace_hypercall(void)
 {
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -89,8 +89,8 @@ idt_entry_t idt_table[IDT_ENTRIES];
 idt_entry_t *idt_tables[NR_CPUS] __read_mostly;
 
 #define DECLARE_TRAP_HANDLER(_name)                     \
-asmlinkage void _name(void);                            \
-asmlinkage void do_ ## _name(struct cpu_user_regs *regs)
+void _name(void);                                       \
+void do_ ## _name(struct cpu_user_regs *regs)
 
 DECLARE_TRAP_HANDLER(divide_error);
 DECLARE_TRAP_HANDLER(debug);
@@ -405,7 +405,7 @@ static char *trapstr(int trapnr)
  * are disabled). In such situations we can't do much that is safe. We try to
  * print out some tracing and then we just spin.
  */
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
+void fatal_trap(int trapnr, struct cpu_user_regs *regs)
 {
     static DEFINE_PER_CPU(char, depth);
 
@@ -519,7 +519,7 @@ static unsigned int check_guest_io_break
  * Called from asm to set up the MCE trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_machinecheck_trapbounce(void)
+int set_guest_machinecheck_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -533,7 +533,7 @@ asmlinkage int set_guest_machinecheck_tr
  * Called from asm to set up the NMI trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_nmi_trapbounce(void)
+int set_guest_nmi_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -581,13 +581,13 @@ static inline void do_trap(
 }
 
 #define DO_ERROR_NOCODE(trapnr, name)                   \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 0);                           \
 }
 
 #define DO_ERROR(trapnr, name)                          \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 1);                           \
 }
@@ -904,7 +904,7 @@ static int emulate_forced_invalid_op(str
     return EXCRET_fault_fixed;
 }
 
-asmlinkage void do_invalid_op(struct cpu_user_regs *regs)
+void do_invalid_op(struct cpu_user_regs *regs)
 {
     struct bug_frame bug;
     struct bug_frame_str bug_str;
@@ -998,7 +998,7 @@ asmlinkage void do_invalid_op(struct cpu
     panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
 }
 
-asmlinkage void do_int3(struct cpu_user_regs *regs)
+void do_int3(struct cpu_user_regs *regs)
 {
     DEBUGGER_trap_entry(TRAP_int3, regs);
 
@@ -1011,7 +1011,7 @@ asmlinkage void do_int3(struct cpu_user_
     do_guest_trap(TRAP_int3, regs, 0);
 }
 
-asmlinkage void do_machine_check(struct cpu_user_regs *regs)
+void do_machine_check(struct cpu_user_regs *regs)
 {
     machine_check_vector(regs, regs->error_code);
 }
@@ -1291,7 +1291,7 @@ static int fixup_page_fault(unsigned lon
  *  Bit 3: Reserved bit violation
  *  Bit 4: Instruction fetch
  */
-asmlinkage void do_page_fault(struct cpu_user_regs *regs)
+void do_page_fault(struct cpu_user_regs *regs)
 {
     unsigned long addr, fixup;
     unsigned int error_code;
@@ -1346,7 +1346,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+void do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
@@ -2812,7 +2812,7 @@ static void emulate_gate_op(struct cpu_u
 #endif
 }
 
-asmlinkage void do_general_protection(struct cpu_user_regs *regs)
+void do_general_protection(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
     unsigned long fixup;
@@ -3087,7 +3087,7 @@ static int dummy_nmi_callback(struct cpu
  
 static nmi_callback_t nmi_callback = dummy_nmi_callback;
 
-asmlinkage void do_nmi(struct cpu_user_regs *regs)
+void do_nmi(struct cpu_user_regs *regs)
 {
     unsigned int cpu = smp_processor_id();
     unsigned char reason;
@@ -3123,7 +3123,7 @@ void unset_nmi_callback(void)
     nmi_callback = dummy_nmi_callback;
 }
 
-asmlinkage void do_device_not_available(struct cpu_user_regs *regs)
+void do_device_not_available(struct cpu_user_regs *regs)
 {
     struct vcpu *curr = current;
 
@@ -3142,7 +3142,7 @@ asmlinkage void do_device_not_available(
     return;
 }
 
-asmlinkage void do_debug(struct cpu_user_regs *regs)
+void do_debug(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -3195,7 +3195,7 @@ asmlinkage void do_debug(struct cpu_user
     return;
 }
 
-asmlinkage void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
+void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
 {
 }
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -195,7 +195,7 @@ DEFINE_PER_CPU_READ_MOSTLY(struct tss_st
 static unsigned char __attribute__ ((__section__ (".bss.page_aligned")))
     boot_cpu_doublefault_space[PAGE_SIZE];
 
-asmlinkage void do_double_fault(void)
+void do_double_fault(void)
 {
     struct tss_struct *tss;
     unsigned int cpu;
@@ -301,7 +301,7 @@ static void set_task_gate(unsigned int n
 void __devinit subarch_percpu_traps_init(void)
 {
     struct tss_struct *tss = this_cpu(doublefault_tss);
-    asmlinkage int hypercall(void);
+    int hypercall(void);
 
     if ( !tss )
     {
@@ -512,7 +512,7 @@ long do_set_callbacks(unsigned long even
 
 static void hypercall_page_initialise_ring0_kernel(void *hypercall_page)
 {
-    extern asmlinkage int hypercall(void);
+    extern int hypercall(void);
     char *p;
     int i;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -23,10 +23,10 @@
 #include <asm/hvm/support.h>
 #include <public/callback.h>
 
-asmlinkage void syscall_enter(void);
-asmlinkage void sysenter_entry(void);
-asmlinkage void compat_hypercall(void);
-asmlinkage void int80_direct_trap(void);
+void syscall_enter(void);
+void sysenter_entry(void);
+void compat_hypercall(void);
+void int80_direct_trap(void);
 
 static void print_xen_info(void)
 {
@@ -215,8 +215,8 @@ void show_page_walk(unsigned long addr)
            l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
 }
 
-asmlinkage void double_fault(void);
-asmlinkage void do_double_fault(struct cpu_user_regs *regs)
+void double_fault(void);
+void do_double_fault(struct cpu_user_regs *regs)
 {
     unsigned int cpu;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/config.h	Wed Jun 20 09:40:40 2012 +0100
@@ -110,13 +110,13 @@ extern char wakeup_start[];
 extern unsigned int video_mode, video_flags;
 #endif
 
+#define asmlinkage
+
 #if defined(__x86_64__)
 
 #define CONFIG_X86_64 1
 #define CONFIG_COMPAT 1
 
-#define asmlinkage
-
 #define PML4_ENTRY_BITS  39
 #ifndef __ASSEMBLY__
 #define PML4_ENTRY_BYTES (1UL << PML4_ENTRY_BITS)
@@ -277,8 +277,6 @@ extern unsigned int video_mode, video_fl
 #define CONFIG_X86_32      1
 #define CONFIG_DOMAIN_PAGE 1
 
-#define asmlinkage __attribute__((regparm(0)))
-
 /*
  * Memory layout (high to low):                          PAE-SIZE
  *                                                       ------
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Wed Jun 20 09:40:40 2012 +0100
@@ -86,7 +86,7 @@ fastcall void smp_thermal_interrupt(stru
 fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs);
 fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs);
+void do_IRQ(struct cpu_user_regs *regs);
 
 void disable_8259A_irq(unsigned int irq);
 void enable_8259A_irq(unsigned int irq);
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/processor.h	Wed Jun 20 09:40:40 2012 +0100
@@ -538,7 +538,7 @@ void show_registers(struct cpu_user_regs
 void show_execution_state(struct cpu_user_regs *regs);
 #define dump_execution_state() run_in_exception_handler(show_execution_state)
 void show_page_walk(unsigned long addr);
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
+void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
 #ifdef CONFIG_COMPAT
 void compat_show_guest_stack(struct vcpu *, struct cpu_user_regs *, int lines);
@@ -550,7 +550,7 @@ extern void mtrr_ap_init(void);
 extern void mtrr_bp_init(void);
 
 void mcheck_init(struct cpuinfo_x86 *c);
-asmlinkage void do_machine_check(struct cpu_user_regs *regs);
+void do_machine_check(struct cpu_user_regs *regs);
 void cpu_mcheck_distribute_cmci(void);
 void cpu_mcheck_disable(void);
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/x86_32/asm_defns.h
--- a/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:40:40 2012 +0100
@@ -135,7 +135,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/x86_64/asm_defns.h
--- a/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:40:40 2012 +0100
@@ -113,7 +113,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 10:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 10: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 1Si0pf-00031j-62; Fri, 22 Jun 2012 10:11:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pd-00031R-IP
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:14 +0000
Received: from [85.158.139.83:37814] by server-7.bemta-5.messagelabs.com id
	D2/60-28276-0C444EF4; Fri, 22 Jun 2012 10:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1340359868!26261514!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21627 invoked from network); 22 Jun 2012 10:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 10:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pY-0000Jy-BM
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pY-0003j2-2P
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:08 +0000
Message-Id: <E1Si0pY-0003j2-2P@xenbits.xen.org>
Date: Fri, 22 Jun 2012 10:11:07 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86: Make asmlinkage explicitly a
	no-op, and avoid usage in arch/x86
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181640 -3600
# Node ID ffd1f786a7b502455abe03c47d76985143e38b8f
# Parent  78fa5ae882ffc5b29385eb823f59d197fdd3ad8b
x86: Make asmlinkage explicitly a no-op, and avoid usage in arch/x86

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24511:a141f6d64916
xen-unstable date:        Sun Jan 15 22:02:35 2012 +0000
---


diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/acpi/power.c	Wed Jun 20 09:40:40 2012 +0100
@@ -331,7 +331,7 @@ static void tboot_sleep(u8 sleep_state)
 }
 
 /* System is really put into sleep state by this stub */
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
 {
     acpi_status status;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:40:40 2012 +0100
@@ -38,7 +38,7 @@ void svm_asid_init(struct cpuinfo_x86 *c
  * Called directly before VMRUN.  Checks if the VCPU needs a new ASID,
  * assigns it, and if required, issues required TLB flushes.
  */
-asmlinkage void svm_asid_handle_vmrun(void)
+void svm_asid_handle_vmrun(void)
 {
     struct vcpu *curr = current;
     bool_t need_flush = hvm_asid_handle_vmenter();
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:40:40 2012 +0100
@@ -112,7 +112,7 @@ static void enable_intr_window(struct vc
     vmcb->general1_intercepts |= GENERAL1_INTERCEPT_VINTR;
 }
 
-asmlinkage void svm_intr_assist(void) 
+void svm_intr_assist(void) 
 {
     struct vcpu *v = current;
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:40:40 2012 +0100
@@ -1387,7 +1387,7 @@ static struct hvm_function_table __read_
     .set_rdtsc_exiting    = svm_set_rdtsc_exiting
 };
 
-asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
+void svm_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason;
     struct vcpu *v = current;
@@ -1643,7 +1643,7 @@ asmlinkage void svm_vmexit_handler(struc
         (vlapic_get_reg(vcpu_vlapic(v), APIC_TASKPRI) & 0xFF) >> 4;
 }
 
-asmlinkage void svm_trace_vmentry(void)
+void svm_trace_vmentry(void)
 {
     HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/vmx/intr.c
--- a/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:40:40 2012 +0100
@@ -110,7 +110,7 @@ static void enable_intr_window(struct vc
     }
 }
 
-asmlinkage void vmx_intr_assist(void)
+void vmx_intr_assist(void)
 {
     struct hvm_intack intack;
     struct vcpu *v = current;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:40:40 2012 +0100
@@ -2189,7 +2189,7 @@ static void vmx_failed_vmentry(unsigned 
     domain_crash(curr->domain);
 }
 
-asmlinkage void vmx_enter_realmode(struct cpu_user_regs *regs)
+void vmx_enter_realmode(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -2268,7 +2268,7 @@ err:
     return -1;
 }
 
-asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
+void vmx_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason, idtv_info, intr_info = 0, vector = 0;
     unsigned long exit_qualification, inst_len = 0;
@@ -2647,7 +2647,7 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_vmenter_helper(void)
+void vmx_vmenter_helper(void)
 {
     struct vcpu *curr = current;
     u32 new_asid, old_asid;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/irq.c	Wed Jun 20 09:40:40 2012 +0100
@@ -515,7 +515,7 @@ void irq_set_affinity(int irq, cpumask_t
 
 DEFINE_PER_CPU(unsigned int, irq_count);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs)
+void do_IRQ(struct cpu_user_regs *regs)
 {
     struct irqaction *action;
     uint32_t          tsc_in;
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/trace.c
--- a/xen/arch/x86/trace.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/trace.c	Wed Jun 20 09:40:40 2012 +0100
@@ -11,7 +11,7 @@
 #define TRC_64_FLAG 0
 #endif
 
-asmlinkage void trace_hypercall(void)
+void trace_hypercall(void)
 {
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -89,8 +89,8 @@ idt_entry_t idt_table[IDT_ENTRIES];
 idt_entry_t *idt_tables[NR_CPUS] __read_mostly;
 
 #define DECLARE_TRAP_HANDLER(_name)                     \
-asmlinkage void _name(void);                            \
-asmlinkage void do_ ## _name(struct cpu_user_regs *regs)
+void _name(void);                                       \
+void do_ ## _name(struct cpu_user_regs *regs)
 
 DECLARE_TRAP_HANDLER(divide_error);
 DECLARE_TRAP_HANDLER(debug);
@@ -405,7 +405,7 @@ static char *trapstr(int trapnr)
  * are disabled). In such situations we can't do much that is safe. We try to
  * print out some tracing and then we just spin.
  */
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
+void fatal_trap(int trapnr, struct cpu_user_regs *regs)
 {
     static DEFINE_PER_CPU(char, depth);
 
@@ -519,7 +519,7 @@ static unsigned int check_guest_io_break
  * Called from asm to set up the MCE trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_machinecheck_trapbounce(void)
+int set_guest_machinecheck_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -533,7 +533,7 @@ asmlinkage int set_guest_machinecheck_tr
  * Called from asm to set up the NMI trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_nmi_trapbounce(void)
+int set_guest_nmi_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -581,13 +581,13 @@ static inline void do_trap(
 }
 
 #define DO_ERROR_NOCODE(trapnr, name)                   \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 0);                           \
 }
 
 #define DO_ERROR(trapnr, name)                          \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 1);                           \
 }
@@ -904,7 +904,7 @@ static int emulate_forced_invalid_op(str
     return EXCRET_fault_fixed;
 }
 
-asmlinkage void do_invalid_op(struct cpu_user_regs *regs)
+void do_invalid_op(struct cpu_user_regs *regs)
 {
     struct bug_frame bug;
     struct bug_frame_str bug_str;
@@ -998,7 +998,7 @@ asmlinkage void do_invalid_op(struct cpu
     panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
 }
 
-asmlinkage void do_int3(struct cpu_user_regs *regs)
+void do_int3(struct cpu_user_regs *regs)
 {
     DEBUGGER_trap_entry(TRAP_int3, regs);
 
@@ -1011,7 +1011,7 @@ asmlinkage void do_int3(struct cpu_user_
     do_guest_trap(TRAP_int3, regs, 0);
 }
 
-asmlinkage void do_machine_check(struct cpu_user_regs *regs)
+void do_machine_check(struct cpu_user_regs *regs)
 {
     machine_check_vector(regs, regs->error_code);
 }
@@ -1291,7 +1291,7 @@ static int fixup_page_fault(unsigned lon
  *  Bit 3: Reserved bit violation
  *  Bit 4: Instruction fetch
  */
-asmlinkage void do_page_fault(struct cpu_user_regs *regs)
+void do_page_fault(struct cpu_user_regs *regs)
 {
     unsigned long addr, fixup;
     unsigned int error_code;
@@ -1346,7 +1346,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+void do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
@@ -2812,7 +2812,7 @@ static void emulate_gate_op(struct cpu_u
 #endif
 }
 
-asmlinkage void do_general_protection(struct cpu_user_regs *regs)
+void do_general_protection(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
     unsigned long fixup;
@@ -3087,7 +3087,7 @@ static int dummy_nmi_callback(struct cpu
  
 static nmi_callback_t nmi_callback = dummy_nmi_callback;
 
-asmlinkage void do_nmi(struct cpu_user_regs *regs)
+void do_nmi(struct cpu_user_regs *regs)
 {
     unsigned int cpu = smp_processor_id();
     unsigned char reason;
@@ -3123,7 +3123,7 @@ void unset_nmi_callback(void)
     nmi_callback = dummy_nmi_callback;
 }
 
-asmlinkage void do_device_not_available(struct cpu_user_regs *regs)
+void do_device_not_available(struct cpu_user_regs *regs)
 {
     struct vcpu *curr = current;
 
@@ -3142,7 +3142,7 @@ asmlinkage void do_device_not_available(
     return;
 }
 
-asmlinkage void do_debug(struct cpu_user_regs *regs)
+void do_debug(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -3195,7 +3195,7 @@ asmlinkage void do_debug(struct cpu_user
     return;
 }
 
-asmlinkage void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
+void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
 {
 }
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -195,7 +195,7 @@ DEFINE_PER_CPU_READ_MOSTLY(struct tss_st
 static unsigned char __attribute__ ((__section__ (".bss.page_aligned")))
     boot_cpu_doublefault_space[PAGE_SIZE];
 
-asmlinkage void do_double_fault(void)
+void do_double_fault(void)
 {
     struct tss_struct *tss;
     unsigned int cpu;
@@ -301,7 +301,7 @@ static void set_task_gate(unsigned int n
 void __devinit subarch_percpu_traps_init(void)
 {
     struct tss_struct *tss = this_cpu(doublefault_tss);
-    asmlinkage int hypercall(void);
+    int hypercall(void);
 
     if ( !tss )
     {
@@ -512,7 +512,7 @@ long do_set_callbacks(unsigned long even
 
 static void hypercall_page_initialise_ring0_kernel(void *hypercall_page)
 {
-    extern asmlinkage int hypercall(void);
+    extern int hypercall(void);
     char *p;
     int i;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:40:40 2012 +0100
@@ -23,10 +23,10 @@
 #include <asm/hvm/support.h>
 #include <public/callback.h>
 
-asmlinkage void syscall_enter(void);
-asmlinkage void sysenter_entry(void);
-asmlinkage void compat_hypercall(void);
-asmlinkage void int80_direct_trap(void);
+void syscall_enter(void);
+void sysenter_entry(void);
+void compat_hypercall(void);
+void int80_direct_trap(void);
 
 static void print_xen_info(void)
 {
@@ -215,8 +215,8 @@ void show_page_walk(unsigned long addr)
            l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
 }
 
-asmlinkage void double_fault(void);
-asmlinkage void do_double_fault(struct cpu_user_regs *regs)
+void double_fault(void);
+void do_double_fault(struct cpu_user_regs *regs)
 {
     unsigned int cpu;
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/config.h	Wed Jun 20 09:40:40 2012 +0100
@@ -110,13 +110,13 @@ extern char wakeup_start[];
 extern unsigned int video_mode, video_flags;
 #endif
 
+#define asmlinkage
+
 #if defined(__x86_64__)
 
 #define CONFIG_X86_64 1
 #define CONFIG_COMPAT 1
 
-#define asmlinkage
-
 #define PML4_ENTRY_BITS  39
 #ifndef __ASSEMBLY__
 #define PML4_ENTRY_BYTES (1UL << PML4_ENTRY_BITS)
@@ -277,8 +277,6 @@ extern unsigned int video_mode, video_fl
 #define CONFIG_X86_32      1
 #define CONFIG_DOMAIN_PAGE 1
 
-#define asmlinkage __attribute__((regparm(0)))
-
 /*
  * Memory layout (high to low):                          PAE-SIZE
  *                                                       ------
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Wed Jun 20 09:40:40 2012 +0100
@@ -86,7 +86,7 @@ fastcall void smp_thermal_interrupt(stru
 fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs);
 fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs);
+void do_IRQ(struct cpu_user_regs *regs);
 
 void disable_8259A_irq(unsigned int irq);
 void enable_8259A_irq(unsigned int irq);
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/processor.h	Wed Jun 20 09:40:40 2012 +0100
@@ -538,7 +538,7 @@ void show_registers(struct cpu_user_regs
 void show_execution_state(struct cpu_user_regs *regs);
 #define dump_execution_state() run_in_exception_handler(show_execution_state)
 void show_page_walk(unsigned long addr);
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
+void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
 #ifdef CONFIG_COMPAT
 void compat_show_guest_stack(struct vcpu *, struct cpu_user_regs *, int lines);
@@ -550,7 +550,7 @@ extern void mtrr_ap_init(void);
 extern void mtrr_bp_init(void);
 
 void mcheck_init(struct cpuinfo_x86 *c);
-asmlinkage void do_machine_check(struct cpu_user_regs *regs);
+void do_machine_check(struct cpu_user_regs *regs);
 void cpu_mcheck_distribute_cmci(void);
 void cpu_mcheck_disable(void);
 
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/x86_32/asm_defns.h
--- a/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:40:40 2012 +0100
@@ -135,7 +135,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \
diff -r 78fa5ae882ff -r ffd1f786a7b5 xen/include/asm-x86/x86_64/asm_defns.h
--- a/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:40:27 2012 +0100
+++ b/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:40:40 2012 +0100
@@ -113,7 +113,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 10:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 10: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 1Si0pf-00031e-3h; Fri, 22 Jun 2012 10:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pd-00031Q-Cj
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:13 +0000
Received: from [85.158.138.51:19694] by server-4.bemta-3.messagelabs.com id
	73/D6-17105-0C444EF4; Fri, 22 Jun 2012 10:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1340359868!24953817!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31237 invoked from network); 22 Jun 2012 10:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 10:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pX-0000Jv-Rl
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pX-0003im-Bx
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:07 +0000
Message-Id: <E1Si0pX-0003im-Bx@xenbits.xen.org>
Date: Fri, 22 Jun 2012 10:11:06 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to
	4.0.4-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181627 -3600
# Node ID 78fa5ae882ffc5b29385eb823f59d197fdd3ad8b
# Parent  e231998f4e3a0ba8d60fe254e46c3fd0306ca0f1
Update Xen version to 4.0.4-rc3-pre
---


diff -r e231998f4e3a -r 78fa5ae882ff xen/Makefile
--- a/xen/Makefile	Mon Jun 18 15:11:47 2012 +0100
+++ b/xen/Makefile	Wed Jun 20 09:40:27 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 10:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 10: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 1Si0pf-00031e-3h; Fri, 22 Jun 2012 10:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pd-00031Q-Cj
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:13 +0000
Received: from [85.158.138.51:19694] by server-4.bemta-3.messagelabs.com id
	73/D6-17105-0C444EF4; Fri, 22 Jun 2012 10:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1340359868!24953817!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31237 invoked from network); 22 Jun 2012 10:11:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 10:11:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pX-0000Jv-Rl
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si0pX-0003im-Bx
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 10:11:07 +0000
Message-Id: <E1Si0pX-0003im-Bx@xenbits.xen.org>
Date: Fri, 22 Jun 2012 10:11:06 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to
	4.0.4-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181627 -3600
# Node ID 78fa5ae882ffc5b29385eb823f59d197fdd3ad8b
# Parent  e231998f4e3a0ba8d60fe254e46c3fd0306ca0f1
Update Xen version to 4.0.4-rc3-pre
---


diff -r e231998f4e3a -r 78fa5ae882ff xen/Makefile
--- a/xen/Makefile	Mon Jun 18 15:11:47 2012 +0100
+++ b/xen/Makefile	Wed Jun 20 09:40:27 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 18:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 18: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 1Si8q6-00079m-C0; Fri, 22 Jun 2012 18:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q5-00079c-38
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:13 +0000
Received: from [85.158.138.51:3265] by server-6.bemta-3.messagelabs.com id
	A9/3A-11602-CFCB4EF4; Fri, 22 Jun 2012 18:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1340390649!19918192!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9497 invoked from network); 22 Jun 2012 18:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 18:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q1-0006Xd-AW
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q1-0000Yi-1x
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:09 +0000
Message-Id: <E1Si8q1-0000Yi-1x@xenbits.xen.org>
Date: Fri, 22 Jun 2012 18:44:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86: Make asmlinkage explicitly a
	no-op, and avoid usage in arch/x86
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181449 -3600
# Node ID ec75bfd8599cad22339420d6436fb74584f9c767
# Parent  405c651a470fe9d04bf118dd907362ec67f56719
x86: Make asmlinkage explicitly a no-op, and avoid usage in arch/x86

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24511:a141f6d64916
xen-unstable date:        Sun Jan 15 22:02:35 2012 +0000
---


diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/acpi/power.c	Wed Jun 20 09:37:29 2012 +0100
@@ -321,7 +321,7 @@ static void tboot_sleep(u8 sleep_state)
 }
 
 /* System is really put into sleep state by this stub */
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
 {
     acpi_status status;
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:37:29 2012 +0100
@@ -38,7 +38,7 @@ void svm_asid_init(struct cpuinfo_x86 *c
  * Called directly before VMRUN.  Checks if the VCPU needs a new ASID,
  * assigns it, and if required, issues required TLB flushes.
  */
-asmlinkage void svm_asid_handle_vmrun(void)
+void svm_asid_handle_vmrun(void)
 {
     struct vcpu *curr = current;
     struct vmcb_struct *vmcb = curr->arch.hvm_svm.vmcb;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:37:29 2012 +0100
@@ -116,7 +116,7 @@ static void enable_intr_window(struct vc
         vmcb, general1_intercepts | GENERAL1_INTERCEPT_VINTR);
 }
 
-asmlinkage void svm_intr_assist(void) 
+void svm_intr_assist(void) 
 {
     struct vcpu *v = current;
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:37:29 2012 +0100
@@ -1534,7 +1534,7 @@ static struct hvm_function_table __read_
     .get_insn_bytes       = svm_get_insn_bytes,
 };
 
-asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
+void svm_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason;
     struct vcpu *v = current;
@@ -1851,7 +1851,7 @@ asmlinkage void svm_vmexit_handler(struc
     vmcb_set_vintr(vmcb, intr);
 }
 
-asmlinkage void svm_trace_vmentry(void)
+void svm_trace_vmentry(void)
 {
     HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/vmx/intr.c
--- a/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:37:29 2012 +0100
@@ -109,7 +109,7 @@ static void enable_intr_window(struct vc
     }
 }
 
-asmlinkage void vmx_intr_assist(void)
+void vmx_intr_assist(void)
 {
     struct hvm_intack intack;
     struct vcpu *v = current;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:37:29 2012 +0100
@@ -2035,7 +2035,7 @@ static void vmx_failed_vmentry(unsigned 
     domain_crash(curr->domain);
 }
 
-asmlinkage void vmx_enter_realmode(struct cpu_user_regs *regs)
+void vmx_enter_realmode(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -2089,7 +2089,7 @@ static int vmx_handle_eoi_write(void)
     return 0;
 }
 
-asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
+void vmx_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason, idtv_info, intr_info = 0, vector = 0;
     unsigned long exit_qualification, inst_len = 0;
@@ -2518,7 +2518,7 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_vmenter_helper(void)
+void vmx_vmenter_helper(void)
 {
     struct vcpu *curr = current;
     u32 new_asid, old_asid;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/irq.c	Wed Jun 20 09:37:29 2012 +0100
@@ -636,7 +636,7 @@ void pirq_set_affinity(struct domain *d,
 
 DEFINE_PER_CPU(unsigned int, irq_count);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs)
+void do_IRQ(struct cpu_user_regs *regs)
 {
     struct irqaction *action;
     uint32_t          tsc_in;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/trace.c
--- a/xen/arch/x86/trace.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/trace.c	Wed Jun 20 09:37:29 2012 +0100
@@ -11,7 +11,7 @@
 #define TRC_64_FLAG 0
 #endif
 
-asmlinkage void trace_hypercall(void)
+void trace_hypercall(void)
 {
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -420,7 +420,7 @@ static char *trapstr(int trapnr)
  * are disabled). In such situations we can't do much that is safe. We try to
  * print out some tracing and then we just spin.
  */
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
+void fatal_trap(int trapnr, struct cpu_user_regs *regs)
 {
     static DEFINE_PER_CPU(char, depth);
 
@@ -534,7 +534,7 @@ static unsigned int check_guest_io_break
  * Called from asm to set up the MCE trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_machinecheck_trapbounce(void)
+int set_guest_machinecheck_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -548,7 +548,7 @@ asmlinkage int set_guest_machinecheck_tr
  * Called from asm to set up the NMI trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_nmi_trapbounce(void)
+int set_guest_nmi_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -596,13 +596,13 @@ static inline void do_trap(
 }
 
 #define DO_ERROR_NOCODE(trapnr, name)                   \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 0);                           \
 }
 
 #define DO_ERROR(trapnr, name)                          \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 1);                           \
 }
@@ -959,7 +959,7 @@ static int emulate_forced_invalid_op(str
     return EXCRET_fault_fixed;
 }
 
-asmlinkage void do_invalid_op(struct cpu_user_regs *regs)
+void do_invalid_op(struct cpu_user_regs *regs)
 {
     struct bug_frame bug;
     struct bug_frame_str bug_str;
@@ -1053,7 +1053,7 @@ asmlinkage void do_invalid_op(struct cpu
     panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
 }
 
-asmlinkage void do_int3(struct cpu_user_regs *regs)
+void do_int3(struct cpu_user_regs *regs)
 {
     DEBUGGER_trap_entry(TRAP_int3, regs);
 
@@ -1066,7 +1066,7 @@ asmlinkage void do_int3(struct cpu_user_
     do_guest_trap(TRAP_int3, regs, 0);
 }
 
-asmlinkage void do_machine_check(struct cpu_user_regs *regs)
+void do_machine_check(struct cpu_user_regs *regs)
 {
     machine_check_vector(regs, regs->error_code);
 }
@@ -1367,7 +1367,7 @@ static int fixup_page_fault(unsigned lon
  *  Bit 3: Reserved bit violation
  *  Bit 4: Instruction fetch
  */
-asmlinkage void do_page_fault(struct cpu_user_regs *regs)
+void do_page_fault(struct cpu_user_regs *regs)
 {
     unsigned long addr, fixup;
     unsigned int error_code;
@@ -1433,7 +1433,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
+void __init do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
@@ -2978,7 +2978,7 @@ static void emulate_gate_op(struct cpu_u
 #endif
 }
 
-asmlinkage void do_general_protection(struct cpu_user_regs *regs)
+void do_general_protection(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
     unsigned long fixup;
@@ -3248,7 +3248,7 @@ static int dummy_nmi_callback(struct cpu
  
 static nmi_callback_t nmi_callback = dummy_nmi_callback;
 
-asmlinkage void do_nmi(struct cpu_user_regs *regs)
+void do_nmi(struct cpu_user_regs *regs)
 {
     unsigned int cpu = smp_processor_id();
     unsigned char reason;
@@ -3284,7 +3284,7 @@ void unset_nmi_callback(void)
     nmi_callback = dummy_nmi_callback;
 }
 
-asmlinkage void do_device_not_available(struct cpu_user_regs *regs)
+void do_device_not_available(struct cpu_user_regs *regs)
 {
     struct vcpu *curr = current;
 
@@ -3325,7 +3325,7 @@ static void ler_enable(void)
     wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl | 1);
 }
 
-asmlinkage void do_debug(struct cpu_user_regs *regs)
+void do_debug(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -3378,7 +3378,7 @@ asmlinkage void do_debug(struct cpu_user
     return;
 }
 
-asmlinkage void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
+void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
 {
 }
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -20,7 +20,7 @@
 
 #include <public/callback.h>
 
-extern asmlinkage int hypercall(void);
+extern int hypercall(void);
 
 static void print_xen_info(void)
 {
@@ -229,7 +229,7 @@ static struct notifier_block cpu_doublef
     .notifier_call = cpu_doublefault_tss_callback
 };
 
-asmlinkage void do_double_fault(void)
+void do_double_fault(void)
 {
     struct tss_struct *tss;
     unsigned int cpu;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -23,10 +23,10 @@
 #include <asm/hvm/support.h>
 #include <public/callback.h>
 
-asmlinkage void syscall_enter(void);
-asmlinkage void sysenter_entry(void);
-asmlinkage void compat_hypercall(void);
-asmlinkage void int80_direct_trap(void);
+void syscall_enter(void);
+void sysenter_entry(void);
+void compat_hypercall(void);
+void int80_direct_trap(void);
 
 static void print_xen_info(void)
 {
@@ -215,8 +215,8 @@ void show_page_walk(unsigned long addr)
            l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
 }
 
-asmlinkage void double_fault(void);
-asmlinkage void do_double_fault(struct cpu_user_regs *regs)
+void double_fault(void);
+void do_double_fault(struct cpu_user_regs *regs)
 {
     unsigned int cpu;
 
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/config.h	Wed Jun 20 09:37:29 2012 +0100
@@ -110,13 +110,13 @@ extern char wakeup_start[];
 extern unsigned int video_mode, video_flags;
 #endif
 
+#define asmlinkage
+
 #if defined(__x86_64__)
 
 #define CONFIG_X86_64 1
 #define CONFIG_COMPAT 1
 
-#define asmlinkage
-
 #define PML4_ENTRY_BITS  39
 #ifndef __ASSEMBLY__
 #define PML4_ENTRY_BYTES (1UL << PML4_ENTRY_BITS)
@@ -280,8 +280,6 @@ extern unsigned int video_mode, video_fl
 #define CONFIG_X86_32      1
 #define CONFIG_DOMAIN_PAGE 1
 
-#define asmlinkage __attribute__((regparm(0)))
-
 /*
  * Memory layout (high to low):                          PAE-SIZE
  *                                                       ------
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Wed Jun 20 09:37:29 2012 +0100
@@ -97,7 +97,7 @@ fastcall void smp_thermal_interrupt(stru
 fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs);
 fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs);
+void do_IRQ(struct cpu_user_regs *regs);
 
 void disable_8259A_irq(unsigned int irq);
 void enable_8259A_irq(unsigned int irq);
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/processor.h	Wed Jun 20 09:37:29 2012 +0100
@@ -548,7 +548,7 @@ void show_registers(struct cpu_user_regs
 void show_execution_state(struct cpu_user_regs *regs);
 #define dump_execution_state() run_in_exception_handler(show_execution_state)
 void show_page_walk(unsigned long addr);
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
+void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
 #ifdef CONFIG_COMPAT
 void compat_show_guest_stack(struct vcpu *, struct cpu_user_regs *, int lines);
@@ -562,8 +562,8 @@ extern void mtrr_bp_init(void);
 void mcheck_init(struct cpuinfo_x86 *c, bool_t bsp);
 
 #define DECLARE_TRAP_HANDLER(_name)                     \
-asmlinkage void _name(void);                            \
-asmlinkage void do_ ## _name(struct cpu_user_regs *regs)
+void _name(void);                            \
+void do_ ## _name(struct cpu_user_regs *regs)
 DECLARE_TRAP_HANDLER(divide_error);
 DECLARE_TRAP_HANDLER(debug);
 DECLARE_TRAP_HANDLER(nmi);
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/x86_32/asm_defns.h
--- a/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:37:29 2012 +0100
@@ -138,7 +138,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/x86_64/asm_defns.h
--- a/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:37:29 2012 +0100
@@ -114,7 +114,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 18:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 18: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 1Si8q5-00079d-9U; Fri, 22 Jun 2012 18:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q4-00079X-3z
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:12 +0000
Received: from [85.158.138.51:19575] by server-8.bemta-3.messagelabs.com id
	6E/C0-06157-BFCB4EF4; Fri, 22 Jun 2012 18:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-174.messagelabs.com!1340390649!29037499!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20548 invoked from network); 22 Jun 2012 18:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 18:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q0-0006Xa-OO
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q0-0000YT-BP
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:08 +0000
Message-Id: <E1Si8q0-0000YT-BP@xenbits.xen.org>
Date: Fri, 22 Jun 2012 18:44:07 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to
	4.1.3-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181409 -3600
# Node ID 405c651a470fe9d04bf118dd907362ec67f56719
# Parent  11dfb8e06343c1a8b3c013e7973c78b9667b9fa8
Update Xen version to 4.1.3-rc3-pre
---


diff -r 11dfb8e06343 -r 405c651a470f xen/Makefile
--- a/xen/Makefile	Mon Jun 18 15:10:37 2012 +0100
+++ b/xen/Makefile	Wed Jun 20 09:36:49 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 18:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 18: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 1Si8q5-00079d-9U; Fri, 22 Jun 2012 18:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q4-00079X-3z
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:12 +0000
Received: from [85.158.138.51:19575] by server-8.bemta-3.messagelabs.com id
	6E/C0-06157-BFCB4EF4; Fri, 22 Jun 2012 18:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-174.messagelabs.com!1340390649!29037499!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20548 invoked from network); 22 Jun 2012 18:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 18:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q0-0006Xa-OO
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q0-0000YT-BP
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:08 +0000
Message-Id: <E1Si8q0-0000YT-BP@xenbits.xen.org>
Date: Fri, 22 Jun 2012 18:44:07 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to
	4.1.3-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181409 -3600
# Node ID 405c651a470fe9d04bf118dd907362ec67f56719
# Parent  11dfb8e06343c1a8b3c013e7973c78b9667b9fa8
Update Xen version to 4.1.3-rc3-pre
---


diff -r 11dfb8e06343 -r 405c651a470f xen/Makefile
--- a/xen/Makefile	Mon Jun 18 15:10:37 2012 +0100
+++ b/xen/Makefile	Wed Jun 20 09:36:49 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 18:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 18: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 1Si8q6-00079m-C0; Fri, 22 Jun 2012 18:44:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q5-00079c-38
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:13 +0000
Received: from [85.158.138.51:3265] by server-6.bemta-3.messagelabs.com id
	A9/3A-11602-CFCB4EF4; Fri, 22 Jun 2012 18:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1340390649!19918192!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9497 invoked from network); 22 Jun 2012 18:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	22 Jun 2012 18:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q1-0006Xd-AW
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Si8q1-0000Yi-1x
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 18:44:09 +0000
Message-Id: <E1Si8q1-0000Yi-1x@xenbits.xen.org>
Date: Fri, 22 Jun 2012 18:44:08 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] x86: Make asmlinkage explicitly a
	no-op, and avoid usage in arch/x86
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1340181449 -3600
# Node ID ec75bfd8599cad22339420d6436fb74584f9c767
# Parent  405c651a470fe9d04bf118dd907362ec67f56719
x86: Make asmlinkage explicitly a no-op, and avoid usage in arch/x86

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24511:a141f6d64916
xen-unstable date:        Sun Jan 15 22:02:35 2012 +0000
---


diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/acpi/power.c	Wed Jun 20 09:37:29 2012 +0100
@@ -321,7 +321,7 @@ static void tboot_sleep(u8 sleep_state)
 }
 
 /* System is really put into sleep state by this stub */
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
 {
     acpi_status status;
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 20 09:37:29 2012 +0100
@@ -38,7 +38,7 @@ void svm_asid_init(struct cpuinfo_x86 *c
  * Called directly before VMRUN.  Checks if the VCPU needs a new ASID,
  * assigns it, and if required, issues required TLB flushes.
  */
-asmlinkage void svm_asid_handle_vmrun(void)
+void svm_asid_handle_vmrun(void)
 {
     struct vcpu *curr = current;
     struct vmcb_struct *vmcb = curr->arch.hvm_svm.vmcb;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c	Wed Jun 20 09:37:29 2012 +0100
@@ -116,7 +116,7 @@ static void enable_intr_window(struct vc
         vmcb, general1_intercepts | GENERAL1_INTERCEPT_VINTR);
 }
 
-asmlinkage void svm_intr_assist(void) 
+void svm_intr_assist(void) 
 {
     struct vcpu *v = current;
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jun 20 09:37:29 2012 +0100
@@ -1534,7 +1534,7 @@ static struct hvm_function_table __read_
     .get_insn_bytes       = svm_get_insn_bytes,
 };
 
-asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
+void svm_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason;
     struct vcpu *v = current;
@@ -1851,7 +1851,7 @@ asmlinkage void svm_vmexit_handler(struc
     vmcb_set_vintr(vmcb, intr);
 }
 
-asmlinkage void svm_trace_vmentry(void)
+void svm_trace_vmentry(void)
 {
     HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/vmx/intr.c
--- a/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/intr.c	Wed Jun 20 09:37:29 2012 +0100
@@ -109,7 +109,7 @@ static void enable_intr_window(struct vc
     }
 }
 
-asmlinkage void vmx_intr_assist(void)
+void vmx_intr_assist(void)
 {
     struct hvm_intack intack;
     struct vcpu *v = current;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jun 20 09:37:29 2012 +0100
@@ -2035,7 +2035,7 @@ static void vmx_failed_vmentry(unsigned 
     domain_crash(curr->domain);
 }
 
-asmlinkage void vmx_enter_realmode(struct cpu_user_regs *regs)
+void vmx_enter_realmode(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -2089,7 +2089,7 @@ static int vmx_handle_eoi_write(void)
     return 0;
 }
 
-asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
+void vmx_vmexit_handler(struct cpu_user_regs *regs)
 {
     unsigned int exit_reason, idtv_info, intr_info = 0, vector = 0;
     unsigned long exit_qualification, inst_len = 0;
@@ -2518,7 +2518,7 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_vmenter_helper(void)
+void vmx_vmenter_helper(void)
 {
     struct vcpu *curr = current;
     u32 new_asid, old_asid;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/irq.c	Wed Jun 20 09:37:29 2012 +0100
@@ -636,7 +636,7 @@ void pirq_set_affinity(struct domain *d,
 
 DEFINE_PER_CPU(unsigned int, irq_count);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs)
+void do_IRQ(struct cpu_user_regs *regs)
 {
     struct irqaction *action;
     uint32_t          tsc_in;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/trace.c
--- a/xen/arch/x86/trace.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/trace.c	Wed Jun 20 09:37:29 2012 +0100
@@ -11,7 +11,7 @@
 #define TRC_64_FLAG 0
 #endif
 
-asmlinkage void trace_hypercall(void)
+void trace_hypercall(void)
 {
     struct cpu_user_regs *regs = guest_cpu_user_regs();
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -420,7 +420,7 @@ static char *trapstr(int trapnr)
  * are disabled). In such situations we can't do much that is safe. We try to
  * print out some tracing and then we just spin.
  */
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
+void fatal_trap(int trapnr, struct cpu_user_regs *regs)
 {
     static DEFINE_PER_CPU(char, depth);
 
@@ -534,7 +534,7 @@ static unsigned int check_guest_io_break
  * Called from asm to set up the MCE trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_machinecheck_trapbounce(void)
+int set_guest_machinecheck_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -548,7 +548,7 @@ asmlinkage int set_guest_machinecheck_tr
  * Called from asm to set up the NMI trapbounce info.
  * Returns 0 if no callback is set up, else 1.
  */
-asmlinkage int set_guest_nmi_trapbounce(void)
+int set_guest_nmi_trapbounce(void)
 {
     struct vcpu *v = current;
     struct trap_bounce *tb = &v->arch.trap_bounce;
@@ -596,13 +596,13 @@ static inline void do_trap(
 }
 
 #define DO_ERROR_NOCODE(trapnr, name)                   \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 0);                           \
 }
 
 #define DO_ERROR(trapnr, name)                          \
-asmlinkage void do_##name(struct cpu_user_regs *regs)   \
+void do_##name(struct cpu_user_regs *regs)   \
 {                                                       \
     do_trap(trapnr, regs, 1);                           \
 }
@@ -959,7 +959,7 @@ static int emulate_forced_invalid_op(str
     return EXCRET_fault_fixed;
 }
 
-asmlinkage void do_invalid_op(struct cpu_user_regs *regs)
+void do_invalid_op(struct cpu_user_regs *regs)
 {
     struct bug_frame bug;
     struct bug_frame_str bug_str;
@@ -1053,7 +1053,7 @@ asmlinkage void do_invalid_op(struct cpu
     panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
 }
 
-asmlinkage void do_int3(struct cpu_user_regs *regs)
+void do_int3(struct cpu_user_regs *regs)
 {
     DEBUGGER_trap_entry(TRAP_int3, regs);
 
@@ -1066,7 +1066,7 @@ asmlinkage void do_int3(struct cpu_user_
     do_guest_trap(TRAP_int3, regs, 0);
 }
 
-asmlinkage void do_machine_check(struct cpu_user_regs *regs)
+void do_machine_check(struct cpu_user_regs *regs)
 {
     machine_check_vector(regs, regs->error_code);
 }
@@ -1367,7 +1367,7 @@ static int fixup_page_fault(unsigned lon
  *  Bit 3: Reserved bit violation
  *  Bit 4: Instruction fetch
  */
-asmlinkage void do_page_fault(struct cpu_user_regs *regs)
+void do_page_fault(struct cpu_user_regs *regs)
 {
     unsigned long addr, fixup;
     unsigned int error_code;
@@ -1433,7 +1433,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
+void __init do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
@@ -2978,7 +2978,7 @@ static void emulate_gate_op(struct cpu_u
 #endif
 }
 
-asmlinkage void do_general_protection(struct cpu_user_regs *regs)
+void do_general_protection(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
     unsigned long fixup;
@@ -3248,7 +3248,7 @@ static int dummy_nmi_callback(struct cpu
  
 static nmi_callback_t nmi_callback = dummy_nmi_callback;
 
-asmlinkage void do_nmi(struct cpu_user_regs *regs)
+void do_nmi(struct cpu_user_regs *regs)
 {
     unsigned int cpu = smp_processor_id();
     unsigned char reason;
@@ -3284,7 +3284,7 @@ void unset_nmi_callback(void)
     nmi_callback = dummy_nmi_callback;
 }
 
-asmlinkage void do_device_not_available(struct cpu_user_regs *regs)
+void do_device_not_available(struct cpu_user_regs *regs)
 {
     struct vcpu *curr = current;
 
@@ -3325,7 +3325,7 @@ static void ler_enable(void)
     wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl | 1);
 }
 
-asmlinkage void do_debug(struct cpu_user_regs *regs)
+void do_debug(struct cpu_user_regs *regs)
 {
     struct vcpu *v = current;
 
@@ -3378,7 +3378,7 @@ asmlinkage void do_debug(struct cpu_user
     return;
 }
 
-asmlinkage void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
+void do_spurious_interrupt_bug(struct cpu_user_regs *regs)
 {
 }
 
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/x86_32/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -20,7 +20,7 @@
 
 #include <public/callback.h>
 
-extern asmlinkage int hypercall(void);
+extern int hypercall(void);
 
 static void print_xen_info(void)
 {
@@ -229,7 +229,7 @@ static struct notifier_block cpu_doublef
     .notifier_call = cpu_doublefault_tss_callback
 };
 
-asmlinkage void do_double_fault(void)
+void do_double_fault(void)
 {
     struct tss_struct *tss;
     unsigned int cpu;
diff -r 405c651a470f -r ec75bfd8599c xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/arch/x86/x86_64/traps.c	Wed Jun 20 09:37:29 2012 +0100
@@ -23,10 +23,10 @@
 #include <asm/hvm/support.h>
 #include <public/callback.h>
 
-asmlinkage void syscall_enter(void);
-asmlinkage void sysenter_entry(void);
-asmlinkage void compat_hypercall(void);
-asmlinkage void int80_direct_trap(void);
+void syscall_enter(void);
+void sysenter_entry(void);
+void compat_hypercall(void);
+void int80_direct_trap(void);
 
 static void print_xen_info(void)
 {
@@ -215,8 +215,8 @@ void show_page_walk(unsigned long addr)
            l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
 }
 
-asmlinkage void double_fault(void);
-asmlinkage void do_double_fault(struct cpu_user_regs *regs)
+void double_fault(void);
+void do_double_fault(struct cpu_user_regs *regs)
 {
     unsigned int cpu;
 
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/config.h	Wed Jun 20 09:37:29 2012 +0100
@@ -110,13 +110,13 @@ extern char wakeup_start[];
 extern unsigned int video_mode, video_flags;
 #endif
 
+#define asmlinkage
+
 #if defined(__x86_64__)
 
 #define CONFIG_X86_64 1
 #define CONFIG_COMPAT 1
 
-#define asmlinkage
-
 #define PML4_ENTRY_BITS  39
 #ifndef __ASSEMBLY__
 #define PML4_ENTRY_BYTES (1UL << PML4_ENTRY_BITS)
@@ -280,8 +280,6 @@ extern unsigned int video_mode, video_fl
 #define CONFIG_X86_32      1
 #define CONFIG_DOMAIN_PAGE 1
 
-#define asmlinkage __attribute__((regparm(0)))
-
 /*
  * Memory layout (high to low):                          PAE-SIZE
  *                                                       ------
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Wed Jun 20 09:37:29 2012 +0100
@@ -97,7 +97,7 @@ fastcall void smp_thermal_interrupt(stru
 fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs);
 fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs);
 
-asmlinkage void do_IRQ(struct cpu_user_regs *regs);
+void do_IRQ(struct cpu_user_regs *regs);
 
 void disable_8259A_irq(unsigned int irq);
 void enable_8259A_irq(unsigned int irq);
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/processor.h	Wed Jun 20 09:37:29 2012 +0100
@@ -548,7 +548,7 @@ void show_registers(struct cpu_user_regs
 void show_execution_state(struct cpu_user_regs *regs);
 #define dump_execution_state() run_in_exception_handler(show_execution_state)
 void show_page_walk(unsigned long addr);
-asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
+void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
 #ifdef CONFIG_COMPAT
 void compat_show_guest_stack(struct vcpu *, struct cpu_user_regs *, int lines);
@@ -562,8 +562,8 @@ extern void mtrr_bp_init(void);
 void mcheck_init(struct cpuinfo_x86 *c, bool_t bsp);
 
 #define DECLARE_TRAP_HANDLER(_name)                     \
-asmlinkage void _name(void);                            \
-asmlinkage void do_ ## _name(struct cpu_user_regs *regs)
+void _name(void);                            \
+void do_ ## _name(struct cpu_user_regs *regs)
 DECLARE_TRAP_HANDLER(divide_error);
 DECLARE_TRAP_HANDLER(debug);
 DECLARE_TRAP_HANDLER(nmi);
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/x86_32/asm_defns.h
--- a/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jun 20 09:37:29 2012 +0100
@@ -138,7 +138,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \
diff -r 405c651a470f -r ec75bfd8599c xen/include/asm-x86/x86_64/asm_defns.h
--- a/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:36:49 2012 +0100
+++ b/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jun 20 09:37:29 2012 +0100
@@ -114,7 +114,7 @@ __asm__(                                
 #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
 
 #define BUILD_IRQ(nr)                           \
-asmlinkage void IRQ_NAME(nr);                   \
+void IRQ_NAME(nr);                   \
 __asm__(                                        \
 "\n"__ALIGN_STR"\n"                             \
 STR(IRQ) #nr "_interrupt:\n\t"                  \

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

From xen-changelog-bounces@lists.xen.org Fri Jun 22 20:33:13 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 20: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 1SiAXU-0001vR-O4; Fri, 22 Jun 2012 20:33: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 1SiAXT-0001v8-FZ
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:07 +0000
Received: from [85.158.143.35:9575] by server-1.bemta-4.messagelabs.com id
	4F/18-24392-286D4EF4; Fri, 22 Jun 2012 20:33:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1340397184!5935253!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25578 invoked from network); 22 Jun 2012 20:33:05 -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;
	22 Jun 2012 20: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 1SiAXQ-0007uT-Jk
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXQ-0003k2-8i
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:04 +0000
Date: Fri, 22 Jun 2012 20:33:04 +0000
Message-Id: <E1SiAXQ-0003k2-8i@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Fix compiler
	warnings in config.log (always return a value from main)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1a7a7a60aecd416030c57a953fb6f9619eda22a0
Author: Stefan Weil <sw@weilnetz.de>
Date:   Sat Dec 17 09:27:29 2011 +0100

    configure: Fix compiler warnings in config.log (always return a value from main)
    
    Fix several "warning: control reaches end of non-void function".
    
    upstream-commit: 75cafad74d8df3f8ea188ed355127b91c9903290
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 configure |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index b113f60..091e389 100755
--- a/configure
+++ b/configure
@@ -1082,7 +1082,7 @@ fi
 
 # check that the C compiler works.
 cat > $TMPC <<EOF
-int main(void) {}
+int main(void) { return 0; }
 EOF
 
 if compile_object ; then
@@ -2648,7 +2648,7 @@ ucontext_coroutine=no
 if test "$darwin" != "yes"; then
   cat > $TMPC << EOF
 #include <ucontext.h>
-int main(void) { makecontext(0, 0, 0); }
+int main(void) { makecontext(0, 0, 0); return 0; }
 EOF
   if compile_prog "" "" ; then
       ucontext_coroutine=yes
@@ -2661,7 +2661,7 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
-int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
+int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
@@ -2674,6 +2674,7 @@ linux_magic_h=no
 cat > $TMPC << EOF
 #include <linux/magic.h>
 int main(void) {
+  return 0;
 }
 EOF
 if compile_prog "" "" ; then
--
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 Fri Jun 22 20:33:13 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 20: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 1SiAXU-0001vR-O4; Fri, 22 Jun 2012 20:33: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 1SiAXT-0001v8-FZ
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:07 +0000
Received: from [85.158.143.35:9575] by server-1.bemta-4.messagelabs.com id
	4F/18-24392-286D4EF4; Fri, 22 Jun 2012 20:33:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1340397184!5935253!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25578 invoked from network); 22 Jun 2012 20:33:05 -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;
	22 Jun 2012 20: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 1SiAXQ-0007uT-Jk
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXQ-0003k2-8i
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:04 +0000
Date: Fri, 22 Jun 2012 20:33:04 +0000
Message-Id: <E1SiAXQ-0003k2-8i@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Fix compiler
	warnings in config.log (always return a value from main)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 1a7a7a60aecd416030c57a953fb6f9619eda22a0
Author: Stefan Weil <sw@weilnetz.de>
Date:   Sat Dec 17 09:27:29 2011 +0100

    configure: Fix compiler warnings in config.log (always return a value from main)
    
    Fix several "warning: control reaches end of non-void function".
    
    upstream-commit: 75cafad74d8df3f8ea188ed355127b91c9903290
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 configure |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index b113f60..091e389 100755
--- a/configure
+++ b/configure
@@ -1082,7 +1082,7 @@ fi
 
 # check that the C compiler works.
 cat > $TMPC <<EOF
-int main(void) {}
+int main(void) { return 0; }
 EOF
 
 if compile_object ; then
@@ -2648,7 +2648,7 @@ ucontext_coroutine=no
 if test "$darwin" != "yes"; then
   cat > $TMPC << EOF
 #include <ucontext.h>
-int main(void) { makecontext(0, 0, 0); }
+int main(void) { makecontext(0, 0, 0); return 0; }
 EOF
   if compile_prog "" "" ; then
       ucontext_coroutine=yes
@@ -2661,7 +2661,7 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
-int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
+int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
@@ -2674,6 +2674,7 @@ linux_magic_h=no
 cat > $TMPC << EOF
 #include <linux/magic.h>
 int main(void) {
+  return 0;
 }
 EOF
 if compile_prog "" "" ; then
--
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 Fri Jun 22 20:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 20:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiAXf-0001x3-Qi; Fri, 22 Jun 2012 20: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 1SiAXe-0001wj-JO
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:18 +0000
Received: from [193.109.254.147:16138] by server-10.bemta-14.messagelabs.com
	id 89/BD-05433-D86D4EF4; Fri, 22 Jun 2012 20:33:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1340397195!11105334!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6325 invoked from network); 22 Jun 2012 20:33:16 -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;
	22 Jun 2012 20:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXa-0007uW-TV
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXa-0003kY-O8
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:14 +0000
Date: Fri, 22 Jun 2012 20:33:14 +0000
Message-Id: <E1SiAXa-0003kY-O8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Fix build for
	some versions of glibc (9pfs)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4e8785001421e97c4f1c18d27ce77d717f9561d4
Author: Stefan Weil <sw@weilnetz.de>
Date:   Fri Jun 22 11:14:47 2012 +0000

    configure: Fix build for some versions of glibc (9pfs)
    
    Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
    Extend the check in configure to test both preconditions.
    
    upstream-commit: acc55ba8b1519bda27be19fad50b65d2b0c7d26d
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
---
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 091e389..85e80ca 100755
--- a/configure
+++ b/configure
@@ -2661,7 +2661,11 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
+#if !defined(AT_EMPTY_PATH)
+# error missing definition
+#else
 int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
+#endif
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
--
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 Fri Jun 22 20:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 22 Jun 2012 20:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiAXf-0001x3-Qi; Fri, 22 Jun 2012 20: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 1SiAXe-0001wj-JO
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:18 +0000
Received: from [193.109.254.147:16138] by server-10.bemta-14.messagelabs.com
	id 89/BD-05433-D86D4EF4; Fri, 22 Jun 2012 20:33:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1340397195!11105334!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6325 invoked from network); 22 Jun 2012 20:33:16 -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;
	22 Jun 2012 20:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXa-0007uW-TV
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SiAXa-0003kY-O8
	for xen-changelog@lists.xensource.com; Fri, 22 Jun 2012 20:33:14 +0000
Date: Fri, 22 Jun 2012 20:33:14 +0000
Message-Id: <E1SiAXa-0003kY-O8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] configure: Fix build for
	some versions of glibc (9pfs)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 4e8785001421e97c4f1c18d27ce77d717f9561d4
Author: Stefan Weil <sw@weilnetz.de>
Date:   Fri Jun 22 11:14:47 2012 +0000

    configure: Fix build for some versions of glibc (9pfs)
    
    Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
    Extend the check in configure to test both preconditions.
    
    upstream-commit: acc55ba8b1519bda27be19fad50b65d2b0c7d26d
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
---
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 091e389..85e80ca 100755
--- a/configure
+++ b/configure
@@ -2661,7 +2661,11 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
+#if !defined(AT_EMPTY_PATH)
+# error missing definition
+#else
 int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
+#endif
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
--
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 Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInV-0003IJ-GT; Sat, 23 Jun 2012 05:22:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0003HW-Hh
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from [85.158.143.99:46496] by server-2.bemta-4.messagelabs.com id
	0F/F4-17938-48255EF4; Sat, 23 Jun 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-216.messagelabs.com!1340428930!19081667!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1064 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0006Ca-Bl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0001Hl-8q
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Message-Id: <E1SiInS-0001Hl-8q@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: disable libvchan build on
	NetBSD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1339168942 -3600
# Node ID 1e4561d216dbd63900bf643581a57fc4bf762741
# Parent  5b61b5779fcae6c46f3ff35451772fdcb205d2ea
tools: disable libvchan build on NetBSD

NetBSD doesn't have a gntdev, so libvchan is unable to build due to
the lack of the header files gntalloc.h.

This is the error:

gcc  -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing
 -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement
 -D__XEN_TOOLS__ -MMD -MF .init.o.d -fno-optimize-sibling-calls
 -I../include -I.
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/xenstore
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/include
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/libxc
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/include  -c -o init.o init.c
 init.c:45:30: fatal error: xen/sys/gntalloc.h: No such file or directory
compilation terminated.
gmake[3]: *** [init.opic] Error 1
gmake[3]: *** Waiting for unfinished jobs....
init.c:45:30: fatal error: xen/sys/gntalloc.h: No such file or directory
compilation terminated.

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


diff -r 5b61b5779fca -r 1e4561d216db tools/Makefile
--- a/tools/Makefile	Fri Jun 08 16:09:00 2012 +0100
+++ b/tools/Makefile	Fri Jun 08 16:22:22 2012 +0100
@@ -30,7 +30,7 @@ SUBDIRS-$(CONFIG_NetBSD) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
-SUBDIRS-y += libvchan
+SUBDIRS-$(CONFIG_Linux) += libvchan
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInV-0003IJ-GT; Sat, 23 Jun 2012 05:22:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0003HW-Hh
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from [85.158.143.99:46496] by server-2.bemta-4.messagelabs.com id
	0F/F4-17938-48255EF4; Sat, 23 Jun 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-216.messagelabs.com!1340428930!19081667!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1064 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0006Ca-Bl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0001Hl-8q
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Message-Id: <E1SiInS-0001Hl-8q@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: disable libvchan build on
	NetBSD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1339168942 -3600
# Node ID 1e4561d216dbd63900bf643581a57fc4bf762741
# Parent  5b61b5779fcae6c46f3ff35451772fdcb205d2ea
tools: disable libvchan build on NetBSD

NetBSD doesn't have a gntdev, so libvchan is unable to build due to
the lack of the header files gntalloc.h.

This is the error:

gcc  -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing
 -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement
 -D__XEN_TOOLS__ -MMD -MF .init.o.d -fno-optimize-sibling-calls
 -I../include -I.
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/xenstore
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/include
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/libxc
 -I/root/xen/xen-netbsd/tools/libvchan/../../tools/include  -c -o init.o init.c
 init.c:45:30: fatal error: xen/sys/gntalloc.h: No such file or directory
compilation terminated.
gmake[3]: *** [init.opic] Error 1
gmake[3]: *** Waiting for unfinished jobs....
init.c:45:30: fatal error: xen/sys/gntalloc.h: No such file or directory
compilation terminated.

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


diff -r 5b61b5779fca -r 1e4561d216db tools/Makefile
--- a/tools/Makefile	Fri Jun 08 16:09:00 2012 +0100
+++ b/tools/Makefile	Fri Jun 08 16:22:22 2012 +0100
@@ -30,7 +30,7 @@ SUBDIRS-$(CONFIG_NetBSD) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
-SUBDIRS-y += libvchan
+SUBDIRS-$(CONFIG_Linux) += libvchan
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInV-0003IB-ED; Sat, 23 Jun 2012 05:22:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0003HW-NF
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from [85.158.143.35:54930] by server-2.bemta-4.messagelabs.com id
	CD/F4-17938-38255EF4; Sat, 23 Jun 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1340428929!5966570!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27355 invoked from network); 23 Jun 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CR-6j
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0001H2-MC
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Message-Id: <E1SiInQ-0001H2-MC@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: readnote: Add bzImage kernel
	support
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Xuesen Guo <Xuesen.Guo@hitachiconsulting.com>
# Date 1339166034 -3600
# Node ID 4d40d7a4c6f1fcdb65558adb5b85e48e4600c190
# Parent  9d1fd58ff602f5f7b8a50ea3866adfd8668e0285
tools: readnote: Add bzImage kernel support

Add the check of bzImage kernel and make it work
with RHEL 6 big zImage kernel

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


diff -r 9d1fd58ff602 -r 4d40d7a4c6f1 tools/xcutils/readnotes.c
--- a/tools/xcutils/readnotes.c	Fri Jun 08 15:26:01 2012 +0100
+++ b/tools/xcutils/readnotes.c	Fri Jun 08 15:33:54 2012 +0100
@@ -18,6 +18,48 @@
 
 static xc_interface *xch;
 
+/* According to the implemation of xc_dom_probe_bzimage_kernel() function */
+/* We add support of bzImage kernel */
+/* Copied from tools/libxc/xc_doom_bzImageloader.c */
+struct setup_header {
+	uint8_t  _pad0[0x1f1];  /* skip uninteresting stuff */
+	uint8_t  setup_sects;
+	uint16_t root_flags;
+	uint32_t syssize;
+	uint16_t ram_size;
+	uint16_t vid_mode;
+	uint16_t root_dev;
+	uint16_t boot_flag;
+	uint16_t jump;
+	uint32_t header;
+#define HDR_MAGIC  "HdrS"
+#define HDR_MAGIC_SZ 4
+	uint16_t version;
+#define VERSION(h,l) (((h)<<8) | (l))
+	uint32_t realmode_swtch;
+	uint16_t start_sys;
+	uint16_t kernel_version;
+	uint8_t  type_of_loader;
+	uint8_t  loadflags;
+	uint16_t setup_move_size;
+	uint32_t code32_start;
+	uint32_t ramdisk_image;
+	uint32_t ramdisk_size;
+	uint32_t bootsect_kludge;
+	uint16_t heap_end_ptr;
+	uint16_t _pad1;
+	uint32_t cmd_line_ptr;
+	uint32_t initrd_addr_max;
+	uint32_t kernel_alignment;
+	uint8_t  relocatable_kernel;
+	uint8_t  _pad2[3];
+	uint32_t cmdline_size;
+	uint32_t hardware_subarch;
+	uint64_t hardware_subarch_data;
+	uint32_t payload_offset;
+	uint32_t payload_length;
+} __attribute__((packed));
+
 static void print_string_note(const char *prefix, struct elf_binary *elf,
 			      const elf_note *note)
 {
@@ -131,6 +173,9 @@ int main(int argc, char **argv)
 	const elf_shdr *shdr;
 	int notes_found = 0;
 
+	struct setup_header *hdr;
+	uint64_t payload_offset, payload_length;
+
 	if (argc != 2)
 	{
 		fprintf(stderr, "Usage: readnotes <elfimage>\n");
@@ -159,13 +204,45 @@ int main(int argc, char **argv)
 		fprintf(stderr, "Unable to map %s: %s\n", f, strerror(errno));
 		return 1;
 	}
-	size = st.st_size;
+	
+	/* Check the magic of bzImage kernel */
+	hdr = (struct setup_header *)image;
+	if ( memcmp(&hdr->header, HDR_MAGIC, HDR_MAGIC_SZ) == 0 )
+	{
+		if ( hdr->version < VERSION(2,8) )
+		{
+			printf("%s: boot protocol too old (%04x)", __FUNCTION__, hdr->version);
+			return 1;
+		}
 
-	usize = xc_dom_check_gzip(xch, image, st.st_size);
+		/* upcast to 64 bits to avoid overflow */
+		/* setup_sects is u8 and so cannot overflow */
+		payload_offset = (hdr->setup_sects + 1) * 512;
+		payload_offset += hdr->payload_offset;
+		payload_length = hdr->payload_length;
+		
+		if ( payload_offset >= st.st_size )
+		{
+			printf("%s: payload offset overflow", __FUNCTION__);
+			return 1;
+		}
+		if ( (payload_offset + payload_length) > st.st_size )
+		{
+			printf("%s: payload length overflow", __FUNCTION__);
+			return 1;
+		}
+
+		image = image + payload_offset;
+		size = payload_length;
+	} else {
+		size = st.st_size;
+	}
+
+	usize = xc_dom_check_gzip(xch, image, size);
 	if (usize)
 	{
 		tmp = malloc(usize);
-		xc_dom_do_gunzip(xch, image, st.st_size, tmp, usize);
+		xc_dom_do_gunzip(xch, image, size, tmp, usize);
 		image = tmp;
 		size = usize;
 	}

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInV-0003IB-ED; Sat, 23 Jun 2012 05:22:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0003HW-NF
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from [85.158.143.35:54930] by server-2.bemta-4.messagelabs.com id
	CD/F4-17938-38255EF4; Sat, 23 Jun 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1340428929!5966570!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27355 invoked from network); 23 Jun 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CR-6j
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0001H2-MC
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Message-Id: <E1SiInQ-0001H2-MC@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: readnote: Add bzImage kernel
	support
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Xuesen Guo <Xuesen.Guo@hitachiconsulting.com>
# Date 1339166034 -3600
# Node ID 4d40d7a4c6f1fcdb65558adb5b85e48e4600c190
# Parent  9d1fd58ff602f5f7b8a50ea3866adfd8668e0285
tools: readnote: Add bzImage kernel support

Add the check of bzImage kernel and make it work
with RHEL 6 big zImage kernel

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


diff -r 9d1fd58ff602 -r 4d40d7a4c6f1 tools/xcutils/readnotes.c
--- a/tools/xcutils/readnotes.c	Fri Jun 08 15:26:01 2012 +0100
+++ b/tools/xcutils/readnotes.c	Fri Jun 08 15:33:54 2012 +0100
@@ -18,6 +18,48 @@
 
 static xc_interface *xch;
 
+/* According to the implemation of xc_dom_probe_bzimage_kernel() function */
+/* We add support of bzImage kernel */
+/* Copied from tools/libxc/xc_doom_bzImageloader.c */
+struct setup_header {
+	uint8_t  _pad0[0x1f1];  /* skip uninteresting stuff */
+	uint8_t  setup_sects;
+	uint16_t root_flags;
+	uint32_t syssize;
+	uint16_t ram_size;
+	uint16_t vid_mode;
+	uint16_t root_dev;
+	uint16_t boot_flag;
+	uint16_t jump;
+	uint32_t header;
+#define HDR_MAGIC  "HdrS"
+#define HDR_MAGIC_SZ 4
+	uint16_t version;
+#define VERSION(h,l) (((h)<<8) | (l))
+	uint32_t realmode_swtch;
+	uint16_t start_sys;
+	uint16_t kernel_version;
+	uint8_t  type_of_loader;
+	uint8_t  loadflags;
+	uint16_t setup_move_size;
+	uint32_t code32_start;
+	uint32_t ramdisk_image;
+	uint32_t ramdisk_size;
+	uint32_t bootsect_kludge;
+	uint16_t heap_end_ptr;
+	uint16_t _pad1;
+	uint32_t cmd_line_ptr;
+	uint32_t initrd_addr_max;
+	uint32_t kernel_alignment;
+	uint8_t  relocatable_kernel;
+	uint8_t  _pad2[3];
+	uint32_t cmdline_size;
+	uint32_t hardware_subarch;
+	uint64_t hardware_subarch_data;
+	uint32_t payload_offset;
+	uint32_t payload_length;
+} __attribute__((packed));
+
 static void print_string_note(const char *prefix, struct elf_binary *elf,
 			      const elf_note *note)
 {
@@ -131,6 +173,9 @@ int main(int argc, char **argv)
 	const elf_shdr *shdr;
 	int notes_found = 0;
 
+	struct setup_header *hdr;
+	uint64_t payload_offset, payload_length;
+
 	if (argc != 2)
 	{
 		fprintf(stderr, "Usage: readnotes <elfimage>\n");
@@ -159,13 +204,45 @@ int main(int argc, char **argv)
 		fprintf(stderr, "Unable to map %s: %s\n", f, strerror(errno));
 		return 1;
 	}
-	size = st.st_size;
+	
+	/* Check the magic of bzImage kernel */
+	hdr = (struct setup_header *)image;
+	if ( memcmp(&hdr->header, HDR_MAGIC, HDR_MAGIC_SZ) == 0 )
+	{
+		if ( hdr->version < VERSION(2,8) )
+		{
+			printf("%s: boot protocol too old (%04x)", __FUNCTION__, hdr->version);
+			return 1;
+		}
 
-	usize = xc_dom_check_gzip(xch, image, st.st_size);
+		/* upcast to 64 bits to avoid overflow */
+		/* setup_sects is u8 and so cannot overflow */
+		payload_offset = (hdr->setup_sects + 1) * 512;
+		payload_offset += hdr->payload_offset;
+		payload_length = hdr->payload_length;
+		
+		if ( payload_offset >= st.st_size )
+		{
+			printf("%s: payload offset overflow", __FUNCTION__);
+			return 1;
+		}
+		if ( (payload_offset + payload_length) > st.st_size )
+		{
+			printf("%s: payload length overflow", __FUNCTION__);
+			return 1;
+		}
+
+		image = image + payload_offset;
+		size = payload_length;
+	} else {
+		size = st.st_size;
+	}
+
+	usize = xc_dom_check_gzip(xch, image, size);
 	if (usize)
 	{
 		tmp = malloc(usize);
-		xc_dom_do_gunzip(xch, image, st.st_size, tmp, usize);
+		xc_dom_do_gunzip(xch, image, size, tmp, usize);
 		image = tmp;
 		size = usize;
 	}

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInW-0003IU-JE; Sat, 23 Jun 2012 05:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0003Hi-Ru
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from [85.158.138.51:38968] by server-8.bemta-3.messagelabs.com id
	76/9E-06157-38255EF4; Sat, 23 Jun 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1340428930!29162653!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25463 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CX-Vq
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0001HW-No
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Message-Id: <E1SiInR-0001HW-No@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Store VNC passwd in xenstore
	with QEMU upstream.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Anthony PERARD <anthony.perard@citrix.com>
# Date 1339168140 -3600
# Node ID 5b61b5779fcae6c46f3ff35451772fdcb205d2ea
# Parent  cfbf0c3513d6a75e723542f270376e04436f524c
libxl: Store VNC passwd in xenstore with QEMU upstream.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r cfbf0c3513d6 -r 5b61b5779fca tools/libxl/libxl_qmp.c
--- a/tools/libxl/libxl_qmp.c	Fri Jun 08 16:05:38 2012 +0100
+++ b/tools/libxl/libxl_qmp.c	Fri Jun 08 16:09:00 2012 +0100
@@ -928,6 +928,7 @@ int libxl__qmp_initializations(libxl__gc
     ret = libxl__qmp_query_serial(qmp);
     if (!ret && vnc && vnc->passwd) {
         ret = qmp_change(gc, qmp, "vnc", "password", vnc->passwd);
+        qmp_write_domain_console_item(gc, domid, "vnc-pass", vnc->passwd);
     }
     if (!ret) {
         ret = qmp_query_vnc(qmp);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInU-0003Hk-9S; Sat, 23 Jun 2012 05:22:12 +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 1SiInT-0003HU-AR
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from [193.109.254.147:5851] by server-12.bemta-14.messagelabs.com id
	FF/DA-30461-28255EF4; Sat, 23 Jun 2012 05:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-27.messagelabs.com!1340428929!10320914!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1890 invoked from network); 23 Jun 2012 05:22:09 -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;
	23 Jun 2012 05:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0006CO-Mp
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0001Gm-3P
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Message-Id: <E1SiInQ-0001Gm-3P@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: check for meaningful combination
	of sedf config file 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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1339165561 -3600
# Node ID 9d1fd58ff602f5f7b8a50ea3866adfd8668e0285
# Parent  32034d1914a607d7b6f1f060352b4cac973600f8
xl: check for meaningful combination of sedf config file parameters

As it happens in the implementation of `xl sched-sedf -d ...', some
consistency checking is needed for the scheduling parameters when
they come from the config file.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 32034d1914a6 -r 9d1fd58ff602 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Jun 07 19:46:57 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 08 15:26:01 2012 +0100
@@ -550,6 +550,31 @@ vcpp_out:
     return rc;
 }
 
+static int sched_params_valid(libxl_domain_sched_params *scp)
+{
+    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
+    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
+    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    libxl_domain_sched_params sci;
+
+    libxl_domain_sched_params_get(ctx, domid, &sci);
+
+    /* The sedf scheduler needs some more consistency checking */
+    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+        if (has_weight && (has_period || has_slice))
+            return 0;
+
+        if (has_weight) {
+            scp->slice = 0;
+            scp->period = 0;
+        }
+        if (has_period || has_slice)
+            scp->weight = 0;
+    }
+
+    return 1;
+}
+
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -644,6 +669,10 @@ static void parse_config_data(const char
         b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
         b_info->sched_params.extratime = l;
+    if (!sched_params_valid(&b_info->sched_params)) {
+        fprintf(stderr, "Invalid scheduling parameters\n");
+        exit(1);
+    }
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInW-0003IU-JE; Sat, 23 Jun 2012 05:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0003Hi-Ru
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from [85.158.138.51:38968] by server-8.bemta-3.messagelabs.com id
	76/9E-06157-38255EF4; Sat, 23 Jun 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1340428930!29162653!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25463 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CX-Vq
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0001HW-No
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Message-Id: <E1SiInR-0001HW-No@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Store VNC passwd in xenstore
	with QEMU upstream.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Anthony PERARD <anthony.perard@citrix.com>
# Date 1339168140 -3600
# Node ID 5b61b5779fcae6c46f3ff35451772fdcb205d2ea
# Parent  cfbf0c3513d6a75e723542f270376e04436f524c
libxl: Store VNC passwd in xenstore with QEMU upstream.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r cfbf0c3513d6 -r 5b61b5779fca tools/libxl/libxl_qmp.c
--- a/tools/libxl/libxl_qmp.c	Fri Jun 08 16:05:38 2012 +0100
+++ b/tools/libxl/libxl_qmp.c	Fri Jun 08 16:09:00 2012 +0100
@@ -928,6 +928,7 @@ int libxl__qmp_initializations(libxl__gc
     ret = libxl__qmp_query_serial(qmp);
     if (!ret && vnc && vnc->passwd) {
         ret = qmp_change(gc, qmp, "vnc", "password", vnc->passwd);
+        qmp_write_domain_console_item(gc, domid, "vnc-pass", vnc->passwd);
     }
     if (!ret) {
         ret = qmp_query_vnc(qmp);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInU-0003Hk-9S; Sat, 23 Jun 2012 05:22:12 +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 1SiInT-0003HU-AR
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from [193.109.254.147:5851] by server-12.bemta-14.messagelabs.com id
	FF/DA-30461-28255EF4; Sat, 23 Jun 2012 05:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-27.messagelabs.com!1340428929!10320914!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1890 invoked from network); 23 Jun 2012 05:22:09 -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;
	23 Jun 2012 05:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0006CO-Mp
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInQ-0001Gm-3P
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:08 +0000
Message-Id: <E1SiInQ-0001Gm-3P@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: check for meaningful combination
	of sedf config file 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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1339165561 -3600
# Node ID 9d1fd58ff602f5f7b8a50ea3866adfd8668e0285
# Parent  32034d1914a607d7b6f1f060352b4cac973600f8
xl: check for meaningful combination of sedf config file parameters

As it happens in the implementation of `xl sched-sedf -d ...', some
consistency checking is needed for the scheduling parameters when
they come from the config file.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 32034d1914a6 -r 9d1fd58ff602 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Jun 07 19:46:57 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 08 15:26:01 2012 +0100
@@ -550,6 +550,31 @@ vcpp_out:
     return rc;
 }
 
+static int sched_params_valid(libxl_domain_sched_params *scp)
+{
+    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
+    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
+    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    libxl_domain_sched_params sci;
+
+    libxl_domain_sched_params_get(ctx, domid, &sci);
+
+    /* The sedf scheduler needs some more consistency checking */
+    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+        if (has_weight && (has_period || has_slice))
+            return 0;
+
+        if (has_weight) {
+            scp->slice = 0;
+            scp->period = 0;
+        }
+        if (has_period || has_slice)
+            scp->weight = 0;
+    }
+
+    return 1;
+}
+
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -644,6 +669,10 @@ static void parse_config_data(const char
         b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
         b_info->sched_params.extratime = l;
+    if (!sched_params_valid(&b_info->sched_params)) {
+        fprintf(stderr, "Invalid scheduling parameters\n");
+        exit(1);
+    }
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInW-0003Ia-LY; Sat, 23 Jun 2012 05:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0003I2-A6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from [85.158.143.35:54976] by server-3.bemta-4.messagelabs.com id
	1E/F4-05808-48255EF4; Sat, 23 Jun 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1340428931!15898263!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1471 invoked from network); 23 Jun 2012 05:22:12 -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 Jun 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0006Cd-SN
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0001I0-Qv
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Message-Id: <E1SiInS-0001I0-Qv@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] build: Correct typo introduced by
	c/s:25334
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1339169964 -3600
# Node ID 474b5a6b1d91ad220bb74cadcbaf817db7236b09
# Parent  1e4561d216dbd63900bf643581a57fc4bf762741
build: Correct typo introduced by c/s:25334

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 1e4561d216db -r 474b5a6b1d91 Makefile
--- a/Makefile	Fri Jun 08 16:22:22 2012 +0100
+++ b/Makefile	Fri Jun 08 16:39:24 2012 +0100
@@ -241,7 +241,7 @@ uninstall:
 	rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen
 	rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h
 	rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
-	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xensotre-compat/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xenstore-compat/xs.h
 	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
 	rm -rf $(D)$(INCLUDEDIR)/xen
 	rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInW-0003Ia-LY; Sat, 23 Jun 2012 05:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0003I2-A6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from [85.158.143.35:54976] by server-3.bemta-4.messagelabs.com id
	1E/F4-05808-48255EF4; Sat, 23 Jun 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1340428931!15898263!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1471 invoked from network); 23 Jun 2012 05:22:12 -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 Jun 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0006Cd-SN
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInS-0001I0-Qv
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:10 +0000
Message-Id: <E1SiInS-0001I0-Qv@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] build: Correct typo introduced by
	c/s:25334
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1339169964 -3600
# Node ID 474b5a6b1d91ad220bb74cadcbaf817db7236b09
# Parent  1e4561d216dbd63900bf643581a57fc4bf762741
build: Correct typo introduced by c/s:25334

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 1e4561d216db -r 474b5a6b1d91 Makefile
--- a/Makefile	Fri Jun 08 16:22:22 2012 +0100
+++ b/Makefile	Fri Jun 08 16:39:24 2012 +0100
@@ -241,7 +241,7 @@ uninstall:
 	rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen
 	rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h
 	rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
-	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xensotre-compat/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xenstore-compat/xs.h
 	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
 	rm -rf $(D)$(INCLUDEDIR)/xen
 	rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl*

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInY-0003Jd-TZ; Sat, 23 Jun 2012 05:22:16 +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 1SiInX-0003HU-5M
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [193.109.254.147:5980] by server-12.bemta-14.messagelabs.com id
	32/EA-30461-68255EF4; Sat, 23 Jun 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1340428933!11137850!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12977 invoked from network); 23 Jun 2012 05:22:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cp-UI
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0001J0-Ss
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Message-Id: <E1SiInU-0001J0-Ss@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] gdbsx: send virq to guest if
	gdbsx_vcpu_event is not active
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Mukesh Rathor <mukesh.rathor@oracle.com>
# Date 1339423918 -3600
# Node ID e12e0b0382191af6adc5bc797951d84be874e16d
# Parent  a70b35deb2b5592cc1b2363860f21bb2c7049885
gdbsx: send virq to guest if gdbsx_vcpu_event is not active

gdbsx got broken along the way. During domain pause, don't send
VIRQ_DEBUGGER to guest if gdbsx is active on that guest.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r a70b35deb2b5 -r e12e0b038219 xen/common/domain.c
--- a/xen/common/domain.c	Fri Jun 08 17:00:13 2012 +0100
+++ b/xen/common/domain.c	Mon Jun 11 15:11:58 2012 +0100
@@ -624,7 +624,9 @@ void domain_pause_for_debugger(void)
     for_each_vcpu ( d, v )
         vcpu_sleep_nosync(v);
 
-    send_global_virq(VIRQ_DEBUGGER);
+    /* if gdbsx active, we just need to pause the domain */
+    if (current->arch.gdbsx_vcpu_event == 0)
+        send_global_virq(VIRQ_DEBUGGER);
 }
 
 /* Complete domain destroy after RCU readers are not holding old references. */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInZ-0003KE-2j; Sat, 23 Jun 2012 05:22:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0003Im-D7
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [85.158.139.83:42534] by server-11.bemta-5.messagelabs.com id
	19/77-20400-68255EF4; Sat, 23 Jun 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1340428932!28408057!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25617 invoked from network); 23 Jun 2012 05:22:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cm-G6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0001Ik-Bt
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Message-Id: <E1SiInU-0001Ik-Bt@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl.cfg: document the cpuid= 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

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1339171213 -3600
# Node ID a70b35deb2b5592cc1b2363860f21bb2c7049885
# Parent  c4146b9bf64fb8e1082b55bbc3c3e863f76b2d47
xl.cfg: document the cpuid= option

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c4146b9bf64f -r a70b35deb2b5 docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5	Fri Jun 08 16:43:25 2012 +0100
+++ b/docs/man/xl.cfg.pod.5	Fri Jun 08 17:00:13 2012 +0100
@@ -969,9 +969,53 @@ XXX
 
 XXX
 
-=item B<cpuid=XXX>
+=item B<cpuid="LIBXL_STRING"> or B<cpuid=[ "XEND_STRING", "XEND_STRING" ]>
 
-XXX
+Configure the value returned when a guest executes CPUID instruction.
+Two versions of config syntax are recognized: libxl and xend.
+
+The libxl syntax is a comma separated list of key=value pairs, preceded by the
+word "host". A few keys take a numerical value, all others take a single
+character which describes what to do with the feature bit.
+
+Possible values for a single feature bit:
+  '1' -> force the corresponding bit to 1
+  '0' -> force to 0
+  'x' -> Get a safe value (pass through and mask with the default policy)
+  'k' -> pass through the host bit value
+  's' -> as 'k' but preserve across save/restore and migration (not implemented)
+
+List of keys taking a value:
+apicidsize brandid clflush family localapicid maxleaf model nc proccount procpkg
+stepping
+
+List of keys taking a character:
+3dnow 3dnowext 3dnowprefetch abm acpi aes altmovcr8 apic avx clfsh cmov
+cmplegacy cmpxchg16 cmpxchg8 cntxid dca de ds dscpl dtes64 est extapic f16c
+ffxsr fma4 fpu fxsr htt hypervisor ia64 ibs lahfsahf lm lwp mca mce misalignsse
+mmx mmxext monitor movbe msr mtrr nodeid nx osvw osxsave pae page1gb pat pbe
+pclmulqdq pdcm pge popcnt pse pse36 psn rdtscp skinit smx ss sse sse2 sse3
+sse4.1 sse4.2 sse4a ssse3 svm svm_decode svm_lbrv svm_npt svm_nrips
+svm_pausefilt svm_tscrate svm_vmcbclean syscall sysenter tbm tm tm2 topoext tsc
+vme vmx wdt x2apic xop xsave xtpr
+
+The xend syntax is a list of values in the form of
+'leafnum:register=bitstring,register=bitstring'
+  "leafnum" is the requested function,
+  "register" is the response register to modify
+  "bitstring" represents all bits in the register, its length must be 32 chars.
+  Each successive character represent a lesser-significant bit, possible values
+  are listed above in the libxl section.
+
+Example to hide two features from the guest: 'tm', which is bit #29 in EDX, and
+'pni' (SSE3), which is bit #0 in ECX:
+
+xend: [ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0,edx=xx0xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]
+
+libxl: 'host,tm=0,sse3=0'
+
+More info about the CPUID instruction can be found in the processor manuals, and
+in Wikipedia: L<http://en.wikipedia.org/wiki/CPUID>
 
 =item B<acpi_s3=BOOLEAN>
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInY-0003JX-Qu; Sat, 23 Jun 2012 05:22:16 +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 1SiInW-0003IQ-IK
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from [193.109.254.147:5943] by server-7.bemta-14.messagelabs.com id
	4D/C9-29827-58255EF4; Sat, 23 Jun 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1340428932!8762579!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8232 invoked from network); 23 Jun 2012 05:22:13 -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;
	23 Jun 2012 05:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cj-2h
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0001IV-RF
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Message-Id: <E1SiInT-0001IV-RF@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/pygrub: Makefile cleanup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Anthony PERARD <anthony.perard@citrix.com>
# Date 1339170205 -3600
# Node ID c4146b9bf64fb8e1082b55bbc3c3e863f76b2d47
# Parent  997e40a482783b93538f8777e2f655f79a8ab1df
tools/pygrub: Makefile cleanup

This patch removes the extra command `install pygrub` because this is already
done by the setup.py script.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 997e40a48278 -r c4146b9bf64f tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:42:50 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:43:25 2012 +0100
@@ -13,7 +13,6 @@ install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
-	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInY-0003Jd-TZ; Sat, 23 Jun 2012 05:22:16 +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 1SiInX-0003HU-5M
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [193.109.254.147:5980] by server-12.bemta-14.messagelabs.com id
	32/EA-30461-68255EF4; Sat, 23 Jun 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1340428933!11137850!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12977 invoked from network); 23 Jun 2012 05:22:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cp-UI
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0001J0-Ss
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Message-Id: <E1SiInU-0001J0-Ss@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] gdbsx: send virq to guest if
	gdbsx_vcpu_event is not active
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Mukesh Rathor <mukesh.rathor@oracle.com>
# Date 1339423918 -3600
# Node ID e12e0b0382191af6adc5bc797951d84be874e16d
# Parent  a70b35deb2b5592cc1b2363860f21bb2c7049885
gdbsx: send virq to guest if gdbsx_vcpu_event is not active

gdbsx got broken along the way. During domain pause, don't send
VIRQ_DEBUGGER to guest if gdbsx is active on that guest.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r a70b35deb2b5 -r e12e0b038219 xen/common/domain.c
--- a/xen/common/domain.c	Fri Jun 08 17:00:13 2012 +0100
+++ b/xen/common/domain.c	Mon Jun 11 15:11:58 2012 +0100
@@ -624,7 +624,9 @@ void domain_pause_for_debugger(void)
     for_each_vcpu ( d, v )
         vcpu_sleep_nosync(v);
 
-    send_global_virq(VIRQ_DEBUGGER);
+    /* if gdbsx active, we just need to pause the domain */
+    if (current->arch.gdbsx_vcpu_event == 0)
+        send_global_virq(VIRQ_DEBUGGER);
 }
 
 /* Complete domain destroy after RCU readers are not holding old references. */

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInY-0003JX-Qu; Sat, 23 Jun 2012 05:22:16 +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 1SiInW-0003IQ-IK
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from [193.109.254.147:5943] by server-7.bemta-14.messagelabs.com id
	4D/C9-29827-58255EF4; Sat, 23 Jun 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1340428932!8762579!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8232 invoked from network); 23 Jun 2012 05:22:13 -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;
	23 Jun 2012 05:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cj-2h
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0001IV-RF
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Message-Id: <E1SiInT-0001IV-RF@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/pygrub: Makefile cleanup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Anthony PERARD <anthony.perard@citrix.com>
# Date 1339170205 -3600
# Node ID c4146b9bf64fb8e1082b55bbc3c3e863f76b2d47
# Parent  997e40a482783b93538f8777e2f655f79a8ab1df
tools/pygrub: Makefile cleanup

This patch removes the extra command `install pygrub` because this is already
done by the setup.py script.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 997e40a48278 -r c4146b9bf64f tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:42:50 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:43:25 2012 +0100
@@ -13,7 +13,6 @@ install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
-	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05: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 1SiInZ-0003KE-2j; Sat, 23 Jun 2012 05:22:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0003Im-D7
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [85.158.139.83:42534] by server-11.bemta-5.messagelabs.com id
	19/77-20400-68255EF4; Sat, 23 Jun 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1340428932!28408057!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25617 invoked from network); 23 Jun 2012 05:22:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0006Cm-G6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInU-0001Ik-Bt
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:12 +0000
Message-Id: <E1SiInU-0001Ik-Bt@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl.cfg: document the cpuid= 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

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1339171213 -3600
# Node ID a70b35deb2b5592cc1b2363860f21bb2c7049885
# Parent  c4146b9bf64fb8e1082b55bbc3c3e863f76b2d47
xl.cfg: document the cpuid= option

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c4146b9bf64f -r a70b35deb2b5 docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5	Fri Jun 08 16:43:25 2012 +0100
+++ b/docs/man/xl.cfg.pod.5	Fri Jun 08 17:00:13 2012 +0100
@@ -969,9 +969,53 @@ XXX
 
 XXX
 
-=item B<cpuid=XXX>
+=item B<cpuid="LIBXL_STRING"> or B<cpuid=[ "XEND_STRING", "XEND_STRING" ]>
 
-XXX
+Configure the value returned when a guest executes CPUID instruction.
+Two versions of config syntax are recognized: libxl and xend.
+
+The libxl syntax is a comma separated list of key=value pairs, preceded by the
+word "host". A few keys take a numerical value, all others take a single
+character which describes what to do with the feature bit.
+
+Possible values for a single feature bit:
+  '1' -> force the corresponding bit to 1
+  '0' -> force to 0
+  'x' -> Get a safe value (pass through and mask with the default policy)
+  'k' -> pass through the host bit value
+  's' -> as 'k' but preserve across save/restore and migration (not implemented)
+
+List of keys taking a value:
+apicidsize brandid clflush family localapicid maxleaf model nc proccount procpkg
+stepping
+
+List of keys taking a character:
+3dnow 3dnowext 3dnowprefetch abm acpi aes altmovcr8 apic avx clfsh cmov
+cmplegacy cmpxchg16 cmpxchg8 cntxid dca de ds dscpl dtes64 est extapic f16c
+ffxsr fma4 fpu fxsr htt hypervisor ia64 ibs lahfsahf lm lwp mca mce misalignsse
+mmx mmxext monitor movbe msr mtrr nodeid nx osvw osxsave pae page1gb pat pbe
+pclmulqdq pdcm pge popcnt pse pse36 psn rdtscp skinit smx ss sse sse2 sse3
+sse4.1 sse4.2 sse4a ssse3 svm svm_decode svm_lbrv svm_npt svm_nrips
+svm_pausefilt svm_tscrate svm_vmcbclean syscall sysenter tbm tm tm2 topoext tsc
+vme vmx wdt x2apic xop xsave xtpr
+
+The xend syntax is a list of values in the form of
+'leafnum:register=bitstring,register=bitstring'
+  "leafnum" is the requested function,
+  "register" is the response register to modify
+  "bitstring" represents all bits in the register, its length must be 32 chars.
+  Each successive character represent a lesser-significant bit, possible values
+  are listed above in the libxl section.
+
+Example to hide two features from the guest: 'tm', which is bit #29 in EDX, and
+'pni' (SSE3), which is bit #0 in ECX:
+
+xend: [ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0,edx=xx0xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]
+
+libxl: 'host,tm=0,sse3=0'
+
+More info about the CPUID instruction can be found in the processor manuals, and
+in Wikipedia: L<http://en.wikipedia.org/wiki/CPUID>
 
 =item B<acpi_s3=BOOLEAN>
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003M5-GF; Sat, 23 Jun 2012 05:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0003JH-Dl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [85.158.143.35:55053] by server-1.bemta-4.messagelabs.com id
	B6/60-24392-98255EF4; Sat, 23 Jun 2012 05:22:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1340428935!14509130!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31820 invoked from network); 23 Jun 2012 05:22:16 -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;
	23 Jun 2012 05:22:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0006D4-Fa
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0001KF-Dg
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Message-Id: <E1SiInX-0001KF-Dg@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] SVM: fix performance decrease with
	asid assignment
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1339581086 -7200
# Node ID 34c725807d21451f50e7dc4ece36b137b8b35169
# Parent  bc2f3a848f9a7c23b4a3736d0215732b1f039219
SVM: fix performance decrease with asid assignment

Do not clear asid cleanbit unconditionally. This shaves off 100 cycles
from the VMRUN instruction.

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


diff -r bc2f3a848f9a -r 34c725807d21 xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Tue Jun 12 11:33:42 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 13 11:51:26 2012 +0200
@@ -56,7 +56,8 @@ void svm_asid_handle_vmrun(void)
         return;
     }
 
-    vmcb_set_guest_asid(vmcb, p_asid->asid);
+    if (vmcb_get_guest_asid(vmcb) != p_asid->asid)
+        vmcb_set_guest_asid(vmcb, p_asid->asid);
     vmcb->tlb_control = need_flush;
 }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003Lx-Dv; Sat, 23 Jun 2012 05:22:18 +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 1SiInZ-0003JK-19
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [193.109.254.147:2413] by server-5.bemta-14.messagelabs.com id
	94/B1-04343-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1340428934!11138067!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17628 invoked from network); 23 Jun 2012 05:22:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0006Cv-V2
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0001JW-Tk
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Message-Id: <E1SiInV-0001JW-Tk@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: get rid of BOOT_TRAMPOLINE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1339424128 -3600
# Node ID 61dfb3da56b0a3ac86f81f4a8770e11e1dbc2aa9
# Parent  6d1a30dc47e8dfcb826ff14c833d694fd4e6afb2
x86: get rid of BOOT_TRAMPOLINE

We recently saw a machine that has the EBDA extending as low as
0x7c000, so that Xen fails to boot after relocating the trampoline.
To fix this, I removed BOOT_TRAMPOLINE and bootsym_phys completely.

Here are the parts:

1) the trampoline segment is set to 64k below the EBDA.  head.S grows
the ability to relocate the trampoline segment

2) reloc.c is made position-independent.  It allocates data below the
trampoline, whose address is passed in _eax.

3) cmdline.S is called before relocating, so all bootsym_phys there
become sym_phys.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

jb: - fall back to low memory size (instead of segment 0x7c00) if EBDA
      value is out of range
    - also add upper limit check on EBDA value
    - fix and simplify inline assembly operands in reloc_mbi_struct()
    - use lret instead of retf
    - renamed early_stack to wakeup_stack, defined and used now only
      in wakeup.S
    - aligned reloc.bin's end of .text to 16 bytes, so that checking
      __bss_start == end works reliably

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

Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/Makefile
--- a/xen/arch/x86/boot/Makefile	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/Makefile	Mon Jun 11 15:15:28 2012 +0100
@@ -2,8 +2,7 @@ obj-bin-y += head.o
 
 head.o: reloc.S
 
-BOOT_TRAMPOLINE := $(shell sed -n 's,^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\},,p' head.S)
 %.S: %.c
-	RELOC=$(BOOT_TRAMPOLINE) $(MAKE) -f build32.mk $@
+	$(MAKE) -f build32.mk $@
 
 reloc.S: head.S
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/build32.mk
--- a/xen/arch/x86/boot/build32.mk	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/build32.mk	Mon Jun 11 15:15:28 2012 +0100
@@ -16,9 +16,10 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 	$(OBJCOPY) -O binary $< $@
 
 %.lnk: %.o
-	$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(RELOC) -o $@ $<
+	$(LD) $(LDFLAGS_DIRECT) -N -Ttext 0 -o $@ $<
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) -c -fpic $< -o $@
 
 reloc.o: $(BASEDIR)/include/asm-x86/config.h
+.PRECIOUS: %.bin %.lnk
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/cmdline.S	Mon Jun 11 15:15:28 2012 +0100
@@ -164,13 +164,13 @@ cmdline_parse_early:
         pushl   MB_cmdline(%ebx)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   bootsym_phys(skip_realmode)
+        setnz   sym_phys(skip_realmode)
 
         /* Check for 'tboot=' command-line option. */
         movl    $sym_phys(.Ltboot_opt),4(%esp)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   bootsym_phys(skip_realmode) /* tboot= implies no-real-mode */
+        setnz   sym_phys(skip_realmode) /* tboot= implies no-real-mode */
 
 .Lparse_edd:
         /* Check for 'edd=' command-line option. */
@@ -181,13 +181,13 @@ cmdline_parse_early:
         cmpb    $'=',3(%eax)
         jne     .Lparse_edid
         add     $4,%eax
-        movb    $2,bootsym_phys(opt_edd)  /* opt_edd=2: edd=off */
+        movb    $2,sym_phys(opt_edd)  /* opt_edd=2: edd=off */
         cmpw    $0x666f,(%eax)            /* 0x666f == "of" */
         je      .Lparse_edid
-        decb    bootsym_phys(opt_edd)     /* opt_edd=1: edd=skipmbr */
+        decb    sym_phys(opt_edd)     /* opt_edd=1: edd=skipmbr */
         cmpw    $0x6b73,(%eax)            /* 0x6b73 == "sk" */
         je      .Lparse_edid
-        decb    bootsym_phys(opt_edd)     /* opt_edd=0: edd=on (default) */
+        decb    sym_phys(opt_edd)     /* opt_edd=0: edd=on (default) */
 
 .Lparse_edid:
         /* Check for 'edid=' command-line option. */
@@ -203,17 +203,17 @@ cmdline_parse_early:
         pushl   $sym_phys(.Ledid_force)
         call    .Lstr_prefix
         add     $8,%esp
-        movb    $2,bootsym_phys(opt_edid) /* opt_edid=2: edid=force */
+        movb    $2,sym_phys(opt_edid) /* opt_edid=2: edid=force */
         test    %eax,%eax
         jz      .Lparse_vga
         push    %ebx
         pushl   $sym_phys(.Ledid_no)
         call    .Lstr_prefix
         add     $8,%esp
-        decb    bootsym_phys(opt_edid)    /* opt_edid=1: edid=no */
+        decb    sym_phys(opt_edid)    /* opt_edid=1: edid=no */
         test    %eax,%eax
         jz      .Lparse_vga
-        decb    bootsym_phys(opt_edid)    /* opt_edid=0: default */
+        decb    sym_phys(opt_edid)    /* opt_edid=0: default */
 
 .Lparse_vga:
         /* Check for 'vga=' command-line option. */
@@ -227,7 +227,7 @@ cmdline_parse_early:
         add     $4,%eax
 
         /* Found the 'vga=' option. Default option is to display vga menu. */
-        movw    $ASK_VGA,bootsym_phys(boot_vid_mode)
+        movw    $ASK_VGA,sym_phys(boot_vid_mode)
 
         /* Check for 'vga=text-80x<rows>. */
         mov     %eax,%ebx
@@ -251,7 +251,7 @@ 1:      lodsw
         cmp     %ax,%bx
         lodsw
         jne     1b
-        mov     %ax,bootsym_phys(boot_vid_mode)
+        mov     %ax,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_gfx:
@@ -270,7 +270,7 @@ 1:      lodsw
         push    %ebx
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+0
+        mov     %ax,sym_phys(vesa_size)+0
         /* skip 'x' */
         lodsb
         cmpb    $'x',%al
@@ -279,7 +279,7 @@ 1:      lodsw
         push    %esi
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+2
+        mov     %ax,sym_phys(vesa_size)+2
         /* skip 'x' */
         lodsb
         cmpb    $'x',%al
@@ -288,9 +288,9 @@ 1:      lodsw
         push    %esi
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+4
+        mov     %ax,sym_phys(vesa_size)+4
         /* commit to vesa mode */
-        movw    $VIDEO_VESA_BY_SIZE,bootsym_phys(boot_vid_mode)
+        movw    $VIDEO_VESA_BY_SIZE,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_mode:
@@ -307,7 +307,7 @@ 1:      lodsw
         push    %ebx
         call    .Latoi
         add     $4,%esp
-        mov     %ax,bootsym_phys(boot_vid_mode)
+        mov     %ax,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_current:
@@ -320,7 +320,7 @@ 1:      lodsw
         jnz     .Lcmdline_exit
 
         /* We have 'vga=current'. */
-        movw    $VIDEO_CURRENT_MODE,bootsym_phys(boot_vid_mode)
+        movw    $VIDEO_CURRENT_MODE,sym_phys(boot_vid_mode)
 
 .Lcmdline_exit:
         popa
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/head.S
--- a/xen/arch/x86/boot/head.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/head.S	Mon Jun 11 15:15:28 2012 +0100
@@ -9,9 +9,7 @@
         .text
         .code32
 
-#define BOOT_TRAMPOLINE   0x7c000
 #define sym_phys(sym)     ((sym) - __XEN_VIRT_START)
-#define bootsym_phys(sym) ((sym) - trampoline_start + BOOT_TRAMPOLINE)
 
 #define BOOT_CS32        0x0008
 #define BOOT_CS64        0x0010
@@ -79,6 +77,23 @@ __start:
         cmp     $0x2BADB002,%eax
         jne     not_multiboot
 
+        /* Set up trampoline segment 64k below EBDA */
+        movzwl  0x40e,%eax          /* EBDA segment */
+        cmp     $0xa000,%eax        /* sanity check (high) */
+        jae     0f
+        cmp     $0x4000,%eax        /* sanity check (low) */
+        jae     1f
+0:
+        movzwl  0x413,%eax          /* use base memory size on failure */
+        shl     $10-4,%eax
+1:
+        sub     $0x1000,%eax
+
+        /* From arch/x86/smpboot.c: start_eip had better be page-aligned! */
+        xor     %al, %al
+        shl     $4, %eax
+        mov     %eax,sym_phys(trampoline_phys)
+
         /* Save the Multiboot info struct (after relocation) for later use. */
         mov     $sym_phys(cpu0_stack)+1024,%esp
         push    %ebx
@@ -190,7 +205,7 @@ 2:      cmp     $L1_PAGETABLE_ENTRIES,%e
 #endif
 
         /* Apply relocations to bootstrap trampoline. */
-        mov     $BOOT_TRAMPOLINE,%edx
+        mov     sym_phys(trampoline_phys),%edx
         mov     $sym_phys(__trampoline_rel_start),%edi
         mov     %edx,sym_phys(trampoline_phys)
 1:
@@ -200,22 +215,35 @@ 1:
         cmp     $sym_phys(__trampoline_rel_stop),%edi
         jb      1b
 
+        /* Patch in the trampoline segment. */
+        shr     $4,%edx
+        mov     $sym_phys(__trampoline_seg_start),%edi
+1:
+        mov     (%edi),%eax
+        mov     %dx,(%edi,%eax)
+        add     $4,%edi
+        cmp     $sym_phys(__trampoline_seg_stop),%edi
+        jb      1b
+
+        call    cmdline_parse_early
+
+        /* Switch to low-memory stack.  */
+        mov     sym_phys(trampoline_phys),%edi
+        lea     0x10000(%edi),%esp
+        lea     trampoline_boot_cpu_entry-trampoline_start(%edi),%eax
+        pushl   $BOOT_CS32
+        push    %eax
+
         /* Copy bootstrap trampoline to low memory, below 1MB. */
         mov     $sym_phys(trampoline_start),%esi
-        mov     %edx,%edi
         mov     $trampoline_end - trampoline_start,%ecx
         rep     movsb
 
-        lea     early_stack-trampoline_start(%edx),%esp
-        call    cmdline_parse_early
-
         /* Jump into the relocated trampoline. */
-        jmp     $BOOT_CS32,$bootsym_phys(trampoline_boot_cpu_entry)
+        lret
 
 #include "cmdline.S"
 
-#undef bootsym_phys
-
 reloc:
 #include "reloc.S"
 
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/reloc.c
--- a/xen/arch/x86/boot/reloc.c	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/reloc.c	Mon Jun 11 15:15:28 2012 +0100
@@ -10,42 +10,49 @@
  *    Keir Fraser <keir@xen.org>
  */
 
+/* entered with %eax = BOOT_TRAMPOLINE */
 asm (
     "    .text                         \n"
     "    .globl _start                 \n"
     "_start:                           \n"
-    "    mov  $_start,%edi             \n"
     "    call 1f                       \n"
-    "1:  pop  %esi                     \n"
-    "    sub  $1b-_start,%esi          \n"
-    "    mov  $__bss_start-_start,%ecx \n"
-    "    rep  movsb                    \n"
-    "    xor  %eax,%eax                \n"
-    "    mov  $_end,%ecx               \n"
-    "    sub  %edi,%ecx                \n"
-    "    rep  stosb                    \n"
-    "    mov  $reloc,%eax              \n"
-    "    jmp  *%eax                    \n"
+    "1:  pop  %ebx                     \n"
+    "    mov  %eax,alloc-1b(%ebx)      \n"
+    "    mov  $_end,%ecx               \n"  /* check that BSS is empty! */
+    "    sub  $__bss_start,%ecx        \n"
+    "    jz reloc                      \n"
+    "1:  jmp 1b                        \n"
+    );
+
+/* This is our data.  Because the code must be relocatable, no BSS is
+ * allowed.  All data is accessed PC-relative with inline assembly.
+ */
+asm (
+    "alloc:                            \n"
+    "    .long 0                       \n"
+    "    .subsection 1                 \n"
+    "    .p2align 4, 0xcc              \n"
+    "    .subsection 0                 \n"
     );
 
 typedef unsigned int u32;
 #include "../../../include/xen/multiboot.h"
 
-extern char _start[];
-
-static void *memcpy(void *dest, const void *src, unsigned int n)
-{
-    char *s = (char *)src, *d = dest;
-    while ( n-- )
-        *d++ = *s++;
-    return dest;
-}
-
 static void *reloc_mbi_struct(void *old, unsigned int bytes)
 {
-    static void *alloc = &_start;
-    alloc = (void *)(((unsigned long)alloc - bytes) & ~15ul);
-    return memcpy(alloc, old, bytes);
+    void *new;
+    asm(
+    "    call 1f                      \n"
+    "1:  pop  %%edx                   \n"
+    "    mov  alloc-1b(%%edx),%0      \n"
+    "    sub  %1,%0                   \n"
+    "    and  $~15,%0                 \n"
+    "    mov  %0,alloc-1b(%%edx)      \n"
+    "    mov  %0,%%edi                \n"
+    "    rep  movsb                   \n"
+       : "=&r" (new), "+c" (bytes), "+S" (old)
+	: : "edx", "edi");
+    return new;
 }
 
 static char *reloc_mbi_string(char *old)
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/trampoline.S
--- a/xen/arch/x86/boot/trampoline.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/trampoline.S	Mon Jun 11 15:15:28 2012 +0100
@@ -11,6 +11,13 @@ 111:;                                   
         .long 111b - (off) - .;            \
         .popsection
 
+#define bootsym_segrel(sym, off)           \
+        $0,$bootsym(sym);                  \
+111:;                                      \
+        .pushsection .trampoline_seg, "a"; \
+        .long 111b - (off) - .;            \
+        .popsection
+
         .globl trampoline_realmode_entry
 trampoline_realmode_entry:
         mov     %cs,%ax
@@ -151,14 +158,14 @@ trampoline_boot_cpu_entry:
 1:      mov     %eax,%cr0                 # CR0.PE = 0 (leave protected mode)
 
         /* Load proper real-mode values into %cs, %ds, %es and %ss. */
-        ljmp    $(BOOT_TRAMPOLINE>>4),$bootsym(1f)
+        ljmp    bootsym_segrel(1f,2)
 1:      mov     %cs,%ax
         mov     %ax,%ds
         mov     %ax,%es
         mov     %ax,%ss
 
         /* Initialise stack pointer and IDT, and enable irqs. */
-        mov     $bootsym(early_stack),%sp
+        xor     %sp,%sp
         lidt    bootsym(rm_idt)
         sti
 
@@ -220,7 +227,3 @@ rm_idt: .word   256*4-1, 0, 0
 #include "edd.S"
 #include "video.S"
 #include "wakeup.S"
-
-        .align  16
-        .fill   PAGE_SIZE,1,0
-early_stack:
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/wakeup.S
--- a/xen/arch/x86/boot/wakeup.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/wakeup.S	Mon Jun 11 15:15:28 2012 +0100
@@ -11,7 +11,7 @@ ENTRY(wakeup_start)
         movw    %cs, %ax
         movw    %ax, %ds
         movw    %ax, %ss        # A stack required for BIOS call
-        movw    $wakesym(early_stack), %sp
+        movw    $wakesym(wakeup_stack), %sp
 
         pushl   $0              # Kill dangerous flag early
         popfl
@@ -101,7 +101,7 @@ real_magic:     .long 0x12345678
          .globl video_mode, video_flags
 video_mode:     .long 0
 video_flags:    .long 0
-trampoline_seg: .word BOOT_TRAMPOLINE >> 4
+trampoline_seg: .word 0
         .pushsection .trampoline_seg, "a"
         .long   trampoline_seg - .
         .popsection
@@ -116,7 +116,7 @@ wakeup_32:
         mov     $BOOT_DS, %eax
         mov     %eax, %ds
         mov     %eax, %ss
-        mov     $bootsym_rel(early_stack, 4, %esp)
+        mov     $bootsym_rel(wakeup_stack, 4, %esp)
 
         # check saved magic again
         mov     $sym_phys(saved_magic), %eax
@@ -188,3 +188,7 @@ ret_point:
 bogus_saved_magic:
         movw    $0x0e00 + 'S', 0xb8014
         jmp     bogus_saved_magic
+
+        .align  16
+        .fill   PAGE_SIZE,1,0
+wakeup_stack:

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInY-0003K9-WB; Sat, 23 Jun 2012 05:22:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0003HW-Er
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [85.158.143.35:55016] by server-2.bemta-4.messagelabs.com id
	82/05-17938-78255EF4; Sat, 23 Jun 2012 05:22:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1340428933!15173033!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27327 invoked from network); 23 Jun 2012 05:22:14 -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;
	23 Jun 2012 05:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0006Cs-Ed
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0001JH-DQ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Message-Id: <E1SiInV-0001JH-DQ@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/nmi: Fix deadlock in
	unknown_nmi_error()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1339423970 -3600
# Node ID 6d1a30dc47e8dfcb826ff14c833d694fd4e6afb2
# Parent  e12e0b0382191af6adc5bc797951d84be874e16d
x86/nmi: Fix deadlock in unknown_nmi_error()

Additionally, correct the text description to reflect what is being
done, and make use of fatal_trap() in preference to kexec_crash() in
case an unknown NMI occurs before a kdump kernel has been loaded.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e12e0b038219 -r 6d1a30dc47e8 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Mon Jun 11 15:11:58 2012 +0100
+++ b/xen/arch/x86/traps.c	Mon Jun 11 15:12:50 2012 +0100
@@ -3293,7 +3293,7 @@ static void io_check_error(struct cpu_us
     outb((inb(0x61) & 0x07) | 0x00, 0x61); /* enable IOCK */
 }
 
-static void unknown_nmi_error(unsigned char reason)
+static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
 {
     switch ( opt_nmi[0] )
     {
@@ -3302,10 +3302,10 @@ static void unknown_nmi_error(unsigned c
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
+        console_force_unlock();
         printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
-        printk("Dazed and confused, but trying to continue\n");
         printk("Do you have a strange power saving mode enabled?\n");
-        kexec_crash();
+        fatal_trap(TRAP_nmi, regs);
     }
 }
 
@@ -3338,7 +3338,7 @@ void do_nmi(struct cpu_user_regs *regs)
         else if ( reason & 0x40 )
             io_check_error(regs);
         else if ( !nmi_watchdog )
-            unknown_nmi_error((unsigned char)(reason&0xff));
+            unknown_nmi_error(regs, (unsigned char)(reason&0xff));
     }
 }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003Lx-Dv; Sat, 23 Jun 2012 05:22:18 +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 1SiInZ-0003JK-19
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [193.109.254.147:2413] by server-5.bemta-14.messagelabs.com id
	94/B1-04343-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1340428934!11138067!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17628 invoked from network); 23 Jun 2012 05:22:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0006Cv-V2
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0001JW-Tk
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Message-Id: <E1SiInV-0001JW-Tk@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: get rid of BOOT_TRAMPOLINE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1339424128 -3600
# Node ID 61dfb3da56b0a3ac86f81f4a8770e11e1dbc2aa9
# Parent  6d1a30dc47e8dfcb826ff14c833d694fd4e6afb2
x86: get rid of BOOT_TRAMPOLINE

We recently saw a machine that has the EBDA extending as low as
0x7c000, so that Xen fails to boot after relocating the trampoline.
To fix this, I removed BOOT_TRAMPOLINE and bootsym_phys completely.

Here are the parts:

1) the trampoline segment is set to 64k below the EBDA.  head.S grows
the ability to relocate the trampoline segment

2) reloc.c is made position-independent.  It allocates data below the
trampoline, whose address is passed in _eax.

3) cmdline.S is called before relocating, so all bootsym_phys there
become sym_phys.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

jb: - fall back to low memory size (instead of segment 0x7c00) if EBDA
      value is out of range
    - also add upper limit check on EBDA value
    - fix and simplify inline assembly operands in reloc_mbi_struct()
    - use lret instead of retf
    - renamed early_stack to wakeup_stack, defined and used now only
      in wakeup.S
    - aligned reloc.bin's end of .text to 16 bytes, so that checking
      __bss_start == end works reliably

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

Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/Makefile
--- a/xen/arch/x86/boot/Makefile	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/Makefile	Mon Jun 11 15:15:28 2012 +0100
@@ -2,8 +2,7 @@ obj-bin-y += head.o
 
 head.o: reloc.S
 
-BOOT_TRAMPOLINE := $(shell sed -n 's,^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\},,p' head.S)
 %.S: %.c
-	RELOC=$(BOOT_TRAMPOLINE) $(MAKE) -f build32.mk $@
+	$(MAKE) -f build32.mk $@
 
 reloc.S: head.S
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/build32.mk
--- a/xen/arch/x86/boot/build32.mk	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/build32.mk	Mon Jun 11 15:15:28 2012 +0100
@@ -16,9 +16,10 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 	$(OBJCOPY) -O binary $< $@
 
 %.lnk: %.o
-	$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(RELOC) -o $@ $<
+	$(LD) $(LDFLAGS_DIRECT) -N -Ttext 0 -o $@ $<
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) -c -fpic $< -o $@
 
 reloc.o: $(BASEDIR)/include/asm-x86/config.h
+.PRECIOUS: %.bin %.lnk
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/cmdline.S	Mon Jun 11 15:15:28 2012 +0100
@@ -164,13 +164,13 @@ cmdline_parse_early:
         pushl   MB_cmdline(%ebx)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   bootsym_phys(skip_realmode)
+        setnz   sym_phys(skip_realmode)
 
         /* Check for 'tboot=' command-line option. */
         movl    $sym_phys(.Ltboot_opt),4(%esp)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   bootsym_phys(skip_realmode) /* tboot= implies no-real-mode */
+        setnz   sym_phys(skip_realmode) /* tboot= implies no-real-mode */
 
 .Lparse_edd:
         /* Check for 'edd=' command-line option. */
@@ -181,13 +181,13 @@ cmdline_parse_early:
         cmpb    $'=',3(%eax)
         jne     .Lparse_edid
         add     $4,%eax
-        movb    $2,bootsym_phys(opt_edd)  /* opt_edd=2: edd=off */
+        movb    $2,sym_phys(opt_edd)  /* opt_edd=2: edd=off */
         cmpw    $0x666f,(%eax)            /* 0x666f == "of" */
         je      .Lparse_edid
-        decb    bootsym_phys(opt_edd)     /* opt_edd=1: edd=skipmbr */
+        decb    sym_phys(opt_edd)     /* opt_edd=1: edd=skipmbr */
         cmpw    $0x6b73,(%eax)            /* 0x6b73 == "sk" */
         je      .Lparse_edid
-        decb    bootsym_phys(opt_edd)     /* opt_edd=0: edd=on (default) */
+        decb    sym_phys(opt_edd)     /* opt_edd=0: edd=on (default) */
 
 .Lparse_edid:
         /* Check for 'edid=' command-line option. */
@@ -203,17 +203,17 @@ cmdline_parse_early:
         pushl   $sym_phys(.Ledid_force)
         call    .Lstr_prefix
         add     $8,%esp
-        movb    $2,bootsym_phys(opt_edid) /* opt_edid=2: edid=force */
+        movb    $2,sym_phys(opt_edid) /* opt_edid=2: edid=force */
         test    %eax,%eax
         jz      .Lparse_vga
         push    %ebx
         pushl   $sym_phys(.Ledid_no)
         call    .Lstr_prefix
         add     $8,%esp
-        decb    bootsym_phys(opt_edid)    /* opt_edid=1: edid=no */
+        decb    sym_phys(opt_edid)    /* opt_edid=1: edid=no */
         test    %eax,%eax
         jz      .Lparse_vga
-        decb    bootsym_phys(opt_edid)    /* opt_edid=0: default */
+        decb    sym_phys(opt_edid)    /* opt_edid=0: default */
 
 .Lparse_vga:
         /* Check for 'vga=' command-line option. */
@@ -227,7 +227,7 @@ cmdline_parse_early:
         add     $4,%eax
 
         /* Found the 'vga=' option. Default option is to display vga menu. */
-        movw    $ASK_VGA,bootsym_phys(boot_vid_mode)
+        movw    $ASK_VGA,sym_phys(boot_vid_mode)
 
         /* Check for 'vga=text-80x<rows>. */
         mov     %eax,%ebx
@@ -251,7 +251,7 @@ 1:      lodsw
         cmp     %ax,%bx
         lodsw
         jne     1b
-        mov     %ax,bootsym_phys(boot_vid_mode)
+        mov     %ax,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_gfx:
@@ -270,7 +270,7 @@ 1:      lodsw
         push    %ebx
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+0
+        mov     %ax,sym_phys(vesa_size)+0
         /* skip 'x' */
         lodsb
         cmpb    $'x',%al
@@ -279,7 +279,7 @@ 1:      lodsw
         push    %esi
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+2
+        mov     %ax,sym_phys(vesa_size)+2
         /* skip 'x' */
         lodsb
         cmpb    $'x',%al
@@ -288,9 +288,9 @@ 1:      lodsw
         push    %esi
         call    .Latoi
         pop     %esi
-        mov     %ax,bootsym_phys(vesa_size)+4
+        mov     %ax,sym_phys(vesa_size)+4
         /* commit to vesa mode */
-        movw    $VIDEO_VESA_BY_SIZE,bootsym_phys(boot_vid_mode)
+        movw    $VIDEO_VESA_BY_SIZE,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_mode:
@@ -307,7 +307,7 @@ 1:      lodsw
         push    %ebx
         call    .Latoi
         add     $4,%esp
-        mov     %ax,bootsym_phys(boot_vid_mode)
+        mov     %ax,sym_phys(boot_vid_mode)
         jmp     .Lcmdline_exit
 
 .Lparse_vga_current:
@@ -320,7 +320,7 @@ 1:      lodsw
         jnz     .Lcmdline_exit
 
         /* We have 'vga=current'. */
-        movw    $VIDEO_CURRENT_MODE,bootsym_phys(boot_vid_mode)
+        movw    $VIDEO_CURRENT_MODE,sym_phys(boot_vid_mode)
 
 .Lcmdline_exit:
         popa
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/head.S
--- a/xen/arch/x86/boot/head.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/head.S	Mon Jun 11 15:15:28 2012 +0100
@@ -9,9 +9,7 @@
         .text
         .code32
 
-#define BOOT_TRAMPOLINE   0x7c000
 #define sym_phys(sym)     ((sym) - __XEN_VIRT_START)
-#define bootsym_phys(sym) ((sym) - trampoline_start + BOOT_TRAMPOLINE)
 
 #define BOOT_CS32        0x0008
 #define BOOT_CS64        0x0010
@@ -79,6 +77,23 @@ __start:
         cmp     $0x2BADB002,%eax
         jne     not_multiboot
 
+        /* Set up trampoline segment 64k below EBDA */
+        movzwl  0x40e,%eax          /* EBDA segment */
+        cmp     $0xa000,%eax        /* sanity check (high) */
+        jae     0f
+        cmp     $0x4000,%eax        /* sanity check (low) */
+        jae     1f
+0:
+        movzwl  0x413,%eax          /* use base memory size on failure */
+        shl     $10-4,%eax
+1:
+        sub     $0x1000,%eax
+
+        /* From arch/x86/smpboot.c: start_eip had better be page-aligned! */
+        xor     %al, %al
+        shl     $4, %eax
+        mov     %eax,sym_phys(trampoline_phys)
+
         /* Save the Multiboot info struct (after relocation) for later use. */
         mov     $sym_phys(cpu0_stack)+1024,%esp
         push    %ebx
@@ -190,7 +205,7 @@ 2:      cmp     $L1_PAGETABLE_ENTRIES,%e
 #endif
 
         /* Apply relocations to bootstrap trampoline. */
-        mov     $BOOT_TRAMPOLINE,%edx
+        mov     sym_phys(trampoline_phys),%edx
         mov     $sym_phys(__trampoline_rel_start),%edi
         mov     %edx,sym_phys(trampoline_phys)
 1:
@@ -200,22 +215,35 @@ 1:
         cmp     $sym_phys(__trampoline_rel_stop),%edi
         jb      1b
 
+        /* Patch in the trampoline segment. */
+        shr     $4,%edx
+        mov     $sym_phys(__trampoline_seg_start),%edi
+1:
+        mov     (%edi),%eax
+        mov     %dx,(%edi,%eax)
+        add     $4,%edi
+        cmp     $sym_phys(__trampoline_seg_stop),%edi
+        jb      1b
+
+        call    cmdline_parse_early
+
+        /* Switch to low-memory stack.  */
+        mov     sym_phys(trampoline_phys),%edi
+        lea     0x10000(%edi),%esp
+        lea     trampoline_boot_cpu_entry-trampoline_start(%edi),%eax
+        pushl   $BOOT_CS32
+        push    %eax
+
         /* Copy bootstrap trampoline to low memory, below 1MB. */
         mov     $sym_phys(trampoline_start),%esi
-        mov     %edx,%edi
         mov     $trampoline_end - trampoline_start,%ecx
         rep     movsb
 
-        lea     early_stack-trampoline_start(%edx),%esp
-        call    cmdline_parse_early
-
         /* Jump into the relocated trampoline. */
-        jmp     $BOOT_CS32,$bootsym_phys(trampoline_boot_cpu_entry)
+        lret
 
 #include "cmdline.S"
 
-#undef bootsym_phys
-
 reloc:
 #include "reloc.S"
 
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/reloc.c
--- a/xen/arch/x86/boot/reloc.c	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/reloc.c	Mon Jun 11 15:15:28 2012 +0100
@@ -10,42 +10,49 @@
  *    Keir Fraser <keir@xen.org>
  */
 
+/* entered with %eax = BOOT_TRAMPOLINE */
 asm (
     "    .text                         \n"
     "    .globl _start                 \n"
     "_start:                           \n"
-    "    mov  $_start,%edi             \n"
     "    call 1f                       \n"
-    "1:  pop  %esi                     \n"
-    "    sub  $1b-_start,%esi          \n"
-    "    mov  $__bss_start-_start,%ecx \n"
-    "    rep  movsb                    \n"
-    "    xor  %eax,%eax                \n"
-    "    mov  $_end,%ecx               \n"
-    "    sub  %edi,%ecx                \n"
-    "    rep  stosb                    \n"
-    "    mov  $reloc,%eax              \n"
-    "    jmp  *%eax                    \n"
+    "1:  pop  %ebx                     \n"
+    "    mov  %eax,alloc-1b(%ebx)      \n"
+    "    mov  $_end,%ecx               \n"  /* check that BSS is empty! */
+    "    sub  $__bss_start,%ecx        \n"
+    "    jz reloc                      \n"
+    "1:  jmp 1b                        \n"
+    );
+
+/* This is our data.  Because the code must be relocatable, no BSS is
+ * allowed.  All data is accessed PC-relative with inline assembly.
+ */
+asm (
+    "alloc:                            \n"
+    "    .long 0                       \n"
+    "    .subsection 1                 \n"
+    "    .p2align 4, 0xcc              \n"
+    "    .subsection 0                 \n"
     );
 
 typedef unsigned int u32;
 #include "../../../include/xen/multiboot.h"
 
-extern char _start[];
-
-static void *memcpy(void *dest, const void *src, unsigned int n)
-{
-    char *s = (char *)src, *d = dest;
-    while ( n-- )
-        *d++ = *s++;
-    return dest;
-}
-
 static void *reloc_mbi_struct(void *old, unsigned int bytes)
 {
-    static void *alloc = &_start;
-    alloc = (void *)(((unsigned long)alloc - bytes) & ~15ul);
-    return memcpy(alloc, old, bytes);
+    void *new;
+    asm(
+    "    call 1f                      \n"
+    "1:  pop  %%edx                   \n"
+    "    mov  alloc-1b(%%edx),%0      \n"
+    "    sub  %1,%0                   \n"
+    "    and  $~15,%0                 \n"
+    "    mov  %0,alloc-1b(%%edx)      \n"
+    "    mov  %0,%%edi                \n"
+    "    rep  movsb                   \n"
+       : "=&r" (new), "+c" (bytes), "+S" (old)
+	: : "edx", "edi");
+    return new;
 }
 
 static char *reloc_mbi_string(char *old)
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/trampoline.S
--- a/xen/arch/x86/boot/trampoline.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/trampoline.S	Mon Jun 11 15:15:28 2012 +0100
@@ -11,6 +11,13 @@ 111:;                                   
         .long 111b - (off) - .;            \
         .popsection
 
+#define bootsym_segrel(sym, off)           \
+        $0,$bootsym(sym);                  \
+111:;                                      \
+        .pushsection .trampoline_seg, "a"; \
+        .long 111b - (off) - .;            \
+        .popsection
+
         .globl trampoline_realmode_entry
 trampoline_realmode_entry:
         mov     %cs,%ax
@@ -151,14 +158,14 @@ trampoline_boot_cpu_entry:
 1:      mov     %eax,%cr0                 # CR0.PE = 0 (leave protected mode)
 
         /* Load proper real-mode values into %cs, %ds, %es and %ss. */
-        ljmp    $(BOOT_TRAMPOLINE>>4),$bootsym(1f)
+        ljmp    bootsym_segrel(1f,2)
 1:      mov     %cs,%ax
         mov     %ax,%ds
         mov     %ax,%es
         mov     %ax,%ss
 
         /* Initialise stack pointer and IDT, and enable irqs. */
-        mov     $bootsym(early_stack),%sp
+        xor     %sp,%sp
         lidt    bootsym(rm_idt)
         sti
 
@@ -220,7 +227,3 @@ rm_idt: .word   256*4-1, 0, 0
 #include "edd.S"
 #include "video.S"
 #include "wakeup.S"
-
-        .align  16
-        .fill   PAGE_SIZE,1,0
-early_stack:
diff -r 6d1a30dc47e8 -r 61dfb3da56b0 xen/arch/x86/boot/wakeup.S
--- a/xen/arch/x86/boot/wakeup.S	Mon Jun 11 15:12:50 2012 +0100
+++ b/xen/arch/x86/boot/wakeup.S	Mon Jun 11 15:15:28 2012 +0100
@@ -11,7 +11,7 @@ ENTRY(wakeup_start)
         movw    %cs, %ax
         movw    %ax, %ds
         movw    %ax, %ss        # A stack required for BIOS call
-        movw    $wakesym(early_stack), %sp
+        movw    $wakesym(wakeup_stack), %sp
 
         pushl   $0              # Kill dangerous flag early
         popfl
@@ -101,7 +101,7 @@ real_magic:     .long 0x12345678
          .globl video_mode, video_flags
 video_mode:     .long 0
 video_flags:    .long 0
-trampoline_seg: .word BOOT_TRAMPOLINE >> 4
+trampoline_seg: .word 0
         .pushsection .trampoline_seg, "a"
         .long   trampoline_seg - .
         .popsection
@@ -116,7 +116,7 @@ wakeup_32:
         mov     $BOOT_DS, %eax
         mov     %eax, %ds
         mov     %eax, %ss
-        mov     $bootsym_rel(early_stack, 4, %esp)
+        mov     $bootsym_rel(wakeup_stack, 4, %esp)
 
         # check saved magic again
         mov     $sym_phys(saved_magic), %eax
@@ -188,3 +188,7 @@ ret_point:
 bogus_saved_magic:
         movw    $0x0e00 + 'S', 0xb8014
         jmp     bogus_saved_magic
+
+        .align  16
+        .fill   PAGE_SIZE,1,0
+wakeup_stack:

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003M5-GF; Sat, 23 Jun 2012 05:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0003JH-Dl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [85.158.143.35:55053] by server-1.bemta-4.messagelabs.com id
	B6/60-24392-98255EF4; Sat, 23 Jun 2012 05:22:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1340428935!14509130!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31820 invoked from network); 23 Jun 2012 05:22:16 -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;
	23 Jun 2012 05:22:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0006D4-Fa
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0001KF-Dg
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Message-Id: <E1SiInX-0001KF-Dg@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] SVM: fix performance decrease with
	asid assignment
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1339581086 -7200
# Node ID 34c725807d21451f50e7dc4ece36b137b8b35169
# Parent  bc2f3a848f9a7c23b4a3736d0215732b1f039219
SVM: fix performance decrease with asid assignment

Do not clear asid cleanbit unconditionally. This shaves off 100 cycles
from the VMRUN instruction.

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


diff -r bc2f3a848f9a -r 34c725807d21 xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Tue Jun 12 11:33:42 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c	Wed Jun 13 11:51:26 2012 +0200
@@ -56,7 +56,8 @@ void svm_asid_handle_vmrun(void)
         return;
     }
 
-    vmcb_set_guest_asid(vmcb, p_asid->asid);
+    if (vmcb_get_guest_asid(vmcb) != p_asid->asid)
+        vmcb_set_guest_asid(vmcb, p_asid->asid);
     vmcb->tlb_control = need_flush;
 }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInY-0003K9-WB; Sat, 23 Jun 2012 05:22:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0003HW-Er
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from [85.158.143.35:55016] by server-2.bemta-4.messagelabs.com id
	82/05-17938-78255EF4; Sat, 23 Jun 2012 05:22:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1340428933!15173033!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27327 invoked from network); 23 Jun 2012 05:22:14 -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;
	23 Jun 2012 05:22:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0006Cs-Ed
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInV-0001JH-DQ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:13 +0000
Message-Id: <E1SiInV-0001JH-DQ@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/nmi: Fix deadlock in
	unknown_nmi_error()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1339423970 -3600
# Node ID 6d1a30dc47e8dfcb826ff14c833d694fd4e6afb2
# Parent  e12e0b0382191af6adc5bc797951d84be874e16d
x86/nmi: Fix deadlock in unknown_nmi_error()

Additionally, correct the text description to reflect what is being
done, and make use of fatal_trap() in preference to kexec_crash() in
case an unknown NMI occurs before a kdump kernel has been loaded.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e12e0b038219 -r 6d1a30dc47e8 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Mon Jun 11 15:11:58 2012 +0100
+++ b/xen/arch/x86/traps.c	Mon Jun 11 15:12:50 2012 +0100
@@ -3293,7 +3293,7 @@ static void io_check_error(struct cpu_us
     outb((inb(0x61) & 0x07) | 0x00, 0x61); /* enable IOCK */
 }
 
-static void unknown_nmi_error(unsigned char reason)
+static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
 {
     switch ( opt_nmi[0] )
     {
@@ -3302,10 +3302,10 @@ static void unknown_nmi_error(unsigned c
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
+        console_force_unlock();
         printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
-        printk("Dazed and confused, but trying to continue\n");
         printk("Do you have a strange power saving mode enabled?\n");
-        kexec_crash();
+        fatal_trap(TRAP_nmi, regs);
     }
 }
 
@@ -3338,7 +3338,7 @@ void do_nmi(struct cpu_user_regs *regs)
         else if ( reason & 0x40 )
             io_check_error(regs);
         else if ( !nmi_watchdog )
-            unknown_nmi_error((unsigned char)(reason&0xff));
+            unknown_nmi_error(regs, (unsigned char)(reason&0xff));
     }
 }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInY-0003JQ-OE; Sat, 23 Jun 2012 05:22:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0003IP-Ds
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from [85.158.138.51:41539] by server-10.bemta-3.messagelabs.com id
	2F/9E-01753-58255EF4; Sat, 23 Jun 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428931!20950167!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12775 invoked from network); 23 Jun 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0006Cg-C7
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0001IF-An
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Message-Id: <E1SiInT-0001IF-An@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/pygrub: Fix pygrub install
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Anthony PERARD <anthony.perard@citrix.com>
# Date 1339170170 -3600
# Node ID 997e40a482783b93538f8777e2f655f79a8ab1df
# Parent  474b5a6b1d91ad220bb74cadcbaf817db7236b09
tools/pygrub: Fix pygrub install

The script pygrub is currently installed in the wrong location. Instead of
/usr/lib/xen/bin, the script is installed in $destdir/usr/lib/xen/bin.
$(DESTDIR) is apply twice.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 474b5a6b1d91 -r 836e6618e86b tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:39:24 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:42:05 2012 +0100
@@ -12,7 +12,7 @@ build:
 install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
-		--install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)

diff -r 474b5a6b1d91 -r 997e40a48278 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:39:24 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:42:50 2012 +0100
@@ -12,7 +12,7 @@ build:
 install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
-		--install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInY-0003JQ-OE; Sat, 23 Jun 2012 05:22:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0003IP-Ds
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from [85.158.138.51:41539] by server-10.bemta-3.messagelabs.com id
	2F/9E-01753-58255EF4; Sat, 23 Jun 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428931!20950167!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12775 invoked from network); 23 Jun 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0006Cg-C7
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInT-0001IF-An
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:11 +0000
Message-Id: <E1SiInT-0001IF-An@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/pygrub: Fix pygrub install
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 Anthony PERARD <anthony.perard@citrix.com>
# Date 1339170170 -3600
# Node ID 997e40a482783b93538f8777e2f655f79a8ab1df
# Parent  474b5a6b1d91ad220bb74cadcbaf817db7236b09
tools/pygrub: Fix pygrub install

The script pygrub is currently installed in the wrong location. Instead of
/usr/lib/xen/bin, the script is installed in $destdir/usr/lib/xen/bin.
$(DESTDIR) is apply twice.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 474b5a6b1d91 -r 836e6618e86b tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:39:24 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:42:05 2012 +0100
@@ -12,7 +12,7 @@ build:
 install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
-		--install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)

diff -r 474b5a6b1d91 -r 997e40a48278 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Fri Jun 08 16:39:24 2012 +0100
+++ b/tools/pygrub/Makefile	Fri Jun 08 16:42:50 2012 +0100
@@ -12,7 +12,7 @@ build:
 install: all
 	CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
-		--install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInZ-0003KZ-8N; Sat, 23 Jun 2012 05:22:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0003I2-I4
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Received: from [85.158.143.35:55038] by server-3.bemta-4.messagelabs.com id
	22/05-05808-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1340428930!12972808!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26464 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CU-LP
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0001HH-6x
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Message-Id: <E1SiInR-0001HH-6x@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc: do not "panic" if a kernel is
	not a bzImage.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339167938 -3600
# Node ID cfbf0c3513d6a75e723542f270376e04436f524c
# Parent  4d40d7a4c6f1fcdb65558adb5b85e48e4600c190
libxc: do not "panic" if a kernel is not a bzImage.

Up until the point where we think this is a bzImage there is no point in
printing panicy messages -- some other loader will have a go (probably the
compressed ELF one)

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


diff -r 4d40d7a4c6f1 -r cfbf0c3513d6 tools/libxc/xc_dom_bzimageloader.c
--- a/tools/libxc/xc_dom_bzimageloader.c	Fri Jun 08 15:33:54 2012 +0100
+++ b/tools/libxc/xc_dom_bzimageloader.c	Fri Jun 08 16:05:38 2012 +0100
@@ -575,8 +575,7 @@ static int xc_dom_probe_bzimage_kernel(s
 
     if ( dom->kernel_size < sizeof(struct setup_header) )
     {
-        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
-                     "%s: kernel image too small", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel image too small", __FUNCTION__);
         return -EINVAL;
     }
 
@@ -584,8 +583,7 @@ static int xc_dom_probe_bzimage_kernel(s
 
     if ( memcmp(&hdr->header, HDR_MAGIC, HDR_MAGIC_SZ) != 0 )
     {
-        xc_dom_panic(dom->xch, XC_INVALID_KERNEL,
-                     "%s: kernel is not a bzImage", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel is not a bzImage", __FUNCTION__);
         return -EINVAL;
     }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInZ-0003KZ-8N; Sat, 23 Jun 2012 05:22:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0003I2-I4
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Received: from [85.158.143.35:55038] by server-3.bemta-4.messagelabs.com id
	22/05-05808-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1340428930!12972808!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26464 invoked from network); 23 Jun 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0006CU-LP
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInR-0001HH-6x
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:09 +0000
Message-Id: <E1SiInR-0001HH-6x@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc: do not "panic" if a kernel is
	not a bzImage.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1339167938 -3600
# Node ID cfbf0c3513d6a75e723542f270376e04436f524c
# Parent  4d40d7a4c6f1fcdb65558adb5b85e48e4600c190
libxc: do not "panic" if a kernel is not a bzImage.

Up until the point where we think this is a bzImage there is no point in
printing panicy messages -- some other loader will have a go (probably the
compressed ELF one)

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


diff -r 4d40d7a4c6f1 -r cfbf0c3513d6 tools/libxc/xc_dom_bzimageloader.c
--- a/tools/libxc/xc_dom_bzimageloader.c	Fri Jun 08 15:33:54 2012 +0100
+++ b/tools/libxc/xc_dom_bzimageloader.c	Fri Jun 08 16:05:38 2012 +0100
@@ -575,8 +575,7 @@ static int xc_dom_probe_bzimage_kernel(s
 
     if ( dom->kernel_size < sizeof(struct setup_header) )
     {
-        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
-                     "%s: kernel image too small", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel image too small", __FUNCTION__);
         return -EINVAL;
     }
 
@@ -584,8 +583,7 @@ static int xc_dom_probe_bzimage_kernel(s
 
     if ( memcmp(&hdr->header, HDR_MAGIC, HDR_MAGIC_SZ) != 0 )
     {
-        xc_dom_panic(dom->xch, XC_INVALID_KERNEL,
-                     "%s: kernel is not a bzImage", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel is not a bzImage", __FUNCTION__);
         return -EINVAL;
     }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003Ls-Aw; Sat, 23 Jun 2012 05:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0003JH-UO
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [85.158.143.99:46583] by server-1.bemta-4.messagelabs.com id
	46/60-24392-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-216.messagelabs.com!1340428934!23436732!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3971 invoked from network); 23 Jun 2012 05:22:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0006Cy-Hl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0001Jl-DN
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Message-Id: <E1SiInW-0001Jl-DN@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86_64: Do not execute sysret with a
	non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497220 -3600
# Node ID 76eaf5966c05a4a10fd29eee6968977fd9d4ce6d
# Parent  61dfb3da56b0a3ac86f81f4a8770e11e1dbc2aa9
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 61dfb3da56b0 -r 76eaf5966c05 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Mon Jun 11 15:15:28 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:33:40 2012 +0100
@@ -40,6 +40,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -50,6 +57,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIna-0003Ls-Aw; Sat, 23 Jun 2012 05:22:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0003JH-UO
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from [85.158.143.99:46583] by server-1.bemta-4.messagelabs.com id
	46/60-24392-88255EF4; Sat, 23 Jun 2012 05:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-216.messagelabs.com!1340428934!23436732!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3971 invoked from network); 23 Jun 2012 05:22:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0006Cy-Hl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0001Jl-DN
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Message-Id: <E1SiInW-0001Jl-DN@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86_64: Do not execute sysret with a
	non-canonical return 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497220 -3600
# Node ID 76eaf5966c05a4a10fd29eee6968977fd9d4ce6d
# Parent  61dfb3da56b0a3ac86f81f4a8770e11e1dbc2aa9
x86_64: Do not execute sysret with a non-canonical return address

Check for non-canonical guest RIP before attempting to execute sysret.
If sysret is executed with a non-canonical value in RCX, Intel CPUs
take the fault in ring0, but we will necessarily already have switched
to the the user's stack pointer.

This is a security vulnerability, XSA-7 / CVE-2012-0217.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 61dfb3da56b0 -r 76eaf5966c05 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Mon Jun 11 15:15:28 2012 +0100
+++ b/xen/arch/x86/x86_64/entry.S	Tue Jun 12 11:33:40 2012 +0100
@@ -40,6 +40,13 @@ restore_all_guest:
         testw $TRAP_syscall,4(%rsp)
         jz    iret_exit_to_guest
 
+        /* Don't use SYSRET path if the return address is not canonical. */
+        movq  8(%rsp),%rcx
+        sarq  $47,%rcx
+        incl  %ecx
+        cmpl  $1,%ecx
+        ja    .Lforce_iret
+
         addq  $8,%rsp
         popq  %rcx                    # RIP
         popq  %r11                    # CS
@@ -50,6 +57,10 @@ restore_all_guest:
         sysretq
 1:      sysretl
 
+.Lforce_iret:
+        /* Mimic SYSRET behavior. */
+        movq  8(%rsp),%rcx            # RIP
+        movq  24(%rsp),%r11           # RFLAGS
         ALIGN
 /* No special register assumptions. */
 iret_exit_to_guest:

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003Q0-QQ; Sat, 23 Jun 2012 05:22:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0003I2-PJ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from [85.158.143.99:46615] by server-3.bemta-4.messagelabs.com id
	D3/05-05808-A8255EF4; Sat, 23 Jun 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1340428936!22326868!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31895 invoked from network); 23 Jun 2012 05:22:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0006DA-Iz
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0001Kk-EP
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Message-Id: <E1SiInY-0001Kk-EP@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86,
	cpufreq: Change powernow's CPB status immediately
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1340028523 -3600
# Node ID c272cfe25bea00375fb65c339926c83b6e830230
# Parent  9dffb1864f2c516794a90a8ceece3eb044dab212
x86, cpufreq: Change powernow's CPB status immediately

When command to modify turbo mode (CPB on AMD processors) comes
in the actual change happens later, when P-state transition is
requested. There is no time limit on when this transition will
occur and therefore change in CPB state may take long time from
the moment when command to toggle it is issued.

This patch makes CPB mode change happen immediately when request
is made.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 9dffb1864f2c -r c272cfe25bea xen/arch/x86/acpi/cpufreq/powernow.c
--- a/xen/arch/x86/acpi/cpufreq/powernow.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c	Mon Jun 18 15:08:43 2012 +0100
@@ -68,16 +68,37 @@ static void transition_pstate(void *drvc
     struct drv_cmd *cmd;
     cmd = (struct drv_cmd *) drvcmd;
 
-    if (cmd->turbo != CPUFREQ_TURBO_UNSUPPORTED) {
+
+    wrmsrl(MSR_PSTATE_CTRL, cmd->val);
+}
+
+static void update_cpb(void *data)
+{
+    struct cpufreq_policy *policy = (struct cpufreq_policy *)data;
+
+    if (policy->turbo != CPUFREQ_TURBO_UNSUPPORTED) {
         uint64_t msr_content;
+ 
         rdmsrl(MSR_K8_HWCR, msr_content);
-        if (cmd->turbo == CPUFREQ_TURBO_ENABLED)
+
+        if (policy->turbo == CPUFREQ_TURBO_ENABLED)
             msr_content &= ~MSR_HWCR_CPBDIS_MASK;
         else
             msr_content |= MSR_HWCR_CPBDIS_MASK; 
+
         wrmsrl(MSR_K8_HWCR, msr_content);
     }
-    wrmsrl(MSR_PSTATE_CTRL, cmd->val);
+}
+
+static int powernow_cpufreq_update (int cpuid,
+				     struct cpufreq_policy *policy)
+{
+    if (!cpumask_test_cpu(cpuid, &cpu_online_map))
+        return -EINVAL;
+
+    on_selected_cpus(cpumask_of(cpuid), update_cpb, policy, 1);
+
+    return 0;
 }
 
 static int powernow_cpufreq_target(struct cpufreq_policy *policy,
@@ -300,7 +321,8 @@ static struct cpufreq_driver powernow_cp
     .verify = powernow_cpufreq_verify,
     .target = powernow_cpufreq_target,
     .init   = powernow_cpufreq_cpu_init,
-    .exit   = powernow_cpufreq_cpu_exit
+    .exit   = powernow_cpufreq_cpu_exit,
+    .update = powernow_cpufreq_update
 };
 
 unsigned int __init powernow_register_driver()
diff -r 9dffb1864f2c -r c272cfe25bea xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Mon Jun 18 15:08:43 2012 +0100
@@ -494,13 +494,13 @@ int do_pm_op(struct xen_sysctl_pm_op *op
 
     case XEN_SYSCTL_pm_op_enable_turbo:
     {
-        cpufreq_enable_turbo(op->cpuid);
+        ret = cpufreq_update_turbo(op->cpuid, CPUFREQ_TURBO_ENABLED);
         break;
     }
 
     case XEN_SYSCTL_pm_op_disable_turbo:
     {
-        cpufreq_disable_turbo(op->cpuid);
+        ret = cpufreq_update_turbo(op->cpuid, CPUFREQ_TURBO_DISABLED);
         break;
     }
 
diff -r 9dffb1864f2c -r c272cfe25bea xen/drivers/cpufreq/utility.c
--- a/xen/drivers/cpufreq/utility.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/drivers/cpufreq/utility.c	Mon Jun 18 15:08:43 2012 +0100
@@ -390,23 +390,38 @@ int cpufreq_driver_getavg(unsigned int c
     return policy->cur;
 }
 
-void cpufreq_enable_turbo(int cpuid)
+int cpufreq_update_turbo(int cpuid, int new_state)
 {
     struct cpufreq_policy *policy;
+    int curr_state;
+    int ret = 0;
+
+    if (new_state != CPUFREQ_TURBO_ENABLED &&
+        new_state != CPUFREQ_TURBO_DISABLED)
+        return -EINVAL;
 
     policy = per_cpu(cpufreq_cpu_policy, cpuid);
-    if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
-        policy->turbo = CPUFREQ_TURBO_ENABLED;
+    if (!policy)
+        return -EACCES;
+
+    if (policy->turbo == CPUFREQ_TURBO_UNSUPPORTED)
+        return -EOPNOTSUPP;
+
+    curr_state = policy->turbo;
+    if (curr_state == new_state)
+        return 0;
+
+    policy->turbo = new_state;
+    if (cpufreq_driver->update)
+    {
+        ret = cpufreq_driver->update(cpuid, policy);
+        if (ret)
+            policy->turbo = curr_state;
+    }
+
+    return ret;
 }
 
-void cpufreq_disable_turbo(int cpuid)
-{
-    struct cpufreq_policy *policy;
-
-    policy = per_cpu(cpufreq_cpu_policy, cpuid);
-    if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
-        policy->turbo = CPUFREQ_TURBO_DISABLED;
-}
 
 int cpufreq_get_turbo_status(int cpuid)
 {
diff -r 9dffb1864f2c -r c272cfe25bea xen/include/acpi/cpufreq/cpufreq.h
--- a/xen/include/acpi/cpufreq/cpufreq.h	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/include/acpi/cpufreq/cpufreq.h	Mon Jun 18 15:08:43 2012 +0100
@@ -124,8 +124,7 @@ extern int cpufreq_driver_getavg(unsigne
 #define CPUFREQ_TURBO_UNSUPPORTED   0
 #define CPUFREQ_TURBO_ENABLED       1
 
-extern void cpufreq_enable_turbo(int cpuid);
-extern void cpufreq_disable_turbo(int cpuid);
+extern int cpufreq_update_turbo(int cpuid, int new_state);
 extern int cpufreq_get_turbo_status(int cpuid);
 
 static __inline__ int 
@@ -146,6 +145,7 @@ struct cpufreq_driver {
     char   name[CPUFREQ_NAME_LEN];
     int    (*init)(struct cpufreq_policy *policy);
     int    (*verify)(struct cpufreq_policy *policy);
+    int    (*update)(int cpuid, struct cpufreq_policy *policy);
     int    (*target)(struct cpufreq_policy *policy,
                      unsigned int target_freq,
                      unsigned int relation);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003Q0-QQ; Sat, 23 Jun 2012 05:22:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0003I2-PJ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from [85.158.143.99:46615] by server-3.bemta-4.messagelabs.com id
	D3/05-05808-A8255EF4; Sat, 23 Jun 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1340428936!22326868!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31895 invoked from network); 23 Jun 2012 05:22:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0006DA-Iz
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInY-0001Kk-EP
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:16 +0000
Message-Id: <E1SiInY-0001Kk-EP@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86,
	cpufreq: Change powernow's CPB status immediately
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1340028523 -3600
# Node ID c272cfe25bea00375fb65c339926c83b6e830230
# Parent  9dffb1864f2c516794a90a8ceece3eb044dab212
x86, cpufreq: Change powernow's CPB status immediately

When command to modify turbo mode (CPB on AMD processors) comes
in the actual change happens later, when P-state transition is
requested. There is no time limit on when this transition will
occur and therefore change in CPB state may take long time from
the moment when command to toggle it is issued.

This patch makes CPB mode change happen immediately when request
is made.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 9dffb1864f2c -r c272cfe25bea xen/arch/x86/acpi/cpufreq/powernow.c
--- a/xen/arch/x86/acpi/cpufreq/powernow.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c	Mon Jun 18 15:08:43 2012 +0100
@@ -68,16 +68,37 @@ static void transition_pstate(void *drvc
     struct drv_cmd *cmd;
     cmd = (struct drv_cmd *) drvcmd;
 
-    if (cmd->turbo != CPUFREQ_TURBO_UNSUPPORTED) {
+
+    wrmsrl(MSR_PSTATE_CTRL, cmd->val);
+}
+
+static void update_cpb(void *data)
+{
+    struct cpufreq_policy *policy = (struct cpufreq_policy *)data;
+
+    if (policy->turbo != CPUFREQ_TURBO_UNSUPPORTED) {
         uint64_t msr_content;
+ 
         rdmsrl(MSR_K8_HWCR, msr_content);
-        if (cmd->turbo == CPUFREQ_TURBO_ENABLED)
+
+        if (policy->turbo == CPUFREQ_TURBO_ENABLED)
             msr_content &= ~MSR_HWCR_CPBDIS_MASK;
         else
             msr_content |= MSR_HWCR_CPBDIS_MASK; 
+
         wrmsrl(MSR_K8_HWCR, msr_content);
     }
-    wrmsrl(MSR_PSTATE_CTRL, cmd->val);
+}
+
+static int powernow_cpufreq_update (int cpuid,
+				     struct cpufreq_policy *policy)
+{
+    if (!cpumask_test_cpu(cpuid, &cpu_online_map))
+        return -EINVAL;
+
+    on_selected_cpus(cpumask_of(cpuid), update_cpb, policy, 1);
+
+    return 0;
 }
 
 static int powernow_cpufreq_target(struct cpufreq_policy *policy,
@@ -300,7 +321,8 @@ static struct cpufreq_driver powernow_cp
     .verify = powernow_cpufreq_verify,
     .target = powernow_cpufreq_target,
     .init   = powernow_cpufreq_cpu_init,
-    .exit   = powernow_cpufreq_cpu_exit
+    .exit   = powernow_cpufreq_cpu_exit,
+    .update = powernow_cpufreq_update
 };
 
 unsigned int __init powernow_register_driver()
diff -r 9dffb1864f2c -r c272cfe25bea xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Mon Jun 18 15:08:43 2012 +0100
@@ -494,13 +494,13 @@ int do_pm_op(struct xen_sysctl_pm_op *op
 
     case XEN_SYSCTL_pm_op_enable_turbo:
     {
-        cpufreq_enable_turbo(op->cpuid);
+        ret = cpufreq_update_turbo(op->cpuid, CPUFREQ_TURBO_ENABLED);
         break;
     }
 
     case XEN_SYSCTL_pm_op_disable_turbo:
     {
-        cpufreq_disable_turbo(op->cpuid);
+        ret = cpufreq_update_turbo(op->cpuid, CPUFREQ_TURBO_DISABLED);
         break;
     }
 
diff -r 9dffb1864f2c -r c272cfe25bea xen/drivers/cpufreq/utility.c
--- a/xen/drivers/cpufreq/utility.c	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/drivers/cpufreq/utility.c	Mon Jun 18 15:08:43 2012 +0100
@@ -390,23 +390,38 @@ int cpufreq_driver_getavg(unsigned int c
     return policy->cur;
 }
 
-void cpufreq_enable_turbo(int cpuid)
+int cpufreq_update_turbo(int cpuid, int new_state)
 {
     struct cpufreq_policy *policy;
+    int curr_state;
+    int ret = 0;
+
+    if (new_state != CPUFREQ_TURBO_ENABLED &&
+        new_state != CPUFREQ_TURBO_DISABLED)
+        return -EINVAL;
 
     policy = per_cpu(cpufreq_cpu_policy, cpuid);
-    if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
-        policy->turbo = CPUFREQ_TURBO_ENABLED;
+    if (!policy)
+        return -EACCES;
+
+    if (policy->turbo == CPUFREQ_TURBO_UNSUPPORTED)
+        return -EOPNOTSUPP;
+
+    curr_state = policy->turbo;
+    if (curr_state == new_state)
+        return 0;
+
+    policy->turbo = new_state;
+    if (cpufreq_driver->update)
+    {
+        ret = cpufreq_driver->update(cpuid, policy);
+        if (ret)
+            policy->turbo = curr_state;
+    }
+
+    return ret;
 }
 
-void cpufreq_disable_turbo(int cpuid)
-{
-    struct cpufreq_policy *policy;
-
-    policy = per_cpu(cpufreq_cpu_policy, cpuid);
-    if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
-        policy->turbo = CPUFREQ_TURBO_DISABLED;
-}
 
 int cpufreq_get_turbo_status(int cpuid)
 {
diff -r 9dffb1864f2c -r c272cfe25bea xen/include/acpi/cpufreq/cpufreq.h
--- a/xen/include/acpi/cpufreq/cpufreq.h	Thu Jun 14 16:05:42 2012 +0100
+++ b/xen/include/acpi/cpufreq/cpufreq.h	Mon Jun 18 15:08:43 2012 +0100
@@ -124,8 +124,7 @@ extern int cpufreq_driver_getavg(unsigne
 #define CPUFREQ_TURBO_UNSUPPORTED   0
 #define CPUFREQ_TURBO_ENABLED       1
 
-extern void cpufreq_enable_turbo(int cpuid);
-extern void cpufreq_disable_turbo(int cpuid);
+extern int cpufreq_update_turbo(int cpuid, int new_state);
 extern int cpufreq_get_turbo_status(int cpuid);
 
 static __inline__ int 
@@ -146,6 +145,7 @@ struct cpufreq_driver {
     char   name[CPUFREQ_NAME_LEN];
     int    (*init)(struct cpufreq_policy *policy);
     int    (*verify)(struct cpufreq_policy *policy);
+    int    (*update)(int cpuid, struct cpufreq_policy *policy);
     int    (*target)(struct cpufreq_policy *policy,
                      unsigned int target_freq,
                      unsigned int relation);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003QH-TO; Sat, 23 Jun 2012 05:22:20 +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 1SiInb-0003IP-HQ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from [85.158.138.51:39211] by server-10.bemta-3.messagelabs.com id
	56/AE-01753-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428937!20950173!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12865 invoked from network); 23 Jun 2012 05:22:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0006DD-2N
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0001L0-0x
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Message-Id: <E1SiInZ-0001L0-0x@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: don't allow non-canonical
	addresses to be set for any 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340031721 -7200
# Node ID 5b6a857411ba5212c71885a2fd39cae4c3d8231c
# Parent  c272cfe25bea00375fb65c339926c83b6e830230
x86-64: don't allow non-canonical addresses to be set for any callback

Rather than deferring the detection of these to the point where they
get actually used (the fix for XSA-7, 25480:76eaf5966c05, causing a #GP
to be raised by IRET, which invokes the guest's [fragile] fail-safe
callback), don't even allow such to be set.

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


diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/domain.c	Mon Jun 18 17:02:01 2012 +0200
@@ -736,6 +736,14 @@ int arch_set_info_guest(
     {
         if ( !compat )
         {
+#ifdef __x86_64__
+            if ( !is_canonical_address(c.nat->user_regs.eip) ||
+                 !is_canonical_address(c.nat->event_callback_eip) ||
+                 !is_canonical_address(c.nat->syscall_callback_eip) ||
+                 !is_canonical_address(c.nat->failsafe_callback_eip) )
+                return -EINVAL;
+#endif
+
             fixup_guest_stack_selector(d, c.nat->user_regs.ss);
             fixup_guest_stack_selector(d, c.nat->kernel_ss);
             fixup_guest_code_selector(d, c.nat->user_regs.cs);
@@ -745,7 +753,11 @@ int arch_set_info_guest(
 #endif
 
             for ( i = 0; i < 256; i++ )
+            {
+                if ( !is_canonical_address(c.nat->trap_ctxt[i].address) )
+                    return -EINVAL;
                 fixup_guest_code_selector(d, c.nat->trap_ctxt[i].cs);
+            }
 
             /* LDT safety checks. */
             if ( ((c.nat->ldt_base & (PAGE_SIZE-1)) != 0) ||
diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/domctl.c	Mon Jun 18 17:02:01 2012 +0200
@@ -1033,6 +1033,9 @@ long arch_do_domctl(
 #ifdef __x86_64__
             if ( !is_hvm_domain(d) )
             {
+                if ( !is_canonical_address(evc->sysenter_callback_eip) ||
+                     !is_canonical_address(evc->syscall32_callback_eip) )
+                    goto ext_vcpucontext_out;
                 fixup_guest_code_selector(d, evc->sysenter_callback_cs);
                 v->arch.pv_vcpu.sysenter_callback_cs      =
                     evc->sysenter_callback_cs;
diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/traps.c	Mon Jun 18 17:02:01 2012 +0200
@@ -3581,6 +3581,9 @@ long register_guest_nmi_callback(unsigne
     struct domain *d = v->domain;
     struct trap_info *t = &v->arch.pv_vcpu.trap_ctxt[TRAP_nmi];
 
+    if ( !is_canonical_address(address) )
+        return -EINVAL;
+
     t->vector  = TRAP_nmi;
     t->flags   = 0;
     t->cs      = (is_pv_32on64_domain(d) ?
@@ -3708,6 +3711,9 @@ long do_set_trap_table(XEN_GUEST_HANDLE(
         if ( cur.address == 0 )
             break;
 
+        if ( !is_canonical_address(cur.address) )
+            return -EINVAL;
+
         fixup_guest_code_selector(curr->domain, cur.cs);
 
         memcpy(&dst[cur.vector], &cur, sizeof(cur));

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003QH-TO; Sat, 23 Jun 2012 05:22:20 +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 1SiInb-0003IP-HQ
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from [85.158.138.51:39211] by server-10.bemta-3.messagelabs.com id
	56/AE-01753-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428937!20950173!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12865 invoked from network); 23 Jun 2012 05:22:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0006DD-2N
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0001L0-0x
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Message-Id: <E1SiInZ-0001L0-0x@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: don't allow non-canonical
	addresses to be set for any 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340031721 -7200
# Node ID 5b6a857411ba5212c71885a2fd39cae4c3d8231c
# Parent  c272cfe25bea00375fb65c339926c83b6e830230
x86-64: don't allow non-canonical addresses to be set for any callback

Rather than deferring the detection of these to the point where they
get actually used (the fix for XSA-7, 25480:76eaf5966c05, causing a #GP
to be raised by IRET, which invokes the guest's [fragile] fail-safe
callback), don't even allow such to be set.

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


diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/domain.c	Mon Jun 18 17:02:01 2012 +0200
@@ -736,6 +736,14 @@ int arch_set_info_guest(
     {
         if ( !compat )
         {
+#ifdef __x86_64__
+            if ( !is_canonical_address(c.nat->user_regs.eip) ||
+                 !is_canonical_address(c.nat->event_callback_eip) ||
+                 !is_canonical_address(c.nat->syscall_callback_eip) ||
+                 !is_canonical_address(c.nat->failsafe_callback_eip) )
+                return -EINVAL;
+#endif
+
             fixup_guest_stack_selector(d, c.nat->user_regs.ss);
             fixup_guest_stack_selector(d, c.nat->kernel_ss);
             fixup_guest_code_selector(d, c.nat->user_regs.cs);
@@ -745,7 +753,11 @@ int arch_set_info_guest(
 #endif
 
             for ( i = 0; i < 256; i++ )
+            {
+                if ( !is_canonical_address(c.nat->trap_ctxt[i].address) )
+                    return -EINVAL;
                 fixup_guest_code_selector(d, c.nat->trap_ctxt[i].cs);
+            }
 
             /* LDT safety checks. */
             if ( ((c.nat->ldt_base & (PAGE_SIZE-1)) != 0) ||
diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/domctl.c	Mon Jun 18 17:02:01 2012 +0200
@@ -1033,6 +1033,9 @@ long arch_do_domctl(
 #ifdef __x86_64__
             if ( !is_hvm_domain(d) )
             {
+                if ( !is_canonical_address(evc->sysenter_callback_eip) ||
+                     !is_canonical_address(evc->syscall32_callback_eip) )
+                    goto ext_vcpucontext_out;
                 fixup_guest_code_selector(d, evc->sysenter_callback_cs);
                 v->arch.pv_vcpu.sysenter_callback_cs      =
                     evc->sysenter_callback_cs;
diff -r c272cfe25bea -r 5b6a857411ba xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Mon Jun 18 15:08:43 2012 +0100
+++ b/xen/arch/x86/traps.c	Mon Jun 18 17:02:01 2012 +0200
@@ -3581,6 +3581,9 @@ long register_guest_nmi_callback(unsigne
     struct domain *d = v->domain;
     struct trap_info *t = &v->arch.pv_vcpu.trap_ctxt[TRAP_nmi];
 
+    if ( !is_canonical_address(address) )
+        return -EINVAL;
+
     t->vector  = TRAP_nmi;
     t->flags   = 0;
     t->cs      = (is_pv_32on64_domain(d) ?
@@ -3708,6 +3711,9 @@ long do_set_trap_table(XEN_GUEST_HANDLE(
         if ( cur.address == 0 )
             break;
 
+        if ( !is_canonical_address(cur.address) )
+            return -EINVAL;
+
         fixup_guest_code_selector(curr->domain, cur.cs);
 
         memcpy(&dst[cur.vector], &cur, sizeof(cur));

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003Pn-JD; Sat, 23 Jun 2012 05:22:20 +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 1SiIna-0003Lr-Od
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from [193.109.254.147:37871] by server-4.bemta-14.messagelabs.com id
	27/DA-02077-A8255EF4; Sat, 23 Jun 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-27.messagelabs.com!1340428936!10320919!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1935 invoked from network); 23 Jun 2012 05:22:17 -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;
	23 Jun 2012 05:22:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0006D7-Vv
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0001KU-Uc
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Message-Id: <E1SiInX-0001KU-Uc@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: propagate down the error from
	libxl_domain_sched_params_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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1339686342 -3600
# Node ID 9dffb1864f2c516794a90a8ceece3eb044dab212
# Parent  34c725807d21451f50e7dc4ece36b137b8b35169
libxl: propagate down the error from libxl_domain_sched_params_set

So that the caller (e.g., libxl__build_post() ) knows and can deal with it.

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


diff -r 34c725807d21 -r 9dffb1864f2c tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Wed Jun 13 11:51:26 2012 +0200
+++ b/tools/libxl/libxl_dom.c	Thu Jun 14 16:05:42 2012 +0100
@@ -173,9 +173,11 @@ int libxl__build_post(libxl__gc *gc, uin
     char *dom_path, *vm_path;
     xs_transaction_t t;
     char **ents, **hvm_ents;
-    int i;
+    int i, rc;
 
-    libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    rc = libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    if (rc)
+        return rc;
 
     libxl_cpuid_apply_policy(ctx, domid);
     if (info->cpuid != NULL)

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInc-0003Pn-JD; Sat, 23 Jun 2012 05:22:20 +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 1SiIna-0003Lr-Od
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from [193.109.254.147:37871] by server-4.bemta-14.messagelabs.com id
	27/DA-02077-A8255EF4; Sat, 23 Jun 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-27.messagelabs.com!1340428936!10320919!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1935 invoked from network); 23 Jun 2012 05:22:17 -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;
	23 Jun 2012 05:22:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0006D7-Vv
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInX-0001KU-Uc
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:15 +0000
Message-Id: <E1SiInX-0001KU-Uc@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: propagate down the error from
	libxl_domain_sched_params_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

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1339686342 -3600
# Node ID 9dffb1864f2c516794a90a8ceece3eb044dab212
# Parent  34c725807d21451f50e7dc4ece36b137b8b35169
libxl: propagate down the error from libxl_domain_sched_params_set

So that the caller (e.g., libxl__build_post() ) knows and can deal with it.

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


diff -r 34c725807d21 -r 9dffb1864f2c tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Wed Jun 13 11:51:26 2012 +0200
+++ b/tools/libxl/libxl_dom.c	Thu Jun 14 16:05:42 2012 +0100
@@ -173,9 +173,11 @@ int libxl__build_post(libxl__gc *gc, uin
     char *dom_path, *vm_path;
     xs_transaction_t t;
     char **ents, **hvm_ents;
-    int i;
+    int i, rc;
 
-    libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    rc = libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    if (rc)
+        return rc;
 
     libxl_cpuid_apply_policy(ctx, domid);
     if (info->cpuid != NULL)

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22: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 1SiIne-0003Rv-1h; Sat, 23 Jun 2012 05:22:22 +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 1SiInc-0003PA-H0
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from [85.158.138.51:39224] by server-11.bemta-3.messagelabs.com id
	05/D1-02904-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1340428935!29113169!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27908 invoked from network); 23 Jun 2012 05:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0006D1-VB
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0001K0-Tw
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Message-Id: <E1SiInW-0001K0-Tw@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: detect processors subject to
	AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497222 -3600
# Node ID bc2f3a848f9a7c23b4a3736d0215732b1f039219
# Parent  76eaf5966c05a4a10fd29eee6968977fd9d4ce6d
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 76eaf5966c05 -r bc2f3a848f9a docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown	Tue Jun 12 11:33:40 2012 +0100
+++ b/docs/misc/xen-command-line.markdown	Tue Jun 12 11:33:42 2012 +0100
@@ -126,6 +126,16 @@ Override Xen's logic for choosing the AP
 there are more than 8 CPUs, Xen will switch to `bigsmp` over
 `default`.
 
+### allow\_unsafe
+> `= <boolean>`
+
+Force boot on potentially unsafe systems. By default Xen will refuse to boot on
+systems with the following errata:
+
+* AMD Erratum 121. Processors with this erratum are subject to a guest
+  triggerable Denial of Service. Override only if you trust all of your PV
+  guests.
+
 ### apic\_verbosity
 > `= verbose | debug`
 
diff -r 76eaf5966c05 -r bc2f3a848f9a xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:33:40 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:33:42 2012 +0100
@@ -32,6 +32,9 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static bool_t opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -493,6 +496,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 
diff -r 76eaf5966c05 -r bc2f3a848f9a xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:33:40 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:33:42 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22: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 1SiIne-0003Rv-1h; Sat, 23 Jun 2012 05:22:22 +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 1SiInc-0003PA-H0
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from [85.158.138.51:39224] by server-11.bemta-3.messagelabs.com id
	05/D1-02904-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1340428935!29113169!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27908 invoked from network); 23 Jun 2012 05:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0006D1-VB
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInW-0001K0-Tw
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:14 +0000
Message-Id: <E1SiInW-0001K0-Tw@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: detect processors subject to
	AMD erratum #121 and refuse to 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

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1339497222 -3600
# Node ID bc2f3a848f9a7c23b4a3736d0215732b1f039219
# Parent  76eaf5966c05a4a10fd29eee6968977fd9d4ce6d
x86-64: detect processors subject to AMD erratum #121 and refuse to boot

Processors with this erratum are subject to a DoS attack by unprivileged
guest users.

This is XSA-9 / CVE-2012-2934.

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 76eaf5966c05 -r bc2f3a848f9a docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown	Tue Jun 12 11:33:40 2012 +0100
+++ b/docs/misc/xen-command-line.markdown	Tue Jun 12 11:33:42 2012 +0100
@@ -126,6 +126,16 @@ Override Xen's logic for choosing the AP
 there are more than 8 CPUs, Xen will switch to `bigsmp` over
 `default`.
 
+### allow\_unsafe
+> `= <boolean>`
+
+Force boot on potentially unsafe systems. By default Xen will refuse to boot on
+systems with the following errata:
+
+* AMD Erratum 121. Processors with this erratum are subject to a guest
+  triggerable Denial of Service. Override only if you trust all of your PV
+  guests.
+
 ### apic\_verbosity
 > `= verbose | debug`
 
diff -r 76eaf5966c05 -r bc2f3a848f9a xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:33:40 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c	Tue Jun 12 11:33:42 2012 +0100
@@ -32,6 +32,9 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static bool_t opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
 {
@@ -493,6 +496,11 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
 
 #ifdef __x86_64__
+	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+		panic("Xen will not boot on this CPU for security reasons.\n"
+		      "Pass \"allow_unsafe\" if you're trusting all your"
+		      " (PV) guest kernels.\n");
+
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
 
diff -r 76eaf5966c05 -r bc2f3a848f9a xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Tue Jun 12 11:33:40 2012 +0100
+++ b/xen/include/asm-x86/amd.h	Tue Jun 12 11:33:42 2012 +0100
@@ -127,6 +127,9 @@
 #define AMD_MODEL_RANGE_START(range)    (((range) >> 12) & 0xfff)
 #define AMD_MODEL_RANGE_END(range)      ((range) & 0xfff)
 
+#define AMD_ERRATUM_121                                                 \
+    AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
 #define AMD_ERRATUM_170                                                 \
     AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22: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 1SiIne-0003S1-4Q; Sat, 23 Jun 2012 05:22:22 +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 1SiInc-0003HW-Km
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from [85.158.143.35:57055] by server-2.bemta-4.messagelabs.com id
	16/05-17938-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340428937!16577165!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19627 invoked from network); 23 Jun 2012 05:22:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0006DG-J2
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0001LF-Hl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Message-Id: <E1SiInZ-0001LF-Hl@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64/EFI: document building and
	usage
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340271022 -7200
# Node ID d4cdcf4d541cc4ce72c48df2e26c2b506c5b04bd
# Parent  5b6a857411ba5212c71885a2fd39cae4c3d8231c
x86-64/EFI: document building and usage

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


diff -r 5b6a857411ba -r d4cdcf4d541c docs/misc/efi.markdown
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/misc/efi.markdown	Thu Jun 21 11:30:22 2012 +0200
@@ -0,0 +1,79 @@
+Building xen.efi requires gcc 4.5.x or above (4.6.x or newer recommended, as
+4.5.x was probably never really tested for this purpose) and binutils 2.22 or
+newer. Additionally, the binutils build must be configured to include support
+for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
+of equivalent effect should be passed to the configure script).
+
+Once built, `make install-xen` can place the resulting binary directly into
+the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
+`EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` not
+match your system).
+
+The binary itself will require a configuration file (names with the `.efi`
+extension of the binary's name replaced by `.cfg`, and - until an existing
+file is found - trailing name components dropped at `.`, `-`, and `_`
+separators will be tried) to be present in the same directory as the binary.
+(To illustrate the name handling, a binary named `xen-4.2-unstable.efi` would
+try `xen-4.2-unstable.cfg`, `xen-4.2.cfg`, `xen-4.cfg`, and `xen.cfg` in
+order.) One can override this with a command line option (`-cfg=<filename>`).
+
+The configuration file consists of one or more sections headed by a section
+name enclosed in square brackets, with individual values specified in each
+section. A section named `[global]` is treated specially to allow certain
+settings to apply to all other sections (or to provide defaults for certain
+settings in case individual sections don't specify them). A typical file would
+thus look like this (`#` serving as comment character):
+
+    **************************example begin******************************
+
+    [global]
+    default=sle11sp2
+    
+    [sle11sp2]
+    options=console=vga,com1 com1=57600 loglvl=all noreboot
+    kernel=vmlinuz-3.0.31-0.4-xen ignore_loglevel #earlyprintk=xen
+    ramdisk=initrd-3.0.31-0.4-xen
+
+    **************************example end********************************
+
+The individual values used here are:
+
+###`default=<name>`
+
+Specifies the section to use for booting, if none was specified on the command
+line; only meaningful in the `[global]` section. This isn't required; if
+absent, section headers will be ignored and for each value looked for the
+first instance within the file will be used.
+
+###`options=<text>`
+
+Specifies the options passed to the hypervisor, see [Xen Hypervisor Command
+Line Options](xen-command-line.html).
+
+###`kernel=<filename>[ <options>]`
+
+Specifies the Dom0 kernel binary and the options to pass to it.
+
+###`ramdisk=<filename>`
+
+Specifies a Linux-style initial RAM disk image to load.
+
+Other values to specify are:
+
+###`video=gfx-<xres>[x<yres>[x<depth>]]`
+
+Specifies a video mode to select if available. In case of problems, the
+`-basevideo` command line option can be used to skip altering video modes.
+
+###`xsm=<filename>`
+
+Specifies an XSM module to load.
+
+###`ucode=<filename>`
+
+Specifies a CPU microcode blob to load.
+
+Filenames must be specified relative to the location of the EFI binary.
+
+Extra options to be passed to Xen can also be specified on the command line,
+following a `--` separator option.

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22: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 1SiIne-0003S1-4Q; Sat, 23 Jun 2012 05:22:22 +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 1SiInc-0003HW-Km
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from [85.158.143.35:57055] by server-2.bemta-4.messagelabs.com id
	16/05-17938-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340428937!16577165!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19627 invoked from network); 23 Jun 2012 05:22:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0006DG-J2
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInZ-0001LF-Hl
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:17 +0000
Message-Id: <E1SiInZ-0001LF-Hl@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64/EFI: document building and
	usage
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340271022 -7200
# Node ID d4cdcf4d541cc4ce72c48df2e26c2b506c5b04bd
# Parent  5b6a857411ba5212c71885a2fd39cae4c3d8231c
x86-64/EFI: document building and usage

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


diff -r 5b6a857411ba -r d4cdcf4d541c docs/misc/efi.markdown
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/misc/efi.markdown	Thu Jun 21 11:30:22 2012 +0200
@@ -0,0 +1,79 @@
+Building xen.efi requires gcc 4.5.x or above (4.6.x or newer recommended, as
+4.5.x was probably never really tested for this purpose) and binutils 2.22 or
+newer. Additionally, the binutils build must be configured to include support
+for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
+of equivalent effect should be passed to the configure script).
+
+Once built, `make install-xen` can place the resulting binary directly into
+the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
+`EFI_MOUNTPOINT` is overridden as needed, should the default of `/boot/efi` not
+match your system).
+
+The binary itself will require a configuration file (names with the `.efi`
+extension of the binary's name replaced by `.cfg`, and - until an existing
+file is found - trailing name components dropped at `.`, `-`, and `_`
+separators will be tried) to be present in the same directory as the binary.
+(To illustrate the name handling, a binary named `xen-4.2-unstable.efi` would
+try `xen-4.2-unstable.cfg`, `xen-4.2.cfg`, `xen-4.cfg`, and `xen.cfg` in
+order.) One can override this with a command line option (`-cfg=<filename>`).
+
+The configuration file consists of one or more sections headed by a section
+name enclosed in square brackets, with individual values specified in each
+section. A section named `[global]` is treated specially to allow certain
+settings to apply to all other sections (or to provide defaults for certain
+settings in case individual sections don't specify them). A typical file would
+thus look like this (`#` serving as comment character):
+
+    **************************example begin******************************
+
+    [global]
+    default=sle11sp2
+    
+    [sle11sp2]
+    options=console=vga,com1 com1=57600 loglvl=all noreboot
+    kernel=vmlinuz-3.0.31-0.4-xen ignore_loglevel #earlyprintk=xen
+    ramdisk=initrd-3.0.31-0.4-xen
+
+    **************************example end********************************
+
+The individual values used here are:
+
+###`default=<name>`
+
+Specifies the section to use for booting, if none was specified on the command
+line; only meaningful in the `[global]` section. This isn't required; if
+absent, section headers will be ignored and for each value looked for the
+first instance within the file will be used.
+
+###`options=<text>`
+
+Specifies the options passed to the hypervisor, see [Xen Hypervisor Command
+Line Options](xen-command-line.html).
+
+###`kernel=<filename>[ <options>]`
+
+Specifies the Dom0 kernel binary and the options to pass to it.
+
+###`ramdisk=<filename>`
+
+Specifies a Linux-style initial RAM disk image to load.
+
+Other values to specify are:
+
+###`video=gfx-<xres>[x<yres>[x<depth>]]`
+
+Specifies a video mode to select if available. In case of problems, the
+`-basevideo` command line option can be used to skip altering video modes.
+
+###`xsm=<filename>`
+
+Specifies an XSM module to load.
+
+###`ucode=<filename>`
+
+Specifies a CPU microcode blob to load.
+
+Filenames must be specified relative to the location of the EFI binary.
+
+Extra options to be passed to Xen can also be specified on the command line,
+following a `--` separator option.

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003T6-74; Sat, 23 Jun 2012 05:22:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0003Pf-5v
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.138.51:41723] by server-4.bemta-3.messagelabs.com id
	11/95-17105-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1340428938!29162661!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25538 invoked from network); 23 Jun 2012 05:22:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0006DJ-4Z
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0001LV-3H
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Message-Id: <E1SiIna-0001LV-3H@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/mm: fix mod_l1_entry() return
	value when encountering r/o MMIO 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340271059 -7200
# Node ID baa85434d0ec16629ca30b7c07deaa9beb3ea9c5
# Parent  d4cdcf4d541cc4ce72c48df2e26c2b506c5b04bd
x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page

While putting together the workaround announced in
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00709.html, I
found that mod_l1_entry(), upon encountering a set bit in
mmio_ro_ranges, would return 1 instead of 0 (the removal of the write
permission is supposed to be entirely transparent to the caller, even
more so to the calling guest).

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


diff -r d4cdcf4d541c -r baa85434d0ec xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Thu Jun 21 11:30:22 2012 +0200
+++ b/xen/arch/x86/mm.c	Thu Jun 21 11:30:59 2012 +0200
@@ -1875,6 +1875,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
             break;
         case 1:
             l1e_remove_flags(nl1e, _PAGE_RW);
+            rc = 0;
             break;
         }
         if ( page )

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003T6-74; Sat, 23 Jun 2012 05:22:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0003Pf-5v
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.138.51:41723] by server-4.bemta-3.messagelabs.com id
	11/95-17105-B8255EF4; Sat, 23 Jun 2012 05:22:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1340428938!29162661!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25538 invoked from network); 23 Jun 2012 05:22:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0006DJ-4Z
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0001LV-3H
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Message-Id: <E1SiIna-0001LV-3H@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/mm: fix mod_l1_entry() return
	value when encountering r/o MMIO 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340271059 -7200
# Node ID baa85434d0ec16629ca30b7c07deaa9beb3ea9c5
# Parent  d4cdcf4d541cc4ce72c48df2e26c2b506c5b04bd
x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page

While putting together the workaround announced in
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00709.html, I
found that mod_l1_entry(), upon encountering a set bit in
mmio_ro_ranges, would return 1 instead of 0 (the removal of the write
permission is supposed to be entirely transparent to the caller, even
more so to the calling guest).

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


diff -r d4cdcf4d541c -r baa85434d0ec xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Thu Jun 21 11:30:22 2012 +0200
+++ b/xen/arch/x86/mm.c	Thu Jun 21 11:30:59 2012 +0200
@@ -1875,6 +1875,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
             break;
         case 1:
             l1e_remove_flags(nl1e, _PAGE_RW);
+            rc = 0;
             break;
         }
         if ( page )

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TK-C3; Sat, 23 Jun 2012 05:22:23 +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 1SiInd-0003I2-6X
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.143.35:57087] by server-3.bemta-4.messagelabs.com id
	D7/05-05808-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-21.messagelabs.com!1340428939!14506968!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30032 invoked from network); 23 Jun 2012 05:22:20 -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;
	23 Jun 2012 05:22:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0006DP-6V
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0001M1-5B
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Message-Id: <E1SiInb-0001M1-5B@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PCI: fix guest_io_read() when
	pci_cfg_ok() denies 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340352270 -7200
# Node ID cc46bd403bc45eaedb3c615db962d59d4893a689
# Parent  513d5e196e23bcb37f2b897be31fa911ebe19aae
x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access

For a multi-byte aligned read, this so far resulted in 0x00ff to be
put in the guest's register rather than 0xffff or 0xffffffff, which in
turn could confuse bus scanning functions (which, when reading vendor
and/or device IDs, expect to get back all zeroes or all ones).

As the value gets masked to the read width when merging back into the
full result, setting the initial value to all ones should not harm any
or the other cases.

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


diff -r 513d5e196e23 -r cc46bd403bc4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Thu Jun 21 13:43:18 2012 +0100
+++ b/xen/arch/x86/traps.c	Fri Jun 22 10:04:30 2012 +0200
@@ -1717,7 +1717,7 @@ static uint32_t guest_io_read(
     while ( bytes != 0 )
     {
         unsigned int size = 1;
-        uint32_t sub_data = 0xff;
+        uint32_t sub_data = ~0;
 
         if ( (port == 0x42) || (port == 0x43) || (port == 0x61) )
         {

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TK-C3; Sat, 23 Jun 2012 05:22:23 +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 1SiInd-0003I2-6X
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.143.35:57087] by server-3.bemta-4.messagelabs.com id
	D7/05-05808-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-21.messagelabs.com!1340428939!14506968!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30032 invoked from network); 23 Jun 2012 05:22:20 -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;
	23 Jun 2012 05:22:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0006DP-6V
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0001M1-5B
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Message-Id: <E1SiInb-0001M1-5B@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PCI: fix guest_io_read() when
	pci_cfg_ok() denies 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

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1340352270 -7200
# Node ID cc46bd403bc45eaedb3c615db962d59d4893a689
# Parent  513d5e196e23bcb37f2b897be31fa911ebe19aae
x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access

For a multi-byte aligned read, this so far resulted in 0x00ff to be
put in the guest's register rather than 0xffff or 0xffffffff, which in
turn could confuse bus scanning functions (which, when reading vendor
and/or device IDs, expect to get back all zeroes or all ones).

As the value gets masked to the read width when merging back into the
full result, setting the initial value to all ones should not harm any
or the other cases.

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


diff -r 513d5e196e23 -r cc46bd403bc4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Thu Jun 21 13:43:18 2012 +0100
+++ b/xen/arch/x86/traps.c	Fri Jun 22 10:04:30 2012 +0200
@@ -1717,7 +1717,7 @@ static uint32_t guest_io_read(
     while ( bytes != 0 )
     {
         unsigned int size = 1;
-        uint32_t sub_data = 0xff;
+        uint32_t sub_data = ~0;
 
         if ( (port == 0x42) || (port == 0x43) || (port == 0x61) )
         {

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TF-9l; Sat, 23 Jun 2012 05:22:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0003PA-3r
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.138.51:41731] by server-11.bemta-3.messagelabs.com id
	F5/D1-02904-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1340428938!21019145!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30821 invoked from network); 23 Jun 2012 05:22:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0006DM-LS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0001Lm-KB
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Message-Id: <E1SiIna-0001Lm-KB@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: fix sedf parameters checking
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1340282598 -3600
# Node ID 513d5e196e23bcb37f2b897be31fa911ebe19aae
# Parent  baa85434d0ec16629ca30b7c07deaa9beb3ea9c5
xl: fix sedf parameters checking

25468:9d1fd58ff602 was bogus in not letting a new domain being created
if its scheduling parameters --when running under the sedf scheduler--
were not fully specified, making creation fail like in this example
here below:

2012-06-16 07:37:47 Z executing ssh ... root@10.80.248.105 xl create /etc/xen/debian.guest.osstest.cfg
libxl: error: libxl.c:3619:sched_sedf_domain_set: setting domain sched sedf: Invalid argument
libxl: error: libxl_create.c:710:domcreate_bootloader_done: cannot (re-)build domain: -3
Parsing config from /etc/xen/debian.guest.osstest.cfg

This is due to the fact the values for period, slice, weight and
extratime should be consistent among each others, and if not all
are explicitly specified, someone has to make that happen. That
was right the purpose of the change in question, but it was failing
at achieving so.

This commit fixes things by forcing unspecified parameters to
sensible values, depending on the ones the user provided.

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


diff -r baa85434d0ec -r 513d5e196e23 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Jun 21 11:30:59 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Thu Jun 21 13:43:18 2012 +0100
@@ -555,6 +555,8 @@ static int sched_params_valid(libxl_doma
     int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
     int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
     int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    int has_extratime =
+                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
     libxl_domain_sched_params sci;
 
     libxl_domain_sched_params_get(ctx, domid, &sci);
@@ -563,12 +565,27 @@ static int sched_params_valid(libxl_doma
     if (sci.sched == LIBXL_SCHEDULER_SEDF) {
         if (has_weight && (has_period || has_slice))
             return 0;
-
+        if (has_period != has_slice)
+            return 0;
+
+        /*
+         * Idea is, if we specify a weight, then both period and
+         * slice has to be zero. OTOH, if we do not specify a weight,
+         * that means we want a pure best effort domain or an actual
+         * real-time one. In the former case, it is period that needs
+         * to be zero, in the latter, weight should be.
+         */
         if (has_weight) {
             scp->slice = 0;
             scp->period = 0;
         }
-        if (has_period || has_slice)
+        else if (!has_period) {
+            /* We can setup a proper best effort domain (extra time only)
+             * iff we either already have or are asking for some extra time. */
+            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->period = 0;
+        }
+        if (has_period && has_slice)
             scp->weight = 0;
     }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TF-9l; Sat, 23 Jun 2012 05:22:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0003PA-3r
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.138.51:41731] by server-11.bemta-3.messagelabs.com id
	F5/D1-02904-C8255EF4; Sat, 23 Jun 2012 05:22:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1340428938!21019145!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30821 invoked from network); 23 Jun 2012 05:22:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0006DM-LS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiIna-0001Lm-KB
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:18 +0000
Message-Id: <E1SiIna-0001Lm-KB@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: fix sedf parameters checking
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1340282598 -3600
# Node ID 513d5e196e23bcb37f2b897be31fa911ebe19aae
# Parent  baa85434d0ec16629ca30b7c07deaa9beb3ea9c5
xl: fix sedf parameters checking

25468:9d1fd58ff602 was bogus in not letting a new domain being created
if its scheduling parameters --when running under the sedf scheduler--
were not fully specified, making creation fail like in this example
here below:

2012-06-16 07:37:47 Z executing ssh ... root@10.80.248.105 xl create /etc/xen/debian.guest.osstest.cfg
libxl: error: libxl.c:3619:sched_sedf_domain_set: setting domain sched sedf: Invalid argument
libxl: error: libxl_create.c:710:domcreate_bootloader_done: cannot (re-)build domain: -3
Parsing config from /etc/xen/debian.guest.osstest.cfg

This is due to the fact the values for period, slice, weight and
extratime should be consistent among each others, and if not all
are explicitly specified, someone has to make that happen. That
was right the purpose of the change in question, but it was failing
at achieving so.

This commit fixes things by forcing unspecified parameters to
sensible values, depending on the ones the user provided.

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


diff -r baa85434d0ec -r 513d5e196e23 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Jun 21 11:30:59 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Thu Jun 21 13:43:18 2012 +0100
@@ -555,6 +555,8 @@ static int sched_params_valid(libxl_doma
     int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
     int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
     int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    int has_extratime =
+                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
     libxl_domain_sched_params sci;
 
     libxl_domain_sched_params_get(ctx, domid, &sci);
@@ -563,12 +565,27 @@ static int sched_params_valid(libxl_doma
     if (sci.sched == LIBXL_SCHEDULER_SEDF) {
         if (has_weight && (has_period || has_slice))
             return 0;
-
+        if (has_period != has_slice)
+            return 0;
+
+        /*
+         * Idea is, if we specify a weight, then both period and
+         * slice has to be zero. OTOH, if we do not specify a weight,
+         * that means we want a pure best effort domain or an actual
+         * real-time one. In the former case, it is period that needs
+         * to be zero, in the latter, weight should be.
+         */
         if (has_weight) {
             scp->slice = 0;
             scp->period = 0;
         }
-        if (has_period || has_slice)
+        else if (!has_period) {
+            /* We can setup a proper best effort domain (extra time only)
+             * iff we either already have or are asking for some extra time. */
+            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->period = 0;
+        }
+        if (has_period && has_slice)
             scp->weight = 0;
     }
 

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003Tv-K4; Sat, 23 Jun 2012 05:22:23 +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 1SiIne-0003I2-Hu
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:22 +0000
Received: from [85.158.143.99:5488] by server-3.bemta-4.messagelabs.com id
	39/05-05808-E8255EF4; Sat, 23 Jun 2012 05:22:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1340428940!23385266!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5594 invoked from network); 23 Jun 2012 05:22:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0006DZ-9W
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0001MZ-83
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Message-Id: <E1SiInc-0001MZ-83@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: validate scheduler 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340361703 -3600
# Node ID 2205914617cb2998ed543e1a033386a9ce271af0
# Parent  74a19f1d3b98d36aef7e049afbc0345f339ea4d7
libxl: validate scheduler parameters

This was previously done by xl itself however the domain was not
created at that point so there was no domid to check. This happened to
work on first boot because xl's global domid was initialised to zero
so we would (incorrectly) validate the new domain to be against
domain0. On reboot though we would try to use the old domain's id and
fail.

sched_params_valid is moved and gains a gc+domid parameters and
s/ctx/CTX/. The call is placed after
libxl__domain_build_info_setdefault in the create path, because
set_defaults doesn't have access to the domid and there are other
callers which don't even have a domid to give it.

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


diff -r 74a19f1d3b98 -r 2205914617cb tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Jun 22 10:05:05 2012 +0200
+++ b/tools/libxl/libxl_create.c	Fri Jun 22 11:41:43 2012 +0100
@@ -72,6 +72,49 @@ int libxl__domain_create_info_setdefault
     return 0;
 }
 
+static int sched_params_valid(libxl__gc *gc,
+                              uint32_t domid, libxl_domain_sched_params *scp)
+{
+    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
+    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
+    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    int has_extratime =
+                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
+    libxl_domain_sched_params sci;
+
+    libxl_domain_sched_params_get(CTX, domid, &sci);
+
+    /* The sedf scheduler needs some more consistency checking */
+    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+        if (has_weight && (has_period || has_slice))
+            return 0;
+        if (has_period != has_slice)
+            return 0;
+
+        /*
+         * Idea is, if we specify a weight, then both period and
+         * slice has to be zero. OTOH, if we do not specify a weight,
+         * that means we want a pure best effort domain or an actual
+         * real-time one. In the former case, it is period that needs
+         * to be zero, in the latter, weight should be.
+         */
+        if (has_weight) {
+            scp->slice = 0;
+            scp->period = 0;
+        }
+        else if (!has_period) {
+            /* We can setup a proper best effort domain (extra time only)
+             * iff we either already have or are asking for some extra time. */
+            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->period = 0;
+        }
+        if (has_period && has_slice)
+            scp->weight = 0;
+    }
+
+    return 1;
+}
+
 int libxl__domain_build_info_setdefault(libxl__gc *gc,
                                         libxl_domain_build_info *b_info)
 {
@@ -622,6 +665,12 @@ static void initiate_domain_create(libxl
     ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info);
     if (ret) goto error_out;
 
+    if (!sched_params_valid(gc, domid, &d_config->b_info.sched_params)) {
+        LOG(ERROR, "Invalid scheduling parameters\n");
+        ret = ERROR_INVAL;
+        goto error_out;
+    }
+
     for (i = 0; i < d_config->num_disks; i++) {
         ret = libxl__device_disk_setdefault(gc, &d_config->disks[i]);
         if (ret) goto error_out;
diff -r 74a19f1d3b98 -r 2205914617cb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 22 10:05:05 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 22 11:41:43 2012 +0100
@@ -550,48 +550,6 @@ vcpp_out:
     return rc;
 }
 
-static int sched_params_valid(libxl_domain_sched_params *scp)
-{
-    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
-    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
-    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
-    int has_extratime =
-                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
-    libxl_domain_sched_params sci;
-
-    libxl_domain_sched_params_get(ctx, domid, &sci);
-
-    /* The sedf scheduler needs some more consistency checking */
-    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
-        if (has_weight && (has_period || has_slice))
-            return 0;
-        if (has_period != has_slice)
-            return 0;
-
-        /*
-         * Idea is, if we specify a weight, then both period and
-         * slice has to be zero. OTOH, if we do not specify a weight,
-         * that means we want a pure best effort domain or an actual
-         * real-time one. In the former case, it is period that needs
-         * to be zero, in the latter, weight should be.
-         */
-        if (has_weight) {
-            scp->slice = 0;
-            scp->period = 0;
-        }
-        else if (!has_period) {
-            /* We can setup a proper best effort domain (extra time only)
-             * iff we either already have or are asking for some extra time. */
-            scp->weight = has_extratime ? scp->extratime : sci.extratime;
-            scp->period = 0;
-        }
-        if (has_period && has_slice)
-            scp->weight = 0;
-    }
-
-    return 1;
-}
-
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -686,10 +644,6 @@ static void parse_config_data(const char
         b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
         b_info->sched_params.extratime = l;
-    if (!sched_params_valid(&b_info->sched_params)) {
-        fprintf(stderr, "Invalid scheduling parameters\n");
-        exit(1);
-    }
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003Tv-K4; Sat, 23 Jun 2012 05:22:23 +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 1SiIne-0003I2-Hu
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:22 +0000
Received: from [85.158.143.99:5488] by server-3.bemta-4.messagelabs.com id
	39/05-05808-E8255EF4; Sat, 23 Jun 2012 05:22:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1340428940!23385266!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5594 invoked from network); 23 Jun 2012 05:22:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0006DZ-9W
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0001MZ-83
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Message-Id: <E1SiInc-0001MZ-83@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: validate scheduler 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340361703 -3600
# Node ID 2205914617cb2998ed543e1a033386a9ce271af0
# Parent  74a19f1d3b98d36aef7e049afbc0345f339ea4d7
libxl: validate scheduler parameters

This was previously done by xl itself however the domain was not
created at that point so there was no domid to check. This happened to
work on first boot because xl's global domid was initialised to zero
so we would (incorrectly) validate the new domain to be against
domain0. On reboot though we would try to use the old domain's id and
fail.

sched_params_valid is moved and gains a gc+domid parameters and
s/ctx/CTX/. The call is placed after
libxl__domain_build_info_setdefault in the create path, because
set_defaults doesn't have access to the domid and there are other
callers which don't even have a domid to give it.

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


diff -r 74a19f1d3b98 -r 2205914617cb tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Jun 22 10:05:05 2012 +0200
+++ b/tools/libxl/libxl_create.c	Fri Jun 22 11:41:43 2012 +0100
@@ -72,6 +72,49 @@ int libxl__domain_create_info_setdefault
     return 0;
 }
 
+static int sched_params_valid(libxl__gc *gc,
+                              uint32_t domid, libxl_domain_sched_params *scp)
+{
+    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
+    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
+    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
+    int has_extratime =
+                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
+    libxl_domain_sched_params sci;
+
+    libxl_domain_sched_params_get(CTX, domid, &sci);
+
+    /* The sedf scheduler needs some more consistency checking */
+    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+        if (has_weight && (has_period || has_slice))
+            return 0;
+        if (has_period != has_slice)
+            return 0;
+
+        /*
+         * Idea is, if we specify a weight, then both period and
+         * slice has to be zero. OTOH, if we do not specify a weight,
+         * that means we want a pure best effort domain or an actual
+         * real-time one. In the former case, it is period that needs
+         * to be zero, in the latter, weight should be.
+         */
+        if (has_weight) {
+            scp->slice = 0;
+            scp->period = 0;
+        }
+        else if (!has_period) {
+            /* We can setup a proper best effort domain (extra time only)
+             * iff we either already have or are asking for some extra time. */
+            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->period = 0;
+        }
+        if (has_period && has_slice)
+            scp->weight = 0;
+    }
+
+    return 1;
+}
+
 int libxl__domain_build_info_setdefault(libxl__gc *gc,
                                         libxl_domain_build_info *b_info)
 {
@@ -622,6 +665,12 @@ static void initiate_domain_create(libxl
     ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info);
     if (ret) goto error_out;
 
+    if (!sched_params_valid(gc, domid, &d_config->b_info.sched_params)) {
+        LOG(ERROR, "Invalid scheduling parameters\n");
+        ret = ERROR_INVAL;
+        goto error_out;
+    }
+
     for (i = 0; i < d_config->num_disks; i++) {
         ret = libxl__device_disk_setdefault(gc, &d_config->disks[i]);
         if (ret) goto error_out;
diff -r 74a19f1d3b98 -r 2205914617cb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Jun 22 10:05:05 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Fri Jun 22 11:41:43 2012 +0100
@@ -550,48 +550,6 @@ vcpp_out:
     return rc;
 }
 
-static int sched_params_valid(libxl_domain_sched_params *scp)
-{
-    int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
-    int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
-    int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
-    int has_extratime =
-                scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
-    libxl_domain_sched_params sci;
-
-    libxl_domain_sched_params_get(ctx, domid, &sci);
-
-    /* The sedf scheduler needs some more consistency checking */
-    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
-        if (has_weight && (has_period || has_slice))
-            return 0;
-        if (has_period != has_slice)
-            return 0;
-
-        /*
-         * Idea is, if we specify a weight, then both period and
-         * slice has to be zero. OTOH, if we do not specify a weight,
-         * that means we want a pure best effort domain or an actual
-         * real-time one. In the former case, it is period that needs
-         * to be zero, in the latter, weight should be.
-         */
-        if (has_weight) {
-            scp->slice = 0;
-            scp->period = 0;
-        }
-        else if (!has_period) {
-            /* We can setup a proper best effort domain (extra time only)
-             * iff we either already have or are asking for some extra time. */
-            scp->weight = has_extratime ? scp->extratime : sci.extratime;
-            scp->period = 0;
-        }
-        if (has_period && has_slice)
-            scp->weight = 0;
-    }
-
-    return 1;
-}
-
 static void parse_config_data(const char *config_source,
                               const char *config_data,
                               int config_len,
@@ -686,10 +644,6 @@ static void parse_config_data(const char
         b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
         b_info->sched_params.extratime = l;
-    if (!sched_params_valid(&b_info->sched_params)) {
-        fprintf(stderr, "Invalid scheduling parameters\n");
-        exit(1);
-    }
 
     if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
         b_info->max_vcpus = l;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TQ-EK; Sat, 23 Jun 2012 05:22:23 +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 1SiInd-0003JH-OH
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.143.35:55151] by server-1.bemta-4.messagelabs.com id
	1B/60-24392-D8255EF4; Sat, 23 Jun 2012 05:22:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1340428939!13668658!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31891 invoked from network); 23 Jun 2012 05:22:20 -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;
	23 Jun 2012 05:22:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0006DT-N6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0001MH-Lm
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Message-Id: <E1SiInb-0001MH-Lm@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: revert mmconfig part of c/s
	24425:053a44894279
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340352305 -7200
# Node ID 74a19f1d3b98d36aef7e049afbc0345f339ea4d7
# Parent  cc46bd403bc45eaedb3c615db962d59d4893a689
x86-64: revert mmconfig part of c/s 24425:053a44894279

These additions did not fulfill their purpose - they checked hypervisor
config space accesses instead of guest (Dom0) ones.

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


diff -r cc46bd403bc4 -r 74a19f1d3b98 xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 10:04:30 2012 +0200
+++ b/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 10:05:05 2012 +0200
@@ -14,7 +14,6 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
-#include <xsm/xsm.h>
 
 #include "mmconfig.h"
 
@@ -59,7 +58,6 @@ int pci_mmcfg_read(unsigned int seg, uns
               unsigned int devfn, int reg, int len, u32 *value)
 {
     char __iomem *addr;
-    uint32_t mbdf;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
     if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) {
@@ -67,12 +65,6 @@ err:        *value = -1;
         return -EINVAL;
     }
 
-    mbdf = (seg << 16) | (bus << 8) | devfn;
-    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1, 0)) {
-        *value = -1;
-        return -EPERM;
-    }
-
     addr = pci_dev_base(seg, bus, devfn);
     if (!addr)
         goto err;
@@ -96,16 +88,11 @@ int pci_mmcfg_write(unsigned int seg, un
                unsigned int devfn, int reg, int len, u32 value)
 {
     char __iomem *addr;
-    uint32_t mbdf;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
     if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
         return -EINVAL;
 
-    mbdf = (seg << 16) | (bus << 8) | devfn;
-    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1, 1))
-        return -EPERM;
-
     addr = pci_dev_base(seg, bus, devfn);
     if (!addr)
         return -EINVAL;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiInf-0003TQ-EK; Sat, 23 Jun 2012 05:22:23 +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 1SiInd-0003JH-OH
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from [85.158.143.35:55151] by server-1.bemta-4.messagelabs.com id
	1B/60-24392-D8255EF4; Sat, 23 Jun 2012 05:22:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1340428939!13668658!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31891 invoked from network); 23 Jun 2012 05:22:20 -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;
	23 Jun 2012 05:22:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0006DT-N6
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInb-0001MH-Lm
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:19 +0000
Message-Id: <E1SiInb-0001MH-Lm@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: revert mmconfig part of c/s
	24425:053a44894279
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340352305 -7200
# Node ID 74a19f1d3b98d36aef7e049afbc0345f339ea4d7
# Parent  cc46bd403bc45eaedb3c615db962d59d4893a689
x86-64: revert mmconfig part of c/s 24425:053a44894279

These additions did not fulfill their purpose - they checked hypervisor
config space accesses instead of guest (Dom0) ones.

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


diff -r cc46bd403bc4 -r 74a19f1d3b98 xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 10:04:30 2012 +0200
+++ b/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 10:05:05 2012 +0200
@@ -14,7 +14,6 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
-#include <xsm/xsm.h>
 
 #include "mmconfig.h"
 
@@ -59,7 +58,6 @@ int pci_mmcfg_read(unsigned int seg, uns
               unsigned int devfn, int reg, int len, u32 *value)
 {
     char __iomem *addr;
-    uint32_t mbdf;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
     if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) {
@@ -67,12 +65,6 @@ err:        *value = -1;
         return -EINVAL;
     }
 
-    mbdf = (seg << 16) | (bus << 8) | devfn;
-    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1, 0)) {
-        *value = -1;
-        return -EPERM;
-    }
-
     addr = pci_dev_base(seg, bus, devfn);
     if (!addr)
         goto err;
@@ -96,16 +88,11 @@ int pci_mmcfg_write(unsigned int seg, un
                unsigned int devfn, int reg, int len, u32 value)
 {
     char __iomem *addr;
-    uint32_t mbdf;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
     if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
         return -EINVAL;
 
-    mbdf = (seg << 16) | (bus << 8) | devfn;
-    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1, 1))
-        return -EPERM;
-
     addr = pci_dev_base(seg, bus, devfn);
     if (!addr)
         return -EINVAL;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIng-0003W2-S7; Sat, 23 Jun 2012 05:22:24 +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 1SiInf-0003TD-Nw
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:24 +0000
Received: from [193.109.254.147:2549] by server-10.bemta-14.messagelabs.com id
	FF/EE-05433-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1340428941!4329855!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6347 invoked from network); 23 Jun 2012 05:22:21 -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;
	23 Jun 2012 05:22:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0006Dl-SS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0001Mo-QL
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Message-Id: <E1SiInc-0001Mo-QL@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] AMD IOMMU: add mechanism to protect
	their PCI devices' config spaces
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340365380 -7200
# Node ID 61844569a4328ec122bfc0b257f3e930a560ed47
# Parent  2205914617cb2998ed543e1a033386a9ce271af0
AMD IOMMU: add mechanism to protect their PCI devices' config spaces

Recent Dom0 kernels want to disable PCI MSI on all devices, yet doing
so on AMD IOMMUs (which get represented by a PCI device) disables part
of the functionality set up by the hypervisor.

Add a mechanism to mark certain PCI devices as having write protected
config spaces (both through port based [method 1] accesses and, for
x86-64, mmconfig), and use that for AMD's IOMMUs.

Note that due to ptwr_do_page_fault() being run first, there'll be a
MEM_LOG() issued for each such mmconfig based write attempt. If that's
undesirable, the order of the calls in fixup_page_fault() would need
to be swapped.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Wei Wang <wei.wang2@amd.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 2205914617cb -r 61844569a432 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/mm.c	Fri Jun 22 13:43:00 2012 +0200
@@ -5209,6 +5209,97 @@ int ptwr_do_page_fault(struct vcpu *v, u
     return 0;
 }
 
+#ifdef __x86_64__
+/*************************
+ * fault handling for read-only MMIO pages
+ */
+
+struct mmio_ro_emulate_ctxt {
+    struct x86_emulate_ctxt ctxt;
+    unsigned long cr2;
+};
+
+static int mmio_ro_emulated_read(
+    enum x86_segment seg,
+    unsigned long offset,
+    void *p_data,
+    unsigned int bytes,
+    struct x86_emulate_ctxt *ctxt)
+{
+    return X86EMUL_UNHANDLEABLE;
+}
+
+static int mmio_ro_emulated_write(
+    enum x86_segment seg,
+    unsigned long offset,
+    void *p_data,
+    unsigned int bytes,
+    struct x86_emulate_ctxt *ctxt)
+{
+    struct mmio_ro_emulate_ctxt *mmio_ro_ctxt =
+        container_of(ctxt, struct mmio_ro_emulate_ctxt, ctxt);
+
+    /* Only allow naturally-aligned stores at the original %cr2 address. */
+    if ( ((bytes | offset) & (bytes - 1)) || offset != mmio_ro_ctxt->cr2 )
+    {
+        MEM_LOG("mmio_ro_emulate: bad access (cr2=%lx, addr=%lx, bytes=%u)",
+                mmio_ro_ctxt->cr2, offset, bytes);
+        return X86EMUL_UNHANDLEABLE;
+    }
+
+    return X86EMUL_OKAY;
+}
+
+static const struct x86_emulate_ops mmio_ro_emulate_ops = {
+    .read       = mmio_ro_emulated_read,
+    .insn_fetch = ptwr_emulated_read,
+    .write      = mmio_ro_emulated_write,
+};
+
+/* Check if guest is trying to modify a r/o MMIO page. */
+int mmio_ro_do_page_fault(struct vcpu *v, unsigned long addr,
+                          struct cpu_user_regs *regs)
+{
+    l1_pgentry_t      pte;
+    unsigned long     mfn;
+    unsigned int      addr_size = is_pv_32on64_domain(v->domain) ?
+                                  32 : BITS_PER_LONG;
+    struct mmio_ro_emulate_ctxt mmio_ro_ctxt = {
+        .ctxt.regs = regs,
+        .ctxt.addr_size = addr_size,
+        .ctxt.sp_size = addr_size,
+        .cr2 = addr
+    };
+    int rc;
+
+    /* Attempt to read the PTE that maps the VA being accessed. */
+    guest_get_eff_l1e(v, addr, &pte);
+
+    /* We are looking only for read-only mappings of MMIO pages. */
+    if ( ((l1e_get_flags(pte) & (_PAGE_PRESENT|_PAGE_RW)) != _PAGE_PRESENT) )
+        return 0;
+
+    mfn = l1e_get_pfn(pte);
+    if ( mfn_valid(mfn) )
+    {
+        struct page_info *page = mfn_to_page(mfn);
+        struct domain *owner = page_get_owner_and_reference(page);
+
+        if ( owner )
+            put_page(page);
+        if ( owner != dom_io )
+            return 0;
+    }
+
+    if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
+        return 0;
+
+    rc = x86_emulate(&mmio_ro_ctxt.ctxt, &mmio_ro_emulate_ops);
+
+    return rc != X86EMUL_UNHANDLEABLE ? EXCRET_fault_fixed : 0;
+}
+#endif /* __x86_64__ */
+
 void free_xen_pagetable(void *v)
 {
     if ( system_state == SYS_STATE_early_boot )
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/traps.c	Fri Jun 22 13:43:00 2012 +0200
@@ -1349,20 +1349,23 @@ static int fixup_page_fault(unsigned lon
         return 0;
     }
 
-    if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) &&
-         guest_kernel_mode(v, regs) )
+    if ( guest_kernel_mode(v, regs) &&
+         !(regs->error_code & (PFEC_reserved_bit | PFEC_insn_fetch)) &&
+         (regs->error_code & PFEC_write_access) )
     {
-        unsigned int mbs = PFEC_write_access;
-        unsigned int mbz = PFEC_reserved_bit | PFEC_insn_fetch;
-
-        /* Do not check if access-protection fault since the page may 
-           legitimately be not present in shadow page tables */
-        if ( !paging_mode_enabled(d) )
-            mbs |= PFEC_page_present;
-
-        if ( ((regs->error_code & (mbs | mbz)) == mbs) &&
+        if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) &&
+             /* Do not check if access-protection fault since the page may
+                legitimately be not present in shadow page tables */
+             (paging_mode_enabled(d) ||
+              (regs->error_code & PFEC_page_present)) &&
              ptwr_do_page_fault(v, addr, regs) )
             return EXCRET_fault_fixed;
+
+#ifdef __x86_64__
+        if ( IS_PRIV(d) && (regs->error_code & PFEC_page_present) &&
+             mmio_ro_do_page_fault(v, addr, regs) )
+            return EXCRET_fault_fixed;
+#endif
     }
 
     /* For non-external shadowed guests, we fix up both their own 
@@ -1690,6 +1693,13 @@ static int pci_cfg_ok(struct domain *d, 
         return 0;
 
     machine_bdf = (d->arch.pci_cf8 >> 8) & 0xFFFF;
+    if ( write )
+    {
+        const unsigned long *ro_map = pci_get_ro_map(0);
+
+        if ( ro_map && test_bit(machine_bdf, ro_map) )
+            return 0;
+    }
     start = d->arch.pci_cf8 & 0xFF;
     end = start + size - 1;
     if (xsm_pci_config_permission(d, machine_bdf, start, end, write))
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/x86_32/pci.c
--- a/xen/arch/x86/x86_32/pci.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/x86_32/pci.c	Fri Jun 22 13:43:00 2012 +0200
@@ -6,6 +6,7 @@
 
 #include <xen/spinlock.h>
 #include <xen/pci.h>
+#include <xen/init.h>
 #include <asm/io.h>
 
 #define PCI_CONF_ADDRESS(bus, dev, func, reg) \
@@ -70,3 +71,7 @@ void pci_conf_write32(
     BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255));
     pci_conf_write(PCI_CONF_ADDRESS(bus, dev, func, reg), 0, 4, data);
 }
+
+void __init arch_pci_ro_device(int seg, int bdf)
+{
+}
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 13:43:00 2012 +0200
@@ -14,6 +14,8 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/iommu.h>
+#include <xen/rangeset.h>
 
 #include "mmconfig.h"
 
@@ -132,9 +134,30 @@ static void __iomem *mcfg_ioremap(const 
     return (void __iomem *) virt;
 }
 
+void arch_pci_ro_device(int seg, int bdf)
+{
+    unsigned int idx, bus = PCI_BUS(bdf);
+
+    for (idx = 0; idx < pci_mmcfg_config_num; ++idx) {
+        const struct acpi_mcfg_allocation *cfg = pci_mmcfg_virt[idx].cfg;
+        unsigned long mfn = (cfg->address >> PAGE_SHIFT) + bdf;
+
+        if (!pci_mmcfg_virt[idx].virt || cfg->pci_segment != seg ||
+            cfg->start_bus_number > bus || cfg->end_bus_number < bus)
+            continue;
+
+        if (rangeset_add_singleton(mmio_ro_ranges, mfn))
+            printk(XENLOG_ERR
+                   "%04x:%02x:%02x.%u: could not mark MCFG (mfn %#lx) read-only\n",
+                   cfg->pci_segment, bus, PCI_SLOT(bdf), PCI_FUNC(bdf),
+                   mfn);
+    }
+}
+
 int pci_mmcfg_arch_enable(unsigned int idx)
 {
     const typeof(pci_mmcfg_config[0]) *cfg = pci_mmcfg_virt[idx].cfg;
+    const unsigned long *ro_map = pci_get_ro_map(cfg->pci_segment);
 
     if (pci_mmcfg_virt[idx].virt)
         return 0;
@@ -146,6 +169,16 @@ int pci_mmcfg_arch_enable(unsigned int i
     }
     printk(KERN_INFO "PCI: Using MCFG for segment %04x bus %02x-%02x\n",
            cfg->pci_segment, cfg->start_bus_number, cfg->end_bus_number);
+    if (ro_map) {
+        unsigned int bdf = PCI_BDF(cfg->start_bus_number, 0, 0);
+        unsigned int end = PCI_BDF(cfg->end_bus_number, -1, -1);
+
+        while ((bdf = find_next_bit(ro_map, end + 1, bdf)) <= end) {
+            arch_pci_ro_device(cfg->pci_segment, bdf);
+            if (bdf++ == end)
+                break;
+        }
+    }
     return 0;
 }
 
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/amd/iommu_detect.c
--- a/xen/drivers/passthrough/amd/iommu_detect.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/amd/iommu_detect.c	Fri Jun 22 13:43:00 2012 +0200
@@ -153,6 +153,12 @@ int __init amd_iommu_detect_one_acpi(
     if ( rt )
         return -ENODEV;
 
+    rt = pci_ro_device(iommu->seg, bus, PCI_DEVFN(dev, func));
+    if ( rt )
+        printk(XENLOG_ERR
+               "Could not mark config space of %04x:%02x:%02x.%u read-only (%d)\n",
+               iommu->seg, bus, dev, func, rt);
+
     list_add_tail(&iommu->list, &amd_iommu_head);
 
     return 0;
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/io.c	Fri Jun 22 13:43:00 2012 +0200
@@ -593,11 +593,3 @@ void hvm_dpci_eoi(struct domain *d, unsi
 unlock:
     spin_unlock(&d->event_lock);
 }
-
-static int __init setup_mmio_ro_ranges(void)
-{
-    mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
-                                  RANGESETF_prettyprint_hex);
-    return 0;
-}
-__initcall(setup_mmio_ro_ranges);
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/pci.c	Fri Jun 22 13:43:00 2012 +0200
@@ -36,6 +36,7 @@
 struct pci_seg {
     struct list_head alldevs_list;
     u16 nr;
+    unsigned long *ro_map;
     /* bus2bridge_lock protects bus2bridge array */
     spinlock_t bus2bridge_lock;
 #define MAX_BUSES 256
@@ -106,6 +107,8 @@ void __init pt_pci_init(void)
     radix_tree_init(&pci_segments);
     if ( !alloc_pseg(0) )
         panic("Could not initialize PCI segment 0\n");
+    mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
+                                  RANGESETF_prettyprint_hex);
 }
 
 int __init pci_add_segment(u16 seg)
@@ -113,6 +116,13 @@ int __init pci_add_segment(u16 seg)
     return alloc_pseg(seg) ? 0 : -ENOMEM;
 }
 
+const unsigned long *pci_get_ro_map(u16 seg)
+{
+    struct pci_seg *pseg = get_pseg(seg);
+
+    return pseg ? pseg->ro_map : NULL;
+}
+
 static struct pci_dev *alloc_pdev(struct pci_seg *pseg, u8 bus, u8 devfn)
 {
     struct pci_dev *pdev;
@@ -198,6 +208,33 @@ static void free_pdev(struct pci_seg *ps
     xfree(pdev);
 }
 
+int __init pci_ro_device(int seg, int bus, int devfn)
+{
+    struct pci_seg *pseg = alloc_pseg(seg);
+    struct pci_dev *pdev;
+
+    if ( !pseg )
+        return -ENOMEM;
+    pdev = alloc_pdev(pseg, bus, devfn);
+    if ( !pdev )
+        return -ENOMEM;
+
+    if ( !pseg->ro_map )
+    {
+        size_t sz = BITS_TO_LONGS(PCI_BDF(-1, -1, -1) + 1) * sizeof(long);
+
+        pseg->ro_map = alloc_xenheap_pages(get_order_from_bytes(sz), 0);
+        if ( !pseg->ro_map )
+            return -ENOMEM;
+        memset(pseg->ro_map, 0, sz);
+    }
+
+    __set_bit(PCI_BDF2(bus, devfn), pseg->ro_map);
+    arch_pci_ro_device(seg, PCI_BDF2(bus, devfn));
+
+    return 0;
+}
+
 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn)
 {
     struct pci_seg *pseg = get_pseg(seg);
diff -r 2205914617cb -r 61844569a432 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/include/asm-x86/mm.h	Fri Jun 22 13:43:00 2012 +0200
@@ -555,6 +555,8 @@ void memguard_unguard_stack(void *p);
 
 int  ptwr_do_page_fault(struct vcpu *, unsigned long,
                         struct cpu_user_regs *);
+int  mmio_ro_do_page_fault(struct vcpu *, unsigned long,
+                           struct cpu_user_regs *);
 
 int audit_adjust_pgtables(struct domain *d, int dir, int noisy);
 
diff -r 2205914617cb -r 61844569a432 xen/include/xen/pci.h
--- a/xen/include/xen/pci.h	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/include/xen/pci.h	Fri Jun 22 13:43:00 2012 +0200
@@ -98,8 +98,11 @@ struct pci_dev *pci_lock_domain_pdev(
 void setup_dom0_pci_devices(struct domain *, void (*)(struct pci_dev *));
 void pci_release_devices(struct domain *d);
 int pci_add_segment(u16 seg);
+const unsigned long *pci_get_ro_map(u16 seg);
 int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *);
 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
+int pci_ro_device(int seg, int bus, int devfn);
+void arch_pci_ro_device(int seg, int bdf);
 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_get_pdev_by_domain(
     struct domain *, int seg, int bus, int devfn);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIng-0003W2-S7; Sat, 23 Jun 2012 05:22:24 +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 1SiInf-0003TD-Nw
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:24 +0000
Received: from [193.109.254.147:2549] by server-10.bemta-14.messagelabs.com id
	FF/EE-05433-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1340428941!4329855!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6347 invoked from network); 23 Jun 2012 05:22:21 -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;
	23 Jun 2012 05:22:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0006Dl-SS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInc-0001Mo-QL
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:20 +0000
Message-Id: <E1SiInc-0001Mo-QL@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] AMD IOMMU: add mechanism to protect
	their PCI devices' config spaces
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340365380 -7200
# Node ID 61844569a4328ec122bfc0b257f3e930a560ed47
# Parent  2205914617cb2998ed543e1a033386a9ce271af0
AMD IOMMU: add mechanism to protect their PCI devices' config spaces

Recent Dom0 kernels want to disable PCI MSI on all devices, yet doing
so on AMD IOMMUs (which get represented by a PCI device) disables part
of the functionality set up by the hypervisor.

Add a mechanism to mark certain PCI devices as having write protected
config spaces (both through port based [method 1] accesses and, for
x86-64, mmconfig), and use that for AMD's IOMMUs.

Note that due to ptwr_do_page_fault() being run first, there'll be a
MEM_LOG() issued for each such mmconfig based write attempt. If that's
undesirable, the order of the calls in fixup_page_fault() would need
to be swapped.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Wei Wang <wei.wang2@amd.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 2205914617cb -r 61844569a432 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/mm.c	Fri Jun 22 13:43:00 2012 +0200
@@ -5209,6 +5209,97 @@ int ptwr_do_page_fault(struct vcpu *v, u
     return 0;
 }
 
+#ifdef __x86_64__
+/*************************
+ * fault handling for read-only MMIO pages
+ */
+
+struct mmio_ro_emulate_ctxt {
+    struct x86_emulate_ctxt ctxt;
+    unsigned long cr2;
+};
+
+static int mmio_ro_emulated_read(
+    enum x86_segment seg,
+    unsigned long offset,
+    void *p_data,
+    unsigned int bytes,
+    struct x86_emulate_ctxt *ctxt)
+{
+    return X86EMUL_UNHANDLEABLE;
+}
+
+static int mmio_ro_emulated_write(
+    enum x86_segment seg,
+    unsigned long offset,
+    void *p_data,
+    unsigned int bytes,
+    struct x86_emulate_ctxt *ctxt)
+{
+    struct mmio_ro_emulate_ctxt *mmio_ro_ctxt =
+        container_of(ctxt, struct mmio_ro_emulate_ctxt, ctxt);
+
+    /* Only allow naturally-aligned stores at the original %cr2 address. */
+    if ( ((bytes | offset) & (bytes - 1)) || offset != mmio_ro_ctxt->cr2 )
+    {
+        MEM_LOG("mmio_ro_emulate: bad access (cr2=%lx, addr=%lx, bytes=%u)",
+                mmio_ro_ctxt->cr2, offset, bytes);
+        return X86EMUL_UNHANDLEABLE;
+    }
+
+    return X86EMUL_OKAY;
+}
+
+static const struct x86_emulate_ops mmio_ro_emulate_ops = {
+    .read       = mmio_ro_emulated_read,
+    .insn_fetch = ptwr_emulated_read,
+    .write      = mmio_ro_emulated_write,
+};
+
+/* Check if guest is trying to modify a r/o MMIO page. */
+int mmio_ro_do_page_fault(struct vcpu *v, unsigned long addr,
+                          struct cpu_user_regs *regs)
+{
+    l1_pgentry_t      pte;
+    unsigned long     mfn;
+    unsigned int      addr_size = is_pv_32on64_domain(v->domain) ?
+                                  32 : BITS_PER_LONG;
+    struct mmio_ro_emulate_ctxt mmio_ro_ctxt = {
+        .ctxt.regs = regs,
+        .ctxt.addr_size = addr_size,
+        .ctxt.sp_size = addr_size,
+        .cr2 = addr
+    };
+    int rc;
+
+    /* Attempt to read the PTE that maps the VA being accessed. */
+    guest_get_eff_l1e(v, addr, &pte);
+
+    /* We are looking only for read-only mappings of MMIO pages. */
+    if ( ((l1e_get_flags(pte) & (_PAGE_PRESENT|_PAGE_RW)) != _PAGE_PRESENT) )
+        return 0;
+
+    mfn = l1e_get_pfn(pte);
+    if ( mfn_valid(mfn) )
+    {
+        struct page_info *page = mfn_to_page(mfn);
+        struct domain *owner = page_get_owner_and_reference(page);
+
+        if ( owner )
+            put_page(page);
+        if ( owner != dom_io )
+            return 0;
+    }
+
+    if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
+        return 0;
+
+    rc = x86_emulate(&mmio_ro_ctxt.ctxt, &mmio_ro_emulate_ops);
+
+    return rc != X86EMUL_UNHANDLEABLE ? EXCRET_fault_fixed : 0;
+}
+#endif /* __x86_64__ */
+
 void free_xen_pagetable(void *v)
 {
     if ( system_state == SYS_STATE_early_boot )
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/traps.c	Fri Jun 22 13:43:00 2012 +0200
@@ -1349,20 +1349,23 @@ static int fixup_page_fault(unsigned lon
         return 0;
     }
 
-    if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) &&
-         guest_kernel_mode(v, regs) )
+    if ( guest_kernel_mode(v, regs) &&
+         !(regs->error_code & (PFEC_reserved_bit | PFEC_insn_fetch)) &&
+         (regs->error_code & PFEC_write_access) )
     {
-        unsigned int mbs = PFEC_write_access;
-        unsigned int mbz = PFEC_reserved_bit | PFEC_insn_fetch;
-
-        /* Do not check if access-protection fault since the page may 
-           legitimately be not present in shadow page tables */
-        if ( !paging_mode_enabled(d) )
-            mbs |= PFEC_page_present;
-
-        if ( ((regs->error_code & (mbs | mbz)) == mbs) &&
+        if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) &&
+             /* Do not check if access-protection fault since the page may
+                legitimately be not present in shadow page tables */
+             (paging_mode_enabled(d) ||
+              (regs->error_code & PFEC_page_present)) &&
              ptwr_do_page_fault(v, addr, regs) )
             return EXCRET_fault_fixed;
+
+#ifdef __x86_64__
+        if ( IS_PRIV(d) && (regs->error_code & PFEC_page_present) &&
+             mmio_ro_do_page_fault(v, addr, regs) )
+            return EXCRET_fault_fixed;
+#endif
     }
 
     /* For non-external shadowed guests, we fix up both their own 
@@ -1690,6 +1693,13 @@ static int pci_cfg_ok(struct domain *d, 
         return 0;
 
     machine_bdf = (d->arch.pci_cf8 >> 8) & 0xFFFF;
+    if ( write )
+    {
+        const unsigned long *ro_map = pci_get_ro_map(0);
+
+        if ( ro_map && test_bit(machine_bdf, ro_map) )
+            return 0;
+    }
     start = d->arch.pci_cf8 & 0xFF;
     end = start + size - 1;
     if (xsm_pci_config_permission(d, machine_bdf, start, end, write))
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/x86_32/pci.c
--- a/xen/arch/x86/x86_32/pci.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/x86_32/pci.c	Fri Jun 22 13:43:00 2012 +0200
@@ -6,6 +6,7 @@
 
 #include <xen/spinlock.h>
 #include <xen/pci.h>
+#include <xen/init.h>
 #include <asm/io.h>
 
 #define PCI_CONF_ADDRESS(bus, dev, func, reg) \
@@ -70,3 +71,7 @@ void pci_conf_write32(
     BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255));
     pci_conf_write(PCI_CONF_ADDRESS(bus, dev, func, reg), 0, 4, data);
 }
+
+void __init arch_pci_ro_device(int seg, int bdf)
+{
+}
diff -r 2205914617cb -r 61844569a432 xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/arch/x86/x86_64/mmconfig_64.c	Fri Jun 22 13:43:00 2012 +0200
@@ -14,6 +14,8 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/iommu.h>
+#include <xen/rangeset.h>
 
 #include "mmconfig.h"
 
@@ -132,9 +134,30 @@ static void __iomem *mcfg_ioremap(const 
     return (void __iomem *) virt;
 }
 
+void arch_pci_ro_device(int seg, int bdf)
+{
+    unsigned int idx, bus = PCI_BUS(bdf);
+
+    for (idx = 0; idx < pci_mmcfg_config_num; ++idx) {
+        const struct acpi_mcfg_allocation *cfg = pci_mmcfg_virt[idx].cfg;
+        unsigned long mfn = (cfg->address >> PAGE_SHIFT) + bdf;
+
+        if (!pci_mmcfg_virt[idx].virt || cfg->pci_segment != seg ||
+            cfg->start_bus_number > bus || cfg->end_bus_number < bus)
+            continue;
+
+        if (rangeset_add_singleton(mmio_ro_ranges, mfn))
+            printk(XENLOG_ERR
+                   "%04x:%02x:%02x.%u: could not mark MCFG (mfn %#lx) read-only\n",
+                   cfg->pci_segment, bus, PCI_SLOT(bdf), PCI_FUNC(bdf),
+                   mfn);
+    }
+}
+
 int pci_mmcfg_arch_enable(unsigned int idx)
 {
     const typeof(pci_mmcfg_config[0]) *cfg = pci_mmcfg_virt[idx].cfg;
+    const unsigned long *ro_map = pci_get_ro_map(cfg->pci_segment);
 
     if (pci_mmcfg_virt[idx].virt)
         return 0;
@@ -146,6 +169,16 @@ int pci_mmcfg_arch_enable(unsigned int i
     }
     printk(KERN_INFO "PCI: Using MCFG for segment %04x bus %02x-%02x\n",
            cfg->pci_segment, cfg->start_bus_number, cfg->end_bus_number);
+    if (ro_map) {
+        unsigned int bdf = PCI_BDF(cfg->start_bus_number, 0, 0);
+        unsigned int end = PCI_BDF(cfg->end_bus_number, -1, -1);
+
+        while ((bdf = find_next_bit(ro_map, end + 1, bdf)) <= end) {
+            arch_pci_ro_device(cfg->pci_segment, bdf);
+            if (bdf++ == end)
+                break;
+        }
+    }
     return 0;
 }
 
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/amd/iommu_detect.c
--- a/xen/drivers/passthrough/amd/iommu_detect.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/amd/iommu_detect.c	Fri Jun 22 13:43:00 2012 +0200
@@ -153,6 +153,12 @@ int __init amd_iommu_detect_one_acpi(
     if ( rt )
         return -ENODEV;
 
+    rt = pci_ro_device(iommu->seg, bus, PCI_DEVFN(dev, func));
+    if ( rt )
+        printk(XENLOG_ERR
+               "Could not mark config space of %04x:%02x:%02x.%u read-only (%d)\n",
+               iommu->seg, bus, dev, func, rt);
+
     list_add_tail(&iommu->list, &amd_iommu_head);
 
     return 0;
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/io.c	Fri Jun 22 13:43:00 2012 +0200
@@ -593,11 +593,3 @@ void hvm_dpci_eoi(struct domain *d, unsi
 unlock:
     spin_unlock(&d->event_lock);
 }
-
-static int __init setup_mmio_ro_ranges(void)
-{
-    mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
-                                  RANGESETF_prettyprint_hex);
-    return 0;
-}
-__initcall(setup_mmio_ro_ranges);
diff -r 2205914617cb -r 61844569a432 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/drivers/passthrough/pci.c	Fri Jun 22 13:43:00 2012 +0200
@@ -36,6 +36,7 @@
 struct pci_seg {
     struct list_head alldevs_list;
     u16 nr;
+    unsigned long *ro_map;
     /* bus2bridge_lock protects bus2bridge array */
     spinlock_t bus2bridge_lock;
 #define MAX_BUSES 256
@@ -106,6 +107,8 @@ void __init pt_pci_init(void)
     radix_tree_init(&pci_segments);
     if ( !alloc_pseg(0) )
         panic("Could not initialize PCI segment 0\n");
+    mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
+                                  RANGESETF_prettyprint_hex);
 }
 
 int __init pci_add_segment(u16 seg)
@@ -113,6 +116,13 @@ int __init pci_add_segment(u16 seg)
     return alloc_pseg(seg) ? 0 : -ENOMEM;
 }
 
+const unsigned long *pci_get_ro_map(u16 seg)
+{
+    struct pci_seg *pseg = get_pseg(seg);
+
+    return pseg ? pseg->ro_map : NULL;
+}
+
 static struct pci_dev *alloc_pdev(struct pci_seg *pseg, u8 bus, u8 devfn)
 {
     struct pci_dev *pdev;
@@ -198,6 +208,33 @@ static void free_pdev(struct pci_seg *ps
     xfree(pdev);
 }
 
+int __init pci_ro_device(int seg, int bus, int devfn)
+{
+    struct pci_seg *pseg = alloc_pseg(seg);
+    struct pci_dev *pdev;
+
+    if ( !pseg )
+        return -ENOMEM;
+    pdev = alloc_pdev(pseg, bus, devfn);
+    if ( !pdev )
+        return -ENOMEM;
+
+    if ( !pseg->ro_map )
+    {
+        size_t sz = BITS_TO_LONGS(PCI_BDF(-1, -1, -1) + 1) * sizeof(long);
+
+        pseg->ro_map = alloc_xenheap_pages(get_order_from_bytes(sz), 0);
+        if ( !pseg->ro_map )
+            return -ENOMEM;
+        memset(pseg->ro_map, 0, sz);
+    }
+
+    __set_bit(PCI_BDF2(bus, devfn), pseg->ro_map);
+    arch_pci_ro_device(seg, PCI_BDF2(bus, devfn));
+
+    return 0;
+}
+
 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn)
 {
     struct pci_seg *pseg = get_pseg(seg);
diff -r 2205914617cb -r 61844569a432 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/include/asm-x86/mm.h	Fri Jun 22 13:43:00 2012 +0200
@@ -555,6 +555,8 @@ void memguard_unguard_stack(void *p);
 
 int  ptwr_do_page_fault(struct vcpu *, unsigned long,
                         struct cpu_user_regs *);
+int  mmio_ro_do_page_fault(struct vcpu *, unsigned long,
+                           struct cpu_user_regs *);
 
 int audit_adjust_pgtables(struct domain *d, int dir, int noisy);
 
diff -r 2205914617cb -r 61844569a432 xen/include/xen/pci.h
--- a/xen/include/xen/pci.h	Fri Jun 22 11:41:43 2012 +0100
+++ b/xen/include/xen/pci.h	Fri Jun 22 13:43:00 2012 +0200
@@ -98,8 +98,11 @@ struct pci_dev *pci_lock_domain_pdev(
 void setup_dom0_pci_devices(struct domain *, void (*)(struct pci_dev *));
 void pci_release_devices(struct domain *d);
 int pci_add_segment(u16 seg);
+const unsigned long *pci_get_ro_map(u16 seg);
 int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *);
 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
+int pci_ro_device(int seg, int bus, int devfn);
+void arch_pci_ro_device(int seg, int bdf);
 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_get_pdev_by_domain(
     struct domain *, int seg, int bus, int devfn);

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIng-0003Vv-Pa; Sat, 23 Jun 2012 05:22:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInf-0003PA-FS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:23 +0000
Received: from [85.158.138.51:41780] by server-11.bemta-3.messagelabs.com id
	A9/D1-02904-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428941!20950177!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12921 invoked from network); 23 Jun 2012 05:22:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0006Dt-Ct
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0001N3-BX
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Message-Id: <E1SiInd-0001N3-BX@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PCI: pass correct register value
	to XSM
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1340365494 -7200
# Node ID 9c5e36af6ef34c876e62ddd4e3756de394d9df4f
# Parent  61844569a4328ec122bfc0b257f3e930a560ed47
x86/PCI: pass correct register value to XSM

When attempting to use AMD's extension to access the extended PCI config
space, only the low byte of the register number was being passed to XSM.
Include the correct value of the register if this feature is enabled;
otherwise, bits 24-30 of port cf8 are reserved, so disallow the invalid
access.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Don't fail the permission check except when the MSR can't be read.

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


diff -r 61844569a432 -r 9c5e36af6ef3 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Fri Jun 22 13:43:00 2012 +0200
+++ b/xen/arch/x86/traps.c	Fri Jun 22 13:44:54 2012 +0200
@@ -1701,6 +1701,18 @@ static int pci_cfg_ok(struct domain *d, 
             return 0;
     }
     start = d->arch.pci_cf8 & 0xFF;
+    /* AMD extended configuration space access? */
+    if ( (d->arch.pci_cf8 & 0x0F000000) &&
+         boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+         boot_cpu_data.x86 >= 0x10 && boot_cpu_data.x86 <= 0x17 )
+    {
+        uint64_t msr_val;
+
+        if ( rdmsr_safe(MSR_AMD64_NB_CFG, msr_val) )
+            return 0;
+        if ( msr_val & (1ULL << AMD64_NB_CFG_CF8_EXT_ENABLE_BIT) )
+            start |= (d->arch.pci_cf8 >> 16) & 0xF00;
+    }
     end = start + size - 1;
     if (xsm_pci_config_permission(d, machine_bdf, start, end, write))
         return 0;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIng-0003Vv-Pa; Sat, 23 Jun 2012 05:22:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInf-0003PA-FS
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:23 +0000
Received: from [85.158.138.51:41780] by server-11.bemta-3.messagelabs.com id
	A9/D1-02904-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340428941!20950177!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12921 invoked from network); 23 Jun 2012 05:22:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0006Dt-Ct
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0001N3-BX
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Message-Id: <E1SiInd-0001N3-BX@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PCI: pass correct register value
	to XSM
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1340365494 -7200
# Node ID 9c5e36af6ef34c876e62ddd4e3756de394d9df4f
# Parent  61844569a4328ec122bfc0b257f3e930a560ed47
x86/PCI: pass correct register value to XSM

When attempting to use AMD's extension to access the extended PCI config
space, only the low byte of the register number was being passed to XSM.
Include the correct value of the register if this feature is enabled;
otherwise, bits 24-30 of port cf8 are reserved, so disallow the invalid
access.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Don't fail the permission check except when the MSR can't be read.

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


diff -r 61844569a432 -r 9c5e36af6ef3 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Fri Jun 22 13:43:00 2012 +0200
+++ b/xen/arch/x86/traps.c	Fri Jun 22 13:44:54 2012 +0200
@@ -1701,6 +1701,18 @@ static int pci_cfg_ok(struct domain *d, 
             return 0;
     }
     start = d->arch.pci_cf8 & 0xFF;
+    /* AMD extended configuration space access? */
+    if ( (d->arch.pci_cf8 & 0x0F000000) &&
+         boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+         boot_cpu_data.x86 >= 0x10 && boot_cpu_data.x86 <= 0x17 )
+    {
+        uint64_t msr_val;
+
+        if ( rdmsr_safe(MSR_AMD64_NB_CFG, msr_val) )
+            return 0;
+        if ( msr_val & (1ULL << AMD64_NB_CFG_CF8_EXT_ENABLE_BIT) )
+            start |= (d->arch.pci_cf8 >> 16) & 0xF00;
+    }
     end = start + size - 1;
     if (xsm_pci_config_permission(d, machine_bdf, start, end, write))
         return 0;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIni-0003YF-1G; Sat, 23 Jun 2012 05:22:26 +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 1SiIng-0003JH-RV
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:25 +0000
Received: from [85.158.143.99:46743] by server-1.bemta-4.messagelabs.com id
	EC/60-24392-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340428942!17125472!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.6 required=7.0 tests=DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14224 invoked from network); 23 Jun 2012 05:22:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0006E3-TO
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0001NI-S4
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Message-Id: <E1SiInd-0001NI-S4@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:21 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix validation of scheduling
	parameters for sedf
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1340383410 -3600
# Node ID 836db8c4b9f9eacd4ccbd0743a862b16b7c2434c
# Parent  9c5e36af6ef34c876e62ddd4e3756de394d9df4f
libxl: fix validation of scheduling parameters for sedf

2205914617cb does its job in correcting the "wrong domain being
considered" issue introduced by 9d1fd58ff602. Unfortunately, when
dealing (again!) with the sedf scheduler, it is required for the
vCPUs of a domain to have been allocated and setup already (in
the hypervisor), when the first call to libxl_domain_sched_params_get()
happens, and that is not true.

This fixes that by avoiding calling that function at all, as we
only need to know which scheduler the domain is running under,
and that is provided by libxl__domain_scheduler() which is safe
to be called there.

While at it, also improve a bit the comments about the whole
sedf parameter validation and mangling process.

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


diff -r 9c5e36af6ef3 -r 836db8c4b9f9 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Jun 22 13:44:54 2012 +0200
+++ b/tools/libxl/libxl_create.c	Fri Jun 22 17:43:30 2012 +0100
@@ -80,36 +80,48 @@ static int sched_params_valid(libxl__gc 
     int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
     int has_extratime =
                 scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
-    libxl_domain_sched_params sci;
-
-    libxl_domain_sched_params_get(CTX, domid, &sci);
 
     /* The sedf scheduler needs some more consistency checking */
-    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+    if (libxl__domain_scheduler(gc, domid) == LIBXL_SCHEDULER_SEDF) {
         if (has_weight && (has_period || has_slice))
             return 0;
+        /* If you want a real-time domain, with its own period and
+         * slice, please, do provide both! */
         if (has_period != has_slice)
             return 0;
 
         /*
          * Idea is, if we specify a weight, then both period and
-         * slice has to be zero. OTOH, if we do not specify a weight,
-         * that means we want a pure best effort domain or an actual
-         * real-time one. In the former case, it is period that needs
-         * to be zero, in the latter, weight should be.
+         * slice has to be zero. OTOH, if we do specify a period and
+         * slice, it is weight that should be zeroed. See
+         * docs/misc/sedf_scheduler_mini-HOWTO.txt for more details
+         * on the meaningful combinations and their meanings.
          */
         if (has_weight) {
             scp->slice = 0;
             scp->period = 0;
         }
         else if (!has_period) {
+            /* No weight nor slice/period means best effort. Parameters needs
+             * some mangling in order to properly ask for that, though. */
+
+            /*
+             * Providing no weight does not make any sense if we do not allow
+             * the domain to run in extra time. On the other hand, if we have
+             * extra time, weight will be ignored (and zeroed) by Xen, but it
+             * can't be zero here, or the call for setting the scheduling
+             * parameters will fail. So, avoid the latter by setting a random
+             * weight (namely, 1), as it will be ignored anyway.
+             */
+
             /* We can setup a proper best effort domain (extra time only)
              * iff we either already have or are asking for some extra time. */
-            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->weight = has_extratime ? scp->extratime : 1;
             scp->period = 0;
+        } else {
+            /* Real-time domain: will get slice CPU time over every period */
+            scp->weight = 0;
         }
-        if (has_period && has_slice)
-            scp->weight = 0;
     }
 
     return 1;

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

From xen-changelog-bounces@lists.xen.org Sat Jun 23 05:22:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 23 Jun 2012 05:22:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SiIni-0003YF-1G; Sat, 23 Jun 2012 05:22:26 +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 1SiIng-0003JH-RV
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:25 +0000
Received: from [85.158.143.99:46743] by server-1.bemta-4.messagelabs.com id
	EC/60-24392-F8255EF4; Sat, 23 Jun 2012 05:22:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340428942!17125472!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.6 required=7.0 tests=DIET_1
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14224 invoked from network); 23 Jun 2012 05:22:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Jun 2012 05:22:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0006E3-TO
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SiInd-0001NI-S4
	for xen-changelog@lists.xensource.com; Sat, 23 Jun 2012 05:22:21 +0000
Message-Id: <E1SiInd-0001NI-S4@xenbits.xen.org>
Date: Sat, 23 Jun 2012 05:22:21 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix validation of scheduling
	parameters for sedf
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1340383410 -3600
# Node ID 836db8c4b9f9eacd4ccbd0743a862b16b7c2434c
# Parent  9c5e36af6ef34c876e62ddd4e3756de394d9df4f
libxl: fix validation of scheduling parameters for sedf

2205914617cb does its job in correcting the "wrong domain being
considered" issue introduced by 9d1fd58ff602. Unfortunately, when
dealing (again!) with the sedf scheduler, it is required for the
vCPUs of a domain to have been allocated and setup already (in
the hypervisor), when the first call to libxl_domain_sched_params_get()
happens, and that is not true.

This fixes that by avoiding calling that function at all, as we
only need to know which scheduler the domain is running under,
and that is provided by libxl__domain_scheduler() which is safe
to be called there.

While at it, also improve a bit the comments about the whole
sedf parameter validation and mangling process.

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


diff -r 9c5e36af6ef3 -r 836db8c4b9f9 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Jun 22 13:44:54 2012 +0200
+++ b/tools/libxl/libxl_create.c	Fri Jun 22 17:43:30 2012 +0100
@@ -80,36 +80,48 @@ static int sched_params_valid(libxl__gc 
     int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
     int has_extratime =
                 scp->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT;
-    libxl_domain_sched_params sci;
-
-    libxl_domain_sched_params_get(CTX, domid, &sci);
 
     /* The sedf scheduler needs some more consistency checking */
-    if (sci.sched == LIBXL_SCHEDULER_SEDF) {
+    if (libxl__domain_scheduler(gc, domid) == LIBXL_SCHEDULER_SEDF) {
         if (has_weight && (has_period || has_slice))
             return 0;
+        /* If you want a real-time domain, with its own period and
+         * slice, please, do provide both! */
         if (has_period != has_slice)
             return 0;
 
         /*
          * Idea is, if we specify a weight, then both period and
-         * slice has to be zero. OTOH, if we do not specify a weight,
-         * that means we want a pure best effort domain or an actual
-         * real-time one. In the former case, it is period that needs
-         * to be zero, in the latter, weight should be.
+         * slice has to be zero. OTOH, if we do specify a period and
+         * slice, it is weight that should be zeroed. See
+         * docs/misc/sedf_scheduler_mini-HOWTO.txt for more details
+         * on the meaningful combinations and their meanings.
          */
         if (has_weight) {
             scp->slice = 0;
             scp->period = 0;
         }
         else if (!has_period) {
+            /* No weight nor slice/period means best effort. Parameters needs
+             * some mangling in order to properly ask for that, though. */
+
+            /*
+             * Providing no weight does not make any sense if we do not allow
+             * the domain to run in extra time. On the other hand, if we have
+             * extra time, weight will be ignored (and zeroed) by Xen, but it
+             * can't be zero here, or the call for setting the scheduling
+             * parameters will fail. So, avoid the latter by setting a random
+             * weight (namely, 1), as it will be ignored anyway.
+             */
+
             /* We can setup a proper best effort domain (extra time only)
              * iff we either already have or are asking for some extra time. */
-            scp->weight = has_extratime ? scp->extratime : sci.extratime;
+            scp->weight = has_extratime ? scp->extratime : 1;
             scp->period = 0;
+        } else {
+            /* Real-time domain: will get slice CPU time over every period */
+            scp->weight = 0;
         }
-        if (has_period && has_slice)
-            scp->weight = 0;
     }
 
     return 1;

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

From xen-changelog-bounces@lists.xen.org Mon Jun 25 16:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 25 Jun 2012 16:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjCZH-0007vr-LK; Mon, 25 Jun 2012 16:55:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZG-0007vm-53
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:14 +0000
Received: from [85.158.139.83:51489] by server-12.bemta-5.messagelabs.com id
	48/4A-25233-1F798EF4; Mon, 25 Jun 2012 16:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-182.messagelabs.com!1340643311!24275496!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6562 invoked from network); 25 Jun 2012 16:55:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Jun 2012 16:55:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZB-0007e2-Tn
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZB-0001bX-M2
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:09 +0000
Message-Id: <E1SjCZB-0001bX-M2@xenbits.xen.org>
Date: Mon, 25 Jun 2012 16:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Fix check if guest enabled nested
	paging.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1340615903 -3600
# Node ID 8c70ad9fd221c4e1549579b63ad20d0f8d4ced83
# Parent  836db8c4b9f9eacd4ccbd0743a862b16b7c2434c
Fix check if guest enabled nested paging.

Fixes crashes with Windows guests when shadow-on-nested is used.

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


diff -r 836db8c4b9f9 -r 8c70ad9fd221 xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c	Fri Jun 22 17:43:30 2012 +0100
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c	Mon Jun 25 10:18:23 2012 +0100
@@ -935,6 +935,9 @@ nsvm_vmcb_guest_intercepts_exitcode(stru
         return 0;
 
     case VMEXIT_NPF:
+        if (nestedhvm_paging_mode_hap(v))
+            break;
+        return 0;
     case VMEXIT_INVALID:
         /* Always intercepted */
         break;

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

From xen-changelog-bounces@lists.xen.org Mon Jun 25 16:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 25 Jun 2012 16:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjCZH-0007vr-LK; Mon, 25 Jun 2012 16:55:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZG-0007vm-53
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:14 +0000
Received: from [85.158.139.83:51489] by server-12.bemta-5.messagelabs.com id
	48/4A-25233-1F798EF4; Mon, 25 Jun 2012 16:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-182.messagelabs.com!1340643311!24275496!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6562 invoked from network); 25 Jun 2012 16:55:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Jun 2012 16:55:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZB-0007e2-Tn
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjCZB-0001bX-M2
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 16:55:09 +0000
Message-Id: <E1SjCZB-0001bX-M2@xenbits.xen.org>
Date: Mon, 25 Jun 2012 16:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Fix check if guest enabled nested
	paging.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1340615903 -3600
# Node ID 8c70ad9fd221c4e1549579b63ad20d0f8d4ced83
# Parent  836db8c4b9f9eacd4ccbd0743a862b16b7c2434c
Fix check if guest enabled nested paging.

Fixes crashes with Windows guests when shadow-on-nested is used.

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


diff -r 836db8c4b9f9 -r 8c70ad9fd221 xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c	Fri Jun 22 17:43:30 2012 +0100
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c	Mon Jun 25 10:18:23 2012 +0100
@@ -935,6 +935,9 @@ nsvm_vmcb_guest_intercepts_exitcode(stru
         return 0;
 
     case VMEXIT_NPF:
+        if (nestedhvm_paging_mode_hap(v))
+            break;
+        return 0;
     case VMEXIT_INVALID:
         /* Always intercepted */
         break;

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

From xen-changelog-bounces@lists.xen.org Mon Jun 25 23:11:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 25 Jun 2012 23:11:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjIRF-000621-Ht; Mon, 25 Jun 2012 23:11:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIRD-00061s-VF
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:20 +0000
Received: from [85.158.143.35:31292] by server-3.bemta-4.messagelabs.com id
	A6/AE-05808-710F8EF4; Mon, 25 Jun 2012 23:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1340665869!13976717!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27737 invoked from network); 25 Jun 2012 23:11:11 -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;
	25 Jun 2012 23:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIR2-0003TJ-Lk
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIR2-0001rB-1b
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:08 +0000
Message-Id: <E1SjIR2-0001rB-1b@xenbits.xen.org>
Date: Mon, 25 Jun 2012 23:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix build with gcc 4.7.x
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340624492 -7200
# Node ID e08cf97e76f0b8fa8ff68050e6108c97ef7d9af4
# Parent  8c70ad9fd221c4e1549579b63ad20d0f8d4ced83
arm: fix build with gcc 4.7.x

As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and
-march=armv7-a due to conflicting feature sets causing amibiguity in
instruction selection. Since the former implies the latter, just use
the former (and drop the -march=).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8c70ad9fd221 -r e08cf97e76f0 xen/arch/arm/Rules.mk
--- a/xen/arch/arm/Rules.mk	Mon Jun 25 10:18:23 2012 +0100
+++ b/xen/arch/arm/Rules.mk	Mon Jun 25 13:41:32 2012 +0200
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
-CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
+CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")

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

From xen-changelog-bounces@lists.xen.org Mon Jun 25 23:11:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 25 Jun 2012 23:11:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjIRF-000621-Ht; Mon, 25 Jun 2012 23:11:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIRD-00061s-VF
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:20 +0000
Received: from [85.158.143.35:31292] by server-3.bemta-4.messagelabs.com id
	A6/AE-05808-710F8EF4; Mon, 25 Jun 2012 23:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1340665869!13976717!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27737 invoked from network); 25 Jun 2012 23:11:11 -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;
	25 Jun 2012 23:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIR2-0003TJ-Lk
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjIR2-0001rB-1b
	for xen-changelog@lists.xensource.com; Mon, 25 Jun 2012 23:11:08 +0000
Message-Id: <E1SjIR2-0001rB-1b@xenbits.xen.org>
Date: Mon, 25 Jun 2012 23:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix build with gcc 4.7.x
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340624492 -7200
# Node ID e08cf97e76f0b8fa8ff68050e6108c97ef7d9af4
# Parent  8c70ad9fd221c4e1549579b63ad20d0f8d4ced83
arm: fix build with gcc 4.7.x

As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and
-march=armv7-a due to conflicting feature sets causing amibiguity in
instruction selection. Since the former implies the latter, just use
the former (and drop the -march=).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8c70ad9fd221 -r e08cf97e76f0 xen/arch/arm/Rules.mk
--- a/xen/arch/arm/Rules.mk	Mon Jun 25 10:18:23 2012 +0100
+++ b/xen/arch/arm/Rules.mk	Mon Jun 25 13:41:32 2012 +0200
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
-CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
+CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJu-00059n-Qp; Tue, 26 Jun 2012 22:33:14 +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 1SjeJt-000593-1P
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from [193.109.254.147:34341] by server-11.bemta-14.messagelabs.com
	id 33/0C-24843-8A83AEF4; Tue, 26 Jun 2012 22:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1340749990!1851686!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17832 invoked from network); 26 Jun 2012 22:33:11 -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;
	26 Jun 2012 22:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0004Fe-Hr
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0003cM-GR
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Message-Id: <E1SjeJq-0003cM-GR@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: enable interrupts while
	handling traps
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724227 -3600
# Node ID 8af8392e3a29a924663c329a417e1912e9fbe867
# Parent  e9e2127ef47a70dc926e4eed251c25ceafd7403a
arm: enable interrupts while handling traps

For most traps we can do this as soon as we have saved the necessary state.
For IRQs and FIQs we must wait until we have acked the interrupt with the GIC.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/entry.S
--- a/xen/arch/arm/entry.S	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/entry.S	Tue Jun 26 16:23:47 2012 +0100
@@ -46,6 +46,17 @@ save_guest_regs:
 	ALIGN;												\
 trap_##trap:												\
 	SAVE_ALL;											\
+	cpsie i; 	/* local_irq_enable */								\
+	adr lr, return_from_trap;									\
+	mov r0, sp;											\
+	mov r11, sp;											\
+	bic sp, #7; /* Align the stack pointer (noop on guest trap) */					\
+	b do_trap_##trap
+
+#define DEFINE_TRAP_ENTRY_NOIRQ(trap)									\
+	ALIGN;												\
+trap_##trap:												\
+	SAVE_ALL;											\
 	adr lr, return_from_trap;									\
 	mov r0, sp;											\
 	mov r11, sp;											\
@@ -69,8 +80,8 @@ DEFINE_TRAP_ENTRY(supervisor_call)
 DEFINE_TRAP_ENTRY(prefetch_abort)
 DEFINE_TRAP_ENTRY(data_abort)
 DEFINE_TRAP_ENTRY(hypervisor)
-DEFINE_TRAP_ENTRY(irq)
-DEFINE_TRAP_ENTRY(fiq)
+DEFINE_TRAP_ENTRY_NOIRQ(irq)
+DEFINE_TRAP_ENTRY_NOIRQ(fiq)
 
 return_from_trap:
 	mov sp, r11
@@ -83,7 +94,7 @@ ENTRY(return_to_new_vcpu)
 ENTRY(return_to_guest)
 	mov r11, sp
 	bic sp, #7 /* Align the stack pointer */
-	bl leave_hypervisor_tail
+	bl leave_hypervisor_tail /* Disables interrupts on return */
 	mov sp, r11
 	RESTORE_ONE_BANKED(SP_usr)
 	/* LR_usr is the same physical register as lr and is restored below */
diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/gic.c	Tue Jun 26 16:23:47 2012 +0100
@@ -509,6 +509,8 @@ void gic_interrupt(struct cpu_user_regs 
     uint32_t intack = GICC[GICC_IAR];
     unsigned int irq = intack & GICC_IA_IRQ;
 
+    local_irq_enable();
+
     if ( irq == 1023 )
         /* Spurious interrupt */
         return;
diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
@@ -412,7 +412,6 @@ static void do_debug_trap(struct cpu_use
 static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss)
 {
     arm_hypercall_t *call = NULL;
-    local_irq_enable();
 
     if ( iss != XEN_HYPERCALL_TAG )
     {

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJu-00059n-Qp; Tue, 26 Jun 2012 22:33:14 +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 1SjeJt-000593-1P
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from [193.109.254.147:34341] by server-11.bemta-14.messagelabs.com
	id 33/0C-24843-8A83AEF4; Tue, 26 Jun 2012 22:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1340749990!1851686!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17832 invoked from network); 26 Jun 2012 22:33:11 -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;
	26 Jun 2012 22:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0004Fe-Hr
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0003cM-GR
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Message-Id: <E1SjeJq-0003cM-GR@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: enable interrupts while
	handling traps
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724227 -3600
# Node ID 8af8392e3a29a924663c329a417e1912e9fbe867
# Parent  e9e2127ef47a70dc926e4eed251c25ceafd7403a
arm: enable interrupts while handling traps

For most traps we can do this as soon as we have saved the necessary state.
For IRQs and FIQs we must wait until we have acked the interrupt with the GIC.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/entry.S
--- a/xen/arch/arm/entry.S	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/entry.S	Tue Jun 26 16:23:47 2012 +0100
@@ -46,6 +46,17 @@ save_guest_regs:
 	ALIGN;												\
 trap_##trap:												\
 	SAVE_ALL;											\
+	cpsie i; 	/* local_irq_enable */								\
+	adr lr, return_from_trap;									\
+	mov r0, sp;											\
+	mov r11, sp;											\
+	bic sp, #7; /* Align the stack pointer (noop on guest trap) */					\
+	b do_trap_##trap
+
+#define DEFINE_TRAP_ENTRY_NOIRQ(trap)									\
+	ALIGN;												\
+trap_##trap:												\
+	SAVE_ALL;											\
 	adr lr, return_from_trap;									\
 	mov r0, sp;											\
 	mov r11, sp;											\
@@ -69,8 +80,8 @@ DEFINE_TRAP_ENTRY(supervisor_call)
 DEFINE_TRAP_ENTRY(prefetch_abort)
 DEFINE_TRAP_ENTRY(data_abort)
 DEFINE_TRAP_ENTRY(hypervisor)
-DEFINE_TRAP_ENTRY(irq)
-DEFINE_TRAP_ENTRY(fiq)
+DEFINE_TRAP_ENTRY_NOIRQ(irq)
+DEFINE_TRAP_ENTRY_NOIRQ(fiq)
 
 return_from_trap:
 	mov sp, r11
@@ -83,7 +94,7 @@ ENTRY(return_to_new_vcpu)
 ENTRY(return_to_guest)
 	mov r11, sp
 	bic sp, #7 /* Align the stack pointer */
-	bl leave_hypervisor_tail
+	bl leave_hypervisor_tail /* Disables interrupts on return */
 	mov sp, r11
 	RESTORE_ONE_BANKED(SP_usr)
 	/* LR_usr is the same physical register as lr and is restored below */
diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/gic.c	Tue Jun 26 16:23:47 2012 +0100
@@ -509,6 +509,8 @@ void gic_interrupt(struct cpu_user_regs 
     uint32_t intack = GICC[GICC_IAR];
     unsigned int irq = intack & GICC_IA_IRQ;
 
+    local_irq_enable();
+
     if ( irq == 1023 )
         /* Spurious interrupt */
         return;
diff -r e9e2127ef47a -r 8af8392e3a29 xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:46 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
@@ -412,7 +412,6 @@ static void do_debug_trap(struct cpu_use
 static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss)
 {
     arm_hypercall_t *call = NULL;
-    local_irq_enable();
 
     if ( iss != XEN_HYPERCALL_TAG )
     {

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059D-Ii; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-00058i-Tu
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.138.51:56683] by server-10.bemta-3.messagelabs.com id
	B5/E3-01753-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1340749989!25634164!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26264 invoked from network); 26 Jun 2012 22:33:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0004FV-Un
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0003bb-TC
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Message-Id: <E1SjeJo-0003bb-TC@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: handy function to print a walk
	of a page table
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724224 -3600
# Node ID f84e8a0914b61c8ea2875a424e3cade37b8feaf6
# Parent  d29a911cc8cf816934a462dad0a25462e6049c18
arm: handy function to print a walk of a page table

Include helpers for dumping hypervisor walks and guest p2m walks.

Useful for debug but not actually used in this patch.

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


diff -r d29a911cc8cf -r f84e8a0914b6 xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/arch/arm/mm.c	Tue Jun 26 16:23:44 2012 +0100
@@ -26,6 +26,7 @@
 #include <xen/preempt.h>
 #include <xen/errno.h>
 #include <xen/guest_access.h>
+#include <xen/domain_page.h>
 #include <asm/page.h>
 #include <asm/current.h>
 #include <public/memory.h>
@@ -42,6 +43,8 @@ static lpae_t xen_xenmap[LPAE_ENTRIES] _
 /* Non-boot CPUs use this to find the correct pagetables. */
 uint64_t boot_httbr;
 
+static paddr_t phys_offset;
+
 /* Limits of the Xen heap */
 unsigned long xenheap_mfn_start, xenheap_mfn_end;
 unsigned long xenheap_virt_end;
@@ -53,6 +56,50 @@ unsigned long max_page;
 
 extern char __init_begin[], __init_end[];
 
+void dump_pt_walk(lpae_t *first, paddr_t addr)
+{
+    lpae_t *second = NULL, *third = NULL;
+
+    if ( first_table_offset(addr) >= LPAE_ENTRIES )
+        return;
+
+    printk("1ST[0x%llx] = 0x%"PRIpaddr"\n",
+           first_table_offset(addr),
+           first[first_table_offset(addr)].bits);
+    if ( !first[first_table_offset(addr)].walk.valid ||
+         !first[first_table_offset(addr)].walk.table )
+        goto done;
+
+    second = map_domain_page(first[first_table_offset(addr)].walk.base);
+    printk("2ND[0x%llx] = 0x%"PRIpaddr"\n",
+           second_table_offset(addr),
+           second[second_table_offset(addr)].bits);
+    if ( !second[second_table_offset(addr)].walk.valid ||
+         !second[second_table_offset(addr)].walk.table )
+        goto done;
+
+    third = map_domain_page(second[second_table_offset(addr)].walk.base);
+    printk("3RD[0x%llx] = 0x%"PRIpaddr"\n",
+           third_table_offset(addr),
+           third[third_table_offset(addr)].bits);
+
+done:
+    if (third) unmap_domain_page(third);
+    if (second) unmap_domain_page(second);
+
+}
+
+void dump_hyp_walk(uint32_t addr)
+{
+    uint64_t httbr = READ_CP64(HTTBR);
+
+    printk("Walking Hypervisor VA 0x%08"PRIx32" via HTTBR 0x%016"PRIx64"\n",
+           addr, httbr);
+
+    BUG_ON( (lpae_t *)(unsigned long)(httbr - phys_offset) != xen_pgtable );
+    dump_pt_walk(xen_pgtable, addr);
+}
+
 /* Map a 4k page in a fixmap entry */
 void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
 {
@@ -159,7 +206,7 @@ void unmap_domain_page(const void *va)
  * Changes here may need matching changes in head.S */
 void __init setup_pagetables(unsigned long boot_phys_offset)
 {
-    paddr_t xen_paddr, phys_offset;
+    paddr_t xen_paddr;
     unsigned long dest_va;
     lpae_t pte, *p;
     int i;
diff -r d29a911cc8cf -r f84e8a0914b6 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:44 2012 +0100
@@ -5,6 +5,21 @@
 #include <xen/domain_page.h>
 #include <asm/flushtlb.h>
 
+void dump_p2m_lookup(struct domain *d, paddr_t addr)
+{
+    struct p2m_domain *p2m = &d->arch.p2m;
+    lpae_t *first;
+
+    printk("dom%d IPA 0x%"PRIpaddr"\n", d->domain_id, addr);
+
+    printk("P2M @ %p mfn:0x%lx\n",
+           p2m->first_level, page_to_mfn(p2m->first_level));
+
+    first = __map_domain_page(p2m->first_level);
+    dump_pt_walk(first, addr);
+    unmap_domain_page(first);
+}
+
 void p2m_load_VTTBR(struct domain *d)
 {
     struct p2m_domain *p2m = &d->arch.p2m;
diff -r d29a911cc8cf -r f84e8a0914b6 xen/include/asm-arm/page.h
--- a/xen/include/asm-arm/page.h	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/include/asm-arm/page.h	Tue Jun 26 16:23:44 2012 +0100
@@ -132,10 +132,28 @@ typedef struct {
     unsigned long sbz1:5;
 } __attribute__((__packed__)) lpae_p2m_t;
 
+/*
+ * Walk is the common bits of p2m and pt entries which are needed to
+ * simply walk the table (e.g. for debug).
+ */
+typedef struct {
+    /* These are used in all kinds of entry. */
+    unsigned long valid:1;      /* Valid mapping */
+    unsigned long table:1;      /* == 1 in 4k map entries too */
+
+    unsigned long pad2:10;
+
+    /* The base address must be approprately aligned for Block entries */
+    unsigned long base:28;      /* Base address of block or next table */
+
+    unsigned long pad1:24;
+} __attribute__((__packed__)) lpae_walk_t;
+
 typedef union {
     uint64_t bits;
     lpae_pt_t pt;
     lpae_p2m_t p2m;
+    lpae_walk_t walk;
 } lpae_t;
 
 /* Standard entry type that we'll use to build Xen's own pagetables.
@@ -252,6 +270,14 @@ static inline void flush_guest_tlb(void)
     WRITE_CP32(r0 /* dummy */, TLBIALLNSNH);
 }
 
+/* Print a walk of an arbitrary page table */
+void dump_pt_walk(lpae_t *table, paddr_t addr);
+
+/* Print a walk of the hypervisor's page tables for a virtual addr. */
+extern void dump_hyp_walk(uint32_t addr);
+/* Print a walk of the p2m for a domain for a physical address. */
+extern void dump_p2m_lookup(struct domain *d, paddr_t addr);
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(uint32_t va)
 {

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059D-Ii; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-00058i-Tu
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.138.51:56683] by server-10.bemta-3.messagelabs.com id
	B5/E3-01753-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1340749989!25634164!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26264 invoked from network); 26 Jun 2012 22:33:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0004FV-Un
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0003bb-TC
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Message-Id: <E1SjeJo-0003bb-TC@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: handy function to print a walk
	of a page table
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724224 -3600
# Node ID f84e8a0914b61c8ea2875a424e3cade37b8feaf6
# Parent  d29a911cc8cf816934a462dad0a25462e6049c18
arm: handy function to print a walk of a page table

Include helpers for dumping hypervisor walks and guest p2m walks.

Useful for debug but not actually used in this patch.

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


diff -r d29a911cc8cf -r f84e8a0914b6 xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/arch/arm/mm.c	Tue Jun 26 16:23:44 2012 +0100
@@ -26,6 +26,7 @@
 #include <xen/preempt.h>
 #include <xen/errno.h>
 #include <xen/guest_access.h>
+#include <xen/domain_page.h>
 #include <asm/page.h>
 #include <asm/current.h>
 #include <public/memory.h>
@@ -42,6 +43,8 @@ static lpae_t xen_xenmap[LPAE_ENTRIES] _
 /* Non-boot CPUs use this to find the correct pagetables. */
 uint64_t boot_httbr;
 
+static paddr_t phys_offset;
+
 /* Limits of the Xen heap */
 unsigned long xenheap_mfn_start, xenheap_mfn_end;
 unsigned long xenheap_virt_end;
@@ -53,6 +56,50 @@ unsigned long max_page;
 
 extern char __init_begin[], __init_end[];
 
+void dump_pt_walk(lpae_t *first, paddr_t addr)
+{
+    lpae_t *second = NULL, *third = NULL;
+
+    if ( first_table_offset(addr) >= LPAE_ENTRIES )
+        return;
+
+    printk("1ST[0x%llx] = 0x%"PRIpaddr"\n",
+           first_table_offset(addr),
+           first[first_table_offset(addr)].bits);
+    if ( !first[first_table_offset(addr)].walk.valid ||
+         !first[first_table_offset(addr)].walk.table )
+        goto done;
+
+    second = map_domain_page(first[first_table_offset(addr)].walk.base);
+    printk("2ND[0x%llx] = 0x%"PRIpaddr"\n",
+           second_table_offset(addr),
+           second[second_table_offset(addr)].bits);
+    if ( !second[second_table_offset(addr)].walk.valid ||
+         !second[second_table_offset(addr)].walk.table )
+        goto done;
+
+    third = map_domain_page(second[second_table_offset(addr)].walk.base);
+    printk("3RD[0x%llx] = 0x%"PRIpaddr"\n",
+           third_table_offset(addr),
+           third[third_table_offset(addr)].bits);
+
+done:
+    if (third) unmap_domain_page(third);
+    if (second) unmap_domain_page(second);
+
+}
+
+void dump_hyp_walk(uint32_t addr)
+{
+    uint64_t httbr = READ_CP64(HTTBR);
+
+    printk("Walking Hypervisor VA 0x%08"PRIx32" via HTTBR 0x%016"PRIx64"\n",
+           addr, httbr);
+
+    BUG_ON( (lpae_t *)(unsigned long)(httbr - phys_offset) != xen_pgtable );
+    dump_pt_walk(xen_pgtable, addr);
+}
+
 /* Map a 4k page in a fixmap entry */
 void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
 {
@@ -159,7 +206,7 @@ void unmap_domain_page(const void *va)
  * Changes here may need matching changes in head.S */
 void __init setup_pagetables(unsigned long boot_phys_offset)
 {
-    paddr_t xen_paddr, phys_offset;
+    paddr_t xen_paddr;
     unsigned long dest_va;
     lpae_t pte, *p;
     int i;
diff -r d29a911cc8cf -r f84e8a0914b6 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:44 2012 +0100
@@ -5,6 +5,21 @@
 #include <xen/domain_page.h>
 #include <asm/flushtlb.h>
 
+void dump_p2m_lookup(struct domain *d, paddr_t addr)
+{
+    struct p2m_domain *p2m = &d->arch.p2m;
+    lpae_t *first;
+
+    printk("dom%d IPA 0x%"PRIpaddr"\n", d->domain_id, addr);
+
+    printk("P2M @ %p mfn:0x%lx\n",
+           p2m->first_level, page_to_mfn(p2m->first_level));
+
+    first = __map_domain_page(p2m->first_level);
+    dump_pt_walk(first, addr);
+    unmap_domain_page(first);
+}
+
 void p2m_load_VTTBR(struct domain *d)
 {
     struct p2m_domain *p2m = &d->arch.p2m;
diff -r d29a911cc8cf -r f84e8a0914b6 xen/include/asm-arm/page.h
--- a/xen/include/asm-arm/page.h	Tue Jun 26 16:23:43 2012 +0100
+++ b/xen/include/asm-arm/page.h	Tue Jun 26 16:23:44 2012 +0100
@@ -132,10 +132,28 @@ typedef struct {
     unsigned long sbz1:5;
 } __attribute__((__packed__)) lpae_p2m_t;
 
+/*
+ * Walk is the common bits of p2m and pt entries which are needed to
+ * simply walk the table (e.g. for debug).
+ */
+typedef struct {
+    /* These are used in all kinds of entry. */
+    unsigned long valid:1;      /* Valid mapping */
+    unsigned long table:1;      /* == 1 in 4k map entries too */
+
+    unsigned long pad2:10;
+
+    /* The base address must be approprately aligned for Block entries */
+    unsigned long base:28;      /* Base address of block or next table */
+
+    unsigned long pad1:24;
+} __attribute__((__packed__)) lpae_walk_t;
+
 typedef union {
     uint64_t bits;
     lpae_pt_t pt;
     lpae_p2m_t p2m;
+    lpae_walk_t walk;
 } lpae_t;
 
 /* Standard entry type that we'll use to build Xen's own pagetables.
@@ -252,6 +270,14 @@ static inline void flush_guest_tlb(void)
     WRITE_CP32(r0 /* dummy */, TLBIALLNSNH);
 }
 
+/* Print a walk of an arbitrary page table */
+void dump_pt_walk(lpae_t *table, paddr_t addr);
+
+/* Print a walk of the hypervisor's page tables for a virtual addr. */
+extern void dump_hyp_walk(uint32_t addr);
+/* Print a walk of the p2m for a domain for a physical address. */
+extern void dump_p2m_lookup(struct domain *d, paddr_t addr);
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(uint32_t va)
 {

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJu-00059t-Td; Tue, 26 Jun 2012 22:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-00058n-F9
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from [85.158.143.35:13030] by server-2.bemta-4.messagelabs.com id
	2E/83-17938-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1340749991!16302100!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3482 invoked from network); 26 Jun 2012 22:33:12 -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;
	26 Jun 2012 22:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0004Fh-2r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0003cb-0v
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Message-Id: <E1SjeJr-0003cb-0v@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: hook up domctl and memory_op
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724227 -3600
# Node ID b718ea26f18d814260af05121e183cb7771817d5
# Parent  8af8392e3a29a924663c329a417e1912e9fbe867
arm: hook up domctl and memory_op

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8af8392e3a29 -r b718ea26f18d xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
@@ -373,6 +373,8 @@ typedef unsigned long arm_hypercall_t(
     [ __HYPERVISOR_ ## x ] = (arm_hypercall_t *) do_ ## x
 
 static arm_hypercall_t *arm_hypercall_table[] = {
+    HYPERCALL(memory_op),
+    HYPERCALL(domctl),
     HYPERCALL(arch_0),
     HYPERCALL(sched_op),
     HYPERCALL(console_io),

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJu-00059t-Td; Tue, 26 Jun 2012 22:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-00058n-F9
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from [85.158.143.35:13030] by server-2.bemta-4.messagelabs.com id
	2E/83-17938-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-21.messagelabs.com!1340749991!16302100!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3482 invoked from network); 26 Jun 2012 22:33:12 -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;
	26 Jun 2012 22:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0004Fh-2r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0003cb-0v
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Message-Id: <E1SjeJr-0003cb-0v@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: hook up domctl and memory_op
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724227 -3600
# Node ID b718ea26f18d814260af05121e183cb7771817d5
# Parent  8af8392e3a29a924663c329a417e1912e9fbe867
arm: hook up domctl and memory_op

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8af8392e3a29 -r b718ea26f18d xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:47 2012 +0100
@@ -373,6 +373,8 @@ typedef unsigned long arm_hypercall_t(
     [ __HYPERVISOR_ ## x ] = (arm_hypercall_t *) do_ ## x
 
 static arm_hypercall_t *arm_hypercall_table[] = {
+    HYPERCALL(memory_op),
+    HYPERCALL(domctl),
     HYPERCALL(arch_0),
     HYPERCALL(sched_op),
     HYPERCALL(console_io),

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BO-DU; Tue, 26 Jun 2012 22:33:17 +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 1SjeJw-0005AK-7U
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [193.109.254.147:22143] by server-2.bemta-14.messagelabs.com id
	D6/71-01735-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1340749993!1851690!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18005 invoked from network); 26 Jun 2012 22:33:14 -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;
	26 Jun 2012 22:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0004Fw-Ku
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0003dq-JV
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Message-Id: <E1SjeJt-0003dq-JV@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove hard tabs from
	init_idle_domain
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724231 -3600
# Node ID 86cc6f76973a6484c80f6b344fb512029ae335dd
# Parent  331f1b5c88cead47b9af41cf5901ad4e7c2b77ab
arm: remove hard tabs from init_idle_domain

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 331f1b5c88ce -r 86cc6f76973a xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/setup.c	Tue Jun 26 16:23:51 2012 +0100
@@ -47,9 +47,9 @@ static __attribute_used__ void init_done
 
 static void __init init_idle_domain(void)
 {
-        scheduler_init();
-        set_current(idle_vcpu[0]);
-        /* TODO: setup_idle_pagetable(); */
+    scheduler_init();
+    set_current(idle_vcpu[0]);
+    /* TODO: setup_idle_pagetable(); */
 }
 
 static void __init processor_id(void)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BO-DU; Tue, 26 Jun 2012 22:33:17 +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 1SjeJw-0005AK-7U
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [193.109.254.147:22143] by server-2.bemta-14.messagelabs.com id
	D6/71-01735-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1340749993!1851690!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18005 invoked from network); 26 Jun 2012 22:33:14 -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;
	26 Jun 2012 22:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0004Fw-Ku
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0003dq-JV
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Message-Id: <E1SjeJt-0003dq-JV@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove hard tabs from
	init_idle_domain
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724231 -3600
# Node ID 86cc6f76973a6484c80f6b344fb512029ae335dd
# Parent  331f1b5c88cead47b9af41cf5901ad4e7c2b77ab
arm: remove hard tabs from init_idle_domain

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 331f1b5c88ce -r 86cc6f76973a xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/setup.c	Tue Jun 26 16:23:51 2012 +0100
@@ -47,9 +47,9 @@ static __attribute_used__ void init_done
 
 static void __init init_idle_domain(void)
 {
-        scheduler_init();
-        set_current(idle_vcpu[0]);
-        /* TODO: setup_idle_pagetable(); */
+    scheduler_init();
+    set_current(idle_vcpu[0]);
+    /* TODO: setup_idle_pagetable(); */
 }
 
 static void __init processor_id(void)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BI-AZ; Tue, 26 Jun 2012 22:33:17 +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 1SjeJv-00058o-FB
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.138.51:59811] by server-9.bemta-3.messagelabs.com id
	51/94-10419-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340749993!29750274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32059 invoked from network); 26 Jun 2012 22:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0004Ft-7U
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0003db-2w
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Message-Id: <E1SjeJt-0003db-2w@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement p2m lookup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724231 -3600
# Node ID 331f1b5c88cead47b9af41cf5901ad4e7c2b77ab
# Parent  715e493f72523a54c8ad645c806334a3bf7c4ff1
arm: implement p2m lookup

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


diff -r 715e493f7252 -r 331f1b5c88ce xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:50 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:51 2012 +0100
@@ -32,6 +32,51 @@ void p2m_load_VTTBR(struct domain *d)
     isb(); /* Ensure update is visible */
 }
 
+/*
+ * Lookup the MFN corresponding to a domain's PFN.
+ *
+ * There are no processor functions to do a stage 2 only lookup therefore we
+ * do a a software walk.
+ */
+paddr_t p2m_lookup(struct domain *d, paddr_t paddr)
+{
+    struct p2m_domain *p2m = &d->arch.p2m;
+    lpae_t pte, *first = NULL, *second = NULL, *third = NULL;
+    paddr_t maddr = INVALID_PADDR;
+
+    spin_lock(&p2m->lock);
+
+    first = __map_domain_page(p2m->first_level);
+
+    pte = first[first_table_offset(paddr)];
+    if ( !pte.p2m.valid || !pte.p2m.table )
+        goto done;
+
+    second = map_domain_page(pte.p2m.base);
+    pte = second[second_table_offset(paddr)];
+    if ( !pte.p2m.valid || !pte.p2m.table )
+        goto done;
+
+    third = map_domain_page(pte.p2m.base);
+    pte = third[third_table_offset(paddr)];
+
+    /* This bit must be one in the level 3 entry */
+    if ( !pte.p2m.table )
+        pte.bits = 0;
+
+done:
+    if ( pte.p2m.valid )
+        maddr = (pte.bits & PADDR_MASK & PAGE_MASK) | (paddr & ~PAGE_MASK);
+
+    if (third) unmap_domain_page(third);
+    if (second) unmap_domain_page(second);
+    if (first) unmap_domain_page(first);
+
+    spin_unlock(&p2m->lock);
+
+    return maddr;
+}
+
 int guest_physmap_mark_populate_on_demand(struct domain *d,
                                           unsigned long gfn,
                                           unsigned int order)
diff -r 715e493f7252 -r 331f1b5c88ce xen/include/asm-arm/p2m.h
--- a/xen/include/asm-arm/p2m.h	Tue Jun 26 16:23:50 2012 +0100
+++ b/xen/include/asm-arm/p2m.h	Tue Jun 26 16:23:51 2012 +0100
@@ -32,6 +32,9 @@ int p2m_alloc_table(struct domain *d);
 /* */
 void p2m_load_VTTBR(struct domain *d);
 
+/* Look up the MFN corresponding to a domain's PFN. */
+paddr_t p2m_lookup(struct domain *d, paddr_t gpfn);
+
 /* Setup p2m RAM mapping for domain d from start-end. */
 int p2m_populate_ram(struct domain *d, paddr_t start, paddr_t end);
 /* Map MMIO regions in the p2m: start_gaddr and end_gaddr is the range

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BI-AZ; Tue, 26 Jun 2012 22:33:17 +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 1SjeJv-00058o-FB
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.138.51:59811] by server-9.bemta-3.messagelabs.com id
	51/94-10419-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340749993!29750274!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32059 invoked from network); 26 Jun 2012 22:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0004Ft-7U
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJt-0003db-2w
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:13 +0000
Message-Id: <E1SjeJt-0003db-2w@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement p2m lookup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724231 -3600
# Node ID 331f1b5c88cead47b9af41cf5901ad4e7c2b77ab
# Parent  715e493f72523a54c8ad645c806334a3bf7c4ff1
arm: implement p2m lookup

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


diff -r 715e493f7252 -r 331f1b5c88ce xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:50 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:51 2012 +0100
@@ -32,6 +32,51 @@ void p2m_load_VTTBR(struct domain *d)
     isb(); /* Ensure update is visible */
 }
 
+/*
+ * Lookup the MFN corresponding to a domain's PFN.
+ *
+ * There are no processor functions to do a stage 2 only lookup therefore we
+ * do a a software walk.
+ */
+paddr_t p2m_lookup(struct domain *d, paddr_t paddr)
+{
+    struct p2m_domain *p2m = &d->arch.p2m;
+    lpae_t pte, *first = NULL, *second = NULL, *third = NULL;
+    paddr_t maddr = INVALID_PADDR;
+
+    spin_lock(&p2m->lock);
+
+    first = __map_domain_page(p2m->first_level);
+
+    pte = first[first_table_offset(paddr)];
+    if ( !pte.p2m.valid || !pte.p2m.table )
+        goto done;
+
+    second = map_domain_page(pte.p2m.base);
+    pte = second[second_table_offset(paddr)];
+    if ( !pte.p2m.valid || !pte.p2m.table )
+        goto done;
+
+    third = map_domain_page(pte.p2m.base);
+    pte = third[third_table_offset(paddr)];
+
+    /* This bit must be one in the level 3 entry */
+    if ( !pte.p2m.table )
+        pte.bits = 0;
+
+done:
+    if ( pte.p2m.valid )
+        maddr = (pte.bits & PADDR_MASK & PAGE_MASK) | (paddr & ~PAGE_MASK);
+
+    if (third) unmap_domain_page(third);
+    if (second) unmap_domain_page(second);
+    if (first) unmap_domain_page(first);
+
+    spin_unlock(&p2m->lock);
+
+    return maddr;
+}
+
 int guest_physmap_mark_populate_on_demand(struct domain *d,
                                           unsigned long gfn,
                                           unsigned int order)
diff -r 715e493f7252 -r 331f1b5c88ce xen/include/asm-arm/p2m.h
--- a/xen/include/asm-arm/p2m.h	Tue Jun 26 16:23:50 2012 +0100
+++ b/xen/include/asm-arm/p2m.h	Tue Jun 26 16:23:51 2012 +0100
@@ -32,6 +32,9 @@ int p2m_alloc_table(struct domain *d);
 /* */
 void p2m_load_VTTBR(struct domain *d);
 
+/* Look up the MFN corresponding to a domain's PFN. */
+paddr_t p2m_lookup(struct domain *d, paddr_t gpfn);
+
 /* Setup p2m RAM mapping for domain d from start-end. */
 int p2m_populate_ram(struct domain *d, paddr_t start, paddr_t end);
 /* Map MMIO regions in the p2m: start_gaddr and end_gaddr is the range

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJs-00058y-Fy; Tue, 26 Jun 2012 22:33:12 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-00058g-9V
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from [85.158.139.83:39843] by server-2.bemta-5.messagelabs.com id
	1E/C6-04598-6A83AEF4; Tue, 26 Jun 2012 22:33:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1340749988!28376377!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12213 invoked from network); 26 Jun 2012 22:33:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0004FS-Fv
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0003bM-8u
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Message-Id: <E1SjeJo-0003bM-8u@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allocate top level p2m page for
	all non-idle domains
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724223 -3600
# Node ID d29a911cc8cf816934a462dad0a25462e6049c18
# Parent  e08cf97e76f0b8fa8ff68050e6108c97ef7d9af4
arm: allocate top level p2m page for all non-idle domains

Not just dom0.

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


diff -r e08cf97e76f0 -r d29a911cc8cf xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Mon Jun 25 13:41:32 2012 +0200
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:43 2012 +0100
@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d,
         clear_page(d->shared_info);
         share_xen_page_with_guest(
                 virt_to_page(d->shared_info), d, XENSHARE_writable);
+
+        if ( (rc = p2m_alloc_table(d)) != 0 )
+            goto fail;
     }
 
     d->max_vcpus = 8;
diff -r e08cf97e76f0 -r d29a911cc8cf xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Mon Jun 25 13:41:32 2012 +0200
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:43 2012 +0100
@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)
     void *p;
 
     /* First level P2M is 2 consecutive pages */
-    page = alloc_domheap_pages(d, 1, 0);
+    page = alloc_domheap_pages(NULL, 1, 0);
     if ( page == NULL )
         return -ENOMEM;
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJs-00058y-Fy; Tue, 26 Jun 2012 22:33:12 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-00058g-9V
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from [85.158.139.83:39843] by server-2.bemta-5.messagelabs.com id
	1E/C6-04598-6A83AEF4; Tue, 26 Jun 2012 22:33:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1340749988!28376377!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12213 invoked from network); 26 Jun 2012 22:33:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0004FS-Fv
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJo-0003bM-8u
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:08 +0000
Message-Id: <E1SjeJo-0003bM-8u@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allocate top level p2m page for
	all non-idle domains
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724223 -3600
# Node ID d29a911cc8cf816934a462dad0a25462e6049c18
# Parent  e08cf97e76f0b8fa8ff68050e6108c97ef7d9af4
arm: allocate top level p2m page for all non-idle domains

Not just dom0.

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


diff -r e08cf97e76f0 -r d29a911cc8cf xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Mon Jun 25 13:41:32 2012 +0200
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:43 2012 +0100
@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d,
         clear_page(d->shared_info);
         share_xen_page_with_guest(
                 virt_to_page(d->shared_info), d, XENSHARE_writable);
+
+        if ( (rc = p2m_alloc_table(d)) != 0 )
+            goto fail;
     }
 
     d->max_vcpus = 8;
diff -r e08cf97e76f0 -r d29a911cc8cf xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Mon Jun 25 13:41:32 2012 +0200
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:43 2012 +0100
@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)
     void *p;
 
     /* First level P2M is 2 consecutive pages */
-    page = alloc_domheap_pages(d, 1, 0);
+    page = alloc_domheap_pages(NULL, 1, 0);
     if ( page == NULL )
         return -ENOMEM;
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059S-Np; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-00058o-MB
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.138.51:59712] by server-9.bemta-3.messagelabs.com id
	E4/84-10419-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340749990!29750270!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32011 invoked from network); 26 Jun 2012 22:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0004Fb-1O
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0003c6-VS
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Message-Id: <E1SjeJp-0003c6-VS@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: restore stack on return from
	trap.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724226 -3600
# Node ID e9e2127ef47a70dc926e4eed251c25ceafd7403a
# Parent  5635298fe2de0ccada37a1e8803228859d5e35ec
arm: restore stack on return from trap.

We align the stack before calling into C code but we weren't undoing this on
return.

Collapse continue_(non)idle_domain into continue_new_vcpu.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 5635298fe2de -r e9e2127ef47a xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:45 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:46 2012 +0100
@@ -16,17 +16,6 @@
 
 DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
 
-static void continue_idle_domain(struct vcpu *v)
-{
-    reset_stack_and_jump(idle_loop);
-}
-
-static void continue_nonidle_domain(struct vcpu *v)
-{
-    /* check_wakeup_from_wait(); */
-    reset_stack_and_jump(return_from_trap);
-}
-
 void idle_loop(void)
 {
     for ( ; ; )
@@ -72,9 +61,10 @@ static void continue_new_vcpu(struct vcp
     schedule_tail(prev);
 
     if ( is_idle_vcpu(current) )
-        continue_idle_domain(current);
+        reset_stack_and_jump(idle_loop);
     else
-        continue_nonidle_domain(current);
+        /* check_wakeup_from_wait(); */
+        reset_stack_and_jump(return_to_new_vcpu);
 }
 
 void context_switch(struct vcpu *prev, struct vcpu *next)
diff -r 5635298fe2de -r e9e2127ef47a xen/arch/arm/entry.S
--- a/xen/arch/arm/entry.S	Tue Jun 26 16:23:45 2012 +0100
+++ b/xen/arch/arm/entry.S	Tue Jun 26 16:23:46 2012 +0100
@@ -72,7 +72,9 @@ DEFINE_TRAP_ENTRY(hypervisor)
 DEFINE_TRAP_ENTRY(irq)
 DEFINE_TRAP_ENTRY(fiq)
 
-ENTRY(return_from_trap)
+return_from_trap:
+	mov sp, r11
+ENTRY(return_to_new_vcpu)
 	ldr r11, [sp, #UREGS_cpsr]
 	and r11, #PSR_MODE_MASK
 	cmp r11, #PSR_MODE_HYP
@@ -82,6 +84,7 @@ ENTRY(return_to_guest)
 	mov r11, sp
 	bic sp, #7 /* Align the stack pointer */
 	bl leave_hypervisor_tail
+	mov sp, r11
 	RESTORE_ONE_BANKED(SP_usr)
 	/* LR_usr is the same physical register as lr and is restored below */
 	RESTORE_BANKED(svc)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059S-Np; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-00058o-MB
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.138.51:59712] by server-9.bemta-3.messagelabs.com id
	E4/84-10419-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340749990!29750270!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32011 invoked from network); 26 Jun 2012 22:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJq-0004Fb-1O
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0003c6-VS
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Message-Id: <E1SjeJp-0003c6-VS@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: restore stack on return from
	trap.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724226 -3600
# Node ID e9e2127ef47a70dc926e4eed251c25ceafd7403a
# Parent  5635298fe2de0ccada37a1e8803228859d5e35ec
arm: restore stack on return from trap.

We align the stack before calling into C code but we weren't undoing this on
return.

Collapse continue_(non)idle_domain into continue_new_vcpu.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 5635298fe2de -r e9e2127ef47a xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:45 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:46 2012 +0100
@@ -16,17 +16,6 @@
 
 DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
 
-static void continue_idle_domain(struct vcpu *v)
-{
-    reset_stack_and_jump(idle_loop);
-}
-
-static void continue_nonidle_domain(struct vcpu *v)
-{
-    /* check_wakeup_from_wait(); */
-    reset_stack_and_jump(return_from_trap);
-}
-
 void idle_loop(void)
 {
     for ( ; ; )
@@ -72,9 +61,10 @@ static void continue_new_vcpu(struct vcp
     schedule_tail(prev);
 
     if ( is_idle_vcpu(current) )
-        continue_idle_domain(current);
+        reset_stack_and_jump(idle_loop);
     else
-        continue_nonidle_domain(current);
+        /* check_wakeup_from_wait(); */
+        reset_stack_and_jump(return_to_new_vcpu);
 }
 
 void context_switch(struct vcpu *prev, struct vcpu *next)
diff -r 5635298fe2de -r e9e2127ef47a xen/arch/arm/entry.S
--- a/xen/arch/arm/entry.S	Tue Jun 26 16:23:45 2012 +0100
+++ b/xen/arch/arm/entry.S	Tue Jun 26 16:23:46 2012 +0100
@@ -72,7 +72,9 @@ DEFINE_TRAP_ENTRY(hypervisor)
 DEFINE_TRAP_ENTRY(irq)
 DEFINE_TRAP_ENTRY(fiq)
 
-ENTRY(return_from_trap)
+return_from_trap:
+	mov sp, r11
+ENTRY(return_to_new_vcpu)
 	ldr r11, [sp, #UREGS_cpsr]
 	and r11, #PSR_MODE_MASK
 	cmp r11, #PSR_MODE_HYP
@@ -82,6 +84,7 @@ ENTRY(return_to_guest)
 	mov r11, sp
 	bic sp, #7 /* Align the stack pointer */
 	bl leave_hypervisor_tail
+	mov sp, r11
 	RESTORE_ONE_BANKED(SP_usr)
 	/* LR_usr is the same physical register as lr and is restored below */
 	RESTORE_BANKED(svc)

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005Bw-KM; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-00058n-JV
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [85.158.143.35:13105] by server-2.bemta-4.messagelabs.com id
	83/93-17938-CA83AEF4; Tue, 26 Jun 2012 22:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340749994!15772368!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30518 invoked from network); 26 Jun 2012 22:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0004G2-Lq
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0003eL-K2
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Message-Id: <E1SjeJu-0003eL-K2@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement stub version of
	flush_tlb_mask.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724233 -3600
# Node ID 21aac4e1593038cf89057ef1009f2f12a97df6e9
# Parent  ed928dedcb868928c4bb2cadcb71db1f3dfd4fca
arm: implement stub version of flush_tlb_mask.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ed928dedcb86 -r 21aac4e15930 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:52 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:53 2012 +0100
@@ -48,7 +48,6 @@ DUMMY(domain_get_maximum_gpfn);
 DUMMY(domain_relinquish_resources);
 DUMMY(domain_set_time_offset);
 DUMMY(dom_cow);
-DUMMY(flush_tlb_mask);
 DUMMY(gmfn_to_mfn);
 DUMMY(hypercall_create_continuation);
 DUMMY(send_timer_event);
diff -r ed928dedcb86 -r 21aac4e15930 xen/arch/arm/smp.c
--- a/xen/arch/arm/smp.c	Tue Jun 26 16:23:52 2012 +0100
+++ b/xen/arch/arm/smp.c	Tue Jun 26 16:23:53 2012 +0100
@@ -1,5 +1,14 @@
 #include <xen/config.h>
+#include <asm/system.h>
 #include <asm/smp.h>
+#include <asm/cpregs.h>
+#include <asm/page.h>
+
+void flush_tlb_mask(const cpumask_t *mask)
+{
+    /* XXX IPI other processors */
+    flush_xen_data_tlb();
+}
 
 void smp_call_function(
     void (*func) (void *info),

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005Bm-Ga; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0005AM-Ep
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [85.158.143.99:22259] by server-1.bemta-4.messagelabs.com id
	D6/8D-24392-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1340749994!22888960!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22352 invoked from network); 26 Jun 2012 22:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0004Fz-4q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0003e5-3O
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Message-Id: <E1SjeJu-0003e5-3O@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: stub out sync_vcpu_execstate
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724232 -3600
# Node ID ed928dedcb868928c4bb2cadcb71db1f3dfd4fca
# Parent  86cc6f76973a6484c80f6b344fb512029ae335dd
arm: stub out sync_vcpu_execstate

We don't do lazy exec state switching so there isn't actually anything to do.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 86cc6f76973a -r ed928dedcb86 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:52 2012 +0100
@@ -96,6 +96,11 @@ void sync_local_execstate(void)
     /* Nothing to do -- no lazy switching */
 }
 
+void sync_vcpu_execstate(struct vcpu *v)
+{
+    /* Nothing to do -- no lazy switching */
+}
+
 void startup_cpu_idle_loop(void)
 {
     struct vcpu *v = current;
diff -r 86cc6f76973a -r ed928dedcb86 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:52 2012 +0100
@@ -22,7 +22,6 @@ DUMMY(pirq_set_affinity);
 /* VCPU */
 DUMMY(arch_get_info_guest);
 DUMMY(arch_vcpu_reset);
-DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
 DUMMY(vcpu_show_execution_state);
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005Bm-Ga; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0005AM-Ep
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [85.158.143.99:22259] by server-1.bemta-4.messagelabs.com id
	D6/8D-24392-BA83AEF4; Tue, 26 Jun 2012 22:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1340749994!22888960!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22352 invoked from network); 26 Jun 2012 22:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0004Fz-4q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0003e5-3O
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Message-Id: <E1SjeJu-0003e5-3O@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: stub out sync_vcpu_execstate
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724232 -3600
# Node ID ed928dedcb868928c4bb2cadcb71db1f3dfd4fca
# Parent  86cc6f76973a6484c80f6b344fb512029ae335dd
arm: stub out sync_vcpu_execstate

We don't do lazy exec state switching so there isn't actually anything to do.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 86cc6f76973a -r ed928dedcb86 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:52 2012 +0100
@@ -96,6 +96,11 @@ void sync_local_execstate(void)
     /* Nothing to do -- no lazy switching */
 }
 
+void sync_vcpu_execstate(struct vcpu *v)
+{
+    /* Nothing to do -- no lazy switching */
+}
+
 void startup_cpu_idle_loop(void)
 {
     struct vcpu *v = current;
diff -r 86cc6f76973a -r ed928dedcb86 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:51 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:52 2012 +0100
@@ -22,7 +22,6 @@ DUMMY(pirq_set_affinity);
 /* VCPU */
 DUMMY(arch_get_info_guest);
 DUMMY(arch_vcpu_reset);
-DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
 DUMMY(vcpu_show_execution_state);
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005Bw-KM; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-00058n-JV
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from [85.158.143.35:13105] by server-2.bemta-4.messagelabs.com id
	83/93-17938-CA83AEF4; Tue, 26 Jun 2012 22:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340749994!15772368!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30518 invoked from network); 26 Jun 2012 22:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0004G2-Lq
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJu-0003eL-K2
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Message-Id: <E1SjeJu-0003eL-K2@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: implement stub version of
	flush_tlb_mask.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724233 -3600
# Node ID 21aac4e1593038cf89057ef1009f2f12a97df6e9
# Parent  ed928dedcb868928c4bb2cadcb71db1f3dfd4fca
arm: implement stub version of flush_tlb_mask.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ed928dedcb86 -r 21aac4e15930 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:52 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:53 2012 +0100
@@ -48,7 +48,6 @@ DUMMY(domain_get_maximum_gpfn);
 DUMMY(domain_relinquish_resources);
 DUMMY(domain_set_time_offset);
 DUMMY(dom_cow);
-DUMMY(flush_tlb_mask);
 DUMMY(gmfn_to_mfn);
 DUMMY(hypercall_create_continuation);
 DUMMY(send_timer_event);
diff -r ed928dedcb86 -r 21aac4e15930 xen/arch/arm/smp.c
--- a/xen/arch/arm/smp.c	Tue Jun 26 16:23:52 2012 +0100
+++ b/xen/arch/arm/smp.c	Tue Jun 26 16:23:53 2012 +0100
@@ -1,5 +1,14 @@
 #include <xen/config.h>
+#include <asm/system.h>
 #include <asm/smp.h>
+#include <asm/cpregs.h>
+#include <asm/page.h>
+
+void flush_tlb_mask(const cpumask_t *mask)
+{
+    /* XXX IPI other processors */
+    flush_xen_data_tlb();
+}
 
 void smp_call_function(
     void (*func) (void *info),

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJw-0005AN-08; Tue, 26 Jun 2012 22:33:16 +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 1SjeJu-000593-3J
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from [193.109.254.147:22100] by server-11.bemta-14.messagelabs.com
	id 05/0C-24843-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1340749992!3530559!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29112 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0004Fn-3P
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0003d7-1u
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Message-Id: <E1SjeJs-0003d7-1u@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: print domid as part of debug
	trap
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724229 -3600
# Node ID 44653d49797fcf867da74cfd264437d4881d7696
# Parent  57ba8b1ba755c1c8b668ae94a0b3201212544b6a
arm: print domid as part of debug trap

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 57ba8b1ba755 -r 44653d49797f xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:48 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:49 2012 +0100
@@ -388,25 +388,26 @@ static arm_hypercall_t *arm_hypercall_ta
 static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
 {
     uint32_t reg, *r;
-
+    uint32_t domid = current->domain->domain_id;
     switch ( code ) {
     case 0xe0 ... 0xef:
         reg = code - 0xe0;
         r = &regs->r0 + reg;
-        printk("R%d = %#010"PRIx32" at %#010"PRIx32"\n", reg, *r, regs->pc);
+        printk("DOM%d: R%d = %#010"PRIx32" at %#010"PRIx32"\n",
+               domid, reg, *r, regs->pc);
         break;
     case 0xfd:
-        printk("Reached %08"PRIx32"\n", regs->pc);
+        printk("DOM%d: Reached %#010"PRIx32"\n", domid, regs->pc);
         break;
     case 0xfe:
         printk("%c", (char)(regs->r0 & 0xff));
         break;
     case 0xff:
-        printk("DEBUG\n");
+        printk("DOM%d: DEBUG\n", domid);
         show_execution_state(regs);
         break;
     default:
-        panic("Unhandled debug trap %#x\n", code);
+        panic("DOM%d: Unhandled debug trap %#x\n", domid, code);
         break;
     }
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005B5-4j; Tue, 26 Jun 2012 22:33:17 +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 1SjeJu-00059b-Ox
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.138.51:56793] by server-7.bemta-3.messagelabs.com id
	35/E6-10113-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1340749991!23324343!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6055 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0004Fk-PI
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0003cs-HS
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Message-Id: <E1SjeJr-0003cs-HS@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allocate and setup a guest 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724228 -3600
# Node ID 57ba8b1ba755c1c8b668ae94a0b3201212544b6a
# Parent  b718ea26f18d814260af05121e183cb7771817d5
arm: allocate and setup a guest vcpu.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r b718ea26f18d -r 57ba8b1ba755 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:48 2012 +0100
@@ -144,6 +144,17 @@ void free_vcpu_struct(struct vcpu *v)
     free_xenheap_page(v);
 }
 
+struct vcpu_guest_context *alloc_vcpu_guest_context(void)
+{
+    return xmalloc(struct vcpu_guest_context);
+
+}
+
+void free_vcpu_guest_context(struct vcpu_guest_context *vgc)
+{
+    xfree(vgc);
+}
+
 int vcpu_initialise(struct vcpu *v)
 {
     int rc = 0;
@@ -212,6 +223,62 @@ void arch_domain_destroy(struct domain *
     /* domain_vgic_destroy */
 }
 
+static int is_guest_psr(uint32_t psr)
+{
+    switch (psr & PSR_MODE_MASK)
+    {
+    case PSR_MODE_USR:
+    case PSR_MODE_FIQ:
+    case PSR_MODE_IRQ:
+    case PSR_MODE_SVC:
+    case PSR_MODE_ABT:
+    case PSR_MODE_UND:
+    case PSR_MODE_SYS:
+        return 1;
+    case PSR_MODE_MON:
+    case PSR_MODE_HYP:
+    default:
+        return 0;
+    }
+}
+
+/*
+ * Initialise VCPU state. The context can be supplied by either the
+ * toolstack (XEN_DOMCTL_setvcpucontext) or the guest
+ * (VCPUOP_initialise) and therefore must be properly validated.
+ */
+int arch_set_info_guest(
+    struct vcpu *v, vcpu_guest_context_u c)
+{
+    struct cpu_user_regs *regs = &c.nat->user_regs;
+
+    if ( !is_guest_psr(regs->cpsr) )
+        return -EINVAL;
+
+    if ( regs->spsr_svc && !is_guest_psr(regs->spsr_svc) )
+        return -EINVAL;
+    if ( regs->spsr_abt && !is_guest_psr(regs->spsr_abt) )
+        return -EINVAL;
+    if ( regs->spsr_und && !is_guest_psr(regs->spsr_und) )
+        return -EINVAL;
+    if ( regs->spsr_irq && !is_guest_psr(regs->spsr_irq) )
+        return -EINVAL;
+    if ( regs->spsr_fiq && !is_guest_psr(regs->spsr_fiq) )
+        return -EINVAL;
+
+    v->arch.cpu_info->guest_cpu_user_regs = *regs;
+
+    /* XXX other state:
+     * - SCTLR
+     * - TTBR0/1
+     * - TTBCR
+     */
+
+    clear_bit(_VPF_down, &v->pause_flags);
+
+    return 0;
+}
+
 void arch_dump_domain_info(struct domain *d)
 {
 }
diff -r b718ea26f18d -r 57ba8b1ba755 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:48 2012 +0100
@@ -20,11 +20,8 @@ DUMMY(pirq_guest_unbind);
 DUMMY(pirq_set_affinity);
 
 /* VCPU */
-DUMMY(alloc_vcpu_guest_context);
 DUMMY(arch_get_info_guest);
-DUMMY(arch_set_info_guest);
 DUMMY(arch_vcpu_reset);
-DUMMY(free_vcpu_guest_context);
 DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
 DUMMY(vcpu_show_execution_state);
diff -r b718ea26f18d -r 57ba8b1ba755 xen/include/public/arch-arm.h
--- a/xen/include/public/arch-arm.h	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/include/public/arch-arm.h	Tue Jun 26 16:23:48 2012 +0100
@@ -124,15 +124,6 @@ typedef uint32_t xen_ulong_t;
 
 struct vcpu_guest_context {
     struct cpu_user_regs user_regs;         /* User-level CPU registers     */
-    union {
-        uint32_t reg[16];
-        struct {
-            uint32_t __pad[12];
-            uint32_t sp; /* r13 */
-            uint32_t lr; /* r14 */
-            uint32_t pc; /* r15 */
-        };
-    };
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJw-0005AN-08; Tue, 26 Jun 2012 22:33:16 +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 1SjeJu-000593-3J
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:14 +0000
Received: from [193.109.254.147:22100] by server-11.bemta-14.messagelabs.com
	id 05/0C-24843-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1340749992!3530559!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29112 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0004Fn-3P
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0003d7-1u
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Message-Id: <E1SjeJs-0003d7-1u@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: print domid as part of debug
	trap
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724229 -3600
# Node ID 44653d49797fcf867da74cfd264437d4881d7696
# Parent  57ba8b1ba755c1c8b668ae94a0b3201212544b6a
arm: print domid as part of debug trap

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 57ba8b1ba755 -r 44653d49797f xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:48 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:49 2012 +0100
@@ -388,25 +388,26 @@ static arm_hypercall_t *arm_hypercall_ta
 static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
 {
     uint32_t reg, *r;
-
+    uint32_t domid = current->domain->domain_id;
     switch ( code ) {
     case 0xe0 ... 0xef:
         reg = code - 0xe0;
         r = &regs->r0 + reg;
-        printk("R%d = %#010"PRIx32" at %#010"PRIx32"\n", reg, *r, regs->pc);
+        printk("DOM%d: R%d = %#010"PRIx32" at %#010"PRIx32"\n",
+               domid, reg, *r, regs->pc);
         break;
     case 0xfd:
-        printk("Reached %08"PRIx32"\n", regs->pc);
+        printk("DOM%d: Reached %#010"PRIx32"\n", domid, regs->pc);
         break;
     case 0xfe:
         printk("%c", (char)(regs->r0 & 0xff));
         break;
     case 0xff:
-        printk("DEBUG\n");
+        printk("DOM%d: DEBUG\n", domid);
         show_execution_state(regs);
         break;
     default:
-        panic("Unhandled debug trap %#x\n", code);
+        panic("DOM%d: Unhandled debug trap %#x\n", domid, code);
         break;
     }
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005B5-4j; Tue, 26 Jun 2012 22:33:17 +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 1SjeJu-00059b-Ox
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.138.51:56793] by server-7.bemta-3.messagelabs.com id
	35/E6-10113-9A83AEF4; Tue, 26 Jun 2012 22:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1340749991!23324343!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6055 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0004Fk-PI
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJr-0003cs-HS
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:11 +0000
Message-Id: <E1SjeJr-0003cs-HS@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: allocate and setup a guest 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724228 -3600
# Node ID 57ba8b1ba755c1c8b668ae94a0b3201212544b6a
# Parent  b718ea26f18d814260af05121e183cb7771817d5
arm: allocate and setup a guest vcpu.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r b718ea26f18d -r 57ba8b1ba755 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:48 2012 +0100
@@ -144,6 +144,17 @@ void free_vcpu_struct(struct vcpu *v)
     free_xenheap_page(v);
 }
 
+struct vcpu_guest_context *alloc_vcpu_guest_context(void)
+{
+    return xmalloc(struct vcpu_guest_context);
+
+}
+
+void free_vcpu_guest_context(struct vcpu_guest_context *vgc)
+{
+    xfree(vgc);
+}
+
 int vcpu_initialise(struct vcpu *v)
 {
     int rc = 0;
@@ -212,6 +223,62 @@ void arch_domain_destroy(struct domain *
     /* domain_vgic_destroy */
 }
 
+static int is_guest_psr(uint32_t psr)
+{
+    switch (psr & PSR_MODE_MASK)
+    {
+    case PSR_MODE_USR:
+    case PSR_MODE_FIQ:
+    case PSR_MODE_IRQ:
+    case PSR_MODE_SVC:
+    case PSR_MODE_ABT:
+    case PSR_MODE_UND:
+    case PSR_MODE_SYS:
+        return 1;
+    case PSR_MODE_MON:
+    case PSR_MODE_HYP:
+    default:
+        return 0;
+    }
+}
+
+/*
+ * Initialise VCPU state. The context can be supplied by either the
+ * toolstack (XEN_DOMCTL_setvcpucontext) or the guest
+ * (VCPUOP_initialise) and therefore must be properly validated.
+ */
+int arch_set_info_guest(
+    struct vcpu *v, vcpu_guest_context_u c)
+{
+    struct cpu_user_regs *regs = &c.nat->user_regs;
+
+    if ( !is_guest_psr(regs->cpsr) )
+        return -EINVAL;
+
+    if ( regs->spsr_svc && !is_guest_psr(regs->spsr_svc) )
+        return -EINVAL;
+    if ( regs->spsr_abt && !is_guest_psr(regs->spsr_abt) )
+        return -EINVAL;
+    if ( regs->spsr_und && !is_guest_psr(regs->spsr_und) )
+        return -EINVAL;
+    if ( regs->spsr_irq && !is_guest_psr(regs->spsr_irq) )
+        return -EINVAL;
+    if ( regs->spsr_fiq && !is_guest_psr(regs->spsr_fiq) )
+        return -EINVAL;
+
+    v->arch.cpu_info->guest_cpu_user_regs = *regs;
+
+    /* XXX other state:
+     * - SCTLR
+     * - TTBR0/1
+     * - TTBCR
+     */
+
+    clear_bit(_VPF_down, &v->pause_flags);
+
+    return 0;
+}
+
 void arch_dump_domain_info(struct domain *d)
 {
 }
diff -r b718ea26f18d -r 57ba8b1ba755 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:48 2012 +0100
@@ -20,11 +20,8 @@ DUMMY(pirq_guest_unbind);
 DUMMY(pirq_set_affinity);
 
 /* VCPU */
-DUMMY(alloc_vcpu_guest_context);
 DUMMY(arch_get_info_guest);
-DUMMY(arch_set_info_guest);
 DUMMY(arch_vcpu_reset);
-DUMMY(free_vcpu_guest_context);
 DUMMY(sync_vcpu_execstate);
 NOP(update_vcpu_system_time);
 DUMMY(vcpu_show_execution_state);
diff -r b718ea26f18d -r 57ba8b1ba755 xen/include/public/arch-arm.h
--- a/xen/include/public/arch-arm.h	Tue Jun 26 16:23:47 2012 +0100
+++ b/xen/include/public/arch-arm.h	Tue Jun 26 16:23:48 2012 +0100
@@ -124,15 +124,6 @@ typedef uint32_t xen_ulong_t;
 
 struct vcpu_guest_context {
     struct cpu_user_regs user_regs;         /* User-level CPU registers     */
-    union {
-        uint32_t reg[16];
-        struct {
-            uint32_t __pad[12];
-            uint32_t sp; /* r13 */
-            uint32_t lr; /* r14 */
-            uint32_t pc; /* r15 */
-        };
-    };
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059M-LQ; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-00058n-1p
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.143.35:20176] by server-2.bemta-4.messagelabs.com id
	A6/83-17938-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1340749989!13981024!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6995 invoked from network); 26 Jun 2012 22:33:10 -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;
	26 Jun 2012 22:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0004FY-Jv
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0003br-Et
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Message-Id: <E1SjeJp-0003br-Et@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: correct and expand TLB flush
	CP15 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724225 -3600
# Node ID 5635298fe2de0ccada37a1e8803228859d5e35ec
# Parent  f84e8a0914b61c8ea2875a424e3cade37b8feaf6
arm: correct and expand TLB flush CP15 registers

Correct spelling of TLBIALLHIS and correct definition of TLBIALLNSNHIS.

Add a few more.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f84e8a0914b6 -r 5635298fe2de xen/include/asm-arm/cpregs.h
--- a/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:44 2012 +0100
+++ b/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:45 2012 +0100
@@ -172,12 +172,19 @@
 #define TLBIMVAIS       p15,0,c8,c3,1   /* Invalidate unified TLB entry by MVA inner shareable */
 #define TLBIASIDIS      p15,0,c8,c3,2   /* Invalidate unified TLB by ASID match inner shareable */
 #define TLBIMVAAIS      p15,0,c8,c3,3   /* Invalidate unified TLB entry by MVA all ASID inner shareable */
+#define ITLBIALL        p15,0,c8,c5,0   /* Invalidate instruction TLB */
+#define ITLBIMVA        p15,0,c8,c5,1   /* Invalidate instruction TLB entry by MVA */
+#define ITLBIASID       p15,0,c8,c5,2   /* Invalidate instruction TLB by ASID match */
 #define DTLBIALL        p15,0,c8,c6,0   /* Invalidate data TLB */
 #define DTLBIMVA        p15,0,c8,c6,1   /* Invalidate data TLB entry by MVA */
 #define DTLBIASID       p15,0,c8,c6,2   /* Invalidate data TLB by ASID match */
-#define TLBILLHIS       p15,4,c8,c3,0   /* Invalidate Entire Hyp. Unified TLB inner shareable */
+#define TLBIALL         p15,0,c8,c7,0   /* invalidate unified TLB */
+#define TLBIMVA         p15,0,c8,c7,1   /* invalidate unified TLB entry by MVA */
+#define TLBIASID        p15,0,c8,c7,2   /* invalid unified TLB by ASID match */
+#define TLBIMVAA        p15,0,c8,c7,3   /* invalidate unified TLB entries by MVA all ASID */
+#define TLBIALLHIS      p15,4,c8,c3,0   /* Invalidate Entire Hyp. Unified TLB inner shareable */
 #define TLBIMVAHIS      p15,4,c8,c3,1   /* Invalidate Unified Hyp. TLB by MVA inner shareable */
-#define TLBIALLNSNHIS   p15,4,c8,c7,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB inner shareable */
+#define TLBIALLNSNHIS   p15,4,c8,c3,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB inner shareable */
 #define TLBIALLH        p15,4,c8,c7,0   /* Invalidate Entire Hyp. Unified TLB */
 #define TLBIMVAH        p15,4,c8,c7,1   /* Invalidate Unified Hyp. TLB by MVA */
 #define TLBIALLNSNH     p15,4,c8,c7,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB */

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BD-7f; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-00059m-59
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.143.99:22225] by server-3.bemta-4.messagelabs.com id
	65/8D-05808-AA83AEF4; Tue, 26 Jun 2012 22:33:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1340749992!25901494!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7702 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0004Fq-N9
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0003dM-IJ
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Message-Id: <E1SjeJs-0003dM-IJ@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove unnecessarily verbose
	print from p2m_load_VTTBR
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724230 -3600
# Node ID 715e493f72523a54c8ad645c806334a3bf7c4ff1
# Parent  44653d49797fcf867da74cfd264437d4881d7696
arm: remove unnecessarily verbose print from p2m_load_VTTBR

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 44653d49797f -r 715e493f7252 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:49 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:50 2012 +0100
@@ -28,8 +28,6 @@ void p2m_load_VTTBR(struct domain *d)
 
     vttbr |= ((uint64_t)p2m->vmid&0xff)<<48;
 
-    printk("VTTBR dom%d = %"PRIx64"\n", d->domain_id, vttbr);
-
     WRITE_CP64(vttbr, VTTBR);
     isb(); /* Ensure update is visible */
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJt-00059M-LQ; Tue, 26 Jun 2012 22:33:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-00058n-1p
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from [85.158.143.35:20176] by server-2.bemta-4.messagelabs.com id
	A6/83-17938-7A83AEF4; Tue, 26 Jun 2012 22:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1340749989!13981024!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6995 invoked from network); 26 Jun 2012 22:33:10 -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;
	26 Jun 2012 22:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0004FY-Jv
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJp-0003br-Et
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:09 +0000
Message-Id: <E1SjeJp-0003br-Et@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: correct and expand TLB flush
	CP15 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724225 -3600
# Node ID 5635298fe2de0ccada37a1e8803228859d5e35ec
# Parent  f84e8a0914b61c8ea2875a424e3cade37b8feaf6
arm: correct and expand TLB flush CP15 registers

Correct spelling of TLBIALLHIS and correct definition of TLBIALLNSNHIS.

Add a few more.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f84e8a0914b6 -r 5635298fe2de xen/include/asm-arm/cpregs.h
--- a/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:44 2012 +0100
+++ b/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:45 2012 +0100
@@ -172,12 +172,19 @@
 #define TLBIMVAIS       p15,0,c8,c3,1   /* Invalidate unified TLB entry by MVA inner shareable */
 #define TLBIASIDIS      p15,0,c8,c3,2   /* Invalidate unified TLB by ASID match inner shareable */
 #define TLBIMVAAIS      p15,0,c8,c3,3   /* Invalidate unified TLB entry by MVA all ASID inner shareable */
+#define ITLBIALL        p15,0,c8,c5,0   /* Invalidate instruction TLB */
+#define ITLBIMVA        p15,0,c8,c5,1   /* Invalidate instruction TLB entry by MVA */
+#define ITLBIASID       p15,0,c8,c5,2   /* Invalidate instruction TLB by ASID match */
 #define DTLBIALL        p15,0,c8,c6,0   /* Invalidate data TLB */
 #define DTLBIMVA        p15,0,c8,c6,1   /* Invalidate data TLB entry by MVA */
 #define DTLBIASID       p15,0,c8,c6,2   /* Invalidate data TLB by ASID match */
-#define TLBILLHIS       p15,4,c8,c3,0   /* Invalidate Entire Hyp. Unified TLB inner shareable */
+#define TLBIALL         p15,0,c8,c7,0   /* invalidate unified TLB */
+#define TLBIMVA         p15,0,c8,c7,1   /* invalidate unified TLB entry by MVA */
+#define TLBIASID        p15,0,c8,c7,2   /* invalid unified TLB by ASID match */
+#define TLBIMVAA        p15,0,c8,c7,3   /* invalidate unified TLB entries by MVA all ASID */
+#define TLBIALLHIS      p15,4,c8,c3,0   /* Invalidate Entire Hyp. Unified TLB inner shareable */
 #define TLBIMVAHIS      p15,4,c8,c3,1   /* Invalidate Unified Hyp. TLB by MVA inner shareable */
-#define TLBIALLNSNHIS   p15,4,c8,c7,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB inner shareable */
+#define TLBIALLNSNHIS   p15,4,c8,c3,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB inner shareable */
 #define TLBIALLH        p15,4,c8,c7,0   /* Invalidate Entire Hyp. Unified TLB */
 #define TLBIMVAH        p15,4,c8,c7,1   /* Invalidate Unified Hyp. TLB by MVA */
 #define TLBIALLNSNH     p15,4,c8,c7,4   /* Invalidate Entire Non-Secure Non-Hyp. Unified TLB */

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJx-0005BD-7f; Tue, 26 Jun 2012 22:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-00059m-59
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from [85.158.143.99:22225] by server-3.bemta-4.messagelabs.com id
	65/8D-05808-AA83AEF4; Tue, 26 Jun 2012 22:33:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1340749992!25901494!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7702 invoked from network); 26 Jun 2012 22:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0004Fq-N9
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJs-0003dM-IJ
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:12 +0000
Message-Id: <E1SjeJs-0003dM-IJ@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: remove unnecessarily verbose
	print from p2m_load_VTTBR
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724230 -3600
# Node ID 715e493f72523a54c8ad645c806334a3bf7c4ff1
# Parent  44653d49797fcf867da74cfd264437d4881d7696
arm: remove unnecessarily verbose print from p2m_load_VTTBR

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 44653d49797f -r 715e493f7252 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:49 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:50 2012 +0100
@@ -28,8 +28,6 @@ void p2m_load_VTTBR(struct domain *d)
 
     vttbr |= ((uint64_t)p2m->vmid&0xff)<<48;
 
-    printk("VTTBR dom%d = %"PRIx64"\n", d->domain_id, vttbr);
-
     WRITE_CP64(vttbr, VTTBR);
     isb(); /* Ensure update is visible */
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJy-0005EL-SF; Tue, 26 Jun 2012 22:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0005AM-Pf
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from [85.158.143.99:22322] by server-1.bemta-4.messagelabs.com id
	1B/8D-24392-DA83AEF4; Tue, 26 Jun 2012 22:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340749995!17676221!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31365 invoked from network); 26 Jun 2012 22:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0004G8-MY
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0003ep-LC
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Message-Id: <E1SjeJv-0003ep-LC@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Add simple cpu_{sibling,
	core}_mask
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724234 -3600
# Node ID 3f8d8983cd7609e301ec12b087173c3d7fa299b9
# Parent  ff8aea631e1797dabd7914d2a519c8f84e002e9f
arm: Add simple cpu_{sibling, core}_mask

This needs to be done for all cpus. The allocations require smp_prepare_cpus
to be called a bit later on.

In a previous version of this patch these maps were being zeroed (instead of
setting the CPU itself in them). This in turn causes cpumask_first to return
NR_CPUS, which in turn was causing default_vcpu0_location to misbehave and
read off the end of its cnt array.

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


diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:54 2012 +0100
@@ -7,8 +7,6 @@ x:	.word 0xe7f000f0 /* Undefined instruc
 x:	mov pc, lr
 	
 /* SMP support */
-DUMMY(per_cpu__cpu_core_mask);
-DUMMY(per_cpu__cpu_sibling_mask);
 DUMMY(node_online_map);
 DUMMY(smp_send_state_dump);
 
diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/setup.c	Tue Jun 26 16:23:54 2012 +0100
@@ -173,8 +173,6 @@ void __init start_xen(unsigned long boot
     set_current((struct vcpu *)0xfffff000); /* debug sanity */
     idle_vcpu[0] = current;
 
-    smp_prepare_cpus(cpus);
-
     init_xen_time();
 
     setup_mm(atag_paddr, fdt_size);
@@ -214,6 +212,8 @@ void __init start_xen(unsigned long boot
 
     local_irq_enable();
 
+    smp_prepare_cpus(cpus);
+
     initialize_keytable();
 
     console_init_postirq();
diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Tue Jun 26 16:23:54 2012 +0100
@@ -52,6 +52,23 @@ unsigned long __initdata ready_cpus = 0;
 
 /* ID of the PCPU we're running on */
 DEFINE_PER_CPU(unsigned int, cpu_id);
+/* XXX these seem awfully x86ish... */
+/* representing HT siblings of each logical CPU */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_mask);
+/* representing HT and core siblings of each logical CPU */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask);
+
+static void setup_cpu_sibling_map(int cpu)
+{
+    if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, cpu)) ||
+         !zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) )
+        panic("No memory for CPU sibling/core maps\n");
+
+    /* A CPU is a sibling with itself and is always on its own core. */
+    cpumask_set_cpu(cpu, per_cpu(cpu_sibling_mask, cpu));
+    cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, cpu));
+}
+
 
 void __init
 smp_prepare_cpus (unsigned int max_cpus)
@@ -65,6 +82,8 @@ smp_prepare_cpus (unsigned int max_cpus)
     for ( i = 0; i < max_cpus; i++ )
         cpumask_set_cpu(i, &cpu_possible_map);
     cpumask_copy(&cpu_present_map, &cpu_possible_map);
+
+    setup_cpu_sibling_map(0);
 }
 
 void __init
@@ -115,6 +134,8 @@ void __cpuinit start_secondary(unsigned 
 
     set_current(idle_vcpu[cpuid]);
 
+    setup_cpu_sibling_map(cpuid);
+
     /* Run local notifiers */
     notify_cpu_starting(cpuid);
     wmb();

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJy-0005EL-SF; Tue, 26 Jun 2012 22:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0005AM-Pf
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from [85.158.143.99:22322] by server-1.bemta-4.messagelabs.com id
	1B/8D-24392-DA83AEF4; Tue, 26 Jun 2012 22:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340749995!17676221!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31365 invoked from network); 26 Jun 2012 22:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0004G8-MY
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0003ep-LC
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Message-Id: <E1SjeJv-0003ep-LC@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: Add simple cpu_{sibling,
	core}_mask
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724234 -3600
# Node ID 3f8d8983cd7609e301ec12b087173c3d7fa299b9
# Parent  ff8aea631e1797dabd7914d2a519c8f84e002e9f
arm: Add simple cpu_{sibling, core}_mask

This needs to be done for all cpus. The allocations require smp_prepare_cpus
to be called a bit later on.

In a previous version of this patch these maps were being zeroed (instead of
setting the CPU itself in them). This in turn causes cpumask_first to return
NR_CPUS, which in turn was causing default_vcpu0_location to misbehave and
read off the end of its cnt array.

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


diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/dummy.S	Tue Jun 26 16:23:54 2012 +0100
@@ -7,8 +7,6 @@ x:	.word 0xe7f000f0 /* Undefined instruc
 x:	mov pc, lr
 	
 /* SMP support */
-DUMMY(per_cpu__cpu_core_mask);
-DUMMY(per_cpu__cpu_sibling_mask);
 DUMMY(node_online_map);
 DUMMY(smp_send_state_dump);
 
diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/setup.c	Tue Jun 26 16:23:54 2012 +0100
@@ -173,8 +173,6 @@ void __init start_xen(unsigned long boot
     set_current((struct vcpu *)0xfffff000); /* debug sanity */
     idle_vcpu[0] = current;
 
-    smp_prepare_cpus(cpus);
-
     init_xen_time();
 
     setup_mm(atag_paddr, fdt_size);
@@ -214,6 +212,8 @@ void __init start_xen(unsigned long boot
 
     local_irq_enable();
 
+    smp_prepare_cpus(cpus);
+
     initialize_keytable();
 
     console_init_postirq();
diff -r ff8aea631e17 -r 3f8d8983cd76 xen/arch/arm/smpboot.c
--- a/xen/arch/arm/smpboot.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/smpboot.c	Tue Jun 26 16:23:54 2012 +0100
@@ -52,6 +52,23 @@ unsigned long __initdata ready_cpus = 0;
 
 /* ID of the PCPU we're running on */
 DEFINE_PER_CPU(unsigned int, cpu_id);
+/* XXX these seem awfully x86ish... */
+/* representing HT siblings of each logical CPU */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_mask);
+/* representing HT and core siblings of each logical CPU */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask);
+
+static void setup_cpu_sibling_map(int cpu)
+{
+    if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, cpu)) ||
+         !zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) )
+        panic("No memory for CPU sibling/core maps\n");
+
+    /* A CPU is a sibling with itself and is always on its own core. */
+    cpumask_set_cpu(cpu, per_cpu(cpu_sibling_mask, cpu));
+    cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, cpu));
+}
+
 
 void __init
 smp_prepare_cpus (unsigned int max_cpus)
@@ -65,6 +82,8 @@ smp_prepare_cpus (unsigned int max_cpus)
     for ( i = 0; i < max_cpus; i++ )
         cpumask_set_cpu(i, &cpu_possible_map);
     cpumask_copy(&cpu_present_map, &cpu_possible_map);
+
+    setup_cpu_sibling_map(0);
 }
 
 void __init
@@ -115,6 +134,8 @@ void __cpuinit start_secondary(unsigned 
 
     set_current(idle_vcpu[cpuid]);
 
+    setup_cpu_sibling_map(cpuid);
+
     /* Run local notifiers */
     notify_cpu_starting(cpuid);
     wmb();

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJy-0005Dq-No; Tue, 26 Jun 2012 22:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0005AM-8j
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from [85.158.143.35:13120] by server-1.bemta-4.messagelabs.com id
	6A/8D-24392-DA83AEF4; Tue, 26 Jun 2012 22:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1340749995!15092762!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21094 invoked from network); 26 Jun 2012 22:33:16 -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;
	26 Jun 2012 22:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0004G5-6G
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0003ea-4r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Message-Id: <E1SjeJv-0003ea-4r@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: do not set max_vcpus = 8 in
	arch_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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724234 -3600
# Node ID ff8aea631e1797dabd7914d2a519c8f84e002e9f
# Parent  21aac4e1593038cf89057ef1009f2f12a97df6e9
arm: do not set max_vcpus = 8 in arch_domain_create.

XEN_DOMCTL_max_vcpus cannot reduce max_vcpus and therefore we can't create a
smaller guest.

The limit of 8 (due to GIC limits) should be expressed in MAX_VIRT_CPUS.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 21aac4e15930 -r ff8aea631e17 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:53 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:54 2012 +0100
@@ -212,8 +212,6 @@ int arch_domain_create(struct domain *d,
             goto fail;
     }
 
-    d->max_vcpus = 8;
-
     if ( (rc = domain_vgic_init(d)) != 0 )
         goto fail;
 
diff -r 21aac4e15930 -r ff8aea631e17 xen/include/asm-arm/config.h
--- a/xen/include/asm-arm/config.h	Tue Jun 26 16:23:53 2012 +0100
+++ b/xen/include/asm-arm/config.h	Tue Jun 26 16:23:54 2012 +0100
@@ -27,7 +27,7 @@
 #define NR_CPUS 128
 #endif
 
-#define MAX_VIRT_CPUS 128 /* XXX */
+#define MAX_VIRT_CPUS 8
 #define MAX_HVM_VCPUS MAX_VIRT_CPUS
 
 #define asmlinkage /* Nothing needed */

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22: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 1SjeJy-0005Dq-No; Tue, 26 Jun 2012 22:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0005AM-8j
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from [85.158.143.35:13120] by server-1.bemta-4.messagelabs.com id
	6A/8D-24392-DA83AEF4; Tue, 26 Jun 2012 22:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1340749995!15092762!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21094 invoked from network); 26 Jun 2012 22:33:16 -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;
	26 Jun 2012 22:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0004G5-6G
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJv-0003ea-4r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:15 +0000
Message-Id: <E1SjeJv-0003ea-4r@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: do not set max_vcpus = 8 in
	arch_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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724234 -3600
# Node ID ff8aea631e1797dabd7914d2a519c8f84e002e9f
# Parent  21aac4e1593038cf89057ef1009f2f12a97df6e9
arm: do not set max_vcpus = 8 in arch_domain_create.

XEN_DOMCTL_max_vcpus cannot reduce max_vcpus and therefore we can't create a
smaller guest.

The limit of 8 (due to GIC limits) should be expressed in MAX_VIRT_CPUS.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 21aac4e15930 -r ff8aea631e17 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:53 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:54 2012 +0100
@@ -212,8 +212,6 @@ int arch_domain_create(struct domain *d,
             goto fail;
     }
 
-    d->max_vcpus = 8;
-
     if ( (rc = domain_vgic_init(d)) != 0 )
         goto fail;
 
diff -r 21aac4e15930 -r ff8aea631e17 xen/include/asm-arm/config.h
--- a/xen/include/asm-arm/config.h	Tue Jun 26 16:23:53 2012 +0100
+++ b/xen/include/asm-arm/config.h	Tue Jun 26 16:23:54 2012 +0100
@@ -27,7 +27,7 @@
 #define NR_CPUS 128
 #endif
 
-#define MAX_VIRT_CPUS 128 /* XXX */
+#define MAX_VIRT_CPUS 8
 #define MAX_HVM_VCPUS MAX_VIRT_CPUS
 
 #define asmlinkage /* Nothing needed */

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005HS-5i; Tue, 26 Jun 2012 22:33:21 +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 1SjeJz-0005EG-9Q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [193.109.254.147:22231] by server-4.bemta-14.messagelabs.com id
	9A/5F-02077-EA83AEF4; Tue, 26 Jun 2012 22:33:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-27.messagelabs.com!1340749996!3026119!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18586 invoked from network); 26 Jun 2012 22:33:17 -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;
	26 Jun 2012 22:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0004GE-Nf
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0003fJ-Lo
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Message-Id: <E1SjeJw-0003fJ-Lo@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: dump a page table walk when
	va_to_par 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724236 -3600
# Node ID a6bc79e839e4609fdfefa934a4a440ddb05d56ce
# Parent  2f88d9264d47f3bace8b8091fdc6a489c6279616
arm: dump a page table walk when va_to_par fails.

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


diff -r 2f88d9264d47 -r a6bc79e839e4 xen/include/asm-arm/page.h
--- a/xen/include/asm-arm/page.h	Tue Jun 26 16:23:55 2012 +0100
+++ b/xen/include/asm-arm/page.h	Tue Jun 26 16:23:56 2012 +0100
@@ -294,7 +294,11 @@ static inline uint64_t va_to_par(uint32_
 {
     uint64_t par = __va_to_par(va);
     /* It is not OK to call this with an invalid VA */
-    if ( par & PAR_F ) panic_PAR(par, "Hypervisor");
+    if ( par & PAR_F )
+    {
+        dump_hyp_walk(va);
+        panic_PAR(par, "Hypervisor");
+    }
     return par;
 }
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005HS-5i; Tue, 26 Jun 2012 22:33:21 +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 1SjeJz-0005EG-9Q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [193.109.254.147:22231] by server-4.bemta-14.messagelabs.com id
	9A/5F-02077-EA83AEF4; Tue, 26 Jun 2012 22:33:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-27.messagelabs.com!1340749996!3026119!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18586 invoked from network); 26 Jun 2012 22:33:17 -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;
	26 Jun 2012 22:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0004GE-Nf
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0003fJ-Lo
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Message-Id: <E1SjeJw-0003fJ-Lo@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: dump a page table walk when
	va_to_par 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724236 -3600
# Node ID a6bc79e839e4609fdfefa934a4a440ddb05d56ce
# Parent  2f88d9264d47f3bace8b8091fdc6a489c6279616
arm: dump a page table walk when va_to_par fails.

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


diff -r 2f88d9264d47 -r a6bc79e839e4 xen/include/asm-arm/page.h
--- a/xen/include/asm-arm/page.h	Tue Jun 26 16:23:55 2012 +0100
+++ b/xen/include/asm-arm/page.h	Tue Jun 26 16:23:56 2012 +0100
@@ -294,7 +294,11 @@ static inline uint64_t va_to_par(uint32_
 {
     uint64_t par = __va_to_par(va);
     /* It is not OK to call this with an invalid VA */
-    if ( par & PAR_F ) panic_PAR(par, "Hypervisor");
+    if ( par & PAR_F )
+    {
+        dump_hyp_walk(va);
+        panic_PAR(par, "Hypervisor");
+    }
     return par;
 }
 

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005Hc-9E; Tue, 26 Jun 2012 22:33:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJz-00058n-Bx
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [85.158.143.35:13201] by server-2.bemta-4.messagelabs.com id
	89/93-17938-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1340749996!13545238!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5057 invoked from network); 26 Jun 2012 22:33:17 -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;
	26 Jun 2012 22:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0004GB-6r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0003f4-5W
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Message-Id: <E1SjeJw-0003f4-5W@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: context switch a bunch of guest
	state.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724235 -3600
# Node ID 2f88d9264d47f3bace8b8091fdc6a489c6279616
# Parent  3f8d8983cd7609e301ec12b087173c3d7fa299b9
arm: context switch a bunch of guest state.

I haven't investigated what if any of this could be done lazily.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:55 2012 +0100
@@ -35,12 +35,124 @@ void idle_loop(void)
 
 static void ctxt_switch_from(struct vcpu *p)
 {
+    /* CP 15 */
+    p->arch.csselr = READ_CP32(CSSELR);
+
+    /* Control Registers */
+    p->arch.actlr = READ_CP32(ACTLR);
+    p->arch.sctlr = READ_CP32(SCTLR);
+    p->arch.cpacr = READ_CP32(CPACR);
+
+    p->arch.contextidr = READ_CP32(CONTEXTIDR);
+    p->arch.tpidrurw = READ_CP32(TPIDRURW);
+    p->arch.tpidruro = READ_CP32(TPIDRURO);
+    p->arch.tpidrprw = READ_CP32(TPIDRPRW);
+
+    /* XXX only save these if ThumbEE e.g. ID_PFR0.THUMB_EE_SUPPORT */
+    p->arch.teecr = READ_CP32(TEECR);
+    p->arch.teehbr = READ_CP32(TEEHBR);
+
+    p->arch.joscr = READ_CP32(JOSCR);
+    p->arch.jmcr = READ_CP32(JMCR);
+
+    isb();
+
+    /* MMU */
+    p->arch.vbar = READ_CP32(VBAR);
+    p->arch.ttbcr = READ_CP32(TTBCR);
+    /* XXX save 64 bit TTBR if guest is LPAE */
+    p->arch.ttbr0 = READ_CP32(TTBR0);
+    p->arch.ttbr1 = READ_CP32(TTBR1);
+
+    p->arch.dacr = READ_CP32(DACR);
+    p->arch.par = READ_CP64(PAR);
+    p->arch.mair0 = READ_CP32(MAIR0);
+    p->arch.mair1 = READ_CP32(MAIR1);
+
+    /* Fault Status */
+    p->arch.dfar = READ_CP32(DFAR);
+    p->arch.ifar = READ_CP32(IFAR);
+    p->arch.dfsr = READ_CP32(DFSR);
+    p->arch.ifsr = READ_CP32(IFSR);
+    p->arch.adfsr = READ_CP32(ADFSR);
+    p->arch.aifsr = READ_CP32(AIFSR);
+
+    /* XXX MPU */
+
+    /* XXX VFP */
+
+    /* XXX VGIC */
+    gic_save_state(p);
+
+    isb();
     context_saved(p);
 }
 
 static void ctxt_switch_to(struct vcpu *n)
 {
+    uint32_t hcr;
+
+    hcr = READ_CP32(HCR);
+    WRITE_CP32(hcr & ~HCR_VM, HCR);
+    isb();
+
     p2m_load_VTTBR(n->domain);
+    isb();
+
+    /* XXX VGIC */
+    gic_restore_state(n);
+
+    /* XXX VFP */
+
+    /* XXX MPU */
+
+    /* Fault Status */
+    WRITE_CP32(n->arch.dfar, DFAR);
+    WRITE_CP32(n->arch.ifar, IFAR);
+    WRITE_CP32(n->arch.dfsr, DFSR);
+    WRITE_CP32(n->arch.ifsr, IFSR);
+    WRITE_CP32(n->arch.adfsr, ADFSR);
+    WRITE_CP32(n->arch.aifsr, AIFSR);
+
+    /* MMU */
+    WRITE_CP32(n->arch.vbar, VBAR);
+    WRITE_CP32(n->arch.ttbcr, TTBCR);
+    /* XXX restore 64 bit TTBR if guest is LPAE */
+    WRITE_CP32(n->arch.ttbr0, TTBR0);
+    WRITE_CP32(n->arch.ttbr1, TTBR1);
+
+    WRITE_CP32(n->arch.dacr, DACR);
+    WRITE_CP64(n->arch.par, PAR);
+    WRITE_CP32(n->arch.mair0, MAIR0);
+    WRITE_CP32(n->arch.mair1, MAIR1);
+    isb();
+
+    /* Control Registers */
+    WRITE_CP32(n->arch.actlr, ACTLR);
+    WRITE_CP32(n->arch.sctlr, SCTLR);
+    WRITE_CP32(n->arch.cpacr, CPACR);
+
+    WRITE_CP32(n->arch.contextidr, CONTEXTIDR);
+    WRITE_CP32(n->arch.tpidrurw, TPIDRURW);
+    WRITE_CP32(n->arch.tpidruro, TPIDRURO);
+    WRITE_CP32(n->arch.tpidrprw, TPIDRPRW);
+
+    /* XXX only restore these if ThumbEE e.g. ID_PFR0.THUMB_EE_SUPPORT */
+    WRITE_CP32(n->arch.teecr, TEECR);
+    WRITE_CP32(n->arch.teehbr, TEEHBR);
+
+    WRITE_CP32(n->arch.joscr, JOSCR);
+    WRITE_CP32(n->arch.jmcr, JMCR);
+
+    isb();
+
+    /* CP 15 */
+    WRITE_CP32(n->arch.csselr, CSSELR);
+
+    isb();
+
+    WRITE_CP32(hcr, HCR);
+    isb();
 }
 
 static void schedule_tail(struct vcpu *prev)
@@ -253,6 +365,7 @@ static int is_guest_psr(uint32_t psr)
 int arch_set_info_guest(
     struct vcpu *v, vcpu_guest_context_u c)
 {
+    struct vcpu_guest_context *ctxt = c.nat;
     struct cpu_user_regs *regs = &c.nat->user_regs;
 
     if ( !is_guest_psr(regs->cpsr) )
@@ -271,11 +384,10 @@ int arch_set_info_guest(
 
     v->arch.cpu_info->guest_cpu_user_regs = *regs;
 
-    /* XXX other state:
-     * - SCTLR
-     * - TTBR0/1
-     * - TTBCR
-     */
+    v->arch.sctlr = ctxt->sctlr;
+    v->arch.ttbr0 = ctxt->ttbr0;
+    v->arch.ttbr1 = ctxt->ttbr1;
+    v->arch.ttbcr = ctxt->ttbcr;
 
     clear_bit(_VPF_down, &v->pause_flags);
 
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/gic.c	Tue Jun 26 16:23:55 2012 +0100
@@ -61,6 +61,30 @@ static struct {
 irq_desc_t irq_desc[NR_IRQS];
 unsigned nr_lrs;
 
+void gic_save_state(struct vcpu *v)
+{
+    int i;
+
+    for ( i=0; i<nr_lrs; i++)
+        v->arch.gic_lr[i] = GICH[GICH_LR + i];
+    /* Disable until next VCPU scheduled */
+    GICH[GICH_HCR] = 0;
+    isb();
+}
+
+void gic_restore_state(struct vcpu *v)
+{
+    int i;
+
+    if ( is_idle_vcpu(v) )
+        return;
+
+    for ( i=0; i<nr_lrs; i++)
+        GICH[GICH_LR + i] = v->arch.gic_lr[i];
+    GICH[GICH_HCR] = GICH_HCR_EN;
+    isb();
+}
+
 static unsigned int gic_irq_startup(struct irq_desc *desc)
 {
     uint32_t enabler;
@@ -263,7 +287,6 @@ static void __cpuinit gic_hyp_init(void)
     vtr = GICH[GICH_VTR];
     nr_lrs  = (vtr & GICH_VTR_NRLRGS) + 1;
 
-    GICH[GICH_HCR] = GICH_HCR_EN;
     GICH[GICH_MISR] = GICH_MISR_EOI;
 }
 
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/gic.h	Tue Jun 26 16:23:55 2012 +0100
@@ -70,8 +70,8 @@
 #define GICH_MISR       (0x10/4)
 #define GICH_EISR0      (0x20/4)
 #define GICH_EISR1      (0x24/4)
-#define GICH_ELRSR0     (0x30/4)
-#define GICH_ELRSR1     (0x34/4)
+#define GICH_ELSR0      (0x30/4)
+#define GICH_ELSR1      (0x34/4)
 #define GICH_APR        (0xF0/4)
 #define GICH_LR         (0x100/4)
 
@@ -149,6 +149,11 @@ extern void gic_init_secondary_cpu(void)
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
 extern void gicv_setup(struct domain *d);
+
+/* Context switch */
+extern void gic_save_state(struct vcpu *v);
+extern void gic_restore_state(struct vcpu *v);
+
 #endif
 
 /*
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/asm-arm/cpregs.h
--- a/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:55 2012 +0100
@@ -88,6 +88,19 @@
  * arguments, which are cp,opc1,crn,crm,opc2.
  */
 
+/* Coprocessor 14 */
+
+/* CP14 CR0: */
+#define TEECR           p14,6,c0,c0,0   /* ThumbEE Configuration Register */
+
+/* CP14 CR1: */
+#define TEEHBR          p14,6,c1,c0,0   /* ThumbEE Handler Base Register */
+#define JOSCR           p14,7,c1,c0,0   /* Jazelle OS Control Register */
+
+/* CP14 CR2: */
+#define JMCR            p14,7,c2,c0,0   /* Jazelle Main Configuration Register */
+
+
 /* Coprocessor 15 */
 
 /* CP15 CR0: CPUID and Cache Type Registers */
@@ -112,6 +125,8 @@
 
 /* CP15 CR1: System Control Registers */
 #define SCTLR           p15,0,c1,c0,0   /* System Control Register */
+#define ACTLR           p15,0,c1,c0,1   /* Auxiliary Control Register */
+#define CPACR           p15,0,c1,c0,2   /* Coprocessor Access Control Register */
 #define SCR             p15,0,c1,c1,0   /* Secure Configuration Register */
 #define NSACR           p15,0,c1,c1,2   /* Non-Secure Access Control Register */
 #define HSCTLR          p15,4,c1,c0,0   /* Hyp. System Control Register */
@@ -127,12 +142,15 @@
 #define VTTBR           p15,6,c2        /* Virtualization Translation Table Base Register */
 
 /* CP15 CR3: Domain Access Control Register */
+#define DACR            p15,0,c3,c0,0   /* Domain Access Control Register */
 
 /* CP15 CR4: */
 
 /* CP15 CR5: Fault Status Registers */
 #define DFSR            p15,0,c5,c0,0   /* Data Fault Status Register */
 #define IFSR            p15,0,c5,c0,1   /* Instruction Fault Status Register */
+#define ADFSR           p15,0,c5,c1,0   /* Auxiliary Data Fault Status Register */
+#define AIFSR           p15,0,c5,c1,1   /* Auxiliary Instruction Fault Status Register */
 #define HSR             p15,4,c5,c2,0   /* Hyp. Syndrome Register */
 
 /* CP15 CR6: Fault Address Registers */
@@ -144,6 +162,7 @@
 
 /* CP15 CR7: Cache and address translation operations */
 #define PAR             p15,0,c7        /* Physical Address Register */
+
 #define ICIALLUIS       p15,0,c7,c1,0   /* Invalidate all instruction caches to PoU inner shareable */
 #define BPIALLIS        p15,0,c7,c1,6   /* Invalidate entire branch predictor array inner shareable */
 #define ICIALLU         p15,0,c7,c5,0   /* Invalidate all instruction caches to PoU */
@@ -192,20 +211,24 @@
 /* CP15 CR9: */
 
 /* CP15 CR10: */
-#define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 */
-#define MAIR1           p15,0,c10,c2,1  /* Memory Attribute Indirection Register 1 */
+#define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
+#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 */
 
 /* CP15 CR11: DMA Operations for TCM Access */
 
 /* CP15 CR12:  */
+#define VBAR            p15,0,c12,c0,0  /* Vector Base Address Register */
 #define HVBAR           p15,4,c12,c0,0  /* Hyp. Vector Base Address Register */
 
 /* CP15 CR13:  */
 #define FCSEIDR         p15,0,c13,c0,0  /* FCSE Process ID Register */
 #define CONTEXTIDR      p15,0,c13,c0,1  /* Context ID Register */
-#define HTPIDR          p15,4,c13,c0,2  /* Hyp. Software Thread ID Register */
+#define TPIDRURW        p15,0,c13,c0,2  /* Software Thread ID, User, R/W */
+#define TPIDRURO        p15,0,c13,c0,3  /* Software Thread ID, User, R/O */
+#define TPIDRPRW        p15,0,c13,c0,4  /* Software Thread ID, Priveleged */
+#define HTPIDR          p15,4,c13,c0,2  /* HYp Software Thread Id Register */
 
 /* CP15 CR14:  */
 #define CNTPCT          p15,0,c14       /* Time counter value */
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/asm-arm/domain.h
--- a/xen/include/asm-arm/domain.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/asm-arm/domain.h	Tue Jun 26 16:23:55 2012 +0100
@@ -73,8 +73,37 @@ struct arch_vcpu
      */
     struct cpu_info *cpu_info;
 
-    uint32_t sctlr;
-    uint32_t ttbr0, ttbr1, ttbcr;
+    /* Fault Status */
+    uint32_t dfar, ifar;
+    uint32_t dfsr, ifsr;
+    uint32_t adfsr, aifsr;
+
+    /* MMU */
+    uint32_t vbar;
+    uint32_t ttbcr;
+    uint32_t ttbr0, ttbr1;
+
+    uint32_t dacr;
+    uint64_t par;
+    uint32_t mair0, mair1;
+
+    /* Control Registers */
+    uint32_t actlr, sctlr;
+    uint32_t cpacr;
+
+    uint32_t contextidr;
+    uint32_t tpidrurw;
+    uint32_t tpidruro;
+    uint32_t tpidrprw;
+
+    uint32_t teecr, teehbr;
+    uint32_t joscr, jmcr;
+
+    /* CP 15 */
+    uint32_t csselr;
+
+    uint32_t gic_hcr, gic_vmcr, gic_apr;
+    uint32_t gic_lr[64];
 
     struct {
         struct vgic_irq_rank private_irqs;
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/public/arch-arm.h
--- a/xen/include/public/arch-arm.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/public/arch-arm.h	Tue Jun 26 16:23:55 2012 +0100
@@ -124,6 +124,9 @@ typedef uint32_t xen_ulong_t;
 
 struct vcpu_guest_context {
     struct cpu_user_regs user_regs;         /* User-level CPU registers     */
+
+    uint32_t sctlr;
+    uint32_t ttbr0, ttbr1, ttbcr;
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005Hc-9E; Tue, 26 Jun 2012 22:33:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJz-00058n-Bx
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [85.158.143.35:13201] by server-2.bemta-4.messagelabs.com id
	89/93-17938-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1340749996!13545238!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5057 invoked from network); 26 Jun 2012 22:33:17 -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;
	26 Jun 2012 22:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0004GB-6r
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJw-0003f4-5W
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:16 +0000
Message-Id: <E1SjeJw-0003f4-5W@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: context switch a bunch of guest
	state.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724235 -3600
# Node ID 2f88d9264d47f3bace8b8091fdc6a489c6279616
# Parent  3f8d8983cd7609e301ec12b087173c3d7fa299b9
arm: context switch a bunch of guest state.

I haven't investigated what if any of this could be done lazily.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/domain.c	Tue Jun 26 16:23:55 2012 +0100
@@ -35,12 +35,124 @@ void idle_loop(void)
 
 static void ctxt_switch_from(struct vcpu *p)
 {
+    /* CP 15 */
+    p->arch.csselr = READ_CP32(CSSELR);
+
+    /* Control Registers */
+    p->arch.actlr = READ_CP32(ACTLR);
+    p->arch.sctlr = READ_CP32(SCTLR);
+    p->arch.cpacr = READ_CP32(CPACR);
+
+    p->arch.contextidr = READ_CP32(CONTEXTIDR);
+    p->arch.tpidrurw = READ_CP32(TPIDRURW);
+    p->arch.tpidruro = READ_CP32(TPIDRURO);
+    p->arch.tpidrprw = READ_CP32(TPIDRPRW);
+
+    /* XXX only save these if ThumbEE e.g. ID_PFR0.THUMB_EE_SUPPORT */
+    p->arch.teecr = READ_CP32(TEECR);
+    p->arch.teehbr = READ_CP32(TEEHBR);
+
+    p->arch.joscr = READ_CP32(JOSCR);
+    p->arch.jmcr = READ_CP32(JMCR);
+
+    isb();
+
+    /* MMU */
+    p->arch.vbar = READ_CP32(VBAR);
+    p->arch.ttbcr = READ_CP32(TTBCR);
+    /* XXX save 64 bit TTBR if guest is LPAE */
+    p->arch.ttbr0 = READ_CP32(TTBR0);
+    p->arch.ttbr1 = READ_CP32(TTBR1);
+
+    p->arch.dacr = READ_CP32(DACR);
+    p->arch.par = READ_CP64(PAR);
+    p->arch.mair0 = READ_CP32(MAIR0);
+    p->arch.mair1 = READ_CP32(MAIR1);
+
+    /* Fault Status */
+    p->arch.dfar = READ_CP32(DFAR);
+    p->arch.ifar = READ_CP32(IFAR);
+    p->arch.dfsr = READ_CP32(DFSR);
+    p->arch.ifsr = READ_CP32(IFSR);
+    p->arch.adfsr = READ_CP32(ADFSR);
+    p->arch.aifsr = READ_CP32(AIFSR);
+
+    /* XXX MPU */
+
+    /* XXX VFP */
+
+    /* XXX VGIC */
+    gic_save_state(p);
+
+    isb();
     context_saved(p);
 }
 
 static void ctxt_switch_to(struct vcpu *n)
 {
+    uint32_t hcr;
+
+    hcr = READ_CP32(HCR);
+    WRITE_CP32(hcr & ~HCR_VM, HCR);
+    isb();
+
     p2m_load_VTTBR(n->domain);
+    isb();
+
+    /* XXX VGIC */
+    gic_restore_state(n);
+
+    /* XXX VFP */
+
+    /* XXX MPU */
+
+    /* Fault Status */
+    WRITE_CP32(n->arch.dfar, DFAR);
+    WRITE_CP32(n->arch.ifar, IFAR);
+    WRITE_CP32(n->arch.dfsr, DFSR);
+    WRITE_CP32(n->arch.ifsr, IFSR);
+    WRITE_CP32(n->arch.adfsr, ADFSR);
+    WRITE_CP32(n->arch.aifsr, AIFSR);
+
+    /* MMU */
+    WRITE_CP32(n->arch.vbar, VBAR);
+    WRITE_CP32(n->arch.ttbcr, TTBCR);
+    /* XXX restore 64 bit TTBR if guest is LPAE */
+    WRITE_CP32(n->arch.ttbr0, TTBR0);
+    WRITE_CP32(n->arch.ttbr1, TTBR1);
+
+    WRITE_CP32(n->arch.dacr, DACR);
+    WRITE_CP64(n->arch.par, PAR);
+    WRITE_CP32(n->arch.mair0, MAIR0);
+    WRITE_CP32(n->arch.mair1, MAIR1);
+    isb();
+
+    /* Control Registers */
+    WRITE_CP32(n->arch.actlr, ACTLR);
+    WRITE_CP32(n->arch.sctlr, SCTLR);
+    WRITE_CP32(n->arch.cpacr, CPACR);
+
+    WRITE_CP32(n->arch.contextidr, CONTEXTIDR);
+    WRITE_CP32(n->arch.tpidrurw, TPIDRURW);
+    WRITE_CP32(n->arch.tpidruro, TPIDRURO);
+    WRITE_CP32(n->arch.tpidrprw, TPIDRPRW);
+
+    /* XXX only restore these if ThumbEE e.g. ID_PFR0.THUMB_EE_SUPPORT */
+    WRITE_CP32(n->arch.teecr, TEECR);
+    WRITE_CP32(n->arch.teehbr, TEEHBR);
+
+    WRITE_CP32(n->arch.joscr, JOSCR);
+    WRITE_CP32(n->arch.jmcr, JMCR);
+
+    isb();
+
+    /* CP 15 */
+    WRITE_CP32(n->arch.csselr, CSSELR);
+
+    isb();
+
+    WRITE_CP32(hcr, HCR);
+    isb();
 }
 
 static void schedule_tail(struct vcpu *prev)
@@ -253,6 +365,7 @@ static int is_guest_psr(uint32_t psr)
 int arch_set_info_guest(
     struct vcpu *v, vcpu_guest_context_u c)
 {
+    struct vcpu_guest_context *ctxt = c.nat;
     struct cpu_user_regs *regs = &c.nat->user_regs;
 
     if ( !is_guest_psr(regs->cpsr) )
@@ -271,11 +384,10 @@ int arch_set_info_guest(
 
     v->arch.cpu_info->guest_cpu_user_regs = *regs;
 
-    /* XXX other state:
-     * - SCTLR
-     * - TTBR0/1
-     * - TTBCR
-     */
+    v->arch.sctlr = ctxt->sctlr;
+    v->arch.ttbr0 = ctxt->ttbr0;
+    v->arch.ttbr1 = ctxt->ttbr1;
+    v->arch.ttbcr = ctxt->ttbcr;
 
     clear_bit(_VPF_down, &v->pause_flags);
 
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/gic.c	Tue Jun 26 16:23:55 2012 +0100
@@ -61,6 +61,30 @@ static struct {
 irq_desc_t irq_desc[NR_IRQS];
 unsigned nr_lrs;
 
+void gic_save_state(struct vcpu *v)
+{
+    int i;
+
+    for ( i=0; i<nr_lrs; i++)
+        v->arch.gic_lr[i] = GICH[GICH_LR + i];
+    /* Disable until next VCPU scheduled */
+    GICH[GICH_HCR] = 0;
+    isb();
+}
+
+void gic_restore_state(struct vcpu *v)
+{
+    int i;
+
+    if ( is_idle_vcpu(v) )
+        return;
+
+    for ( i=0; i<nr_lrs; i++)
+        GICH[GICH_LR + i] = v->arch.gic_lr[i];
+    GICH[GICH_HCR] = GICH_HCR_EN;
+    isb();
+}
+
 static unsigned int gic_irq_startup(struct irq_desc *desc)
 {
     uint32_t enabler;
@@ -263,7 +287,6 @@ static void __cpuinit gic_hyp_init(void)
     vtr = GICH[GICH_VTR];
     nr_lrs  = (vtr & GICH_VTR_NRLRGS) + 1;
 
-    GICH[GICH_HCR] = GICH_HCR_EN;
     GICH[GICH_MISR] = GICH_MISR_EOI;
 }
 
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/arch/arm/gic.h
--- a/xen/arch/arm/gic.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/arch/arm/gic.h	Tue Jun 26 16:23:55 2012 +0100
@@ -70,8 +70,8 @@
 #define GICH_MISR       (0x10/4)
 #define GICH_EISR0      (0x20/4)
 #define GICH_EISR1      (0x24/4)
-#define GICH_ELRSR0     (0x30/4)
-#define GICH_ELRSR1     (0x34/4)
+#define GICH_ELSR0      (0x30/4)
+#define GICH_ELSR1      (0x34/4)
 #define GICH_APR        (0xF0/4)
 #define GICH_LR         (0x100/4)
 
@@ -149,6 +149,11 @@ extern void gic_init_secondary_cpu(void)
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
 extern void gicv_setup(struct domain *d);
+
+/* Context switch */
+extern void gic_save_state(struct vcpu *v);
+extern void gic_restore_state(struct vcpu *v);
+
 #endif
 
 /*
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/asm-arm/cpregs.h
--- a/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/asm-arm/cpregs.h	Tue Jun 26 16:23:55 2012 +0100
@@ -88,6 +88,19 @@
  * arguments, which are cp,opc1,crn,crm,opc2.
  */
 
+/* Coprocessor 14 */
+
+/* CP14 CR0: */
+#define TEECR           p14,6,c0,c0,0   /* ThumbEE Configuration Register */
+
+/* CP14 CR1: */
+#define TEEHBR          p14,6,c1,c0,0   /* ThumbEE Handler Base Register */
+#define JOSCR           p14,7,c1,c0,0   /* Jazelle OS Control Register */
+
+/* CP14 CR2: */
+#define JMCR            p14,7,c2,c0,0   /* Jazelle Main Configuration Register */
+
+
 /* Coprocessor 15 */
 
 /* CP15 CR0: CPUID and Cache Type Registers */
@@ -112,6 +125,8 @@
 
 /* CP15 CR1: System Control Registers */
 #define SCTLR           p15,0,c1,c0,0   /* System Control Register */
+#define ACTLR           p15,0,c1,c0,1   /* Auxiliary Control Register */
+#define CPACR           p15,0,c1,c0,2   /* Coprocessor Access Control Register */
 #define SCR             p15,0,c1,c1,0   /* Secure Configuration Register */
 #define NSACR           p15,0,c1,c1,2   /* Non-Secure Access Control Register */
 #define HSCTLR          p15,4,c1,c0,0   /* Hyp. System Control Register */
@@ -127,12 +142,15 @@
 #define VTTBR           p15,6,c2        /* Virtualization Translation Table Base Register */
 
 /* CP15 CR3: Domain Access Control Register */
+#define DACR            p15,0,c3,c0,0   /* Domain Access Control Register */
 
 /* CP15 CR4: */
 
 /* CP15 CR5: Fault Status Registers */
 #define DFSR            p15,0,c5,c0,0   /* Data Fault Status Register */
 #define IFSR            p15,0,c5,c0,1   /* Instruction Fault Status Register */
+#define ADFSR           p15,0,c5,c1,0   /* Auxiliary Data Fault Status Register */
+#define AIFSR           p15,0,c5,c1,1   /* Auxiliary Instruction Fault Status Register */
 #define HSR             p15,4,c5,c2,0   /* Hyp. Syndrome Register */
 
 /* CP15 CR6: Fault Address Registers */
@@ -144,6 +162,7 @@
 
 /* CP15 CR7: Cache and address translation operations */
 #define PAR             p15,0,c7        /* Physical Address Register */
+
 #define ICIALLUIS       p15,0,c7,c1,0   /* Invalidate all instruction caches to PoU inner shareable */
 #define BPIALLIS        p15,0,c7,c1,6   /* Invalidate entire branch predictor array inner shareable */
 #define ICIALLU         p15,0,c7,c5,0   /* Invalidate all instruction caches to PoU */
@@ -192,20 +211,24 @@
 /* CP15 CR9: */
 
 /* CP15 CR10: */
-#define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 */
-#define MAIR1           p15,0,c10,c2,1  /* Memory Attribute Indirection Register 1 */
+#define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
+#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 */
 
 /* CP15 CR11: DMA Operations for TCM Access */
 
 /* CP15 CR12:  */
+#define VBAR            p15,0,c12,c0,0  /* Vector Base Address Register */
 #define HVBAR           p15,4,c12,c0,0  /* Hyp. Vector Base Address Register */
 
 /* CP15 CR13:  */
 #define FCSEIDR         p15,0,c13,c0,0  /* FCSE Process ID Register */
 #define CONTEXTIDR      p15,0,c13,c0,1  /* Context ID Register */
-#define HTPIDR          p15,4,c13,c0,2  /* Hyp. Software Thread ID Register */
+#define TPIDRURW        p15,0,c13,c0,2  /* Software Thread ID, User, R/W */
+#define TPIDRURO        p15,0,c13,c0,3  /* Software Thread ID, User, R/O */
+#define TPIDRPRW        p15,0,c13,c0,4  /* Software Thread ID, Priveleged */
+#define HTPIDR          p15,4,c13,c0,2  /* HYp Software Thread Id Register */
 
 /* CP15 CR14:  */
 #define CNTPCT          p15,0,c14       /* Time counter value */
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/asm-arm/domain.h
--- a/xen/include/asm-arm/domain.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/asm-arm/domain.h	Tue Jun 26 16:23:55 2012 +0100
@@ -73,8 +73,37 @@ struct arch_vcpu
      */
     struct cpu_info *cpu_info;
 
-    uint32_t sctlr;
-    uint32_t ttbr0, ttbr1, ttbcr;
+    /* Fault Status */
+    uint32_t dfar, ifar;
+    uint32_t dfsr, ifsr;
+    uint32_t adfsr, aifsr;
+
+    /* MMU */
+    uint32_t vbar;
+    uint32_t ttbcr;
+    uint32_t ttbr0, ttbr1;
+
+    uint32_t dacr;
+    uint64_t par;
+    uint32_t mair0, mair1;
+
+    /* Control Registers */
+    uint32_t actlr, sctlr;
+    uint32_t cpacr;
+
+    uint32_t contextidr;
+    uint32_t tpidrurw;
+    uint32_t tpidruro;
+    uint32_t tpidrprw;
+
+    uint32_t teecr, teehbr;
+    uint32_t joscr, jmcr;
+
+    /* CP 15 */
+    uint32_t csselr;
+
+    uint32_t gic_hcr, gic_vmcr, gic_apr;
+    uint32_t gic_lr[64];
 
     struct {
         struct vgic_irq_rank private_irqs;
diff -r 3f8d8983cd76 -r 2f88d9264d47 xen/include/public/arch-arm.h
--- a/xen/include/public/arch-arm.h	Tue Jun 26 16:23:54 2012 +0100
+++ b/xen/include/public/arch-arm.h	Tue Jun 26 16:23:55 2012 +0100
@@ -124,6 +124,9 @@ typedef uint32_t xen_ulong_t;
 
 struct vcpu_guest_context {
     struct cpu_user_regs user_regs;         /* User-level CPU registers     */
+
+    uint32_t sctlr;
+    uint32_t ttbr0, ttbr1, ttbcr;
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005Hk-C1; Tue, 26 Jun 2012 22:33:21 +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 1SjeJz-0005EG-Si
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [193.109.254.147:65014] by server-4.bemta-14.messagelabs.com id
	4B/5F-02077-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-27.messagelabs.com!1340749997!3026121!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18600 invoked from network); 26 Jun 2012 22:33:18 -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;
	26 Jun 2012 22:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0004GK-OK
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0003fn-Mw
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Message-Id: <E1SjeJx-0003fn-Mw@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: map fixmaps non-executable.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724238 -3600
# Node ID 21c75c5ac5f4aa39778843bae21334dde2a4d5db
# Parent  be9f7621d53145536ea91bbd0e8bd82f34f7086e
arm: map fixmaps non-executable.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r be9f7621d531 -r 21c75c5ac5f4 xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Tue Jun 26 16:23:57 2012 +0100
+++ b/xen/arch/arm/mm.c	Tue Jun 26 16:23:58 2012 +0100
@@ -106,6 +106,7 @@ void set_fixmap(unsigned map, unsigned l
     lpae_t pte = mfn_to_xen_entry(mfn);
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.ai = attributes;
+    pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
     flush_xen_data_tlb_va(FIXMAP_ADDR(map));
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005Hk-C1; Tue, 26 Jun 2012 22:33:21 +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 1SjeJz-0005EG-Si
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:19 +0000
Received: from [193.109.254.147:65014] by server-4.bemta-14.messagelabs.com id
	4B/5F-02077-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-27.messagelabs.com!1340749997!3026121!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18600 invoked from network); 26 Jun 2012 22:33:18 -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;
	26 Jun 2012 22:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0004GK-OK
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0003fn-Mw
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Message-Id: <E1SjeJx-0003fn-Mw@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: map fixmaps non-executable.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724238 -3600
# Node ID 21c75c5ac5f4aa39778843bae21334dde2a4d5db
# Parent  be9f7621d53145536ea91bbd0e8bd82f34f7086e
arm: map fixmaps non-executable.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r be9f7621d531 -r 21c75c5ac5f4 xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c	Tue Jun 26 16:23:57 2012 +0100
+++ b/xen/arch/arm/mm.c	Tue Jun 26 16:23:58 2012 +0100
@@ -106,6 +106,7 @@ void set_fixmap(unsigned map, unsigned l
     lpae_t pte = mfn_to_xen_entry(mfn);
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.ai = attributes;
+    pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
     flush_xen_data_tlb_va(FIXMAP_ADDR(map));
 }

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005I7-G0; Tue, 26 Jun 2012 22:33:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeK0-0005Fn-0Q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:20 +0000
Received: from [85.158.138.51:56991] by server-3.bemta-3.messagelabs.com id
	63/FD-26490-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340749997!21517868!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7713 invoked from network); 26 Jun 2012 22:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0004GH-7a
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0003fY-6D
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Message-Id: <E1SjeJx-0003fY-6D@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: dump guest s1 walk on data
	abort which is not a stage 2 issue.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724237 -3600
# Node ID be9f7621d53145536ea91bbd0e8bd82f34f7086e
# Parent  a6bc79e839e4609fdfefa934a4a440ddb05d56ce
arm: dump guest s1 walk on data abort which is not a stage 2 issue.

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


diff -r a6bc79e839e4 -r be9f7621d531 xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:56 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:57 2012 +0100
@@ -28,6 +28,7 @@
 #include <xen/errno.h>
 #include <xen/hypercall.h>
 #include <xen/softirq.h>
+#include <xen/domain_page.h>
 #include <public/xen.h>
 #include <asm/regs.h>
 #include <asm/cpregs.h>
@@ -528,6 +529,62 @@ static void do_cp15_64(struct cpu_user_r
 
 }
 
+void dump_guest_s1_walk(struct domain *d, uint32_t addr)
+{
+    uint32_t ttbcr = READ_CP32(TTBCR);
+    uint32_t ttbr0 = READ_CP32(TTBR0);
+    paddr_t paddr;
+    uint32_t offset;
+    uint32_t *first = NULL, *second = NULL;
+
+    printk("dom%d VA 0x%08"PRIx32"\n", d->domain_id, addr);
+    printk("    TTBCR: 0x%08"PRIx32"\n", ttbcr);
+    printk("    TTBR0: 0x%08"PRIx32" = 0x%"PRIpaddr"\n",
+           ttbr0, p2m_lookup(d, ttbr0 & PAGE_MASK));
+
+    if ( ttbcr & TTBCR_EAE )
+    {
+        printk("Cannot handle LPAE guest PT walk\n");
+        return;
+    }
+    if ( (ttbcr & TTBCR_N_MASK) != 0 )
+    {
+        printk("Cannot handle TTBR1 guest walks\n");
+        return;
+    }
+
+    paddr = p2m_lookup(d, ttbr0 & PAGE_MASK);
+    if ( paddr == INVALID_PADDR )
+    {
+        printk("Failed TTBR0 maddr lookup\n");
+        goto done;
+    }
+    first = map_domain_page(paddr>>PAGE_SHIFT);
+
+    offset = addr >> (12+10);
+    printk("1ST[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
+           offset, paddr, first[offset]);
+    if ( !(first[offset] & 0x1) ||
+         !(first[offset] & 0x2) )
+        goto done;
+
+    paddr = p2m_lookup(d, first[offset] & PAGE_MASK);
+
+    if ( paddr == INVALID_PADDR )
+    {
+        printk("Failed L1 entry maddr lookup\n");
+        goto done;
+    }
+    second = map_domain_page(paddr>>PAGE_SHIFT);
+    offset = (addr >> 12) & 0x3FF;
+    printk("2ND[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
+           offset, paddr, second[offset]);
+
+done:
+    if (second) unmap_domain_page(second);
+    if (first) unmap_domain_page(first);
+}
+
 static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
                                      struct hsr_dabt dabt)
 {
@@ -535,11 +592,12 @@ static void do_trap_data_abort_guest(str
     int level = -1;
     mmio_info_t info;
 
+    info.dabt = dabt;
+    info.gva = READ_CP32(HDFAR);
+
     if (dabt.s1ptw)
         goto bad_data_abort;
 
-    info.dabt = dabt;
-    info.gva = READ_CP32(HDFAR);
     info.gpa = gva_to_ipa(info.gva);
 
     if (handle_mmio(&info))
@@ -553,18 +611,23 @@ bad_data_abort:
     msg = decode_fsc( dabt.dfsc, &level);
 
     printk("Guest data abort: %s%s%s\n"
-           "    gva=%"PRIx32" gpa=%"PRIpaddr"\n",
+           "    gva=%"PRIx32"\n",
            msg, dabt.s1ptw ? " S2 during S1" : "",
            fsc_level_str(level),
-           info.gva, info.gpa);
-    if (dabt.valid)
+           info.gva);
+    if ( !dabt.s1ptw )
+        printk("    gpa=%"PRIpaddr"\n", info.gpa);
+    if ( dabt.valid )
         printk("    size=%d sign=%d write=%d reg=%d\n",
                dabt.size, dabt.sign, dabt.write, dabt.reg);
     else
         printk("    instruction syndrome invalid\n");
     printk("    eat=%d cm=%d s1ptw=%d dfsc=%d\n",
            dabt.eat, dabt.cache, dabt.s1ptw, dabt.dfsc);
-
+    if ( !dabt.s1ptw )
+        dump_p2m_lookup(current->domain, info.gpa);
+    else
+        dump_guest_s1_walk(current->domain, info.gva);
     show_execution_state(regs);
     panic("Unhandled guest data abort\n");
 }
diff -r a6bc79e839e4 -r be9f7621d531 xen/include/asm-arm/processor.h
--- a/xen/include/asm-arm/processor.h	Tue Jun 26 16:23:56 2012 +0100
+++ b/xen/include/asm-arm/processor.h	Tue Jun 26 16:23:57 2012 +0100
@@ -25,6 +25,7 @@
 #define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
 
 /* TTBCR Translation Table Base Control Register */
+#define TTBCR_EAE    0x80000000
 #define TTBCR_N_MASK 0x07
 #define TTBCR_N_16KB 0x00
 #define TTBCR_N_8KB  0x01

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005I7-G0; Tue, 26 Jun 2012 22:33:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeK0-0005Fn-0Q
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:20 +0000
Received: from [85.158.138.51:56991] by server-3.bemta-3.messagelabs.com id
	63/FD-26490-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1340749997!21517868!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7713 invoked from network); 26 Jun 2012 22:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	26 Jun 2012 22:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0004GH-7a
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJx-0003fY-6D
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:17 +0000
Message-Id: <E1SjeJx-0003fY-6D@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: dump guest s1 walk on data
	abort which is not a stage 2 issue.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724237 -3600
# Node ID be9f7621d53145536ea91bbd0e8bd82f34f7086e
# Parent  a6bc79e839e4609fdfefa934a4a440ddb05d56ce
arm: dump guest s1 walk on data abort which is not a stage 2 issue.

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


diff -r a6bc79e839e4 -r be9f7621d531 xen/arch/arm/traps.c
--- a/xen/arch/arm/traps.c	Tue Jun 26 16:23:56 2012 +0100
+++ b/xen/arch/arm/traps.c	Tue Jun 26 16:23:57 2012 +0100
@@ -28,6 +28,7 @@
 #include <xen/errno.h>
 #include <xen/hypercall.h>
 #include <xen/softirq.h>
+#include <xen/domain_page.h>
 #include <public/xen.h>
 #include <asm/regs.h>
 #include <asm/cpregs.h>
@@ -528,6 +529,62 @@ static void do_cp15_64(struct cpu_user_r
 
 }
 
+void dump_guest_s1_walk(struct domain *d, uint32_t addr)
+{
+    uint32_t ttbcr = READ_CP32(TTBCR);
+    uint32_t ttbr0 = READ_CP32(TTBR0);
+    paddr_t paddr;
+    uint32_t offset;
+    uint32_t *first = NULL, *second = NULL;
+
+    printk("dom%d VA 0x%08"PRIx32"\n", d->domain_id, addr);
+    printk("    TTBCR: 0x%08"PRIx32"\n", ttbcr);
+    printk("    TTBR0: 0x%08"PRIx32" = 0x%"PRIpaddr"\n",
+           ttbr0, p2m_lookup(d, ttbr0 & PAGE_MASK));
+
+    if ( ttbcr & TTBCR_EAE )
+    {
+        printk("Cannot handle LPAE guest PT walk\n");
+        return;
+    }
+    if ( (ttbcr & TTBCR_N_MASK) != 0 )
+    {
+        printk("Cannot handle TTBR1 guest walks\n");
+        return;
+    }
+
+    paddr = p2m_lookup(d, ttbr0 & PAGE_MASK);
+    if ( paddr == INVALID_PADDR )
+    {
+        printk("Failed TTBR0 maddr lookup\n");
+        goto done;
+    }
+    first = map_domain_page(paddr>>PAGE_SHIFT);
+
+    offset = addr >> (12+10);
+    printk("1ST[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
+           offset, paddr, first[offset]);
+    if ( !(first[offset] & 0x1) ||
+         !(first[offset] & 0x2) )
+        goto done;
+
+    paddr = p2m_lookup(d, first[offset] & PAGE_MASK);
+
+    if ( paddr == INVALID_PADDR )
+    {
+        printk("Failed L1 entry maddr lookup\n");
+        goto done;
+    }
+    second = map_domain_page(paddr>>PAGE_SHIFT);
+    offset = (addr >> 12) & 0x3FF;
+    printk("2ND[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
+           offset, paddr, second[offset]);
+
+done:
+    if (second) unmap_domain_page(second);
+    if (first) unmap_domain_page(first);
+}
+
 static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
                                      struct hsr_dabt dabt)
 {
@@ -535,11 +592,12 @@ static void do_trap_data_abort_guest(str
     int level = -1;
     mmio_info_t info;
 
+    info.dabt = dabt;
+    info.gva = READ_CP32(HDFAR);
+
     if (dabt.s1ptw)
         goto bad_data_abort;
 
-    info.dabt = dabt;
-    info.gva = READ_CP32(HDFAR);
     info.gpa = gva_to_ipa(info.gva);
 
     if (handle_mmio(&info))
@@ -553,18 +611,23 @@ bad_data_abort:
     msg = decode_fsc( dabt.dfsc, &level);
 
     printk("Guest data abort: %s%s%s\n"
-           "    gva=%"PRIx32" gpa=%"PRIpaddr"\n",
+           "    gva=%"PRIx32"\n",
            msg, dabt.s1ptw ? " S2 during S1" : "",
            fsc_level_str(level),
-           info.gva, info.gpa);
-    if (dabt.valid)
+           info.gva);
+    if ( !dabt.s1ptw )
+        printk("    gpa=%"PRIpaddr"\n", info.gpa);
+    if ( dabt.valid )
         printk("    size=%d sign=%d write=%d reg=%d\n",
                dabt.size, dabt.sign, dabt.write, dabt.reg);
     else
         printk("    instruction syndrome invalid\n");
     printk("    eat=%d cm=%d s1ptw=%d dfsc=%d\n",
            dabt.eat, dabt.cache, dabt.s1ptw, dabt.dfsc);
-
+    if ( !dabt.s1ptw )
+        dump_p2m_lookup(current->domain, info.gpa);
+    else
+        dump_guest_s1_walk(current->domain, info.gva);
     show_execution_state(regs);
     panic("Unhandled guest data abort\n");
 }
diff -r a6bc79e839e4 -r be9f7621d531 xen/include/asm-arm/processor.h
--- a/xen/include/asm-arm/processor.h	Tue Jun 26 16:23:56 2012 +0100
+++ b/xen/include/asm-arm/processor.h	Tue Jun 26 16:23:57 2012 +0100
@@ -25,6 +25,7 @@
 #define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
 
 /* TTBCR Translation Table Base Control Register */
+#define TTBCR_EAE    0x80000000
 #define TTBCR_N_MASK 0x07
 #define TTBCR_N_16KB 0x00
 #define TTBCR_N_8KB  0x01

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005IU-Mf; Tue, 26 Jun 2012 22:33:21 +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 1SjeK1-0005H9-6z
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:21 +0000
Received: from [193.109.254.147:34533] by server-10.bemta-14.messagelabs.com
	id 59/C3-05433-0B83AEF4; Tue, 26 Jun 2012 22:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1340749998!6264714!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12069 invoked from network); 26 Jun 2012 22:33:19 -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;
	26 Jun 2012 22:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0004GQ-PG
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0003gH-Ns
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Message-Id: <E1SjeJy-0003gH-Ns@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix a typo in the
	GCREALLOC_ARRAY macro
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1340726420 -3600
# Node ID c6c9d20963d7c5d8022a8cbe6bdaea359804f284
# Parent  b91ef972029ddaa110af6463171715ab9070c9d8
libxl: fix a typo in the GCREALLOC_ARRAY macro

Causing a build failure when trying to use it:

xxx: error: expected ';' before ')' token
xxx: error: expected statement before ')' token

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


diff -r b91ef972029d -r c6c9d20963d7 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Tue Jun 26 16:23:58 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Tue Jun 26 17:00:20 2012 +0100
@@ -1972,7 +1972,7 @@ struct libxl__domain_create_state {
 #define GCREALLOC_ARRAY(var, nmemb)                                     \
     (assert(nmemb > 0),                                                 \
      assert(ARRAY_SIZE_OK((var), (nmemb))),                             \
-     (var) = libxl__realloc((gc), (var), (nmemb)*sizeof(*(var)))))
+     (var) = libxl__realloc((gc), (var), (nmemb)*sizeof(*(var))))
 
 
 /*

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005IU-Mf; Tue, 26 Jun 2012 22:33:21 +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 1SjeK1-0005H9-6z
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:21 +0000
Received: from [193.109.254.147:34533] by server-10.bemta-14.messagelabs.com
	id 59/C3-05433-0B83AEF4; Tue, 26 Jun 2012 22:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1340749998!6264714!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12069 invoked from network); 26 Jun 2012 22:33:19 -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;
	26 Jun 2012 22:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0004GQ-PG
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0003gH-Ns
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Message-Id: <E1SjeJy-0003gH-Ns@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix a typo in the
	GCREALLOC_ARRAY macro
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <raistlin@linux.it>
# Date 1340726420 -3600
# Node ID c6c9d20963d7c5d8022a8cbe6bdaea359804f284
# Parent  b91ef972029ddaa110af6463171715ab9070c9d8
libxl: fix a typo in the GCREALLOC_ARRAY macro

Causing a build failure when trying to use it:

xxx: error: expected ';' before ')' token
xxx: error: expected statement before ')' token

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


diff -r b91ef972029d -r c6c9d20963d7 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Tue Jun 26 16:23:58 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Tue Jun 26 17:00:20 2012 +0100
@@ -1972,7 +1972,7 @@ struct libxl__domain_create_state {
 #define GCREALLOC_ARRAY(var, nmemb)                                     \
     (assert(nmemb > 0),                                                 \
      assert(ARRAY_SIZE_OK((var), (nmemb))),                             \
-     (var) = libxl__realloc((gc), (var), (nmemb)*sizeof(*(var)))))
+     (var) = libxl__realloc((gc), (var), (nmemb)*sizeof(*(var))))
 
 
 /*

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005IN-Jh; Tue, 26 Jun 2012 22:33:21 +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 1SjeK0-0005Gv-LW
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:20 +0000
Received: from [193.109.254.147:22271] by server-1.bemta-14.messagelabs.com id
	A8/34-24612-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1340749998!1873971!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14284 invoked from network); 26 Jun 2012 22:33:19 -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;
	26 Jun 2012 22:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0004GN-8d
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0003g2-7E
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Message-Id: <E1SjeJy-0003g2-7E@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix locking 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724238 -3600
# Node ID b91ef972029ddaa110af6463171715ab9070c9d8
# Parent  21c75c5ac5f4aa39778843bae21334dde2a4d5db
arm: fix locking in create_p2m_entries

For some reason we were holding the lock over only the unmaps at the end of
the function, rather than for the whole walk.

We might want to be more clever in the future, but for now lets just lock for
the whole walk+create process.

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


diff -r 21c75c5ac5f4 -r b91ef972029d xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:58 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:58 2012 +0100
@@ -130,6 +130,8 @@ static int create_p2m_entries(struct dom
     paddr_t addr;
     unsigned long cur_first_offset = ~0, cur_second_offset = ~0;
 
+    spin_lock(&p2m->lock);
+
     /* XXX Don't actually handle 40 bit guest physical addresses */
     BUG_ON(start_gpaddr & 0x8000000000ULL);
     BUG_ON(end_gpaddr   & 0x8000000000ULL);
@@ -211,8 +213,6 @@ static int create_p2m_entries(struct dom
     rc = 0;
 
 out:
-    spin_lock(&p2m->lock);
-
     if (third) unmap_domain_page(third);
     if (second) unmap_domain_page(second);
     if (first) unmap_domain_page(first);

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

From xen-changelog-bounces@lists.xen.org Tue Jun 26 22:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 26 Jun 2012 22:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SjeK1-0005IN-Jh; Tue, 26 Jun 2012 22:33:21 +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 1SjeK0-0005Gv-LW
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:20 +0000
Received: from [193.109.254.147:22271] by server-1.bemta-14.messagelabs.com id
	A8/34-24612-FA83AEF4; Tue, 26 Jun 2012 22:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1340749998!1873971!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14284 invoked from network); 26 Jun 2012 22:33:19 -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;
	26 Jun 2012 22:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0004GN-8d
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SjeJy-0003g2-7E
	for xen-changelog@lists.xensource.com; Tue, 26 Jun 2012 22:33:18 +0000
Message-Id: <E1SjeJy-0003g2-7E@xenbits.xen.org>
Date: Tue, 26 Jun 2012 22:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix locking 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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1340724238 -3600
# Node ID b91ef972029ddaa110af6463171715ab9070c9d8
# Parent  21c75c5ac5f4aa39778843bae21334dde2a4d5db
arm: fix locking in create_p2m_entries

For some reason we were holding the lock over only the unmaps at the end of
the function, rather than for the whole walk.

We might want to be more clever in the future, but for now lets just lock for
the whole walk+create process.

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


diff -r 21c75c5ac5f4 -r b91ef972029d xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c	Tue Jun 26 16:23:58 2012 +0100
+++ b/xen/arch/arm/p2m.c	Tue Jun 26 16:23:58 2012 +0100
@@ -130,6 +130,8 @@ static int create_p2m_entries(struct dom
     paddr_t addr;
     unsigned long cur_first_offset = ~0, cur_second_offset = ~0;
 
+    spin_lock(&p2m->lock);
+
     /* XXX Don't actually handle 40 bit guest physical addresses */
     BUG_ON(start_gpaddr & 0x8000000000ULL);
     BUG_ON(end_gpaddr   & 0x8000000000ULL);
@@ -211,8 +213,6 @@ static int create_p2m_entries(struct dom
     rc = 0;
 
 out:
-    spin_lock(&p2m->lock);
-
     if (third) unmap_domain_page(third);
     if (second) unmap_domain_page(second);
     if (first) unmap_domain_page(first);

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

From xen-changelog-bounces@lists.xen.org Wed Jun 27 23:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 27 Jun 2012 23: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 1Sk1OD-0002QE-6s; Wed, 27 Jun 2012 23:11:13 +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 1Sk1OC-0002Q9-6a
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:12 +0000
Received: from [193.109.254.147:63730] by server-1.bemta-14.messagelabs.com id
	C0/E5-24612-F039BEF4; Wed, 27 Jun 2012 23:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1340838669!8902937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27779 invoked from network); 27 Jun 2012 23:11:10 -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 Jun 2012 23:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sk1O8-0005mC-H8
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sk1O7-00020E-SY
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:07 +0000
Message-Id: <E1Sk1O7-00020E-SY@xenbits.xen.org>
Date: Wed, 27 Jun 2012 23:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs/xen-headers: allow headers to
	be symlinks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340782603 -7200
# Node ID 4f92bdf3370c4fe5ed0f00cdeaf8156e4818ecb5
# Parent  c6c9d20963d7c5d8022a8cbe6bdaea359804f284
docs/xen-headers: allow headers to be symlinks

There's no apparent reason not to permit this, and since we don't
support out-of-source-tree builds, the least overhead way of doing
multiple, differently configured (perhaps different architecture)
builds from a single source tree is to create symlinked build trees.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c6c9d20963d7 -r 4f92bdf3370c docs/xen-headers
--- a/docs/xen-headers	Tue Jun 26 17:00:20 2012 +0100
+++ b/docs/xen-headers	Wed Jun 27 09:36:43 2012 +0200
@@ -368,7 +368,7 @@ foreach $pass (qw(1 2)) {
     find({ wanted => 
                sub {
                    return unless m/\.h$/;
-                   lstat $File::Find::name or die "$File::Find::name $!";
+                   stat $File::Find::name or die "$File::Find::name $!";
                    -f _ or die "$File::Find::name";
                    substr($File::Find::name, 0, 1+length $basedir) 
                        eq "$basedir/"

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

From xen-changelog-bounces@lists.xen.org Wed Jun 27 23:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 27 Jun 2012 23: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 1Sk1OD-0002QE-6s; Wed, 27 Jun 2012 23:11:13 +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 1Sk1OC-0002Q9-6a
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:12 +0000
Received: from [193.109.254.147:63730] by server-1.bemta-14.messagelabs.com id
	C0/E5-24612-F039BEF4; Wed, 27 Jun 2012 23:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1340838669!8902937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27779 invoked from network); 27 Jun 2012 23:11:10 -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 Jun 2012 23:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sk1O8-0005mC-H8
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Sk1O7-00020E-SY
	for xen-changelog@lists.xensource.com; Wed, 27 Jun 2012 23:11:07 +0000
Message-Id: <E1Sk1O7-00020E-SY@xenbits.xen.org>
Date: Wed, 27 Jun 2012 23:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs/xen-headers: allow headers to
	be symlinks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: 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 1340782603 -7200
# Node ID 4f92bdf3370c4fe5ed0f00cdeaf8156e4818ecb5
# Parent  c6c9d20963d7c5d8022a8cbe6bdaea359804f284
docs/xen-headers: allow headers to be symlinks

There's no apparent reason not to permit this, and since we don't
support out-of-source-tree builds, the least overhead way of doing
multiple, differently configured (perhaps different architecture)
builds from a single source tree is to create symlinked build trees.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c6c9d20963d7 -r 4f92bdf3370c docs/xen-headers
--- a/docs/xen-headers	Tue Jun 26 17:00:20 2012 +0100
+++ b/docs/xen-headers	Wed Jun 27 09:36:43 2012 +0200
@@ -368,7 +368,7 @@ foreach $pass (qw(1 2)) {
     find({ wanted => 
                sub {
                    return unless m/\.h$/;
-                   lstat $File::Find::name or die "$File::Find::name $!";
+                   stat $File::Find::name or die "$File::Find::name $!";
                    -f _ or die "$File::Find::name";
                    substr($File::Find::name, 0, 1+length $basedir) 
                        eq "$basedir/"

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

From xen-changelog-bounces@lists.xen.org Thu Jun 28 15:11:13 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 28 Jun 2012 15: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 1SkGND-0002Ds-0B; Thu, 28 Jun 2012 15:11:11 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkGNB-0002Db-IB
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:09 +0000
Received: from [85.158.143.35:47726] by server-2.bemta-4.messagelabs.com id
	90/52-17938-C047CEF4; Thu, 28 Jun 2012 15:11:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1340896263!7175743!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28956 invoked from network); 28 Jun 2012 15:11:05 -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 Jun 2012 15: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 1SkGN5-0001JF-8T
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkGN5-0001tP-0n
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:03 +0000
Date: Thu, 28 Jun 2012 15:11:03 +0000
Message-Id: <E1SkGN5-0001tP-0n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-traditional: disable
	msitranslate by default
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ce6d9b1b2f9c6a5ca2500e03d0ef8b453bc4bf53
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Thu Jun 28 15:44:50 2012 +0100

    qemu-traditional: disable msitranslate by default
    
    msitranslate is known to cause problems with some device drivers,
    because it sets the real device in MSI mode while making the guest think
    is actually in legacy interrupts mode. Some drivers are able to spot this
    inconsistency and break (Nvidia drivers for example).
    
    Disable the option by default.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 xenstore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index ac90366..8ab9ed4 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -427,7 +427,7 @@ uint32_t xenstore_read_target(void)
     return target_domid;
 }
 
-#define PT_PCI_MSITRANSLATE_DEFAULT 1
+#define PT_PCI_MSITRANSLATE_DEFAULT 0
 #define PT_PCI_POWER_MANAGEMENT_DEFAULT 0
 int direct_pci_msitranslate;
 int direct_pci_power_mgmt;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Jun 28 15:11:13 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 28 Jun 2012 15: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 1SkGND-0002Ds-0B; Thu, 28 Jun 2012 15:11:11 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkGNB-0002Db-IB
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:09 +0000
Received: from [85.158.143.35:47726] by server-2.bemta-4.messagelabs.com id
	90/52-17938-C047CEF4; Thu, 28 Jun 2012 15:11:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1340896263!7175743!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28956 invoked from network); 28 Jun 2012 15:11:05 -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 Jun 2012 15: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 1SkGN5-0001JF-8T
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkGN5-0001tP-0n
	for xen-changelog@lists.xensource.com; Thu, 28 Jun 2012 15:11:03 +0000
Date: Thu, 28 Jun 2012 15:11:03 +0000
Message-Id: <E1SkGN5-0001tP-0n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-traditional: disable
	msitranslate by default
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit ce6d9b1b2f9c6a5ca2500e03d0ef8b453bc4bf53
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Thu Jun 28 15:44:50 2012 +0100

    qemu-traditional: disable msitranslate by default
    
    msitranslate is known to cause problems with some device drivers,
    because it sets the real device in MSI mode while making the guest think
    is actually in legacy interrupts mode. Some drivers are able to spot this
    inconsistency and break (Nvidia drivers for example).
    
    Disable the option by default.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 xenstore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index ac90366..8ab9ed4 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -427,7 +427,7 @@ uint32_t xenstore_read_target(void)
     return target_domid;
 }
 
-#define PT_PCI_MSITRANSLATE_DEFAULT 1
+#define PT_PCI_MSITRANSLATE_DEFAULT 0
 #define PT_PCI_POWER_MANAGEMENT_DEFAULT 0
 int direct_pci_msitranslate;
 int direct_pci_power_mgmt;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 02:22:14 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQqW-0007UV-Qx; Fri, 29 Jun 2012 02: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 1SkQqV-0007UQ-Bx
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:07 +0000
Received: from [85.158.143.35:38448] by server-2.bemta-4.messagelabs.com id
	C5/9E-17938-E411DEF4; Fri, 29 Jun 2012 02:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340936525!16226032!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11085 invoked from network); 29 Jun 2012 02:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 02: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 1SkQqS-0001gk-Pj
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqS-0003yX-7M
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:04 +0000
Date: Fri, 29 Jun 2012 02:22:04 +0000
Message-Id: <E1SkQqS-0003yX-7M@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen,
	configure: detect Xen 4.2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f1cf76785270ebc9798c82ad5f7419129bde7e56
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Tue Apr 17 17:04:18 2012 +0000

    xen,configure: detect Xen 4.2
    
    Xen 4.2 is the first to support xc_hvm_inject_msi: use it to determine
    if we are running on it.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Anthony PERARD <anthony.perard@citrix.com>
---
 configure |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 85e80ca..9e0ea78 100755
--- a/configure
+++ b/configure
@@ -1327,6 +1327,31 @@ int main(void) {
   xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
   xc_gnttab_open(NULL, 0);
   xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
+  xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
+  return 0;
+}
+EOF
+      compile_prog "" "$xen_libs"
+    ) ; then
+    xen_ctrl_version=420
+    xen=yes
+
+  elif (
+      cat > $TMPC <<EOF
+#include <xenctrl.h>
+#include <xs.h>
+#include <stdint.h>
+#include <xen/hvm/hvm_info_table.h>
+#if !defined(HVM_MAX_VCPUS)
+# error HVM_MAX_VCPUS not defined
+#endif
+int main(void) {
+  xc_interface *xc;
+  xs_daemon_open();
+  xc = xc_interface_open(0, 0, 0);
+  xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
+  xc_gnttab_open(NULL, 0);
+  xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
   return 0;
 }
 EOF
--
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 Fri Jun 29 02:22:14 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQqW-0007UV-Qx; Fri, 29 Jun 2012 02: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 1SkQqV-0007UQ-Bx
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:07 +0000
Received: from [85.158.143.35:38448] by server-2.bemta-4.messagelabs.com id
	C5/9E-17938-E411DEF4; Fri, 29 Jun 2012 02:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1340936525!16226032!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11085 invoked from network); 29 Jun 2012 02:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 02: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 1SkQqS-0001gk-Pj
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqS-0003yX-7M
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:04 +0000
Date: Fri, 29 Jun 2012 02:22:04 +0000
Message-Id: <E1SkQqS-0003yX-7M@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen,
	configure: detect Xen 4.2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit f1cf76785270ebc9798c82ad5f7419129bde7e56
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Tue Apr 17 17:04:18 2012 +0000

    xen,configure: detect Xen 4.2
    
    Xen 4.2 is the first to support xc_hvm_inject_msi: use it to determine
    if we are running on it.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Anthony PERARD <anthony.perard@citrix.com>
---
 configure |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 85e80ca..9e0ea78 100755
--- a/configure
+++ b/configure
@@ -1327,6 +1327,31 @@ int main(void) {
   xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
   xc_gnttab_open(NULL, 0);
   xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
+  xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
+  return 0;
+}
+EOF
+      compile_prog "" "$xen_libs"
+    ) ; then
+    xen_ctrl_version=420
+    xen=yes
+
+  elif (
+      cat > $TMPC <<EOF
+#include <xenctrl.h>
+#include <xs.h>
+#include <stdint.h>
+#include <xen/hvm/hvm_info_table.h>
+#if !defined(HVM_MAX_VCPUS)
+# error HVM_MAX_VCPUS not defined
+#endif
+int main(void) {
+  xc_interface *xc;
+  xs_daemon_open();
+  xc = xc_interface_open(0, 0, 0);
+  xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
+  xc_gnttab_open(NULL, 0);
+  xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
   return 0;
 }
 EOF
--
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 Fri Jun 29 02:22:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SkQqh-0007VF-UH; Fri, 29 Jun 2012 02:22: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 1SkQqg-0007V4-Ed
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:18 +0000
Received: from [193.109.254.147:12332] by server-8.bemta-14.messagelabs.com id
	20/25-30743-9511DEF4; Fri, 29 Jun 2012 02:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1340936535!2309925!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28321 invoked from network); 29 Jun 2012 02:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 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 1SkQqd-0001gn-DE
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqc-0003yy-UF
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:15 +0000
Date: Fri, 29 Jun 2012 02:22:14 +0000
Message-Id: <E1SkQqc-0003yy-UF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen: Reorganize includes
	of Xen headers.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cb0a820440e55e2a5a3fc2c9a3798cc6c4b2abe0
Author: Anthony PERARD <anthony.perard@citrix.com>
Date:   Wed Jun 27 10:00:21 2012 +0000

    xen: Reorganize includes of Xen headers.
    
    Because xs.h will be remove in future release of Xen, this patch removes the
    extra includes of this headers.
    
    Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as there
    already are in xen_common.h.
    
    upstream-commit: b41f67197208e7b72ba2207473a74b89a821190a
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_backend.c |    6 ++----
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 5 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index 555da41..e1f44ce 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -31,15 +31,13 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/grant_table.h>
-
 #include "hw.h"
 #include "qemu-char.h"
 #include "qemu-log.h"
 #include "xen_backend.h"
 
+#include <xen/grant_table.h>
+
 /* ------------------------------------------------------------- */
 
 /* public */
diff --git a/hw/xen_console.c b/hw/xen_console.c
index 3794b19..9426d73 100644
--- a/hw/xen_console.c
+++ b/hw/xen_console.c
@@ -28,14 +28,13 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
-#include <xen/io/console.h>
-#include <xenctrl.h>
 
 #include "hw.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/console.h>
+
 struct buffer {
     uint8_t *data;
     size_t consumed;
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 88544b1..a402ac8 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -32,15 +32,11 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-
 #include "hw.h"
 #include "block_int.h"
 #include "qemu-char.h"
-#include "xen_blkif.h"
 #include "xen_backend.h"
+#include "xen_blkif.h"
 #include "blockdev.h"
 
 /* ------------------------------------------------------------- */
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index ef2a2d6..f41809e 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -32,11 +32,6 @@
 #include <sys/mman.h>
 #include <sys/wait.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/netif.h>
-
 #include "hw.h"
 #include "net.h"
 #include "net/checksum.h"
@@ -44,6 +39,8 @@
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/netif.h>
+
 /* ------------------------------------------------------------- */
 
 struct XenNetDev {
diff --git a/hw/xenfb.c b/hw/xenfb.c
index 1bcf171..338800a 100644
--- a/hw/xenfb.c
+++ b/hw/xenfb.c
@@ -35,19 +35,16 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/event_channel.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/fbif.h>
-#include <xen/io/kbdif.h>
-#include <xen/io/protocols.h>
-
 #include "hw.h"
 #include "console.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/event_channel.h>
+#include <xen/io/fbif.h>
+#include <xen/io/kbdif.h>
+#include <xen/io/protocols.h>
+
 #ifndef BTN_LEFT
 #define BTN_LEFT 0x110 /* from <linux/input.h> */
 #endif
--
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 Fri Jun 29 02:22:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SkQqh-0007VF-UH; Fri, 29 Jun 2012 02:22: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 1SkQqg-0007V4-Ed
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:18 +0000
Received: from [193.109.254.147:12332] by server-8.bemta-14.messagelabs.com id
	20/25-30743-9511DEF4; Fri, 29 Jun 2012 02:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1340936535!2309925!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28321 invoked from network); 29 Jun 2012 02:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 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 1SkQqd-0001gn-DE
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqc-0003yy-UF
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:15 +0000
Date: Fri, 29 Jun 2012 02:22:14 +0000
Message-Id: <E1SkQqc-0003yy-UF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xen: Reorganize includes
	of Xen headers.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit cb0a820440e55e2a5a3fc2c9a3798cc6c4b2abe0
Author: Anthony PERARD <anthony.perard@citrix.com>
Date:   Wed Jun 27 10:00:21 2012 +0000

    xen: Reorganize includes of Xen headers.
    
    Because xs.h will be remove in future release of Xen, this patch removes the
    extra includes of this headers.
    
    Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as there
    already are in xen_common.h.
    
    upstream-commit: b41f67197208e7b72ba2207473a74b89a821190a
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_backend.c |    6 ++----
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 5 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index 555da41..e1f44ce 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -31,15 +31,13 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/grant_table.h>
-
 #include "hw.h"
 #include "qemu-char.h"
 #include "qemu-log.h"
 #include "xen_backend.h"
 
+#include <xen/grant_table.h>
+
 /* ------------------------------------------------------------- */
 
 /* public */
diff --git a/hw/xen_console.c b/hw/xen_console.c
index 3794b19..9426d73 100644
--- a/hw/xen_console.c
+++ b/hw/xen_console.c
@@ -28,14 +28,13 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
-#include <xen/io/console.h>
-#include <xenctrl.h>
 
 #include "hw.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/console.h>
+
 struct buffer {
     uint8_t *data;
     size_t consumed;
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 88544b1..a402ac8 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -32,15 +32,11 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-
 #include "hw.h"
 #include "block_int.h"
 #include "qemu-char.h"
-#include "xen_blkif.h"
 #include "xen_backend.h"
+#include "xen_blkif.h"
 #include "blockdev.h"
 
 /* ------------------------------------------------------------- */
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index ef2a2d6..f41809e 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -32,11 +32,6 @@
 #include <sys/mman.h>
 #include <sys/wait.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/netif.h>
-
 #include "hw.h"
 #include "net.h"
 #include "net/checksum.h"
@@ -44,6 +39,8 @@
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/netif.h>
+
 /* ------------------------------------------------------------- */
 
 struct XenNetDev {
diff --git a/hw/xenfb.c b/hw/xenfb.c
index 1bcf171..338800a 100644
--- a/hw/xenfb.c
+++ b/hw/xenfb.c
@@ -35,19 +35,16 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/event_channel.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/fbif.h>
-#include <xen/io/kbdif.h>
-#include <xen/io/protocols.h>
-
 #include "hw.h"
 #include "console.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/event_channel.h>
+#include <xen/io/fbif.h>
+#include <xen/io/kbdif.h>
+#include <xen/io/protocols.h>
+
 #ifndef BTN_LEFT
 #define BTN_LEFT 0x110 /* from <linux/input.h> */
 #endif
--
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 Fri Jun 29 02:22:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQqs-0007WM-13; Fri, 29 Jun 2012 02:22: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 1SkQqq-0007WA-Kg
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:28 +0000
Received: from [85.158.138.51:55429] by server-9.bemta-3.messagelabs.com id
	BE/55-10419-3611DEF4; Fri, 29 Jun 2012 02:22:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340936546!30185018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23103 invoked from network); 29 Jun 2012 02:22:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 02:22: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 1SkQqo-0001gt-03
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqn-0003zR-Gv
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:25 +0000
Date: Fri, 29 Jun 2012 02:22:25 +0000
Message-Id: <E1SkQqn-0003zR-Gv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xenstore: Use <xenstore.h>
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c64d5b2a859d81aeccbf036655e9ba67bae095d6
Author: Anthony PERARD <anthony.perard@citrix.com>
Date:   Wed Jun 27 10:10:08 2012 +0000

    xenstore: Use <xenstore.h>
    
    In the next release of Xen (4.2), xs.h became deprecated.
    
    upstream-commit: e108a3c110506faf3ef43448be3e0d39ef0ead8f
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9e0ea78..2f6520c 100755
--- a/configure
+++ b/configure
@@ -1314,7 +1314,7 @@ if test "$xen" != "no" ; then
   # Xen unstable
   cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
diff --git a/hw/xen_common.h b/hw/xen_common.h
index bb5a12f..30f9140 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
--
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 Fri Jun 29 02:22:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQqs-0007WM-13; Fri, 29 Jun 2012 02:22: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 1SkQqq-0007WA-Kg
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:28 +0000
Received: from [85.158.138.51:55429] by server-9.bemta-3.messagelabs.com id
	BE/55-10419-3611DEF4; Fri, 29 Jun 2012 02:22:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-174.messagelabs.com!1340936546!30185018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23103 invoked from network); 29 Jun 2012 02:22:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 02:22: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 1SkQqo-0001gt-03
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqn-0003zR-Gv
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:25 +0000
Date: Fri, 29 Jun 2012 02:22:25 +0000
Message-Id: <E1SkQqn-0003zR-Gv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] xenstore: Use <xenstore.h>
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit c64d5b2a859d81aeccbf036655e9ba67bae095d6
Author: Anthony PERARD <anthony.perard@citrix.com>
Date:   Wed Jun 27 10:10:08 2012 +0000

    xenstore: Use <xenstore.h>
    
    In the next release of Xen (4.2), xs.h became deprecated.
    
    upstream-commit: e108a3c110506faf3ef43448be3e0d39ef0ead8f
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9e0ea78..2f6520c 100755
--- a/configure
+++ b/configure
@@ -1314,7 +1314,7 @@ if test "$xen" != "no" ; then
   # Xen unstable
   cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
diff --git a/hw/xen_common.h b/hw/xen_common.h
index bb5a12f..30f9140 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
--
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 Fri Jun 29 02:22:42 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQr2-0007Xw-47; Fri, 29 Jun 2012 02:22:40 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQr1-0007Xg-00
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:39 +0000
Received: from [85.158.143.35:7538] by server-1.bemta-4.messagelabs.com id
	3B/B9-24392-E611DEF4; Fri, 29 Jun 2012 02:22:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1340936556!18648017!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21138 invoked from network); 29 Jun 2012 02:22:37 -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;
	29 Jun 2012 02:22: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 1SkQqy-0001h2-FD
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqy-0003zs-3p
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:36 +0000
Date: Fri, 29 Jun 2012 02:22:36 +0000
Message-Id: <E1SkQqy-0003zs-3p@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix backport error
	introduced by f1cf76785270ebc9798c82ad5f7419129bde7e56
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dbaf62769e1bfa7636208a4f00ea2331f5c40685
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Wed Jun 27 12:49:50 2012 +0000

    Fix backport error introduced by f1cf76785270ebc9798c82ad5f7419129bde7e56
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 configure |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 2f6520c..ea2f8f8 100755
--- a/configure
+++ b/configure
@@ -1331,8 +1331,7 @@ int main(void) {
   return 0;
 }
 EOF
-      compile_prog "" "$xen_libs"
-    ) ; then
+  if compile_prog "" "$xen_libs" ; then
     xen_ctrl_version=420
     xen=yes
 
@@ -1355,7 +1354,8 @@ int main(void) {
   return 0;
 }
 EOF
-  if compile_prog "" "$xen_libs" ; then
+      compile_prog "" "$xen_libs"
+    ) ; then
     xen_ctrl_version=410
     xen=yes
 
--
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 Fri Jun 29 02:22:42 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 02:22: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 1SkQr2-0007Xw-47; Fri, 29 Jun 2012 02:22:40 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQr1-0007Xg-00
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:39 +0000
Received: from [85.158.143.35:7538] by server-1.bemta-4.messagelabs.com id
	3B/B9-24392-E611DEF4; Fri, 29 Jun 2012 02:22:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1340936556!18648017!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21138 invoked from network); 29 Jun 2012 02:22:37 -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;
	29 Jun 2012 02:22: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 1SkQqy-0001h2-FD
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkQqy-0003zs-3p
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 02:22:36 +0000
Date: Fri, 29 Jun 2012 02:22:36 +0000
Message-Id: <E1SkQqy-0003zs-3p@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-upstream-unstable] Fix backport error
	introduced by f1cf76785270ebc9798c82ad5f7419129bde7e56
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit dbaf62769e1bfa7636208a4f00ea2331f5c40685
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Wed Jun 27 12:49:50 2012 +0000

    Fix backport error introduced by f1cf76785270ebc9798c82ad5f7419129bde7e56
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 configure |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 2f6520c..ea2f8f8 100755
--- a/configure
+++ b/configure
@@ -1331,8 +1331,7 @@ int main(void) {
   return 0;
 }
 EOF
-      compile_prog "" "$xen_libs"
-    ) ; then
+  if compile_prog "" "$xen_libs" ; then
     xen_ctrl_version=420
     xen=yes
 
@@ -1355,7 +1354,8 @@ int main(void) {
   return 0;
 }
 EOF
-  if compile_prog "" "$xen_libs" ; then
+      compile_prog "" "$xen_libs"
+    ) ; then
     xen_ctrl_version=410
     xen=yes
 
--
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 Fri Jun 29 16:11:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16: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 1Skdmr-0000ZL-RB; Fri, 29 Jun 2012 16:11:13 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Skdmq-0000ZA-Ql
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1340986265!1579210!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19918 invoked from network); 29 Jun 2012 16:11:06 -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;
	29 Jun 2012 16:11: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 1Skdmj-0003PE-31
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Skdmi-0001mR-Bm
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:04 +0000
Date: Fri, 29 Jun 2012 16:11:04 +0000
Message-Id: <E1Skdmi-0001mR-Bm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] xendisk: properly update stats
	in ioreq_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 d36580ff7ef2041ae393c67dce7040409a7b6900
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 16:47:34 2012 +0100

    xendisk: properly update stats in ioreq_release()
    
    While for the "normal" case (called from blk_send_response_all())
    decrementing requests_finished is correct, doing so in the parse error
    case is wrong; requests_inflight needs to be decremented instead.
    
    upstream-commit: ed5477664369c1e9de23b0e7e8f16a418573bd2a
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/xen_disk.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 04a62e2..1a0ae19 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -151,7 +151,7 @@ static void ioreq_finish(struct ioreq *ioreq)
     blkdev->requests_finished++;
 }
 
-static void ioreq_release(struct ioreq *ioreq)
+static void ioreq_release(struct ioreq *ioreq, bool finish)
 {
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
@@ -159,7 +159,11 @@ static void ioreq_release(struct ioreq *ioreq)
     memset(ioreq, 0, sizeof(*ioreq));
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
-    blkdev->requests_finished--;
+    if (finish) {
+        blkdev->requests_finished--;
+    } else {
+        blkdev->requests_inflight--;
+    }
 }
 
 /*
@@ -487,7 +491,7 @@ static void blk_send_response_all(struct XenBlkDev *blkdev)
     while (!LIST_EMPTY(&blkdev->finished)) {
         ioreq = LIST_FIRST(&blkdev->finished);
 	send_notify += blk_send_response_one(ioreq);
-	ioreq_release(ioreq);
+        ioreq_release(ioreq, true);
     }
     if (send_notify)
 	xen_be_send_notify(&blkdev->xendev);
@@ -539,7 +543,7 @@ static void blk_handle_requests(struct XenBlkDev *blkdev)
         if (ioreq_parse(ioreq) != 0) {
             if (blk_send_response_one(ioreq))
                 xen_be_send_notify(&blkdev->xendev);
-            ioreq_release(ioreq);
+            ioreq_release(ioreq, false);
             continue;
         }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 16:11:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16: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 1Skdmr-0000ZL-RB; Fri, 29 Jun 2012 16:11:13 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Skdmq-0000ZA-Ql
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1340986265!1579210!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19918 invoked from network); 29 Jun 2012 16:11:06 -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;
	29 Jun 2012 16:11: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 1Skdmj-0003PE-31
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Skdmi-0001mR-Bm
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:11:04 +0000
Date: Fri, 29 Jun 2012 16:11:04 +0000
Message-Id: <E1Skdmi-0001mR-Bm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] xendisk: properly update stats
	in ioreq_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 d36580ff7ef2041ae393c67dce7040409a7b6900
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 16:47:34 2012 +0100

    xendisk: properly update stats in ioreq_release()
    
    While for the "normal" case (called from blk_send_response_all())
    decrementing requests_finished is correct, doing so in the parse error
    case is wrong; requests_inflight needs to be decremented instead.
    
    upstream-commit: ed5477664369c1e9de23b0e7e8f16a418573bd2a
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/xen_disk.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 04a62e2..1a0ae19 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -151,7 +151,7 @@ static void ioreq_finish(struct ioreq *ioreq)
     blkdev->requests_finished++;
 }
 
-static void ioreq_release(struct ioreq *ioreq)
+static void ioreq_release(struct ioreq *ioreq, bool finish)
 {
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
@@ -159,7 +159,11 @@ static void ioreq_release(struct ioreq *ioreq)
     memset(ioreq, 0, sizeof(*ioreq));
     ioreq->blkdev = blkdev;
     LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
-    blkdev->requests_finished--;
+    if (finish) {
+        blkdev->requests_finished--;
+    } else {
+        blkdev->requests_inflight--;
+    }
 }
 
 /*
@@ -487,7 +491,7 @@ static void blk_send_response_all(struct XenBlkDev *blkdev)
     while (!LIST_EMPTY(&blkdev->finished)) {
         ioreq = LIST_FIRST(&blkdev->finished);
 	send_notify += blk_send_response_one(ioreq);
-	ioreq_release(ioreq);
+        ioreq_release(ioreq, true);
     }
     if (send_notify)
 	xen_be_send_notify(&blkdev->xendev);
@@ -539,7 +543,7 @@ static void blk_handle_requests(struct XenBlkDev *blkdev)
         if (ioreq_parse(ioreq) != 0) {
             if (blk_send_response_one(ioreq))
                 xen_be_send_notify(&blkdev->xendev);
-            ioreq_release(ioreq);
+            ioreq_release(ioreq, false);
             continue;
         }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 16:22:12 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16:22: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 1SkdxR-0001AB-FX; Fri, 29 Jun 2012 16:22: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 1SkdxP-00019y-8F
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:07 +0000
Received: from [85.158.143.99:29679] by server-3.bemta-4.messagelabs.com id
	FB/C4-05808-E26DDEF4; Fri, 29 Jun 2012 16:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340986924!18232377!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14884 invoked from network); 29 Jun 2012 16:22:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 16: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 1SkdxM-0003Xe-J6
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkdxM-000269-2B
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:04 +0000
Date: Fri, 29 Jun 2012 16:22:04 +0000
Message-Id: <E1SkdxM-000269-2B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] xendisk: set maximum number of
	grants to be used
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 94a7bdc2e7797df2dab1c26216349f66e0f3490a
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 16:58:05 2012 +0100

    xendisk: set maximum number of grants to be used
    
    Legacy (non-pvops) gntdev drivers may require this to be done when the
    number of grants intended to be used simultaneously exceeds a certain
    driver specific default limit.
    
    upstream-commit: 64c27e5b1fdb6d94bdc0bda3b1869d7383a35c65
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_disk.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 1a0ae19..33a5531 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -570,6 +570,15 @@ static void blk_bh(void *opaque)
     blk_handle_requests(blkdev);
 }
 
+/*
+ * We need to account for the grant allocations requiring contiguous
+ * chunks; the worst case number would be
+ *     max_req * max_seg + (max_req - 1) * (max_seg - 1) + 1,
+ * but in order to keep things simple just use
+ *     2 * max_req * max_seg.
+ */
+#define MAX_GRANTS(max_req, max_seg) (2 * (max_req) * (max_seg))
+
 static void blk_alloc(struct XenDevice *xendev)
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -580,6 +589,11 @@ static void blk_alloc(struct XenDevice *xendev)
     blkdev->bh = qemu_bh_new(blk_bh, blkdev);
     if (xen_mode != XEN_EMULATE)
         batch_maps = 1;
+    if (xc_gnttab_set_max_grants(xendev->gnttabdev,
+            MAX_GRANTS(max_requests, BLKIF_MAX_SEGMENTS_PER_REQUEST)) < 0) {
+        xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants failed: %s\n",
+                      strerror(errno));
+    }
 }
 
 static int blk_init(struct XenDevice *xendev)
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 16:22:12 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16:22: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 1SkdxR-0001AB-FX; Fri, 29 Jun 2012 16:22: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 1SkdxP-00019y-8F
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:07 +0000
Received: from [85.158.143.99:29679] by server-3.bemta-4.messagelabs.com id
	FB/C4-05808-E26DDEF4; Fri, 29 Jun 2012 16:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-216.messagelabs.com!1340986924!18232377!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14884 invoked from network); 29 Jun 2012 16:22:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 16: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 1SkdxM-0003Xe-J6
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkdxM-000269-2B
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:04 +0000
Date: Fri, 29 Jun 2012 16:22:04 +0000
Message-Id: <E1SkdxM-000269-2B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] xendisk: set maximum number of
	grants to be used
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 94a7bdc2e7797df2dab1c26216349f66e0f3490a
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 16:58:05 2012 +0100

    xendisk: set maximum number of grants to be used
    
    Legacy (non-pvops) gntdev drivers may require this to be done when the
    number of grants intended to be used simultaneously exceeds a certain
    driver specific default limit.
    
    upstream-commit: 64c27e5b1fdb6d94bdc0bda3b1869d7383a35c65
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_disk.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 1a0ae19..33a5531 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -570,6 +570,15 @@ static void blk_bh(void *opaque)
     blk_handle_requests(blkdev);
 }
 
+/*
+ * We need to account for the grant allocations requiring contiguous
+ * chunks; the worst case number would be
+ *     max_req * max_seg + (max_req - 1) * (max_seg - 1) + 1,
+ * but in order to keep things simple just use
+ *     2 * max_req * max_seg.
+ */
+#define MAX_GRANTS(max_req, max_seg) (2 * (max_req) * (max_seg))
+
 static void blk_alloc(struct XenDevice *xendev)
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -580,6 +589,11 @@ static void blk_alloc(struct XenDevice *xendev)
     blkdev->bh = qemu_bh_new(blk_bh, blkdev);
     if (xen_mode != XEN_EMULATE)
         batch_maps = 1;
+    if (xc_gnttab_set_max_grants(xendev->gnttabdev,
+            MAX_GRANTS(max_requests, BLKIF_MAX_SEGMENTS_PER_REQUEST)) < 0) {
+        xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants failed: %s\n",
+                      strerror(errno));
+    }
 }
 
 static int blk_init(struct XenDevice *xendev)
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 16:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Skdxb-0001BE-Ib; Fri, 29 Jun 2012 16:22: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 1SkdxZ-0001B5-Pl
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:17 +0000
Received: from [85.158.143.99:39152] by server-3.bemta-4.messagelabs.com id
	E8/F4-05808-936DDEF4; Fri, 29 Jun 2012 16:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-216.messagelabs.com!1340986935!20052323!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23756 invoked from network); 29 Jun 2012 16:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 16: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 1SkdxX-0003Xi-95
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkdxW-00027T-Nv
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:14 +0000
Date: Fri, 29 Jun 2012 16:22:14 +0000
Message-Id: <E1SkdxW-00027T-Nv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] passthrough: fix off-by-one in
	PCI config space register index 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

commit fa2e8e3bc869c04d4a4d9b8f70c1cab7e53778d6
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 17:06:25 2012 +0100

    passthrough: fix off-by-one in PCI config space register index check
    
    Register 255 (0xff) is still valid to be accessed.
    
    Reported-by: Rolu <rolu@roce.org>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 hw/pass-through.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index 8581253..6e396e3 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevice *d, uint32_t address, uint32_t val,
 #endif
 
     /* check offset range */
-    if (address >= 0xFF)
+    if (address > 0xFF)
     {
         PT_LOG_DEV(d, "Error: Failed to write register with offset exceeding FFh. "
             "[Offset:%02xh][Length:%d]\n", address, len);
@@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDevice *d, uint32_t address, int len)
     int ret = 0;
 
     /* check offset range */
-    if (address >= 0xFF)
+    if (address > 0xFF)
     {
         PT_LOG_DEV(d, "Error: Failed to read register with offset exceeding FFh. "
             "[Offset:%02xh][Length:%d]\n", address, len);
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Jun 29 16:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 29 Jun 2012 16:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Skdxb-0001BE-Ib; Fri, 29 Jun 2012 16:22: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 1SkdxZ-0001B5-Pl
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:17 +0000
Received: from [85.158.143.99:39152] by server-3.bemta-4.messagelabs.com id
	E8/F4-05808-936DDEF4; Fri, 29 Jun 2012 16:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-216.messagelabs.com!1340986935!20052323!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Version: 6.5.10; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23756 invoked from network); 29 Jun 2012 16:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Jun 2012 16: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 1SkdxX-0003Xi-95
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SkdxW-00027T-Nv
	for xen-changelog@lists.xensource.com; Fri, 29 Jun 2012 16:22:14 +0000
Date: Fri, 29 Jun 2012 16:22:14 +0000
Message-Id: <E1SkdxW-00027T-Nv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] passthrough: fix off-by-one in
	PCI config space register index 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

commit fa2e8e3bc869c04d4a4d9b8f70c1cab7e53778d6
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 29 17:06:25 2012 +0100

    passthrough: fix off-by-one in PCI config space register index check
    
    Register 255 (0xff) is still valid to be accessed.
    
    Reported-by: Rolu <rolu@roce.org>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 hw/pass-through.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index 8581253..6e396e3 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevice *d, uint32_t address, uint32_t val,
 #endif
 
     /* check offset range */
-    if (address >= 0xFF)
+    if (address > 0xFF)
     {
         PT_LOG_DEV(d, "Error: Failed to write register with offset exceeding FFh. "
             "[Offset:%02xh][Length:%d]\n", address, len);
@@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDevice *d, uint32_t address, int len)
     int ret = 0;
 
     /* check offset range */
-    if (address >= 0xFF)
+    if (address > 0xFF)
     {
         PT_LOG_DEV(d, "Error: Failed to read register with offset exceeding FFh. "
             "[Offset:%02xh][Length:%d]\n", address, len);
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

