Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46B46EA3C20 for ; Thu, 9 Apr 2026 10:17:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1276940.1562252 (Exim 4.92) (envelope-from ) id 1wAmRN-0007DO-S9; Thu, 09 Apr 2026 10:16:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1276940.1562252; Thu, 09 Apr 2026 10:16:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wAmRN-0007DH-P8; Thu, 09 Apr 2026 10:16:49 +0000 Received: by outflank-mailman (input) for mailman id 1276940; Thu, 09 Apr 2026 10:16:48 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wAmRL-0007DB-Pp for xen-devel@lists.xenproject.org; Thu, 09 Apr 2026 10:16:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wAmRK-00BmoY-BZ for xen-devel@lists.xenproject.org; Thu, 09 Apr 2026 12:16:46 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69d77c7f-5cb7-0a2a0a5109dd-0a2a4504bdde-12 for ; Thu, 09 Apr 2026 12:16:46 +0200 Received: from [103.168.172.144] (helo=fout-a1-smtp.messagingengine.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69d77c8d-bb33-0a2a45040019-67a8ac90c9cb-3 for ; Thu, 09 Apr 2026 12:16:46 +0200 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id D13A9EC006A; Thu, 9 Apr 2026 06:16:44 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 09 Apr 2026 06:16:44 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Apr 2026 06:16:43 -0400 (EDT) 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 Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=fm2 header.d=invisiblethingslab.com header.i="@invisiblethingslab.com" header.h="Cc:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=fm2 header.d=messagingengine.com header.i="@messagingengine.com" header.h="Cc:Content-Type:Date:Feedback-ID:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To:X-ME-Proxy:X-ME-Sender" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1775729804; x=1775816204; bh=LvFJD7kaqB4yI+OTi31V6yKJ10VSs1gSZn5u+SUryTQ=; b= rl5OzLSS5w4UZv+7Ww20Vqw5t8IcB+AdlzU+Wcjch5jtNOvW/s6hXXOKtSiRVDdd IV1b9vSAQzgVA5bJQZkD/6PeKtpIfC2UpwFNdQ5uEgBDu9xEYhJvB0BipGlXsUij Tzy16P/vmTCIKvSXDBAVhcxeTzrDtkfsUZJOXm20qZKBdKd82el6ImWv73K9Xczi sFEQj4T4OyGLeFQAR8//+eZVkCO7CQzZXT0m3qQrBDLtifk85TzzqXhgB2t6Bsoc 9julA26ZGGmm4BP+/0dX4WwNGui8DxbdmlWd7+tOsqpLSYobe2EHc9pHQqkkRKTq ysnW9TlrYFVhNr6aWwkj8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1775729804; x=1775816204; bh=LvFJD7kaqB4yI+OTi31V6yKJ10VSs1gSZn5 u+SUryTQ=; b=GlBrI2+ocf2b/CKy50jLzkIRhVeBZRdnQvwdjORItnXfVavxz7O 9/NtzpbohP0ZpVWFjV8qn+J8YmzwD2DzSKWFtfxuGQFG6q8IsSu+BXs8sMX3oAqv Oj04quvasiPWYZX4SpFFfDfc0vohR0nVY8BrFgYgApsMK7gDhN2D374U0pid0v+N T8tAoDhXTunvlpnwhQYZnJEy2QYmyyT/8tIFqn7kt+aSTKWihNj74KCtajwyYLH4 blBVjbDoUtg1DJTxHXYkxTFnk5g6Mt5L6xKIAvJji7VreVtuhVSFi/7fOyQD+vnc nkhWnBG03k4Zkd361XywH3lF5ZcFZFPX2DA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddviedvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpeforghrvghkucfo rghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvhhish hisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeevueejteeg leelteduueevhfetgfffjeevtddvgfeiveehteehleegueelvdejveenucffohhmrghinh epghhithhlrggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsg drtghomhdpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthht ohepthhhihgvrhhrhidrvghstggrnhguvgesvhgrthgvshdrthgvtghhpdhrtghpthhtoh epgigvnhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghp thhtoheprghnthhhohhnhidrphgvrhgrrhgusehvrghtvghsrdhtvggthhdprhgtphhtth hopehjghhrohhsshesshhushgvrdgtohhmpdhrtghpthhtohepsggvrhhrrghnghgvsehr vgguhhgrthdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Date: Thu, 9 Apr 2026 12:16:41 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Thierry Escande Cc: xen-devel@lists.xenproject.org, Anthony PERARD , Juergen Gross , Daniel P =?utf-8?B?LiBCZXJyYW5nw6k=?= Subject: Re: [RFC PATCH 0/3] xl: Allow PCI devices to be passthrough'd via Qemu command line Message-ID: References: <20260408172320.539750-1-thierry.escande@vates.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FadDhAgw7qA4OlbR" Content-Disposition: inline In-Reply-To: <20260408172320.539750-1-thierry.escande@vates.tech> X-purgate-ID: tlsNG-ebf023/1775729806-B273A51B-FEEC0ED7/0/0 X-purgate-type: clean X-purgate-size: 3168 --FadDhAgw7qA4OlbR Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Thu, 9 Apr 2026 12:16:41 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Thierry Escande Cc: xen-devel@lists.xenproject.org, Anthony PERARD , Juergen Gross , Daniel P =?utf-8?B?LiBCZXJyYW5nw6k=?= Subject: Re: [RFC PATCH 0/3] xl: Allow PCI devices to be passthrough'd via Qemu command line On Wed, Apr 08, 2026 at 05:23:39PM +0000, Thierry Escande wrote: > This series adds support for a new 'hotplug' option for PCI devices to be > passthrough'd to guests. >=20 > The current mechanism for device passthrough uses QMP device_add command > to hot-plug PCI devices to the guest Qemu instance. This is an issue for > guests running on Q35 chipset (preliminary support posted at [1]) since t= he > Q35 PCI root bus does not support hotplug. Devices could be hotplugged to > a secondary PCI bus but Xen only support 1 PCI bus for now. >=20 > The 'hotplug' option allows to control how devices are attached to the > guest, either by using the legacy QMP mechanism (this is the default) or = by > passing it directly to the Qemu command line using xen-pci-passthrough > device. >=20 > Example usage in cfg file: > pci =3D [ "00:03.0,seize=3D1,hotplug=3D0" ] >=20 > Since Qemu -device option accepts parameters in json format, this > patchset adds a new internal function libxl__device_pci_get_qmp_json() th= at > generates the device json object used for both QMP hotplug and command li= ne > passing. > Also, the function libxl_pci_assignable() is made available from libxl.h > for access in libxl_dm.c. I don't know if it's ok to make it public or if > it should stay private. Maybe it should be renamed as > libxl_device_pci_assignable() to match the other PCI device APIs. >=20 > This has been successfully tested on Xen 4.22-dev and Qemu 10.0 running > Debian VMs in both Bios and UEFI mode with a passthrough'd nvme disk. > Disabling the hotplug mechanism might be made mandatory for Q35 machines > later, once Q35 support is merged upstream. Generally I like the approach, and it looks sensible on the first look. But CI says it fails to build: https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2439831766 --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --FadDhAgw7qA4OlbR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmnXfIkACgkQ24/THMrX 1yzVtggAko25WLiGketDYodE72dV9YuvzZw0tInQPk3pi2jOkPQqOHb5kfKDaWP6 oH54OtYXWeFKIs6nWcbimJOEdQjIJGo/S/ZXxLUIDodxWnqQYTakG/II3fFBpcUB cS0SwE/eCyrmGJ44++XfYuVvoqHH2aAOsWpDGnO4Yra0wb4c9vf/MCHr11wJO4Ic PSY9Vpf5rmFGXKLCiKEZqSd/Qe3EMo+LJPXk3pmelZaa58KOWh1m+dU6iz34rl/u 3iAeSUFNi3ThazMLvQ9XznZsUZB2GlwBQ3p60CdYpF7VCIYXSYuGpJpM+xTl2+mm SYQCXFr9xQBvaLM5Z0Xwzo2jOTbh9Q== =hZBM -----END PGP SIGNATURE----- --FadDhAgw7qA4OlbR--