Commit Graph

45851 Commits

Author SHA1 Message Date
Peter Krempa
f59a707d2c qemu: Move opening of vhost file descriptors for net devices into qemuBuildInterfaceConnect
Use the new infrastructure which stores the fds inside 'qemuFDPass'
objects in the private data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
18f863a4da qemuInterfaceOpenVhostNet: Reformat error messages per new guidelines
Remove the linebreaks inside of error messages.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
7c43765513 qemuBuildNicDevProps: Don't pass 'vhostfdSize'
All callers effectively pass 'net->driver.virtio.queues'. In case of the
code in 'qemu_hotplug.c' this value was set to '1' if it was 0 before.

Since 'qemuBuildNicDevProps' only uses it if it's greater than 1 we can
remove all the extra complexity.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
29458f0491 qemu: Prepare netdev code for use of qemuFDPass for tapfd/vhostfd passing
Add alternative code paths for passing of the FDs using the new
infrastructure. This way we'll be able to refactor the code
incrementally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
3e9cc6e78e qemuDomainAttachNetDevice: Don't construct network device properties under monitor lock
After the 'qemuFDPass' code was refactored we no longer need to hand off
the FD to qemu before we know the path for it.

Thus the call to qemuBuildHostNetProps can be moved outside of the
monitor critical section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
29067596f2 qemuBuildHostNetProps: Refactor construction of tapfd/vhostfd arguments
Pre-construct the array the same way for the case when there's only one
FD and when there are multiple. We just change the argument name
depending on the count.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
55485c56a4 qemuBuildHostNetProps: Move all 'tap' code together
Move the block guarded by 'is_tap' boolean to the only place where
'is_tap' is set to true.

This causes few arguments to change places.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
96d6fec8dc qemuBuildInterfaceConnect: Connect to 'vdpa' netdev
Move the setup of the 'vdpa' netdev into the new helper shared between
commandline and hotplug code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
29d022b1eb qemu: command: Introduce 'qemuBuildInterfaceConnect' helper
The helper will aggregate code that is used to connect the network
backend to the corresponding host portion.

This will be used to refactor the duplicated code between the cold-start
and hotplug helper functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:46 +02:00
Peter Krempa
ba9e1f629c qemu: domain: Add qemuFDPass helpers into network private data
Prepare for the upcoming refactor to use qemuFDPass for all the network
related file descriptors:

    - tapfds
    - vhostfds
    - slirp
    - vdpa

This patch adds the private data variables and a utility function to
clear it. Clearing is useful since we don't really need the data once
the VM is running so we save some memory.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
686f83e66e qemu: Clear 'qemuFDPass' helpers of char devices when no longer needed
While the FDs are closed right after use to prevent leaks, at certain
point we don't need the whole helper any more. Clear them for char
devices after hotplug and on start.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
6b3373ffa5 qemuFDPassTransferMonitor: Close local copy of the FD as soon as it's passed to qemu
We don't want to keep the FDs open more than we need to.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
c8f255c10e qemuMonitorAddFileHandleToSet: Remove return of 'qemuMonitorAddFdInfo'
The only caller doesn't use the fdset info any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
1e925d1c17 qemu_fd: Don't rely on fdset id allocation by qemu
If we use our own fdset ID when hot-adding a fdset we can vastly
simplify our internals.

As a stop-gap when a fdset would be added behind libvirt's back we'll
validated that the fdset to be added is not yet used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
278c630d2a qemu: domain: Store and update 'fdsetindex' across libvirtd restarts
While 'add-fd' qmp command gives the possibility to find an unused fdset
ID when hot-adding fdsets, such usage is extremely inconvenient.

This patch allows us to track the used fdset id so that we can avoid the
need to check results and thus employ simpler code flow when hot-adding
devices which use FD passing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
76709d4f48 qemuMonitorJSONQueryFdsets: Ensure that JSON arrays are valid before using them
The code didn't check that the reply value is an array and that the
'fds' array is present. This could lead to a crash if qemu wouldn't
return an array in those places.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
4e64cded66 qemu: monitor: Don't parse actual fd's from query-fdsets/add-fd replies
Libvirt doesn't use the returned value and in fact there's nothing we
could even do with them. Avoid parsing and storing them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
1d3e955938 qemuDomainAttachNetDevice: Use 'qemuFDPass' for the vdpa file descriptor
We use the qemuFDPass infrastructure when building the command line,
refactor the monitor too.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
5077263ecb qemu_fd: Remove error checking from qemuFDPassAddFD
It's effectively replaced by checks in qemuFDPassTransfer. This will
simplify cleanup paths on constructing the qemuFDPass object when FDs
are being handled.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
80f75fb758 qemu_fd: Add validation before transferring file descriptors
Add validation to the transfer step to make the adding step more simple
for easier cleanup paths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Peter Krempa
bcfd23b762 qemu_fd: Add return value handling for qemuFDPassTransfer* APIs
Add possibility to delay checks to the point when the FDs are to be
passed to qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-05-16 09:15:45 +02:00
Han Han
7b0e2e4a55 virt-xml-validate: Add more XML formats support
Add these XML formats validation in manpage or script:
cpu, domainbackup, domaincaps, domaincheckpoint, networkport,
storagepoolcaps.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2022-05-13 17:15:24 +02:00
Michal Privoznik
af1933713b virDomainRestoreFlags: Require VIR_DOMAIN_SAVE_PARAM_FILE for now
Calling virDomainRestoreFlags() with no typed params results in
an error in open() because it tries to open a NULL path.
Obviously, this is wrong and path to restore from must be
provided, at least for now until other sources of restore are
introduced. Then this limitation can be relaxed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-05-13 17:10:10 +02:00
Michal Privoznik
f4e2910552 lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE
When no VIR_DOMAIN_SAVE_PARAM_FILE typed param is set when
calling virDomainSaveParams() then in turn virQEMUFileOpenAs()
tries to open a NULL path.

We have two options now:
1) require the typed param, which in turn may be promoted to a
   regular argument, or

2) use this opportunity to make the API behave like
   virDomainManagedSave() and use typed params to pass extra
   arguments, instead of having to invent new managed save API
   with typed params.

Let's go with option 2, as it is more future proof.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-05-13 17:10:10 +02:00
Michal Privoznik
25b2f75c7a qemu: Separate out save code from qemuDomainManagedSave()
The code that actually does managed save within
qemuDomainManagedSave() is going to be reused shortly. Move it
out into a separate helper.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-05-13 17:10:10 +02:00
Han Han
43c83a2112 docs: formatdomain: Fix the introduced version of vdagent
The qemu-vdagent channel is introduced since:
"05b09f039e    conf: add qemu-vdagent channel"

It will be in the version 8.4.0.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2022-05-13 14:38:11 +02:00
김인수
635df6c4bb Translated using Weblate (Korean)
Currently translated at 100.0% (10419 of 10419 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2022-05-13 03:18:32 +02:00
Michal Privoznik
56ab5c3ae9 qemu: Don't check for qemuDomainManagedSavePath() retval
The qemuDomainManagedSavePath() function does no more than a
g_strdup_printf() and as such can't return NULL really.
Therefore, don't check for its return value.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 16:47:24 +02:00
Jiri Denemark
dc2b2b3ab9 qemu: Enable migration events only for fresh QEMU process
Every running QEMU process we are willing to reconnect (i.e., at least
3.1.0) supports migration events and we can assume the capability is
already enabled since last time libvirt daemon connected to its monitor.

Well, it's not guaranteed though. If libvirt 1.2.17 or older was used to
start QEMU 3.1.0 or newer, migration events would not be enabled. And if
the user decides to upgrade libvirt from 1.2.17 to 8.4.0 while the QEMU
process is still running, they would not be able to migrate the domain
because of disabled migration events. I think we do not really need to
worry about this scenario as libvirt 1.2.17 is 7 years old while QEMU
3.1.0 was released only 3.5 years ago. Thus a chance someone would be
running such configuration should be fairly small and a combination with
upgrading 1.2.17 to 8.4.0 (or newer) with running domains should get it
pretty much to zero. The issue would disappear ff the ancient libvirt is
first upgraded to something older than 8.4.0 and then to the current
libvirt.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 16:25:57 +02:00
Jiri Denemark
7f432214ab qemu: Make migration events mandatory
All QEMU versions we care about support migration events and we should
be able to enable the associated capability when connecting to the
monitor. Failure to do so is thus considered fatal now.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 16:25:57 +02:00
Jiri Denemark
62daebed13 qemu: Refactor qemuDomainGetJobInfoMigrationStats
The code was a bit too complicated, especially after removing the check
for QEMU_CAPS_MIGRATION_EVENT.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 16:25:57 +02:00
Jiri Denemark
b5fd70b367 qemu: Drop QEMU_CAPS_MIGRATION_EVENT
All QEMU versions we care about already support migration events.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 16:25:57 +02:00
Erik Skultety
b7fa48081d ci: Add a Fedora integration test job utilizing upstream QEMU
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
80ffd571a8 ci: Add a new integration job template for the upstream QEMU scenario
YAML anchors don't work with Shell condition structures, so we cannot
simply reference the QEMU build template YAML anchor conditionally and
hence have everything as part of a single job template.
Instead, we have to "subclass" the .integration_tests template and
inject the QEMU building bits explicitly.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
de98075faf ci: Introduce a template for upstream QEMU build
This was heavily inspired by QEMU's upstream CI buildtest-template.yml.
Rather than referencing QEMU's template directly (which GitLab can do),
this patch resorts to hard-coding the build steps ourselves, solely
because there's no guarantee QEMU will keep either the template file
name or the template name from which the build steps were mostly copied
from.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
72887b8f59 ci: Break off the integration_tests template into more templates
There's quite a lot happening in the .integration_tests template
already even without adding upstream QEMU build into the mix.
Let's break the template into more pieces which can then reference
in the .integration_tests template when putting all the pieces back
together using YAML anchors.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Erik Skultety
387932771a ci: Separate the integration job template to a separate file
Future patches will do more code extraction from the existing template
using YAML anchors so it'd be better that the templates would live
separately from job definitions.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:12:26 +02:00
Michal Privoznik
46fa0e46e1 lib: Rename VIR_SAVE_PARAM_* to VIR_DOMAIN_SAVE_PARAM_*
A few commits ago new APIs were introduced (virDomainSaveParams()
and virDomainRestoreParams()) and with them new typed parameters:
VIR_SAVE_PARAM_FILE and VIR_SAVE_PARAM_DXML. But their name does
not suggest they apply to either of the APIs nor that they are
intended for domain related APIs. Switch to
VIR_DOMAIN_SAVE_PARAM prefix to make it obvious.

It's true we already have VIR_DOMAIN_SAVE_* symbols which are
part of virDomainSaveRestoreFlags enum, therefore stick also with
'_PARAM_ ' part of the name to differentiate the two.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-05-12 11:00:08 +02:00
Martin Kletzander
36e86dbf33 qemu: Disable spice-related devices without spice graphics
For most of them qemu errors out with unclear message, and for the
audiodev qemu just falls back to timer-based audio with a warning
message, and will possibly also error out in the future.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035163
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-12 10:20:37 +02:00
Martin Kletzander
45c0ff3eea conf: Add virDomainDefHasSpiceGraphics
It will be used in future patch in multiple places.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-12 10:20:37 +02:00
Martin Kletzander
90d36d625e tests: Adjust for invalid qemu command combinations
Everything spice is not supported (and does not make sense) without spice
graphics.  For some tests I also added cirrus VGA capability so that the XML
stays simple and libvirt can guess a default video model rather than adding too
much of an irrelevant XML into the individual tests.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-12 10:20:36 +02:00
Martin Kletzander
d00e51e10c Remove serial-spiceport-nospice test
This old test was added by me to allow people to keep the spicevmc
channel while changing graphics type from spice to something else.
However we do not do this in other places and also now we have all the
Validate functions so it is better to show the user they will not have
the spicevmc channel available rather than simply not formatting it on
the qemu command line.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-12 10:20:36 +02:00
Michal Privoznik
bc3387f38f qemu_domain: Drop needless 'error' label in qemuDomainObjPrivateXMLParse()
After previous cleanup the 'error' label in
qemuDomainObjPrivateXMLParse() contains nothing but a return
statement. Well, the label can be dropped and all 'goto'-s can be
replaced with the return statement directly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 08:51:18 +02:00
Michal Privoznik
5b0bba799b qemu_domain: Drop needless free from qemuDomainObjPrivateXMLParse()
The qemuDomainObjPrivateXMLParse() is responsible for parsing
given XML into qemuDomainObjPrivate struct. As it does so, memory
might be allocated for some members. If an error occurs during
parsing the control jumps onto 'error' label where only some of
previously allocated memory is freed. The reason there's no
memory leak is simple: the only caller (virDomainObjParseXML())
unrefs freshly created virDomainObj which in turn causes
qemuDomainObjPrivateFree() to be called. Therefore, these
partial, selective frees are needless and should be just dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 08:50:54 +02:00
Michal Privoznik
21aec91790 qemu_domain: Format qemuDomainObjPrivate::originalMemlock
Now that qemuDomainObjPrivate struct gained new member format it
into XML and parse it so that the value is preserved across
daemon restarts.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 08:50:22 +02:00
Michal Privoznik
75df6d2c29 conf: Move virDomainObj::originalMemlock into qemuDomainObjPrivate
Since v1.3.0-90-gafbe1d4c56 the original value of memlock limit
is stored inside virDomainObj struct directly (under
originalMemlock member). This is needless because the value is
used only inside QEMU driver and thus can reside in
qemuDomainObjPrivate struct.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-05-12 08:49:30 +02:00
Jonathon Jongsma
2ba73a10fd qemu: add support for qemu-vdagent channel
Implement the qemu-vdagent channel introduced in the previous commit.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-10 11:00:16 -05:00
Jonathon Jongsma
05b09f039e conf: add qemu-vdagent channel
Add the ability to configure a qemu-vdagent in guest domains. This
device is similar to the spice vdagent channel except that qemu handles
the spice-vdagent protocol messages itself rather than routing them over
a spice protocol channel.

The qemu-vdagent device has two notable configuration options which
determine whether qemu will handle particular vdagent features:
'clipboard' and 'mouse'.

The 'clipboard' option allows qemu to synchronize its internal clipboard
manager with the guest clipboard, which enables client<->guest clipboard
synchronization for non-spice guests such as vnc.

The 'mouse' option allows absolute mouse positioning to be sent over the
vdagent channel rather than using a usb or virtio tablet device.

Sample configuration:
  <channel type='qemu-vdagent'>
    <target type='virtio' name='com.redhat.spice.0'/>
    <source>
      <clipboard copypaste='yes'/>
      <mouse mode='client'/>
    </source>
  </channel>

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-10 11:00:15 -05:00
Jonathon Jongsma
f135fdabab Rename virDomainGraphicsSpiceMouseMode to virDomainMouseMode
This enumeration will be useful for vnc with the upcoming qemu-vdagent
device so make the name more generic.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-10 11:00:15 -05:00
Jonathon Jongsma
b6dfb216c9 qemu: add capability for qemu-vdagent chardev
Detect whether qemu supports the qemu-vdagent character device. This
enables support for copy/paste with VNC graphics.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-10 11:00:13 -05:00