From owner-freebsd-xen@freebsd.org Sun May 13 13:51:54 2018 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B301FDDC60 for ; Sun, 13 May 2018 13:51:54 +0000 (UTC) (envelope-from kai_otto@duckster.net) Received: from woodhouse.mariphil-volunteers.com (woodhouse.mariphil-volunteers.com [IPv6:2a03:4000:10:14::dead:beef]) by mx1.freebsd.org (Postfix) with ESMTP id 1659A77D58 for ; Sun, 13 May 2018 13:51:53 +0000 (UTC) (envelope-from kai_otto@duckster.net) Received: from localhost (localhost [127.0.0.1]) by woodhouse.mariphil-volunteers.com (Postfix) with ESMTP id 68D2D404 for ; Sun, 13 May 2018 15:52:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at woodhouse.mariphil-volunteers.com Received: from woodhouse.mariphil-volunteers.com ([127.0.0.1]) by localhost (woodhouse.mariphil-volunteers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id y25vzekTqUul for ; Sun, 13 May 2018 15:51:51 +0200 (CEST) Received: from [IPv6:2001:16b8:227e:79c0:c9bf:aad8:891d:4ec0] (200116b8227e79c0c9bfaad8891d4ec0.dip.versatel-1u1.de [IPv6:2001:16b8:227e:79c0:c9bf:aad8:891d:4ec0]) by woodhouse.mariphil-volunteers.com (Postfix) with ESMTPSA id 015BE3BB for ; Sun, 13 May 2018 15:51:50 +0200 (CEST) To: freebsd-xen@freebsd.org From: Kai Otto Subject: Linux domU only works with xen_platform_pci=0 ? Message-ID: Date: Sun, 13 May 2018 15:51:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.25 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, 13 May 2018 13:51:54 -0000 Hello, I'm trying to set up a FreeBSD 11.1 system as Xen virtualization host. Following a combination of handbook [1] and wiki [2], I was able to get get a FreeBSD dom0 in PVH mode, and FreeBSD domU in HVM mode running, including installation to disk and networking. It seemed to me as if the switch 'xen_platform_pci' doesn't have an effect on FreeBSD domU's, as I see e.g. a xenpci0 and xbd0 in dmesg no matter if I set it to 1 or 0. Do I understand it correctly, that this switch makes the difference between HVM and PVHVM mode? According to xl.cfg(5), it 'enables a guest Operating System [...] to make use of paravirtualization features such as disk and network devices'. Afterwards, I tried to create a Linux domU. Both Centos 7 and Alpine Linux only detected the harddisk with xen_platform_pci=0. For Alpine Linux, with xen_platform_pci=1, I get the following messages on the console: vbd vbd-5632: 19 xenbus_dev_probe on device/vbd/5632 vbd vbd-5632: failed to write error node for device/vbd/5632 (19 xenbus_dev_probe on device/vbd/5632) After waiting for a couple minutes it boots, but doesn't detect the disk. Looking in /var/log/xen/qemu-dm-alpine-hvm.log, I see the following messages: xen be core: can't open gnttab device xen be core: can't open gnttab device xen be: vkbd-0: initalize() failed xen be: vkbd-0: initalize() failed xen be: vkbd-0: initalize() failed Googling around yielded [3], where someone apparently ran into the same problem, and used xen_platform_pci=0 as workaround. So my question is: Is xen_platform_pci=1 required for PVHVM mode? If yes, is PVHVM mode only available for FreeBSD domU's? If no, how can I enable it for Linux guests? Any response would be appreciated, thanks! (Unrelated: I also couldn't get PVH guests to boot, neither FreeBSD nor Linux. The console stayed blank and CPU went to 100%. But that's a whole other story I guess.) - Kai My system: OS: FreeBSD-11.1-RELEASE amd64 xen installed via pkg Processor: E3-1240 v2, (which supports VT-x, VT-d and EPT) My alpine.cfg: builder="hvm" name="alpine-hvm" memory=1024 vcpus=1 vif = [ 'bridge=bridge0' ] disk = [ '/dev/zvol/zbulk/vm/alpine-hvm_disk0,raw,hda,rw', '/zbulk/mediashare/isos/linux/apline-virt-3.7.0-x86_64.iso,raw,hdb:cdrom,r'] xen_platform_pci=1 # or 0, see above vnc = 1 vnclisten = "0.0.0.0" serial = "pty" usbdevice = "tablet" -- [1] https://www.freebsd.org/doc/en/books/handbook/virtualization-host-xen.html [2] https://wiki.freebsd.org/Xen [3] https://www.reddit.com/r/freebsd/comments/6uldys/freebsd_111_linux_domu_on_xen_wont_boot/