From owner-freebsd-xen@freebsd.org Sat Apr 1 15:10:31 2017 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A8B9D29225 for ; Sat, 1 Apr 2017 15:10:31 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "saper.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFD647AC for ; Sat, 1 Apr 2017 15:10:30 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.15.2/8.15.2) with ESMTPS id v31FARME066663 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 1 Apr 2017 15:10:27 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1491059427; bh=TxvQDb16Ey7BBHVdrwZ8KHNY17mLAzUKfki1cjj2GS4=; h=Date:From:To:Subject; b=MuQp9X/ADSn5HFS+VqHbdgqnHgos6OwjkVnWrm60W148IyYMhaLx6Vq2PZPwZjhCL wE5E4J0jHMep54MWzatOdAuPTbjlHWjfvyVTJLGT+CVpaXtpcwRYpC1lOtdAHe5sFx f5BS5MiOLjn2yre5BQU+zK+786cAXbiA8G4hKl1Q= Received: from localhost (saper@localhost) by m.saper.info (8.15.2/8.15.2/Submit) with ESMTP id v31FAQQl066660 for ; Sat, 1 Apr 2017 15:10:27 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sat, 1 Apr 2017 15:10:26 +0000 From: Marcin Cieslak To: freebsd-xen@freebsd.org Subject: UEFI trouble with OVMF under Xen - nothing boots Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Apr 2017 15:10:31 -0000 This is a follow up to the UEFI Windows boot problems reported after 4.7 got imported: https://lists.freebsd.org/pipermail/freebsd-xen/2016-June/002745.html I am using FreeBSD 12.0-CURRENT #6 r314708: Mon Mar 6 13:09:31 UTC 2017 root@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64 as dom0 In the 4.5 times I could install and boot Windows 2016 Technical Preview 5 without major problems. In fact, I started using this as my default Windows environment - it was working very well and very fast. Since 4.7 upgrade I never got Tianocore OVMF to boot - it just stops there listing available devices: https://marcincieslak.com/tmp/ovmf/ovmf-no-boot.png I can browse the FS0 and there is BootX64.efi there https://marcincieslak.com/tmp/ovmf/ovmf-files.png (not sure if "Unsupported" message is normal, never tried this in the days Windows was working). The zvol contains the same Windows that used to start properly, so I suspect the filesystems there did not get corrupt. Trying to boot the installation ISO image ends up with a same thing. I have tried old and new ovmf images: https://marcincieslak.com/tmp/ovmf/ovmf.bin can be taken from http://efi.akeo.ie/OVMF/ https://marcincieslak.com/tmp/ovmf/ovmf-new.bin extracted from https://www.kraxel.org/repos/jenkins/edk2/edk2.git-0-20170328.b2579.g2ed235f.x86_64.rpm tried 32bit and 64bit versions, both start with the same effect. To reproduce it, modify xen-tools Makefile to add two flags to CONFIGURE_ARGS: CONFIGURE_ARGS+= --with-extra-qemuu-configure-args="${QEMU_ARGS}" \ --with-system-seabios=${LOCALBASE}/share/seabios/bios.bin \ --enable-ovmf \ --with-system-ovmf=${LOCALBASE}/share/ovmf/ovmf.bin Complete Makefile I am using is at https://marcincieslak.com/tmp/ovmf/Makefile Domain configuration file: https://marcincieslak.com/tmp/ovmf/windows-run.cfg builder = "hvm" memory = 4096 vcpus = 2 name = "Windows2016" disk = [ '/dev/zvol/zroot/windows0,raw,hda,w', # '/dev/zvol/zroot/vs2013,raw,hdb,w', # '/root/win/install.iso,raw,hdc:cdrom,r' ] boot = "c" # Boot to hard disk image vnc = 2 #vnclisten = "0.0.0.0" usbdevice = 'tablet' on_poweroff = 'destroy' on_reboot = 'restart' #on_crash = 'restart' on_crash = 'destroy' acpi = 1 bios = 'ovmf' vif = [ 'bridge=bridge0,mac=00:16:3e:5d:0d:48' ] videoram=16 vga = "stdvga" It does not matter if I use "hda" or "xvda" The qemu driver domain running looks like this: https://marcincieslak.com/tmp/ovmf/qemu-process /usr/local/lib/xen/bin/qemu-system-i386 \ -xen-domid 30 \ -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-30,server,nowait \ -no-shutdown \ -mon chardev=libxl-cmd,mode=control \ -chardev socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-30,server,nowait \ -mon chardev=libxenstat-cmd,mode=control \ -nodefaults -no-user-config \ -name Windows2016 -vnc 127.0.0.1:0,to=99 \ -display none -device VGA,vgamem_mb=16 \ -boot order=c \ -usb -usbdevice tablet -smp 2,maxcpus=2 \ -device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5d:0d:48 \ -netdev type=tap,id=net0,ifname=xnb30.0-emu,script=no,downscript=no \ -machine xenfv -m 4080 \ -drive file=/dev/zvol/zroot/windows0,if=ide,index=0,media=disk,format=raw,cache=writeback Nothing special in the "xl dmesg", Xen is just starting OVMF. I don't know even where to start to troubleshoot this... Anyway to get to the OVMF debug output, maybe? I've tried some other UEFI non-Windows installers and all images behave the same: no surprise, as no Windows code had a chance to run yet. Marcin From owner-freebsd-xen@freebsd.org Sat Apr 1 15:49:32 2017 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 550F7D29E4E for ; Sat, 1 Apr 2017 15:49:32 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "saper.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE429FA0 for ; Sat, 1 Apr 2017 15:49:31 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.15.2/8.15.2) with ESMTPS id v31FnTmu067302 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 1 Apr 2017 15:49:29 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1491061769; bh=iFyR+br0Q4pjM+v/5PSOvwkqhM0eq8y1u1N6QQcrCRw=; h=Date:From:To:Subject:In-Reply-To:References; b=nVNWMl3JMJNjOgAaGnnY2EaK/I/oVNcxgqxGTnBrUg5M/RDp4JL2cncbZLl4GJ/q7 8mvYBJ4B3ltgYbT4SlRmwGkjZmfUpbPu56ks4mgX7dg+y/6vG45WZIwdLP4KyzQ364 vY7UPLKzV+qEIl/qWW5lXLyCZBPZe0QaeVzXFj6M= Received: from localhost (saper@localhost) by m.saper.info (8.15.2/8.15.2/Submit) with ESMTP id v31FnTJX067299 for ; Sat, 1 Apr 2017 15:49:29 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sat, 1 Apr 2017 15:49:29 +0000 From: Marcin Cieslak To: freebsd-xen@freebsd.org Subject: Re: UEFI trouble with OVMF under Xen - nothing boots In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Apr 2017 15:49:32 -0000 On Sat, 1 Apr 2017, Marcin Cieslak wrote: > This is a follow up to the UEFI Windows boot problems > reported after 4.7 got imported: > > https://lists.freebsd.org/pipermail/freebsd-xen/2016-June/002745.html > > I am using FreeBSD 12.0-CURRENT #6 r314708: Mon Mar 6 13:09:31 UTC 2017 root@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64 as dom0 > > In the 4.5 times I could install and boot Windows 2016 Technical Preview 5 without > major problems. In fact, I started using this as my default Windows > environment - it was working very well and very fast. A follow up to this: I have tried a pure qemu installed from packages: qemu-system-x86_64 \ -bios /usr/local/share/ovmf/ovmf.bin \ -no-shutdown \ -nodefaults -no-user-config \ -name Windows2016Pure -vnc 127.0.0.1:0,to=99 \ -display none -device VGA,vgamem_mb=16 \ -boot order=c \ -usb -usbdevice tablet -smp 2,maxcpus=2 \ -device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5d:0d:48 \ -netdev type=tap,id=net0,ifname=tap0,script=no,downscript=no \ -machine pc -m 4080 \ -drive file=/dev/zvol/zroot/windows0,if=ide,index=0,media=disk,format=raw,cache=writeback and the boot process goes easily past the OVMF and continues booting, only to fail "Inaccessible boot device" Windows message much later (probably because I was using XenPV drivers there). Marcin From owner-freebsd-xen@freebsd.org Sat Apr 1 22:30:48 2017 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0DABD29870 for ; Sat, 1 Apr 2017 22:30:48 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "saper.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E31D1D6 for ; Sat, 1 Apr 2017 22:30:48 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.15.2/8.15.2) with ESMTPS id v31MUiRA070214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 1 Apr 2017 22:30:44 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1491085844; bh=+nGtmq4NCOG7K/549dGwbKNVwqvY0OaGTMDqiRq/ZQE=; h=Date:From:To:Subject:In-Reply-To:References; b=KW770qyuzzWVgolhEHR4w0P7JZCL0GNgrODfBAeDhSzmGZvik6WHjKQPUJdWYlWL2 6NnbiFt3wsBNCrOc0ymgrnb+CgGs/j6wZPQ0AOvYlnK+BGTZKSSkY6L4bMESv0eYd8 U0OP/jgtqV5UC666ABQW844nllM2jRF9BLsqpu/g= Received: from localhost (saper@localhost) by m.saper.info (8.15.2/8.15.2/Submit) with ESMTP id v31MUhDg070211 for ; Sat, 1 Apr 2017 22:30:44 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sat, 1 Apr 2017 22:30:43 +0000 From: Marcin Cieslak To: freebsd-xen@freebsd.org Subject: Re: UEFI trouble with OVMF under Xen - nothing boots - SOLVED In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Apr 2017 22:30:49 -0000 On Sat, 1 Apr 2017, Marcin Cieslak wrote: > On Sat, 1 Apr 2017, Marcin Cieslak wrote: > > > This is a follow up to the UEFI Windows boot problems > > reported after 4.7 got imported: > > > > https://lists.freebsd.org/pipermail/freebsd-xen/2016-June/002745.html > > > > I am using FreeBSD 12.0-CURRENT #6 r314708: Mon Mar 6 13:09:31 UTC 2017 root@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64 as dom0 > > > > In the 4.5 times I could install and boot Windows 2016 Technical Preview 5 without > > major problems. In fact, I started using this as my default Windows > > environment - it was working very well and very fast. > So, for the archives: I have compiled the newest OVMF git master in the DEBUG mode and found out that under normal qemu both I/O debug port 0x402 logging or serial port logging (depending how OVMF got compiled) do work. I have never been getting debug output from the OVMF started by Xen. What I didn't know is that firmware images are compiled into the hvmloader so that just replacing the ovmf.bin DOES NOT work. I must have had a 32-bit ovmf.bin on the filesystem when I was compiling xen-tools; after replacing it with a 64-bit version and rebuilding xen-tools things started to work. Sorry for noise! Marcin