From owner-freebsd-xen@FreeBSD.ORG Sun Nov 23 22:35:47 2014 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 223D78FF for ; Sun, 23 Nov 2014 22:35:47 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9ED6FF0 for ; Sun, 23 Nov 2014 22:35:46 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id r20so4042461wiv.14 for ; Sun, 23 Nov 2014 14:35:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=+sQpCgU+qt991lh/coGETM1ZWjjILSKkoSL9AqfQqAE=; b=kMQv6Jj9+QT0tnDKR0gbZc76hGFPZNPEtp4U4qykMk+xNI0PSrmAc3rRml7RpPt24I NyEsWo1TMieW5mpIic1X9M8wNqXDI5EAgHv/Ydvs/e4aUG0xxn4j58fldWORsb7hUIOW tt0wOfG2QW4i7yo846Vkwohi0FbgWbpmXgBMVt3vkDohQWvhaAjAvWtvWYgJd1zc/VQn AmbiKz9JtmrUcx48aa3BxVrRCLASpQmy1S7U3pZ3RDfVuh2IGgiYYsV7L4blmnHAqy2F nvkGaMVeCldYzsVPsOnBDk1bmC8Hw5KvLxOpzODlByjY0dK2h1H2/1ubIpZKob4uwpaA Vf5g== X-Gm-Message-State: ALoCoQmQ0juz5CQfacz5WluUpaGPpuVJ5dUnsNABg7JPx4IUV+BByEOtxSaolxMBKXxI4+NqtjZK X-Received: by 10.180.84.98 with SMTP id x2mr4543548wiy.14.1416782138900; Sun, 23 Nov 2014 14:35:38 -0800 (PST) Received: from Juliens-MacBook-Pro.local (cpc12-cmbg15-2-0-cust92.5-4.cable.virginm.net. [86.30.247.93]) by mx.google.com with ESMTPSA id 4sm15024749wjs.24.2014.11.23.14.35.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Nov 2014 14:35:38 -0800 (PST) Message-ID: <54726138.3090003@linaro.org> Date: Sun, 23 Nov 2014 22:35:36 +0000 From: Julien Grall User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-xen@freebsd.org, "xen-devel@lists.xen.org" , gibbs@freebsd.org, freebsd-arm@freebsd.org, roger.pau@citrix.com Subject: [RFC v2] Add support for Xen ARM guest on FreeBSD Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Denis Schneider , Ian Campbell , Stefano Stabellini X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 23 Nov 2014 22:35:47 -0000 Hello all, At the beginning of the year, I have sent a first RFC to add support for FreeBSD on Xen ARM [1]. The first version was very primitive: hardcoded DTB, only single user-mode support,... Since then, I have improved the support and rebased everything on master. Thanks for the FreeBSD ARM team which did a great job and remove all most of my issues (Userspace hanging, Device Tree Bindings). Major changes in this new version: * Add Device Tree support via Linux Boot ABI * Add zImage support * Netfront support * Blkfront fixes * DOM0 support (separate branch see below) The former item is very hackish. I was wondering if there is another way to do it? Or maybe we should support FreeBSD Bootloader in ARM guest? The patch series is divided in X parts: * #1 - #14: Clean up and bug fixes for Xen. They can be applied without the rest of the series * #15 - #19: Update Xen interface to 4.4 and fix compilation. It's required for ARM. * #20 - #26: Update Xen code to support ARM * #27 - #33: Rework the event channel code for supporting ARM. I will work with Royger to come with a common interface with x86 * #34 - #36: Add support for ARM in Xen code * #37 - #46: ARM bug fixes and new features. Some of thoses patches (#37 - #40) could be applied without the rest of the series * #47 - #48: Add Xen ARM platform I don't really know how works patch review on Freebsd. Therefore, I provided the series in git format and file format. All based on Royger's pvh dom0 work v8: git://xenbits.xen.org/people/julieng/freebsd.git branch xen-arm-v2 http://xenbits.xen.org/people/julieng/xen-arm-v2.1/ As said above, there is a separate branch for DOM0, the patches are not part of this series. The support has been done and demoed for the Arndale (though I've been tested since a while), but there is lots of work to clean up (device tree stuff and hack in the code): git://xenbits.xen.org/people/julieng/freebsd.git branch dom0-arm-v0 http://xenbits.xen.org/people/julieng/dom0-arm-v0 TODO: * Add SMP/PSCI support in FreeBSD. Could be useful other platform too * Only FreeBSD to load anywhere. Currently there is a 2M alignment which require a patch in Xen. * ELF support in Xen ARM? Not sure it's useful. Any help, comments, questions are welcomed. Sincerely yours, [1] http://lists.freebsd.org/pipermail/freebsd-xen/2014-January/001974.html ============= Instruction to test FreeBSD on Xen on ARM =========== FreeBSD miss some support to fully boot on Xen ARM. This patch applied to Xen ARM help FreeBSD to boot correctly for the time being: * https://patches.linaro.org/32742/ To compile and boot Xen on your board, you can refer to the wiki page: http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions The instruction to compile FreeBSD for Xen on ARM: $ truncate -s 512 xenvm.img $ sudo mdconfig -f xenvm.img -u0 $ sudo newfs /dev/md0 $ sudo mount /dev/md0 /mnt $ sudo make TARGET_ARCH=armv6 kernel-toolchain $ sudo make TARGET_ARCH=armv6 KERNCONF=XENHVM buildkernel $ sudo make TARGET_ARCH=armv6 buildworld $ sudo make TARGET_ARCH=armv6 DESTDIR=/mnt installworld distribution $ echo "/dev/xbd0 / ufs rw 1 1" > /mnt/etc/fstab $ vi /mnt/etc/ttys (add the line 'xc0 "/usr/libexec/getty Pc" xterm on secure") $ sudo umount /mnt $ sudo mdconfig -d u0 Then you can copy the rootfs and the kernel to DOM 0 on your board. To boot the a FreeBSD your will required the following configuration file $ cat freebsd.xl kernel="kernel" memory=64 name="freebsd" vcpus=1 autoballon="off" disk=[ 'phy:/dev/loop0,xvda,w' ] $ losetup /dev/loop0 xenvm.img $ xl create freebsd.xl $ xl console freebsd -- Julien Grall From owner-freebsd-xen@FreeBSD.ORG Mon Nov 24 08:00:30 2014 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9EAD3C4 for ; Mon, 24 Nov 2014 08:00:30 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5A97BB5 for ; Mon, 24 Nov 2014 08:00:30 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO80UjD023232 for ; Mon, 24 Nov 2014 08:00:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201411240800.sAO80UjD023232@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-xen@FreeBSD.org Subject: [FreeBSD Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 24 Nov 2014 08:00:30 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.18-1 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, 24 Nov 2014 08:00:31 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (21 bugs) Bug 135178: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=135178 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] Xen domU outgoing data transfer stall when TSO is enabled Bug 144629: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=144629 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't work on solaris dom0's Bug 152228: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=152228 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [panic] Xen/PV panic with machdep.idle_mwait=1 Bug 153150: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153150 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] xen/ec2: disable checksum offloading on interface 'xn0' and enable it immediately caused network hang Bug 153477: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153477 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] XEN pmap code abuses vm page queue lock Bug 153620: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153620 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] Xen guest system clock drifts in AWS EC2 (FreeBSD 9.0-CURRENT i386 T1-micro) Bug 153672: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153672 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [panic] i386/XEN panics under heavy fork load Bug 153674: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153674 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] i386/XEN idle thread shows wrong percentages Bug 154428: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=154428 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] xn0 network interface and PF - Massive performance drop Bug 155353: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=155353 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [patch] put "nudging TOD" message under boot_verbose Bug 171873: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=171873 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] xn network device floods warning in dmesg Bug 175822: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175822 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] FreeBSD 9.1 does not work with Xen 4.0 Bug 175954: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175954 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] XENHVM xn network driver extreme packet loss during a slow download Bug 176053: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176053 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [patch] i386: Correct wrong usage of vsnprintf() Bug 180403: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=180403 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] Problems with GENERIC and XENHVM kernels with XenClient 4.5.5 Bug 183139: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183139 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [patch] ifconfig options on xn0 lost after xen vm migration to another server Bug 183397: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183397 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [panic] Kernel panic at first incoming ssh under Xen 4.2 with NetBSD Dom0 Bug 186375: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186375 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] FreeBSD 10 is very unstable on Xen 4.1(XCP 1.6) Bug 188261: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188261 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] FreeBSD DomU PVHVM guests cannot 'route' traffic for other Xen PV guests on same Dom0 Host. Bug 188369: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188369 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] [panic] FreeBSD 10 XENHVM panic under NetBSD Dom0 (xn_txeof: WARNING: response is -1) Bug 188990: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188990 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-xen@FreeBSD.org Status: In Progress Resolution: Summary: [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest From owner-freebsd-xen@FreeBSD.ORG Fri Nov 28 13:57:51 2014 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C58EA88; Fri, 28 Nov 2014 13:57:51 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2E3CF3; Fri, 28 Nov 2014 13:57:50 +0000 (UTC) Received: from bender.lan (97e078e7.skybroadband.com [151.224.120.231]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id CC3FE7328F; Fri, 28 Nov 2014 13:57:42 +0000 (UTC) Date: Fri, 28 Nov 2014 13:57:37 +0000 From: Andrew Turner To: Julien Grall Subject: Re: [RFC v2] Add support for Xen ARM guest on FreeBSD Message-ID: <20141128135737.23a71643@bender.lan> In-Reply-To: <54726138.3090003@linaro.org> References: <54726138.3090003@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Ian Campbell , Stefano Stabellini , "xen-devel@lists.xen.org" , freebsd-xen@freebsd.org, freebsd-arm@freebsd.org, Denis Schneider , gibbs@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 28 Nov 2014 13:57:51 -0000 On Sun, 23 Nov 2014 22:35:36 +0000 Julien Grall wrote: > Hello all, > > At the beginning of the year, I have sent a first RFC to add support > for FreeBSD on Xen ARM [1]. ... > Major changes in this new version: > * Add Device Tree support via Linux Boot ABI > * Add zImage support > * Netfront support > * Blkfront fixes > * DOM0 support (separate branch see below) > > The former item is very hackish. I was wondering if there is another > way to do it? Or maybe we should support FreeBSD Bootloader in ARM > guest? I think using the loader is the correct way to handle booting in Xen. It allows us to relocate the dtb as required. It look like a zImage then use the Xen console to interact with the user. > > The patch series is divided in X parts: > * #1 - #14: Clean up and bug fixes for Xen. They can be > applied without the rest of the series > * #15 - #19: Update Xen interface to 4.4 and fix > compilation. It's required for ARM. > * #20 - #26: Update Xen code to support ARM > * #27 - #33: Rework the event channel code for supporting > ARM. I will work with Royger to come with a common interface with x86 > * #34 - #36: Add support for ARM in Xen code > * #37 - #46: ARM bug fixes and new features. Some of thoses > patches (#37 - #40) could be applied without the rest of the series > * #47 - #48: Add Xen ARM platform I have committed patches 30 and 40 as they look good. I'm not familiar with the code to review 37 or 38, however from my quick look at 38 I appears _bus_dmamap_load_buffer does take in to account buflen and dmat->maxsegsz when setting sgsize just not dmat->alignment. ... > > TODO: > * Add SMP/PSCI support in FreeBSD. Could be useful other > platform too Adding PSCI support is on my TODO lost for arm64, however I don't expect to get on ti in until early next year. > * Only FreeBSD to load anywhere. Currently there is a 2M > alignment which require a patch in Xen. If you use the loader this will be fixed as the loader can load the kernel at the correct alignment.