2007-02-14 01:40:09 +00:00
|
|
|
/*
|
2009-05-21 14:16:55 +00:00
|
|
|
* qemu_conf.h: QEMU configuration management
|
2007-02-14 01:40:09 +00:00
|
|
|
*
|
2013-02-06 18:17:20 +00:00
|
|
|
* Copyright (C) 2006-2007, 2009-2013 Red Hat, Inc.
|
2007-02-14 01:40:09 +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/>.
|
2007-02-14 01:40:09 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "virebtables.h"
|
|
|
|
#include "internal.h"
|
|
|
|
#include "domain_conf.h"
|
2019-07-22 14:44:12 +00:00
|
|
|
#include "checkpoint_conf.h"
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "snapshot_conf.h"
|
|
|
|
#include "domain_event.h"
|
|
|
|
#include "virthread.h"
|
|
|
|
#include "security/security_manager.h"
|
|
|
|
#include "cpu_conf.h"
|
|
|
|
#include "virportallocator.h"
|
|
|
|
#include "virthreadpool.h"
|
|
|
|
#include "locking/lock_manager.h"
|
|
|
|
#include "qemu_capabilities.h"
|
|
|
|
#include "virclosecallbacks.h"
|
|
|
|
#include "virhostdev.h"
|
|
|
|
#include "virfile.h"
|
|
|
|
#include "virfilecache.h"
|
|
|
|
#include "virfirmware.h"
|
|
|
|
|
|
|
|
#define QEMU_DRIVER_NAME "QEMU"
|
2014-03-01 06:28:56 +00:00
|
|
|
|
2022-04-26 14:57:03 +00:00
|
|
|
typedef enum {
|
|
|
|
QEMU_SCHED_CORE_NONE = 0,
|
|
|
|
QEMU_SCHED_CORE_VCPUS,
|
|
|
|
QEMU_SCHED_CORE_EMULATOR,
|
|
|
|
QEMU_SCHED_CORE_FULL,
|
|
|
|
|
|
|
|
QEMU_SCHED_CORE_LAST
|
|
|
|
} virQEMUSchedCore;
|
|
|
|
|
|
|
|
VIR_ENUM_DECL(virQEMUSchedCore);
|
|
|
|
|
2012-11-28 16:43:10 +00:00
|
|
|
typedef struct _virQEMUDriver virQEMUDriver;
|
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
typedef struct _virQEMUDriverConfig virQEMUDriverConfig;
|
|
|
|
|
|
|
|
/* Main driver config. The data in these object
|
|
|
|
* instances is immutable, so can be accessed
|
|
|
|
* without locking. Threads must, however, hold
|
|
|
|
* a valid reference on the object to prevent it
|
|
|
|
* being released while they use it.
|
|
|
|
*
|
|
|
|
* eg
|
2020-09-04 06:59:08 +00:00
|
|
|
* g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
2013-01-10 21:03:14 +00:00
|
|
|
*
|
|
|
|
* ...do stuff with 'cfg'..
|
|
|
|
*/
|
|
|
|
struct _virQEMUDriverConfig {
|
|
|
|
virObject parent;
|
2010-12-08 06:19:17 +00:00
|
|
|
|
2019-05-17 11:35:57 +00:00
|
|
|
char *uri;
|
2009-06-12 13:20:13 +00:00
|
|
|
|
2009-07-15 21:25:01 +00:00
|
|
|
uid_t user;
|
|
|
|
gid_t group;
|
2016-07-08 10:37:54 +00:00
|
|
|
bool dynamicOwnership;
|
2009-07-15 21:25:01 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virBitmap *namespaces;
|
2018-11-13 11:50:41 +00:00
|
|
|
bool rememberOwner;
|
2016-11-18 15:34:45 +00:00
|
|
|
|
2009-07-22 15:08:04 +00:00
|
|
|
int cgroupControllers;
|
|
|
|
char **cgroupDeviceACL;
|
|
|
|
|
2012-12-11 15:59:21 +00:00
|
|
|
/* These five directories are ones libvirtd uses (so must be root:root
|
2009-08-25 15:49:09 +00:00
|
|
|
* to avoid security risk from QEMU processes */
|
2012-12-11 15:59:21 +00:00
|
|
|
char *configBaseDir;
|
2007-06-26 22:13:21 +00:00
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
2008-07-11 19:34:11 +00:00
|
|
|
char *logDir;
|
2017-04-04 16:22:31 +00:00
|
|
|
char *swtpmLogDir;
|
2008-12-18 15:22:49 +00:00
|
|
|
char *stateDir;
|
2017-04-04 16:22:31 +00:00
|
|
|
char *swtpmStateDir;
|
2019-08-08 14:55:04 +00:00
|
|
|
char *slirpStateDir;
|
2022-12-02 18:38:01 +00:00
|
|
|
char *passtStateDir;
|
2020-02-25 09:55:07 +00:00
|
|
|
char *dbusStateDir;
|
2009-08-25 15:49:09 +00:00
|
|
|
/* These two directories are ones QEMU processes use (so must match
|
|
|
|
* the QEMU user/group */
|
|
|
|
char *libDir;
|
|
|
|
char *cacheDir;
|
2010-04-01 15:57:32 +00:00
|
|
|
char *saveDir;
|
2010-04-02 14:10:37 +00:00
|
|
|
char *snapshotDir;
|
2019-07-22 14:44:12 +00:00
|
|
|
char *checkpointDir;
|
2015-04-23 23:24:50 +00:00
|
|
|
char *channelTargetDir;
|
2015-04-24 00:01:05 +00:00
|
|
|
char *nvramDir;
|
2017-04-04 16:22:31 +00:00
|
|
|
char *swtpmStorageDir;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2016-06-14 18:14:31 +00:00
|
|
|
char *defaultTLSx509certdir;
|
2019-01-14 22:57:12 +00:00
|
|
|
bool defaultTLSx509certdirPresent;
|
2016-06-14 18:14:31 +00:00
|
|
|
bool defaultTLSx509verify;
|
2020-11-13 14:13:29 +00:00
|
|
|
bool defaultTLSx509verifyPresent;
|
2016-09-08 14:04:59 +00:00
|
|
|
char *defaultTLSx509secretUUID;
|
2016-06-14 18:14:31 +00:00
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
bool vncAutoUnixSocket;
|
|
|
|
bool vncTLS;
|
|
|
|
bool vncTLSx509verify;
|
2019-01-14 21:51:00 +00:00
|
|
|
bool vncTLSx509verifyPresent;
|
2013-01-10 21:03:14 +00:00
|
|
|
bool vncSASL;
|
2007-10-12 16:05:44 +00:00
|
|
|
char *vncTLSx509certdir;
|
2019-01-14 23:09:23 +00:00
|
|
|
char *vncTLSx509secretUUID;
|
2008-07-11 19:34:11 +00:00
|
|
|
char *vncListen;
|
2009-01-29 17:50:00 +00:00
|
|
|
char *vncPassword;
|
2009-03-16 13:54:26 +00:00
|
|
|
char *vncSASLdir;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
|
|
|
bool spiceTLS;
|
2010-03-05 20:31:50 +00:00
|
|
|
char *spiceTLSx509certdir;
|
2012-02-24 14:13:06 +00:00
|
|
|
bool spiceSASL;
|
|
|
|
char *spiceSASLdir;
|
2010-03-05 20:31:50 +00:00
|
|
|
char *spiceListen;
|
|
|
|
char *spicePassword;
|
2016-05-18 12:11:20 +00:00
|
|
|
bool spiceAutoUnixSocket;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2016-06-14 19:52:37 +00:00
|
|
|
bool chardevTLS;
|
|
|
|
char *chardevTLSx509certdir;
|
|
|
|
bool chardevTLSx509verify;
|
2019-01-14 21:51:00 +00:00
|
|
|
bool chardevTLSx509verifyPresent;
|
2016-09-08 14:04:59 +00:00
|
|
|
char *chardevTLSx509secretUUID;
|
2016-06-14 19:52:37 +00:00
|
|
|
|
2017-02-24 21:44:32 +00:00
|
|
|
char *migrateTLSx509certdir;
|
|
|
|
bool migrateTLSx509verify;
|
2019-01-14 21:51:00 +00:00
|
|
|
bool migrateTLSx509verifyPresent;
|
2017-02-24 21:44:32 +00:00
|
|
|
char *migrateTLSx509secretUUID;
|
2020-11-24 13:08:04 +00:00
|
|
|
bool migrateTLSForce;
|
2017-02-24 21:44:32 +00:00
|
|
|
|
2020-06-26 14:37:16 +00:00
|
|
|
char *backupTLSx509certdir;
|
|
|
|
bool backupTLSx509verify;
|
|
|
|
bool backupTLSx509verifyPresent;
|
|
|
|
char *backupTLSx509secretUUID;
|
|
|
|
|
2020-06-29 15:05:35 +00:00
|
|
|
bool vxhsTLS;
|
|
|
|
char *vxhsTLSx509certdir;
|
2020-06-29 15:12:03 +00:00
|
|
|
char *vxhsTLSx509secretUUID;
|
2020-06-29 15:05:35 +00:00
|
|
|
|
|
|
|
bool nbdTLS;
|
|
|
|
char *nbdTLSx509certdir;
|
2020-06-29 15:12:03 +00:00
|
|
|
char *nbdTLSx509secretUUID;
|
2020-06-29 15:05:35 +00:00
|
|
|
|
2016-07-08 10:37:54 +00:00
|
|
|
unsigned int remotePortMin;
|
|
|
|
unsigned int remotePortMax;
|
2008-02-27 04:35:08 +00:00
|
|
|
|
2016-07-08 10:37:54 +00:00
|
|
|
unsigned int webSocketPortMin;
|
|
|
|
unsigned int webSocketPortMax;
|
2013-04-30 14:26:43 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virHugeTLBFS *hugetlbfs;
|
2014-07-23 15:37:18 +00:00
|
|
|
size_t nhugetlbfs;
|
|
|
|
|
2013-03-25 14:25:30 +00:00
|
|
|
char *bridgeHelperName;
|
2017-12-15 09:42:40 +00:00
|
|
|
char *prHelperName;
|
2019-08-08 14:55:03 +00:00
|
|
|
char *slirpHelperName;
|
2020-02-25 09:55:06 +00:00
|
|
|
char *dbusDaemonName;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
|
|
|
bool macFilter;
|
2009-11-03 22:41:23 +00:00
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
bool relaxedACS;
|
|
|
|
bool vncAllowHostAudio;
|
2013-08-17 19:30:47 +00:00
|
|
|
bool nogfxAllowHostAudio;
|
2013-01-10 21:03:14 +00:00
|
|
|
bool setProcessName;
|
2010-05-19 20:41:01 +00:00
|
|
|
|
2016-07-08 10:37:54 +00:00
|
|
|
unsigned int maxProcesses;
|
|
|
|
unsigned int maxFiles;
|
2019-05-22 23:12:14 +00:00
|
|
|
unsigned int maxThreadsPerProc;
|
2015-03-18 11:14:55 +00:00
|
|
|
unsigned long long maxCore;
|
2016-08-03 15:20:19 +00:00
|
|
|
bool dumpGuestCore;
|
2011-04-05 12:17:28 +00:00
|
|
|
|
2016-07-08 10:37:54 +00:00
|
|
|
unsigned int maxQueuedJobs;
|
2009-03-03 12:03:44 +00:00
|
|
|
|
2012-08-15 22:10:38 +00:00
|
|
|
char **securityDriverNames;
|
Add two new security label types
Curently security labels can be of type 'dynamic' or 'static'.
If no security label is given, then 'dynamic' is assumed. The
current code takes advantage of this default, and avoids even
saving <seclabel> elements with type='dynamic' to disk. This
means if you temporarily change security driver, the guests
can all still start.
With the introduction of sVirt to LXC though, there needs to be
a new default of 'none' to allow unconfined LXC containers.
This patch introduces two new security label types
- default: the host configuration decides whether to run the
guest with type 'none' or 'dynamic' at guest start
- none: the guest will run unconfined by security policy
The 'none' label type will obviously be undesirable for some
deployments, so a new qemu.conf option allows a host admin to
mandate confined guests. It is also possible to turn off default
confinement
security_default_confined = 1|0 (default == 1)
security_require_confined = 1|0 (default == 0)
* src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
seclabel types
* src/security/security_manager.c, src/security/security_manager.h:
Set default sec label types
* src/security/security_selinux.c: Handle 'none' seclabel type
* src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
src/qemu/libvirtd_qemu.aug: New security config options
* src/qemu/qemu_driver.c: Tell security driver about default
config
2012-01-25 14:12:52 +00:00
|
|
|
bool securityDefaultConfined;
|
|
|
|
bool securityRequireConfined;
|
Compressed save image format for Qemu.
Implement a compressed save image format for qemu. While ideally
we would have the choice between compressed/non-compressed
available to the libvirt API, unfortunately there is no "flags"
parameter to the virDomainSave() API. Therefore, implement this
as a qemu.conf option. gzip, bzip2, and lzma are implemented, and
it should be very easy to implement additional compression
methods.
One open question is if/how we should detect the compression
binaries. One way to do it is to do compile-time setting of the
paths (via configure.in), but that doesn't seem like a great thing
to do. My preferred solution is not to detect at all;
when we go to run the commands that need them, if they
aren't available, or aren't available in one of the standard paths,
then we'll fail. That's also the solution implemented in this patch.
In the future, we'll have a more robust (managed) save/restore API,
at which time we can expose this functionality properly in the API.
V2: get rid of redundant dd command and just use >> to append data.
V3: Add back the missing pieces for the enum and bumping the save version.
V4: Make the compressed field in the save_header an int.
Implement LZMA compression.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2009-08-07 11:34:05 +00:00
|
|
|
|
|
|
|
char *saveImageFormat;
|
2010-10-28 07:31:46 +00:00
|
|
|
char *dumpImageFormat;
|
2013-10-09 16:05:43 +00:00
|
|
|
char *snapshotImageFormat;
|
2009-08-17 14:05:23 +00:00
|
|
|
|
2010-12-08 06:19:17 +00:00
|
|
|
char *autoDumpPath;
|
2011-07-19 21:54:48 +00:00
|
|
|
bool autoDumpBypassCache;
|
|
|
|
bool autoStartBypassCache;
|
2010-12-08 06:19:17 +00:00
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
char *lockManagerName;
|
|
|
|
|
|
|
|
int keepAliveInterval;
|
|
|
|
unsigned int keepAliveCount;
|
|
|
|
|
|
|
|
int seccompSandbox;
|
2013-10-09 09:32:55 +00:00
|
|
|
|
2014-05-20 06:08:05 +00:00
|
|
|
char *migrateHost;
|
2013-10-09 09:32:55 +00:00
|
|
|
/* The default for -incoming */
|
|
|
|
char *migrationAddress;
|
2016-07-08 10:37:54 +00:00
|
|
|
unsigned int migrationPortMin;
|
|
|
|
unsigned int migrationPortMax;
|
2014-04-09 13:23:45 +00:00
|
|
|
|
|
|
|
bool logTimestamp;
|
2015-11-03 11:13:25 +00:00
|
|
|
bool stdioLogD;
|
2014-08-07 14:59:21 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virFirmware **firmwares;
|
2016-05-17 22:45:27 +00:00
|
|
|
size_t nfirmwares;
|
2016-09-21 19:34:18 +00:00
|
|
|
unsigned int glusterDebugLevel;
|
2019-12-11 21:30:06 +00:00
|
|
|
bool virtiofsdDebug;
|
2017-02-02 13:27:31 +00:00
|
|
|
|
|
|
|
char *memoryBackingDir;
|
2017-08-30 15:32:33 +00:00
|
|
|
|
2017-04-04 16:22:31 +00:00
|
|
|
uid_t swtpm_user;
|
|
|
|
gid_t swtpm_group;
|
2019-06-18 07:46:22 +00:00
|
|
|
|
|
|
|
char **capabilityfilters;
|
2020-04-30 11:27:58 +00:00
|
|
|
|
|
|
|
char *deprecationBehavior;
|
2022-04-26 14:57:03 +00:00
|
|
|
|
|
|
|
virQEMUSchedCore schedCore;
|
2013-01-10 21:03:14 +00:00
|
|
|
};
|
|
|
|
|
2019-10-04 16:14:10 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virQEMUDriverConfig, virObjectUnref);
|
|
|
|
|
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
/* Main driver state */
|
|
|
|
struct _virQEMUDriver {
|
|
|
|
virMutex lock;
|
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Require lock to get reference on 'config',
|
|
|
|
* then lockless thereafter */
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfig *config;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2019-05-23 10:34:08 +00:00
|
|
|
/* pid file FD, ensures two copies of the driver can't use the same root */
|
|
|
|
int lockFD;
|
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virThreadPool *workerPool;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Atomic increment only */
|
2015-07-28 15:33:53 +00:00
|
|
|
int lastvmid;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Atomic inc/dec only */
|
2013-02-19 13:57:46 +00:00
|
|
|
unsigned int nactive;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2019-05-17 11:35:57 +00:00
|
|
|
/* Immutable values */
|
2015-06-15 18:59:58 +00:00
|
|
|
bool privileged;
|
2019-05-17 11:35:57 +00:00
|
|
|
char *embeddedRoot;
|
2022-05-16 10:47:19 +00:00
|
|
|
bool hostFips; /* FIPS mode is enabled on the host */
|
2015-06-15 18:59:58 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointers. Caller must provide locking */
|
2013-01-10 21:03:14 +00:00
|
|
|
virStateInhibitCallback inhibitCallback;
|
|
|
|
void *inhibitOpaque;
|
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObjList *domains;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-01-23 12:19:15 +00:00
|
|
|
/* Immutable pointer */
|
2013-01-10 21:03:14 +00:00
|
|
|
char *qemuImgBinary;
|
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, lockless APIs. Pointless abstraction */
|
2013-01-10 21:03:14 +00:00
|
|
|
ebtablesContext *ebtables;
|
|
|
|
|
2013-02-01 17:04:15 +00:00
|
|
|
/* Require lock to get a reference on the object,
|
|
|
|
* lockless access thereafter
|
|
|
|
*/
|
2021-03-11 07:16:13 +00:00
|
|
|
virCaps *caps;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2019-11-29 10:40:39 +00:00
|
|
|
/* Lazy initialized on first use, immutable thereafter.
|
|
|
|
* Require lock to get the pointer & do optional initialization
|
|
|
|
*/
|
2021-03-11 07:16:13 +00:00
|
|
|
virCPUDef *hostcpu;
|
2019-11-29 10:40:39 +00:00
|
|
|
|
2019-11-26 17:51:22 +00:00
|
|
|
/* Immutable value */
|
|
|
|
virArch hostarch;
|
|
|
|
|
2013-03-05 15:17:24 +00:00
|
|
|
/* Immutable pointer, Immutable object */
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainXMLOption *xmlopt;
|
2013-03-05 15:17:24 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virFileCache *qemuCapsCache;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virObjectEventState *domainEventState;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-02-06 12:40:41 +00:00
|
|
|
/* Immutable pointer. self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virSecurityManager *securityManager;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virHostdevManager *hostdevMgr;
|
2010-05-21 13:52:09 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2021-03-11 07:16:13 +00:00
|
|
|
virPortAllocatorRange *remotePorts;
|
2010-10-29 12:18:29 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2021-03-11 07:16:13 +00:00
|
|
|
virPortAllocatorRange *webSocketPorts;
|
2013-04-30 14:26:43 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2021-03-11 07:16:13 +00:00
|
|
|
virPortAllocatorRange *migrationPorts;
|
2013-10-11 03:27:13 +00:00
|
|
|
|
2020-01-24 20:30:04 +00:00
|
|
|
/* Immutable pointer, lockless APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virSysinfoDef *hostsysinfo;
|
2010-10-26 14:04:46 +00:00
|
|
|
|
2013-02-05 17:54:55 +00:00
|
|
|
/* Immutable pointer. lockless access */
|
2021-03-11 07:16:13 +00:00
|
|
|
virLockManagerPlugin *lockManager;
|
2011-06-23 09:37:57 +00:00
|
|
|
|
2015-07-02 06:26:48 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2021-03-11 07:16:13 +00:00
|
|
|
virHashAtomic *migrationErrors;
|
2007-06-26 22:13:21 +00:00
|
|
|
};
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfig *virQEMUDriverConfigNew(bool privileged,
|
2019-05-17 11:35:57 +00:00
|
|
|
const char *root);
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int virQEMUDriverConfigLoadFile(virQEMUDriverConfig *cfg,
|
2017-02-15 09:06:09 +00:00
|
|
|
const char *filename,
|
|
|
|
bool privileged);
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2017-06-29 12:27:55 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg);
|
2017-06-29 12:27:55 +00:00
|
|
|
|
2019-01-14 21:51:00 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfigSetDefaults(virQEMUDriverConfig *cfg);
|
2019-01-14 21:51:00 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virQEMUDriverConfig *virQEMUDriverGetConfig(virQEMUDriver *driver);
|
2007-06-26 22:13:21 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virCPUDef *virQEMUDriverGetHostCPU(virQEMUDriver *driver);
|
|
|
|
virCaps *virQEMUDriverCreateCapabilities(virQEMUDriver *driver);
|
|
|
|
virCaps *virQEMUDriverGetCapabilities(virQEMUDriver *driver,
|
2013-02-01 17:04:15 +00:00
|
|
|
bool refresh);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainCaps *
|
|
|
|
virQEMUDriverGetDomainCapabilities(virQEMUDriver *driver,
|
|
|
|
virQEMUCaps *qemuCaps,
|
2019-04-04 21:31:00 +00:00
|
|
|
const char *machine,
|
|
|
|
virArch arch,
|
|
|
|
virDomainVirtType virttype);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuDriverAllocateID(virQEMUDriver *driver);
|
|
|
|
virDomainXMLOption *virQEMUDriverCreateXMLConf(virQEMUDriver *driver,
|
2019-11-26 18:57:30 +00:00
|
|
|
const char *defsecmodel);
|
2013-03-11 09:24:29 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuTranslateSnapshotDiskSourcePool(virDomainSnapshotDiskDef *def);
|
2013-11-25 16:26:02 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
char * qemuGetBaseHugepagePath(virQEMUDriver *driver,
|
|
|
|
virHugeTLBFS *hugepage);
|
|
|
|
char * qemuGetDomainHugepagePath(virQEMUDriver *driver,
|
2020-03-20 18:27:26 +00:00
|
|
|
const virDomainDef *def,
|
2021-03-11 07:16:13 +00:00
|
|
|
virHugeTLBFS *hugepage);
|
2016-11-22 12:21:51 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuGetDomainHupageMemPath(virQEMUDriver *driver,
|
2020-03-20 18:27:26 +00:00
|
|
|
const virDomainDef *def,
|
2016-11-22 12:21:51 +00:00
|
|
|
unsigned long long pagesize,
|
|
|
|
char **memPath);
|
2017-10-23 09:33:06 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuGetMemoryBackingDomainPath(virQEMUDriver *driver,
|
2020-03-23 12:33:32 +00:00
|
|
|
const virDomainDef *def,
|
2017-11-07 14:20:12 +00:00
|
|
|
char **path);
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuGetMemoryBackingPath(virQEMUDriver *driver,
|
2020-03-23 12:33:32 +00:00
|
|
|
const virDomainDef *def,
|
2017-11-07 14:20:12 +00:00
|
|
|
const char *alias,
|
2017-10-23 09:33:06 +00:00
|
|
|
char **memPath);
|
2022-10-11 14:41:35 +00:00
|
|
|
|
|
|
|
int qemuHugepageMakeBasedir(virQEMUDriver *driver,
|
|
|
|
virHugeTLBFS *hugepage);
|