[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/4] Xen: Add Q35 initial support for HVM guests



Hi,

On 3/24/26 10:59, Daniel P. Berrangé 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órecki 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. This 
>>>> is
>>>> based on the work from Alexey Gerasimenko (See patchset [1] for reference).
>>>>
>>>> This series does not implement device passthrough as this will need more 
>>>> 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 toolstack
>>> 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





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.