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 "capabilities.h"
|
|
|
|
#include "network_conf.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 "virpci.h"
|
|
|
|
#include "virusb.h"
|
|
|
|
#include "virscsi.h"
|
|
|
|
#include "cpu_conf.h"
|
|
|
|
#include "driver.h"
|
|
|
|
#include "virportallocator.h"
|
|
|
|
#include "vircommand.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
|
|
|
|
2012-11-28 16:43:10 +00:00
|
|
|
typedef struct _virQEMUDriver virQEMUDriver;
|
|
|
|
typedef virQEMUDriver *virQEMUDriverPtr;
|
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
typedef struct _virQEMUDriverConfig virQEMUDriverConfig;
|
|
|
|
typedef virQEMUDriverConfig *virQEMUDriverConfigPtr;
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
* qemuDriverLock(driver);
|
|
|
|
* virQEMUDriverConfigPtr cfg = virObjectRef(driver->config);
|
|
|
|
* qemuDriverUnlock(driver);
|
|
|
|
*
|
|
|
|
* ...do stuff with 'cfg'..
|
|
|
|
*
|
|
|
|
* virObjectUnref(cfg);
|
|
|
|
*/
|
|
|
|
struct _virQEMUDriverConfig {
|
|
|
|
virObject parent;
|
2010-12-08 06:19:17 +00:00
|
|
|
|
2012-09-17 13:36:47 +00:00
|
|
|
const 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
|
|
|
|
2016-11-18 15:34:45 +00:00
|
|
|
virBitmapPtr 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;
|
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;
|
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;
|
|
|
|
|
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
|
|
|
|
2014-07-23 15:37:18 +00:00
|
|
|
virHugeTLBFSPtr hugetlbfs;
|
|
|
|
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;
|
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 clearEmulatorCapabilities;
|
|
|
|
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
|
|
|
|
2016-05-17 22:45:27 +00:00
|
|
|
virFirmwarePtr *firmwares;
|
|
|
|
size_t nfirmwares;
|
2016-09-21 19:34:18 +00:00
|
|
|
unsigned int glusterDebugLevel;
|
2017-02-02 13:27:31 +00:00
|
|
|
|
|
|
|
char *memoryBackingDir;
|
2017-08-30 15:32:33 +00:00
|
|
|
|
|
|
|
bool vxhsTLS;
|
|
|
|
char *vxhsTLSx509certdir;
|
2018-05-31 18:21:48 +00:00
|
|
|
|
|
|
|
bool nbdTLS;
|
|
|
|
char *nbdTLSx509certdir;
|
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;
|
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 */
|
2013-01-10 21:03:14 +00:00
|
|
|
virQEMUDriverConfigPtr config;
|
|
|
|
|
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 */
|
2013-01-10 21:03:14 +00:00
|
|
|
virThreadPoolPtr workerPool;
|
|
|
|
|
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
|
|
|
|
2015-06-15 18:59:58 +00:00
|
|
|
/* Immutable value */
|
|
|
|
bool privileged;
|
|
|
|
|
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 */
|
2013-01-11 16:04:47 +00:00
|
|
|
virDomainObjListPtr 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
|
|
|
|
*/
|
2013-01-10 21:03:14 +00:00
|
|
|
virCapsPtr caps;
|
|
|
|
|
2019-11-29 10:40:39 +00:00
|
|
|
/* Lazy initialized on first use, immutable thereafter.
|
|
|
|
* Require lock to get the pointer & do optional initialization
|
|
|
|
*/
|
|
|
|
virCapsHostNUMAPtr hostnuma;
|
|
|
|
|
2019-11-26 17:51:22 +00:00
|
|
|
/* Immutable value */
|
|
|
|
virArch hostarch;
|
|
|
|
|
2013-03-05 15:17:24 +00:00
|
|
|
/* Immutable pointer, Immutable object */
|
2013-03-31 18:03:42 +00:00
|
|
|
virDomainXMLOptionPtr xmlopt;
|
2013-03-05 15:17:24 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2017-07-19 15:01:56 +00:00
|
|
|
virFileCachePtr qemuCapsCache;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, self-locking APIs */
|
2013-11-21 10:43:10 +00:00
|
|
|
virObjectEventStatePtr domainEventState;
|
2013-01-10 21:03:14 +00:00
|
|
|
|
2013-02-06 12:40:41 +00:00
|
|
|
/* Immutable pointer. self-locking APIs */
|
2013-01-10 21:03:14 +00:00
|
|
|
virSecurityManagerPtr securityManager;
|
|
|
|
|
2014-03-05 09:58:54 +00:00
|
|
|
virHostdevManagerPtr hostdevMgr;
|
2010-05-21 13:52:09 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer. Unsafe APIs. XXX */
|
2013-05-03 18:07:35 +00:00
|
|
|
virHashTablePtr sharedDevices;
|
2013-01-02 14:37:07 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2018-02-06 09:09:06 +00:00
|
|
|
virPortAllocatorRangePtr remotePorts;
|
2010-10-29 12:18:29 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2018-02-06 09:09:06 +00:00
|
|
|
virPortAllocatorRangePtr webSocketPorts;
|
2013-04-30 14:26:43 +00:00
|
|
|
|
2018-02-06 09:09:11 +00:00
|
|
|
/* Immutable pointer, immutable object */
|
2018-02-06 09:09:06 +00:00
|
|
|
virPortAllocatorRangePtr migrationPorts;
|
2013-10-11 03:27:13 +00:00
|
|
|
|
2013-01-16 13:24:55 +00:00
|
|
|
/* Immutable pointer, lockless APIs*/
|
2010-10-29 12:18:29 +00:00
|
|
|
virSysinfoDefPtr hostsysinfo;
|
2010-10-26 14:04:46 +00:00
|
|
|
|
2013-02-05 17:54:55 +00:00
|
|
|
/* Immutable pointer. lockless access */
|
2010-10-26 14:04:46 +00:00
|
|
|
virLockManagerPluginPtr lockManager;
|
2011-06-23 09:37:57 +00:00
|
|
|
|
2013-02-15 12:05:12 +00:00
|
|
|
/* Immutable pointer, self-clocking APIs */
|
2013-07-15 14:53:13 +00:00
|
|
|
virCloseCallbacksPtr closeCallbacks;
|
2015-07-02 06:26:48 +00:00
|
|
|
|
|
|
|
/* Immutable pointer, self-locking APIs */
|
|
|
|
virHashAtomicPtr migrationErrors;
|
2007-06-26 22:13:21 +00:00
|
|
|
};
|
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged);
|
|
|
|
|
|
|
|
int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr 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
|
|
|
|
virQEMUDriverConfigValidate(virQEMUDriverConfigPtr cfg);
|
|
|
|
|
2019-01-14 21:51:00 +00:00
|
|
|
int
|
|
|
|
virQEMUDriverConfigSetDefaults(virQEMUDriverConfigPtr cfg);
|
|
|
|
|
2013-01-10 21:03:14 +00:00
|
|
|
virQEMUDriverConfigPtr virQEMUDriverGetConfig(virQEMUDriverPtr driver);
|
2015-06-15 18:59:58 +00:00
|
|
|
bool virQEMUDriverIsPrivileged(virQEMUDriverPtr driver);
|
2007-06-26 22:13:21 +00:00
|
|
|
|
2019-11-29 10:40:39 +00:00
|
|
|
virCapsHostNUMAPtr virQEMUDriverGetHostNUMACaps(virQEMUDriverPtr driver);
|
2013-02-01 17:04:15 +00:00
|
|
|
virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver);
|
|
|
|
virCapsPtr virQEMUDriverGetCapabilities(virQEMUDriverPtr driver,
|
|
|
|
bool refresh);
|
|
|
|
|
2019-04-04 21:31:00 +00:00
|
|
|
virDomainCapsPtr
|
|
|
|
virQEMUDriverGetDomainCapabilities(virQEMUDriverPtr driver,
|
|
|
|
virQEMUCapsPtr qemuCaps,
|
|
|
|
const char *machine,
|
|
|
|
virArch arch,
|
|
|
|
virDomainVirtType virttype);
|
|
|
|
|
2013-05-03 18:07:35 +00:00
|
|
|
typedef struct _qemuSharedDeviceEntry qemuSharedDeviceEntry;
|
|
|
|
typedef qemuSharedDeviceEntry *qemuSharedDeviceEntryPtr;
|
2013-02-20 07:43:55 +00:00
|
|
|
|
2013-05-03 18:07:35 +00:00
|
|
|
bool qemuSharedDeviceEntryDomainExists(qemuSharedDeviceEntryPtr entry,
|
|
|
|
const char *name,
|
2015-04-14 11:28:57 +00:00
|
|
|
int *idx)
|
2013-01-02 14:37:07 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
|
|
|
|
2014-07-24 13:23:40 +00:00
|
|
|
char *qemuGetSharedDeviceKey(const char *disk_path)
|
2013-01-02 14:37:07 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2019-11-21 19:27:58 +00:00
|
|
|
void qemuSharedDeviceEntryFree(void *payload);
|
2013-02-20 07:43:55 +00:00
|
|
|
|
2018-09-25 13:02:25 +00:00
|
|
|
int qemuAddSharedDisk(virQEMUDriverPtr driver,
|
|
|
|
virDomainDiskDefPtr disk,
|
|
|
|
const char *name)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
|
2013-05-03 18:07:37 +00:00
|
|
|
int qemuAddSharedDevice(virQEMUDriverPtr driver,
|
|
|
|
virDomainDeviceDefPtr dev,
|
|
|
|
const char *name)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
|
|
|
|
int qemuRemoveSharedDevice(virQEMUDriverPtr driver,
|
|
|
|
virDomainDeviceDefPtr dev,
|
|
|
|
const char *name)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
|
2014-08-08 08:55:30 +00:00
|
|
|
int qemuRemoveSharedDisk(virQEMUDriverPtr driver,
|
|
|
|
virDomainDiskDefPtr disk,
|
|
|
|
const char *name)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
|
2013-05-03 18:07:42 +00:00
|
|
|
int qemuSetUnprivSGIO(virDomainDeviceDefPtr dev);
|
2013-05-03 18:07:41 +00:00
|
|
|
|
2013-01-14 16:50:08 +00:00
|
|
|
int qemuDriverAllocateID(virQEMUDriverPtr driver);
|
2019-11-26 18:57:30 +00:00
|
|
|
virDomainXMLOptionPtr virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver,
|
|
|
|
const char *defsecmodel);
|
2013-03-11 09:24:29 +00:00
|
|
|
|
2018-02-09 16:06:43 +00:00
|
|
|
int qemuTranslateSnapshotDiskSourcePool(virDomainSnapshotDiskDefPtr def);
|
2013-11-25 16:26:02 +00:00
|
|
|
|
2016-11-22 12:21:51 +00:00
|
|
|
char * qemuGetBaseHugepagePath(virHugeTLBFSPtr hugepage);
|
|
|
|
char * qemuGetDomainHugepagePath(const virDomainDef *def,
|
|
|
|
virHugeTLBFSPtr hugepage);
|
|
|
|
|
|
|
|
int qemuGetDomainHupageMemPath(const virDomainDef *def,
|
|
|
|
virQEMUDriverConfigPtr cfg,
|
|
|
|
unsigned long long pagesize,
|
|
|
|
char **memPath);
|
2017-10-23 09:33:06 +00:00
|
|
|
|
2019-10-22 13:26:14 +00:00
|
|
|
void qemuGetMemoryBackingBasePath(virQEMUDriverConfigPtr cfg,
|
|
|
|
char **path);
|
2017-11-07 14:20:12 +00:00
|
|
|
int qemuGetMemoryBackingDomainPath(const virDomainDef *def,
|
|
|
|
virQEMUDriverConfigPtr cfg,
|
|
|
|
char **path);
|
|
|
|
int qemuGetMemoryBackingPath(const virDomainDef *def,
|
|
|
|
virQEMUDriverConfigPtr cfg,
|
|
|
|
const char *alias,
|
2017-10-23 09:33:06 +00:00
|
|
|
char **memPath);
|