[PATCH v5 0/4] Xen ABI feature control

Paul Durrant posted 4 patches 3 years, 4 months ago
Failed in applying to current master (apply log)
docs/man/xl.cfg.5.pod.in         | 50 ++++++++++++++++++++++++++++++++
tools/include/libxl.h            | 10 +++++++
tools/libs/light/libxl_arm.c     | 22 +++++++++-----
tools/libs/light/libxl_create.c  | 31 ++++++++++++++++++++
tools/libs/light/libxl_types.idl |  7 +++++
tools/libs/light/libxl_x86.c     | 17 ++++++++++-
tools/ocaml/libs/xc/xenctrl.ml   |  2 ++
tools/ocaml/libs/xc/xenctrl.mli  |  2 ++
tools/xl/xl_parse.c              | 50 ++++++++++++++++++++++++++++++--
xen/arch/arm/domain.c            |  3 +-
xen/arch/arm/domain_build.c      |  3 +-
xen/arch/arm/setup.c             |  3 +-
xen/arch/x86/domain.c            |  8 +++++
xen/arch/x86/hvm/hvm.c           |  3 ++
xen/arch/x86/setup.c             |  4 ++-
xen/common/domain.c              |  3 +-
xen/common/event_channel.c       | 24 +++++++++++++--
xen/include/public/domctl.h      |  6 +++-
18 files changed, 229 insertions(+), 19 deletions(-)
[PATCH v5 0/4] Xen ABI feature control
Posted by Paul Durrant 3 years, 4 months ago
From: Paul Durrant <pdurrant@amazon.com>

This series was previously called "evtchn: Introduce a per-guest knob to
control FIFO ABI". It is been extensively re-worked and extended to cover
another ABI feature.

Paul Durrant (4):
  domctl: introduce a new domain create flag,
    XEN_DOMCTL_CDF_evtchn_fifo, ...
  domctl: introduce a new domain create flag,
    XEN_DOMCTL_CDF_evtchn_upcall, ...
  libxl: introduce a 'libxl_xen_abi_features' enumeration...
  xl: introduce a 'xen-abi-features' option...

 docs/man/xl.cfg.5.pod.in         | 50 ++++++++++++++++++++++++++++++++
 tools/include/libxl.h            | 10 +++++++
 tools/libs/light/libxl_arm.c     | 22 +++++++++-----
 tools/libs/light/libxl_create.c  | 31 ++++++++++++++++++++
 tools/libs/light/libxl_types.idl |  7 +++++
 tools/libs/light/libxl_x86.c     | 17 ++++++++++-
 tools/ocaml/libs/xc/xenctrl.ml   |  2 ++
 tools/ocaml/libs/xc/xenctrl.mli  |  2 ++
 tools/xl/xl_parse.c              | 50 ++++++++++++++++++++++++++++++--
 xen/arch/arm/domain.c            |  3 +-
 xen/arch/arm/domain_build.c      |  3 +-
 xen/arch/arm/setup.c             |  3 +-
 xen/arch/x86/domain.c            |  8 +++++
 xen/arch/x86/hvm/hvm.c           |  3 ++
 xen/arch/x86/setup.c             |  4 ++-
 xen/common/domain.c              |  3 +-
 xen/common/event_channel.c       | 24 +++++++++++++--
 xen/include/public/domctl.h      |  6 +++-
 18 files changed, 229 insertions(+), 19 deletions(-)
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Christian Lindig <christian.lindig@citrix.com>
Cc: David Scott <dave@recoil.org>
Cc: George Dunlap <george.dunlap@citrix.com>
Cc: Ian Jackson <iwj@xenproject.org>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Cc: Wei Liu <wl@xen.org>
-- 
2.20.1


Re: [PATCH v5 0/4] Xen ABI feature control
Posted by Jürgen Groß 3 years, 4 months ago
On 03.12.20 13:41, Paul Durrant wrote:
> From: Paul Durrant <pdurrant@amazon.com>
> 
> This series was previously called "evtchn: Introduce a per-guest knob to
> control FIFO ABI". It is been extensively re-worked and extended to cover
> another ABI feature.
> 
> Paul Durrant (4):
>    domctl: introduce a new domain create flag,
>      XEN_DOMCTL_CDF_evtchn_fifo, ...
>    domctl: introduce a new domain create flag,
>      XEN_DOMCTL_CDF_evtchn_upcall, ...
>    libxl: introduce a 'libxl_xen_abi_features' enumeration...
>    xl: introduce a 'xen-abi-features' option...
> 
>   docs/man/xl.cfg.5.pod.in         | 50 ++++++++++++++++++++++++++++++++
>   tools/include/libxl.h            | 10 +++++++
>   tools/libs/light/libxl_arm.c     | 22 +++++++++-----
>   tools/libs/light/libxl_create.c  | 31 ++++++++++++++++++++
>   tools/libs/light/libxl_types.idl |  7 +++++
>   tools/libs/light/libxl_x86.c     | 17 ++++++++++-
>   tools/ocaml/libs/xc/xenctrl.ml   |  2 ++
>   tools/ocaml/libs/xc/xenctrl.mli  |  2 ++
>   tools/xl/xl_parse.c              | 50 ++++++++++++++++++++++++++++++--
>   xen/arch/arm/domain.c            |  3 +-
>   xen/arch/arm/domain_build.c      |  3 +-
>   xen/arch/arm/setup.c             |  3 +-
>   xen/arch/x86/domain.c            |  8 +++++
>   xen/arch/x86/hvm/hvm.c           |  3 ++
>   xen/arch/x86/setup.c             |  4 ++-
>   xen/common/domain.c              |  3 +-
>   xen/common/event_channel.c       | 24 +++++++++++++--
>   xen/include/public/domctl.h      |  6 +++-
>   18 files changed, 229 insertions(+), 19 deletions(-)
> ---
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Anthony PERARD <anthony.perard@citrix.com>
> Cc: Christian Lindig <christian.lindig@citrix.com>
> Cc: David Scott <dave@recoil.org>
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Ian Jackson <iwj@xenproject.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Julien Grall <julien@xen.org>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
> Cc: Wei Liu <wl@xen.org>
> 

Do we want to add a create flag for each such feature, or would it be
better to set options like those via hypfs?

It would be fairly easy to ad dynamic hypfs paths, e.g.:

/domain/<domid>/abi-features/evtchn-fifo
/domain/<domid>/abi-features/evtchn-upcall

which would have boolean type and could be set as long as the domain
hasn't been started.

xl support could even be rather generic, without the need to add coding
to xl for each new feature.

This is no objection to this series, but just an idea how to avoid
extending the use of unstable interfaces.

Thoughts?


Juergen
RE: [PATCH v5 0/4] Xen ABI feature control
Posted by Paul Durrant 3 years, 4 months ago
> -----Original Message-----
> From: Jürgen Groß <jgross@suse.com>
> Sent: 03 December 2020 13:15
> To: Paul Durrant <paul@xen.org>; xen-devel@lists.xenproject.org
> Cc: Paul Durrant <pdurrant@amazon.com>; Andrew Cooper <andrew.cooper3@citrix.com>; Anthony PERARD
> <anthony.perard@citrix.com>; Christian Lindig <christian.lindig@citrix.com>; David Scott
> <dave@recoil.org>; George Dunlap <george.dunlap@citrix.com>; Ian Jackson <iwj@xenproject.org>; Jan
> Beulich <jbeulich@suse.com>; Julien Grall <julien@xen.org>; Roger Pau Monné <roger.pau@citrix.com>;
> Stefano Stabellini <sstabellini@kernel.org>; Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>; Wei Liu
> <wl@xen.org>
> Subject: Re: [PATCH v5 0/4] Xen ABI feature control
> 
> On 03.12.20 13:41, Paul Durrant wrote:
> > From: Paul Durrant <pdurrant@amazon.com>
> >
> > This series was previously called "evtchn: Introduce a per-guest knob to
> > control FIFO ABI". It is been extensively re-worked and extended to cover
> > another ABI feature.
> >
> > Paul Durrant (4):
> >    domctl: introduce a new domain create flag,
> >      XEN_DOMCTL_CDF_evtchn_fifo, ...
> >    domctl: introduce a new domain create flag,
> >      XEN_DOMCTL_CDF_evtchn_upcall, ...
> >    libxl: introduce a 'libxl_xen_abi_features' enumeration...
> >    xl: introduce a 'xen-abi-features' option...
> >
> >   docs/man/xl.cfg.5.pod.in         | 50 ++++++++++++++++++++++++++++++++
> >   tools/include/libxl.h            | 10 +++++++
> >   tools/libs/light/libxl_arm.c     | 22 +++++++++-----
> >   tools/libs/light/libxl_create.c  | 31 ++++++++++++++++++++
> >   tools/libs/light/libxl_types.idl |  7 +++++
> >   tools/libs/light/libxl_x86.c     | 17 ++++++++++-
> >   tools/ocaml/libs/xc/xenctrl.ml   |  2 ++
> >   tools/ocaml/libs/xc/xenctrl.mli  |  2 ++
> >   tools/xl/xl_parse.c              | 50 ++++++++++++++++++++++++++++++--
> >   xen/arch/arm/domain.c            |  3 +-
> >   xen/arch/arm/domain_build.c      |  3 +-
> >   xen/arch/arm/setup.c             |  3 +-
> >   xen/arch/x86/domain.c            |  8 +++++
> >   xen/arch/x86/hvm/hvm.c           |  3 ++
> >   xen/arch/x86/setup.c             |  4 ++-
> >   xen/common/domain.c              |  3 +-
> >   xen/common/event_channel.c       | 24 +++++++++++++--
> >   xen/include/public/domctl.h      |  6 +++-
> >   18 files changed, 229 insertions(+), 19 deletions(-)
> > ---
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: Anthony PERARD <anthony.perard@citrix.com>
> > Cc: Christian Lindig <christian.lindig@citrix.com>
> > Cc: David Scott <dave@recoil.org>
> > Cc: George Dunlap <george.dunlap@citrix.com>
> > Cc: Ian Jackson <iwj@xenproject.org>
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Julien Grall <julien@xen.org>
> > Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> > Cc: Stefano Stabellini <sstabellini@kernel.org>
> > Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
> > Cc: Wei Liu <wl@xen.org>
> >
> 
> Do we want to add a create flag for each such feature, or would it be
> better to set options like those via hypfs?
> 
> It would be fairly easy to ad dynamic hypfs paths, e.g.:
> 
> /domain/<domid>/abi-features/evtchn-fifo
> /domain/<domid>/abi-features/evtchn-upcall
> 
> which would have boolean type and could be set as long as the domain
> hasn't been started.
> 
> xl support could even be rather generic, without the need to add coding
> to xl for each new feature.
> 
> This is no objection to this series, but just an idea how to avoid
> extending the use of unstable interfaces.
> 
> Thoughts?
> 

I was not aware we could have something that was dynamic only before I domain is started.

We'd still want libxl to write the features rather than xl doing it directly I think as we still want it to be the owner of the default settings. Personally it still feels like this kind of setting does want to be an explicit part of domain creation, though using hypfs does sound like a neat idea.

  Paul

> 
> Juergen


Re: [PATCH v5 0/4] Xen ABI feature control
Posted by Jürgen Groß 3 years, 4 months ago
On 03.12.20 14:51, Paul Durrant wrote:
>> -----Original Message-----
>> From: Jürgen Groß <jgross@suse.com>
>> Sent: 03 December 2020 13:15
>> To: Paul Durrant <paul@xen.org>; xen-devel@lists.xenproject.org
>> Cc: Paul Durrant <pdurrant@amazon.com>; Andrew Cooper <andrew.cooper3@citrix.com>; Anthony PERARD
>> <anthony.perard@citrix.com>; Christian Lindig <christian.lindig@citrix.com>; David Scott
>> <dave@recoil.org>; George Dunlap <george.dunlap@citrix.com>; Ian Jackson <iwj@xenproject.org>; Jan
>> Beulich <jbeulich@suse.com>; Julien Grall <julien@xen.org>; Roger Pau Monné <roger.pau@citrix.com>;
>> Stefano Stabellini <sstabellini@kernel.org>; Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>; Wei Liu
>> <wl@xen.org>
>> Subject: Re: [PATCH v5 0/4] Xen ABI feature control
>>
>> On 03.12.20 13:41, Paul Durrant wrote:
>>> From: Paul Durrant <pdurrant@amazon.com>
>>>
>>> This series was previously called "evtchn: Introduce a per-guest knob to
>>> control FIFO ABI". It is been extensively re-worked and extended to cover
>>> another ABI feature.
>>>
>>> Paul Durrant (4):
>>>     domctl: introduce a new domain create flag,
>>>       XEN_DOMCTL_CDF_evtchn_fifo, ...
>>>     domctl: introduce a new domain create flag,
>>>       XEN_DOMCTL_CDF_evtchn_upcall, ...
>>>     libxl: introduce a 'libxl_xen_abi_features' enumeration...
>>>     xl: introduce a 'xen-abi-features' option...
>>>
>>>    docs/man/xl.cfg.5.pod.in         | 50 ++++++++++++++++++++++++++++++++
>>>    tools/include/libxl.h            | 10 +++++++
>>>    tools/libs/light/libxl_arm.c     | 22 +++++++++-----
>>>    tools/libs/light/libxl_create.c  | 31 ++++++++++++++++++++
>>>    tools/libs/light/libxl_types.idl |  7 +++++
>>>    tools/libs/light/libxl_x86.c     | 17 ++++++++++-
>>>    tools/ocaml/libs/xc/xenctrl.ml   |  2 ++
>>>    tools/ocaml/libs/xc/xenctrl.mli  |  2 ++
>>>    tools/xl/xl_parse.c              | 50 ++++++++++++++++++++++++++++++--
>>>    xen/arch/arm/domain.c            |  3 +-
>>>    xen/arch/arm/domain_build.c      |  3 +-
>>>    xen/arch/arm/setup.c             |  3 +-
>>>    xen/arch/x86/domain.c            |  8 +++++
>>>    xen/arch/x86/hvm/hvm.c           |  3 ++
>>>    xen/arch/x86/setup.c             |  4 ++-
>>>    xen/common/domain.c              |  3 +-
>>>    xen/common/event_channel.c       | 24 +++++++++++++--
>>>    xen/include/public/domctl.h      |  6 +++-
>>>    18 files changed, 229 insertions(+), 19 deletions(-)
>>> ---
>>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>>> Cc: Anthony PERARD <anthony.perard@citrix.com>
>>> Cc: Christian Lindig <christian.lindig@citrix.com>
>>> Cc: David Scott <dave@recoil.org>
>>> Cc: George Dunlap <george.dunlap@citrix.com>
>>> Cc: Ian Jackson <iwj@xenproject.org>
>>> Cc: Jan Beulich <jbeulich@suse.com>
>>> Cc: Julien Grall <julien@xen.org>
>>> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
>>> Cc: Stefano Stabellini <sstabellini@kernel.org>
>>> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
>>> Cc: Wei Liu <wl@xen.org>
>>>
>>
>> Do we want to add a create flag for each such feature, or would it be
>> better to set options like those via hypfs?
>>
>> It would be fairly easy to ad dynamic hypfs paths, e.g.:
>>
>> /domain/<domid>/abi-features/evtchn-fifo
>> /domain/<domid>/abi-features/evtchn-upcall
>>
>> which would have boolean type and could be set as long as the domain
>> hasn't been started.
>>
>> xl support could even be rather generic, without the need to add coding
>> to xl for each new feature.
>>
>> This is no objection to this series, but just an idea how to avoid
>> extending the use of unstable interfaces.
>>
>> Thoughts?
>>
> 
> I was not aware we could have something that was dynamic only before I domain is started.

Look at my current cpupool/hypfs series: the per-cpupool scheduling
granularity can be modified only if no cpu is assigned to the cpupool.

> 
> We'd still want libxl to write the features rather than xl doing it directly I think as we still want it to be the owner of the default settings. Personally it still feels like this kind of setting does want to be an explicit part of domain creation, though using hypfs does sound like a neat idea.

No problem of doing it in libxl. libxl is already using libxenhypfs.


Juergen