[PATCH 2/3] conf: Parse/format XML input type 'linux'

Jonathon Jongsma jjongsma at redhat.com
Fri Apr 30 14:13:23 UTC 2021


On Fri, 2021-04-30 at 14:16 +0200, Kristina Hanicova wrote:
> Signed-off-by: Kristina Hanicova <khanicov at redhat.com>
> ---
>  docs/formatdomain.rst                    | 30 +++++++-----
>  docs/schemas/domaincommon.rng            | 20 ++++++++
>  src/conf/domain_audit.c                  |  1 +
>  src/conf/domain_conf.c                   | 61 ++++++++++++++++++++--
> --
>  src/conf/domain_conf.h                   | 12 +++++
>  src/conf/domain_validate.c               |  8 ++++
>  src/libvirt_private.syms                 |  2 +
>  src/qemu/qemu_cgroup.c                   |  2 +
>  src/qemu/qemu_command.c                  |  1 +
>  src/qemu/qemu_domain_address.c           |  1 +
>  src/qemu/qemu_hotplug.c                  |  1 +
>  src/qemu/qemu_validate.c                 |  6 +++
>  src/security/security_apparmor.c         |  1 +
>  src/security/security_dac.c              |  2 +
>  src/security/security_selinux.c          |  2 +
>  src/security/virt-aa-helper.c            |  3 +-
>  tests/qemuxml2argvdata/input-linux.xml   | 24 ++++++++++
>  tests/qemuxml2xmloutdata/input-linux.xml |  1 +
>  18 files changed, 157 insertions(+), 21 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/input-linux.xml
>  create mode 120000 tests/qemuxml2xmloutdata/input-linux.xml
> 
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 282176c4f4..337d07dbfb 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -5728,26 +5728,34 @@ to provide a graphics tablet for absolute
> cursor movement.
>       <input type='passthrough' bus='virtio'>
>         <source evdev='/dev/input/event1'/>
>       </input>
> +     <input type='linux'>
> +       <source evdev='/dev/input/event1234' grab='all' repeat='on'/>
> +     </input>
>     </devices>
>     ...
>  
>  ``input``
>     The ``input`` element has one mandatory attribute, the ``type``
> whose value
> -   can be 'mouse', 'tablet', ( :since:`since 1.2.2` ) 'keyboard' or
> (
> -   :since:`since 1.3.0` ) 'passthrough'. The tablet provides
> absolute cursor
> -   movement, while the mouse uses relative movement. The optional
> ``bus``
> -   attribute can be used to refine the exact device type. It takes
> values "xen"
> -   (paravirtualized), "ps2" and "usb" or ( :since:`since 1.3.0` )
> "virtio".
> +   can be 'mouse', 'tablet', ( :since:`since 1.2.2` ) 'keyboard', (
> +   :since:`since 1.3.0` ) 'passthrough' or ( :since:`since 7.4.0` )
> 'linux'.
> +   The tablet provides absolute cursor movement, while the mouse
> uses relative
> +   movement. The optional ``bus`` attribute can be used to refine
> the exact
> +   device type. It takes values "xen" (paravirtualized), "ps2" and
> "usb" or (
> +   :since:`since 1.3.0` ) "virtio".
>  
>  The ``input`` element has an optional sub-element ``<address>``
> which can tie
>  the device to a particular PCI slot, `documented above
> <#elementsAddress>`__. On
>  S390, ``address`` can be used to provide a CCW address for an input
> device (
> -:since:`since 4.2.0` ). For type ``passthrough``, the mandatory sub-
> element
> -``source`` must have an ``evdev`` attribute containing the absolute
> path to the
> -event device passed through to guests. (KVM only) :since:`Since
> 5.2.0` , the
> -``input`` element accepts a ``model`` attribute which has the values
> 'virtio',
> -'virtio-transitional' and 'virtio-non-transitional'. See `Virtio
> transitional
> -devices <#elementsVirtioTransitional>`__ for more details.
> +:since:`since 4.2.0` ). For types ``passthrough`` and ``linux``, the
> mandatory
> +sub-element ``source`` must have an ``evdev`` attribute containing
> the absolute
> +path to the event device passed through to guests. For type
> ``linux``,
> +``sorce`` can have two optional attributes ``grab`` with value 'all'
> which when

sorce -> source

> +enabled grabs all input devices instead of just one and ``repeat``
> with value
> +'on' to enable auto-repeat events ( :since:`Since 7.4.0` ) (KVM
> only)

I think this is supposed to be the end of the sentence, so it looks
like w'ere missing a period? It's a rather long sentence, consider
splitting it in two. 

Jonathon




More information about the libvir-list mailing list