[PATCH 0/5] Xen: Add support for xl.cfg passthrough setting

Jim Fehlig posted 5 patches 3 years, 11 months ago
Failed in applying to current master (apply log)
docs/formatdomain.html.in                     |   7 ++
docs/schemas/domaincommon.rng                 |  12 ++
src/conf/domain_conf.c                        | 115 ++++++++++++++----
src/conf/domain_conf.h                        |  11 ++
src/libvirt_private.syms                      |   2 +
src/libxl/libxl_conf.c                        |  21 ++++
src/libxl/xen_common.c                        |  86 ++++++++++---
.../test-fullvirt-hypervisor-features.cfg     |  26 ++++
.../test-fullvirt-hypervisor-features.xml     |  50 ++++++++
.../xlconfigdata/test-paravirt-e820_host.cfg  |   1 +
.../xlconfigdata/test-paravirt-e820_host.xml  |   1 +
tests/xlconfigtest.c                          |   3 +
12 files changed, 290 insertions(+), 45 deletions(-)
create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.xml
[PATCH 0/5] Xen: Add support for xl.cfg passthrough setting
Posted by Jim Fehlig 3 years, 11 months ago
Hi All,

Note: This series is based on Marek's patches adding support for e820_host

https://www.redhat.com/archives/libvir-list/2020-April/msg00633.html

which I've ACK'ed, but am waiting to commit until this related setting is
hashed out.

This series adds support for Xen's xl.cfg(5) 'passthrough' setting.
Starting with xen 4.13 this setting must be enabled in order to assign
PCI passthrough devices to a guest. libxl will enable it automatically
if the guest config has PCI devices at creation time, but otherwise
'passthrough' must be enabled to hotplug PCI devices.

The passthrough setting is mapped to a xen hypervisor feature of the
same name. Xen hypervisor features were recently added by the series
mentioned above.

Jim Fehlig (5):
  conf: add xen hypervisor feature 'passthrough'
  libxl: make use of passthrough hypervisor feature
  libxl: refactor cpu and hypervisor feature parser/formatter
  xenconfig: Add support for 'passthrough' hypervisor feature
  tests: check conversion of passthrough hypervisor feature

 docs/formatdomain.html.in                     |   7 ++
 docs/schemas/domaincommon.rng                 |  12 ++
 src/conf/domain_conf.c                        | 115 ++++++++++++++----
 src/conf/domain_conf.h                        |  11 ++
 src/libvirt_private.syms                      |   2 +
 src/libxl/libxl_conf.c                        |  21 ++++
 src/libxl/xen_common.c                        |  86 ++++++++++---
 .../test-fullvirt-hypervisor-features.cfg     |  26 ++++
 .../test-fullvirt-hypervisor-features.xml     |  50 ++++++++
 .../xlconfigdata/test-paravirt-e820_host.cfg  |   1 +
 .../xlconfigdata/test-paravirt-e820_host.xml  |   1 +
 tests/xlconfigtest.c                          |   3 +
 12 files changed, 290 insertions(+), 45 deletions(-)
 create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
 create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.xml

-- 
2.26.0


Re: [PATCH 0/5] Xen: Add support for xl.cfg passthrough setting
Posted by Marek Marczykowski-Górecki 3 years, 11 months ago
On Fri, Apr 17, 2020 at 04:29:34PM -0600, Jim Fehlig wrote:
> Hi All,
> 
> Note: This series is based on Marek's patches adding support for e820_host
> 
> https://www.redhat.com/archives/libvir-list/2020-April/msg00633.html
> 
> which I've ACK'ed, but am waiting to commit until this related setting is
> hashed out.
> 
> This series adds support for Xen's xl.cfg(5) 'passthrough' setting.
> Starting with xen 4.13 this setting must be enabled in order to assign
> PCI passthrough devices to a guest. libxl will enable it automatically
> if the guest config has PCI devices at creation time, but otherwise
> 'passthrough' must be enabled to hotplug PCI devices.
> 
> The passthrough setting is mapped to a xen hypervisor feature of the
> same name. Xen hypervisor features were recently added by the series
> mentioned above.

I'm wondering how does it relate to other drivers/hypervisors. Is there
any other that requires some option to be enabled to enable PCI hot
plugging? If yes, I'd try to model this one similar to existing cases.
Otherwise modeling it as a Xen feature would make sense.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Re: [PATCH 0/5] Xen: Add support for xl.cfg passthrough setting
Posted by Jim Fehlig 3 years, 11 months ago
On 4/24/20 4:57 AM, Marek Marczykowski-Górecki wrote:
> On Fri, Apr 17, 2020 at 04:29:34PM -0600, Jim Fehlig wrote:
>> Hi All,
>>
>> Note: This series is based on Marek's patches adding support for e820_host
>>
>> https://www.redhat.com/archives/libvir-list/2020-April/msg00633.html
>>
>> which I've ACK'ed, but am waiting to commit until this related setting is
>> hashed out.
>>
>> This series adds support for Xen's xl.cfg(5) 'passthrough' setting.
>> Starting with xen 4.13 this setting must be enabled in order to assign
>> PCI passthrough devices to a guest. libxl will enable it automatically
>> if the guest config has PCI devices at creation time, but otherwise
>> 'passthrough' must be enabled to hotplug PCI devices.
>>
>> The passthrough setting is mapped to a xen hypervisor feature of the
>> same name. Xen hypervisor features were recently added by the series
>> mentioned above.
> 
> I'm wondering how does it relate to other drivers/hypervisors. Is there
> any other that requires some option to be enabled to enable PCI hot
> plugging?

I'm not aware of any, but may have overlooked something. I relayed the question 
on IRC with no answer thus far.

> If yes, I'd try to model this one similar to existing cases.

Definitely.

> Otherwise modeling it as a Xen feature would make sense.

That is what I pushed, although we have about a week to change our minds :-).

Regards,
Jim


Re: [PATCH 0/5] Xen: Add support for xl.cfg passthrough setting
Posted by Michal Privoznik 3 years, 11 months ago
On 4/18/20 12:29 AM, Jim Fehlig wrote:
> Hi All,
> 
> Note: This series is based on Marek's patches adding support for e820_host
> 
> https://www.redhat.com/archives/libvir-list/2020-April/msg00633.html
> 
> which I've ACK'ed, but am waiting to commit until this related setting is
> hashed out.
> 
> This series adds support for Xen's xl.cfg(5) 'passthrough' setting.
> Starting with xen 4.13 this setting must be enabled in order to assign
> PCI passthrough devices to a guest. libxl will enable it automatically
> if the guest config has PCI devices at creation time, but otherwise
> 'passthrough' must be enabled to hotplug PCI devices.
> 
> The passthrough setting is mapped to a xen hypervisor feature of the
> same name. Xen hypervisor features were recently added by the series
> mentioned above.
> 
> Jim Fehlig (5):
>    conf: add xen hypervisor feature 'passthrough'
>    libxl: make use of passthrough hypervisor feature
>    libxl: refactor cpu and hypervisor feature parser/formatter
>    xenconfig: Add support for 'passthrough' hypervisor feature
>    tests: check conversion of passthrough hypervisor feature
> 
>   docs/formatdomain.html.in                     |   7 ++
>   docs/schemas/domaincommon.rng                 |  12 ++
>   src/conf/domain_conf.c                        | 115 ++++++++++++++----
>   src/conf/domain_conf.h                        |  11 ++
>   src/libvirt_private.syms                      |   2 +
>   src/libxl/libxl_conf.c                        |  21 ++++
>   src/libxl/xen_common.c                        |  86 ++++++++++---
>   .../test-fullvirt-hypervisor-features.cfg     |  26 ++++
>   .../test-fullvirt-hypervisor-features.xml     |  50 ++++++++
>   .../xlconfigdata/test-paravirt-e820_host.cfg  |   1 +
>   .../xlconfigdata/test-paravirt-e820_host.xml  |   1 +
>   tests/xlconfigtest.c                          |   3 +
>   12 files changed, 290 insertions(+), 45 deletions(-)
>   create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.cfg
>   create mode 100644 tests/xlconfigdata/test-fullvirt-hypervisor-features.xml
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal