2010-12-16 15:23:41 +00:00
|
|
|
/*
|
|
|
|
* qemu_domain.h: QEMU domain private state
|
|
|
|
*
|
2019-03-27 02:12:37 -05:00
|
|
|
* Copyright (C) 2006-2019 Red Hat, Inc.
|
2010-12-16 15:23:41 +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 16:30:55 -06:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 18:06:23 +08:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2010-12-16 15:23:41 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#pragma once
|
|
|
|
|
2020-03-16 17:40:24 +05:30
|
|
|
#include <glib-object.h>
|
2019-06-18 11:12:37 -05:00
|
|
|
#include "vircgroup.h"
|
|
|
|
#include "virperf.h"
|
|
|
|
#include "domain_addr.h"
|
|
|
|
#include "domain_conf.h"
|
|
|
|
#include "qemu_monitor.h"
|
|
|
|
#include "qemu_agent.h"
|
|
|
|
#include "qemu_blockjob.h"
|
2020-06-24 16:15:23 +05:30
|
|
|
#include "qemu_domainjob.h"
|
2019-06-18 11:12:37 -05:00
|
|
|
#include "qemu_conf.h"
|
|
|
|
#include "qemu_capabilities.h"
|
2023-01-12 09:51:43 -06:00
|
|
|
#include "qemu_logcontext.h"
|
2019-06-18 11:12:37 -05:00
|
|
|
#include "qemu_migration_params.h"
|
2022-07-05 17:00:11 -05:00
|
|
|
#include "qemu_nbdkit.h"
|
2019-08-08 18:55:06 +04:00
|
|
|
#include "qemu_slirp.h"
|
2022-02-02 17:31:29 +01:00
|
|
|
#include "qemu_fd.h"
|
2019-06-18 11:12:37 -05:00
|
|
|
#include "virchrdev.h"
|
|
|
|
#include "virobject.h"
|
|
|
|
#include "virdomainmomentobjlist.h"
|
|
|
|
#include "virenum.h"
|
2020-02-12 12:26:11 +00:00
|
|
|
#include "vireventthread.h"
|
2023-05-09 13:19:12 +03:00
|
|
|
#include "storage_source_conf.h"
|
2019-06-18 11:12:37 -05:00
|
|
|
|
|
|
|
#define QEMU_DOMAIN_FORMAT_LIVE_FLAGS \
|
2017-06-30 16:55:20 +02:00
|
|
|
(VIR_DOMAIN_XML_SECURE)
|
2012-10-08 11:58:05 +02:00
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#if ULONG_MAX == 4294967295
|
2017-03-07 18:09:58 +01:00
|
|
|
/* QEMU has a 64-bit limit, but we are limited by our historical choice of
|
2012-03-20 16:56:29 +01:00
|
|
|
* representing bandwidth in a long instead of a 64-bit int. */
|
2019-06-18 11:12:37 -05:00
|
|
|
# define QEMU_DOMAIN_MIG_BANDWIDTH_MAX ULONG_MAX
|
|
|
|
#else
|
|
|
|
# define QEMU_DOMAIN_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024))
|
|
|
|
#endif
|
2011-08-26 12:10:22 -06:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
typedef void (*qemuDomainCleanupCallback)(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2012-03-16 07:52:26 +01:00
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_MASTER_KEY_LEN 32 /* 32 bytes for 256 bit random key */
|
2016-04-04 17:17:43 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSaveStatus(virDomainObj *obj);
|
|
|
|
void qemuDomainSaveConfig(virDomainObj *obj);
|
2019-06-27 15:40:39 +02:00
|
|
|
|
2016-04-04 17:17:43 +02:00
|
|
|
|
|
|
|
/* helper data types for async device unplug */
|
|
|
|
typedef enum {
|
|
|
|
QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_NONE = 0,
|
|
|
|
QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_OK,
|
|
|
|
QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_GUEST_REJECTED,
|
|
|
|
} qemuDomainUnpluggingDeviceStatus;
|
|
|
|
|
|
|
|
typedef struct _qemuDomainUnpluggingDevice qemuDomainUnpluggingDevice;
|
|
|
|
struct _qemuDomainUnpluggingDevice {
|
|
|
|
const char *alias;
|
|
|
|
qemuDomainUnpluggingDeviceStatus status;
|
qemu_hotplug: Fix a rare race condition when detaching a device twice
https://bugzilla.redhat.com/show_bug.cgi?id=1623389
If a device is detached twice from the same domain the following
race condition may happen:
1) The first DetachDevice() call will issue "device_del" on qemu
monitor, but since the DEVICE_DELETED event did not arrive in
time, the API ends claiming "Device detach request sent
successfully".
2) The second DetachDevice() therefore still find the device in
the domain and thus proceeds to detaching it again. It calls
EnterMonitor() and qemuMonitorSend() trying to issue "device_del"
command again. This gets both domain lock and monitor lock
released.
3) At this point, qemu sends us the DEVICE_DELETED event which is
going to be handled by the event loop which ends up calling
qemuDomainSignalDeviceRemoval() to determine who is going to
remove the device from domain definition. Whether it is the
caller that marked the device for removal or whether it is going
to be the event processing thread.
4) Because the device was marked for removal,
qemuDomainSignalDeviceRemoval() returns true, which means the
event is to be processed by the thread that has marked the device
for removal (and is currently still trying to issue "device_del"
command)
5) The thread finally issues the "device_del" command, which
fails (obviously) and therefore it calls
qemuDomainResetDeviceRemoval() to reset the device marking and
quits immediately after, NOT removing any device from the domain
definition.
At this point, the device is still present in the domain
definition but doesn't exist in qemu anymore. Worse, there is no
way to remove it from the domain definition.
Solution is to note down that we've seen the event and if the
second "device_del" fails, not take it as a failure but carry on
with the usual execution.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
2019-03-14 11:02:52 +01:00
|
|
|
bool eventSeen; /* True if DEVICE_DELETED event arrived. */
|
2016-04-04 17:17:43 +02:00
|
|
|
};
|
|
|
|
|
2016-11-15 11:30:18 +01:00
|
|
|
|
2019-06-25 13:21:39 +02:00
|
|
|
#define QEMU_PROC_MOUNTS "/proc/mounts"
|
|
|
|
#define QEMU_DEVPREFIX "/dev/"
|
|
|
|
#define QEMU_DEV_VFIO "/dev/vfio/vfio"
|
|
|
|
#define QEMU_DEV_SEV "/dev/sev"
|
2022-11-10 17:21:24 -08:00
|
|
|
#define QEMU_DEV_SGX_VEPVC "/dev/sgx_vepc"
|
|
|
|
#define QEMU_DEV_SGX_PROVISION "/dev/sgx_provision"
|
2019-06-25 13:21:39 +02:00
|
|
|
#define QEMU_DEVICE_MAPPER_CONTROL_PATH "/dev/mapper/control"
|
2022-02-23 15:06:55 -06:00
|
|
|
#define QEMU_DEV_UDMABUF "/dev/udmabuf"
|
2019-06-25 13:21:39 +02:00
|
|
|
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_AES_IV_LEN 16 /* 16 bytes for 128 bit random */
|
|
|
|
/* initialization vector */
|
2021-09-22 09:34:31 +02:00
|
|
|
|
|
|
|
typedef struct _qemuDomainSecretInfo qemuDomainSecretInfo;
|
|
|
|
struct _qemuDomainSecretInfo {
|
2017-03-03 07:22:16 -05:00
|
|
|
char *username;
|
|
|
|
char *alias; /* generated alias for secret */
|
|
|
|
char *iv; /* base64 encoded initialization vector */
|
|
|
|
char *ciphertext; /* encoded/encrypted secret */
|
|
|
|
};
|
|
|
|
|
2010-12-16 15:23:41 +00:00
|
|
|
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
|
|
|
|
struct _qemuDomainObjPrivate {
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUDriver *driver;
|
2017-07-21 15:46:56 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virBitmap *namespaces;
|
2016-11-15 11:30:18 +01:00
|
|
|
|
2020-02-12 12:26:11 +00:00
|
|
|
virEventThread *eventThread;
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuMonitor *mon;
|
|
|
|
virDomainChrSourceDef *monConfig;
|
2011-05-31 18:34:20 +02:00
|
|
|
bool monError;
|
|
|
|
unsigned long long monStart;
|
Add API to change qemu agent response timeout
Some layered products such as oVirt have requested a way to avoid being
blocked by guest agent commands when querying a loaded vm. For example,
many guest agent commands are polled periodically to monitor changes,
and rather than blocking the calling process, they'd prefer to simply
time out when an agent query is taking too long.
This patch adds a way for the user to specify a custom agent timeout
that is applied to all agent commands.
One special case to note here is the 'guest-sync' command. 'guest-sync'
is issued internally prior to calling any other command. (For example,
when libvirt wants to call 'guest-get-fsinfo', we first call
'guest-sync' and then call 'guest-get-fsinfo').
Previously, the 'guest-sync' command used a 5-second timeout
(VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT), whereas the actual command that
followed always blocked indefinitely
(VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK). As part of this patch, if a
custom timeout is specified that is shorter than
5 seconds, this new timeout is also used for 'guest-sync'. If there is
no custom timeout or if the custom timeout is longer than 5 seconds, we
will continue to use the 5-second timeout.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2019-11-13 16:06:09 -06:00
|
|
|
int agentTimeout;
|
2011-10-05 18:31:54 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuAgent *agent;
|
2011-10-05 18:31:54 +01:00
|
|
|
bool agentError;
|
|
|
|
|
2011-12-09 15:33:13 +01:00
|
|
|
bool beingDestroyed;
|
2011-06-17 14:43:54 +01:00
|
|
|
char *pidfile;
|
2024-07-19 17:44:18 +02:00
|
|
|
int pidMonitored;
|
2010-12-16 15:23:41 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainPCIAddressSet *pciaddrs;
|
|
|
|
virDomainUSBAddressSet *usbaddrs;
|
2011-05-04 12:55:38 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUCaps *qemuCaps;
|
2010-10-26 15:04:46 +01:00
|
|
|
char *lockState;
|
2011-06-15 17:49:58 +01:00
|
|
|
|
|
|
|
bool fakeReboot;
|
2019-12-19 11:02:06 +03:00
|
|
|
bool pausedShutdown;
|
2021-08-19 14:54:18 +02:00
|
|
|
/* allowReboot:
|
|
|
|
*
|
|
|
|
* Unused with new QEMU versions which have QEMU_CAPS_SET_ACTION.
|
|
|
|
*
|
|
|
|
* Otherwise if it's set to VIR_TRISTATE_BOOL_YES, QEMU was started with
|
|
|
|
* -no-shutdown, and if set to VIR_TRISTATE_BOOL_NO qemu was started with
|
|
|
|
* -no-reboot instead.
|
|
|
|
*/
|
2017-10-11 15:57:16 +02:00
|
|
|
virTristateBool allowReboot;
|
2011-08-12 15:29:37 +02:00
|
|
|
|
2011-08-26 12:10:22 -06:00
|
|
|
unsigned long migMaxBandwidth;
|
2011-10-04 09:11:35 +02:00
|
|
|
char *origname;
|
2013-01-29 13:38:50 +01:00
|
|
|
int nbdPort; /* Port used for migration with NBD */
|
2013-10-11 11:27:13 +08:00
|
|
|
unsigned short migrationPort;
|
2014-02-06 14:30:59 +01:00
|
|
|
int preMigrationState;
|
2022-06-22 16:12:02 +02:00
|
|
|
unsigned long long preMigrationMemlock; /* Original RLIMIT_MEMLOCK in case
|
|
|
|
it was changed for the current
|
|
|
|
migration job. */
|
2011-10-06 12:24:47 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virChrdevs *devs;
|
2012-03-16 07:52:26 +01:00
|
|
|
|
|
|
|
qemuDomainCleanupCallback *cleanupCallbacks;
|
|
|
|
size_t ncleanupCallbacks;
|
|
|
|
size_t ncleanupCallbacks_max;
|
2013-03-21 14:40:29 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virCgroup *cgroup;
|
2013-07-11 17:11:02 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virPerf *perf;
|
2016-03-28 21:30:29 +08:00
|
|
|
|
2016-04-04 17:17:43 +02:00
|
|
|
qemuDomainUnpluggingDevice unplug;
|
|
|
|
|
2013-07-19 15:08:29 +02:00
|
|
|
char **qemuDevices; /* NULL-terminated list of devices aliases known to QEMU */
|
2014-02-04 16:42:13 +01:00
|
|
|
|
|
|
|
bool hookRun; /* true if there was a hook run over this domain */
|
2015-03-27 10:11:00 +01:00
|
|
|
|
|
|
|
/* Bitmaps below hold data from the auto NUMA feature */
|
2021-03-11 08:16:13 +01:00
|
|
|
virBitmap *autoNodeset;
|
|
|
|
virBitmap *autoCpuset;
|
2015-05-29 08:38:44 +02:00
|
|
|
|
|
|
|
bool signalIOError; /* true if the domain condition should be signalled on
|
|
|
|
I/O error */
|
2016-01-05 22:19:28 +01:00
|
|
|
bool signalStop; /* true if the domain condition should be signalled on
|
|
|
|
QMP STOP event */
|
2016-02-01 16:50:54 +01:00
|
|
|
char *machineName;
|
2016-02-26 09:15:55 +01:00
|
|
|
char *libDir; /* base path for per-domain files */
|
|
|
|
char *channelTargetDir; /* base path for per-domain channel targets */
|
2016-03-29 18:22:46 -04:00
|
|
|
|
|
|
|
/* random masterKey and length for encryption (not to be saved in our */
|
|
|
|
/* private XML) - need to restore at process reconnect */
|
|
|
|
uint8_t *masterKey;
|
|
|
|
size_t masterKeyLen;
|
2016-10-31 16:49:49 +01:00
|
|
|
|
2017-03-03 07:22:16 -05:00
|
|
|
/* for migrations using TLS with a secret (not to be saved in our */
|
|
|
|
/* private XML). */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *migSecinfo;
|
2016-09-14 07:28:18 +02:00
|
|
|
|
2017-05-16 13:26:54 +02:00
|
|
|
/* CPU def used to start the domain when it differs from the one actually
|
|
|
|
* provided by QEMU. */
|
2021-03-11 08:16:13 +01:00
|
|
|
virCPUDef *origCPU;
|
2017-06-15 08:34:55 +02:00
|
|
|
|
|
|
|
/* If true virtlogd is used as stdio handler for character devices. */
|
|
|
|
bool chardevStdioLogd;
|
2017-09-26 16:37:47 +02:00
|
|
|
|
|
|
|
/* Tracks blockjob state for vm. Valid only while reconnecting to qemu. */
|
|
|
|
virTristateBool reconnectBlockjobs;
|
2017-10-17 21:39:41 +02:00
|
|
|
|
|
|
|
/* Migration capabilities. Rechecked on reconnect, not to be saved in
|
|
|
|
* private XML. */
|
2021-03-11 08:16:13 +01:00
|
|
|
virBitmap *migrationCaps;
|
2018-04-19 10:00:36 +02:00
|
|
|
|
2024-08-08 11:45:16 +02:00
|
|
|
/* True if QEMU supports "postcopy-recover-setup" migration state. Checked
|
|
|
|
* QEMU enters the state, not to be stored in private XML. */
|
|
|
|
bool migrationRecoverSetup;
|
|
|
|
|
2018-04-19 10:00:36 +02:00
|
|
|
/* true if qemu-pr-helper process is running for the domain */
|
|
|
|
bool prDaemonRunning;
|
2017-07-07 14:29:32 +02:00
|
|
|
|
|
|
|
/* counter for generating node names for qemu disks */
|
|
|
|
unsigned long long nodenameindex;
|
2018-09-10 19:41:53 +02:00
|
|
|
|
2022-05-05 15:45:55 +02:00
|
|
|
/* counter for generating IDs of fdsets */
|
2022-01-24 16:53:27 +01:00
|
|
|
unsigned int fdsetindex;
|
2022-05-05 15:45:55 +02:00
|
|
|
bool fdsetindexParsed;
|
2022-01-24 16:53:27 +01:00
|
|
|
|
2018-09-10 19:41:53 +02:00
|
|
|
/* qemuProcessStartCPUs stores the reason for starting vCPUs here for the
|
|
|
|
* RESUME event handler to use it */
|
|
|
|
virDomainRunningReason runningReason;
|
2018-11-13 12:50:41 +01:00
|
|
|
|
2018-10-09 16:41:51 +03:00
|
|
|
/* qemuProcessStopCPUs stores the reason for pausing vCPUs here for the
|
|
|
|
* STOP event handler to use it */
|
|
|
|
virDomainPausedReason pausedReason;
|
|
|
|
|
2018-11-13 12:50:41 +01:00
|
|
|
/* true if libvirt remembers the original owner for files */
|
|
|
|
bool rememberOwner;
|
2018-11-05 11:48:16 +01:00
|
|
|
|
|
|
|
/* true if global -mem-prealloc appears on cmd line */
|
|
|
|
bool memPrealloc;
|
2018-11-29 12:50:09 +01:00
|
|
|
|
|
|
|
/* running block jobs */
|
2020-10-22 19:04:18 +02:00
|
|
|
GHashTable *blockjobs;
|
2019-08-08 18:55:00 +04:00
|
|
|
|
2019-08-08 18:55:07 +04:00
|
|
|
bool disableSlirp;
|
2019-11-15 16:23:44 +01:00
|
|
|
|
|
|
|
/* Until we add full support for backing chains for pflash drives, these
|
|
|
|
* pointers hold the temporary virStorageSources for creating the -blockdev
|
|
|
|
* commandline for pflash drives. */
|
2021-03-11 08:16:13 +01:00
|
|
|
virStorageSource *pflash0;
|
2019-09-18 11:27:05 +02:00
|
|
|
|
|
|
|
/* running backup job */
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainBackupDef *backup;
|
2020-02-25 10:55:08 +01:00
|
|
|
|
|
|
|
bool dbusDaemonRunning;
|
2020-02-25 10:55:11 +01:00
|
|
|
|
|
|
|
/* list of Ids to migrate */
|
2021-02-05 10:48:51 +01:00
|
|
|
GSList *dbusVMStateIds;
|
2020-02-25 10:55:11 +01:00
|
|
|
/* true if -object dbus-vmstate was added */
|
|
|
|
bool dbusVMState;
|
2022-05-11 16:27:18 +02:00
|
|
|
|
|
|
|
unsigned long long originalMemlock; /* Original RLIMIT_MEMLOCK, zero if no
|
|
|
|
* restore will be required later */
|
2022-09-07 16:04:20 +05:30
|
|
|
|
|
|
|
GHashTable *statsSchema; /* (name, data) pair for stats */
|
2022-08-10 17:17:42 +02:00
|
|
|
|
|
|
|
/* Info on dummy process for schedCore. A short lived process used only
|
|
|
|
* briefly when starting a guest. Don't save/parse into XML. */
|
|
|
|
pid_t schedCoreChildPID;
|
|
|
|
pid_t schedCoreChildFD;
|
2022-11-04 13:52:43 +01:00
|
|
|
|
|
|
|
GSList *threadContextAliases; /* List of IDs of thread-context objects */
|
2022-03-24 15:50:27 +01:00
|
|
|
|
|
|
|
/* named file descriptor groups associated with the VM */
|
|
|
|
GHashTable *fds;
|
2024-09-18 10:38:24 +02:00
|
|
|
|
|
|
|
char *memoryBackingDir;
|
2016-04-06 08:56:52 -04:00
|
|
|
};
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_PRIVATE(vm) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainObjPrivate *) (vm)->privateData)
|
2016-04-06 08:56:52 -04:00
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_DISK_PRIVATE(disk) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainDiskPrivate *) (disk)->privateData)
|
2015-05-13 11:20:36 +02:00
|
|
|
|
|
|
|
typedef struct _qemuDomainDiskPrivate qemuDomainDiskPrivate;
|
|
|
|
struct _qemuDomainDiskPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
|
|
|
/* ideally we want a smarter way to interlock block jobs on single qemu disk
|
|
|
|
* in the future, but for now we just disallow any concurrent job on a
|
|
|
|
* single disk */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuBlockJobData *blockjob;
|
2015-05-11 20:10:06 +02:00
|
|
|
|
|
|
|
bool migrating; /* the disk is being migrated */
|
2021-03-11 08:16:13 +01:00
|
|
|
virStorageSource *migrSource; /* disk source object used for NBD migration */
|
2023-12-06 15:57:16 +01:00
|
|
|
bool migrationslice; /* storage slice was added for migration purposes */
|
2016-04-06 08:56:52 -04:00
|
|
|
|
2016-05-19 15:29:02 +02:00
|
|
|
/* information about the device */
|
|
|
|
bool tray; /* device has tray */
|
|
|
|
bool removable; /* device media can be removed/changed */
|
2018-06-15 09:12:01 +02:00
|
|
|
|
|
|
|
char *qomName; /* QOM path of the disk (also refers to the block backend) */
|
2018-08-21 14:45:57 +02:00
|
|
|
char *nodeCopyOnRead; /* nodename of the disk-wide copy-on-read blockdev layer */
|
2021-04-30 08:58:45 +02:00
|
|
|
|
2021-05-18 17:47:48 +02:00
|
|
|
bool transientOverlayCreated; /* the overlay image of a transient disk was
|
|
|
|
created and the definition was updated */
|
2015-05-13 11:20:36 +02:00
|
|
|
};
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainStorageSourcePrivate *) (src)->privateData)
|
2017-10-05 09:22:09 -04:00
|
|
|
|
|
|
|
typedef struct _qemuDomainStorageSourcePrivate qemuDomainStorageSourcePrivate;
|
|
|
|
struct _qemuDomainStorageSourcePrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
|
|
|
/* data required for authentication to the storage source */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *secinfo;
|
2017-10-05 09:22:09 -04:00
|
|
|
|
|
|
|
/* data required for decryption of encrypted storage source */
|
2023-03-13 04:50:20 -05:00
|
|
|
size_t enccount;
|
|
|
|
qemuDomainSecretInfo **encinfo;
|
2020-03-09 08:19:02 +01:00
|
|
|
|
|
|
|
/* secure passthrough of the http cookie */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *httpcookie;
|
2020-06-29 15:10:42 +02:00
|
|
|
|
|
|
|
/* key for decrypting TLS certificate */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *tlsKeySecret;
|
2022-05-04 15:00:18 +02:00
|
|
|
|
|
|
|
/* file descriptors if user asks for FDs to be passed */
|
|
|
|
qemuFDPass *fdpass;
|
2022-07-05 17:00:11 -05:00
|
|
|
|
|
|
|
/* an nbdkit process for serving network storage sources */
|
|
|
|
qemuNbdkitProcess *nbdkitProcess;
|
2017-10-05 09:22:09 -04:00
|
|
|
};
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virObject *qemuDomainStorageSourcePrivateNew(void);
|
|
|
|
qemuDomainStorageSourcePrivate *
|
|
|
|
qemuDomainStorageSourcePrivateFetch(virStorageSource *src);
|
2017-10-05 09:22:09 -04:00
|
|
|
|
2016-06-29 15:40:09 +02:00
|
|
|
typedef struct _qemuDomainVcpuPrivate qemuDomainVcpuPrivate;
|
|
|
|
struct _qemuDomainVcpuPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
2016-07-01 14:56:14 +02:00
|
|
|
pid_t tid; /* vcpu thread id */
|
2016-07-31 14:05:04 +02:00
|
|
|
int enable_id; /* order in which the vcpus were enabled in qemu */
|
2016-11-21 14:57:54 +01:00
|
|
|
int qemu_id; /* ID reported by qemu as 'CPU' in query-cpus */
|
2016-07-31 14:05:04 +02:00
|
|
|
char *alias;
|
2018-02-06 16:00:45 +01:00
|
|
|
virTristateBool halted;
|
2016-07-31 14:05:04 +02:00
|
|
|
|
2019-08-29 14:47:10 +02:00
|
|
|
/* copy of the data that qemu returned */
|
2021-03-11 08:16:13 +01:00
|
|
|
virJSONValue *props;
|
2019-08-29 14:47:10 +02:00
|
|
|
|
2016-07-31 14:05:04 +02:00
|
|
|
/* information for hotpluggable cpus */
|
|
|
|
char *type;
|
|
|
|
int socket_id;
|
|
|
|
int core_id;
|
|
|
|
int thread_id;
|
2017-06-27 16:04:38 +02:00
|
|
|
int node_id;
|
2016-07-31 14:05:04 +02:00
|
|
|
int vcpus;
|
2022-02-07 11:56:40 +01:00
|
|
|
|
|
|
|
char *qomPath;
|
2016-06-29 15:40:09 +02:00
|
|
|
};
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_VCPU_PRIVATE(vcpu) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainVcpuPrivate *) (vcpu)->privateData)
|
2016-06-29 15:40:09 +02:00
|
|
|
|
|
|
|
|
2016-05-20 07:21:04 +02:00
|
|
|
struct qemuDomainDiskInfo {
|
|
|
|
bool removable;
|
2016-05-19 14:57:41 +02:00
|
|
|
bool tray;
|
2016-05-20 07:21:04 +02:00
|
|
|
bool tray_open;
|
2016-05-19 14:57:41 +02:00
|
|
|
bool empty;
|
2016-05-20 07:21:04 +02:00
|
|
|
int io_status;
|
2017-02-23 19:36:52 +01:00
|
|
|
char *nodename;
|
2016-05-20 07:21:04 +02:00
|
|
|
};
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainChrSourcePrivate *) (dev)->privateData)
|
2016-06-17 06:36:11 -04:00
|
|
|
|
2016-10-21 08:31:37 -04:00
|
|
|
typedef struct _qemuDomainChrSourcePrivate qemuDomainChrSourcePrivate;
|
|
|
|
struct _qemuDomainChrSourcePrivate {
|
2016-06-17 06:36:11 -04:00
|
|
|
virObject parent;
|
|
|
|
|
|
|
|
/* for char devices using secret
|
|
|
|
* NB: *not* to be written to qemu domain object XML */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *secinfo;
|
2021-10-25 12:42:16 +02:00
|
|
|
|
2022-02-02 17:31:29 +01:00
|
|
|
qemuFDPass *sourcefd;
|
|
|
|
qemuFDPass *logfd;
|
2022-05-16 16:08:18 +02:00
|
|
|
qemuFDPassDirect *directfd;
|
2021-12-14 16:01:15 +01:00
|
|
|
bool wait; /* wait for incoming connections on chardev */
|
2021-11-19 17:35:21 +01:00
|
|
|
|
2021-11-22 14:41:23 +01:00
|
|
|
char *tlsCertPath; /* path to certificates if TLS is requested */
|
|
|
|
bool tlsVerify; /* whether server should verify client certificates */
|
|
|
|
|
2021-11-19 17:35:21 +01:00
|
|
|
char *tlsCredsAlias; /* alias of the x509 tls credentials object */
|
2016-06-17 06:36:11 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-05-06 14:50:06 +02:00
|
|
|
void
|
|
|
|
qemuDomainChrSourcePrivateClearFDPass(qemuDomainChrSourcePrivate *priv);
|
|
|
|
|
2018-05-18 13:14:42 +02:00
|
|
|
typedef struct _qemuDomainVsockPrivate qemuDomainVsockPrivate;
|
|
|
|
struct _qemuDomainVsockPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
2018-05-22 15:57:47 +02:00
|
|
|
int vhostfd;
|
2018-05-18 13:14:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-09-23 14:44:36 +04:00
|
|
|
#define QEMU_DOMAIN_VIDEO_PRIVATE(dev) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainVideoPrivate *) (dev)->privateData)
|
2019-09-23 14:44:36 +04:00
|
|
|
|
|
|
|
typedef struct _qemuDomainVideoPrivate qemuDomainVideoPrivate;
|
|
|
|
struct _qemuDomainVideoPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
2019-09-23 14:44:37 +04:00
|
|
|
int vhost_user_fd;
|
2019-09-23 14:44:36 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-06-18 11:12:37 -05:00
|
|
|
#define QEMU_DOMAIN_GRAPHICS_PRIVATE(dev) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainGraphicsPrivate *) (dev)->privateData)
|
2019-01-10 15:50:11 +01:00
|
|
|
|
|
|
|
typedef struct _qemuDomainGraphicsPrivate qemuDomainGraphicsPrivate;
|
|
|
|
struct _qemuDomainGraphicsPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
|
|
|
char *tlsAlias;
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *secinfo;
|
2019-01-10 15:50:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-08-08 18:55:02 +04:00
|
|
|
#define QEMU_DOMAIN_NETWORK_PRIVATE(dev) \
|
2021-03-11 08:16:13 +01:00
|
|
|
((qemuDomainNetworkPrivate *) (dev)->privateData)
|
2019-08-08 18:55:02 +04:00
|
|
|
|
|
|
|
typedef struct _qemuDomainNetworkPrivate qemuDomainNetworkPrivate;
|
|
|
|
struct _qemuDomainNetworkPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
2024-01-24 18:43:21 +01:00
|
|
|
/* Don't forget to possibly copy these members in qemuDomainChangeNet(). */
|
|
|
|
|
2023-01-31 10:24:01 +01:00
|
|
|
/* True if the device was created by us. Otherwise we should
|
|
|
|
* avoid removing it. Currently only used for
|
|
|
|
* VIR_DOMAIN_NET_TYPE_DIRECT. */
|
|
|
|
bool created;
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuSlirp *slirp;
|
2022-05-09 09:50:51 +02:00
|
|
|
|
|
|
|
/* file descriptor transfer helpers */
|
2022-05-16 15:08:05 +02:00
|
|
|
qemuFDPassDirect *slirpfd;
|
2022-05-16 15:08:05 +02:00
|
|
|
GSList *tapfds; /* qemuFDPassDirect */
|
2022-05-16 15:08:05 +02:00
|
|
|
GSList *vhostfds; /* qemuFDPassDirect */
|
2022-05-09 09:50:51 +02:00
|
|
|
qemuFDPass *vdpafd;
|
2019-08-08 18:55:02 +04:00
|
|
|
};
|
|
|
|
|
2022-10-24 06:28:45 -04:00
|
|
|
|
|
|
|
#define QEMU_DOMAIN_TPM_PRIVATE(dev) \
|
|
|
|
((qemuDomainTPMPrivate *) (dev)->privateData)
|
|
|
|
|
|
|
|
typedef struct _qemuDomainTPMPrivate qemuDomainTPMPrivate;
|
|
|
|
struct _qemuDomainTPMPrivate {
|
|
|
|
virObject parent;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
bool can_migrate_shared_storage;
|
|
|
|
} swtpm;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-05-09 09:50:51 +02:00
|
|
|
void
|
|
|
|
qemuDomainNetworkPrivateClearFDs(qemuDomainNetworkPrivate *priv);
|
2019-08-08 18:55:02 +04:00
|
|
|
|
2013-06-07 18:23:32 +08:00
|
|
|
typedef enum {
|
|
|
|
QEMU_PROCESS_EVENT_WATCHDOG = 0,
|
2013-06-07 18:23:34 +08:00
|
|
|
QEMU_PROCESS_EVENT_GUESTPANIC,
|
2014-05-26 17:02:05 +02:00
|
|
|
QEMU_PROCESS_EVENT_DEVICE_DELETED,
|
qemu: respond to NETDEV_STREAM_DISCONNECTED event
When a QEMU netdev is of type "stream", if the socket it uses for
connectivity to the host network gets closed, then QEMU will send a
NETDEV_STREAM_DISCONNECTED event. We know that any stream netdev we've
created is backed by a passt process, and if the socket was closed,
that means the passt process has disappeared.
When we receive this event, we can respond by starting a new passt
process with the same options (including socket path) we originally
used. If we have previously created the stream netdev device with a
"reconnect" option, then QEMU will automatically reconnect to this new
passt process. (If we hadn't used "reconnect", then QEMU will never
try to reconnect to the new passt process, so there's no point in
starting it.)
Note that NETDEV_STREAM_DISCONNECTED is an event sent for the netdev
(ie "host side") of the network device, and so it sends the
"netdev-id" to specify which device was disconnected. But libvirt's
virDomainNetDef (the object used to keep track of network devices) is
the internal representation of both the host-side "netdev", and the
guest side device, and virDomainNetDef doesn't directly keep track of
the netdev-id, only of the device's "alias" (which is the "id"
parameter of the *guest* side of the device). Fortunately, by convention
libvirt always names the host-side of devices as "host" + alias, so in
order to search for the affected NetDef, all we need to do is trim the
1st 4 characters from the netdev-id and look for the NetDef having
that resulting trimmed string as its alias. (Contrast this to
NIC_RX_FILTER_CHANGED, which is an event received for the guest side
of the device, and so directly contains the device alias.)
Resolves: https://bugzilla.redhat.com/2172098
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-02-21 01:16:04 -05:00
|
|
|
QEMU_PROCESS_EVENT_NETDEV_STREAM_DISCONNECTED,
|
2014-09-17 13:07:50 -04:00
|
|
|
QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED,
|
2014-11-13 14:09:39 +01:00
|
|
|
QEMU_PROCESS_EVENT_SERIAL_CHANGED,
|
2018-12-05 10:40:45 +01:00
|
|
|
QEMU_PROCESS_EVENT_JOB_STATUS_CHANGE,
|
2016-02-11 15:32:48 +01:00
|
|
|
QEMU_PROCESS_EVENT_MONITOR_EOF,
|
2018-06-27 12:17:59 +02:00
|
|
|
QEMU_PROCESS_EVENT_PR_DISCONNECT,
|
2018-12-24 12:15:12 +02:00
|
|
|
QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED,
|
qemu: support Panic Crashloaded event handling
Pvpanic device supports bit 1 as crashloaded event, it means that
guest actually panicked and run kexec to handle error by guest side.
Handle crashloaded as a lifecyle event in libvirt.
Test case:
Guest side:
before testing, we need make sure kdump is enabled,
1, build new pvpanic driver (with commit from upstream
e0b9a42735f2672ca2764cfbea6e55a81098d5ba
191941692a3d1b6a9614502b279be062926b70f5)
2, insmod new kmod
3, enable crash_kexec_post_notifiers,
# echo 1 > /sys/module/kernel/parameters/crash_kexec_post_notifiers
4, trigger kernel panic
# echo 1 > /proc/sys/kernel/sysrq
# echo c > /proc/sysrq-trigger
Host side:
1, build new qemu with pvpanic patches (with commit from upstream
600d7b47e8f5085919fd1d1157f25950ea8dbc11
7dc58deea79a343ac3adc5cadb97215086054c86)
2, build libvirt with this patch
3, handle lifecycle event and trigger guest side panic
# virsh event stretch --event lifecycle
event 'lifecycle' for domain stretch: Crashed Crashloaded
events received: 1
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
2020-02-04 15:41:00 +08:00
|
|
|
QEMU_PROCESS_EVENT_GUEST_CRASHLOADED,
|
2021-01-21 14:16:44 +01:00
|
|
|
QEMU_PROCESS_EVENT_MEMORY_DEVICE_SIZE_CHANGE,
|
2022-05-10 15:20:25 +02:00
|
|
|
QEMU_PROCESS_EVENT_UNATTENDED_MIGRATION,
|
2022-12-06 14:58:19 +01:00
|
|
|
QEMU_PROCESS_EVENT_RESET,
|
2022-10-05 12:03:33 -05:00
|
|
|
QEMU_PROCESS_EVENT_NBDKIT_EXITED,
|
2024-07-19 17:44:18 +02:00
|
|
|
QEMU_PROCESS_EVENT_SHUTDOWN_COMPLETED,
|
2013-06-07 18:23:32 +08:00
|
|
|
|
|
|
|
QEMU_PROCESS_EVENT_LAST
|
|
|
|
} qemuProcessEventType;
|
|
|
|
|
|
|
|
struct qemuProcessEvent {
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainObj *vm;
|
2013-06-07 18:23:32 +08:00
|
|
|
qemuProcessEventType eventType;
|
2011-02-14 16:09:39 +00:00
|
|
|
int action;
|
2015-03-13 17:00:03 +01:00
|
|
|
int status;
|
2014-05-26 17:02:05 +02:00
|
|
|
void *data;
|
2011-02-14 16:09:39 +00:00
|
|
|
};
|
|
|
|
|
2018-02-02 13:13:46 +01:00
|
|
|
void qemuProcessEventFree(struct qemuProcessEvent *event);
|
|
|
|
|
2017-06-02 22:50:18 +02:00
|
|
|
typedef struct _qemuDomainSaveCookie qemuDomainSaveCookie;
|
|
|
|
struct _qemuDomainSaveCookie {
|
|
|
|
virObject parent;
|
2017-06-02 22:52:03 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virCPUDef *cpu;
|
2019-08-08 18:55:07 +04:00
|
|
|
bool slirpHelper;
|
2017-06-02 22:50:18 +02:00
|
|
|
};
|
|
|
|
|
2020-01-13 11:06:39 +01:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuDomainSaveCookie, virObjectUnref);
|
2019-06-17 15:07:00 +02:00
|
|
|
|
2021-06-21 14:43:01 +02:00
|
|
|
typedef struct _qemuDomainXmlNsEnvTuple qemuDomainXmlNsEnvTuple;
|
|
|
|
struct _qemuDomainXmlNsEnvTuple {
|
|
|
|
char *name;
|
|
|
|
char *value;
|
|
|
|
};
|
|
|
|
|
2022-03-16 11:27:48 +01:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_NONE,
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_STRING,
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_SIGNED,
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_UNSIGNED,
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_BOOL,
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_REMOVE,
|
|
|
|
|
|
|
|
QEMU_DOMAIN_XML_NS_OVERRIDE_LAST
|
|
|
|
} qemuDomainXmlNsOverrideType;
|
|
|
|
VIR_ENUM_DECL(qemuDomainXmlNsOverride);
|
|
|
|
|
|
|
|
typedef struct _qemuDomainXmlNsOverrideProperty qemuDomainXmlNsOverrideProperty;
|
|
|
|
struct _qemuDomainXmlNsOverrideProperty {
|
|
|
|
char *name;
|
|
|
|
qemuDomainXmlNsOverrideType type;
|
|
|
|
char *value;
|
|
|
|
virJSONValue *json;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _qemuDomainXmlNsDeviceOverride qemuDomainXmlNsDeviceOverride;
|
|
|
|
struct _qemuDomainXmlNsDeviceOverride {
|
|
|
|
char *alias;
|
|
|
|
|
|
|
|
size_t nfrontend;
|
|
|
|
qemuDomainXmlNsOverrideProperty *frontend;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-06-17 15:07:00 +02:00
|
|
|
typedef struct _qemuDomainXmlNsDef qemuDomainXmlNsDef;
|
|
|
|
struct _qemuDomainXmlNsDef {
|
|
|
|
char **args;
|
|
|
|
|
|
|
|
unsigned int num_env;
|
2021-06-21 14:43:01 +02:00
|
|
|
qemuDomainXmlNsEnvTuple *env;
|
2019-06-17 17:17:56 +02:00
|
|
|
|
|
|
|
char **capsadd;
|
|
|
|
|
|
|
|
char **capsdel;
|
2021-03-15 15:06:29 +01:00
|
|
|
|
2021-04-15 10:12:12 +02:00
|
|
|
/* We deliberately keep this as a string so that it's parsed only when
|
2021-03-15 15:06:29 +01:00
|
|
|
* starting the VM to avoid any form of errors in the parser or when
|
|
|
|
* changing qemu versions. The knob is mainly for development/CI purposes */
|
|
|
|
char *deprecationBehavior;
|
2022-03-16 11:27:48 +01:00
|
|
|
|
|
|
|
size_t ndeviceOverride;
|
|
|
|
qemuDomainXmlNsDeviceOverride *deviceOverride;
|
2019-06-17 15:07:00 +02:00
|
|
|
};
|
|
|
|
|
2021-02-08 16:08:27 +01:00
|
|
|
|
|
|
|
typedef struct _qemuDomainJobPrivateMigrateTempBitmap qemuDomainJobPrivateMigrateTempBitmap;
|
|
|
|
struct _qemuDomainJobPrivateMigrateTempBitmap {
|
|
|
|
char *nodename;
|
|
|
|
char *bitmapname;
|
|
|
|
};
|
|
|
|
|
|
|
|
void
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainJobPrivateMigrateTempBitmapFree(qemuDomainJobPrivateMigrateTempBitmap *bmp);
|
2021-02-08 16:08:27 +01:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuDomainJobPrivateMigrateTempBitmap, qemuDomainJobPrivateMigrateTempBitmapFree);
|
|
|
|
|
|
|
|
|
2020-07-16 17:18:34 +05:30
|
|
|
typedef struct _qemuDomainJobPrivate qemuDomainJobPrivate;
|
|
|
|
struct _qemuDomainJobPrivate {
|
|
|
|
bool spiceMigration; /* we asked for spice migration and we
|
|
|
|
* should wait for it to finish */
|
|
|
|
bool spiceMigrated; /* spice migration completed */
|
|
|
|
bool dumpCompleted; /* dump completed */
|
2023-01-06 18:08:45 +01:00
|
|
|
bool snapshotDelete; /* indicate that snapshot job is
|
|
|
|
* deleting snapshot */
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuMigrationParams *migParams;
|
2021-02-08 16:08:27 +01:00
|
|
|
GSList *migTempBitmaps; /* temporary block dirty bitmaps - qemuDomainJobPrivateMigrateTempBitmap */
|
2020-07-16 17:18:34 +05:30
|
|
|
};
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainObjStartWorker(virDomainObj *dom);
|
|
|
|
void qemuDomainObjStopWorker(virDomainObj *dom);
|
2020-02-12 12:26:11 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainObj *qemuDomainObjFromDomain(virDomainPtr domain);
|
2019-06-17 15:07:00 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSaveCookie *qemuDomainSaveCookieNew(virDomainObj *vm);
|
2017-06-02 22:50:18 +02:00
|
|
|
|
2011-07-08 15:58:28 -06:00
|
|
|
void qemuDomainEventFlush(int timer, void *opaque);
|
2011-02-14 16:09:39 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuMonitor *qemuDomainGetMonitor(virDomainObj *vm)
|
2015-03-31 17:24:50 +02:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2022-08-10 14:57:02 +02:00
|
|
|
void qemuDomainObjEnterMonitor(virDomainObj *obj)
|
2023-03-22 11:07:50 +01:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2022-03-18 11:17:28 +01:00
|
|
|
void qemuDomainObjExitMonitor(virDomainObj *obj)
|
2023-03-22 11:07:50 +01:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainObjEnterMonitorAsync(virDomainObj *obj,
|
2022-03-24 16:32:42 +01:00
|
|
|
virDomainAsyncJob asyncJob)
|
2019-10-14 14:25:14 +02:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2011-10-05 18:31:54 +01:00
|
|
|
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuAgent *qemuDomainObjEnterAgent(virDomainObj *obj)
|
2013-02-06 18:17:20 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjExitAgent(virDomainObj *obj, qemuAgent *agent)
|
2016-11-14 17:24:23 +03:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
2011-10-05 18:31:54 +01:00
|
|
|
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjEnterRemote(virDomainObj *obj)
|
2013-02-06 18:17:20 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainObjExitRemote(virDomainObj *obj,
|
2018-06-28 11:38:52 +02:00
|
|
|
bool checkActive)
|
2019-10-14 14:25:14 +02:00
|
|
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|
2010-12-16 16:12:02 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainDef *qemuDomainDefCopy(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virDomainDef *src,
|
2013-06-11 15:03:17 +02:00
|
|
|
unsigned int flags);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainDefFormatBuf(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virDomainDef *vm,
|
2012-05-04 21:00:13 +02:00
|
|
|
unsigned int flags,
|
|
|
|
virBuffer *buf);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char *qemuDomainDefFormatXML(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virDomainDef *vm,
|
2012-10-08 11:58:05 +02:00
|
|
|
unsigned int flags);
|
2011-05-27 11:30:26 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char *qemuDomainFormatXML(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
2012-10-08 11:58:05 +02:00
|
|
|
unsigned int flags);
|
2011-01-31 10:47:03 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char *qemuDomainDefFormatLive(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virDomainDef *def,
|
|
|
|
virCPUDef *origCPU,
|
2012-05-04 21:23:17 +02:00
|
|
|
bool inactive,
|
|
|
|
bool compatible);
|
2012-03-09 16:42:46 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjTaint(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj,
|
2014-05-31 21:22:30 -03:00
|
|
|
virDomainTaintFlags taint,
|
2023-01-12 09:51:43 -06:00
|
|
|
qemuLogContext *logCtxt);
|
2011-05-04 11:59:20 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char **qemuDomainObjGetTainting(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj);
|
2021-01-22 15:06:35 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjCheckTaint(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj,
|
2023-01-12 09:51:43 -06:00
|
|
|
qemuLogContext *logCtxt,
|
2020-10-04 13:51:27 -04:00
|
|
|
bool incomingMigration);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjCheckDiskTaint(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj,
|
|
|
|
virDomainDiskDef *disk,
|
2023-01-12 09:51:43 -06:00
|
|
|
qemuLogContext *logCtxt);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjCheckHostdevTaint(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj,
|
|
|
|
virDomainHostdevDef *disk,
|
2023-01-12 09:51:43 -06:00
|
|
|
qemuLogContext *logCtxt);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjCheckNetTaint(virQEMUDriver *driver,
|
|
|
|
virDomainObj *obj,
|
|
|
|
virDomainNetDef *net,
|
2023-01-12 09:51:43 -06:00
|
|
|
qemuLogContext *logCtxt);
|
2016-02-23 13:05:09 +00:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainLogAppendMessage(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
2016-06-07 16:19:03 +02:00
|
|
|
const char *fmt,
|
2019-10-15 13:35:07 +02:00
|
|
|
...) G_GNUC_PRINTF(3, 4);
|
2016-06-07 16:19:03 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
const char *qemuFindQemuImgBinary(virQEMUDriver *driver);
|
2011-09-21 13:08:51 -06:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainSnapshotWriteMetadata(virDomainObj *vm,
|
|
|
|
virDomainMomentObj *snapshot,
|
|
|
|
virDomainXMLOption *xmlopt,
|
2019-03-04 20:25:33 -06:00
|
|
|
const char *snapshotDir);
|
2011-09-21 13:08:51 -06:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainSnapshotForEachQcow2(virQEMUDriver *driver,
|
|
|
|
virDomainDef *def,
|
|
|
|
virDomainMomentObj *snap,
|
2011-09-21 13:08:51 -06:00
|
|
|
const char *op,
|
|
|
|
bool try_all);
|
|
|
|
|
2019-03-27 02:12:37 -05:00
|
|
|
typedef struct _virQEMUMomentRemove virQEMUMomentRemove;
|
|
|
|
struct _virQEMUMomentRemove {
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUDriver *driver;
|
|
|
|
virDomainObj *vm;
|
2011-09-21 13:08:51 -06:00
|
|
|
int err;
|
|
|
|
bool metadata_only;
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainMomentObj *current;
|
2019-03-27 02:12:37 -05:00
|
|
|
bool found;
|
2021-03-11 08:16:13 +01:00
|
|
|
int (*momentDiscard)(virQEMUDriver *, virDomainObj *,
|
|
|
|
virDomainMomentObj *, bool, bool);
|
2011-09-21 13:08:51 -06:00
|
|
|
};
|
|
|
|
|
2019-03-27 02:12:37 -05:00
|
|
|
int qemuDomainMomentDiscardAll(void *payload,
|
2020-10-21 13:31:16 +02:00
|
|
|
const char *name,
|
2019-03-27 02:12:37 -05:00
|
|
|
void *data);
|
2011-09-21 13:08:51 -06:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainRemoveInactive(virQEMUDriver *driver,
|
2022-10-04 09:38:13 -04:00
|
|
|
virDomainObj *vm,
|
2022-10-24 06:28:48 -04:00
|
|
|
virDomainUndefineFlagsValues flags,
|
|
|
|
bool outgoingMigration);
|
2011-09-21 13:08:51 -06:00
|
|
|
|
2022-04-12 15:34:09 +03:00
|
|
|
void
|
|
|
|
qemuDomainRemoveInactiveLocked(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
|
|
|
|
2021-12-14 16:36:15 +01:00
|
|
|
void qemuDomainSetFakeReboot(virDomainObj *vm,
|
2011-09-28 12:10:13 +02:00
|
|
|
bool value);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainCheckDiskStartupPolicy(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
2017-10-03 12:51:47 +02:00
|
|
|
size_t diskIndex,
|
|
|
|
bool cold_boot);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainCheckDiskPresence(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
2016-08-01 17:51:28 +02:00
|
|
|
unsigned int flags);
|
2013-07-29 20:51:15 +08:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainStorageSourceValidateDepth(virStorageSource *src,
|
2019-09-04 16:58:08 +02:00
|
|
|
int add,
|
|
|
|
const char *diskdst);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainDetermineDiskChain(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virDomainDiskDef *disk,
|
2022-07-22 11:47:36 +02:00
|
|
|
virStorageSource *disksrc);
|
2012-03-16 07:52:26 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainDiskChangeSupported(virDomainDiskDef *disk,
|
|
|
|
virDomainDiskDef *orig_disk);
|
2015-09-15 15:25:18 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainGetImageIds(virQEMUDriverConfig *cfg,
|
2023-08-11 14:49:21 +02:00
|
|
|
virDomainDef *def,
|
2021-03-11 08:16:13 +01:00
|
|
|
virStorageSource *src,
|
|
|
|
virStorageSource *parentSrc,
|
2019-12-03 15:17:23 +01:00
|
|
|
uid_t *uid,
|
|
|
|
gid_t *gid);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainStorageFileInit(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *src,
|
|
|
|
virStorageSource *parent);
|
2014-12-12 09:53:33 -07:00
|
|
|
char *qemuDomainStorageAlias(const char *device, int depth);
|
2014-06-30 15:48:45 +02:00
|
|
|
|
2020-01-17 14:28:14 +01:00
|
|
|
const char *
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainDiskGetTopNodename(virDomainDiskDef *disk)
|
2020-01-17 14:28:14 +01:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainDiskGetBackendAlias(virDomainDiskDef *disk,
|
2018-06-26 06:58:47 +02:00
|
|
|
char **backendAlias)
|
2022-07-21 17:04:37 +02:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2018-06-26 06:58:47 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainStorageSourceChainAccessAllow(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *src);
|
|
|
|
int qemuDomainStorageSourceChainAccessRevoke(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *src);
|
|
|
|
|
|
|
|
void qemuDomainStorageSourceAccessRevoke(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *elem);
|
|
|
|
int qemuDomainStorageSourceAccessAllow(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *elem,
|
2019-04-18 09:41:38 +02:00
|
|
|
bool readonly,
|
2020-02-27 11:20:51 +01:00
|
|
|
bool newSource,
|
|
|
|
bool chainTop);
|
2016-02-29 15:39:57 +01:00
|
|
|
|
2022-06-01 14:10:38 +02:00
|
|
|
int qemuDomainPrepareStorageSourceBlockdevNodename(virDomainDiskDef *disk,
|
|
|
|
virStorageSource *src,
|
|
|
|
const char *nodenameprefix,
|
|
|
|
qemuDomainObjPrivate *priv,
|
|
|
|
virQEMUDriverConfig *cfg);
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainPrepareStorageSourceBlockdev(virDomainDiskDef *disk,
|
|
|
|
virStorageSource *src,
|
|
|
|
qemuDomainObjPrivate *priv,
|
|
|
|
virQEMUDriverConfig *cfg);
|
2018-10-09 11:06:39 +02:00
|
|
|
|
2022-05-10 15:20:25 +02:00
|
|
|
void qemuDomainCleanupAdd(virDomainObj *vm,
|
|
|
|
qemuDomainCleanupCallback cb);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainCleanupRemove(virDomainObj *vm,
|
2012-03-16 07:52:26 +01:00
|
|
|
qemuDomainCleanupCallback cb);
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainCleanupRun(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2012-03-16 07:52:26 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv);
|
2017-08-23 14:19:36 +02:00
|
|
|
|
2013-03-05 16:17:24 +01:00
|
|
|
extern virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks;
|
2019-08-20 23:39:24 +02:00
|
|
|
extern virXMLNamespace virQEMUDriverDomainXMLNamespace;
|
2013-02-19 17:33:52 +01:00
|
|
|
extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig;
|
2017-05-19 16:46:27 +02:00
|
|
|
extern virDomainABIStability virQEMUDriverDomainABIStability;
|
2017-06-02 22:50:18 +02:00
|
|
|
extern virSaveCookieCallbacks virQEMUDriverDomainSaveCookie;
|
2022-09-05 15:57:04 +02:00
|
|
|
extern virDomainJobObjConfig virQEMUDriverDomainJobConfig;
|
2013-03-05 16:17:24 +01:00
|
|
|
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainUpdateDeviceList(virDomainObj *vm, int asyncJob);
|
2013-07-19 15:08:29 +02:00
|
|
|
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainUpdateMemoryDeviceInfo(virDomainObj *vm,
|
2015-01-19 13:21:09 +01:00
|
|
|
int asyncJob);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainDefCheckABIStability(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
|
|
|
virDomainDef *src,
|
|
|
|
virDomainDef *dst);
|
2014-02-27 11:45:13 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainCheckABIStability(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virDomainDef *dst);
|
2017-06-14 13:43:37 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainAgentAvailable(virDomainObj *vm,
|
2014-02-27 11:45:13 +01:00
|
|
|
bool reportError);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainDiskBlockJobIsActive(virDomainDiskDef *disk);
|
|
|
|
bool qemuDomainHasBlockjob(virDomainObj *vm, bool copy_only)
|
2015-05-13 09:47:21 +02:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
2015-03-13 17:22:04 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainAlignMemorySizes(virDomainDef *def);
|
|
|
|
int qemuDomainMemoryDeviceAlignSize(virDomainDef *def,
|
|
|
|
virDomainMemoryDef *mem);
|
2015-02-18 14:31:47 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainChrDef *qemuFindAgentConfig(virDomainDef *def);
|
2015-04-24 16:43:38 +02:00
|
|
|
|
2018-11-28 17:34:07 +01:00
|
|
|
/* You should normally avoid these functions and use the variant that
|
|
|
|
* doesn't have "Machine" in the name instead. */
|
2024-08-28 14:40:51 +02:00
|
|
|
bool qemuDomainMachineIsQ35(const char *machine,
|
|
|
|
const virArch arch);
|
|
|
|
bool qemuDomainMachineIsI440FX(const char *machine,
|
|
|
|
const virArch arch);
|
2018-08-22 11:15:20 +02:00
|
|
|
bool qemuDomainMachineIsARMVirt(const char *machine,
|
|
|
|
const virArch arch);
|
2017-04-18 12:43:58 +02:00
|
|
|
bool qemuDomainMachineIsPSeries(const char *machine,
|
|
|
|
const virArch arch);
|
2024-08-28 14:40:51 +02:00
|
|
|
bool qemuDomainMachineIsXenFV(const char *machine,
|
|
|
|
const virArch arch);
|
2018-11-28 16:48:41 +01:00
|
|
|
bool qemuDomainMachineHasBuiltinIDE(const char *machine,
|
|
|
|
const virArch arch);
|
2018-11-28 16:15:31 +01:00
|
|
|
|
|
|
|
bool qemuDomainIsQ35(const virDomainDef *def);
|
|
|
|
bool qemuDomainIsI440FX(const virDomainDef *def);
|
|
|
|
bool qemuDomainIsS390CCW(const virDomainDef *def);
|
|
|
|
bool qemuDomainIsARMVirt(const virDomainDef *def);
|
2024-03-21 11:30:27 +08:00
|
|
|
bool qemuDomainIsLoongArchVirt(const virDomainDef *def);
|
2018-11-28 16:15:31 +01:00
|
|
|
bool qemuDomainIsRISCVVirt(const virDomainDef *def);
|
|
|
|
bool qemuDomainIsPSeries(const virDomainDef *def);
|
2022-02-01 15:33:54 +01:00
|
|
|
bool qemuDomainIsMipsMalta(const virDomainDef *def);
|
2024-08-19 01:17:11 +00:00
|
|
|
bool qemuDomainIsXenFV(const virDomainDef *def);
|
2018-11-28 16:15:31 +01:00
|
|
|
bool qemuDomainHasPCIRoot(const virDomainDef *def);
|
|
|
|
bool qemuDomainHasPCIeRoot(const virDomainDef *def);
|
|
|
|
bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
|
2020-11-18 16:11:05 +00:00
|
|
|
bool qemuDomainHasBuiltinESP(const virDomainDef *def);
|
2018-11-28 16:15:31 +01:00
|
|
|
bool qemuDomainNeedsFDC(const virDomainDef *def);
|
2024-01-16 16:42:18 +01:00
|
|
|
bool qemuDomainSupportsPCI(const virDomainDef *def);
|
2024-01-17 09:39:48 +01:00
|
|
|
bool qemuDomainSupportsPCIMultibus(const virDomainDef *def);
|
2024-01-19 15:54:06 +01:00
|
|
|
int qemuDomainGetSCSIControllerModel(const virDomainDef *def,
|
|
|
|
const virDomainControllerDef *cont,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2015-04-28 11:21:52 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainUpdateCurrentMemorySize(virDomainObj *vm);
|
2015-05-27 15:51:52 +02:00
|
|
|
|
2023-05-09 16:16:09 +02:00
|
|
|
unsigned long long qemuDomainGetMemLockLimitBytes(virDomainDef *def);
|
2023-05-10 08:55:10 +02:00
|
|
|
int qemuDomainAdjustMaxMemLock(virDomainObj *vm);
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainAdjustMaxMemLockHostdev(virDomainObj *vm,
|
|
|
|
virDomainHostdevDef *hostdev);
|
2023-05-09 13:19:12 +03:00
|
|
|
int qemuDomainAdjustMaxMemLockNVMe(virDomainObj *vm,
|
|
|
|
virStorageSource *src);
|
2022-06-22 15:21:30 +02:00
|
|
|
int qemuDomainSetMaxMemLock(virDomainObj *vm,
|
|
|
|
unsigned long long limit,
|
|
|
|
unsigned long long *origPtr);
|
2015-11-06 15:51:33 +01:00
|
|
|
|
2015-10-08 06:06:15 +02:00
|
|
|
int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
|
|
|
const virDomainMemoryDef *mem);
|
|
|
|
|
2023-07-20 17:55:33 +02:00
|
|
|
bool qemuDomainSupportsVcpuHotplug(virDomainObj *vm);
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainHasVcpuPids(virDomainObj *vm);
|
|
|
|
pid_t qemuDomainGetVcpuPid(virDomainObj *vm, unsigned int vcpuid);
|
|
|
|
int qemuDomainValidateVcpuInfo(virDomainObj *vm);
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainRefreshVcpuInfo(virDomainObj *vm,
|
2016-08-05 14:48:27 +02:00
|
|
|
int asyncJob,
|
|
|
|
bool state);
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainGetVcpuHalted(virDomainObj *vm, unsigned int vcpu);
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainRefreshVcpuHalted(virDomainObj *vm,
|
2016-10-13 13:42:45 +02:00
|
|
|
int asyncJob);
|
2015-11-11 14:20:04 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainSupportsNicdev(virDomainDef *def,
|
|
|
|
virDomainNetDef *net);
|
2016-02-15 11:44:21 -05:00
|
|
|
|
2022-12-15 14:19:16 -05:00
|
|
|
bool qemuDomainNetSupportsMTU(virDomainNetType type,
|
|
|
|
virDomainNetBackendType backend);
|
2017-01-23 14:32:13 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainSetPrivatePaths(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2016-04-03 21:59:46 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainDiskDef *qemuDomainDiskByName(virDomainDef *def, const char *name);
|
2016-02-26 16:29:58 +01:00
|
|
|
|
2016-03-29 18:22:46 -04:00
|
|
|
char *qemuDomainGetMasterKeyFilePath(const char *libDir);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainMasterKeyReadFile(qemuDomainObjPrivate *priv);
|
2016-03-29 18:22:46 -04:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainWriteMasterKeyFile(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2016-05-02 13:11:24 -04:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainMasterKeyCreate(virDomainObj *vm);
|
2016-03-29 18:22:46 -04:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainMasterKeyRemove(qemuDomainObjPrivate *priv);
|
2016-03-29 18:22:46 -04:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSecretInfoFree(qemuDomainSecretInfo *secinfo)
|
2017-03-03 07:22:16 -05:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2020-03-16 09:47:17 +01:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuDomainSecretInfo, qemuDomainSecretInfoFree);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSecretInfoDestroy(qemuDomainSecretInfo *secinfo);
|
2018-05-28 15:17:01 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSecretDiskDestroy(virDomainDiskDef *disk)
|
2016-04-06 15:00:59 -04:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSecretInfo *
|
|
|
|
qemuDomainSecretInfoTLSNew(qemuDomainObjPrivate *priv,
|
2017-03-03 07:22:16 -05:00
|
|
|
const char *srcAlias,
|
|
|
|
const char *secretUUID);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSecretHostdevDestroy(virDomainHostdevDef *disk)
|
2016-04-06 10:41:33 -04:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainSecretChardevDestroy(virDomainChrSourceDef *dev)
|
2016-10-21 19:02:35 -04:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainSecretChardevPrepare(virQEMUDriverConfig *cfg,
|
|
|
|
qemuDomainObjPrivate *priv,
|
2016-10-21 19:02:35 -04:00
|
|
|
const char *chrAlias,
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainChrSourceDef *dev)
|
2016-10-21 19:02:35 -04:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
2018-02-09 16:14:41 +00:00
|
|
|
ATTRIBUTE_NONNULL(4);
|
2016-10-21 19:02:35 -04:00
|
|
|
|
2022-05-04 15:00:18 +02:00
|
|
|
void qemuDomainCleanupStorageSourceFD(virStorageSource *src);
|
|
|
|
|
2023-01-05 15:07:38 +01:00
|
|
|
void qemuDomainStartupCleanup(virDomainObj *vm);
|
2016-04-06 15:00:59 -04:00
|
|
|
|
2024-09-18 09:29:43 +02:00
|
|
|
|
|
|
|
int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv,
|
2024-09-18 09:25:52 +02:00
|
|
|
const char *alias,
|
|
|
|
char **memPath);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainSecretPrepare(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm)
|
2018-02-09 16:14:41 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
2016-04-06 15:00:59 -04:00
|
|
|
|
2018-04-19 13:44:04 +02:00
|
|
|
int qemuDomainDeviceDefValidateDisk(const virDomainDiskDef *disk,
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUCaps *qemuCaps);
|
2018-04-19 13:44:04 +02:00
|
|
|
|
2021-10-24 04:51:26 -05:00
|
|
|
int qemuDomainDeviceDiskDefPostParse(virDomainDiskDef *disk,
|
|
|
|
unsigned int parseFlags);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainPrepareChannel(virDomainChrDef *chr,
|
2016-03-30 16:34:17 +02:00
|
|
|
const char *domainChannelTargetDir)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
|
|
|
|
2021-11-18 15:16:20 +01:00
|
|
|
struct qemuDomainPrepareChardevSourceData {
|
|
|
|
virQEMUDriverConfig *cfg;
|
2021-11-03 14:12:16 +01:00
|
|
|
bool hotplug;
|
2021-11-18 15:16:20 +01:00
|
|
|
};
|
2016-10-24 14:05:54 +02:00
|
|
|
|
2021-11-18 15:16:20 +01:00
|
|
|
int
|
|
|
|
qemuDomainPrepareChardevSourceOne(virDomainDeviceDef *dev,
|
|
|
|
virDomainChrSourceDef *charsrc,
|
|
|
|
void *opaque);
|
2016-10-24 14:05:54 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainPrepareShmemChardev(virDomainShmemDef *shmem)
|
2016-09-13 13:40:50 +02:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainVcpuHotplugIsInOrder(virDomainDef *def)
|
2016-08-04 13:57:46 +02:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
void qemuDomainVcpuPersistOrder(virDomainDef *def)
|
2016-08-04 14:23:25 +02:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2022-08-10 14:57:02 +02:00
|
|
|
int qemuDomainCheckMonitor(virDomainObj *vm,
|
2022-03-24 16:32:42 +01:00
|
|
|
virDomainAsyncJob asyncJob);
|
2016-09-12 10:24:21 +02:00
|
|
|
|
2021-06-11 13:24:14 +02:00
|
|
|
bool qemuDomainSupportsVideoVga(const virDomainVideoDef *video,
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUCaps *qemuCaps);
|
2016-09-30 14:41:37 +02:00
|
|
|
|
2019-09-16 17:14:48 +02:00
|
|
|
bool qemuDomainNeedsVFIO(const virDomainDef *def);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
int qemuDomainGetHostdevPath(virDomainHostdevDef *dev,
|
2019-09-17 11:47:59 +02:00
|
|
|
char **path,
|
|
|
|
int *perms);
|
2017-02-09 11:01:29 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virDomainDiskDef *qemuDomainDiskLookupByNodename(virDomainDef *def,
|
|
|
|
virDomainBackupDef *backupdef,
|
2017-02-22 17:51:05 +01:00
|
|
|
const char *nodename,
|
2021-03-11 08:16:13 +01:00
|
|
|
virStorageSource **src);
|
2017-02-22 17:51:05 +01:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char *qemuDomainDiskBackingStoreGetName(virDomainDiskDef *disk,
|
2017-02-23 18:13:02 +01:00
|
|
|
unsigned int idx);
|
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
virStorageSource *qemuDomainGetStorageSourceByDevstr(const char *devstr,
|
|
|
|
virDomainDef *def,
|
|
|
|
virDomainBackupDef *backupdef);
|
2017-02-23 19:14:47 +01:00
|
|
|
|
2024-04-17 14:24:38 +02:00
|
|
|
void
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainUpdateCPU(virDomainObj *vm,
|
|
|
|
virCPUDef *cpu,
|
|
|
|
virCPUDef **origCPU);
|
2017-05-31 12:34:10 +02:00
|
|
|
|
2024-04-17 14:28:24 +02:00
|
|
|
void
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainFixupCPUs(virDomainObj *vm,
|
|
|
|
virCPUDef **origCPU);
|
2017-10-06 14:49:07 +02:00
|
|
|
|
2017-07-21 15:51:03 +02:00
|
|
|
char *
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainGetMachineName(virDomainObj *vm);
|
2017-07-21 15:51:03 +02:00
|
|
|
|
2017-10-13 12:06:54 +02:00
|
|
|
void
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf,
|
2017-10-13 12:06:54 +02:00
|
|
|
virTristateBool allowReboot);
|
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt,
|
|
|
|
virTristateBool *allowReboot);
|
|
|
|
|
2019-10-08 15:14:22 +02:00
|
|
|
void
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk,
|
|
|
|
virStorageSource *src);
|
2017-10-17 21:39:41 +02:00
|
|
|
|
2018-05-29 17:28:11 +02:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainValidateStorageSource(virStorageSource *src,
|
2022-07-21 17:12:46 +02:00
|
|
|
virQEMUCaps *qemuCaps);
|
2018-05-29 17:28:11 +02:00
|
|
|
|
|
|
|
|
2017-11-23 17:01:37 +01:00
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainPrepareDiskSource(virDomainDiskDef *disk,
|
|
|
|
qemuDomainObjPrivate *priv,
|
|
|
|
virQEMUDriverConfig *cfg);
|
2017-11-23 17:01:37 +01:00
|
|
|
|
2023-10-18 13:19:08 +02:00
|
|
|
bool
|
|
|
|
qemuDomainDiskCachemodeFlags(virDomainDiskCache cachemode,
|
2018-04-04 08:43:06 +02:00
|
|
|
bool *writeback,
|
|
|
|
bool *direct,
|
|
|
|
bool *noflush);
|
|
|
|
|
2020-09-10 12:32:04 +02:00
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainPrepareHostdev(virDomainHostdevDef *hostdev,
|
|
|
|
qemuDomainObjPrivate *priv);
|
2020-09-10 12:32:04 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
char * qemuDomainGetManagedPRSocketPath(qemuDomainObjPrivate *priv);
|
2018-04-18 16:55:14 +02:00
|
|
|
|
2021-03-11 08:16:13 +01:00
|
|
|
bool qemuDomainDefHasManagedPR(virDomainObj *vm);
|
2019-03-21 13:54:20 +01:00
|
|
|
|
2022-01-24 16:53:27 +01:00
|
|
|
unsigned int qemuDomainFDSetIDNew(qemuDomainObjPrivate *priv);
|
|
|
|
|
2018-09-11 15:13:08 +02:00
|
|
|
virDomainEventResumedDetailType
|
|
|
|
qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason);
|
|
|
|
|
2018-11-09 12:21:50 +03:00
|
|
|
bool
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainDiskIsMissingLocalOptional(virDomainDiskDef *disk);
|
2018-11-09 12:21:50 +03:00
|
|
|
|
2018-10-09 16:45:50 +03:00
|
|
|
virDomainEventSuspendedDetailType
|
|
|
|
qemuDomainPausedReasonToSuspendedEvent(virDomainPausedReason reason);
|
2019-09-12 18:25:21 -04:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainValidateActualNetDef(const virDomainNetDef *net,
|
2021-03-11 08:16:13 +01:00
|
|
|
virQEMUCaps *qemuCaps);
|
2019-09-26 13:54:15 +02:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm)
|
2019-10-14 14:25:14 +02:00
|
|
|
G_GNUC_WARN_UNUSED_RESULT;
|
2019-10-18 14:33:00 +02:00
|
|
|
|
|
|
|
int
|
2024-03-11 15:34:37 +01:00
|
|
|
qemuDomainMakeCPUMigratable(virArch arch,
|
2024-03-11 17:04:48 +01:00
|
|
|
virCPUDef *cpu,
|
|
|
|
virCPUDef *origCPU);
|
2019-11-15 16:25:26 +01:00
|
|
|
|
|
|
|
int
|
2022-06-01 14:50:29 +02:00
|
|
|
qemuDomainInitializePflashStorageSource(virDomainObj *vm,
|
|
|
|
virQEMUDriverConfig *cfg);
|
2020-04-17 11:09:58 +02:00
|
|
|
|
|
|
|
bool
|
2022-07-21 16:58:50 +02:00
|
|
|
qemuDomainDiskBlockJobIsSupported(virDomainDiskDef *disk);
|
2020-06-10 15:35:51 -03:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainDefNumaCPUsRectify(virDomainDef *def,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2020-08-17 10:37:19 +05:30
|
|
|
|
2020-08-24 17:38:05 +02:00
|
|
|
int virQEMUFileOpenAs(uid_t fallback_uid,
|
|
|
|
gid_t fallback_gid,
|
|
|
|
bool dynamicOwnership,
|
|
|
|
const char *path,
|
|
|
|
int oflags,
|
|
|
|
bool *needUnlink);
|
|
|
|
|
2020-07-16 11:17:47 +02:00
|
|
|
int
|
2021-08-06 10:48:50 +02:00
|
|
|
qemuDomainOpenFile(virQEMUDriverConfig *cfg,
|
2021-08-06 10:31:22 +02:00
|
|
|
const virDomainDef *def,
|
2020-07-16 11:17:47 +02:00
|
|
|
const char *path,
|
|
|
|
int oflags,
|
|
|
|
bool *needUnlink);
|
2020-07-16 11:40:34 +02:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainFileWrapperFDClose(virDomainObj *vm,
|
|
|
|
virFileWrapperFd *fd);
|
2020-10-08 16:22:50 +02:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainInterfaceSetDefaultQDisc(virQEMUDriver *driver,
|
|
|
|
virDomainNetDef *net);
|
2020-11-03 10:58:13 +03:00
|
|
|
|
|
|
|
int
|
2021-03-11 08:16:13 +01:00
|
|
|
qemuDomainNamePathsCleanup(virQEMUDriverConfig *cfg,
|
2020-11-03 10:58:13 +03:00
|
|
|
const char *name,
|
|
|
|
bool bestEffort);
|
2021-08-18 10:24:36 +02:00
|
|
|
|
|
|
|
char *
|
|
|
|
qemuDomainGetVHostUserFSSocketPath(qemuDomainObjPrivate *priv,
|
|
|
|
const virDomainFSDef *fs);
|
2021-11-02 14:15:58 +01:00
|
|
|
|
|
|
|
typedef int (*qemuDomainDeviceBackendChardevForeachCallback)(virDomainDeviceDef *dev,
|
|
|
|
virDomainChrSourceDef *charsrc,
|
|
|
|
void *opaque);
|
|
|
|
int
|
|
|
|
qemuDomainDeviceBackendChardevForeachOne(virDomainDeviceDef *dev,
|
|
|
|
qemuDomainDeviceBackendChardevForeachCallback cb,
|
|
|
|
void *opaque);
|
|
|
|
int
|
|
|
|
qemuDomainDeviceBackendChardevForeach(virDomainDef *def,
|
|
|
|
qemuDomainDeviceBackendChardevForeachCallback cb,
|
|
|
|
void *opaque);
|
2022-02-14 15:19:52 +03:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainRemoveLogs(virQEMUDriver *driver,
|
|
|
|
const char *name);
|
2022-08-10 15:35:54 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainObjWait(virDomainObj *vm);
|
2024-06-06 18:17:29 +02:00
|
|
|
bool
|
|
|
|
qemuDomainObjIsActive(virDomainObj *vm);
|
2022-09-07 16:04:20 +05:30
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainRefreshStatsSchema(virDomainObj *dom);
|
2022-09-30 16:01:38 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainSyncRxFilter(virDomainObj *vm,
|
2022-09-30 16:28:24 +02:00
|
|
|
virDomainNetDef *def,
|
|
|
|
virDomainAsyncJob asyncJob);
|
2022-08-10 17:17:42 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainSchedCoreStart(virQEMUDriverConfig *cfg,
|
|
|
|
virDomainObj *vm);
|
|
|
|
|
|
|
|
void
|
|
|
|
qemuDomainSchedCoreStop(qemuDomainObjPrivate *priv);
|
2023-03-07 12:27:05 +01:00
|
|
|
|
|
|
|
virBitmap *
|
|
|
|
qemuDomainEvaluateCPUMask(const virDomainDef *def,
|
|
|
|
virBitmap *cpumask,
|
|
|
|
virBitmap *autoCpuset);
|
qemu: Start emulator thread with more generous cpuset.mems
Consider a domain with two guest NUMA nodes and the following
<numatune/> setting :
<numatune>
<memory mode="strict" nodeset="0"/>
<memnode cellid="0" mode="strict" nodeset="1"/>
</numatune>
What this means is the emulator thread is pinned onto host NUMA
node #0 (by setting corresponding cpuset.mems to "0"), and two
memory-backend-* objects are created:
-object '{"qom-type":"memory-backend-ram","id":"ram-node0", .., "host-nodes":[1],"policy":"bind"}' \
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
-object '{"qom-type":"memory-backend-ram","id":"ram-node1", .., "host-nodes":[0],"policy":"bind"}' \
-numa node,nodeid=1,cpus=2-3,memdev=ram-node1 \
Note, the emulator thread is pinned well before QEMU is even
exec()-ed.
Now, the way memory allocation works in QEMU is: the emulator
thread calls mmap() followed by mbind() (which is sane, that's
how everybody should do it). BUT, because the thread is already
restricted by CGroups to just NUMA node #0, calling:
mbind(host-nodes:[1]); /* made up syntax (TM) */
fails. This is expected though. Kernel was instructed to place
the memory at NUMA node "0" and yet, process is trying to place
it elsewhere.
We used to solve this by not restricting emulator thread at all
initially, and only after it's done initializing (i.e. we got the
QMP greeting) we placed it onto desired nodes. But this had its
own problems (e.g. QEMU might have locked pieces of its memory
which were then unable to migrate onto different NUMA nodes).
Therefore, in v5.1.0-rc1~282 we've changed this and set cgroups
upfront (even before exec()-ing QEMU). And this used to work, but
something has changed (I can't really put my finger on it).
Therefore, for the initialization start the thread with union of
all configured host NUMA nodes ("0-1" in our example) and fix the
placement only after QEMU is started.
NB, the memory hotplug suffers the same problem, but that will
be fixed in the next commit.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2138150
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-05-19 14:02:06 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
qemuDomainNumatuneMaybeFormatNodesetUnion(virDomainObj *vm,
|
|
|
|
virBitmap **nodeset,
|
|
|
|
char **nodesetStr);
|
2023-12-06 15:42:29 +01:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuDomainStorageOpenStat(virQEMUDriverConfig *cfg,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *src,
|
|
|
|
int *ret_fd,
|
|
|
|
struct stat *ret_sb,
|
|
|
|
bool skipInaccessible);
|
|
|
|
void
|
|
|
|
qemuDomainStorageCloseStat(virStorageSource *src,
|
|
|
|
int *fd);
|
|
|
|
int
|
|
|
|
qemuDomainStorageUpdatePhysical(virQEMUDriverConfig *cfg,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virStorageSource *src);
|