Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 2013 13:53:06 +0200
From:      =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
To:        "Eggert, Lars" <lars@netapp.com>
Cc:        "freebsd-xen@freebsd.org" <freebsd-xen@FreeBSD.org>
Subject:   Re: Xen 4.2 PV fails to boot -CURRENT PV domU
Message-ID:  <522DB6A2.5050205@citrix.com>
In-Reply-To: <455A20DD-3985-45EC-AC51-A3AFD33180F1@netapp.com>
References:  <455A20DD-3985-45EC-AC51-A3AFD33180F1@netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--------------020403000602090806070209
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

On 09/09/13 11:19, Eggert, Lars wrote:
> Hi,
> 
> I'm trying to run a recent-CURRENT XEN i386 kernel in a Xen 4.2 PV domU. 
> 
> I had to add the following options to the kernel config file in order to compile the XEN kernel:
> 
> makeoptions     WITHOUT_MODULES+="mlx4 mlx4ib mlxen mthca"
> 
> The resulting kernel compiles, but fails to boot. Attached is the log. Any ideas?

This is due to the unification of event channel implementations. I'm
attaching a patch that should fix the issue (at least when using only
one vcpu).

The i386 Xen PV port doesn't fill the data in struct pcpu, so we end up
with uninitialised values there which are required for the new event
channel implementation. Maybe someone with more knowledge of the Xen
i386 PV port can provide a better solution.

If you plan to use the i386 PV port you will also need to revert r244237
in order for it to work.

May I ask if there's anything that prevents you from switching to the
PVHVM port? I wouldn't recommend using the i386 PV port.

Roger.


--------------020403000602090806070209
Content-Type: text/plain; charset="UTF-8"; x-mac-type=0; x-mac-creator=0;
	name="0001-xen-set-acpi_id-for-i386-PV-port.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="0001-xen-set-acpi_id-for-i386-PV-port.patch"

>From 0429a1ba5bdbca844e9a798df13396e1ee11aae0 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <roger.pau@citrix.com>
Date: Mon, 9 Sep 2013 11:53:15 +0200
Subject: [PATCH] xen: set acpi_id for i386 PV port

Set a 'fake' acpi_id for the i386 PV port, it is needed in order to
use VIRQs or IPI event channels.
---
 sys/i386/xen/mp_machdep.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c
index 274598f..4e4c07d 100644
--- a/sys/i386/xen/mp_machdep.c
+++ b/sys/i386/xen/mp_machdep.c
@@ -251,6 +251,9 @@ cpu_add(u_int apic_id, char boot_cpu)
 	if (bootverbose)
 		printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" :
 		    "AP");
+
+	/* Set the ACPI id (it is needed by VCPU operations) */
+	pcpu_find(apic_id)->pc_acpi_id = apic_id;
 }
 
 void
-- 
1.7.7.5 (Apple Git-26)


--------------020403000602090806070209--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?522DB6A2.5050205>