On 4/9/20 7:14 AM, Daniel P. Berrangé wrote:
On Wed, Apr 08, 2020 at 02:29:16PM -0600, Jim Fehlig wrote:
Hotplugging PCI devices to Xen PV guests is only possible if the
libxl_domain_build_info struct has the e820_host field enabled when the
guest is created. By default it is disabled but libxl will automatically
enable e820_host if the config contains one or more PCI devices, in which
case hotplugging additional PCI devices later works.
According to xl.cfg(5) man page it is safe to unconditionally enable the
PV-only e820_host setting. Furthermore xen.git commits 414979ba85 and
f92337d949, which introduce the setting with a default of disabled, claim
the setting can be enabled or even removed "once the auto-ballooning of
guests with PCI devices works". Those commits are from May 2011 so I
think it is safe to say the issues have been resolved in the meantime.
Regardless, we should avoid exposing a Xen setting in libvirt that could
be removed later.
Does this have any implications for live migration compatibility if you
silently enable this for all guests ?
Oh, right. Thanks for the reminder! I'll have to check but I suspect it will.
In QEMU/KVM if you did this, it would be considered an ABI change and
could break live migration of a guest launched on old libvirt, to a
host running new libvirt.
Nod. Do you have any suggestions on how to model this setting in libvirt? I
proposed adding a hypervisor feature for Xen in this thread
https://www.redhat.com/archives/libvir-list/2020-April/msg00376.html
rational being that for PV guests the hypervisor serves as the BIOS and provides
the facility to report the memory map to the OS. I couldn't really think of a
good fit for it within the <os> element and its children.
Regards,
Jim