From owner-freebsd-xen@FreeBSD.ORG Mon Dec 23 11:06:59 2013 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 457A968C for ; Mon, 23 Dec 2013 11:06:59 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 314CC11E7 for ; Mon, 23 Dec 2013 11:06:59 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNB6xL8030227 for ; Mon, 23 Dec 2013 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rBNB6wX0030225 for freebsd-xen@FreeBSD.org; Mon, 23 Dec 2013 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 23 Dec 2013 11:06:58 GMT Message-Id: <201312231106.rBNB6wX0030225@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-xen@FreeBSD.org Subject: Current problem reports assigned to freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 11:06:59 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/183139 xen [xen] [patch] ifconfig options on xn0 lost after xen v o kern/180788 xen [xen] [panic] XEN PV kernel 9.2-BETA1 panics on boot o kern/180403 xen [xen] Problems with GENERIC and XENHVM kernels with Xe o kern/180402 xen [xen] XEN kernel does not load in XenClient 4.5.5 o kern/179814 xen [xen] mountroot fails with error=19 under Xen on 9-STA o kern/176471 xen [xen] xn driver crash on detach o kern/176053 xen [xen] [patch] i386: Correct wrong usage of vsnprintf() o kern/175954 xen [xen] XENHVM xn network driver extreme packet loss dur o kern/175822 xen [xen] FreeBSD 9.1 does not work with Xen 4.0 o kern/175757 xen [xen] [patch] xen pvhvm looses keyboard input from VNC o kern/171873 xen [xen] xn network device floods warning in dmesg o kern/171118 xen [xen] FreeBSD XENHVM guest doesn't shutdown cleanly o kern/166174 xen [xen] Problems ROOT MOUNT ERROR o kern/165418 xen [xen] Problems mounting root filesystem from XENHVM o kern/164630 xen [xen] XEN HVM kernel: run_interrupt_driven_hooks: stil o kern/164450 xen [xen] Failed to install FreeeBSD 9.0-RELEASE from CD i o kern/162677 xen [xen] FreeBSD not compatible with "Current Stable Xen" o kern/161318 xen [xen] sysinstall crashes with floating point exception o kern/155468 xen [xen] Xen PV i386 multi-kernel CPU system is not worki o kern/155353 xen [xen] [patch] put "nudging TOD" message under boot_ver o kern/154833 xen [xen]: xen 4.0 - DomU freebsd8.2RC3 i386, XEN kernel. o kern/154473 xen [xen] xen 4.0 - DomU freebsd8.1 i386, XEN kernel. Not o kern/154472 xen [xen] xen 4.0 - DomU freebsd8.1 i386 xen kernel reboot o kern/154428 xen [xen] xn0 network interface and PF - Massive performan o kern/153674 xen [xen] i386/XEN idle thread shows wrong percentages o kern/153672 xen [xen] [panic] i386/XEN panics under heavy fork load o kern/153620 xen [xen] Xen guest system clock drifts in AWS EC2 (FreeBS o kern/153477 xen [xen] XEN pmap code abuses vm page queue lock o kern/153150 xen [xen] xen/ec2: disable checksum offloading on interfac o kern/152228 xen [xen] [panic] Xen/PV panic with machdep.idle_mwait=1 o kern/144629 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143398 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143340 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor f kern/143069 xen [xen] [panic] Xen Kernel Panic - Memory modified after f kern/135667 xen ufs filesystem corruption on XEN DomU system f kern/135421 xen [xen] FreeBSD Xen PVM DomU network failure - netfronc. f kern/135178 xen [xen] Xen domU outgoing data transfer stall when TSO i p kern/135069 xen [xen] FreeBSD-current/Xen SMP doesn't function at all f i386/124516 xen [xen] FreeBSD-CURRENT Xen Kernel Segfaults when config o kern/118734 xen [xen] FreeBSD 6.3-RC1 and FreeBSD 7.0-BETA 4 fail to b 40 problems total. From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:38 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E083EA; Tue, 24 Dec 2013 11:22:38 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CCA71670; Tue, 24 Dec 2013 11:22:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481875" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:27 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:26 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4A-0007qS-Uf; Tue, 24 Dec 2013 11:22:27 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 01/13] xen: use the hardware e820 map on Dom0 Date: Tue, 24 Dec 2013 12:20:50 +0100 Message-ID: <1387884062-41154-2-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:38 -0000 We need to do some tweaking of the hardware e820 map, since the memory layout provided by Xen and the e820 map doesn't match. This consists in clamping the e820 map so that regions above max_pfn are marked as unusuable. --- sys/x86/xen/pv.c | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 4f7415e..ab4afba 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -297,17 +297,48 @@ static void xen_pv_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) { struct xen_memory_map memmap; + unsigned long max_pfn = HYPERVISOR_start_info->nr_pages; + u_int64_t mem_end = ptoa(max_pfn); u_int32_t size; - int rc; + int rc, mem_op, i; /* Fetch the E820 map from Xen */ memmap.nr_entries = MAX_E820_ENTRIES; set_xen_guest_handle(memmap.buffer, xen_smap); - rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); + mem_op = xen_initial_domain() ? + XENMEM_machine_memory_map : + XENMEM_memory_map; + rc = HYPERVISOR_memory_op(mem_op, &memmap); if (rc) panic("unable to fetch Xen E820 memory map"); size = memmap.nr_entries * sizeof(xen_smap[0]); + /* + * This should be improved, Xen provides us with a single + * chunk of physical memory that goes from 0 to max_pfn, + * and what we do here is clamp the HW memory map to make + * sure regions above max_pfn are marked as reserved. + * + * TRTTD would be to move the memory not used because of + * the holes in the HW memory map to the now clamped regions + * using XENMEM_{decrease/increase}_reservation. + */ + for (i = 0; i < memmap.nr_entries; i++) { + u_int64_t end = xen_smap[i].base + xen_smap[i].length; + if (xen_smap[i].type == SMAP_TYPE_MEMORY) { + if (xen_smap[i].base > mem_end) { + /* Mark as reserved */ + xen_smap[i].type = SMAP_TYPE_RESERVED; + continue; + } + if (end > mem_end) { + /* Truncate region */ + xen_smap[i].length -= end - mem_end; + } + } + } + + bios_add_smap_entries(xen_smap, size, physmap, physmap_idx); } -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:41 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C82D3FC; Tue, 24 Dec 2013 11:22:41 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 130D01678; Tue, 24 Dec 2013 11:22:39 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481879" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:28 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:27 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4C-0007qS-0T; Tue, 24 Dec 2013 11:22:28 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 03/13] xen: mask event channels while changing affinity Date: Tue, 24 Dec 2013 12:20:52 +0100 Message-ID: <1387884062-41154-4-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:41 -0000 Event channels should be masked while chaning affinity, or else we might get spurious/lost interrupts. --- sys/x86/xen/xen_intr.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index fd36e68..bc0781e 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -797,7 +797,7 @@ xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id) struct evtchn_bind_vcpu bind_vcpu; struct xenisrc *isrc; u_int to_cpu, vcpu_id; - int error; + int error, masked; #ifdef XENHVM if (xen_vector_callback_enabled == 0) @@ -815,6 +815,12 @@ xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id) return (EINVAL); } + /* + * Mask the event channel port so we don't receive spurious events + * while changing affinity. + */ + masked = evtchn_test_and_set_mask(isrc->xi_port); + if ((isrc->xi_type == EVTCHN_TYPE_VIRQ) || (isrc->xi_type == EVTCHN_TYPE_IPI)) { /* @@ -825,8 +831,7 @@ xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id) evtchn_cpu_mask_port(isrc->xi_cpu, isrc->xi_port); isrc->xi_cpu = to_cpu; evtchn_cpu_unmask_port(isrc->xi_cpu, isrc->xi_port); - mtx_unlock(&xen_intr_isrc_lock); - return (0); + goto out; } bind_vcpu.port = isrc->xi_port; @@ -848,6 +853,10 @@ xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id) evtchn_cpu_mask_port(to_cpu, isrc->xi_port); } } + +out: + if (!masked) + evtchn_unmask_port(isrc->xi_port); mtx_unlock(&xen_intr_isrc_lock); return (0); #else -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:44 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FE13410; Tue, 24 Dec 2013 11:22:44 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CD62A167C; Tue, 24 Dec 2013 11:22:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481881" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:30 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:29 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4E-0007qS-3a; Tue, 24 Dec 2013 11:22:30 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 07/13] xen: implement IO APIC support in Xen mptable parser Date: Tue, 24 Dec 2013 12:20:56 +0100 Message-ID: <1387884062-41154-8-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:44 -0000 Use madt_setup_io (from madt.c) on Xen apic_enumerator, in order to parse the interrupt sources from the IO APIC. I would like to get opinions, but I think we should rename and move madt_setup_io to io_apic.c. --- sys/amd64/include/apicvar.h | 1 + sys/i386/include/apicvar.h | 1 + sys/x86/acpica/madt.c | 5 ++--- sys/x86/xen/mptable.c | 24 +++++++++++++++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/sys/amd64/include/apicvar.h b/sys/amd64/include/apicvar.h index a48a76b..3974067 100644 --- a/sys/amd64/include/apicvar.h +++ b/sys/amd64/include/apicvar.h @@ -233,6 +233,7 @@ int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, void lapic_set_tpr(u_int vector); void lapic_setup(int boot); void xen_intr_handle_upcall(struct trapframe *frame); +int madt_setup_io(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ diff --git a/sys/i386/include/apicvar.h b/sys/i386/include/apicvar.h index c8ee9bc..05ec013 100644 --- a/sys/i386/include/apicvar.h +++ b/sys/i386/include/apicvar.h @@ -232,6 +232,7 @@ int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, void lapic_set_tpr(u_int vector); void lapic_setup(int boot); void xen_intr_handle_upcall(struct trapframe *frame); +int madt_setup_io(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 5929fde..6f3b591 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -61,7 +61,7 @@ static struct lapic_info { } lapics[MAX_APIC_ID + 1]; static int madt_found_sci_override; -static ACPI_TABLE_MADT *madt; +ACPI_TABLE_MADT *madt; static vm_paddr_t madt_physaddr; static vm_offset_t madt_length; @@ -84,7 +84,6 @@ static void madt_probe_cpus_handler(ACPI_SUBTABLE_HEADER *entry, void *arg __unused); static void madt_register(void *dummy); static int madt_setup_local(void); -static int madt_setup_io(void); static void madt_walk_table(acpi_subtable_handler *handler, void *arg); static struct apic_enumerator madt_enumerator = { @@ -147,7 +146,7 @@ madt_setup_local(void) /* * Enumerate I/O APICs and setup interrupt sources. */ -static int +int madt_setup_io(void) { void *ioapic; diff --git a/sys/x86/xen/mptable.c b/sys/x86/xen/mptable.c index 0384886..46b03f3 100644 --- a/sys/x86/xen/mptable.c +++ b/sys/x86/xen/mptable.c @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include @@ -51,6 +54,9 @@ __FBSDID("$FreeBSD$"); #include +/* From madt.c */ +extern ACPI_TABLE_MADT *madt; + static int xenpv_probe(void); static int xenpv_probe_cpus(void); static int xenpv_setup_local(void); @@ -107,7 +113,23 @@ xenpv_setup_local(void) static int xenpv_setup_io(void) { - return (0); + vm_paddr_t madt_physaddr; + vm_offset_t madt_length; + + if (!xen_initial_domain()) + return (0); + + madt_physaddr = acpi_find_table(ACPI_SIG_MADT); + if (madt_physaddr == 0) + panic("could not find MADT table"); + madt = acpi_map_table(madt_physaddr, ACPI_SIG_MADT); + if (madt == NULL) + panic("unable to map MADT"); + madt_length = madt->Header.Length; + acpi_unmap_table(madt); + madt = pmap_mapbios(madt_physaddr, madt_length); + + return (madt_setup_io()); } static void -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:42 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7191A408; Tue, 24 Dec 2013 11:22:42 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82F791673; Tue, 24 Dec 2013 11:22:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481876" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:27 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:26 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4A-0007qS-6z; Tue, 24 Dec 2013 11:22:26 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 00/13] xen: initial PVH Dom0 support Date: Tue, 24 Dec 2013 12:20:49 +0100 Message-ID: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:42 -0000 This patch series implement initial Dom0 support for FreeBSD when running under PVH mode. This series only sets the bases so that FreeBSD can boot as Dom0, it will NOT allow you to create guests or do anything fancy with it. Having that said, the series implement basic support for routing physical interrupts through event channels, methods for interacting with the IO APIC under Xen, support for PCI devices and some miscellaneous changes needed in order to boot as Dom0 (see specific patches). In order to test this, and since FreeBSD bootloader doesn't support multiboot yet, I've been botting using pxelinux, the line looks like: label freebsd KERNEL mboot.c32 APPEND xen/xen_pvh.gz dom0_max_vcpus=6 sync_console=true noreboot=true dom0pvh=1 dom0_mem=1024M com1=115200,8n1 guest_loglvl=all loglvl=all console=com1 --- freebsd/kernel boot_verbose=1,hw.pci.enable_msix=0,hw.pci.enable_msi=0,vfs.root.mountfrom=ufs:/dev/ada0s4a Note that MSI and MSI-X are disabled, this is due to the fact that I have not yet implemented support for it when running under Xen. Xen PVH Dom0 support has not yet been committed to the Xen repository, so in order to try it the following Xen tree has to be used: git://oss.oracle.com/git/mrathor/xen.git branch: dom0pvh-v7 https://oss.oracle.com/git/?p=mrathor/xen.git;a=shortlog;h=dom0pvh-v7 Plus the patch found at: http://marc.info/?l=xen-devel&m=138695509703563 As usual, I've created a git branch with the patches, which can be found at: git://xenbits.xen.org/people/royger/freebsd.git branch: pvhdom0_v1 http://xenbits.xen.org/gitweb/?p=people/royger/freebsd.git;a=shortlog;h=refs/heads/pvhdom0_v1 Here is the full dmesg of my system booting: PXELINUX 4.02 debian-20101014 Copyright (C) 1994-2010 H. Peter Anvin et al boot: Loading xen/xen_pvh.gz... ok Loading freebsd/kernel... ok Xen 4.4-unstable (XEN) Xen version 4.4-unstable (root@) (FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610) debug=y Thu Dec 19 18:08:48 CET 2013 (XEN) Latest ChangeSet: Tue Dec 17 12:51:27 2013 +0100 git:5d0f3f2 (XEN) Console output is synchronous. (XEN) Bootloader: PXELINUX 4.02 debian-20101014 (XEN) Command line: dom0_max_vcpus=6 sync_console=true noreboot=true dom0pvh=1 dom0_mem=1024M com1=115200,8n1 guest_loglvl=all loglvl=all console=com1 (XEN) Video information: (XEN) VGA is text mode 80x25, font 8x16 (XEN) VBE/DDC methods: V2; EDID transfer time: 1 seconds (XEN) EDID info not retrieved because of reasons unknown (XEN) Disc information: (XEN) Found 2 MBR signatures (XEN) Found 2 EDD information structures (XEN) Xen-e820 RAM map: (XEN) 0000000000000000 - 0000000000092400 (usable) (XEN) 00000000000f0000 - 0000000000100000 (reserved) (XEN) 0000000000100000 - 00000000dfdf9c00 (usable) (XEN) 00000000dfdf9c00 - 00000000dfe4bc00 (ACPI NVS) (XEN) 00000000dfe4bc00 - 00000000dfe4dc00 (ACPI data) (XEN) 00000000dfe4dc00 - 00000000e0000000 (reserved) (XEN) 00000000f8000000 - 00000000fd000000 (reserved) (XEN) 00000000fe000000 - 00000000fed00400 (reserved) (XEN) 00000000fee00000 - 00000000fef00000 (reserved) (XEN) 00000000ffb00000 - 0000000100000000 (reserved) (XEN) 0000000100000000 - 00000001a0000000 (usable) (XEN) ACPI: RSDP 000FEC30, 0024 (r2 DELL ) (XEN) ACPI: XSDT 000FCCC7, 007C (r1 DELL B10K 15 ASL 61) (XEN) ACPI: FACP 000FCDB7, 00F4 (r3 DELL B10K 15 ASL 61) (XEN) ACPI: DSDT FFE9E951, 4A74 (r1 DELL dt_ex 1000 INTL 20050624) (XEN) ACPI: FACS DFDF9C00, 0040 (XEN) ACPI: SSDT FFEA34D6, 009C (r1 DELL st_ex 1000 INTL 20050624) (XEN) ACPI: APIC 000FCEAB, 015E (r1 DELL B10K 15 ASL 61) (XEN) ACPI: BOOT 000FD009, 0028 (r1 DELL B10K 15 ASL 61) (XEN) ACPI: ASF! 000FD031, 0096 (r32 DELL B10K 15 ASL 61) (XEN) ACPI: MCFG 000FD0C7, 003C (r1 DELL B10K 15 ASL 61) (XEN) ACPI: HPET 000FD103, 0038 (r1 DELL B10K 15 ASL 61) (XEN) ACPI: TCPA 000FD35F, 0032 (r1 DELL B10K 15 ASL 61) (XEN) ACPI: DMAR 000FD391, 00C8 (r1 DELL B10K 15 ASL 61) (XEN) ACPI: SLIC 000FD13B, 0176 (r1 DELL B10K 15 ASL 61) (XEN) ACPI: SSDT DFE4DC00, 15C4 (r1 INTEL PPM RCM 80000001 INTL 20061109) (XEN) System RAM: 6141MB (6288940kB) (XEN) No NUMA configuration found (XEN) Faking a node at 0000000000000000-00000001a0000000 (XEN) Domain heap initialised (XEN) DMI 2.5 present. (XEN) Using APIC driver default (XEN) ACPI: PM-Timer IO Port: 0x808 (XEN) ACPI: SLEEP INFO: pm1x_cnt[804,0], pm1x_evt[800,0] (XEN) ACPI: wakeup_vec[dfdf9c0c], vec_size[20] (XEN) ACPI: Local APIC address 0xfee00000 (XEN) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) (XEN) Processor #0 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled) (XEN) Processor #2 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x03] lapic_id[0x04] enabled) (XEN) Processor #4 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x04] lapic_id[0x06] enabled) (XEN) Processor #6 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x05] lapic_id[0x01] enabled) (XEN) Processor #1 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x06] lapic_id[0x03] enabled) (XEN) Processor #3 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x07] lapic_id[0x05] enabled) (XEN) Processor #5 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x08] lapic_id[0x07] enabled) (XEN) Processor #7 7:10 APIC version 21 (XEN) ACPI: LAPIC (acpi_id[0x09] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0a] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0b] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0c] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0d] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0e] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x0f] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x10] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x11] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x12] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x13] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x14] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x15] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x16] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x17] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x18] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x19] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1a] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1b] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1c] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1d] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1e] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x1f] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC (acpi_id[0x20] lapic_id[0x00] disabled) (XEN) ACPI: LAPIC_NMI (acpi_id[0xff] high level lint[0x1]) (XEN) ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0]) (XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23 (XEN) ACPI: IOAPIC (id[0x09] address[0xfec80000] gsi_base[24]) (XEN) IOAPIC[1]: apic_id 9, version 32, address 0xfec80000, GSI 24-47 (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) (XEN) ACPI: IRQ0 used by override. (XEN) ACPI: IRQ2 used by override. (XEN) ACPI: IRQ9 used by override. (XEN) Enabling APIC mode: Flat. Using 2 I/O APICs (XEN) ACPI: HPET id: 0x8086a301 base: 0xfed00000 (XEN) ERST table was not found (XEN) Using ACPI (MADT) for SMP configuration information (XEN) SMP: Allowing 32 CPUs (24 hotplug CPUs) (XEN) IRQ limits: 48 GSI, 1504 MSI/MSI-X (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) Detected 3066.827 MHz processor. (XEN) Initing memory sharing. (XEN) mce_intel.c:717: MCA Capability: BCAST 1 SER 0 CMCI 1 firstbank 0 extended MCE MSR 0 (XEN) Intel machine check reporting enabled (XEN) PCI: MCFG configuration 0: base f8000000 segment 0000 buses 00 - 3f (XEN) PCI: MCFG area at f8000000 reserved in E820 (XEN) PCI: Using MCFG for segment 0000 bus 00-3f (XEN) Intel VT-d iommu 0 supported page sizes: 4kB. (XEN) Intel VT-d Snoop Control enabled. (XEN) Intel VT-d Dom0 DMA Passthrough not enabled. (XEN) Intel VT-d Queued Invalidation enabled. (XEN) Intel VT-d Interrupt Remapping enabled. (XEN) Intel VT-d Shared EPT tables not enabled. (XEN) I/O virtualisation enabled (XEN) - Dom0 mode: Relaxed (XEN) Interrupt remapping enabled (XEN) ENABLING IO-APIC IRQs (XEN) -> Using new ACK method (XEN) ..TIMER: vector=0xF0 apic1=0 pin1=2 apic2=-1 pin2=-1 (XEN) Platform timer is 14.318MHz HPET (XEN) Allocated console ring of 64 KiB. (XEN) mwait-idle: MWAIT substates: 0x1120 (XEN) mwait-idle: v0.4 model 0x1a (XEN) mwait-idle: lapic_timer_reliable_states 0x2 (XEN) HPET: 0 timers usable for broadcast (4 total) (XEN) VMX: Supported advanced features: (XEN) - APIC MMIO access virtualisation (XEN) - APIC TPR shadow (XEN) - Extended Page Tables (EPT) (XEN) - Virtual-Processor Identifiers (VPID) (XEN) - Virtual NMI (XEN) - MSR direct-access bitmap (XEN) HVM: ASIDs enabled. (XEN) HVM: VMX enabled (XEN) HVM: Hardware Assisted Paging (HAP) detected (XEN) HVM: HAP page sizes: 4kB, 2MB (XEN) Brought up 8 CPUs (XEN) ACPI sleep modes: S3 (XEN) mcheck_poll: Machine check polling timer started. (XEN) *** LOADING DOMAIN 0 *** (XEN) elf_parse_binary: phdr: paddr=0xffffffff80200000 memsz=0xf4b998 (XEN) elf_parse_binary: phdr: paddr=0xffffffff8134c000 memsz=0x43cc48 (XEN) elf_parse_binary: memory: 0xffffffff80200000 -> 0xffffffff81788c48 (XEN) elf_xen_parse_note: GUEST_OS = "FreeBSD" (XEN) elf_xen_parse_note: GUEST_VERSION = "HEAD" (XEN) elf_xen_parse_note: XEN_VERSION = "xen-3.0" (XEN) elf_xen_parse_note: VIRT_BASE = 0xffffffff80000000 (XEN) elf_xen_parse_note: PADDR_OFFSET = 0xffffffff80000000 (XEN) elf_xen_parse_note: ENTRY = 0xffffffff80ca7000 (XEN) elf_xen_parse_note: HYPERCALL_PAGE = 0xffffffff80ca6000 (XEN) elf_xen_parse_note: HV_START_LOW = 0xffff800000000000 (XEN) elf_xen_parse_note: FEATURES = "writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector" (XEN) elf_xen_parse_note: PAE_MODE = "yes" (XEN) elf_xen_parse_note: unknown xen elf note (0xd) (XEN) elf_xen_parse_note: LOADER = "generic" (XEN) elf_xen_parse_note: SUSPEND_CANCEL = 0x0 (XEN) elf_xen_parse_note: BSD_SYMTAB = "yes" (XEN) elf_xen_parse: using notes from SHT_NOTE section (XEN) elf_xen_addr_calc_check: addresses: (XEN) virt_base = 0xffffffff80000000 (XEN) elf_paddr_offset = 0xffffffff80000000 (XEN) virt_offset = 0x0 (XEN) virt_kstart = 0xffffffff80200000 (XEN) virt_kend = 0xffffffff81a7e4f8 (XEN) virt_entry = 0xffffffff80ca7000 (XEN) p2m_base = 0xffffffffffffffff (XEN) Xen kernel: 64-bit, lsb, compat32 (XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0xffffffff80200000 -> 0xffffffff81788c48 (XEN) Dom0 symbol map 0xffffffff81788c48 -> 0xffffffff81a7e4f8 (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 0000000198000000->000000019a000000 (253952 pages to be allocated) (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: ffffffff80200000->ffffffff81a7e4f8 (XEN) Init. ramdisk: ffffffff81a7f000->ffffffff81a7f000 (XEN) Phys-Mach map: ffffffff81a7f000->ffffffff81c7f000 (XEN) Start info: ffffffff81c7f000->ffffffff81c804b4 (XEN) Page tables: ffffffff81c81000->ffffffff81c94000 (XEN) Boot stack: ffffffff81c94000->ffffffff81c95000 (XEN) TOTAL: ffffffff80000000->ffffffff82000000 (XEN) ENTRY ADDRESS: ffffffff80ca7000 (XEN) Dom0 has maximum 6 VCPUs (XEN) elf_load_binary: phdr 2 at 0xffffffff80200000 -> 0xffffffff8114b998 (XEN) elf_load_binary: phdr 3 at 0xffffffff8134c000 -> 0xffffffff81468fb0 (XEN) elf_load_bsdsyms: shdr 4 at 0xffff83019ecb9378 -> 0xffffffff81789790 (XEN) elf_load_bsdsyms: shdr 41 at 0xffff83019fd5be0f -> 0xffffffff817dbb18 (XEN) elf_load_bsdsyms: shdr 42 at 0xffff83019fd5cb50 -> 0xffffffff817dbd58 (XEN) elf_load_bsdsyms: shdr 43 at 0xffff83019fea0c28 -> 0xffffffff8191fe30 (XEN) Scrubbing Free RAM: ..................................................done. (XEN) Initial low memory virq threshold set at 0x4000 pages. (XEN) Std. Loglevel: All (XEN) Guest Loglevel: All (XEN) ********************************************** (XEN) ******* WARNING: CONSOLE OUTPUT IS SYNCHRONOUS (XEN) ******* This option is intended to aid debugging of Xen by ensuring (XEN) ******* that all output is synchronously delivered on the serial line. (XEN) ******* However it can introduce SIGNIFICANT latencies and affect (XEN) ******* timekeeping. It is NOT recommended for production use! (XEN) ********************************************** (XEN) 3... 2... 1... (XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 240kB init memory. FreeBSD PVH running on xen-3.0-x86_64p GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb SMAP type=01 base=0000000000000000 len=0000000000092400 SMAP type=02 base=00000000000f0000 len=0000000000010000 SMAP type=01 base=0000000000100000 len=000000003ff00000 SMAP type=04 base=00000000dfdf9c00 len=0000000000052000 SMAP type=03 base=00000000dfe4bc00 len=0000000000002000 SMAP type=02 base=00000000dfe4dc00 len=00000000001b2400 SMAP type=02 base=00000000f8000000 len=0000000005000000 SMAP type=02 base=00000000fe000000 len=0000000000d00400 SMAP type=02 base=00000000fee00000 len=0000000000100000 SMAP type=02 base=00000000ffb00000 len=0000000000500000 SMAP type=02 base=0000000100000000 len=00000000a0000000 Table 'FACP' at 0xfcdb7 Table 'SSDT' at 0xffea34d6 Table 'APIC' at 0xfceab APIC: Found table at 0xfceab APIC: Using the Xen PV enumerator. SMP: Added CPU 0 (BSP) SMP: Added CPU 2 (AP) SMP: Added CPU 4 (AP) SMP: Added CPU 6 (AP) SMP: Added CPU 8 (AP) SMP: Added CPU 10 (AP) Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #221 d73d160(pvh_dom0): Tue Dec 24 10:58:43 CET 2013 root@odin:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 WARNING: WITNESS option enabled, expect reduced performance. (XEN) irq.c:375: Dom0 callback via changed to Direct Vector 0x93 CPU: Intel(R) Xeon(R) CPU W3550 @ 3.07GHz (K8-class CPU) Origin = "GenuineIntel" Id = 0x106a5 Family = 0x6 Model = 0x1a Stepping = 5 Features=0x1fc9cbf5 Features2=0x80982281 AMD Features=0x20100800 AMD Features2=0x1 real memory = 1073741824 (1024 MB) Physical memory chunk(s): 0x0000000000010000 - 0x0000000000091fff, 532480 bytes (130 pages) 0x0000000000100000 - 0x00000000001fffff, 1048576 bytes (256 pages) 0x0000000001cc1000 - 0x000000003e598fff, 1015906304 bytes (248024 pages) avail memory = 1007063040 (960 MB) INTR: Adding local APIC 2 as a target INTR: Adding local APIC 4 as a target INTR: Adding local APIC 6 as a target INTR: Adding local APIC 8 as a target INTR: Adding local APIC 10 as a target FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs FreeBSD/SMP: 1 package(s) x 6 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 2 cpu2 (AP): APIC ID: 4 cpu3 (AP): APIC ID: 6 cpu4 (AP): APIC ID: 8 cpu5 (AP): APIC ID: 10 x86bios: IVT 0x000000-0x0004ff at 0xfffff80000000000 x86bios: SSEG 0x090000-0x090fff at 0xfffffe004e454000 x86bios: ROM 0x0a0000-0x0fefff at 0xfffff800000a0000 random device not loaded; using insecure entropy ULE: setup cpu 0 ULE: setup cpu 1 ULE: setup cpu 2 ULE: setup cpu 3 ULE: setup cpu 4 ULE: setup cpu 5 Xen interrupt system initialized Table 'FACP' at 0xfcdb7 Table 'SSDT' at 0xffea34d6 Table 'APIC' at 0xfceab APIC: Found table at 0xfceab ACPI: RSDP 0xfec30 00024 (v02 DELL ) ACPI: XSDT 0xfccc7 0007C (v01 DELL B10K 00000015 ASL 00000061) ACPI: FACP 0xfcdb7 000F4 (v03 DELL B10K 00000015 ASL 00000061) ACPI: DSDT 0xffe9e951 04A74 (v01 DELL dt_ex 00001000 INTL 20050624) ACPI: FACS 0xdfdf9c00 00040 ACPI: SSDT 0xffea34d6 0009C (v01 DELL st_ex 00001000 INTL 20050624) ACPI: APIC 0xfceab 0015E (v01 DELL B10K 00000015 ASL 00000061) ACPI: BOOT 0xfd009 00028 (v01 DELL B10K 00000015 ASL 00000061) ACPI: ASF! 0xfd031 00096 (v32 DELL B10K 00000015 ASL 00000061) ACPI: MCFG 0xfd0c7 0003C (v01 DELL B10K 00000015 ASL 00000061) ACPI: HPET 0xfd103 00038 (v01 DELL B10K 00000015 ASL 00000061) ACPI: TCPA 0xfd35f 00032 (v01 DELL B10K 00000015 ASL 00000061) ACPI: DMAR 0xfd391 000C8 (v01 DELL B10K 00000015 ASL 00000061) ACPI: SLIC 0xfd13b 00176 (v01 DELL B10K 00000015 ASL 00000061) ACPI: SSDT 0xdfe4dc00 015C4 (v01 INTEL PPM RCM 80000001 INTL 20061109) MADT: Found IO APIC ID 8, Interrupt 0 at 0xfec00000 ioapic0: Changing APIC ID to 8 ioapic0: Routing external 8259A's -> intpin 0 MADT: Found IO APIC ID 9, Interrupt 24 at 0xfec80000 ioapic1: Changing APIC ID to 9 MADT: Interrupt override: source 0, irq 2 ioapic0: Routing IRQ 0 -> intpin 2 MADT: Interrupt override: source 9, irq 9 ioapic0: intpin 9 trigger: level lapic: Routing NMI -> LINT1 lapic: LINT1 trigger: level lapic: LINT1 polarity: high ioapic0 irqs 0-23 on motherboard xen: register IRQ#1 xen: register IRQ#3 xen: register IRQ#4 xen: register IRQ#5 xen: register IRQ#6 xen: register IRQ#7 xen: register IRQ#8 xen: register IRQ#9 xen: register IRQ#10 xen: register IRQ#11 xen: register IRQ#12 xen: register IRQ#13 xen: register IRQ#14 xen: register IRQ#15 xen: register IRQ#16 xen: register IRQ#17 xen: register IRQ#18 xen: register IRQ#19 xen: register IRQ#20 xen: register IRQ#21 xen: register IRQ#22 xen: register IRQ#23 ioapic1 irqs 24-47 on motherboard xen: register IRQ#24 xen: register IRQ#25 xen: register IRQ#26 xen: register IRQ#27 xen: register IRQ#28 xen: register IRQ#29 xen: register IRQ#30 xen: register IRQ#31 xen: register IRQ#32 xen: register IRQ#33 xen: register IRQ#34 xen: register IRQ#35 xen: register IRQ#36 xen: register IRQ#37 xen: register IRQ#38 xen: register IRQ#39 xen: register IRQ#40 xen: register IRQ#41 xen: register IRQ#42 xen: register IRQ#43 xen: register IRQ#44 xen: register IRQ#45 xen: register IRQ#46 xen: register IRQ#47 wlan: <802.11 Link Layer> snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024] feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25 Hardware, Intel IvyBridge+ RNG: RDRAND is not present Hardware, VIA Nehemiah Padlock RNG: VIA Padlock RNG not present null: Falling back to random adaptor random: initialized nfslock: pseudo-device kbd: new array size 4 kbd1 at kbdmux0 VESA: calling BIOS POST VESA: INT 0x10 vector 0xc000:0x03d0 VESA: information block 0000 56 45 53 41 00 03 d8 01 00 c0 01 00 00 00 44 00 0010 00 91 00 01 58 0a 11 01 00 c0 a3 00 00 c0 a4 4b 0020 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0040 00 00 00 00 00 01 01 01 03 01 05 01 07 01 11 01 0050 14 01 17 01 1a 01 0e 01 20 01 93 01 95 01 96 01 0060 b3 01 b5 01 b6 01 c3 01 c5 01 c6 01 33 01 35 01 0070 36 01 53 01 55 01 56 01 63 01 65 01 66 01 21 01 0080 22 01 23 01 24 01 43 01 45 01 46 01 73 01 75 01 0090 76 01 83 01 85 01 86 01 d3 01 d5 01 d6 01 e3 01 00a0 e5 01 e6 01 ff ff 00 00 00 00 00 00 00 00 00 00 00b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 VESA: 48 mode(s) found VESA: v3.0, 16384k memory, flags:0x1, mode table:0xfffffe004e4be044 (91000044) VESA: ATI ATOMBIOS VESA: (C) 1988-2005, ATI Technologies Inc. RV620 01.00 io: VMBUS: load mem: hptnr: R750/DC7280 controller driver v1.0 hpt27xx: RocketRAID 27xx controller driver v1.1 hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2 pvcpu0: on motherboard pvcpu1: on motherboard pvcpu2: on motherboard pvcpu3: on motherboard pvcpu4: on motherboard pvcpu5: on motherboard xenstore0: on motherboard Grant table initialized xen_et0: on motherboard Event timer "XENTIMER" frequency 1000000000 Hz quality 950 Timecounter "XENTIMER" frequency 1000000000 Hz quality 950 xen_et0: registered as a time-of-day clock (resolution 10000000us, adjustment 5.000000000s) xc0 on motherboard acpi0: on motherboard ACPI: All ACPI Tables successfully acquired PCIe: Memory Mapped configuration base @ 0xf8000000 acpi0: Power Button (fixed) atrtc0: port 0x70-0x7f irq 8 on acpi0 atrtc0: not installed as time-of-day clock: clock xen_et has higher resolution Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x5f irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 attimer0: Can't map interrupt. pci_link0: Index IRQ Rtd Ref IRQs Initial Probe 0 11 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 11 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link1: Index IRQ Rtd Ref IRQs Initial Probe 0 10 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 10 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link2: Index IRQ Rtd Ref IRQs Initial Probe 0 5 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 5 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link3: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link4: Index IRQ Rtd Ref IRQs Initial Probe 0 9 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 9 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link5: Index IRQ Rtd Ref IRQs Initial Probe 0 255 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 255 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link6: Index IRQ Rtd Ref IRQs Initial Probe 0 9 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 9 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 pci_link7: Index IRQ Rtd Ref IRQs Initial Probe 0 5 N 0 3 4 5 6 7 9 10 11 12 15 Validation 0 5 N 0 3 4 5 6 7 9 10 11 12 15 After Disable 0 255 N 0 3 4 5 6 7 9 10 11 12 15 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pcib0: decoding 4 range 0-0xcf7 pcib0: decoding 4 range 0xd00-0xffff pcib0: decoding 3 range 0xa0000-0xbffff pcib0: decoding 3 range 0xc0000-0xdffff pcib0: decoding 3 range 0xe0000-0xfffff pcib0: decoding 3 range 0xdff00000-0xf7ffffff pcib0: decoding 3 range 0xff980000-0xff980fff pcib0: decoding 3 range 0xff97c000-0xff97ffff pcib0: decoding 3 range 0xfed20000-0xfed9ffff pci0: on pcib0 pci0: domain=0, physical bus=0 (XEN) PCI add device 0000:00:00.0 found-> vendor=0x8086, dev=0x3405, revid=0x22 domain=0, bus=0, slot=0, func=0 class=06-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0100, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D3 current D0 MSI supports 2 messages, vector masks pcib0: matched entry for 0.0.INTA pcib0: slot 0 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:01.0 found-> vendor=0x8086, dev=0x3408, revid=0x22 domain=0, bus=0, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0107, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D3 current D0 MSI supports 2 messages, vector masks pcib0: matched entry for 0.1.INTA pcib0: slot 1 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:03.0 found-> vendor=0x8086, dev=0x340a, revid=0x22 domain=0, bus=0, slot=3, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0107, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x0a (2500 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D3 current D0 MSI supports 2 messages, vector masks pcib0: matched entry for 0.3.INTA pcib0: slot 3 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:07.0 found-> vendor=0x8086, dev=0x340e, revid=0x22 domain=0, bus=0, slot=7, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0107, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D3 current D0 MSI supports 2 messages, vector masks pcib0: matched entry for 0.7.INTA pcib0: slot 7 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:14.0 found-> vendor=0x8086, dev=0x342e, revid=0x22 domain=0, bus=0, slot=20, func=0 class=08-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) (XEN) PCI add device 0000:00:14.1 found-> vendor=0x8086, dev=0x3422, revid=0x22 domain=0, bus=0, slot=20, func=1 class=08-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) (XEN) PCI add device 0000:00:14.2 found-> vendor=0x8086, dev=0x3423, revid=0x22 domain=0, bus=0, slot=20, func=2 class=08-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) (XEN) PCI add device 0000:00:1a.0 found-> vendor=0x8086, dev=0x3a37, revid=0x00 domain=0, bus=0, slot=26, func=0 class=0c-03-00, hdrtype=0x00, mfdev=1 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 map[20]: type I/O Port, range 32, base 0xff20, size 5, enabled pcib0: allocated type 4 (0xff20-0xff3f) for rid 20 of pci0:0:26:0 pcib0: matched entry for 0.26.INTA pcib0: slot 26 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:1a.1 found-> vendor=0x8086, dev=0x3a38, revid=0x00 domain=0, bus=0, slot=26, func=1 class=0c-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=10 map[20]: type I/O Port, range 32, base 0xff00, size 5, enabled pcib0: allocated type 4 (0xff00-0xff1f) for rid 20 of pci0:0:26:1 pcib0: matched entry for 0.26.INTB pcib0: slot 26 INTB hardwired to IRQ 17 (XEN) PCI add device 0000:00:1a.2 found-> vendor=0x8086, dev=0x3a39, revid=0x00 domain=0, bus=0, slot=26, func=2 class=0c-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=9 map[20]: type I/O Port, range 32, base 0xfc00, size 5, enabled pcib0: allocated type 4 (0xfc00-0xfc1f) for rid 20 of pci0:0:26:2 pcib0: matched entry for 0.26.INTC pcib0: slot 26 INTC hardwired to IRQ 22 (XEN) PCI add device 0000:00:1a.7 found-> vendor=0x8086, dev=0x3a3c, revid=0x00 domain=0, bus=0, slot=26, func=7 class=0c-03-20, hdrtype=0x00, mfdev=0 cmdreg=0x0106, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=9 powerspec 2 supports D0 D3 current D0 map[10]: type Memory, range 32, base 0xf7ffa000, size 10, enabled pcib0: allocated type 3 (0xf7ffa000-0xf7ffa3ff) for rid 10 of pci0:0:26:7 pcib0: matched entry for 0.26.INTC pcib0: slot 26 INTC hardwired to IRQ 22 (XEN) PCI add device 0000:00:1b.0 found-> vendor=0x8086, dev=0x3a3e, revid=0x00 domain=0, bus=0, slot=27, func=0 class=04-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0106, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 2 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0xf7ffc000, size 14, enabled pcib0: allocated type 3 (0xf7ffc000-0xf7ffffff) for rid 10 of pci0:0:27:0 pcib0: matched entry for 0.27.INTA pcib0: slot 27 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:1c.0 found-> vendor=0x8086, dev=0x3a40, revid=0x00 domain=0, bus=0, slot=28, func=0 class=06-04-00, hdrtype=0x01, mfdev=1 cmdreg=0x0107, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 2 supports D0 D3 current D0 MSI supports 1 message pcib0: matched entry for 0.28.INTA pcib0: slot 28 INTA hardwired to IRQ 16 (XEN) PCI add device 0000:00:1c.5 found-> vendor=0x8086, dev=0x3a4a, revid=0x00 domain=0, bus=0, slot=28, func=5 class=06-04-00, hdrtype=0x01, mfdev=1 cmdreg=0x0107, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns) intpin=b, irq=10 powerspec 2 supports D0 D3 current D0 MSI supports 1 message pcib0: matched entry for 0.28.INTB pcib0: slot 28 INTB hardwired to IRQ 17 (XEN) PCI add device 0000:00:1d.0 found-> vendor=0x8086, dev=0x3a34, revid=0x00 domain=0, bus=0, slot=29, func=0 class=0c-03-00, hdrtype=0x00, mfdev=1 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=5 map[20]: type I/O Port, range 32, base 0xff80, size 5, enabled pcib0: allocated type 4 (0xff80-0xff9f) for rid 20 of pci0:0:29:0 pcib0: matched entry for 0.29.INTA pcib0: slot 29 INTA hardwired to IRQ 23 (XEN) PCI add device 0000:00:1d.1 found-> vendor=0x8086, dev=0x3a35, revid=0x00 domain=0, bus=0, slot=29, func=1 class=0c-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=10 map[20]: type I/O Port, range 32, base 0xff60, size 5, enabled pcib0: allocated type 4 (0xff60-0xff7f) for rid 20 of pci0:0:29:1 pcib0: matched entry for 0.29.INTB pcib0: slot 29 INTB hardwired to IRQ 17 (XEN) PCI add device 0000:00:1d.2 found-> vendor=0x8086, dev=0x3a36, revid=0x00 domain=0, bus=0, slot=29, func=2 class=0c-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=5 map[20]: type I/O Port, range 32, base 0xff40, size 5, enabled pcib0: allocated type 4 (0xff40-0xff5f) for rid 20 of pci0:0:29:2 pcib0: matched entry for 0.29.INTC pcib0: slot 29 INTC hardwired to IRQ 18 (XEN) PCI add device 0000:00:1d.7 found-> vendor=0x8086, dev=0x3a3a, revid=0x00 domain=0, bus=0, slot=29, func=7 class=0c-03-20, hdrtype=0x00, mfdev=0 cmdreg=0x0106, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=5 powerspec 2 supports D0 D3 current D0 map[10]: type Memory, range 32, base 0xff980000, size 10, enabled pcib0: allocated type 3 (0xff980000-0xff9803ff) for rid 10 of pci0:0:29:7 pcib0: matched entry for 0.29.INTA pcib0: slot 29 INTA hardwired to IRQ 23 (XEN) PCI add device 0000:00:1e.0 found-> vendor=0x8086, dev=0x244e, revid=0x90 domain=0, bus=0, slot=30, func=0 class=06-04-01, hdrtype=0x01, mfdev=0 cmdreg=0x0107, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns) (XEN) PCI add device 0000:00:1f.0 found-> vendor=0x8086, dev=0x3a16, revid=0x00 domain=0, bus=0, slot=31, func=0 class=06-01-00, hdrtype=0x00, mfdev=1 cmdreg=0x0107, statreg=0x0210, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) (XEN) PCI add device 0000:00:1f.2 found-> vendor=0x8086, dev=0x2822, revid=0x00 domain=0, bus=0, slot=31, func=2 class=01-04-00, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x02b0, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=9 powerspec 3 supports D0 D3 current D0 MSI supports 16 messages map[10]: type I/O Port, range 32, base 0xfe00, size 3, enabled pcib0: allocated type 4 (0xfe00-0xfe07) for rid 10 of pci0:0:31:2 map[14]: type I/O Port, range 32, base 0xfe10, size 2, enabled pcib0: allocated type 4 (0xfe10-0xfe13) for rid 14 of pci0:0:31:2 map[18]: type I/O Port, range 32, base 0xfe20, size 3, enabled pcib0: allocated type 4 (0xfe20-0xfe27) for rid 18 of pci0:0:31:2 map[1c]: type I/O Port, range 32, base 0xfe30, size 2, enabled pcib0: allocated type 4 (0xfe30-0xfe33) for rid 1c of pci0:0:31:2 map[20]: type I/O Port, range 32, base 0xfec0, size 5, enabled pcib0: allocated type 4 (0xfec0-0xfedf) for rid 20 of pci0:0:31:2 map[24]: type Memory, range 32, base 0xff970000, size 11, enabled pcib0: matched entry for 0.31.INTC pcib0: slot 31 INTC hardwired to IRQ 20 (XEN) PCI add device 0000:00:1f.3 found-> vendor=0x8086, dev=0x3a30, revid=0x00 domain=0, bus=0, slot=31, func=3 class=0c-05-00, hdrtype=0x00, mfdev=0 cmdreg=0x0103, statreg=0x0280, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=c, irq=9 map[10]: type Memory, range 64, base 0xf7ffb000, size 8, enabled pcib0: allocated type 3 (0xf7ffb000-0xf7ffb0ff) for rid 10 of pci0:0:31:3 map[20]: type I/O Port, range 32, base 0xece0, size 5, enabled pcib0: allocated type 4 (0xece0-0xecff) for rid 20 of pci0:0:31:3 pcib0: matched entry for 0.31.INTC pcib0: slot 31 INTC hardwired to IRQ 20 pcib1: irq 16 at device 1.0 on pci0 pcib0: allocated type 3 (0xf2000000-0xf7bfffff) for rid 20 of pcib1 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: memory decode 0xf2000000-0xf7bfffff pci1: on pcib1 pci1: domain=0, physical bus=1 (XEN) PCI add device 0000:01:00.0 found-> vendor=0x14e4, dev=0x1639, revid=0x20 domain=0, bus=1, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D3 current D0 MSI supports 16 messages, 64 bit MSI-X supports 9 messages in map 0x10 map[10]: type Memory, range 64, base 0xf2000000, size 25, enabled pcib1: allocated memory range (0xf2000000-0xf3ffffff) for rid 10 of pci0:1:0:0 pcib1: matched entry for 1.0.INTA pcib1: slot 0 INTA hardwired to IRQ 28 (XEN) PCI add device 0000:01:00.1 found-> vendor=0x14e4, dev=0x1639, revid=0x20 domain=0, bus=1, slot=0, func=1 class=02-00-00, hdrtype=0x00, mfdev=1 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=10 powerspec 3 supports D0 D3 current D0 MSI supports 16 messages, 64 bit MSI-X supports 9 messages in map 0x10 map[10]: type Memory, range 64, base 0xf4000000, size 25, enabled pcib1: allocated memory range (0xf4000000-0xf5ffffff) for rid 10 of pci0:1:0:1 pcib1: matched entry for 1.0.INTB pcib1: slot 0 INTB hardwired to IRQ 40 bce0: mem 0xf2000000-0xf3ffffff irq 28 at device 0.0 on pci1 bce0: /usr/src/sys/dev/bce/if_bce.c(1159): MSI allocation failed! error = 19 miibus0: on bce0 brgphy0: PHY 1 on miibus0 brgphy0: OUI 0x000af7, model 0x003c, rev. 8 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow bce0: bpf attached bce0: Ethernet address: 00:10:18:e0:24:b0 bce0: ASIC (0x57092003); Rev (C0); Bus (PCIe x4, 2.5Gbps); B/C (5.2.3); Bufs (RX:2;TX:2;PG:8); Flags (SPLT) Coal (RX:6,6,18,18; TX:20,20,80,80) bce1: mem 0xf4000000-0xf5ffffff irq 40 at device 0.1 on pci1 bce1: /usr/src/sys/dev/bce/if_bce.c(1159): MSI allocation failed! error = 19 miibus1: on bce1 brgphy1: PHY 1 on miibus1 brgphy1: OUI 0x000af7, model 0x003c, rev. 8 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow bce1: bpf attached bce1: Ethernet address: 00:10:18:e0:24:b2 bce1: ASIC (0x57092003); Rev (C0); Bus (PCIe x4, 2.5Gbps); B/C (5.2.3); Bufs (RX:2;TX:2;PG:8); Flags (SPLT) Coal (RX:6,6,18,18; TX:20,20,80,80) pcib2: irq 16 at device 3.0 on pci0 pcib0: allocated type 4 (0xd000-0xdfff) for rid 1c of pcib2 pcib0: allocated type 3 (0xf7d00000-0xf7efffff) for rid 20 of pcib2 pcib0: allocated type 3 (0xe0000000-0xefffffff) for rid 24 of pcib2 pcib2: domain 0 pcib2: secondary bus 2 pcib2: subordinate bus 2 pcib2: I/O decode 0xd000-0xdfff pcib2: memory decode 0xf7d00000-0xf7efffff pcib2: prefetched decode 0xe0000000-0xefffffff pcib2: special decode VGA pci2: on pcib2 pci2: domain=0, physical bus=2 (XEN) PCI add device 0000:02:00.0 found-> vendor=0x1002, dev=0x95cf, revid=0x00 domain=0, bus=2, slot=0, func=0 class=03-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0003, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=11 powerspec 3 supports D0 D1 D2 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Prefetchable Memory, range 64, base 0xe0000000, size 28, enabled pcib2: allocated prefetch range (0xe0000000-0xefffffff) for rid 10 of pci0:2:0:0 map[18]: type Memory, range 64, base 0xf7df0000, size 16, enabled pcib2: allocated memory range (0xf7df0000-0xf7dfffff) for rid 18 of pci0:2:0:0 map[20]: type I/O Port, range 32, base 0xdc00, size 8, enabled pcib2: allocated I/O port range (0xdc00-0xdcff) for rid 20 of pci0:2:0:0 pcib2: matched entry for 2.0.INTA pcib2: slot 0 INTA hardwired to IRQ 24 vgapci0: port 0xdc00-0xdcff mem 0xe0000000-0xefffffff,0xf7df0000-0xf7dfffff irq 24 at device 0.0 on pci2 pcib3: irq 16 at device 7.0 on pci0 pcib0: allocated type 3 (0xf7c00000-0xf7cfffff) for rid 20 of pcib3 pcib3: domain 0 pcib3: secondary bus 3 pcib3: subordinate bus 3 pcib3: memory decode 0xf7c00000-0xf7cfffff pci3: on pcib3 pci3: domain=0, physical bus=3 pci0: at device 20.0 (no driver attached) pci0: at device 20.1 (no driver attached) pci0: at device 20.2 (no driver attached) uhci0: port 0xff20-0xff3f irq 16 at device 26.0 on pci0 uhci0: LegSup = 0x2f00 usbus0 on uhci0 uhci0: usbpf: Attached uhci1: port 0xff00-0xff1f irq 17 at device 26.1 on pci0 uhci1: LegSup = 0x2f00 usbus1 on uhci1 uhci1: usbpf: Attached uhci2: port 0xfc00-0xfc1f irq 22 at device 26.2 on pci0 uhci2: LegSup = 0x2f00 usbus2 on uhci2 uhci2: usbpf: Attached ehci0: mem 0xf7ffa000-0xf7ffa3ff irq 22 at device 26.7 on pci0 usbus3: EHCI version 1.0 usbus3 on ehci0 ehci0: usbpf: Attached hdac0: mem 0xf7ffc000-0xf7ffffff irq 16 at device 27.0 on pci0 hdac0: PCI card vendor: 0x1028, device: 0x0293 hdac0: HDA Driver Revision: 20120126_0002 hdac0: Config options: on=0x00000000 off=0x00000000 hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256 pcib4: irq 16 at device 28.0 on pci0 pcib4: domain 0 pcib4: secondary bus 4 pcib4: subordinate bus 4 pci4: on pcib4 pci4: domain=0, physical bus=4 pcib5: irq 17 at device 28.5 on pci0 pcib0: allocated type 3 (0xf1f00000-0xf1ffffff) for rid 20 of pcib5 pcib5: domain 0 pcib5: secondary bus 5 pcib5: subordinate bus 5 pcib5: memory decode 0xf1f00000-0xf1ffffff pci5: on pcib5 pci5: domain=0, physical bus=5 (XEN) PCI add device 0000:05:00.0 found-> vendor=0x14e4, dev=0x1681, revid=0x10 domain=0, bus=5, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=10 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0xf1fe0000, size 16, enabled pcib5: allocated memory range (0xf1fe0000-0xf1feffff) for rid 10 of pci0:5:0:0 map[18]: type Memory, range 64, base 0xf1ff0000, size 16, enabled pcib5: allocated memory range (0xf1ff0000-0xf1ffffff) for rid 18 of pci0:5:0:0 pcib5: matched entry for 5.0.INTA pcib5: slot 0 INTA hardwired to IRQ 17 bge0: mem 0xf1fe0000-0xf1feffff,0xf1ff0000-0xf1ffffff irq 17 at device 0.0 on pci5 bge0: CHIP ID 0x05761100; ASIC REV 0x5761; CHIP REV 0x57611; PCI-E bge0: Disabling fastboot miibus2: on bge0 brgphy2: PHY 1 on miibus2 brgphy2: OUI 0x000af7, model 0x003d, rev. 0 brgphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow bge0: bpf attached bge0: Ethernet address: d4:ae:52:c1:d4:84 uhci3: port 0xff80-0xff9f irq 23 at device 29.0 on pci0 usbus4 on uhci3 uhci3: usbpf: Attached uhci4: port 0xff60-0xff7f irq 17 at device 29.1 on pci0 usbus5 on uhci4 uhci4: usbpf: Attached uhci5: port 0xff40-0xff5f irq 18 at device 29.2 on pci0 usbus6 on uhci5 uhci5: usbpf: Attached ehci1: mem 0xff980000-0xff9803ff irq 23 at device 29.7 on pci0 usbus7: EHCI version 1.0 usbus7 on ehci1 ehci1: usbpf: Attached pcib6: at device 30.0 on pci0 pcib6: domain 0 pcib6: secondary bus 6 pcib6: subordinate bus 6 pcib6: special decode subtractive pci6: on pcib6 pci6: domain=0, physical bus=6 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfedf mem 0xff970000-0xff9707ff irq 20 at device 31.2 on pci0 ahci0: AHCI v1.20 with 6 3Gbps ports, Port Multiplier not supported ahci0: Caps: 64bit NCQ SNTF AL CLO 3Gbps PMD 32cmd CCC EM eSATA 6ports ahci0: Caps2: ahcich0: at channel 0 on ahci0 ahcich0: Caps: ahcich1: at channel 1 on ahci0 ahcich1: Caps: ahcich2: at channel 2 on ahci0 ahcich2: Caps: ahcich3: at channel 3 on ahci0 ahcich3: Caps: ahcich4: at channel 4 on ahci0 ahcich4: Caps: ahcich5: at channel 5 on ahci0 ahcich5: Caps: HPCP ESP ahciem0: on ahci0 ahciem0: Caps: ALHD XMT SMB LED pci0: at device 31.3 (no driver attached) ppc0: using extended I/O port range ppc0: SPP ECP ECP+EPP ppc0: port 0x378-0x37f,0x778-0x77f irq 7 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 uart0: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart0: fast interrupt ACPI: Enabled 3 GPEs in block 00 to 3F qpi0: on motherboard acpi0: wakeup code va 0xfffffe0051560000 pa 0x10000 ex_isa_identify() ahc_isa_identify 0: ioport 0xc00 alloc failed ahc_isa_identify 1: ioport 0x1c00 alloc failed ahc_isa_identify 2: ioport 0x2c00 alloc failed ahc_isa_identify 3: ioport 0x3c00 alloc failed ahc_isa_identify 4: ioport 0x4c00 alloc failed ahc_isa_identify 5: ioport 0x5c00 alloc failed ahc_isa_identify 6: ioport 0x6c00 alloc failed ahc_isa_identify 7: ioport 0x7c00 alloc failed ahc_isa_identify 8: ioport 0x8c00 alloc failed ahc_isa_identify 9: ioport 0x9c00 alloc failed ahc_isa_identify 10: ioport 0xac00 alloc failed ahc_isa_identify 11: ioport 0xbc00 alloc failed ahc_isa_identify 12: ioport 0xcc00 alloc failed ahc_isa_identify 13: ioport 0xdc00 alloc failed ahc_isa_identify 14: ioport 0xec00 alloc failed pcib0: allocated type 3 (0xa0000-0xa07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa0800-0xa0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1000-0xa17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa1800-0xa1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2000-0xa27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa2800-0xa2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3000-0xa37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa3800-0xa3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4000-0xa47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa4800-0xa4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5000-0xa57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa5800-0xa5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6000-0xa67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa6800-0xa6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7000-0xa77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa7800-0xa7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8000-0xa87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa8800-0xa8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9000-0xa97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xa9800-0xa9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa000-0xaa7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaa800-0xaafff) for rid 0 of orm0 pcib0: allocated type 3 (0xab000-0xab7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xab800-0xabfff) for rid 0 of orm0 pcib0: allocated type 3 (0xac000-0xac7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xac800-0xacfff) for rid 0 of orm0 pcib0: allocated type 3 (0xad000-0xad7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xad800-0xadfff) for rid 0 of orm0 pcib0: allocated type 3 (0xae000-0xae7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xae800-0xaefff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf000-0xaf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xaf800-0xaffff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0000-0xb07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb0800-0xb0fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1000-0xb17ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb1800-0xb1fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2000-0xb27ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb2800-0xb2fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3000-0xb37ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb3800-0xb3fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4000-0xb47ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb4800-0xb4fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5000-0xb57ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb5800-0xb5fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6000-0xb67ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb6800-0xb6fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7000-0xb77ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb7800-0xb7fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8000-0xb87ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb8800-0xb8fff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9000-0xb97ff) for rid 0 of orm0 pcib0: allocated type 3 (0xb9800-0xb9fff) for rid 0 of orm0 pcib0: allocated type 3 (0xba000-0xba7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xba800-0xbafff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb000-0xbb7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbb800-0xbbfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc000-0xbc7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbc800-0xbcfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd000-0xbd7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbd800-0xbdfff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe000-0xbe7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbe800-0xbefff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf000-0xbf7ff) for rid 0 of orm0 pcib0: allocated type 3 (0xbf800-0xbffff) for rid 0 of orm0 pcib0: allocated type 3 (0xc0000-0xc07ff) for rid 0 of orm0 pcib0: allocated type 3 (0xc0000-0xcffff) for rid 0 of orm0 pcib0: allocated type 3 (0xd0000-0xd07ff) for rid 1 of orm0 pcib0: allocated type 3 (0xd0000-0xda7ff) for rid 1 of orm0 pcib0: allocated type 3 (0xda800-0xdafff) for rid 2 of orm0 pcib0: allocated type 3 (0xda800-0xdc7ff) for rid 2 of orm0 pcib0: allocated type 3 (0xdc800-0xdcfff) for rid 3 of orm0 pcib0: allocated type 3 (0xdc800-0xde7ff) for rid 3 of orm0 pcib0: allocated type 3 (0xde800-0xdefff) for rid 4 of orm0 pcib0: allocated type 3 (0xe1000-0xe17ff) for rid 5 of orm0 pcib0: allocated type 3 (0xe1000-0xe3fff) for rid 5 of orm0 pcib0: allocated type 3 (0xe4000-0xe47ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe4800-0xe4fff) for rid 6 of orm0 pcib0: allocated type 3 (0xe5000-0xe57ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe5800-0xe5fff) for rid 6 of orm0 pcib0: allocated type 3 (0xe6000-0xe67ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe6800-0xe6fff) for rid 6 of orm0 pcib0: allocated type 3 (0xe7000-0xe77ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe7800-0xe7fff) for rid 6 of orm0 pcib0: allocated type 3 (0xe8000-0xe87ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe8800-0xe8fff) for rid 6 of orm0 pcib0: allocated type 3 (0xe9000-0xe97ff) for rid 6 of orm0 pcib0: allocated type 3 (0xe9800-0xe9fff) for rid 6 of orm0 pcib0: allocated type 3 (0xea000-0xea7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xea800-0xeafff) for rid 6 of orm0 pcib0: allocated type 3 (0xeb000-0xeb7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xeb800-0xebfff) for rid 6 of orm0 pcib0: allocated type 3 (0xec000-0xec7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xec800-0xecfff) for rid 6 of orm0 pcib0: allocated type 3 (0xed000-0xed7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xed800-0xedfff) for rid 6 of orm0 pcib0: allocated type 3 (0xee000-0xee7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xee800-0xeefff) for rid 6 of orm0 pcib0: allocated type 3 (0xef000-0xef7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xef800-0xeffff) for rid 6 of orm0 pcib0: allocated type 3 (0xf0000-0xf07ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf0800-0xf0fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf1000-0xf17ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf1800-0xf1fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf2000-0xf27ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf2800-0xf2fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf3000-0xf37ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf3800-0xf3fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf4000-0xf47ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf4800-0xf4fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf5000-0xf57ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf5800-0xf5fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf6000-0xf67ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf6800-0xf6fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf7000-0xf77ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf7800-0xf7fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf8000-0xf87ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf8800-0xf8fff) for rid 6 of orm0 pcib0: allocated type 3 (0xf9000-0xf97ff) for rid 6 of orm0 pcib0: allocated type 3 (0xf9800-0xf9fff) for rid 6 of orm0 pcib0: allocated type 3 (0xfa000-0xfa7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xfa800-0xfafff) for rid 6 of orm0 pcib0: allocated type 3 (0xfb000-0xfb7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xfb800-0xfbfff) for rid 6 of orm0 pcib0: allocated type 3 (0xfc000-0xfc7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xfc800-0xfcfff) for rid 6 of orm0 pcib0: allocated type 3 (0xfd000-0xfd7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xfd800-0xfdfff) for rid 6 of orm0 pcib0: allocated type 3 (0xfe000-0xfe7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xfe800-0xfefff) for rid 6 of orm0 pcib0: allocated type 3 (0xff000-0xff7ff) for rid 6 of orm0 pcib0: allocated type 3 (0xff800-0xfffff) for rid 6 of orm0 isa_probe_children: disabling PnP devices isa_probe_children: probing non-PnP devices orm0: at iomem 0xc0000-0xcffff,0xd0000-0xda7ff,0xda800-0xdc7ff,0xdc800-0xde7ff,0xde800-0xe0fff,0xe1000-0xe3fff on isa0 atkbd: the current kbd controller command byte 0065 atkbd: keyboard ID 0xffffffff (1) kbdc: RESET_KBD return code:00fe kbdc: RESET_KBD return code:00fe kbdc: RESET_KBD return code:00fe kbdc: DIAGNOSE status:0055 kbdc: TEST_KBD_PORT status:0000 atkbd: failed to reset the keyboard. sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x100> sc0: fb0, kbd1, terminal emulator: scteken (teken terminal) vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 pcib0: allocated type 4 (0x3c0-0x3df) for rid 0 of vga0 pcib0: allocated type 3 (0xa0000-0xbffff) for rid 0 of vga0 isa_probe_children: probing PnP devices Device configuration finished. procfs registered Timecounters tick every 1.000 msec vlan: initialized, using hash tables with chaining tcp_init: net.inet.tcp.tcbhashsize auto tuned to 8192 lo0: bpf attached hptnr: no controller detected. hpt27xx: no controller detected. hptrr: no controller detected. xenbusb_front0: on xenstore0 xenbusb_back0: on xenstore0 xctrl0: on xenstore0 hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 hdaa0: Subsystem ID: 0x10280293 hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1 hdaa0: GPIO0: disabled hdaa0: GPIO1: disabled hdaa0: GPIO2: disabled hdaa0: WARNING: nid=42 has cnid outside of the AFG range j=0 entnum=4 index=0 res=0x00002701 hdaa0: Original pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 17 02214040 4 0 Headphones Jack 1/8 Front Green 0 hdaa0: 18 01014010 1 0 Line-out Jack 1/8 Rear Green 0 hdaa0: 19 991301f0 15 0 Speaker Fixed ATAPI Onboard Unknown 1 hdaa0: 20 02a19020 2 0 Mic Jack 1/8 Front Pink 0 hdaa0: 21 01813030 3 0 Line-in Jack 1/8 Rear Blue 0 hdaa0: 22 413301f0 15 0 CD None ATAPI Rear Unknown 1 hdaa0: 23 41a601f0 15 0 Mic None Digital Rear Unknown 1 hdaa0: 26 41f301f0 15 0 Other None ATAPI Rear Unknown 1 hdaa0: 27 414501f0 15 0 SPDIF-out None Optical Rear Unknown 1 hdaa0: 28 413301f0 15 0 CD None ATAPI Rear Unknown 1 hdaa0: Patching widget caps nid=23 0x0040020b -> 0x0040000b hdaa0: Patching widget caps nid=26 0x00400000 -> 0x00700000 hdaa0: Patched pins configuration: hdaa0: nid 0x as seq device conn jack loc color misc hdaa0: 17 02214040 4 0 Headphones Jack 1/8 Front Green 0 hdaa0: 18 01014010 1 0 Line-out Jack 1/8 Rear Green 0 hdaa0: 19 991301f0 15 0 Speaker Fixed ATAPI Onboard Unknown 1 hdaa0: 20 02a19020 2 0 Mic Jack 1/8 Front Pink 0 hdaa0: 21 01813030 3 0 Line-in Jack 1/8 Rear Blue 0 hdaa0: 22 413301f0 15 0 CD None ATAPI Rear Unknown 1 DISA hdaa0: 23 41a601f0 15 0 Mic None Digital Rear Unknown 1 DISA hdaa0: 27 414501f0 15 0 SPDIF-out None Optical Rear Unknown 1 DISA hdaa0: 28 413301f0 15 0 CD None ATAPI Rear Unknown 1 DISA hdaa0: 5 associations found: hdaa0: Association 0 (1) out: hdaa0: Pin nid=18 seq=0 hdaa0: Association 1 (2) in: hdaa0: Pin nid=20 seq=0 hdaa0: Association 2 (3) in: hdaa0: Pin nid=21 seq=0 hdaa0: Association 3 (4) out: hdaa0: Pin nid=17 seq=0 hdaa0: Association 4 (15) out: hdaa0: Pin nid=19 seq=0 hdaa0: Tracing association 0 (1) hdaa0: Pin 18 traced to DAC 3 hdaa0: Association 0 (1) trace succeeded hdaa0: Tracing association 1 (2) hdaa0: Pin 20 traced to ADC 8 hdaa0: Association 1 (2) trace succeeded hdaa0: Tracing association 2 (3) hdaa0: Pin 21 traced to ADC 9 hdaa0: Association 2 (3) trace succeeded hdaa0: Tracing association 3 (4) hdaa0: Pin 17 traced to DAC 4 hdaa0: Association 3 (4) trace succeeded hdaa0: Tracing association 4 (15) hdaa0: Unable to trace pin 19 seq 0 with min nid 0 hdaa0: Association 4 (15) trace failed hdaa0: Looking for additional DAC for association 0 (1) hdaa0: Looking for additional ADC for association 1 (2) hdaa0: Looking for additional ADC for association 2 (3) hdaa0: Looking for additional DAC for association 3 (4) hdaa0: Tracing input monitor hdaa0: Tracing other input monitors hdaa0: Tracing nid 20 to out hdaa0: nid 20 is input monitor hdaa0: Tracing nid 21 to out hdaa0: nid 21 is input monitor hdaa0: Tracing beeper hdaa0: nid 26 traced to out hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref pcm0: at nid 18 and 20 on hdaa0 pcm0: Playback: pcm0: Stream cap: 0x00000001 PCM pcm0: PCM cap: 0x000e07ff 16 20 24 bits, 8 11 16 22 32 44 48 88 96 176 192 KHz pcm0: DAC: 3 pcm0: pcm0: nid=18 [pin: Line-out (Green Jack)] pcm0: + <- nid=10 [audio mixer] [src: pcm, speaker, line, mic] pcm0: + <- nid=33 [audio selector] [src: pcm, speaker, line, mic] pcm0: + <- nid=32 [audio mixer] [src: pcm, speaker, line, mic] pcm0: + <- nid=20 [pin: Mic (Pink Jack)] [src: mic] pcm0: + <- nid=21 [pin: Line-in (Blue Jack)] [src: line] pcm0: + <- nid=26 [beep widget] [src: speaker] pcm0: + <- nid=3 [audio output] [src: pcm] pcm0: pcm0: Record: pcm0: Stream cap: 0x00000001 PCM pcm0: PCM cap: 0x000e07ff 16 20 24 bits, 8 11 16 22 32 44 48 88 96 176 192 KHz pcm0: ADC: 8 pcm0: pcm0: nid=8 [audio input] pcm0: + <- nid=12 [audio selector] [src: mic] pcm0: + <- nid=20 [pin: Mic (Pink Jack)] [src: mic] pcm0: pcm0: Master Volume (OSS: vol): -46/0dB pcm0: +- ctl 1 (nid 3 out): -58/0dB (40 steps) pcm0: +- ctl 6 (nid 10 in 1): mute pcm0: +- ctl 13 (nid 18 in ): mute pcm0: +- ctl 23 (nid 32 in 0): -34/12dB (32 steps) + mute pcm0: +- ctl 24 (nid 32 in 1): -34/12dB (32 steps) + mute pcm0: +- ctl 26 (nid 32 in 3): -34/12dB (32 steps) + mute pcm0: +- ctl 28 (nid 32 in 5): -34/12dB (32 steps) + mute pcm0: +- ctl 30 (nid 33 out): -46/0dB (32 steps) + mute pcm0: pcm0: PCM Volume (OSS: pcm): -58/0dB pcm0: +- ctl 1 (nid 3 out): -58/0dB (40 steps) pcm0: +- ctl 28 (nid 32 in 5): -34/12dB (32 steps) + mute pcm0: pcm0: Microphone Volume (OSS: mic): 0/30dB pcm0: +- ctl 9 (nid 12 out): -58/22dB (55 steps) + mute pcm0: +- ctl 15 (nid 20 out): 0/30dB (4 steps) pcm0: +- ctl 23 (nid 32 in 0): -34/12dB (32 steps) + mute pcm0: pcm0: Line-in Volume (OSS: line) pcm0: +- ctl 24 (nid 32 in 1): -34/12dB (32 steps) + mute pcm0: pcm0: Speaker/Beep Volume (OSS: speaker): -34/0dB pcm0: +- ctl 11 (nid 16 out): -45/0dB (16 steps) + mute pcm0: +- ctl 26 (nid 32 in 3): -34/12dB (32 steps) + mute pcm0: pcm0: Recording Level (OSS: rec): -58/22dB pcm0: +- ctl 9 (nid 12 out): -58/22dB (55 steps) + mute pcm0: pcm0: Input Monitoring Level (OSS: igain): -34/12dB pcm0: +- ctl 23 (nid 32 in 0): -34/12dB (32 steps) + mute pcm0: +- ctl 24 (nid 32 in 1): -34/12dB (32 steps) + mute pcm0: +- ctl 26 (nid 32 in 3): -34/12dB (32 steps) + mute pcm0: pcm0: Mixer "vol": pcm0: Mixer "pcm": pcm0: Mixer "speaker": pcm0: Mixer "mic": pcm0: Mixer "rec": pcm0: Mixer "igain": pcm0: Mixer "ogain": pcm0: Playback channel set is: Front Left, Front Right, pcm0: Playback channel matrix is: 2.0 (disconnected) pcm0: Recording channel set is: Front Left, Front Right, pcm0: Recording channel matrix is: 2.0 (disconnected) pcm1: at nid 17 and 21 on hdaa0 pcm1: Playback: pcm1: Stream cap: 0x00000001 PCM pcm1: PCM cap: 0x000e07ff 16 20 24 bits, 8 11 16 22 32 44 48 88 96 176 192 KHz pcm1: DAC: 4 pcm1: pcm1: nid=17 [pin: Headphones (Green Jack)] pcm1: + <- nid=7 [audio mixer] [src: pcm] pcm1: + <- nid=34 [audio selector] [src: pcm] pcm1: + <- nid=4 [audio output] [src: pcm] pcm1: pcm1: Record: pcm1: Stream cap: 0x00000001 PCM pcm1: PCM cap: 0x000e07ff 16 20 24 bits, 8 11 16 22 32 44 48 88 96 176 192 KHz pcm1: ADC: 9 pcm1: pcm1: nid=9 [audio input] pcm1: + <- nid=13 [audio selector] [src: line] pcm1: + <- nid=21 [pin: Line-in (Blue Jack)] [src: line] pcm1: pcm1: Master Volume (OSS: vol): -58/0dB pcm1: +- ctl 2 (nid 4 out): -58/0dB (40 steps) pcm1: +- ctl 3 (nid 7 in 0): mute pcm1: +- ctl 12 (nid 17 in ): mute pcm1: pcm1: PCM Volume (OSS: pcm): -58/0dB pcm1: +- ctl 2 (nid 4 out): -58/0dB (40 steps) pcm1: +- ctl 3 (nid 7 in 0): mute pcm1: +- ctl 12 (nid 17 in ): mute pcm1: pcm1: Line-in Volume (OSS: line): 0/30dB pcm1: +- ctl 10 (nid 13 out): -58/22dB (55 steps) + mute pcm1: +- ctl 16 (nid 21 out): 0/30dB (4 steps) pcm1: pcm1: Recording Level (OSS: rec): -58/22dB pcm1: +- ctl 10 (nid 13 out): -58/22dB (55 steps) + mute pcm1: pcm1: Mixer "vol": pcm1: Mixer "pcm": pcm1: Mixer "line": pcm1: Mixer "rec": pcm1: Playback channel set is: Front Left, Front Right, pcm1: Playback channel matrix is: 2.0 (disconnected) pcm1: Recording channel set is: Front Left, Front Right, pcm1: Recording channel matrix is: 2.0 (disconnected) random: unblocking device. usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 480Mbps High Speed USB v2.0 usbus4: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 usbus5: 12Mbps Full Speed USB v1.0 usbus6: 12Mbps Full Speed USB v1.0 usbus7: 480Mbps High Speed USB v2.0 ahcich0: AHCI reset... ahcich0: SATA connect time=100us status=00000123 ugen5.1: at usbus5 uhub5: on usbus5 ugen6.1: at usbus6 uhub6: on usbus6 ugen7.1: at usbus7 uhub7: on usbus7 ahcich0: AHCI reset: device found ahcich0: AHCI reset: device ready after 0ms ahcich1: AHCI reset... ahcich1: SATA connect time=100us status=00000123 ahcich1: AHCI reset: device found ahcich2: AHCI reset... ahcich2: SATA connect time=1000us status=00000113 ahcich2: AHCI reset: device found ahcich2: AHCI reset: device ready after 0ms ahcich3: AHCI reset... ahcich3: SATA offline status=00000004 ahcich3: AHCI reset: device not found ahcich4: AHCI reset... ahcich4: SATA offline status=00000004 ahcich4: AHCI reset: device not found ahcich5: AHCI reset... ahcich5: SATA connect timeout time=10000us status=00000000 ahcich5: AHCI reset: device not found ahcich1: AHCI reset: device ready after 100ms ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 GEOM: new disk ada0 ada0: ATA-8 SATA 3.x device ada0: Serial Number Z3T397LB ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) ada0: quirks=0x1<4K> ada0: Previously was known as ad4 ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 ada1: ATA-8 SATA 3.x device ada1: Serial Number Z3T35VZV ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) ada1: quirks=0x1<4K> ada1: Previously was known as ad6 ses0 at ahciem0 bus 0 scbus6 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device pass0 at ahcich0 bus 0 scbus0 target 0 lun 0 pass0: ATA-8 SATA 3.x device pass0: Serial Number Z3T397LB pass0: 300.000MB/s transfersses0: Generation Code 0x0 has 1 SubEnclosures ses0: SubEnclosure ID 0, 1 Types With this ID, Descriptor Length 36, offset 8 ses0: WWN: 0 ses0: Type Desc[0]: Type 0x17, MaxElt 6, In Subenc 0, Text Length 0: cd0 at ahcich2 bus 0 scbus2 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: Serial Number R8U46GAC6015V3 cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed (SATA 2.x, UDMA6, PIO 8192bytes) pass0: Command Queueing enabled pass1 at ahcich1 bus 0 scbus1 target 0 lun 0 pass1: ATA-8 SATA 3.x device pass1: Serial Number Z3T35VZV pass1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) pass1: Command Queueing enabled pass2 at ahcich2 bus 0 scbus2 target 0 lun 0 pass2: Removable CD-ROM SCSI-0 device pass2: Serial Number R8U46GAC6015V3 pass2: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) pass3 at ahciem0 bus 0 scbus6 target 0 lun 0 pass3: SEMB S-E-S 2.00 device GEOM_PART: partition 2 is not aligned on 4096 bytes GEOM_PART: partition 4 is not aligned on 4096 bytes GEOM: new disk ada1 GEOM: new disk cd0 uhub0: 2 ports with 2 removable, self powered GEOM_PART: partition 2 is not aligned on 4096 bytes uhub1: 2 ports with 2 removable, self powered GEOM_PART: partition 4 is not aligned on 4096 bytes uhub2: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered uhub5: 2 ports with 2 removable, self powered uhub6: 2 ports with 2 removable, self powered Netvsc initializing... done! SMP: AP CPU #1 Launched! SMP: AP CPU #5 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #4 Launched! SMP: AP CPU #3 Launched! WARNING: WITNESS option enabled, expect reduced performance. GEOM_PART: partition 1 is not aligned on 4096 bytes GEOM_PART: partition 2 is not aligned on 4096 bytes GEOM_PART: partition 1 is not aligned on 4096 bytes GEOM_PART: partition 1 is not aligned on 4096 bytes GEOM_PART: partition 2 is not aligned on 4096 bytes GEOM_PART: partition 1 is not aligned on 4096 bytes Root mount waiting for: usbus7 usbus3 Root mount waiting for: usbus7 usbus3 uhub3: 6 ports with 6 removable, self powered uhub7: 6 ports with 6 removable, self powered Trying to mount root from ufs:/dev/ada0s4a []... start_init: trying /sbin/init Setting hostuuid: b1d4ed5e-6291-11e3-a57d-001018e024b0. Setting hostid: 0xf983da80. Entropy harvesting: interrupts ethernet point_to_point swi. Starting file system checks: /dev/ada0s4a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ada0s4a: clean, 30967617 free (1481 frags, 3870767 blocks, 0.0% fragmentation) Mounting local file systems:. Writing entropy file:. Setting hostname: loki. bge0: Disabling fastboot bge0: Disabling fastboot bge0: link state changed to DOWN ugen1.2: at usbus1 ukbd0: on usbus1 kbd2 at ukbd0 kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000 Starting Network: lo0 bce0 bce1 bge0. lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 bce0: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:e0:24:b0 nd6 options=29 media: Ethernet autoselect bce1: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:e0:24:b2 nd6 options=29 media: Ethernet autoselect bge0: flags=8843 metric 0 mtu 1500 options=c019b ether d4:ae:52:c1:d4:84 nd6 options=29 media: Ethernet autoselect (none) status: no carrier bge0: link state changed to UP Starting devd. Starting Network: bce0. bce0: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:e0:24:b0 nd6 options=29 media: Ethernet autoselect Starting Network: bce1. bce1: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:e0:24:b2 nd6 options=29 media: Ethernet autoselect Configuring keyboard: keymap. Starting dhclient. DHCPREQUEST on bge0 to 255.255.255.255 port 67 DHCPACK from 172.16.1.1 bound to 172.16.1.21 -- renewal in 2147483647 seconds. add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Creating and/or trimming log files. Starting syslogd. No core dumps found. ELF ldconfig path: /lib /usr/lib /usr/lib/compat 32-bit compatibility ldconfig path: /usr/lib32 Clearing /tmp (X related). Updating motd:. Mounting late file systems:. Starting ntpd. Configuring syscons: keymap blanktime. Performing sanity check on sshd configuration. Starting sshd. Starting sendmail_submit. Starting sendmail_msp_queue. Starting cron. Starting background file system checks in 60 seconds. Tue Dec 24 11:27:30 CET 2013 FreeBSD/amd64 (loki) (xc0) login: From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:40 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 293593F7; Tue, 24 Dec 2013 11:22:40 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A68D41674; Tue, 24 Dec 2013 11:22:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85272671" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:30 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:28 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4D-0007qS-2Q; Tue, 24 Dec 2013 11:22:29 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 05/13] xen: implement Xen IO APIC ops Date: Tue, 24 Dec 2013 12:20:54 +0100 Message-ID: <1387884062-41154-6-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:40 -0000 Implement a different set of hooks for IO APIC to use when running under Xen Dom0. --- sys/x86/xen/pv.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index ab4afba..e5ad200 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -73,6 +75,11 @@ static caddr_t xen_pv_parse_preload_data(u_int64_t); static void xen_pv_parse_memmap(caddr_t, vm_paddr_t *, int *); static void xen_pv_set_init_ops(void); + +static u_int xen_pv_ioapic_read(volatile ioapic_t *, int); +static void xen_pv_ioapic_write(volatile ioapic_t *, int, u_int); +static void xen_pv_ioapic_register_intr(struct ioapic_intsrc *); + /*---------------------------- Extern Declarations ---------------------------*/ /* Variables used by amd64 mp_machdep to start APs */ extern struct mtx ap_boot_mtx; @@ -92,6 +99,13 @@ struct init_ops xen_init_ops = { .parse_memmap = xen_pv_parse_memmap, }; +/* Xen ioapic_ops implementation */ +struct ioapic_ops xen_ioapic_ops = { + .read = xen_pv_ioapic_read, + .write = xen_pv_ioapic_write, + .register_intr = xen_pv_ioapic_register_intr, +}; + static struct { const char *ev; @@ -342,6 +356,34 @@ xen_pv_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) bios_add_smap_entries(xen_smap, size, physmap, physmap_idx); } +static u_int +xen_pv_ioapic_read(volatile ioapic_t *apic, int reg) +{ + struct physdev_apic apic_op; + int rc; + + mtx_assert(&icu_lock, MA_OWNED); + + apic_op.apic_physbase = pmap_kextract((vm_offset_t) apic); + apic_op.reg = reg; + rc = HYPERVISOR_physdev_op(PHYSDEVOP_apic_read, &apic_op); + if (rc) + panic("apic_read operation failed"); + + return (apic_op.value); +} + +static void +xen_pv_ioapic_write(volatile ioapic_t *apic, int reg, u_int val) +{ +} + +static void +xen_pv_ioapic_register_intr(struct ioapic_intsrc *pin) +{ + xen_register_pirq(pin->io_irq, pin->io_activehi, pin->io_edgetrigger); +} + static void xen_pv_set_init_ops(void) { @@ -349,4 +391,6 @@ xen_pv_set_init_ops(void) init_ops = xen_init_ops; /* Disable lapic */ lapic_disabled = true; + /* IOAPIC ops for Xen PV */ + ioapic_ops = xen_ioapic_ops; } -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:38 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B47C3EF; Tue, 24 Dec 2013 11:22:38 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78750166F; Tue, 24 Dec 2013 11:22:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85272670" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:28 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:27 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4B-0007qS-G1; Tue, 24 Dec 2013 11:22:27 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 02/13] ioapic: introduce hooks for some ioapic ops Date: Tue, 24 Dec 2013 12:20:51 +0100 Message-ID: <1387884062-41154-3-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:38 -0000 Create some hooks for IO APIC operations that will diverge from bare metal when implemented for Xen Dom0. This patch should not introduce any changes in functionality, it's a preparatory patch for the implementation of the Xen IO APIC hooks. --- sys/amd64/include/apicvar.h | 13 ++++++++ sys/i386/include/apicvar.h | 13 ++++++++ sys/x86/include/apicreg.h | 12 ++++++++ sys/x86/x86/io_apic.c | 65 ++++++++++++++++++++++--------------------- 4 files changed, 71 insertions(+), 32 deletions(-) diff --git a/sys/amd64/include/apicvar.h b/sys/amd64/include/apicvar.h index 84e01d4..a48a76b 100644 --- a/sys/amd64/include/apicvar.h +++ b/sys/amd64/include/apicvar.h @@ -161,6 +161,19 @@ struct apic_enumerator { SLIST_ENTRY(apic_enumerator) apic_next; }; +struct ioapic_intsrc { + struct intsrc io_intsrc; + u_int io_irq; + u_int io_intpin:8; + u_int io_vector:8; + u_int io_cpu:8; + u_int io_activehi:1; + u_int io_edgetrigger:1; + u_int io_masked:1; + int io_bus:4; + uint32_t io_lowreg; +}; + inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), diff --git a/sys/i386/include/apicvar.h b/sys/i386/include/apicvar.h index 24c99f0..c8ee9bc 100644 --- a/sys/i386/include/apicvar.h +++ b/sys/i386/include/apicvar.h @@ -160,6 +160,19 @@ struct apic_enumerator { SLIST_ENTRY(apic_enumerator) apic_next; }; +struct ioapic_intsrc { + struct intsrc io_intsrc; + u_int io_irq; + u_int io_intpin:8; + u_int io_vector:8; + u_int io_cpu:8; + u_int io_activehi:1; + u_int io_edgetrigger:1; + u_int io_masked:1; + int io_bus:4; + uint32_t io_lowreg; +}; + inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), diff --git a/sys/x86/include/apicreg.h b/sys/x86/include/apicreg.h index 283d50e..4629470 100644 --- a/sys/x86/include/apicreg.h +++ b/sys/x86/include/apicreg.h @@ -204,6 +204,18 @@ struct IOAPIC { typedef struct IOAPIC ioapic_t; +struct ioapic_intsrc; +/* + * Struct containing pointers to IO APIC management functions whose + * implementation is run time selectable. + */ +struct ioapic_ops { + u_int (*read)(volatile ioapic_t *, int); + void (*write)(volatile ioapic_t *, int, u_int); + void (*register_intr)(struct ioapic_intsrc *); +}; +extern struct ioapic_ops ioapic_ops; + #undef PAD4 #undef PAD3 diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c index 6d62b1e..125d06a 100644 --- a/sys/x86/x86/io_apic.c +++ b/sys/x86/x86/io_apic.c @@ -81,19 +81,6 @@ static MALLOC_DEFINE(M_IOAPIC, "io_apic", "I/O APIC structures"); * ftp://download.intel.com/design/chipsets/datashts/29056601.pdf */ -struct ioapic_intsrc { - struct intsrc io_intsrc; - u_int io_irq; - u_int io_intpin:8; - u_int io_vector:8; - u_int io_cpu:8; - u_int io_activehi:1; - u_int io_edgetrigger:1; - u_int io_masked:1; - int io_bus:4; - uint32_t io_lowreg; -}; - struct ioapic { struct pic io_pic; u_int io_id:8; /* logical ID */ @@ -106,8 +93,9 @@ struct ioapic { struct ioapic_intsrc io_pins[0]; }; -static u_int ioapic_read(volatile ioapic_t *apic, int reg); -static void ioapic_write(volatile ioapic_t *apic, int reg, u_int val); +static u_int native_ioapic_read(volatile ioapic_t *apic, int reg); +static void native_ioapic_write(volatile ioapic_t *apic, int reg, u_int val); +static void native_ioapic_register_intr(struct ioapic_intsrc *pin); static const char *ioapic_bus_string(int bus_type); static void ioapic_print_irq(struct ioapic_intsrc *intpin); static void ioapic_enable_source(struct intsrc *isrc); @@ -139,6 +127,13 @@ SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0, "Enable the ExtINT pin in the first I/O APIC"); TUNABLE_INT("hw.apic.enable_extint", &enable_extint); +/* Default ioapic_ops implementation. */ +struct ioapic_ops ioapic_ops = { + .read = native_ioapic_read, + .write = native_ioapic_write, + .register_intr = native_ioapic_register_intr, +}; + static __inline void _ioapic_eoi_source(struct intsrc *isrc) { @@ -146,7 +141,7 @@ _ioapic_eoi_source(struct intsrc *isrc) } static u_int -ioapic_read(volatile ioapic_t *apic, int reg) +native_ioapic_read(volatile ioapic_t *apic, int reg) { mtx_assert(&icu_lock, MA_OWNED); @@ -155,7 +150,7 @@ ioapic_read(volatile ioapic_t *apic, int reg) } static void -ioapic_write(volatile ioapic_t *apic, int reg, u_int val) +native_ioapic_write(volatile ioapic_t *apic, int reg, u_int val) { mtx_assert(&icu_lock, MA_OWNED); @@ -163,6 +158,12 @@ ioapic_write(volatile ioapic_t *apic, int reg, u_int val) apic->iowin = val; } +static void +native_ioapic_register_intr(struct ioapic_intsrc *pin) +{ + intr_register_source(&pin->io_intsrc); +} + static const char * ioapic_bus_string(int bus_type) { @@ -212,7 +213,7 @@ ioapic_enable_source(struct intsrc *isrc) mtx_lock_spin(&icu_lock); if (intpin->io_masked) { flags = intpin->io_lowreg & ~IOART_INTMASK; - ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), flags); intpin->io_masked = 0; } @@ -229,7 +230,7 @@ ioapic_disable_source(struct intsrc *isrc, int eoi) mtx_lock_spin(&icu_lock); if (!intpin->io_masked && !intpin->io_edgetrigger) { flags = intpin->io_lowreg | IOART_INTMSET; - ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), flags); intpin->io_masked = 1; } @@ -264,10 +265,10 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) mtx_assert(&icu_lock, MA_OWNED); if (intpin->io_irq == IRQ_DISABLED || (intpin->io_irq < NUM_IO_INTS && intpin->io_vector == 0)) { - low = ioapic_read(io->io_addr, + low = ioapic_ops.read(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin)); if ((low & IOART_INTMASK) == IOART_INTMCLR) - ioapic_write(io->io_addr, + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low | IOART_INTMSET); return; @@ -311,12 +312,12 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) } /* Write the values to the APIC. */ - value = ioapic_read(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin)); + value = ioapic_ops.read(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin)); value &= ~IOART_DEST; value |= high; - ioapic_write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), value); + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), value); intpin->io_lowreg = low; - ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low); + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low); } static int @@ -357,7 +358,7 @@ ioapic_assign_cpu(struct intsrc *isrc, u_int apic_id) */ mtx_lock_spin(&icu_lock); if (!intpin->io_masked && !intpin->io_edgetrigger) { - ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), + ioapic_ops.write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), intpin->io_lowreg | IOART_INTMSET); mtx_unlock_spin(&icu_lock); DELAY(100); @@ -512,7 +513,7 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase) /* Map the register window so we can access the device. */ apic = pmap_mapdev(addr, IOAPIC_MEM_REGION); mtx_lock_spin(&icu_lock); - value = ioapic_read(apic, IOAPIC_VER); + value = ioapic_ops.read(apic, IOAPIC_VER); mtx_unlock_spin(&icu_lock); /* If it's version register doesn't seem to work, punt. */ @@ -528,9 +529,9 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase) io->io_pic = ioapic_template; mtx_lock_spin(&icu_lock); io->io_id = next_id++; - io->io_apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; + io->io_apic_id = ioapic_ops.read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; if (apic_id != -1 && io->io_apic_id != apic_id) { - ioapic_write(apic, IOAPIC_ID, apic_id << APIC_ID_SHIFT); + ioapic_ops.write(apic, IOAPIC_ID, apic_id << APIC_ID_SHIFT); mtx_unlock_spin(&icu_lock); io->io_apic_id = apic_id; printf("ioapic%u: Changing APIC ID to %d\n", io->io_id, @@ -586,8 +587,8 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase) * be routed to other CPUs later after they are enabled. */ intpin->io_cpu = PCPU_GET(apic_id); - value = ioapic_read(apic, IOAPIC_REDTBL_LO(i)); - ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET); + value = ioapic_ops.read(apic, IOAPIC_REDTBL_LO(i)); + ioapic_ops.write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET); } mtx_unlock_spin(&icu_lock); @@ -788,7 +789,7 @@ ioapic_register(void *cookie) io = (struct ioapic *)cookie; apic = io->io_addr; mtx_lock_spin(&icu_lock); - flags = ioapic_read(apic, IOAPIC_VER) & IOART_VER_VERSION; + flags = ioapic_ops.read(apic, IOAPIC_VER) & IOART_VER_VERSION; STAILQ_INSERT_TAIL(&ioapic_list, io, io_next); mtx_unlock_spin(&icu_lock); printf("ioapic%u irqs %u-%u on motherboard\n", @@ -799,7 +800,7 @@ ioapic_register(void *cookie) intr_register_pic(&io->io_pic); for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) if (pin->io_irq < NUM_IO_INTS) - intr_register_source(&pin->io_intsrc); + ioapic_ops.register_intr(pin); } /* A simple new-bus driver to consume PCI I/O APIC devices. */ -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:41 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B84B1400; Tue, 24 Dec 2013 11:22:41 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42CB51679; Tue, 24 Dec 2013 11:22:40 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85272672" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:30 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:29 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4D-0007qS-JH; Tue, 24 Dec 2013 11:22:29 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 06/13] xen: Dom0 console fixes Date: Tue, 24 Dec 2013 12:20:55 +0100 Message-ID: <1387884062-41154-7-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:41 -0000 Minor fixes and workarounds to make the Xen Dom0 console work. --- sys/dev/xen/console/xencons_ring.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/sys/dev/xen/console/xencons_ring.c b/sys/dev/xen/console/xencons_ring.c index d826363..ea97f7b 100644 --- a/sys/dev/xen/console/xencons_ring.c +++ b/sys/dev/xen/console/xencons_ring.c @@ -48,6 +48,9 @@ xencons_has_input(void) { struct xencons_interface *intf; + if (xen_initial_domain()) + return 1; + intf = xencons_interface(); return (intf->in_cons != intf->in_prod); @@ -97,6 +100,19 @@ xencons_handle_input(void *unused) XENCONS_RING_IDX cons, prod; CN_LOCK(cn_mtx); + + if (xen_initial_domain()) { + /* XXX: read from console */ + static char rbuf[16]; + int l; + + while ((l = HYPERVISOR_console_io(CONSOLEIO_read, 16, rbuf)) > 0) + xencons_rx(rbuf, l); + + CN_UNLOCK(cn_mtx); + return; + } + intf = xencons_interface(); cons = intf->in_cons; -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:42 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04684404; Tue, 24 Dec 2013 11:22:42 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82D66167A; Tue, 24 Dec 2013 11:22:40 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85272673" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:31 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:30 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4E-0007qS-Ku; Tue, 24 Dec 2013 11:22:30 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 08/13] xen: change order of Xen intr init and IO APIC registration Date: Tue, 24 Dec 2013 12:20:57 +0100 Message-ID: <1387884062-41154-9-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:42 -0000 Change order of some of the services in the SI_SUB_INTR stage, so that it follows the order: - System intr initialization - Xen intr initalization - IO APIC source registration --- sys/x86/x86/local_apic.c | 2 +- sys/x86/xen/xen_intr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 85736c8..c206281 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1383,7 +1383,7 @@ apic_setup_io(void *dummy __unused) /* Enable the MSI "pic". */ msi_init(); } -SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_SECOND, apic_setup_io, NULL); +SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_THIRD, apic_setup_io, NULL); #ifdef SMP /* diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index 340e5ed..700fd22 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -613,7 +613,7 @@ xen_intr_init(void *dummy __unused) return (0); } -SYSINIT(xen_intr_init, SI_SUB_INTR, SI_ORDER_MIDDLE, xen_intr_init, NULL); +SYSINIT(xen_intr_init, SI_SUB_INTR, SI_ORDER_SECOND, xen_intr_init, NULL); /*--------------------------- Common PIC Functions ---------------------------*/ /** -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:43 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBCA540C; Tue, 24 Dec 2013 11:22:43 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00D1E167B; Tue, 24 Dec 2013 11:22:41 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481880" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:29 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:28 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4C-0007qS-Hu; Tue, 24 Dec 2013 11:22:28 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 04/13] xen: implement basic PIRQ support for Dom0 Date: Tue, 24 Dec 2013 12:20:53 +0100 Message-ID: <1387884062-41154-5-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:43 -0000 This allows Dom0 to manage physical hardware, redirecting the physical interrupts to event channels. --- sys/x86/xen/xen_intr.c | 190 +++++++++++++++++++++++++++++++++++++++++++++-- sys/xen/xen_intr.h | 11 +++ 2 files changed, 192 insertions(+), 9 deletions(-) diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index bc0781e..340e5ed 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -104,6 +104,8 @@ DPCPU_DECLARE(struct vcpu_info *, vcpu_info); #define is_valid_evtchn(x) ((x) != 0) +#define EEXIST 17 /* Xen "already exists" error */ + struct xenisrc { struct intsrc xi_intsrc; enum evtchn_type xi_type; @@ -111,6 +113,9 @@ struct xenisrc { int xi_vector; /* Global isrc vector number. */ evtchn_port_t xi_port; int xi_pirq; + int xi_activehi:1; + int xi_edgetrigger:1; + int xi_configured:1; int xi_virq; u_int xi_close:1; /* close on unbind? */ u_int xi_needs_eoi:1; @@ -136,6 +141,9 @@ static void xen_intr_pirq_enable_source(struct intsrc *isrc); static void xen_intr_pirq_disable_source(struct intsrc *isrc, int eoi); static void xen_intr_pirq_eoi_source(struct intsrc *isrc); static void xen_intr_pirq_enable_intr(struct intsrc *isrc); +static void xen_intr_pirq_disable_intr(struct intsrc *isrc); +static int xen_intr_pirq_config_intr(struct intsrc *isrc, + enum intr_trigger trig, enum intr_polarity pol); /** * PIC interface for all event channel port types except physical IRQs. @@ -163,12 +171,12 @@ struct pic xen_intr_pirq_pic = { .pic_disable_source = xen_intr_pirq_disable_source, .pic_eoi_source = xen_intr_pirq_eoi_source, .pic_enable_intr = xen_intr_pirq_enable_intr, - .pic_disable_intr = xen_intr_disable_intr, + .pic_disable_intr = xen_intr_pirq_disable_intr, .pic_vector = xen_intr_vector, .pic_source_pending = xen_intr_source_pending, .pic_suspend = xen_intr_suspend, .pic_resume = xen_intr_resume, - .pic_config_intr = xen_intr_config_intr, + .pic_config_intr = xen_intr_pirq_config_intr, .pic_assign_cpu = xen_intr_assign_cpu }; @@ -282,11 +290,10 @@ xen_intr_find_unused_isrc(enum evtchn_type type) * object or NULL. */ static struct xenisrc * -xen_intr_alloc_isrc(enum evtchn_type type) +xen_intr_alloc_isrc(enum evtchn_type type, int vector) { static int warned; struct xenisrc *isrc; - int vector; KASSERT(mtx_owned(&xen_intr_isrc_lock), ("Evtchn alloc lock not held")); @@ -297,12 +304,19 @@ xen_intr_alloc_isrc(enum evtchn_type type) } return (NULL); } - vector = FIRST_EVTCHN_INT + xen_intr_isrc_count; - xen_intr_isrc_count++; + + if (type != EVTCHN_TYPE_PIRQ) { + vector = FIRST_EVTCHN_INT + xen_intr_isrc_count; + xen_intr_isrc_count++; + } + + KASSERT((intr_lookup_source(vector) == NULL), + ("Trying to use an already allocated vector")); mtx_unlock(&xen_intr_isrc_lock); isrc = malloc(sizeof(*isrc), M_XENINTR, M_WAITOK | M_ZERO); - isrc->xi_intsrc.is_pic = &xen_intr_pic; + isrc->xi_intsrc.is_pic = (type == EVTCHN_TYPE_PIRQ) ? + &xen_intr_pirq_pic : &xen_intr_pic; isrc->xi_vector = vector; isrc->xi_type = type; intr_register_source(&isrc->xi_intsrc); @@ -388,7 +402,7 @@ xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port, mtx_lock(&xen_intr_isrc_lock); isrc = xen_intr_find_unused_isrc(type); if (isrc == NULL) { - isrc = xen_intr_alloc_isrc(type); + isrc = xen_intr_alloc_isrc(type, 0); if (isrc == NULL) { mtx_unlock(&xen_intr_isrc_lock); return (ENOSPC); @@ -592,6 +606,10 @@ xen_intr_init(void *dummy __unused) } intr_register_pic(&xen_intr_pic); + intr_register_pic(&xen_intr_pirq_pic); + + if (bootverbose) + printf("Xen interrupt system initialized\n"); return (0); } @@ -925,6 +943,9 @@ xen_intr_pirq_disable_source(struct intsrc *base_isrc, int eoi) isrc = (struct xenisrc *)base_isrc; evtchn_mask_port(isrc->xi_port); + + if (eoi == PIC_EOI) + xen_intr_pirq_eoi_source(base_isrc); } /* @@ -966,8 +987,115 @@ xen_intr_pirq_eoi_source(struct intsrc *base_isrc) * \param isrc The interrupt source to enable. */ static void -xen_intr_pirq_enable_intr(struct intsrc *isrc) +xen_intr_pirq_enable_intr(struct intsrc *base_isrc) +{ + struct xenisrc *isrc; + struct evtchn_bind_pirq bind_pirq; + struct physdev_irq_status_query irq_status; + int error; + + isrc = (struct xenisrc *)base_isrc; + + if (!isrc->xi_configured) { + xen_intr_pirq_config_intr(base_isrc, + isrc->xi_edgetrigger ? INTR_TRIGGER_EDGE : + INTR_TRIGGER_LEVEL, + isrc->xi_activehi ? INTR_POLARITY_HIGH : + INTR_POLARITY_LOW); + } + + irq_status.irq = isrc->xi_pirq; + error = HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status); + if (error) + panic("unable to get status of IRQ#%d", isrc->xi_pirq); + + if (irq_status.flags & XENIRQSTAT_needs_eoi) + isrc->xi_needs_eoi = 1; + + bind_pirq.pirq = isrc->xi_pirq; + bind_pirq.flags = isrc->xi_edgetrigger ? 0 : BIND_PIRQ__WILL_SHARE; + error = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq); + if (error) + panic("unable to bind IRQ#%d", isrc->xi_pirq); + + isrc->xi_port = bind_pirq.port; + + mtx_lock(&xen_intr_isrc_lock); + KASSERT((xen_intr_port_to_isrc[bind_pirq.port] == NULL), + ("trying to override an already setup event channel port")); + xen_intr_port_to_isrc[bind_pirq.port] = isrc; + mtx_unlock(&xen_intr_isrc_lock); + + evtchn_unmask_port(isrc->xi_port); +} + +/* + * Disable an interrupt source. + * + * \param isrc The interrupt source to disable. + */ +static void +xen_intr_pirq_disable_intr(struct intsrc *base_isrc) +{ + struct xenisrc *isrc; + struct evtchn_close close; + int error; + + isrc = (struct xenisrc *)base_isrc; + + close.port = isrc->xi_port; + error = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close); + if (error) + panic("unable to close event channel %d IRQ#%d", + isrc->xi_port, isrc->xi_pirq); + + mtx_lock(&xen_intr_isrc_lock); + xen_intr_port_to_isrc[isrc->xi_port] = NULL; + mtx_unlock(&xen_intr_isrc_lock); + + isrc->xi_port = 0; +} + +/** + * Perform configuration of an interrupt source. + * + * \param isrc The interrupt source to configure. + * \param trig Edge or level. + * \param pol Active high or low. + * + * \returns 0 if no events are pending, otherwise non-zero. + */ +static int +xen_intr_pirq_config_intr(struct intsrc *base_isrc, enum intr_trigger trig, + enum intr_polarity pol) { + struct xenisrc *isrc = (struct xenisrc *)base_isrc; + struct physdev_setup_gsi setup_gsi; + int error; + + KASSERT(!(trig == INTR_TRIGGER_CONFORM || pol == INTR_POLARITY_CONFORM), + ("%s: Conforming trigger or polarity\n", __func__)); + + setup_gsi.gsi = isrc->xi_pirq; + setup_gsi.triggering = trig == INTR_TRIGGER_EDGE ? 0 : 1; + setup_gsi.polarity = pol == INTR_POLARITY_HIGH ? 0 : 1; + + error = HYPERVISOR_physdev_op(PHYSDEVOP_setup_gsi, &setup_gsi); + if (error == -EEXIST) { + if ((isrc->xi_edgetrigger && (trig != INTR_TRIGGER_EDGE)) || + (isrc->xi_activehi && (pol != INTR_POLARITY_HIGH))) + panic("unable to reconfigure interrupt IRQ#%d", + isrc->xi_pirq); + error = 0; + } + if (error) + panic("unable to configure IRQ#%d\n", isrc->xi_pirq); + + isrc->xi_configured = 1; + isrc->xi_activehi = pol == INTR_POLARITY_HIGH ? 1 : 0; + isrc->xi_edgetrigger = trig == INTR_POLARITY_HIGH ? 1 : 0; + + return (0); } /*--------------------------- Public Functions -------------------------------*/ @@ -1190,6 +1318,50 @@ xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, } int +xen_register_pirq(int vector, int activehi, int edgetrigger) +{ + struct physdev_map_pirq map_pirq; + struct physdev_irq alloc_pirq; + struct xenisrc *isrc; + int error; + + if (vector == 0) + return (EINVAL); + + if (bootverbose) + printf("xen: register IRQ#%d\n", vector); + + map_pirq.domid = DOMID_SELF; + map_pirq.type = MAP_PIRQ_TYPE_GSI; + map_pirq.index = vector; + map_pirq.pirq = vector; + + error = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_pirq); + if (error) { + printf("xen: unable to map IRQ#%d\n", vector); + return (error); + } + + alloc_pirq.irq = vector; + alloc_pirq.vector = 0; + error = HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, &alloc_pirq); + if (error) { + printf("xen: unable to alloc PIRQ for IRQ#%d\n", vector); + return (error); + } + + mtx_lock(&xen_intr_isrc_lock); + isrc = xen_intr_alloc_isrc(EVTCHN_TYPE_PIRQ, vector); + mtx_unlock(&xen_intr_isrc_lock); + KASSERT((isrc != NULL), ("xen: unable to allocate isrc for interrupt")); + isrc->xi_pirq = vector; + isrc->xi_activehi = activehi; + isrc->xi_edgetrigger = edgetrigger; + + return (0); +} + +int xen_intr_describe(xen_intr_handle_t port_handle, const char *fmt, ...) { char descr[MAXCOMLEN + 1]; diff --git a/sys/xen/xen_intr.h b/sys/xen/xen_intr.h index 3b339a5..eda5fdf 100644 --- a/sys/xen/xen_intr.h +++ b/sys/xen/xen_intr.h @@ -159,6 +159,17 @@ int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, xen_intr_handle_t *handlep); /** + * Register a physical interrupt vector and setup the interrupt source. + * + * \param vector The global vector to use. + * \param activehi Default polarity of the interrupt. + * \param edgetrigger Default trigger method. + * + * \returns 0 on success, otherwise an errno. + */ +int xen_register_pirq(int vector, int activehi, int edgetrigger); + +/** * Unbind an interrupt handler from its interrupt source. * * \param handlep A pointer to the opaque handle that was initialized -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:22:45 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09391414; Tue, 24 Dec 2013 11:22:45 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B5E9167D; Tue, 24 Dec 2013 11:22:43 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87481883" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:22:31 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:22:30 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4F-0007qS-5Z; Tue, 24 Dec 2013 11:22:31 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 09/13] xen: change quality of the MADT ACPI enumerator Date: Tue, 24 Dec 2013 12:20:58 +0100 Message-ID: <1387884062-41154-10-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:22:45 -0000 Lower the quality of the MADT ACPI enumerator, so on Xen Dom0 we can force the usage of the Xen mptable enumerator even when ACPI is detected. --- sys/x86/acpica/madt.c | 2 +- sys/x86/xen/mptable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 6f3b591..897189c 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -104,7 +104,7 @@ madt_probe(void) madt_physaddr = acpi_find_table(ACPI_SIG_MADT); if (madt_physaddr == 0) return (ENXIO); - return (0); + return (-50); } /* diff --git a/sys/x86/xen/mptable.c b/sys/x86/xen/mptable.c index 46b03f3..a9704ab 100644 --- a/sys/x86/xen/mptable.c +++ b/sys/x86/xen/mptable.c @@ -76,7 +76,7 @@ static struct apic_enumerator xenpv_enumerator = { static int xenpv_probe(void) { - return (-100); + return (0); } /* -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:25:27 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA762C8; Tue, 24 Dec 2013 11:25:27 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A01016EB; Tue, 24 Dec 2013 11:25:25 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85273152" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:25:19 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:25:18 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4G-0007qS-76; Tue, 24 Dec 2013 11:22:32 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 11/13] pci: introduce a new event on PCI device detection Date: Tue, 24 Dec 2013 12:21:00 +0100 Message-ID: <1387884062-41154-12-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:25:27 -0000 Add a new event that will fire each time a PCI device is added to the system, and allows us to register the device with Xen. --- sys/dev/pci/pci.c | 1 + sys/sys/eventhandler.h | 5 +++++ sys/x86/xen/pv.c | 21 +++++++++++++++++++++ sys/x86/xen/xen_nexus.c | 6 ++++++ sys/xen/pv.h | 1 + 5 files changed, 34 insertions(+), 0 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 4d8837f..2ee5093 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3293,6 +3293,7 @@ pci_add_child(device_t bus, struct pci_devinfo *dinfo) resource_list_init(&dinfo->resources); pci_cfg_save(dinfo->cfg.dev, dinfo, 0); pci_cfg_restore(dinfo->cfg.dev, dinfo); + EVENTHANDLER_INVOKE(pci_add, dinfo); pci_print_verbose(dinfo); pci_add_resources(bus, dinfo->cfg.dev, 0, 0); } diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h index 111c21b..3201848 100644 --- a/sys/sys/eventhandler.h +++ b/sys/sys/eventhandler.h @@ -269,5 +269,10 @@ typedef void (*unregister_framebuffer_fn)(void *, struct fb_info *); EVENTHANDLER_DECLARE(register_framebuffer, register_framebuffer_fn); EVENTHANDLER_DECLARE(unregister_framebuffer, unregister_framebuffer_fn); +/* PCI events */ +struct pci_devinfo; +typedef void (*pci_add_fn)(void *, struct pci_devinfo *); +EVENTHANDLER_DECLARE(pci_add, pci_add_fn); + #endif /* _SYS_EVENTHANDLER_H_ */ diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index e5ad200..a44f8ca 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -63,6 +66,8 @@ __FBSDID("$FreeBSD$"); #include +#include + /* Native initial function */ extern u_int64_t hammer_time(u_int64_t, u_int64_t); /* Xen initial function */ @@ -384,6 +389,22 @@ xen_pv_ioapic_register_intr(struct ioapic_intsrc *pin) xen_register_pirq(pin->io_irq, pin->io_activehi, pin->io_edgetrigger); } +void +xen_pv_pci_device_add(void *arg, struct pci_devinfo *dinfo) +{ + struct physdev_pci_device_add add_pci; + int error; + + bzero(&add_pci, sizeof(add_pci)); + add_pci.seg = dinfo->cfg.domain; + add_pci.bus = dinfo->cfg.bus; + add_pci.devfn = (dinfo->cfg.slot << 3) | dinfo->cfg.func; + error = HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_add, &add_pci); + if (error) + printf("unable to add device bus %u devfn %u error: %d\n", + add_pci.bus, add_pci.devfn, error); +} + static void xen_pv_set_init_ops(void) { diff --git a/sys/x86/xen/xen_nexus.c b/sys/x86/xen/xen_nexus.c index 823b3bc..60c6c5d 100644 --- a/sys/x86/xen/xen_nexus.c +++ b/sys/x86/xen/xen_nexus.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -42,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include static const char *xen_devices[] = { @@ -87,6 +89,10 @@ nexus_xen_attach(device_t dev) /* Disable some ACPI devices that are not usable by Dom0 */ setenv("debug.acpi.disabled", "cpu hpet timer"); + /* Register PCI add hook */ + EVENTHANDLER_REGISTER(pci_add, xen_pv_pci_device_add, NULL, + EVENTHANDLER_PRI_FIRST); + acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); if (acpi_dev == NULL) panic("Unable to add ACPI bus to Xen Dom0"); diff --git a/sys/xen/pv.h b/sys/xen/pv.h index a9d6eb0..ac737a7 100644 --- a/sys/xen/pv.h +++ b/sys/xen/pv.h @@ -24,5 +24,6 @@ #define __XEN_PV_H__ int xen_pv_start_all_aps(void); +void xen_pv_pci_device_add(void *, struct pci_devinfo *); #endif /* __XEN_PV_H__ */ -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:25:27 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51B202CD; Tue, 24 Dec 2013 11:25:27 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CBAA916EC; Tue, 24 Dec 2013 11:25:25 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87482286" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:25:23 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:25:22 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4G-0007qS-Ns; Tue, 24 Dec 2013 11:22:32 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 12/13] mca: disable cmc enable on Xen PV Date: Tue, 24 Dec 2013 12:21:01 +0100 Message-ID: <1387884062-41154-13-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:25:27 -0000 Xen PV guests doesn't have a lapic, so disable the lapic call in mca initialization. --- sys/x86/x86/mca.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index f1369cd..e9d2c1d 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -897,7 +897,7 @@ _mca_init(int boot) } #ifdef DEV_APIC - if (PCPU_GET(cmci_mask) != 0 && boot) + if (PCPU_GET(cmci_mask) != 0 && boot && !lapic_disabled) lapic_enable_cmc(); #endif } -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:25:29 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F32342D1; Tue, 24 Dec 2013 11:25:28 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 663DA16EF; Tue, 24 Dec 2013 11:25:27 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="85273155" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 24 Dec 2013 11:25:21 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:25:20 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4H-0007qS-8T; Tue, 24 Dec 2013 11:22:33 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 13/13] xenstore: changes needed to boot in Dom0 mode Date: Tue, 24 Dec 2013 12:21:02 +0100 Message-ID: <1387884062-41154-14-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:25:29 -0000 This patch includes changes to xenstore in order to boot as Dom0. This is different from booting as a guest, since when booted as Dom0 xenstore is not available. This patch sets up a memory page, an event channel for xenstore and disables xenbus device probing at boot. It contains a workaround for xs_watch, that should be fixed when we are able to start xenstored from Dom0. --- sys/xen/xenbus/xenbusb.c | 6 ++++-- sys/xen/xenstore/xenstore.c | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/sys/xen/xenbus/xenbusb.c b/sys/xen/xenbus/xenbusb.c index 1f84795..11be0f5 100644 --- a/sys/xen/xenbus/xenbusb.c +++ b/sys/xen/xenbus/xenbusb.c @@ -760,8 +760,10 @@ xenbusb_attach(device_t dev, char *bus_node, u_int id_components) * bus when they are dynamically attached to us * by a Xen management action. */ - (void)xenbusb_enumerate_bus(xbs); - xenbusb_probe_children(dev); + if (!xen_initial_domain()) { + (void)xenbusb_enumerate_bus(xbs); + xenbusb_probe_children(dev); + } xbs->xbs_device_watch.node = bus_node; xbs->xbs_device_watch.callback = xenbusb_devices_changed; diff --git a/sys/xen/xenstore/xenstore.c b/sys/xen/xenstore/xenstore.c index 2893c84..bde3f5d 100644 --- a/sys/xen/xenstore/xenstore.c +++ b/sys/xen/xenstore/xenstore.c @@ -1144,6 +1144,24 @@ xs_attach(device_t dev) xs.gpfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); xen_store = pmap_mapdev(xs.gpfn * PAGE_SIZE, PAGE_SIZE); } else if (xen_pv_domain()) { + if (!HYPERVISOR_start_info->store_evtchn) { + struct evtchn_alloc_unbound alloc_unbound; + + /* Allocate a local event channel for xenstore */ + alloc_unbound.dom = DOMID_SELF; + alloc_unbound.remote_dom = DOMID_SELF; + error = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound, + &alloc_unbound); + if (error) + panic("unable to alloc event channel for Dom0: %d", + error); + + HYPERVISOR_start_info->store_evtchn = alloc_unbound.port; + + /* Allocate memory for the xs shared ring */ + xen_store = malloc(PAGE_SIZE, M_XENSTORE, + M_WAITOK | M_ZERO); + } xs.evtchn = HYPERVISOR_start_info->store_evtchn; } else { panic("Unknown domain type, cannot initialize xenstore\n"); @@ -1579,6 +1597,10 @@ xs_register_watch(struct xs_watch *watch) char token[sizeof(watch) * 2 + 1]; int error; + /* XXX: this is a hack until we get xenstored working */ + if (xen_initial_domain()) + return (0); + sprintf(token, "%lX", (long)watch); sx_slock(&xs.suspend_mutex); -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 11:25:36 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80559540; Tue, 24 Dec 2013 11:25:36 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0A6816F3; Tue, 24 Dec 2013 11:25:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,542,1384300800"; d="scan'208";a="87482328" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 11:25:32 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 06:25:31 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VvQ4F-0007qS-MK; Tue, 24 Dec 2013 11:22:31 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH RFC 10/13] xen: add ACPI bus to xen_nexus when running as Dom0 Date: Tue, 24 Dec 2013 12:20:59 +0100 Message-ID: <1387884062-41154-11-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 11:25:36 -0000 Also disable a couple of ACPI devices that are not usable under Dom0. --- sys/x86/xen/xen_nexus.c | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/x86/xen/xen_nexus.c b/sys/x86/xen/xen_nexus.c index 288e6b6..823b3bc 100644 --- a/sys/x86/xen/xen_nexus.c +++ b/sys/x86/xen/xen_nexus.c @@ -35,6 +35,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include + #include #include @@ -44,7 +48,6 @@ static const char *xen_devices[] = "xenstore", /* XenStore bus */ "xen_et", /* Xen PV timer (provides: tc, et, clk) */ "xc", /* Xen PV console */ - "isa", /* Dummy ISA bus for sc to attach */ }; /* @@ -56,13 +59,14 @@ nexus_xen_probe(device_t dev) if (!xen_pv_domain()) return (ENXIO); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_SPECIFIC); } static int nexus_xen_attach(device_t dev) { int i, error = 0; + device_t acpi_dev; nexus_init_resources(); bus_generic_probe(dev); @@ -79,8 +83,22 @@ nexus_xen_attach(device_t dev) if (BUS_ADD_CHILD(dev, 0, xen_devices[i], 0) == NULL) panic("%s: could not add", xen_devices[i]); } + if (xen_initial_domain()) { + /* Disable some ACPI devices that are not usable by Dom0 */ + setenv("debug.acpi.disabled", "cpu hpet timer"); + + acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); + if (acpi_dev == NULL) + panic("Unable to add ACPI bus to Xen Dom0"); + } else { + /* Dummy ISA bus for sc to attach */ + if (BUS_ADD_CHILD(dev, 0, "isa", 0) == NULL) + panic("isa: could not add"); + } - bus_generic_attach(dev); + error = bus_generic_attach(dev); + if (xen_initial_domain() && (error == 0)) + acpi_install_wakeup_handler(device_get_softc(acpi_dev)); return (error); } -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:04 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19328997; Tue, 24 Dec 2013 15:51:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E29D41AC6; Tue, 24 Dec 2013 15:51:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2907EB95D; Tue, 24 Dec 2013 10:51:02 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 02/19] xen: add macro to detect if running as Dom0 Date: Tue, 24 Dec 2013 09:56:06 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-3-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-3-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312240956.06341.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:02 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:04 -0000 On Thursday, December 19, 2013 1:54:39 pm Roger Pau Monne wrote: > --- > sys/xen/xen-os.h | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h > index c7474d8..e8a5a99 100644 > --- a/sys/xen/xen-os.h > +++ b/sys/xen/xen-os.h > @@ -82,6 +82,13 @@ xen_hvm_domain(void) > return (xen_domain_type == XEN_HVM_DOMAIN); > } > > +static inline int > +xen_initial_domain(void) > +{ > + return (xen_domain() && HYPERVISOR_start_info && > + HYPERVISOR_start_info->flags & SIF_INITDOMAIN); > +} > + > #ifndef xen_mb > #define xen_mb() mb() > #endif This looks fine to me. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:09 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C031D6A; Tue, 24 Dec 2013 15:51:09 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52CA61ACC; Tue, 24 Dec 2013 15:51:09 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3455DB95D; Tue, 24 Dec 2013 10:51:08 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 09/19] xen: add a apic_enumerator for PVH Date: Tue, 24 Dec 2013 10:22:22 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-10-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-10-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312241022.22181.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:08 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:09 -0000 On Thursday, December 19, 2013 1:54:46 pm Roger Pau Monne wrote: > --- > sys/conf/files.amd64 | 1 + > sys/x86/xen/mptable.c | 136 My only request would be to not call this 'mptable.c' as it has nothing to do with the MP Table spec. (I realize the older Xen code made this error previously.) You could maybe call it sys/x86/xen/pv_vcpu.c or some such. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:05 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF3499A; Tue, 24 Dec 2013 15:51:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E76281AC7; Tue, 24 Dec 2013 15:51:04 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DB435B968; Tue, 24 Dec 2013 10:51:03 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 03/19] xen: add and enable Xen console for PVH guests Date: Tue, 24 Dec 2013 10:07:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-4-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-4-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201312241007.11898.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:04 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:05 -0000 On Thursday, December 19, 2013 1:54:40 pm Roger Pau Monne wrote: > diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c > index 23eaee2..e8079da 100644 > --- a/sys/dev/xen/console/console.c > +++ b/sys/dev/xen/console/console.c > @@ -69,11 +69,14 @@ struct mtx cn_mtx; > static char wbuf[WBUF_SIZE]; > static char rbuf[RBUF_SIZE]; > static int rc, rp; > -static unsigned int cnsl_evt_reg; > +unsigned int cnsl_evt_reg; > static unsigned int wc, wp; /* write_cons, write_prod */ > xen_intr_handle_t xen_intr_handle; > device_t xencons_dev; > =20 > +/* Virt address of the shared console page */ Tiny nit: I would expand "Virt" to "Virtual" > +char *console_page; > + > #ifdef KDB > static int xc_altbrk; > #endif > @@ -110,9 +113,28 @@ static struct ttydevsw xc_ttydevsw =3D { > .tsw_outwakeup =3D xcoutwakeup, > }; > =20 > +/*----------------------------- Debug function -------------------------= =2D-----*/ > +#define XC_PRINTF_BUFSIZE 1024 > +void > +xc_printf(const char *fmt, ...) > +{ > + __va_list ap; > + int retval; > + static char buf[XC_PRINTF_BUFSIZE]; > + > + va_start(ap, fmt); > + retval =3D vsnprintf(buf, XC_PRINTF_BUFSIZE - 1, fmt, ap); > + va_end(ap); > + buf[retval] =3D 0; > + HYPERVISOR_console_write(buf, retval); > +} > + vsnprintf() always nul-terminates, so you can simplify this slightly to: retval =3D vsnprintf(buf, sizeof(buf), fmt, ap); OTOH, you can't actually use 'retval' from vsnprintf as it returns the number of characters that would have been output if the buffer were infinitely long, not the number of characters output into the string. =46rom printf(3): These functions return the number of characters printed (not including the trailing `\0' used to end output to strings) or a negative value if an output error occurs, except for snprintf() and vsnprintf(), which return the number of characters that would have been printed if the si= ze were unlimited (again, not including the final `\0'). So I think what you actually want is this: void xc_printf(const char *fmt, ...) { static char buf[XC_PRINTF_BUFSIZE]; __va_list ap; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); HYPERVISOR_console_write(buf, strlen(buf)); } (And I realize this is an old bug, you were just moving an existing functio= n) > =20 > -static void > -xc_identify(driver_t *driver, device_t parent) > -{ > - device_t child; > - child =3D BUS_ADD_CHILD(parent, 0, driver_name, 0); > - device_set_driver(child, driver); > - device_set_desc(child, "Xen Console"); > -} > - Hmm, how does the device get created without an identify routine? =2D-=20 John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:12 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27519DB2; Tue, 24 Dec 2013 15:51:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F208F1AD1; Tue, 24 Dec 2013 15:51:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ED1B2B9CB; Tue, 24 Dec 2013 10:51:10 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 12/19] xen: add a hook to perform AP startup Date: Tue, 24 Dec 2013 10:25:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-13-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-13-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241025.49416.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:11 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:12 -0000 On Thursday, December 19, 2013 1:54:49 pm Roger Pau Monne wrote: > AP startup on PVH follows the PV method, so we need to add a hook in > order to diverge from bare metal. > --- > > +int native_start_all_aps(void); > + Please put this in a header instead of using an extern in the Xen PV code. is probably the best header to use. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:14 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73E98DB9; Tue, 24 Dec 2013 15:51:14 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49C8E1AD4; Tue, 24 Dec 2013 15:51:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 359C1B968; Tue, 24 Dec 2013 10:51:13 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 14/19] xen: introduce a dummy pvcpu device Date: Tue, 24 Dec 2013 10:35:18 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-15-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-15-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312241035.18783.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:13 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:14 -0000 On Thursday, December 19, 2013 1:54:51 pm Roger Pau Monne wrote: > Since Xen PVH guests doesn't have ACPI, we need to create a dummy > pvcpu device that will be used to fill the pcpu->pc_device field. Rather than have this hang directly off of nexus0, it might be better to create some sort of 'xenov0' device that takes the place of acpi0 and have the CPUs hang off of that. This is how the non-ACPI case works in the native case where the default nexus creates a 'legacy0' device that sits at the same spot in the device tree as acpi0. In sys/x86/legacy.c we create CPU devices that are a child of legacy0. In general the way the native code handes ACPI vs non-ACPI is to have a different nexus (as you've adopted) create a specific child bus (acpi0 vs legacy0). Drivers that want to only attach in one of the cases at the top- level then attach as children of those rather than children of 'nexus0'. This just adds an extra layer of protection to avoid the possibility of a top-level driver that is ACPI or non-ACPI specific being probed in the "wrong" case. Right now, all drivers that attach to 'nexus' aside from the top-level busses (acpi0 vs legacy0) are intended to work on any machine. I think the CPU driver itself looks fine, I would just encourage you to consider a xenpv0 device and to move anything PV specific to hang off of that rather than directly attaching to nexus0. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:11 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21FE1D8D; Tue, 24 Dec 2013 15:51:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EBE181ACE; Tue, 24 Dec 2013 15:51:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6E1ECB968; Tue, 24 Dec 2013 10:51:09 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 11/19] xen: changes to hvm code in order to support PVH guests Date: Tue, 24 Dec 2013 10:23:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-12-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-12-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241023.27393.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:09 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:11 -0000 On Thursday, December 19, 2013 1:54:48 pm Roger Pau Monne wrote: > On PVH we don't need to init the shared info page, or disable emulated > devices. Also, make sure PV IPIs are set before starting the APs. Looks ok to me. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:13 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AD4FDB6; Tue, 24 Dec 2013 15:51:13 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4891AD3; Tue, 24 Dec 2013 15:51:13 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1ADFCB95D; Tue, 24 Dec 2013 10:51:12 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 13/19] xen: introduce flag to disable the local apic Date: Tue, 24 Dec 2013 10:28:46 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-14-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-14-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241028.46166.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:12 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:13 -0000 On Thursday, December 19, 2013 1:54:50 pm Roger Pau Monne wrote: > PVH guests don't have an emulated lapic. Since the tests all use '!lapic_disabled' I think I would prefer to flip the name to 'lapic_valid' and have it default to true. It would just be a cosmetic change to the current patch, but I think it is more readable long- term. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:15 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74376DBD; Tue, 24 Dec 2013 15:51:15 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A33B1AD6; Tue, 24 Dec 2013 15:51:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5064CB9A3; Tue, 24 Dec 2013 10:51:14 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 15/19] xen: create a Xen nexus to use in PV/PVH Date: Tue, 24 Dec 2013 10:39:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-16-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-16-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312241039.30656.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:14 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:15 -0000 On Thursday, December 19, 2013 1:54:52 pm Roger Pau Monne wrote: > Introduce a Xen specific nexus that is going to be in charge for > attaching Xen specific devices. Remove the identify routine from Xen > devices and instead attach them from the nexus (PV/PVH) or xenpci > (HVM). As with my previous mail, I would encourage you to create a xenpv0 device and have the xen nexus be very minimal. This would let you leave the existing identify routines in place (which is cleaner / more extensible than a static table of devices that you explicitly add), but by having the PV-specific drivers attach as children of xenpv0, their identify routines would only be invoked when xenpv0 attached. You can even use an identify routine for CPUs (see cpu_identify in sys/x86/x86/legacy.c). -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:19 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1464ADF7; Tue, 24 Dec 2013 15:51:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DDFC71AE4; Tue, 24 Dec 2013 15:51:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BF204B977; Tue, 24 Dec 2013 10:51:17 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 18/19] xen: changes to gnttab for PVH Date: Tue, 24 Dec 2013 10:44:39 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-19-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-19-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241044.39255.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:17 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:19 -0000 On Thursday, December 19, 2013 1:54:55 pm Roger Pau Monne wrote: > --- > sys/xen/gnttab.c | 26 +++++++++++++++++++++----- > 1 files changed, 21 insertions(+), 5 deletions(-) I can't really speak to the correctness of this as I don't know the Xen internals well enough, but I don't see anything that looks wrong. :) -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:21 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B133E03; Tue, 24 Dec 2013 15:51:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4AEE1AE9; Tue, 24 Dec 2013 15:51:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E8F47B9A3; Tue, 24 Dec 2013 10:51:19 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 04/19] amd64: introduce hook for custom preload metadata parsers Date: Tue, 24 Dec 2013 10:47:57 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-5-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-5-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312241047.57259.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:20 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:21 -0000 On Thursday, December 19, 2013 1:54:41 pm Roger Pau Monne wrote: > --- /dev/null > +++ b/sys/xen/pv.h > @@ -0,0 +1,28 @@ > +/* > + * Permission is hereby granted, free of charge, to any person obtaining a copy > + * of this software and associated documentation files (the "Software"), to > + * deal in the Software without restriction, including without limitation the > + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the Software is > + * furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > + * DEALINGS IN THE SOFTWARE. One non-technical question. This license statement doesn't actually say who the copyright belongs to which seems problematic. Would it be possible to use FreeBSD's preferred 2-clause BSD license on this file? -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:06 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F0AAA5A; Tue, 24 Dec 2013 15:51:06 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 04B6C1AC8; Tue, 24 Dec 2013 15:51:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E236AB977; Tue, 24 Dec 2013 10:51:04 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 05/19] xen: rework xen timer so it can be used early in boot process Date: Tue, 24 Dec 2013 10:08:07 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-6-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-6-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241008.07281.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:05 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:06 -0000 On Thursday, December 19, 2013 1:54:42 pm Roger Pau Monne wrote: > This should not introduce any functional change, and makes the > functions suitable to be called before we have actually mapped the > vcpu_info struct on a per-cpu basis. Looks fine to me. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:07 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4162FB63; Tue, 24 Dec 2013 15:51:07 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 142351AC9; Tue, 24 Dec 2013 15:51:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 07B23B995; Tue, 24 Dec 2013 10:51:06 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 06/19] xen: implement an early timer for Xen PVH Date: Tue, 24 Dec 2013 10:17:52 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-7-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-7-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241017.52700.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:06 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:07 -0000 On Thursday, December 19, 2013 1:54:43 pm Roger Pau Monne wrote: > When running as a PVH guest, there's no emulated i8254, so we need to > use the Xen PV timer as the early source for DELAY. This change allows > for different implementations of the early DELAY function and > implements a Xen variant for it. This mostly looks good to me. I would perhaps move DELAY() itself into delay.c if it isn't too ugly to do so. I guess it would look something like: #if !(defined(__i386__) && defined(XEN)) void DELAY(int n) { if (delay_tc(n)) return; #ifdef __amd64__ init_ops.early_delay(n); #else i8254_delay(n); } #endif This would let you leave delay_tc() private to delay.c. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:16 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CAF6DE0; Tue, 24 Dec 2013 15:51:16 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63B081AD9; Tue, 24 Dec 2013 15:51:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5066DB95D; Tue, 24 Dec 2013 10:51:15 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 16/19] xen: add shutdown hook for PVH Date: Tue, 24 Dec 2013 10:40:12 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-17-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-17-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241040.13063.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:15 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:16 -0000 On Thursday, December 19, 2013 1:54:53 pm Roger Pau Monne wrote: > Add the PV shutdown hook to PVH. > --- > sys/dev/xen/control/control.c | 37 ++++++++++++++++++------------------- > 1 files changed, 18 insertions(+), 19 deletions(-) This looks fine to me. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:17 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6467DEE; Tue, 24 Dec 2013 15:51:17 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB2151ADC; Tue, 24 Dec 2013 15:51:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B373FB968; Tue, 24 Dec 2013 10:51:16 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 17/19] xen: xenstore changes to support PVH Date: Tue, 24 Dec 2013 10:43:33 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-18-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-18-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241043.33947.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:16 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:17 -0000 On Thursday, December 19, 2013 1:54:54 pm Roger Pau Monne wrote: > --- > sys/xen/xenstore/xenstore.c | 21 ++++++++++----------- > 1 files changed, 10 insertions(+), 11 deletions(-) This looks fine modulo possibly making it a xenpv child instead of a nexus child. Note that even in the old XEN code in FreeBSD I would argue that attaching directly to nexus is wrong and that even the old XEN code should create some sort of top-level device below nexus0 that is XEN-specific for XEN- specific drivers to attach to. I've no idea what shape the old XEN-specific code is in or if it can be tested, but I'd really like PVH to do the right thing if at all possible. > diff --git a/sys/xen/xenstore/xenstore.c b/sys/xen/xenstore/xenstore.c > index bcf6357..2893c84 100644 > --- a/sys/xen/xenstore/xenstore.c > +++ b/sys/xen/xenstore/xenstore.c > @@ -229,13 +229,11 @@ struct xs_softc { > */ > struct sx xenwatch_mutex; > > -#ifdef XENHVM > /** > * The HVM guest pseudo-physical frame number. This is Xen's mapping > * of the true machine frame number into our "physical address space". > */ > unsigned long gpfn; > -#endif > > /** > * The event channel for communicating with the > @@ -1141,13 +1139,15 @@ xs_attach(device_t dev) > /* Initialize the interface to xenstore. */ > struct proc *p; > > -#ifdef XENHVM > - xs.evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN); > - xs.gpfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); > - xen_store = pmap_mapdev(xs.gpfn * PAGE_SIZE, PAGE_SIZE); > -#else > - xs.evtchn = xen_start_info->store_evtchn; > -#endif > + if (xen_hvm_domain()) { > + xs.evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN); > + xs.gpfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); > + xen_store = pmap_mapdev(xs.gpfn * PAGE_SIZE, PAGE_SIZE); > + } else if (xen_pv_domain()) { > + xs.evtchn = HYPERVISOR_start_info->store_evtchn; > + } else { > + panic("Unknown domain type, cannot initialize xenstore\n"); > + } > > TAILQ_INIT(&xs.reply_list); > TAILQ_INIT(&xs.watch_events); > @@ -1256,9 +1256,8 @@ static devclass_t xenstore_devclass; > > #ifdef XENHVM > DRIVER_MODULE(xenstore, xenpci, xenstore_driver, xenstore_devclass, 0, 0); > -#else > -DRIVER_MODULE(xenstore, nexus, xenstore_driver, xenstore_devclass, 0, 0); > #endif > +DRIVER_MODULE(xenstore, nexus, xenstore_driver, xenstore_devclass, 0, 0); > > /*------------------------------- Sysctl Data --------------------------------*/ > /* XXX Shouldn't the node be somewhere else? */ > -- > 1.7.7.5 (Apple Git-26) > > -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:20 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23A2EDFF; Tue, 24 Dec 2013 15:51:20 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED1A81AE7; Tue, 24 Dec 2013 15:51:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E0953B995; Tue, 24 Dec 2013 10:51:18 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 19/19] isa: allow ISA bus to attach to the nexus Date: Tue, 24 Dec 2013 10:45:10 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-20-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-20-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241045.10382.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:19 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:20 -0000 On Thursday, December 19, 2013 1:54:56 pm Roger Pau Monne wrote: > --- > sys/x86/isa/isa.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) If you go the xenpv route, you would replace 'nexus' with 'xenpv' here. > diff --git a/sys/x86/isa/isa.c b/sys/x86/isa/isa.c > index 1a57137..09d1ab7 100644 > --- a/sys/x86/isa/isa.c > +++ b/sys/x86/isa/isa.c > @@ -241,3 +241,6 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, > * On this platform, isa can also attach to the legacy bus. > */ > DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); > +#ifdef XENHVM > +DRIVER_MODULE(isa, nexus, isa_driver, isa_devclass, 0, 0); > +#endif > -- > 1.7.7.5 (Apple Git-26) > > -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 15:51:08 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52F9AC81; Tue, 24 Dec 2013 15:51:08 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2841B1ACA; Tue, 24 Dec 2013 15:51:08 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 192AEB9A3; Tue, 24 Dec 2013 10:51:07 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 08/19] xen: use the same hypercall mechanism for XEN and XENHVM Date: Tue, 24 Dec 2013 10:19:04 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-9-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-9-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241019.04401.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:07 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:08 -0000 On Thursday, December 19, 2013 1:54:45 pm Roger Pau Monne wrote: > --- > sys/amd64/include/xen/hypercall.h | 7 ------- > sys/i386/i386/locore.s | 9 +++++++++ > sys/i386/include/xen/hypercall.h | 8 -------- > sys/x86/xen/hvm.c | 24 ++++++++++-------------- > 4 files changed, 19 insertions(+), 29 deletions(-) Looks good to me. -- John Baldwin From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 16:48:00 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00BE3501; Tue, 24 Dec 2013 16:47:59 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6831B1018; Tue, 24 Dec 2013 16:47:58 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,544,1384300800"; d="scan'208";a="87560885" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Dec 2013 16:47:55 +0000 Received: from [IPv6:::1] (10.80.16.47) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Tue, 24 Dec 2013 11:47:55 -0500 Message-ID: <52B9BAB9.1000103@citrix.com> Date: Tue, 24 Dec 2013 17:47:53 +0100 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: [PATCH v7 04/19] amd64: introduce hook for custom preload metadata parsers References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-5-git-send-email-roger.pau@citrix.com> <201312241047.57259.jhb@freebsd.org> In-Reply-To: <201312241047.57259.jhb@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 16:48:00 -0000 On 24/12/13 16:47, John Baldwin wrote: > On Thursday, December 19, 2013 1:54:41 pm Roger Pau Monne wrote: >> --- /dev/null >> +++ b/sys/xen/pv.h >> @@ -0,0 +1,28 @@ >> +/* >> + * Permission is hereby granted, free of charge, to any person obtaining a copy >> + * of this software and associated documentation files (the "Software"), to >> + * deal in the Software without restriction, including without limitation the >> + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or >> + * sell copies of the Software, and to permit persons to whom the Software is >> + * furnished to do so, subject to the following conditions: >> + * >> + * The above copyright notice and this permission notice shall be included in >> + * all copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER >> + * DEALINGS IN THE SOFTWARE. > > One non-technical question. This license statement doesn't actually say who the > copyright belongs to which seems problematic. Would it be possible to use FreeBSD's > preferred 2-clause BSD license on this file? I copied the license from sys/xen/hvm.h without realizing it was not the standard 2-clause BSD one, but I don't have any problem changing it (maybe we should also change hvm.h?) to match the license in pv.c. From owner-freebsd-xen@FreeBSD.ORG Tue Dec 24 17:13:17 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E31A5C2F; Tue, 24 Dec 2013 17:13:17 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A99BD11F8; Tue, 24 Dec 2013 17:13:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 93015B968; Tue, 24 Dec 2013 12:13:15 -0500 (EST) From: John Baldwin To: Roger Pau =?utf-8?q?Monn=C3=A9?= Subject: Re: [PATCH v7 04/19] amd64: introduce hook for custom preload metadata parsers Date: Tue, 24 Dec 2013 12:05:21 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <201312241047.57259.jhb@freebsd.org> <52B9BAB9.1000103@citrix.com> In-Reply-To: <52B9BAB9.1000103@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201312241205.21806.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 12:13:15 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 17:13:18 -0000 On Tuesday, December 24, 2013 11:47:53 am Roger Pau Monn=C3=A9 wrote: > On 24/12/13 16:47, John Baldwin wrote: > > On Thursday, December 19, 2013 1:54:41 pm Roger Pau Monne wrote: > >> --- /dev/null > >> +++ b/sys/xen/pv.h > >> @@ -0,0 +1,28 @@ > >> +/* > >> + * Permission is hereby granted, free of charge, to any person obtain= ing a copy > >> + * of this software and associated documentation files (the "Software= "), to > >> + * deal in the Software without restriction, including without limita= tion the > >> + * rights to use, copy, modify, merge, publish, distribute, sublicens= e, and/or > >> + * sell copies of the Software, and to permit persons to whom the Sof= tware is > >> + * furnished to do so, subject to the following conditions: > >> + * > >> + * The above copyright notice and this permission notice shall be inc= luded in > >> + * all copies or substantial portions of the Software. > >> + * > >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EX= PRESS OR > >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTAB= ILITY, > >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT = SHALL THE > >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR O= THER > >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, AR= ISING > >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > >> + * DEALINGS IN THE SOFTWARE. > >=20 > > One non-technical question. This license statement doesn't actually sa= y who the > > copyright belongs to which seems problematic. Would it be possible to = use FreeBSD's > > preferred 2-clause BSD license on this file? >=20 > I copied the license from sys/xen/hvm.h without realizing it was not the > standard 2-clause BSD one, but I don't have any problem changing it > (maybe we should also change hvm.h?) to match the license in pv.c. The license in pv.c is perfect. For hvm.h, if that could be changed to the 2-clause BSD license, that would also be great. I'll leave that up you to and Justin to determine if that change is ok to make. =2D-=20 John Baldwin From owner-freebsd-xen@FreeBSD.ORG Sat Dec 28 16:28:05 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D26F96E1 for ; Sat, 28 Dec 2013 16:28:05 +0000 (UTC) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 9961F1833 for ; Sat, 28 Dec 2013 16:28:05 +0000 (UTC) Received: from study64.tdx.co.uk (study64.tdx.co.uk [62.13.130.231]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/) with ESMTP id rBSGOkVh056199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 28 Dec 2013 16:24:46 GMT Date: Sat, 28 Dec 2013 16:24:46 +0000 From: Karl Pielorz To: freebsd-xen@freebsd.org Subject: Panic booting with FreeBSD 10 r259073 under XenServer 6.2 Message-ID: X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 16:28:05 -0000 Hi, I just updated a Xen guest here (I'm running FreeBSD under XenServer 6.2 on an Intel E3 based machine). I went from 9.2-STABLE to 10 'stable' (i.e. I just checked out base/stable/10 - and built it). svn info shows it's r259073. The build / install all went OK - but booting the new kernel for the first time (GENERIC) I get the following panic: " Netvsc initializing... SMP: AP CPU #7 Launched! panic: can't schedule timer cpuid = 0 KDB: stack backtrace: #0 0xffffffff808e7d30 at kdb_backtrace+0x60 #1 0xffffffff808af815 at panic+0x155 #2 0xffffffff807a13fd at xentimer_et_start+0xed #3 0xffffffff80d66c2d at loadtimer+0xfd #4 0xffffffff80d656bd at handleevents+0x2dd #5 0xffffffff80d65e88 at timercb+0x308 #6 0xffffffff807a144d at xentimer_intr+0x4d #7 0xffffffff80883dbb at intr_event_handle+0x9b #8 0xffffffff80d8d088 at intr_execute_handlers+0x48 #9 0xffffffff80d967c9 at xen_intr_handle_upcall+0x159 #10 0xffffffff80c75f6c at Xxen_intr_upcall+0x8c #11 0xffffffff80861158 at mi_startup+0x118 #12 0xffffffff802d3ddc at btext+0x2c " I know there's been a flurry of Xen patches submitted to the list recently - but I'm playing catchup with mail at the moment. Is the above a known issue? / Any suggestions? Thanks, -Karl From owner-freebsd-xen@FreeBSD.ORG Sat Dec 28 19:04:03 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4AF4EAC for ; Sat, 28 Dec 2013 19:04:03 +0000 (UTC) Received: from 3r6s4.syminet.com (3r6s4.syminet.com [74.80.234.42]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BEECA127E for ; Sat, 28 Dec 2013 19:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=shankerbalan.net; s=x; h=To:References:Message-Id:Content-Transfer-Encoding:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=rBOCVe2Sx29XlzkoGYhkHf+Xqs7R6Zsmsf5vAmu9ztg=; b=8Jj+xWjE+QXwvSYxbphOD69FwD1yUN93W2dG1EyunhDS6L6RT1flSl0dJs+Mm796uKkrOv32MwSCHg59IRUKv3YCAJqPSU72keohRiVhYiKHaiVH564PJmQ8EoVH+msS; Received: from [124.40.244.169] (helo=buffy.lan) by 3r6s4.syminet.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1VwyZW-0000ah-0j for freebsd-xen@freebsd.org; Sat, 28 Dec 2013 10:25:14 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Panic booting with FreeBSD 10 r259073 under XenServer 6.2 From: Shanker Balan In-Reply-To: Date: Sat, 28 Dec 2013 23:55:06 +0530 Content-Transfer-Encoding: quoted-printable Message-Id: <119A8473-DC39-4AFD-AE7B-44707D61200D@shankerbalan.net> References: To: freebsd-xen@freebsd.org X-Mailer: Apple Mail (2.1827) X-Antiabuse: This header was added to track abuse, please include it with any abuse report X-Antiabuse: Primary Hostname - 3r6s4.syminet.com X-Antiabuse: Original Domain - freebsd.org X-Antiabuse: Originator/Caller UID/GID - [105 113] / [105 113] X-Antiabuse: Sender Address Domain - shankerbalan.net X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 19:04:04 -0000 On 28-Dec-2013, at 9:54 pm, Karl Pielorz wrote: >=20 > Hi, >=20 > I just updated a Xen guest here (I'm running FreeBSD under XenServer = 6.2 on an Intel E3 based machine). >=20 > I went from 9.2-STABLE to 10 'stable' (i.e. I just checked out = base/stable/10 - and built it). >=20 > svn info shows it's r259073. >=20 > The build / install all went OK - but booting the new kernel for the = first time (GENERIC) I get the following panic: >=20 > " > Netvsc initializing... SMP: AP CPU #7 Launched! > panic: can't schedule timer > cpuid =3D 0 > KDB: stack backtrace: > #0 0xffffffff808e7d30 at kdb_backtrace+0x60 > #1 0xffffffff808af815 at panic+0x155 > #2 0xffffffff807a13fd at xentimer_et_start+0xed > #3 0xffffffff80d66c2d at loadtimer+0xfd > #4 0xffffffff80d656bd at handleevents+0x2dd > #5 0xffffffff80d65e88 at timercb+0x308 > #6 0xffffffff807a144d at xentimer_intr+0x4d > #7 0xffffffff80883dbb at intr_event_handle+0x9b > #8 0xffffffff80d8d088 at intr_execute_handlers+0x48 > #9 0xffffffff80d967c9 at xen_intr_handle_upcall+0x159 > #10 0xffffffff80c75f6c at Xxen_intr_upcall+0x8c > #11 0xffffffff80861158 at mi_startup+0x118 > #12 0xffffffff802d3ddc at btext+0x2c > " >=20 > I know there's been a flurry of Xen patches submitted to the list = recently - but I'm playing catchup with mail at the moment. Is the above = a known issue? / Any suggestions? FreeBSD 10 RC3 r259778 is what I am running under XenServer 6.2 here = which seems to work fine. root@gw1-1:~ # uname -a FreeBSD gw1-1 10.0-RC3 FreeBSD 10.0-RC3 #0 r259778: Tue Dec 24 04:35:46 = UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 Regards. @shankerbalan From owner-freebsd-xen@FreeBSD.ORG Sat Dec 28 23:40:54 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD2D74EA for ; Sat, 28 Dec 2013 23:40:54 +0000 (UTC) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 93AC9145D for ; Sat, 28 Dec 2013 23:40:54 +0000 (UTC) Received: from study64.tdx.co.uk (study64.tdx.co.uk [62.13.130.231]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/) with ESMTP id rBSNepDN098921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Dec 2013 23:40:52 GMT Date: Sat, 28 Dec 2013 23:40:51 +0000 From: Karl Pielorz To: Shanker Balan , freebsd-xen@freebsd.org Subject: Re: Panic booting with FreeBSD 10 r259073 under XenServer 6.2 Message-ID: <768C7B93F2F9C7274D757967@study64.tdx.co.uk> In-Reply-To: <119A8473-DC39-4AFD-AE7B-44707D61200D@shankerbalan.net> References: <119A8473-DC39-4AFD-AE7B-44707D61200D@shankerbalan.net> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 23:40:54 -0000 --On 28 December 2013 23:55:06 +0530 Shanker Balan wrote: > FreeBSD 10 RC3 r259778 is what I am running under XenServer 6.2 here which > seems to work fine. In trying to get that revision - I found our local SVN mirror repository stopped updating around the 7th of December - I'm fixing that up - then I'll give RC3 a go (or any code basically after the 7th of December would be nice :) Cheers, -Karl