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 CE18DFD5F85 for ; Wed, 8 Apr 2026 07:34:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1275464.1561275 (Exim 4.92) (envelope-from ) id 1wANQ8-0006D6-RK; Wed, 08 Apr 2026 07:33:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1275464.1561275; Wed, 08 Apr 2026 07:33:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wANQ8-0006Cz-Og; Wed, 08 Apr 2026 07:33:52 +0000 Received: by outflank-mailman (input) for mailman id 1275464; Wed, 08 Apr 2026 07:33:51 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wANQ7-0006Ct-HU for xen-devel@lists.xenproject.org; Wed, 08 Apr 2026 07:33:51 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wANQ6-000yRK-F1 for xen-devel@lists.xenproject.org; Wed, 08 Apr 2026 09:33:50 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69d604d6-2eae-0a2a0a5409dd-0a2a450a9eae-28 for ; Wed, 08 Apr 2026 09:33:50 +0200 Received: from [198.2.180.46] (helo=mail180-46.suw31.mandrillapp.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69d604dc-ee98-0a2a450a0019-c602b42ed8a3-3 for ; Wed, 08 Apr 2026 09:33:49 +0200 Received: from pmta11.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail180-46.suw31.mandrillapp.com (Mailchimp) with ESMTP id 4frFDX3KFpz8XS3d2 for ; Wed, 8 Apr 2026 07:33:48 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id f394fed23b2e4ce4865f10734d71a531; Wed, 08 Apr 2026 07:33:48 +0000 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=mte1 header.d=mandrillapp.com header.i="@mandrillapp.com" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding"; dkim=pass header.s=mte1 header.d=vates.tech header.i="thierry.escande@vates.tech" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1775633628; x=1775903628; bh=lf/7x995PIuMmZC7YZDG2jKn3t9Oc495yOkrRXw8d4M=; h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=cAfLHoz+9gelA+wWjlBpE5/+7ZLnszfyOQEwdGb41ArKa/AhC+x4g6dfKobJRrjKJ YrUZ4ylR6PSokkdrxPlOR2xD1NrsqelHwBLyYsrv4GFmL460KJH8wxTMCQQo0Sqjs7 0WaxpO7ogofHR1UVmSFucR2N5Cgaix7PQJOprr7wNNRrzS7aanYtzFnw2w1MV0wvyq YCuIn6vPln3WVZFO81jxk4gZuOMBQg3IEDJPT73jC7QXPWERgH/sd32yNNUzBBgL6Y UPvKfLxbN+iM1hv8G6K6A0hzHehDMqxuYwrCmv9EAi7U09UJ09sx5LuE3AiB79MsIX 4BtPF+u2htLEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1775633628; x=1775894128; i=thierry.escande@vates.tech; bh=lf/7x995PIuMmZC7YZDG2jKn3t9Oc495yOkrRXw8d4M=; h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=kgD+GOfVL4hQRh+lUUqs1M6Grgfznzt40ooRn5aKRJRPf+yHks52SAVp6XPUsSR0r ODnWINq2XR8hRcrmC7s0ALaVBwGt3TRawjZIvQTaMzBWwIrxYJUqok+a3rFtXfWF0s qCUM+rU5X6KR0fWow9I6nGcknD1ZtRN2qXv8e3KgxQtPTfyPkpy9xxXTyPXLdrw6vx i1SKDWzFBEznwUJrCQbljhs8A/ziY5wtc5JaYjHyjPkqzrT2TuIOJrd+HQl3E6hn4H rJN9HSEG7G12QqBokWoaDLAekqI8AemO4neWsbfzV/q3rCBWaIiEBzQGopfcTZxcPt W3Drd1rjmk9lQ== From: "Thierry Escande" Subject: =?utf-8?Q?Re:=20[PATCH=200/4]=20Xen:=20Add=20Q35=20initial=20support=20for=20HVM=20guests?= X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1775633627298 Message-Id: <7db25729-b4ab-41d4-8790-097b5338fe17@vates.tech> To: "=?utf-8?Q?Daniel=20P.=20Berrang=C3=A9?=" , "Anthony PERARD" Cc: "=?utf-8?Q?Marek=20Marczykowski-G=C3=B3recki?=" , qemu-devel@nongnu.org, "Paolo Bonzini" , "Richard Henderson" , "Michael S. Tsirkin" , "Eduardo Habkost" , xen-devel@lists.xenproject.org References: <20260313164649.794591-1-thierry.escande@vates.tech> In-Reply-To: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.f394fed23b2e4ce4865f10734d71a531?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260408:md Date: Wed, 08 Apr 2026 07:33:48 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-4011c0/1775633630-BE54E0B1-4237DA9F/0/0 X-purgate-type: clean X-purgate-size: 2595 Hi, On 3/24/26 10:59, Daniel P. Berrang=C3=A9 wrote: > On Tue, Mar 24, 2026 at 09:28:00AM +0000, Anthony PERARD wrote: >> On Sat, Mar 14, 2026 at 03:16:15PM +0100, Marek Marczykowski-G=C3=B3reck= i wrote: >>> On Fri, Mar 13, 2026 at 04:46:56PM +0000, Thierry Escande wrote: >>>> This patch series introduces Q35 chipset support for Xen HVM guests. T= his is >>>> based on the work from Alexey Gerasimenko (See patchset [1] for refere= nce). >>>> >>>> This series does not implement device passthrough as this will need mo= re work >>>> on the Xen side to support multiple PCI buses. Since Q35 chipset does = not >>>> support device hotplugging and with current Xen mechanism for device >>>> passthrough, they have to be plugged to a new PCIe root port, i.e. not= the PCI >>>> bus 0. >>> >>> I always found it weird that Xen does hot-plugging of PCI passthrough >>> devices... Wouldn't it be easier to change this (connect them from the >>> very start, via QEMU cmdline) and declare hotplug as unsupported (at >>> least at this time)? I realize it's more complex change at the toolstac= k >>> side, but overall may simplify things and maybe even improve >>> reliability. >> >> Skipping hot-plug on Q35 sounds good to me. >> >> I though we could keep using QMP to do cold plug, with the experimental >> "--preconfig", but "device_add" isn't allowed :-(. So yes, doing this >> via command line sounds fine. >> >> In libxl, we might be able to transform the json for `device_add` into >> the command line counterpart for `-device` fairly easily so the argument >> are only generated in a single place. Then we could skip the QMP >> "device_add" in libxl when it's already done via command line. > > -device accepts JSON directly, so there's no transformation you > need to do from the QMP JSON. For example: > > -device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","= bus":"pcie.0","multifunction":true,"addr":"0x1"}' > > Likewise -object, -audiodev and -netdev accept QMP JSON too Thanks for your help and directions. I have a few patches that I will send soon as RFC to gather your feedback. They add a 'hotplug' option for pci devices, enabled by default, to control if the device should be hot-plugged using QMP 'device_add' command or through Qemu command line with `-device xen-pci-passthrough,...'. The 'device_add' command is skipped but the 'pci-query' check remains. Regards, -- Thierry Escande | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech