From owner-freebsd-xen@FreeBSD.ORG Tue Aug 27 22:51:01 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 ESMTP id CB1A6AB1 for ; Tue, 27 Aug 2013 22:51:01 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm12-vm10.bullet.mail.gq1.yahoo.com (nm12-vm10.bullet.mail.gq1.yahoo.com [98.136.218.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF9428F6 for ; Tue, 27 Aug 2013 22:51:01 +0000 (UTC) Received: from [98.137.12.188] by nm12.bullet.mail.gq1.yahoo.com with NNFMP; 27 Aug 2013 22:45:05 -0000 Received: from [208.71.42.199] by tm9.bullet.mail.gq1.yahoo.com with NNFMP; 27 Aug 2013 22:45:05 -0000 Received: from [127.0.0.1] by smtp210.mail.gq1.yahoo.com with NNFMP; 27 Aug 2013 22:45:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377643505; bh=yqKifi/ZbYMgybZiGWsZ0fWPuKNqjFhFyzIKFJhzS5A=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=Idw7yi/p4G2OdyYuix+fcsBJlhds3oLb6Qpwi0bLdqe9eYL/DbRWr2GU5GAuhw6gOi35eElkXmxB3bWoKEX0m35+hL1beh3Ai00zmlko61e8iaF0SgCyn8Smlv3xgYsQTJyEpR21H6ep/jxs4DYttheGNSuzlP2GxQbVNkzj9qU= X-Yahoo-Newman-Id: 530024.38303.bm@smtp210.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: PGWrQ8kVM1lkIqfKZ5JUBDm4VgcFmJLBDFCmxIVFubu_WBQ vPmHm.WTKeAV3lrbz8LqGsiXJcNWI9EsYnkXxeJISnDYiREkqnCgjMiwssca QYOZMSGVx6Ce1CpUfe7RDpvzVTJMmNJmjda_9ujqAzJJd_8jH_QpRLKammVs u1G1xwhw.tWrolJv7WIQ8TUPz8.2ThsltDzWRcryoGVo4Zrx5guzFkRbwob5 zxBn52hs.OcnfkCUxJJr1i8krG.YV_QtT5aCcIpGrknrF4zj4udsclnGZSru HOkLvyYbZpQ9gRhKJ88q5ssOC7u_xLd2ZIdytBa6wSZow_MQGAXh3wkblOLV ACbpuaMKspjaWYrOopI0lVSseaf1_dGJv_Dmc85Hhc76YRsuCUTOZiwdVcxa NwY2c1pCNsPRIsm4BaBSRzm8iuDmP1VCcUaa68671LToKW34_VJh3L7mx99c QehUclMpqnZvMlxp07Gr08K9ZgS1Vpv34l4VUQvVfTxyxrOHH24jexRA2f43 MWt6uY02Ij9FOVqobvLfkxVg.Mtjcrwpz1lDDI4aAGKc0DbhjklpdvHNOQUx dYQ-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp210.mail.gq1.yahoo.com with SMTP; 27 Aug 2013 15:45:04 -0700 PDT Subject: Re: CFT: replacing XENHVM kernel config with GENERIC + xenhvm.ko From: Sean Bruno To: Colin Percival In-Reply-To: <521C3452.8080209@freebsd.org> References: <521C3452.8080209@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-dsnHfNzYIWVjD/CFc16Y" Date: Tue, 27 Aug 2013 15:45:03 -0700 Message-ID: <1377643503.6359.15.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org 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, 27 Aug 2013 22:51:02 -0000 --=-dsnHfNzYIWVjD/CFc16Y Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mon, 2013-08-26 at 22:08 -0700, Colin Percival wrote: > Hi all, >=20 > I've attached a patch which eliminates the XENHVM kernel configuration an= d > instead allows FreeBSD to run under Xen/HVM with PV drivers by loading a > new xenhvm.ko module from the boot loader. This will mean that FreeBSD > virtual machines running under Xen/HVM will be able to run "straight off > the ISO" binaries; this will also mean they will be able to use FreeBSD > Update to update the kernel. >=20 > I have spent about 10 minutes testing this in Amazon EC2. Please help me > out by doing some more testing. ;-) >=20 > The fine details: > 1. I've created a new kernel module for i386 and amd64, "xenhvm", with al= l > of the source files which were added via "options XENHVM" and "device xen= pci". > 2. I have removed those from sys/conf/files and sys/conf/options.*; those > options are now meaningless. > 3. I moved the "detect Xen and disable QEMU emulated devices" code from > sys/amd64/amd64/machdep.c to the kernel module MOD_LOAD event handler. > 4. I have made the PCPU values required by Xen/HVM support -- two unsigne= d > ints -- unconditionally compiled in. This is the only change to the GENE= RIC > kernel. > 5. I have removed the XENHVM kernel configuration files. >=20 > Depending on feedback from freebsd-xen@ I hope to send this to freebsd-cu= rrent > for wider review later this week and then commit it before the FreeBSD 10= .0 > code freeze starts on September 7th. Seems like you've got a winner there. $ uname -a FreeBSD ujvl 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r254959M: Tue Aug 27 18:29:11 EDT 2013 sbruno@ujvl:/usr/obj/usr/src/sys/GENERIC amd64 $ kldstat Id Refs Address Size Name 1 21 0xffffffff80200000 168eaa0 kernel 2 1 0xffffffff8188f000 76ef8 xenhvm.ko 3 1 0xffffffff81a12000 34e0 ums.ko 4 1 0xffffffff81a16000 312c5 pf.ko 5 1 0xffffffff81a48000 643d nullfs.ko 6 1 0xffffffff81a4f000 52c1 fdescfs.ko ------------------------------------------------------------------------ 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 10.0-CURRENT #0 r254959M: Tue Aug 27 18:29:11 EDT 2013 sbruno@ujvl:/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. CPU: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (2400.05-MHz K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x206c2 Family =3D 0x6 Model =3D 0x2c Stepping =3D 2 Features=3D0x1781fbff Features2=3D0x81b82201 AMD Features=3D0x28100800 AMD Features2=3D0x1 real memory =3D 536870912 (512 MB) avail memory =3D 490692608 (467 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 2 ioapic0: Changing APIC ID to 1 MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-47 on motherboard random: initialized kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) acpi0: Sleep Button (fixed) acpi0: reservation of 0, a0000 (3) failed cpu0: on acpi0 cpu1: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0xb008-0xb00b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc1a0-0xc1af at device 1.1 on pci0 ata0: at channel 0 on atapci0 ata1: at channel 1 on atapci0 uhci0: port 0xc180-0xc19f irq 23 at device 1.2 on pci0 usbus0: controller did not stop usbus0 on uhci0 pci0: at device 1.3 (no driver attached) vgapci0: mem 0xf0000000-0xf1ffffff,0xf3040000-0xf3040fff at device 2.0 on pci0 xenpci0: port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 28 at device 3.0 on pci0 xenstore0: on xenpci0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse Explorer, device ID 4 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: does not respond device_attach: fdc0 attach returned 6 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 qpi0: on motherboard orm0: at iomem 0xc9000-0xc97ff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fdc0: No FDOUT register! Timecounters tick every 10.000 msec usbus0: 12Mbps Full Speed USB v1.0 xctrl0: on xenstore0 ugen0.1: at usbus0 uhub0: on usbus0 xenbusb_front0: on xenstore0 can't re-use a leaf (max_requests)! xn0: at device/vif/0 on xenbusb_front0 xn0: Ethernet address: 00:16:3e:0b:9b:56 xn1: at device/vif/1 on xenbusb_front0 xn1: Ethernet address: 00:16:3e:50:c5:a7 xenbusb_back0: on xenstore0 xn0: backend features: feature-sg feature-gso-tcp4 xn1: backend features: feature-sg feature-gso-tcp4 xbd0: 20480MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ada0 SMP: AP CPU #1 Launched! WARNING: WITNESS option enabled, expect reduced performance. uhub0: 2 ports with 2 removable, self powered Root mount waiting for: usbus0 Root mount waiting for: usbus0 ugen0.2: at usbus0 Trying to mount root from ufs:/dev/ada0p2 [rw]... xn0: 2 link states coalesced ums0: on usbus0 ums0: 3 buttons and [Z] coordinates ID=3D0 --=-dsnHfNzYIWVjD/CFc16Y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSHSvvAAoJEBkJRdwI6BaHluwIAIFqc2CzgmO2yz0swT/piSbR g87DzRw6777CbW5N6zAsqKIuuTTmpkRhnG4XuzjH1POZltceuAjx0N1lN/P8Zbuv jF9FxiBgZW+RFeCc3CAda8fmrHsfsl375vhAi6eL81DGQQL122h+yZ78TgYffL0M VRc21oCa28BXYlVTS+yj3WrsWel9sNlHTlI4vqMPf6rVnfqwlMU1IoSWKcEW/QdC S26vaYCcd+fB9pIX5RKuH4rPsu0baq7DBeXUY2Px9u/jJCDIZzNDQrQ/aVCW4u1Z n98wov5/tSJYcVHBr5ujJzYNMf2qcDk2yyXT+FcidfiR3OGEBJT9LwJzRBqhd2Q= =6/vn -----END PGP SIGNATURE----- --=-dsnHfNzYIWVjD/CFc16Y--