2010-12-16 15:07:07 +00:00
|
|
|
/*
|
|
|
|
* qemu_command.h: QEMU command generation
|
|
|
|
*
|
2016-02-10 12:33:47 +00:00
|
|
|
* Copyright (C) 2006-2016 Red Hat, Inc.
|
2010-12-16 15:07:07 +00:00
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2010-12-16 15:07:07 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "domain_conf.h"
|
2023-03-07 11:02:11 +00:00
|
|
|
#include "virbitmap.h"
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "vircommand.h"
|
|
|
|
#include "virenum.h"
|
|
|
|
#include "qemu_block.h"
|
|
|
|
#include "qemu_conf.h"
|
|
|
|
#include "qemu_domain.h"
|
|
|
|
#include "qemu_capabilities.h"
|
2010-12-16 15:07:07 +00:00
|
|
|
|
|
|
|
/* Config type for XML import/export conversions */
|
2019-06-18 16:12:37 +00:00
|
|
|
#define QEMU_CONFIG_FORMAT_ARGV "qemu-argv"
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#define QEMU_FSDEV_HOST_PREFIX "fsdev-"
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#define QEMU_BLOCK_IOTUNE_MAX 1000000000000000LL
|
2016-04-20 14:14:02 +00:00
|
|
|
|
2019-01-20 16:04:56 +00:00
|
|
|
VIR_ENUM_DECL(qemuVideo);
|
2019-12-09 23:15:15 +00:00
|
|
|
VIR_ENUM_DECL(qemuSoundCodec);
|
2015-01-12 12:18:46 +00:00
|
|
|
|
2022-05-16 11:32:59 +00:00
|
|
|
virCommand *qemuBuildCommandLine(virDomainObj *vm,
|
|
|
|
const char *migrateURI,
|
|
|
|
virDomainMomentObj *snapshot,
|
|
|
|
virNetDevVPortProfileOp vmop,
|
|
|
|
size_t *nnicindexes,
|
2022-05-16 11:55:25 +00:00
|
|
|
int **nicindexes);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2018-04-18 14:55:14 +00:00
|
|
|
/* Generate the object properties for pr-manager */
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *qemuBuildPRManagerInfoProps(virStorageSource *src);
|
|
|
|
virJSONValue *qemuBuildPRManagedManagerInfoProps(qemuDomainObjPrivate *priv);
|
2016-06-13 16:30:34 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *qemuBuildDBusVMStateInfoProps(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2020-02-25 09:55:11 +00:00
|
|
|
|
2016-06-22 10:11:59 +00:00
|
|
|
/* Generate the object properties for a secret */
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuBuildSecretInfoProps(qemuDomainSecretInfo *secinfo,
|
|
|
|
virJSONValue **propsret);
|
2016-06-22 10:11:59 +00:00
|
|
|
|
2016-06-13 16:30:34 +00:00
|
|
|
/* Generate the object properties for a tls-creds-x509 */
|
|
|
|
int qemuBuildTLSx509BackendProps(const char *tlspath,
|
2016-09-12 14:49:28 +00:00
|
|
|
bool isListen,
|
2016-06-13 16:30:34 +00:00
|
|
|
bool verifypeer,
|
2018-05-22 05:38:22 +00:00
|
|
|
const char *alias,
|
2016-10-21 23:02:35 +00:00
|
|
|
const char *secalias,
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue **propsret);
|
2016-06-13 16:30:34 +00:00
|
|
|
|
2018-03-14 12:16:11 +00:00
|
|
|
/* Open a UNIX socket for chardev FD passing */
|
|
|
|
int
|
2022-07-18 11:02:19 +00:00
|
|
|
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_NO_INLINE;
|
2018-03-14 12:16:11 +00:00
|
|
|
|
2021-10-05 13:24:58 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildChrDeviceProps(const virDomainDef *vmdef,
|
|
|
|
virDomainChrDef *chr,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2011-11-21 12:50:42 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildChannelGuestfwdNetdevProps(virDomainChrDef *chr);
|
2020-05-14 11:01:59 +00:00
|
|
|
|
2021-10-14 13:35:02 +00:00
|
|
|
virJSONValue *
|
2022-12-15 19:19:16 +00:00
|
|
|
qemuBuildHostNetProps(virDomainObj *vm,
|
|
|
|
virDomainNetDef *net);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2022-05-09 12:38:20 +00:00
|
|
|
int
|
|
|
|
qemuBuildInterfaceConnect(virDomainObj *vm,
|
|
|
|
virDomainNetDef *net,
|
2022-05-13 11:49:08 +00:00
|
|
|
virNetDevVPortProfileOp vmop);
|
2022-05-09 12:38:20 +00:00
|
|
|
|
2010-12-16 15:07:07 +00:00
|
|
|
/* Current, best practice */
|
2021-10-04 15:52:03 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildNicDevProps(virDomainDef *def,
|
|
|
|
virDomainNetDef *net,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
char *qemuDeviceDriveHostAlias(virDomainDiskDef *disk);
|
2020-05-04 13:44:43 +00:00
|
|
|
bool qemuDiskBusIsSD(int bus);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2018-06-01 13:56:47 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBuildStorageSourceAttachPrepareCommon(virStorageSource *src,
|
2021-09-23 13:51:21 +00:00
|
|
|
qemuBlockStorageSourceAttachData *data);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2019-04-04 14:50:49 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBlockStorageSourceChainData *
|
2022-02-14 16:10:01 +00:00
|
|
|
qemuBuildStorageSourceChainAttachPrepareDrive(virDomainDiskDef *disk);
|
2019-04-04 14:50:49 +00:00
|
|
|
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBlockStorageSourceChainData *
|
|
|
|
qemuBuildStorageSourceChainAttachPrepareChardev(virDomainDiskDef *disk);
|
2021-02-01 11:00:35 +00:00
|
|
|
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBlockStorageSourceChainData *
|
2021-09-23 13:51:21 +00:00
|
|
|
qemuBuildStorageSourceChainAttachPrepareBlockdev(virStorageSource *top);
|
2019-04-04 14:50:49 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBlockStorageSourceChainData *
|
|
|
|
qemuBuildStorageSourceChainAttachPrepareBlockdevTop(virStorageSource *top,
|
2021-09-23 13:51:21 +00:00
|
|
|
virStorageSource *backingStore);
|
2019-04-04 14:50:49 +00:00
|
|
|
|
2021-10-04 14:54:54 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildDiskDeviceProps(const virDomainDef *def,
|
|
|
|
virDomainDiskDef *disk,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2016-02-18 15:06:14 +00:00
|
|
|
|
2021-10-05 14:23:19 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildVHostUserFsDevProps(virDomainFSDef *fs,
|
|
|
|
const virDomainDef *def,
|
|
|
|
const char *chardev_alias,
|
|
|
|
qemuDomainObjPrivate *priv);
|
2021-10-05 14:20:36 +00:00
|
|
|
|
2010-12-16 15:07:07 +00:00
|
|
|
/* Current, best practice */
|
2021-10-05 12:27:36 +00:00
|
|
|
int
|
|
|
|
qemuBuildControllerDevProps(const virDomainDef *domainDef,
|
|
|
|
virDomainControllerDef *def,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virJSONValue **devprops);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuBuildMemoryBackendProps(virJSONValue **backendProps,
|
2018-05-18 12:48:22 +00:00
|
|
|
const char *alias,
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfig *cfg,
|
|
|
|
qemuDomainObjPrivate *priv,
|
2020-05-25 13:00:17 +00:00
|
|
|
const virDomainDef *def,
|
|
|
|
const virDomainMemoryDef *mem,
|
2021-01-08 15:35:26 +00:00
|
|
|
bool force,
|
2023-03-07 11:02:11 +00:00
|
|
|
bool systemMemory,
|
|
|
|
virBitmap **nodemaskRet);
|
2014-10-12 22:28:58 +00:00
|
|
|
|
2021-09-27 16:44:28 +00:00
|
|
|
virJSONValue *
|
qemu: Allow prealloc for virtio-mem-pci
There are a some scenarios in which we want to prealloc guest
memory (e.g. when requested in domain XML, when using hugepages,
etc.). With 'regular' <memory/> models (like 'dimm', 'nvdimm' or
'virtio-pmem') or regular guest memory it is corresponding
memory-backend-* object that ends up with .prealloc attribute
set. And that's desired because neither of those devices can
change its size on the fly. However, with virtio-mem model things
are a bit different. While one can set .prealloc attribute on
corresponding memory-backend-* object it doesn't make much sense,
because virtio-mem can inflate/deflate on the fly, i.e. change
how big of a portion of the memory-backend-* object is exposed to
the guest. For instance, from a say 4GiB module only a half can
be exposed to the guest. Therefore, it doesn't make much sense to
preallocate whole 4GiB and keep them allocated. But we still want
the part exposed to the guest preallocated (when conditions
described at the beginning are met).
Having said that, with new enough QEMU the virtio-mem-pci device
gained new attribute ".prealloc" which instructs the device to
talk to the memory backend object and allocate only the requested
portion of memory.
Now, that our algorithm for setting .prealloc was isolated in a
single function, the function can be called when constructing cmd
line for virtio-mem-pci device.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-11-30 17:16:00 +00:00
|
|
|
qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg,
|
|
|
|
qemuDomainObjPrivate *priv,
|
|
|
|
const virDomainDef *def,
|
2021-12-01 12:23:04 +00:00
|
|
|
const virDomainMemoryDef *mem);
|
2014-10-12 22:28:58 +00:00
|
|
|
|
qemu_command: Introduce qemuBuildThreadContextProps()
The aim of thread-context object is to set affinity on threads
that allocate memory for a memory-backend-* object. For instance:
-object '{"qom-type":"thread-context","id":"tc-ram-node0","node-affinity":[3]}' \
-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,\
"hugetlbsize":2097152,"share":true,"prealloc":true,"prealloc-threads":8,\
"size":15032385536,"host-nodes":[3],"policy":"preferred",\
"prealloc-context":"tc-ram-node0"}' \
allocates 14GiB worth of memory, backed by 2MiB hugepages from
host NUMA node 3, using 8 threads. If it weren't for
thread-context these threads wouldn't have any affinity and thus
theoretically could be scheduled to run on CPUs of different NUMA
node (which is what I saw occasionally).
Therefore, whenever we are pinning memory (IOW setting host-nodes
attribute), we can generate thread-context object with the same
affinity.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-11-02 11:08:52 +00:00
|
|
|
int
|
|
|
|
qemuBuildThreadContextProps(virJSONValue **tcProps,
|
|
|
|
virJSONValue **memProps,
|
qemuBuildThreadContextProps: Prune .node-affinity wrt <emulatorpin/>
When a thread-context object is specified on the cmd line, then
QEMU spawns a thread and sets its affinity to the list of NUMA
nodes specified in .node-affinity attribute. And this works just
fine, until the main QEMU thread itself is not restricted.
Because of v5.3.0-rc1~18 we restrict the main emulator thread
even before QEMU is executed and thus then it tries to set
affinity of a thread-context thread, it inevitably fails with:
Setting CPU affinity failed: Invalid argument
Now, we could lift the pinning temporarily, let QEMU spawn all
thread-context threads, and enforce pinning again, but that would
require some form of communication with QEMU (maybe -preconfig?).
But that would still be wrong, because it would circumvent
<emulatorpin/>.
Technically speaking, thread-context is an internal
implementation detail of QEMU, and if it weren't for it, the main
emulator thread would be doing the allocation. Therefore, we
should honor the pinning and prune the list of node so that
inaccessible ones are dropped.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2154750
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2023-03-07 13:05:54 +00:00
|
|
|
const virDomainDef *def,
|
2023-03-07 11:39:47 +00:00
|
|
|
qemuDomainObjPrivate *priv,
|
|
|
|
virBitmap *nodemask);
|
qemu_command: Introduce qemuBuildThreadContextProps()
The aim of thread-context object is to set affinity on threads
that allocate memory for a memory-backend-* object. For instance:
-object '{"qom-type":"thread-context","id":"tc-ram-node0","node-affinity":[3]}' \
-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,\
"hugetlbsize":2097152,"share":true,"prealloc":true,"prealloc-threads":8,\
"size":15032385536,"host-nodes":[3],"policy":"preferred",\
"prealloc-context":"tc-ram-node0"}' \
allocates 14GiB worth of memory, backed by 2MiB hugepages from
host NUMA node 3, using 8 threads. If it weren't for
thread-context these threads wouldn't have any affinity and thus
theoretically could be scheduled to run on CPUs of different NUMA
node (which is what I saw occasionally).
Therefore, whenever we are pinning memory (IOW setting host-nodes
attribute), we can generate thread-context object with the same
affinity.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-11-02 11:08:52 +00:00
|
|
|
|
2010-12-16 15:07:07 +00:00
|
|
|
/* Current, best practice */
|
2021-10-01 20:28:59 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildPCIHostdevDevProps(const virDomainDef *def,
|
|
|
|
virDomainHostdevDef *dev);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2021-09-30 16:07:29 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildRNGDevProps(const virDomainDef *def,
|
|
|
|
virDomainRNGDef *dev,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuBuildRNGBackendProps(virDomainRNGDef *rng,
|
|
|
|
virJSONValue **props);
|
2015-01-17 05:09:31 +00:00
|
|
|
|
2010-12-16 15:07:07 +00:00
|
|
|
/* Current, best practice */
|
2021-10-01 09:24:04 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildUSBHostdevDevProps(const virDomainDef *def,
|
|
|
|
virDomainHostdevDef *dev,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2016-04-13 06:10:24 +00:00
|
|
|
|
2021-10-04 12:53:33 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildSCSIHostdevDevProps(const virDomainDef *def,
|
|
|
|
virDomainHostdevDef *dev,
|
|
|
|
const char *backendAlias);
|
2020-06-19 14:56:36 +00:00
|
|
|
|
2020-06-19 14:53:56 +00:00
|
|
|
qemuBlockStorageSourceAttachData *
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBuildHostdevSCSIAttachPrepare(virDomainHostdevDef *hostdev,
|
2020-06-19 14:53:56 +00:00
|
|
|
const char **backendAlias,
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUCaps *qemuCaps);
|
2020-06-19 14:53:56 +00:00
|
|
|
qemuBlockStorageSourceAttachData *
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuBuildHostdevSCSIDetachPrepare(virDomainHostdevDef *hostdev,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2020-06-19 14:53:56 +00:00
|
|
|
|
2021-10-05 13:39:42 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildSCSIVHostHostdevDevProps(const virDomainDef *def,
|
|
|
|
virDomainHostdevDef *dev,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
char *vhostfdName);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2021-10-01 08:17:01 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildHostdevMediatedDevProps(const virDomainDef *def,
|
|
|
|
virDomainHostdevDef *dev);
|
2017-02-03 13:24:14 +00:00
|
|
|
|
2021-10-01 10:58:40 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildRedirdevDevProps(const virDomainDef *def,
|
|
|
|
virDomainRedirdevDef *dev);
|
2010-12-16 15:07:07 +00:00
|
|
|
|
2021-10-01 12:07:37 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildZPCIDevProps(virDomainDeviceInfo *dev);
|
2018-11-08 11:00:29 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuNetworkPrepareDevices(virDomainDef *def);
|
qemu: allocate network connections sooner during domain startup
VFIO device assignment requires a cgroup ACL to be setup for access to
the /dev/vfio/nn "group" device for any devices that will be assigned
to a guest. In the case of a host device that is allocated from a
pool, it was being allocated during qemuBuildCommandLine(), which is
called by qemuProcessStart() *after* the all-encompassing
qemuSetupCgroup() was called, meaning that the standard Cgroup ACL
setup wasn't creating ACLs for these devices allocated from pools.
One possible solution was to manually add a single ACL down inside
qemuBuildCommandLine() when networkAllocateActualDevice() is called,
but that has two problems: 1) the function that adds the cgroup ACL
requires a virDomainObjPtr, which isn't available in
qemuBuildCommandLine(), and 2) we really shouldn't be doing network
device setup inside qemuBuildCommandLine() anyway.
Instead, I've created a new function called
qemuNetworkPrepareDevices() which is called just before
qemuPrepareHostDevices() during qemuProcessStart() (explanation of
ordering in the comments), i.e. well before the call to
qemuSetupCgroup(). To minimize code churn in a patch that will be
backported to 1.0.5-maint, qemuNetworkPrepareDevices only does
networkAllocateActualDevice() and the bare amount of setup required
for type='hostdev network devices, but it eventually should do *all*
device setup for guest network devices.
Note that some of the code that was previously needed in
qemuBuildCommandLine() is no longer required when
networkAllocateActualDevice() is called earlier:
* qemuAssignDeviceHostdevAlias() is already done further down in
qemuProcessStart().
* qemuPrepareHostdevPCIDevices() is called by
qemuPrepareHostDevices() which is called after
qemuNetworkPrepareDevices() in qemuProcessStart().
As hinted above, this new function should be moved into a separate
qemu_network.c (or similarly named) file along with
qemuPhysIfaceConnect(), qemuNetworkIfaceConnect(), and
qemuOpenVhostNet(), and expanded to call those functions as well, then
the nnets loop in qemuBuildCommandLine() should be reduced to only
build the commandline string (which itself can be in a separate
qemuInterfaceBuilldCommandLine() function as suggested by
Michal). However, this will require storing away an array of tapfd and
vhostfd that are needed for the commandline, so I would rather do that
in a separate patch and leave this patch at the minimum to fix the
bug.
2013-05-06 19:43:56 +00:00
|
|
|
|
2018-07-10 14:29:59 +00:00
|
|
|
bool
|
2023-05-25 14:52:36 +00:00
|
|
|
qemuDiskConfigBlkdeviotuneEnabled(const virDomainDiskDef *disk);
|
2018-07-10 14:29:59 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu)
|
2016-08-04 12:12:39 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *qemuBuildShmemBackendMemProps(virDomainShmemDef *shmem)
|
2016-08-10 09:15:22 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-09-27 17:26:32 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildShmemDevProps(virDomainDef *def,
|
|
|
|
virDomainShmemDef *shmem);
|
2016-08-10 09:15:22 +00:00
|
|
|
|
2021-09-27 12:37:48 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildWatchdogDevProps(const virDomainDef *def,
|
|
|
|
virDomainWatchdogDef *dev);
|
2016-08-10 09:15:22 +00:00
|
|
|
|
2021-10-01 11:16:15 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildInputVirtioDevProps(const virDomainDef *def,
|
|
|
|
virDomainInputDef *dev,
|
|
|
|
virQEMUCaps *qemuCaps);
|
|
|
|
|
|
|
|
virJSONValue *
|
|
|
|
qemuBuildInputUSBDevProps(const virDomainDef *def,
|
|
|
|
virDomainInputDef *dev);
|
2017-10-04 09:34:31 +00:00
|
|
|
|
2021-10-05 13:39:42 +00:00
|
|
|
virJSONValue *
|
|
|
|
qemuBuildVsockDevProps(virDomainDef *def,
|
|
|
|
virDomainVsockDef *vsock,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
const char *fdprefix);
|
2018-05-30 11:53:52 +00:00
|
|
|
|
2018-08-14 12:17:52 +00:00
|
|
|
/* this function is exported so that tests can mock the FDs */
|
|
|
|
int
|
|
|
|
qemuBuildTPMOpenBackendFDs(const char *tpmdev,
|
|
|
|
int *tpmfd,
|
|
|
|
int *cancelfd)
|
2022-07-18 11:02:19 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_NO_INLINE;
|
2022-01-17 15:07:38 +00:00
|
|
|
|
|
|
|
const char * qemuAudioDriverTypeToString(virDomainAudioType type);
|
|
|
|
virDomainAudioType qemuAudioDriverTypeFromString(const char *str);
|
2023-05-30 20:33:46 +00:00
|
|
|
int qemuVDPAConnect(const char *devicepath) G_NO_INLINE;
|