From nobody Tue Feb 10 03:39:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1678213680; cv=none; d=zohomail.com; s=zohoarc; b=M3ZRpTf2EJDCxvYwOXf/ZCebyPa3AXGK66JdHwgIcwnAMhOBmdJKvIJ4FXPIR2hm6jB8vw5GXy4OW/z/Vl/cVQ5sD9XWP7RMXQMlQvmlaALxvOqFaz7N+KJOMemJ2liQ4RwbswPG4r0/TOAEyEtNY5z3xig+OTrg7rq3pZ340Dw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678213680; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OoYpLHePGTOV3SgREKPbrdXd7gYiqaJPFQARRGBbtMA=; b=BvRVI7ouTk6YtHez2Ugal4mV4KL3l0g7qloJNFM9iIv6sSOOKEDkXqt3gA7e8gUQUVokDRggDgYf+wF0GepaDgfmgOpbm39GIECBzAhmgwn8A1u47dJlDh5DjF+hulZhwxDVzxK/PebmF/AlYJNbmbXy8+UWDspozeHQMU4FxWI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 167821368090189.2008312903098; Tue, 7 Mar 2023 10:28:00 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.507793.781929 (Exim 4.92) (envelope-from ) id 1pZc2J-0007nE-CK; Tue, 07 Mar 2023 18:27:43 +0000 Received: by outflank-mailman (output) from mailman id 507793.781929; Tue, 07 Mar 2023 18:27:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pZc2I-0007eQ-A6; Tue, 07 Mar 2023 18:27:42 +0000 Received: by outflank-mailman (input) for mailman id 507793; Tue, 07 Mar 2023 18:27:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pZc26-0002MP-79 for xen-devel@lists.xenproject.org; Tue, 07 Mar 2023 18:27:30 +0000 Received: from casper.infradead.org (casper.infradead.org [2001:8b0:10b:1236::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b2cf22e3-bd15-11ed-a550-8520e6686977; Tue, 07 Mar 2023 19:27:21 +0100 (CET) Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZc1o-006deU-A1; Tue, 07 Mar 2023 18:27:12 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pZc1o-009eA9-10; Tue, 07 Mar 2023 18:27:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list X-Inumbo-ID: b2cf22e3-bd15-11ed-a550-8520e6686977 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=OoYpLHePGTOV3SgREKPbrdXd7gYiqaJPFQARRGBbtMA=; b=t8MD13g0Z1OMh5Mw+Z6Cgptp0o qV8M8NSUbcUHYB0wxnYsJPBmTLVNym79gxTpjO9HxaZou0B7oDvbUUrG1rpnM8zwRE82UHYmY9scZ ne0H443HyU/lL8PkuGfFDAsUAWoKndAAcIToKoVVFxoC+OkjQjaVI8zsH4J3uVQk2Bh141DdCPmRZ fyvYtRT7jKlwWEzWmy9Hll+uqVBCQ5XPUH7nV4hR04P5DxxoOjoK5HdvRzDlm+ep/vl9MzNixNIVp u2lBBq8obOqMI6XnpJqBavvNS1igXesMCjmBmZic2HfCzd63SYtd5b1AP7QgTs6IINNhqNMLKes/U IUbKWvsA==; From: David Woodhouse To: Peter Maydell Cc: qemu-devel@nongnu.org, Paolo Bonzini , Paul Durrant , Joao Martins , Ankur Arora , Stefano Stabellini , vikram.garhwal@amd.com, Anthony Perard , xen-devel@lists.xenproject.org, Juan Quintela , "Dr . David Alan Gilbert" Subject: [PULL 27/27] docs: Update Xen-on-KVM documentation for PV disk support Date: Tue, 7 Mar 2023 18:27:07 +0000 Message-Id: <20230307182707.2298618-28-dwmw2@infradead.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230307182707.2298618-1-dwmw2@infradead.org> References: <20230307182707.2298618-1-dwmw2@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1678213682641100001 Content-Type: text/plain; charset="utf-8" From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- docs/system/i386/xen.rst | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst index a00523b492..f06765e88c 100644 --- a/docs/system/i386/xen.rst +++ b/docs/system/i386/xen.rst @@ -9,6 +9,8 @@ KVM has support for hosting Xen guests, intercepting Xen hy= percalls and event channel (Xen PV interrupt) delivery. This allows guests which expect to be run under Xen to be hosted in QEMU under Linux/KVM instead. =20 +Using the split irqchip is mandatory for Xen support. + Setup ----- =20 @@ -17,14 +19,14 @@ accelerator, for example for Xen 4.10: =20 .. parsed-literal:: =20 - |qemu_system| --accel kvm,xen-version=3D0x4000a + |qemu_system| --accel kvm,xen-version=3D0x4000a,kernel-irqchip=3Dsplit =20 Additionally, virtual APIC support can be advertised to the guest through = the ``xen-vapic`` CPU flag: =20 .. parsed-literal:: =20 - |qemu_system| --accel kvm,xen-version=3D0x4000a --cpu host,+xen_vapic + |qemu_system| --accel kvm,xen-version=3D0x4000a,kernel-irqchip=3Dsplit -= -cpu host,+xen_vapic =20 When Xen support is enabled, QEMU changes hypervisor identification (CPUID 0x40000000..0x4000000A) to Xen. The KVM identification and features are not @@ -33,11 +35,25 @@ moves to leaves 0x40000100..0x4000010A. =20 The Xen platform device is enabled automatically for a Xen guest. This all= ows a guest to unplug all emulated devices, in order to use Xen PV block and n= etwork -drivers instead. Note that until the Xen PV device back ends are enabled t= o work -with Xen mode in QEMU, that is unlikely to cause significant joy. Linux gu= ests -can be dissuaded from this by adding 'xen_emul_unplug=3Dnever' on their co= mmand -line, and it can also be noted that AHCI disk controllers are exempt from = being -unplugged, as are passthrough VFIO PCI devices. +drivers instead. Under Xen, the boot disk is typically available both via = IDE +emulation, and as a PV block device. Guest bootloaders typically use IDE t= o load +the guest kernel, which then unplugs the IDE and continues with the Xen PV= block +device. + +This configuration can be achieved as follows + +.. parsed-literal:: + + |qemu_system| -M pc --accel kvm,xen-version=3D0x4000a,kernel-irqchip=3Ds= plit \\ + -drive file=3D${GUEST_IMAGE},if=3Dnone,id=3Ddisk,file.locking=3Doff= -device xen-disk,drive=3Ddisk,vdev=3Dxvda \\ + -drive file=3D${GUEST_IMAGE},index=3D2,media=3Ddisk,file.locking=3D= off,if=3Dide + +It is necessary to use the pc machine type, as the q35 machine uses AHCI i= nstead +of legacy IDE, and AHCI disks are not unplugged through the Xen PV unplug +mechanism. + +VirtIO devices can also be used; Linux guests may need to be dissuaded from +umplugging them by adding 'xen_emul_unplug=3Dnever' on their command line. =20 Properties ---------- --=20 2.39.0