[libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device

Erik Skultety posted 11 patches 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1530106440.git.eskultet@redhat.com
Test syntax-check passed
There is a newer version of this series
docs/formatdomain.html.in                          |  33 ++-
docs/schemas/domaincommon.rng                      |  28 ++-
src/conf/domain_conf.c                             | 230 ++++++++++++++-------
src/conf/domain_conf.h                             |  14 +-
src/qemu/qemu_capabilities.c                       |   2 +
src/qemu/qemu_capabilities.h                       |   1 +
src/qemu/qemu_cgroup.c                             |  10 +-
src/qemu/qemu_command.c                            | 189 +++++++++++------
src/qemu/qemu_domain.c                             |  79 ++++++-
src/security/security_dac.c                        |   7 +-
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml |   1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |   1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   |   1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |   1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml    |   1 +
.../qemuxml2argvdata/graphics-sdl-fullscreen.args  |   2 +-
tests/qemuxml2argvdata/graphics-sdl.args           |   2 +-
.../qemuxml2argvdata/graphics-spice-gl-native.args |  26 +++
.../qemuxml2argvdata/graphics-spice-gl-native.xml  |  25 +++
.../graphics-spice-gl-non-native.args              |  27 +++
.../graphics-spice-gl-non-native.xml               |  24 +++
tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml |  37 ++++
tests/qemuxml2argvdata/graphics-vnc-gl.args        |  28 +++
tests/qemuxml2argvdata/graphics-vnc-gl.xml         |  37 ++++
.../hostdev-mdev-display-missing-graphics.xml      |  35 ++++
.../hostdev-mdev-display-spice-egl-headless.args   |  32 +++
.../hostdev-mdev-display-spice-egl-headless.xml    |  41 ++++
.../hostdev-mdev-display-spice-opengl.args         |  31 +++
.../hostdev-mdev-display-spice-opengl.xml          |  41 ++++
.../hostdev-mdev-display-vnc-egl-headless.args     |  32 +++
.../hostdev-mdev-display-vnc-egl-headless.xml      |  41 ++++
.../qemuxml2argvdata/hostdev-mdev-display-vnc.args |  31 +++
.../qemuxml2argvdata/hostdev-mdev-display-vnc.xml  |  39 ++++
tests/qemuxml2argvdata/hostdev-mdev-display.xml    |  39 ++++
.../qemuxml2argvdata/video-virtio-gpu-sdl-gl.args  |   2 +-
tests/qemuxml2argvtest.c                           |  38 ++++
.../hostdev-mdev-display-active.xml                |  47 +++++
.../hostdev-mdev-display-inactive.xml              |  47 +++++
.../video-virtio-gpu-spice-gl.xml                  |   2 +-
tests/qemuxml2xmltest.c                            |   2 +
40 files changed, 1143 insertions(+), 163 deletions(-)
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.xml
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.xml
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.args
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-missing-graphics.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-active.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-inactive.xml
[libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
Posted by Erik Skultety 5 years, 10 months ago
See the RFC here:
https://www.redhat.com/archives/libvir-list/2018-May/msg02218.html

Since RFC:
- split graphics 'gl' to a standalone structure since it's now SPICE, SDL,
  *and* VNC that will support it

- egl-headless support for VNC, since VNC doesn't support OpenGL natively like
SPICE does

- added a new attribute 'native' for spice which will instruct libvirt to use
'-display egl-headless' instead of libvirt trying to figure this on out by
itself, since egl-headless might have other uses besides mdev with VNC

- dropped formatting of the 'display' attribute to the domain XML if it had the
default value, so it will only be formatted if user explicitly set it
(previously patch 6)

- minor adjustments like splitting the second patch into 2 (now 2 and 3)
- more cleanup

Erik Skultety (11):
  conf: Remove a redundant model/address-type check in mdev post parse
  qemu: command: Move graphics iteration to its own function
  qemu: command: Add virReportEnumRangeError to BuildHostdevCommandline
  conf: Replace error label with cleanup in
    virDomainGraphicsDefParseVNCXML
  qemu: command: Fix building of the SDL display command line
  conf: Make graphics's GL a standalone structure
  conf: Allow usage of the <gl> element with VNC graphics
  conf: Introduce new <gl> attribute 'native' for SPICE
  qemu: caps: Add vfio-pci.display capability
  conf: Introduce new <hostdev> attribute 'display'
  qemu: command: Enable formatting vfio-pci.display option onto cmdline

 docs/formatdomain.html.in                          |  33 ++-
 docs/schemas/domaincommon.rng                      |  28 ++-
 src/conf/domain_conf.c                             | 230 ++++++++++++++-------
 src/conf/domain_conf.h                             |  14 +-
 src/qemu/qemu_capabilities.c                       |   2 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_cgroup.c                             |  10 +-
 src/qemu/qemu_command.c                            | 189 +++++++++++------
 src/qemu/qemu_domain.c                             |  79 ++++++-
 src/security/security_dac.c                        |   7 +-
 tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |   1 +
 tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml    |   1 +
 .../qemuxml2argvdata/graphics-sdl-fullscreen.args  |   2 +-
 tests/qemuxml2argvdata/graphics-sdl.args           |   2 +-
 .../qemuxml2argvdata/graphics-spice-gl-native.args |  26 +++
 .../qemuxml2argvdata/graphics-spice-gl-native.xml  |  25 +++
 .../graphics-spice-gl-non-native.args              |  27 +++
 .../graphics-spice-gl-non-native.xml               |  24 +++
 tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml |  37 ++++
 tests/qemuxml2argvdata/graphics-vnc-gl.args        |  28 +++
 tests/qemuxml2argvdata/graphics-vnc-gl.xml         |  37 ++++
 .../hostdev-mdev-display-missing-graphics.xml      |  35 ++++
 .../hostdev-mdev-display-spice-egl-headless.args   |  32 +++
 .../hostdev-mdev-display-spice-egl-headless.xml    |  41 ++++
 .../hostdev-mdev-display-spice-opengl.args         |  31 +++
 .../hostdev-mdev-display-spice-opengl.xml          |  41 ++++
 .../hostdev-mdev-display-vnc-egl-headless.args     |  32 +++
 .../hostdev-mdev-display-vnc-egl-headless.xml      |  41 ++++
 .../qemuxml2argvdata/hostdev-mdev-display-vnc.args |  31 +++
 .../qemuxml2argvdata/hostdev-mdev-display-vnc.xml  |  39 ++++
 tests/qemuxml2argvdata/hostdev-mdev-display.xml    |  39 ++++
 .../qemuxml2argvdata/video-virtio-gpu-sdl-gl.args  |   2 +-
 tests/qemuxml2argvtest.c                           |  38 ++++
 .../hostdev-mdev-display-active.xml                |  47 +++++
 .../hostdev-mdev-display-inactive.xml              |  47 +++++
 .../video-virtio-gpu-spice-gl.xml                  |   2 +-
 tests/qemuxml2xmltest.c                            |   2 +
 40 files changed, 1143 insertions(+), 163 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.args
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.args
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.args
 create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-missing-graphics.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.xml
 create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-active.xml
 create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-inactive.xml

--
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
Posted by Daniel P. Berrangé 5 years, 10 months ago
On Wed, Jun 27, 2018 at 03:34:37PM +0200, Erik Skultety wrote:
> See the RFC here:
> https://www.redhat.com/archives/libvir-list/2018-May/msg02218.html
> 
> Since RFC:
> - split graphics 'gl' to a standalone structure since it's now SPICE, SDL,
>   *and* VNC that will support it
> 
> - egl-headless support for VNC, since VNC doesn't support OpenGL natively like
> SPICE does
> 
> - added a new attribute 'native' for spice which will instruct libvirt to use
> '-display egl-headless' instead of libvirt trying to figure this on out by
> itself, since egl-headless might have other uses besides mdev with VNC

Can you elaborate on this part, as it feels a bit odd to me.

Currently -display accepts vnc or spice or sdl or gtk or none

Each of these -display options corresponds to a different <graphics type=XXX/>
element in libvirt XML, except 'none' which corresponds to no <graphics> at
all.

We already allow multiple <graphics> elements to turn on say both SPICE and
VNC at once.

So why would we want to treat egl-headless differently as an attribute under
the SPICE graphics, as opposed to just having  <graphics type=egl-headless>
as a thing in its own right.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
Posted by Erik Skultety 5 years, 10 months ago
On Wed, Jun 27, 2018 at 02:53:28PM +0100, Daniel P. Berrangé wrote:
> On Wed, Jun 27, 2018 at 03:34:37PM +0200, Erik Skultety wrote:
> > See the RFC here:
> > https://www.redhat.com/archives/libvir-list/2018-May/msg02218.html
> >
> > Since RFC:
> > - split graphics 'gl' to a standalone structure since it's now SPICE, SDL,
> >   *and* VNC that will support it
> >
> > - egl-headless support for VNC, since VNC doesn't support OpenGL natively like
> > SPICE does
> >
> > - added a new attribute 'native' for spice which will instruct libvirt to use
> > '-display egl-headless' instead of libvirt trying to figure this on out by
> > itself, since egl-headless might have other uses besides mdev with VNC
>
> Can you elaborate on this part, as it feels a bit odd to me.
>
> Currently -display accepts vnc or spice or sdl or gtk or none
>
> Each of these -display options corresponds to a different <graphics type=XXX/>
> element in libvirt XML, except 'none' which corresponds to no <graphics> at
> all.
>
> We already allow multiple <graphics> elements to turn on say both SPICE and
> VNC at once.
>
> So why would we want to treat egl-headless differently as an attribute under
> the SPICE graphics, as opposed to just having  <graphics type=egl-headless>
> as a thing in its own right.

Egl-headless doesn't make sense on its own, neither does it make sense with
anything else but SPICE and VNC. And since we're talking about dri render
nodes, I figured it would be better to design this as an attribute to the gl
element rather than a standalone element.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
Posted by Gerd Hoffmann 5 years, 10 months ago
  Hi,

> > So why would we want to treat egl-headless differently as an attribute under
> > the SPICE graphics, as opposed to just having  <graphics type=egl-headless>
> > as a thing in its own right.
> 
> Egl-headless doesn't make sense on its own, neither does it make sense with
> anything else but SPICE and VNC.

Well, you can run a vm with egl-headless and without vnc/spice just
fine.  Might even make sense to do that for automated QA runs as you can
get the display content using the screendump monitor command.

So the "<graphics type=egl-headless>" suggestion looks good to me.

cheers,
  Gerd

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
Posted by Erik Skultety 5 years, 9 months ago
On Mon, Jul 02, 2018 at 01:34:15PM +0200, Gerd Hoffmann wrote:
>   Hi,
>
> > > So why would we want to treat egl-headless differently as an attribute under
> > > the SPICE graphics, as opposed to just having  <graphics type=egl-headless>
> > > as a thing in its own right.
> >
> > Egl-headless doesn't make sense on its own, neither does it make sense with
> > anything else but SPICE and VNC.
>
> Well, you can run a vm with egl-headless and without vnc/spice just
> fine.  Might even make sense to do that for automated QA runs as you can
> get the display content using the screendump monitor command.
>
> So the "<graphics type=egl-headless>" suggestion looks good to me.
>
> cheers,
>   Gerd
>

Hi, so I incorporated the suggestions and sent a v2 where egl-headless is a
standalone graphics element.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list