mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
Replace 'struct qemud_driver *' with virQEMUDriverPtr
Remove the obsolete 'qemud' naming prefix and underscore based type name. Introduce virQEMUDriverPtr as the replacement, in common with LXC driver naming style
This commit is contained in:
parent
012d69dff1
commit
4738c2a7e7
@ -34,7 +34,7 @@
|
|||||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||||
|
|
||||||
int
|
int
|
||||||
networkAddEbtablesRules(struct qemud_driver *driver) {
|
networkAddEbtablesRules(virQEMUDriverPtr driver) {
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* Set forward policy to DROP */
|
/* Set forward policy to DROP */
|
||||||
@ -50,7 +50,7 @@ networkAddEbtablesRules(struct qemud_driver *driver) {
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
networkDisableAllFrames(struct qemud_driver *driver) {
|
networkDisableAllFrames(virQEMUDriverPtr driver) {
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* add default rules */
|
/* add default rules */
|
||||||
@ -64,7 +64,7 @@ networkDisableAllFrames(struct qemud_driver *driver) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
networkAllowMacOnPort(struct qemud_driver *driver,
|
networkAllowMacOnPort(virQEMUDriverPtr driver,
|
||||||
const char * ifname,
|
const char * ifname,
|
||||||
const virMacAddrPtr mac) {
|
const virMacAddrPtr mac) {
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ networkAllowMacOnPort(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
networkDisallowMacOnPort(struct qemud_driver *driver,
|
networkDisallowMacOnPort(virQEMUDriverPtr driver,
|
||||||
const char * ifname,
|
const char * ifname,
|
||||||
const virMacAddrPtr mac) {
|
const virMacAddrPtr mac) {
|
||||||
|
|
||||||
|
@ -24,14 +24,14 @@
|
|||||||
# define __QEMUD_BRIDGE_FILTER_H__
|
# define __QEMUD_BRIDGE_FILTER_H__
|
||||||
|
|
||||||
|
|
||||||
int networkAllowMacOnPort(struct qemud_driver *driver,
|
int networkAllowMacOnPort(virQEMUDriverPtr driver,
|
||||||
const char * ifname,
|
const char * ifname,
|
||||||
const virMacAddrPtr mac);
|
const virMacAddrPtr mac);
|
||||||
int networkDisallowMacOnPort(struct qemud_driver *driver,
|
int networkDisallowMacOnPort(virQEMUDriverPtr driver,
|
||||||
const char * ifname,
|
const char * ifname,
|
||||||
const virMacAddrPtr mac);
|
const virMacAddrPtr mac);
|
||||||
int networkDisableAllFrames(struct qemud_driver *driver);
|
int networkDisableAllFrames(virQEMUDriverPtr driver);
|
||||||
int networkAddEbtablesRules(struct qemud_driver *driver);
|
int networkAddEbtablesRules(virQEMUDriverPtr driver);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __QEMUD_BRIDGE_FILTER_H__ */
|
#endif /* __QEMUD_BRIDGE_FILTER_H__ */
|
||||||
|
@ -45,7 +45,7 @@ static const char *const defaultDeviceACL[] = {
|
|||||||
#define DEVICE_PTY_MAJOR 136
|
#define DEVICE_PTY_MAJOR 136
|
||||||
#define DEVICE_SND_MAJOR 116
|
#define DEVICE_SND_MAJOR 116
|
||||||
|
|
||||||
bool qemuCgroupControllerActive(struct qemud_driver *driver,
|
bool qemuCgroupControllerActive(virQEMUDriverPtr driver,
|
||||||
int controller)
|
int controller)
|
||||||
{
|
{
|
||||||
if (driver->cgroup == NULL)
|
if (driver->cgroup == NULL)
|
||||||
@ -188,7 +188,7 @@ int qemuSetupHostUsbDeviceCgroup(usbDevice *dev ATTRIBUTE_UNUSED,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuSetupCgroup(struct qemud_driver *driver,
|
int qemuSetupCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virBitmapPtr nodemask)
|
virBitmapPtr nodemask)
|
||||||
{
|
{
|
||||||
@ -532,7 +532,7 @@ cleanup:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuSetupCgroupForVcpu(struct qemud_driver *driver, virDomainObjPtr vm)
|
int qemuSetupCgroupForVcpu(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
virCgroupPtr cgroup = NULL;
|
virCgroupPtr cgroup = NULL;
|
||||||
virCgroupPtr cgroup_vcpu = NULL;
|
virCgroupPtr cgroup_vcpu = NULL;
|
||||||
@ -637,7 +637,7 @@ cleanup:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
|
int qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virBitmapPtr nodemask)
|
virBitmapPtr nodemask)
|
||||||
{
|
{
|
||||||
@ -738,7 +738,7 @@ cleanup:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuRemoveCgroup(struct qemud_driver *driver,
|
int qemuRemoveCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int quiet)
|
int quiet)
|
||||||
{
|
{
|
||||||
@ -762,7 +762,7 @@ int qemuRemoveCgroup(struct qemud_driver *driver,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuAddToCgroup(struct qemud_driver *driver,
|
int qemuAddToCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
virCgroupPtr cgroup = NULL;
|
virCgroupPtr cgroup = NULL;
|
||||||
|
@ -34,7 +34,7 @@ struct _qemuCgroupData {
|
|||||||
};
|
};
|
||||||
typedef struct _qemuCgroupData qemuCgroupData;
|
typedef struct _qemuCgroupData qemuCgroupData;
|
||||||
|
|
||||||
bool qemuCgroupControllerActive(struct qemud_driver *driver,
|
bool qemuCgroupControllerActive(virQEMUDriverPtr driver,
|
||||||
int controller);
|
int controller);
|
||||||
int qemuSetupDiskCgroup(virDomainObjPtr vm,
|
int qemuSetupDiskCgroup(virDomainObjPtr vm,
|
||||||
virCgroupPtr cgroup,
|
virCgroupPtr cgroup,
|
||||||
@ -45,7 +45,7 @@ int qemuTeardownDiskCgroup(virDomainObjPtr vm,
|
|||||||
int qemuSetupHostUsbDeviceCgroup(usbDevice *dev,
|
int qemuSetupHostUsbDeviceCgroup(usbDevice *dev,
|
||||||
const char *path,
|
const char *path,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
int qemuSetupCgroup(struct qemud_driver *driver,
|
int qemuSetupCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virBitmapPtr nodemask);
|
virBitmapPtr nodemask);
|
||||||
int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
|
int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
|
||||||
@ -56,14 +56,14 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
|
|||||||
int nvcpupin,
|
int nvcpupin,
|
||||||
int vcpuid);
|
int vcpuid);
|
||||||
int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, virBitmapPtr cpumask);
|
int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, virBitmapPtr cpumask);
|
||||||
int qemuSetupCgroupForVcpu(struct qemud_driver *driver, virDomainObjPtr vm);
|
int qemuSetupCgroupForVcpu(virQEMUDriverPtr driver, virDomainObjPtr vm);
|
||||||
int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
|
int qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virBitmapPtr nodemask);
|
virBitmapPtr nodemask);
|
||||||
int qemuRemoveCgroup(struct qemud_driver *driver,
|
int qemuRemoveCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int quiet);
|
int quiet);
|
||||||
int qemuAddToCgroup(struct qemud_driver *driver,
|
int qemuAddToCgroup(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def);
|
virDomainDefPtr def);
|
||||||
|
|
||||||
#endif /* __QEMU_CGROUP_H__ */
|
#endif /* __QEMU_CGROUP_H__ */
|
||||||
|
@ -139,7 +139,7 @@ uname_normalize(struct utsname *ut)
|
|||||||
/**
|
/**
|
||||||
* qemuPhysIfaceConnect:
|
* qemuPhysIfaceConnect:
|
||||||
* @def: the definition of the VM (needed by 802.1Qbh and audit)
|
* @def: the definition of the VM (needed by 802.1Qbh and audit)
|
||||||
* @driver: pointer to the qemud_driver
|
* @driver: pointer to the driver instance
|
||||||
* @net: pointer to he VM's interface description with direct device type
|
* @net: pointer to he VM's interface description with direct device type
|
||||||
* @qemuCaps: flags for qemu
|
* @qemuCaps: flags for qemu
|
||||||
* @vmop: VM operation type
|
* @vmop: VM operation type
|
||||||
@ -148,7 +148,7 @@ uname_normalize(struct utsname *ut)
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuPhysIfaceConnect(virDomainDefPtr def,
|
qemuPhysIfaceConnect(virDomainDefPtr def,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
enum virNetDevVPortProfileOp vmop)
|
enum virNetDevVPortProfileOp vmop)
|
||||||
@ -197,7 +197,7 @@ error:
|
|||||||
int
|
int
|
||||||
qemuNetworkIfaceConnect(virDomainDefPtr def,
|
qemuNetworkIfaceConnect(virDomainDefPtr def,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
qemuCapsPtr caps)
|
qemuCapsPtr caps)
|
||||||
{
|
{
|
||||||
@ -3197,7 +3197,7 @@ error:
|
|||||||
|
|
||||||
char *
|
char *
|
||||||
qemuBuildHostNetStr(virDomainNetDefPtr net,
|
qemuBuildHostNetStr(virDomainNetDefPtr net,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
char type_sep,
|
char type_sep,
|
||||||
int vlan,
|
int vlan,
|
||||||
@ -4242,7 +4242,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildCpuArgStr(const struct qemud_driver *driver,
|
qemuBuildCpuArgStr(const virQEMUDriverPtr driver,
|
||||||
const virDomainDefPtr def,
|
const virDomainDefPtr def,
|
||||||
const char *emulator,
|
const char *emulator,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
@ -4571,7 +4571,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildGraphicsCommandLine(struct qemud_driver *driver,
|
qemuBuildGraphicsCommandLine(virQEMUDriverPtr driver,
|
||||||
virCommandPtr cmd,
|
virCommandPtr cmd,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
@ -4913,7 +4913,7 @@ error:
|
|||||||
*/
|
*/
|
||||||
virCommandPtr
|
virCommandPtr
|
||||||
qemuBuildCommandLine(virConnectPtr conn,
|
qemuBuildCommandLine(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
virDomainChrSourceDefPtr monitor_chr,
|
virDomainChrSourceDefPtr monitor_chr,
|
||||||
bool monitor_json,
|
bool monitor_json,
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
|
|
||||||
virCommandPtr qemuBuildCommandLine(virConnectPtr conn,
|
virCommandPtr qemuBuildCommandLine(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
virDomainChrSourceDefPtr monitor_chr,
|
virDomainChrSourceDefPtr monitor_chr,
|
||||||
bool monitor_json,
|
bool monitor_json,
|
||||||
@ -70,7 +70,7 @@ qemuBuildChrDeviceStr (virDomainChrDefPtr serial,
|
|||||||
|
|
||||||
/* With vlan == -1, use netdev syntax, else old hostnet */
|
/* With vlan == -1, use netdev syntax, else old hostnet */
|
||||||
char * qemuBuildHostNetStr(virDomainNetDefPtr net,
|
char * qemuBuildHostNetStr(virDomainNetDefPtr net,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
char type_sep,
|
char type_sep,
|
||||||
int vlan,
|
int vlan,
|
||||||
@ -146,13 +146,13 @@ char * qemuBuildRedirdevDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
int qemuNetworkIfaceConnect(virDomainDefPtr def,
|
int qemuNetworkIfaceConnect(virDomainDefPtr def,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
qemuCapsPtr caps)
|
qemuCapsPtr caps)
|
||||||
ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
int qemuPhysIfaceConnect(virDomainDefPtr def,
|
int qemuPhysIfaceConnect(virDomainDefPtr def,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
enum virNetDevVPortProfileOp vmop);
|
enum virNetDevVPortProfileOp vmop);
|
||||||
|
@ -62,17 +62,17 @@ struct _qemuDriverCloseDef {
|
|||||||
qemuDriverCloseCallback cb;
|
qemuDriverCloseCallback cb;
|
||||||
};
|
};
|
||||||
|
|
||||||
void qemuDriverLock(struct qemud_driver *driver)
|
void qemuDriverLock(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
virMutexLock(&driver->lock);
|
virMutexLock(&driver->lock);
|
||||||
}
|
}
|
||||||
void qemuDriverUnlock(struct qemud_driver *driver)
|
void qemuDriverUnlock(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
virMutexUnlock(&driver->lock);
|
virMutexUnlock(&driver->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuLoadDriverConfig(struct qemud_driver *driver,
|
int qemuLoadDriverConfig(virQEMUDriverPtr driver,
|
||||||
const char *filename) {
|
const char *filename) {
|
||||||
virConfPtr conf;
|
virConfPtr conf;
|
||||||
virConfValuePtr p;
|
virConfValuePtr p;
|
||||||
@ -587,7 +587,7 @@ qemuDriverCloseCallbackFree(void *payload,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDriverCloseCallbackInit(struct qemud_driver *driver)
|
qemuDriverCloseCallbackInit(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
driver->closeCallbacks = virHashCreate(5, qemuDriverCloseCallbackFree);
|
driver->closeCallbacks = virHashCreate(5, qemuDriverCloseCallbackFree);
|
||||||
if (!driver->closeCallbacks)
|
if (!driver->closeCallbacks)
|
||||||
@ -597,13 +597,13 @@ qemuDriverCloseCallbackInit(struct qemud_driver *driver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDriverCloseCallbackShutdown(struct qemud_driver *driver)
|
qemuDriverCloseCallbackShutdown(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
virHashFree(driver->closeCallbacks);
|
virHashFree(driver->closeCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
qemuDriverCloseCallbackSet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
qemuDriverCloseCallback cb)
|
qemuDriverCloseCallback cb)
|
||||||
@ -649,7 +649,7 @@ qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
qemuDriverCloseCallbackUnset(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuDriverCloseCallback cb)
|
qemuDriverCloseCallback cb)
|
||||||
{
|
{
|
||||||
@ -675,7 +675,7 @@ qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
qemuDriverCloseCallback
|
qemuDriverCloseCallback
|
||||||
qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
qemuDriverCloseCallbackGet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn)
|
virConnectPtr conn)
|
||||||
{
|
{
|
||||||
@ -696,7 +696,7 @@ qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct qemuDriverCloseCallbackData {
|
struct qemuDriverCloseCallbackData {
|
||||||
struct qemud_driver *driver;
|
virQEMUDriverPtr driver;
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -735,7 +735,7 @@ qemuDriverCloseCallbackRun(void *payload,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDriverCloseCallbackRunAll(struct qemud_driver *driver,
|
qemuDriverCloseCallbackRunAll(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn)
|
virConnectPtr conn)
|
||||||
{
|
{
|
||||||
struct qemuDriverCloseCallbackData data = {
|
struct qemuDriverCloseCallbackData data = {
|
||||||
|
@ -50,8 +50,11 @@
|
|||||||
typedef struct _qemuDriverCloseDef qemuDriverCloseDef;
|
typedef struct _qemuDriverCloseDef qemuDriverCloseDef;
|
||||||
typedef qemuDriverCloseDef *qemuDriverCloseDefPtr;
|
typedef qemuDriverCloseDef *qemuDriverCloseDefPtr;
|
||||||
|
|
||||||
|
typedef struct _virQEMUDriver virQEMUDriver;
|
||||||
|
typedef virQEMUDriver *virQEMUDriverPtr;
|
||||||
|
|
||||||
/* Main driver state */
|
/* Main driver state */
|
||||||
struct qemud_driver {
|
struct _virQEMUDriver {
|
||||||
virMutex lock;
|
virMutex lock;
|
||||||
|
|
||||||
virThreadPoolPtr workerPool;
|
virThreadPoolPtr workerPool;
|
||||||
@ -174,9 +177,9 @@ struct _qemuDomainCmdlineDef {
|
|||||||
# define QEMUD_MIGRATION_NUM_PORTS 64
|
# define QEMUD_MIGRATION_NUM_PORTS 64
|
||||||
|
|
||||||
|
|
||||||
void qemuDriverLock(struct qemud_driver *driver);
|
void qemuDriverLock(virQEMUDriverPtr driver);
|
||||||
void qemuDriverUnlock(struct qemud_driver *driver);
|
void qemuDriverUnlock(virQEMUDriverPtr driver);
|
||||||
int qemuLoadDriverConfig(struct qemud_driver *driver,
|
int qemuLoadDriverConfig(virQEMUDriverPtr driver,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
|
||||||
struct qemuDomainDiskInfo {
|
struct qemuDomainDiskInfo {
|
||||||
@ -186,22 +189,22 @@ struct qemuDomainDiskInfo {
|
|||||||
int io_status;
|
int io_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef virDomainObjPtr (*qemuDriverCloseCallback)(struct qemud_driver *driver,
|
typedef virDomainObjPtr (*qemuDriverCloseCallback)(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
int qemuDriverCloseCallbackInit(struct qemud_driver *driver);
|
int qemuDriverCloseCallbackInit(virQEMUDriverPtr driver);
|
||||||
void qemuDriverCloseCallbackShutdown(struct qemud_driver *driver);
|
void qemuDriverCloseCallbackShutdown(virQEMUDriverPtr driver);
|
||||||
int qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
int qemuDriverCloseCallbackSet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
qemuDriverCloseCallback cb);
|
qemuDriverCloseCallback cb);
|
||||||
int qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
int qemuDriverCloseCallbackUnset(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuDriverCloseCallback cb);
|
qemuDriverCloseCallback cb);
|
||||||
qemuDriverCloseCallback qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
qemuDriverCloseCallback qemuDriverCloseCallbackGet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
void qemuDriverCloseCallbackRunAll(struct qemud_driver *driver,
|
void qemuDriverCloseCallbackRunAll(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
|
|
||||||
#endif /* __QEMUD_CONF_H */
|
#endif /* __QEMUD_CONF_H */
|
||||||
|
@ -117,7 +117,7 @@ qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
|
|||||||
|
|
||||||
|
|
||||||
/* driver must be locked before calling */
|
/* driver must be locked before calling */
|
||||||
void qemuDomainEventQueue(struct qemud_driver *driver,
|
void qemuDomainEventQueue(virQEMUDriverPtr driver,
|
||||||
virDomainEventPtr event)
|
virDomainEventPtr event)
|
||||||
{
|
{
|
||||||
virDomainEventStateQueue(driver->domainEventState, event);
|
virDomainEventStateQueue(driver->domainEventState, event);
|
||||||
@ -661,7 +661,7 @@ void qemuDomainSetNamespaceHooks(virCapsPtr caps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuDomainObjSaveJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
qemuDomainObjSaveJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
if (!virDomainObjIsActive(obj)) {
|
if (!virDomainObjIsActive(obj)) {
|
||||||
/* don't write the state file yet, it will be written once the domain
|
/* don't write the state file yet, it will be written once the domain
|
||||||
@ -674,7 +674,7 @@ qemuDomainObjSaveJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDomainObjSetJobPhase(struct qemud_driver *driver,
|
qemuDomainObjSetJobPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
int phase)
|
int phase)
|
||||||
{
|
{
|
||||||
@ -712,7 +712,7 @@ qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDomainObjDiscardAsyncJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
qemuDomainObjDiscardAsyncJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||||
|
|
||||||
@ -758,7 +758,7 @@ qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv, enum qemuDomainJob job)
|
|||||||
* locked or not.
|
* locked or not.
|
||||||
*/
|
*/
|
||||||
static int ATTRIBUTE_NONNULL(1)
|
static int ATTRIBUTE_NONNULL(1)
|
||||||
qemuDomainObjBeginJobInternal(struct qemud_driver *driver,
|
qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
|
||||||
bool driver_locked,
|
bool driver_locked,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainJob job,
|
enum qemuDomainJob job,
|
||||||
@ -860,7 +860,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver must NOT be locked
|
* obj must be locked before calling, driver must NOT be locked
|
||||||
*
|
*
|
||||||
* This must be called by anything that will change the VM state
|
* This must be called by anything that will change the VM state
|
||||||
* in any way, or anything that will use the QEMU monitor.
|
* in any way, or anything that will use the QEMU monitor.
|
||||||
@ -868,7 +868,7 @@ error:
|
|||||||
* Upon successful return, the object will have its ref count increased,
|
* Upon successful return, the object will have its ref count increased,
|
||||||
* successful calls must be followed by EndJob eventually
|
* successful calls must be followed by EndJob eventually
|
||||||
*/
|
*/
|
||||||
int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainJob job)
|
enum qemuDomainJob job)
|
||||||
{
|
{
|
||||||
@ -876,7 +876,7 @@ int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
|||||||
QEMU_ASYNC_JOB_NONE);
|
QEMU_ASYNC_JOB_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
@ -885,7 +885,7 @@ int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj and qemud_driver must be locked before calling.
|
* obj and driver must be locked before calling.
|
||||||
*
|
*
|
||||||
* This must be called by anything that will change the VM state
|
* This must be called by anything that will change the VM state
|
||||||
* in any way, or anything that will use the QEMU monitor.
|
* in any way, or anything that will use the QEMU monitor.
|
||||||
@ -893,7 +893,7 @@ int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
|||||||
* Upon successful return, the object will have its ref count increased,
|
* Upon successful return, the object will have its ref count increased,
|
||||||
* successful calls must be followed by EndJob eventually
|
* successful calls must be followed by EndJob eventually
|
||||||
*/
|
*/
|
||||||
int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
int qemuDomainObjBeginJobWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainJob job)
|
enum qemuDomainJob job)
|
||||||
{
|
{
|
||||||
@ -907,7 +907,7 @@ int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
|||||||
QEMU_ASYNC_JOB_NONE);
|
QEMU_ASYNC_JOB_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
int qemuDomainObjBeginAsyncJobWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
@ -916,7 +916,7 @@ int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver does not matter
|
* obj must be locked before calling, driver does not matter
|
||||||
*
|
*
|
||||||
* To be called after completing the work associated with the
|
* To be called after completing the work associated with the
|
||||||
* earlier qemuDomainBeginJob() call
|
* earlier qemuDomainBeginJob() call
|
||||||
@ -924,7 +924,7 @@ int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
|||||||
* Returns true if @obj was still referenced, false if it was
|
* Returns true if @obj was still referenced, false if it was
|
||||||
* disposed of.
|
* disposed of.
|
||||||
*/
|
*/
|
||||||
bool qemuDomainObjEndJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
bool qemuDomainObjEndJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||||
enum qemuDomainJob job = priv->job.active;
|
enum qemuDomainJob job = priv->job.active;
|
||||||
@ -944,7 +944,7 @@ bool qemuDomainObjEndJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
qemuDomainObjEndAsyncJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
qemuDomainObjEndAsyncJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||||
|
|
||||||
@ -972,7 +972,7 @@ qemuDomainObjAbortAsyncJob(virDomainObjPtr obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainObjEnterMonitorInternal(struct qemud_driver *driver,
|
qemuDomainObjEnterMonitorInternal(virQEMUDriverPtr driver,
|
||||||
bool driver_locked,
|
bool driver_locked,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
@ -1015,7 +1015,7 @@ qemuDomainObjEnterMonitorInternal(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void ATTRIBUTE_NONNULL(1)
|
static void ATTRIBUTE_NONNULL(1)
|
||||||
qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
qemuDomainObjExitMonitorInternal(virQEMUDriverPtr driver,
|
||||||
bool driver_locked,
|
bool driver_locked,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
@ -1045,7 +1045,7 @@ qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver must be unlocked
|
* obj must be locked before calling, driver must be unlocked
|
||||||
*
|
*
|
||||||
* To be called immediately before any QEMU monitor API call
|
* To be called immediately before any QEMU monitor API call
|
||||||
* Must have already either called qemuDomainObjBeginJob() and checked
|
* Must have already either called qemuDomainObjBeginJob() and checked
|
||||||
@ -1053,25 +1053,25 @@ qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
|||||||
*
|
*
|
||||||
* To be followed with qemuDomainObjExitMonitor() once complete
|
* To be followed with qemuDomainObjExitMonitor() once complete
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjEnterMonitor(struct qemud_driver *driver,
|
void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
ignore_value(qemuDomainObjEnterMonitorInternal(driver, false, obj,
|
ignore_value(qemuDomainObjEnterMonitorInternal(driver, false, obj,
|
||||||
QEMU_ASYNC_JOB_NONE));
|
QEMU_ASYNC_JOB_NONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked
|
/* obj must NOT be locked before calling, driver must be unlocked
|
||||||
*
|
*
|
||||||
* Should be paired with an earlier qemuDomainObjEnterMonitor() call
|
* Should be paired with an earlier qemuDomainObjEnterMonitor() call
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
void qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjExitMonitorInternal(driver, false, obj);
|
qemuDomainObjExitMonitorInternal(driver, false, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver must be locked
|
* obj must be locked before calling, driver must be locked
|
||||||
*
|
*
|
||||||
* To be called immediately before any QEMU monitor API call
|
* To be called immediately before any QEMU monitor API call
|
||||||
* Must have already either called qemuDomainObjBeginJobWithDriver() and
|
* Must have already either called qemuDomainObjBeginJobWithDriver() and
|
||||||
@ -1079,7 +1079,7 @@ void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
|||||||
*
|
*
|
||||||
* To be followed with qemuDomainObjExitMonitorWithDriver() once complete
|
* To be followed with qemuDomainObjExitMonitorWithDriver() once complete
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterMonitorWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
ignore_value(qemuDomainObjEnterMonitorInternal(driver, true, obj,
|
ignore_value(qemuDomainObjEnterMonitorInternal(driver, true, obj,
|
||||||
@ -1087,7 +1087,7 @@ void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj and qemud_driver must be locked before calling
|
* obj and driver must be locked before calling
|
||||||
*
|
*
|
||||||
* To be called immediately before any QEMU monitor API call.
|
* To be called immediately before any QEMU monitor API call.
|
||||||
* Must have already either called qemuDomainObjBeginJobWithDriver()
|
* Must have already either called qemuDomainObjBeginJobWithDriver()
|
||||||
@ -1100,19 +1100,19 @@ void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
|||||||
* started (probably because the vm exited in the meantime).
|
* started (probably because the vm exited in the meantime).
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuDomainObjEnterMonitorAsync(struct qemud_driver *driver,
|
qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
return qemuDomainObjEnterMonitorInternal(driver, true, obj, asyncJob);
|
return qemuDomainObjEnterMonitorInternal(driver, true, obj, asyncJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked,
|
/* obj must NOT be locked before calling, driver must be unlocked,
|
||||||
* and will be locked after returning
|
* and will be locked after returning
|
||||||
*
|
*
|
||||||
* Should be paired with an earlier qemuDomainObjEnterMonitorWithDriver() call
|
* Should be paired with an earlier qemuDomainObjEnterMonitorWithDriver() call
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitMonitorWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjExitMonitorInternal(driver, true, obj);
|
qemuDomainObjExitMonitorInternal(driver, true, obj);
|
||||||
@ -1121,7 +1121,7 @@ void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainObjEnterAgentInternal(struct qemud_driver *driver,
|
qemuDomainObjEnterAgentInternal(virQEMUDriverPtr driver,
|
||||||
bool driver_locked,
|
bool driver_locked,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
@ -1138,7 +1138,7 @@ qemuDomainObjEnterAgentInternal(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void ATTRIBUTE_NONNULL(1)
|
static void ATTRIBUTE_NONNULL(1)
|
||||||
qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
qemuDomainObjExitAgentInternal(virQEMUDriverPtr driver,
|
||||||
bool driver_locked,
|
bool driver_locked,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
@ -1160,7 +1160,7 @@ qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver must be unlocked
|
* obj must be locked before calling, driver must be unlocked
|
||||||
*
|
*
|
||||||
* To be called immediately before any QEMU agent API call.
|
* To be called immediately before any QEMU agent API call.
|
||||||
* Must have already called qemuDomainObjBeginJob() and checked
|
* Must have already called qemuDomainObjBeginJob() and checked
|
||||||
@ -1168,24 +1168,24 @@ qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
|||||||
*
|
*
|
||||||
* To be followed with qemuDomainObjExitAgent() once complete
|
* To be followed with qemuDomainObjExitAgent() once complete
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjEnterAgent(struct qemud_driver *driver,
|
void qemuDomainObjEnterAgent(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
ignore_value(qemuDomainObjEnterAgentInternal(driver, false, obj));
|
ignore_value(qemuDomainObjEnterAgentInternal(driver, false, obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked
|
/* obj must NOT be locked before calling, driver must be unlocked
|
||||||
*
|
*
|
||||||
* Should be paired with an earlier qemuDomainObjEnterAgent() call
|
* Should be paired with an earlier qemuDomainObjEnterAgent() call
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
void qemuDomainObjExitAgent(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjExitAgentInternal(driver, false, obj);
|
qemuDomainObjExitAgentInternal(driver, false, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling, qemud_driver must be locked
|
* obj must be locked before calling, driver must be locked
|
||||||
*
|
*
|
||||||
* To be called immediately before any QEMU agent API call.
|
* To be called immediately before any QEMU agent API call.
|
||||||
* Must have already called qemuDomainObjBeginJobWithDriver() and
|
* Must have already called qemuDomainObjBeginJobWithDriver() and
|
||||||
@ -1193,24 +1193,24 @@ void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
|||||||
*
|
*
|
||||||
* To be followed with qemuDomainObjExitAgentWithDriver() once complete
|
* To be followed with qemuDomainObjExitAgentWithDriver() once complete
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjEnterAgentWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterAgentWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
ignore_value(qemuDomainObjEnterAgentInternal(driver, true, obj));
|
ignore_value(qemuDomainObjEnterAgentInternal(driver, true, obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked,
|
/* obj must NOT be locked before calling, driver must be unlocked,
|
||||||
* and will be locked after returning
|
* and will be locked after returning
|
||||||
*
|
*
|
||||||
* Should be paired with an earlier qemuDomainObjEnterAgentWithDriver() call
|
* Should be paired with an earlier qemuDomainObjEnterAgentWithDriver() call
|
||||||
*/
|
*/
|
||||||
void qemuDomainObjExitAgentWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitAgentWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDomainObjExitAgentInternal(driver, true, obj);
|
qemuDomainObjExitAgentInternal(driver, true, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterRemoteWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
virObjectRef(obj);
|
virObjectRef(obj);
|
||||||
@ -1218,7 +1218,7 @@ void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
|||||||
qemuDriverUnlock(driver);
|
qemuDriverUnlock(driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitRemoteWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
qemuDriverLock(driver);
|
qemuDriverLock(driver);
|
||||||
@ -1228,7 +1228,7 @@ void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainDefFormatBuf(struct qemud_driver *driver,
|
qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
virBuffer *buf)
|
virBuffer *buf)
|
||||||
@ -1307,7 +1307,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
char *qemuDomainDefFormatXML(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -1327,7 +1327,7 @@ char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
|||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *qemuDomainFormatXML(struct qemud_driver *driver,
|
char *qemuDomainFormatXML(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -1342,7 +1342,7 @@ char *qemuDomainFormatXML(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
qemuDomainDefFormatLive(struct qemud_driver *driver,
|
qemuDomainDefFormatLive(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
bool inactive,
|
bool inactive,
|
||||||
bool compatible)
|
bool compatible)
|
||||||
@ -1358,7 +1358,7 @@ qemuDomainDefFormatLive(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjTaint(struct qemud_driver *driver,
|
void qemuDomainObjTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum virDomainTaintFlags taint,
|
enum virDomainTaintFlags taint,
|
||||||
int logFD)
|
int logFD)
|
||||||
@ -1392,7 +1392,7 @@ void qemuDomainObjTaint(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
int logFD)
|
int logFD)
|
||||||
{
|
{
|
||||||
@ -1421,7 +1421,7 @@ void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
int logFD)
|
int logFD)
|
||||||
@ -1435,7 +1435,7 @@ void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
int logFD)
|
int logFD)
|
||||||
@ -1451,7 +1451,7 @@ void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainOpenLogHelper(struct qemud_driver *driver,
|
qemuDomainOpenLogHelper(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int oflags,
|
int oflags,
|
||||||
mode_t mode)
|
mode_t mode)
|
||||||
@ -1500,7 +1500,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm,
|
qemuDomainCreateLog(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
bool append)
|
bool append)
|
||||||
{
|
{
|
||||||
int oflags;
|
int oflags;
|
||||||
@ -1517,7 +1517,7 @@ qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos)
|
qemuDomainOpenLog(virQEMUDriverPtr driver, virDomainObjPtr vm, off_t pos)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
off_t off;
|
off_t off;
|
||||||
@ -1550,7 +1550,7 @@ qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainAppendLog(struct qemud_driver *driver,
|
int qemuDomainAppendLog(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
int logFD,
|
int logFD,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
@ -1590,7 +1590,7 @@ cleanup:
|
|||||||
|
|
||||||
/* Locate an appropriate 'qemu-img' binary. */
|
/* Locate an appropriate 'qemu-img' binary. */
|
||||||
const char *
|
const char *
|
||||||
qemuFindQemuImgBinary(struct qemud_driver *driver)
|
qemuFindQemuImgBinary(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
if (!driver->qemuImgBinary) {
|
if (!driver->qemuImgBinary) {
|
||||||
driver->qemuImgBinary = virFindFileInPath("kvm-img");
|
driver->qemuImgBinary = virFindFileInPath("kvm-img");
|
||||||
@ -1648,7 +1648,7 @@ cleanup:
|
|||||||
/* The domain is expected to be locked and inactive. Return -1 on normal
|
/* The domain is expected to be locked and inactive. Return -1 on normal
|
||||||
* failure, 1 if we skipped a disk due to try_all. */
|
* failure, 1 if we skipped a disk due to try_all. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotForEachQcow2Raw(struct qemud_driver *driver,
|
qemuDomainSnapshotForEachQcow2Raw(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char *op,
|
const char *op,
|
||||||
@ -1719,7 +1719,7 @@ qemuDomainSnapshotForEachQcow2Raw(struct qemud_driver *driver,
|
|||||||
/* The domain is expected to be locked and inactive. Return -1 on normal
|
/* The domain is expected to be locked and inactive. Return -1 on normal
|
||||||
* failure, 1 if we skipped a disk due to try_all. */
|
* failure, 1 if we skipped a disk due to try_all. */
|
||||||
int
|
int
|
||||||
qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
qemuDomainSnapshotForEachQcow2(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotObjPtr snap,
|
virDomainSnapshotObjPtr snap,
|
||||||
const char *op,
|
const char *op,
|
||||||
@ -1738,7 +1738,7 @@ qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
|||||||
|
|
||||||
/* Discard one snapshot (or its metadata), without reparenting any children. */
|
/* Discard one snapshot (or its metadata), without reparenting any children. */
|
||||||
int
|
int
|
||||||
qemuDomainSnapshotDiscard(struct qemud_driver *driver,
|
qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotObjPtr snap,
|
virDomainSnapshotObjPtr snap,
|
||||||
bool update_current,
|
bool update_current,
|
||||||
@ -1821,7 +1821,7 @@ void qemuDomainSnapshotDiscardAll(void *payload,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemu_snap_remove rem;
|
struct qemu_snap_remove rem;
|
||||||
@ -1841,7 +1841,7 @@ qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
|||||||
* be no remaining references to vm.
|
* be no remaining references to vm.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
qemuDomainRemoveInactive(struct qemud_driver *driver,
|
qemuDomainRemoveInactive(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
char *snapDir;
|
char *snapDir;
|
||||||
@ -1864,7 +1864,7 @@ qemuDomainRemoveInactive(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
bool value)
|
bool value)
|
||||||
{
|
{
|
||||||
@ -1880,7 +1880,7 @@ qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
bool cold_boot)
|
bool cold_boot)
|
||||||
{
|
{
|
||||||
@ -2002,7 +2002,7 @@ qemuDomainCleanupRemove(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuDomainCleanupRun(struct qemud_driver *driver,
|
qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
@ -2022,7 +2022,7 @@ qemuDomainCleanupRun(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainDetermineDiskChain(struct qemud_driver *driver,
|
qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
bool force)
|
bool force)
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,7 @@ struct qemuDomainJobObj {
|
|||||||
typedef struct _qemuDomainPCIAddressSet qemuDomainPCIAddressSet;
|
typedef struct _qemuDomainPCIAddressSet qemuDomainPCIAddressSet;
|
||||||
typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
|
typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
|
||||||
|
|
||||||
typedef void (*qemuDomainCleanupCallback)(struct qemud_driver *driver,
|
typedef void (*qemuDomainCleanupCallback)(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
|
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
|
||||||
@ -176,37 +176,37 @@ int qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
|
|||||||
void qemuDomainEventFlush(int timer, void *opaque);
|
void qemuDomainEventFlush(int timer, void *opaque);
|
||||||
|
|
||||||
/* driver must be locked before calling */
|
/* driver must be locked before calling */
|
||||||
void qemuDomainEventQueue(struct qemud_driver *driver,
|
void qemuDomainEventQueue(virQEMUDriverPtr driver,
|
||||||
virDomainEventPtr event);
|
virDomainEventPtr event);
|
||||||
|
|
||||||
void qemuDomainSetPrivateDataHooks(virCapsPtr caps);
|
void qemuDomainSetPrivateDataHooks(virCapsPtr caps);
|
||||||
void qemuDomainSetNamespaceHooks(virCapsPtr caps);
|
void qemuDomainSetNamespaceHooks(virCapsPtr caps);
|
||||||
|
|
||||||
int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainJob job)
|
enum qemuDomainJob job)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
int qemuDomainObjBeginJobWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainJob job)
|
enum qemuDomainJob job)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
int qemuDomainObjBeginAsyncJobWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
bool qemuDomainObjEndJob(struct qemud_driver *driver,
|
bool qemuDomainObjEndJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
bool qemuDomainObjEndAsyncJob(struct qemud_driver *driver,
|
bool qemuDomainObjEndAsyncJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
void qemuDomainObjAbortAsyncJob(virDomainObjPtr obj);
|
void qemuDomainObjAbortAsyncJob(virDomainObjPtr obj);
|
||||||
void qemuDomainObjSetJobPhase(struct qemud_driver *driver,
|
void qemuDomainObjSetJobPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
int phase);
|
int phase);
|
||||||
void qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
void qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
||||||
@ -214,112 +214,112 @@ void qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
|||||||
void qemuDomainObjRestoreJob(virDomainObjPtr obj,
|
void qemuDomainObjRestoreJob(virDomainObjPtr obj,
|
||||||
struct qemuDomainJobObj *job);
|
struct qemuDomainJobObj *job);
|
||||||
void qemuDomainObjTransferJob(virDomainObjPtr obj);
|
void qemuDomainObjTransferJob(virDomainObjPtr obj);
|
||||||
void qemuDomainObjDiscardAsyncJob(struct qemud_driver *driver,
|
void qemuDomainObjDiscardAsyncJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj);
|
virDomainObjPtr obj);
|
||||||
void qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj);
|
void qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj);
|
||||||
|
|
||||||
void qemuDomainObjEnterMonitor(struct qemud_driver *driver,
|
void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
void qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterMonitorWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
int qemuDomainObjEnterMonitorAsync(struct qemud_driver *driver,
|
int qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitMonitorWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjEnterAgent(struct qemud_driver *driver,
|
void qemuDomainObjEnterAgent(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
void qemuDomainObjExitAgent(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjEnterAgentWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterAgentWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjExitAgentWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitAgentWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjEnterRemoteWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
void qemuDomainObjExitRemoteWithDriver(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
int qemuDomainDefFormatBuf(struct qemud_driver *driver,
|
int qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr vm,
|
virDomainDefPtr vm,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
virBuffer *buf);
|
virBuffer *buf);
|
||||||
|
|
||||||
char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
char *qemuDomainDefFormatXML(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr vm,
|
virDomainDefPtr vm,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
char *qemuDomainFormatXML(struct qemud_driver *driver,
|
char *qemuDomainFormatXML(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
char *qemuDomainDefFormatLive(struct qemud_driver *driver,
|
char *qemuDomainDefFormatLive(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
bool inactive,
|
bool inactive,
|
||||||
bool compatible);
|
bool compatible);
|
||||||
|
|
||||||
void qemuDomainObjTaint(struct qemud_driver *driver,
|
void qemuDomainObjTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum virDomainTaintFlags taint,
|
enum virDomainTaintFlags taint,
|
||||||
int logFD);
|
int logFD);
|
||||||
|
|
||||||
void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
int logFD);
|
int logFD);
|
||||||
void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
int logFD);
|
int logFD);
|
||||||
void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
int logFD);
|
int logFD);
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm, bool append);
|
int qemuDomainCreateLog(virQEMUDriverPtr driver, virDomainObjPtr vm, bool append);
|
||||||
int qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos);
|
int qemuDomainOpenLog(virQEMUDriverPtr driver, virDomainObjPtr vm, off_t pos);
|
||||||
int qemuDomainAppendLog(struct qemud_driver *driver,
|
int qemuDomainAppendLog(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int logFD,
|
int logFD,
|
||||||
const char *fmt, ...) ATTRIBUTE_FMT_PRINTF(4, 5);
|
const char *fmt, ...) ATTRIBUTE_FMT_PRINTF(4, 5);
|
||||||
|
|
||||||
const char *qemuFindQemuImgBinary(struct qemud_driver *driver);
|
const char *qemuFindQemuImgBinary(virQEMUDriverPtr driver);
|
||||||
|
|
||||||
int qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
|
int qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
|
||||||
virDomainSnapshotObjPtr snapshot,
|
virDomainSnapshotObjPtr snapshot,
|
||||||
char *snapshotDir);
|
char *snapshotDir);
|
||||||
|
|
||||||
int qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
int qemuDomainSnapshotForEachQcow2(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotObjPtr snap,
|
virDomainSnapshotObjPtr snap,
|
||||||
const char *op,
|
const char *op,
|
||||||
bool try_all);
|
bool try_all);
|
||||||
|
|
||||||
int qemuDomainSnapshotDiscard(struct qemud_driver *driver,
|
int qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotObjPtr snap,
|
virDomainSnapshotObjPtr snap,
|
||||||
bool update_current,
|
bool update_current,
|
||||||
bool metadata_only);
|
bool metadata_only);
|
||||||
|
|
||||||
struct qemu_snap_remove {
|
struct qemu_snap_remove {
|
||||||
struct qemud_driver *driver;
|
virQEMUDriverPtr driver;
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
int err;
|
int err;
|
||||||
bool metadata_only;
|
bool metadata_only;
|
||||||
@ -330,23 +330,23 @@ void qemuDomainSnapshotDiscardAll(void *payload,
|
|||||||
const void *name,
|
const void *name,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
int qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
int qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
void qemuDomainRemoveInactive(struct qemud_driver *driver,
|
void qemuDomainRemoveInactive(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
void qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
void qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
bool value);
|
bool value);
|
||||||
|
|
||||||
bool qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv,
|
bool qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv,
|
||||||
enum qemuDomainJob job);
|
enum qemuDomainJob job);
|
||||||
|
|
||||||
int qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
int qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
bool start_with_state);
|
bool start_with_state);
|
||||||
int qemuDomainDetermineDiskChain(struct qemud_driver *driver,
|
int qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
bool force);
|
bool force);
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ int qemuDomainCleanupAdd(virDomainObjPtr vm,
|
|||||||
qemuDomainCleanupCallback cb);
|
qemuDomainCleanupCallback cb);
|
||||||
void qemuDomainCleanupRemove(virDomainObjPtr vm,
|
void qemuDomainCleanupRemove(virDomainObjPtr vm,
|
||||||
qemuDomainCleanupCallback cb);
|
qemuDomainCleanupCallback cb);
|
||||||
void qemuDomainCleanupRun(struct qemud_driver *driver,
|
void qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
#endif /* __QEMU_DOMAIN_H__ */
|
#endif /* __QEMU_DOMAIN_H__ */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -73,7 +73,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static pciDeviceList *
|
static pciDeviceList *
|
||||||
qemuGetActivePciHostDeviceList(struct qemud_driver *driver,
|
qemuGetActivePciHostDeviceList(virQEMUDriverPtr driver,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
int nhostdevs)
|
int nhostdevs)
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ qemuGetActivePciHostDeviceList(struct qemud_driver *driver,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
virDomainHostdevDefPtr hostdev = NULL;
|
virDomainHostdevDefPtr hostdev = NULL;
|
||||||
@ -160,7 +160,7 @@ int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuUpdateActiveUsbHostdevs(struct qemud_driver *driver,
|
qemuUpdateActiveUsbHostdevs(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
virDomainHostdevDefPtr hostdev = NULL;
|
virDomainHostdevDefPtr hostdev = NULL;
|
||||||
@ -399,7 +399,7 @@ qemuDomainHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
const unsigned char *uuid,
|
const unsigned char *uuid,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
@ -586,7 +586,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuPrepareHostPCIDevices(struct qemud_driver *driver,
|
qemuPrepareHostPCIDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
return qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
|
return qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
|
||||||
@ -594,7 +594,7 @@ qemuPrepareHostPCIDevices(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuPrepareHostdevUSBDevices(struct qemud_driver *driver,
|
qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
usbDeviceList *list)
|
usbDeviceList *list)
|
||||||
{
|
{
|
||||||
@ -728,7 +728,7 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuPrepareHostUSBDevices(struct qemud_driver *driver,
|
qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
bool coldBoot)
|
bool coldBoot)
|
||||||
{
|
{
|
||||||
@ -795,7 +795,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuPrepareHostDevices(struct qemud_driver *driver,
|
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
bool coldBoot)
|
bool coldBoot)
|
||||||
{
|
{
|
||||||
@ -812,7 +812,7 @@ int qemuPrepareHostDevices(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver)
|
void qemuReattachPciDevice(pciDevice *dev, virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
int retries = 100;
|
int retries = 100;
|
||||||
|
|
||||||
@ -840,7 +840,7 @@ void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
int nhostdevs)
|
int nhostdevs)
|
||||||
@ -916,7 +916,7 @@ void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuDomainReAttachHostUsbDevices(struct qemud_driver *driver,
|
qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
int nhostdevs)
|
int nhostdevs)
|
||||||
@ -975,7 +975,7 @@ qemuDomainReAttachHostUsbDevices(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
if (!def->nhostdevs)
|
if (!def->nhostdevs)
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
# include "qemu_conf.h"
|
# include "qemu_conf.h"
|
||||||
# include "domain_conf.h"
|
# include "domain_conf.h"
|
||||||
|
|
||||||
int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def);
|
virDomainDefPtr def);
|
||||||
int qemuUpdateActiveUsbHostdevs(struct qemud_driver *driver,
|
int qemuUpdateActiveUsbHostdevs(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def);
|
virDomainDefPtr def);
|
||||||
int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
const unsigned char *uuid,
|
const unsigned char *uuid,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
@ -39,18 +39,18 @@ int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
|||||||
int qemuFindHostdevUSBDevice(virDomainHostdevDefPtr hostdev,
|
int qemuFindHostdevUSBDevice(virDomainHostdevDefPtr hostdev,
|
||||||
bool mandatory,
|
bool mandatory,
|
||||||
usbDevice **usb);
|
usbDevice **usb);
|
||||||
int qemuPrepareHostdevUSBDevices(struct qemud_driver *driver,
|
int qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
usbDeviceList *list);
|
usbDeviceList *list);
|
||||||
int qemuPrepareHostDevices(struct qemud_driver *driver,
|
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
bool coldBoot);
|
bool coldBoot);
|
||||||
void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver);
|
void qemuReattachPciDevice(pciDevice *dev, virQEMUDriverPtr driver);
|
||||||
void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||||
const char *name,
|
const char *name,
|
||||||
virDomainHostdevDefPtr *hostdevs,
|
virDomainHostdevDefPtr *hostdevs,
|
||||||
int nhostdevs);
|
int nhostdevs);
|
||||||
void qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||||
virDomainDefPtr def);
|
virDomainDefPtr def);
|
||||||
int qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev);
|
int qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev);
|
||||||
int qemuDomainHostdevNetConfigReplace(virDomainHostdevDefPtr hostdev,
|
int qemuDomainHostdevNetConfigReplace(virDomainHostdevDefPtr hostdev,
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||||
|
|
||||||
int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
|
int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
bool force)
|
bool force)
|
||||||
@ -158,7 +158,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainCheckEjectableMedia(struct qemud_driver *driver,
|
qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
@ -201,7 +201,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk)
|
virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
@ -315,7 +315,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
int qemuDomainAttachPciControllerDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainControllerDefPtr controller)
|
virDomainControllerDefPtr controller)
|
||||||
{
|
{
|
||||||
@ -387,7 +387,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
static virDomainControllerDefPtr
|
static virDomainControllerDefPtr
|
||||||
qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
|
qemuDomainFindOrCreateSCSIDiskController(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int controller)
|
int controller)
|
||||||
{
|
{
|
||||||
@ -434,7 +434,7 @@ qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk)
|
virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
@ -560,7 +560,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk)
|
virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
@ -655,7 +655,7 @@ error:
|
|||||||
|
|
||||||
/* XXX conn required for network -> bridge resolution */
|
/* XXX conn required for network -> bridge resolution */
|
||||||
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainNetDefPtr net)
|
virDomainNetDefPtr net)
|
||||||
{
|
{
|
||||||
@ -935,7 +935,7 @@ no_memory:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev)
|
virDomainHostdevDefPtr hostdev)
|
||||||
{
|
{
|
||||||
@ -1028,7 +1028,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainAttachRedirdevDevice(struct qemud_driver *driver,
|
int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainRedirdevDefPtr redirdev)
|
virDomainRedirdevDefPtr redirdev)
|
||||||
{
|
{
|
||||||
@ -1072,7 +1072,7 @@ error:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostUsbDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev)
|
virDomainHostdevDefPtr hostdev)
|
||||||
{
|
{
|
||||||
@ -1137,7 +1137,7 @@ error:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev)
|
virDomainHostdevDefPtr hostdev)
|
||||||
{
|
{
|
||||||
@ -1330,7 +1330,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainChangeNetLinkState(struct qemud_driver *driver,
|
int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainNetDefPtr dev,
|
virDomainNetDefPtr dev,
|
||||||
int linkstate)
|
int linkstate)
|
||||||
@ -1362,7 +1362,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainChangeNet(struct qemud_driver *driver,
|
qemuDomainChangeNet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainPtr dom,
|
virDomainPtr dom,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
@ -1732,7 +1732,7 @@ static virDomainGraphicsDefPtr qemuDomainFindGraphics(virDomainObjPtr vm,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainChangeGraphics(struct qemud_driver *driver,
|
qemuDomainChangeGraphics(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainGraphicsDefPtr dev)
|
virDomainGraphicsDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -1918,7 +1918,7 @@ static bool qemuIsMultiFunctionDevice(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
int qemuDomainDetachPciDiskDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -2024,7 +2024,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
|
int qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -2164,7 +2164,7 @@ static bool qemuDomainControllerIsBusy(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
int qemuDomainDetachPciControllerDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -2239,7 +2239,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
|
qemuDomainDetachHostPciDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr detach)
|
virDomainHostdevDefPtr detach)
|
||||||
{
|
{
|
||||||
@ -2309,7 +2309,7 @@ qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainDetachHostUsbDevice(struct qemud_driver *driver,
|
qemuDomainDetachHostUsbDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr detach)
|
virDomainHostdevDefPtr detach)
|
||||||
{
|
{
|
||||||
@ -2349,7 +2349,7 @@ qemuDomainDetachHostUsbDevice(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int qemuDomainDetachThisHostDevice(struct qemud_driver *driver,
|
int qemuDomainDetachThisHostDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr detach,
|
virDomainHostdevDefPtr detach,
|
||||||
int idx)
|
int idx)
|
||||||
@ -2398,7 +2398,7 @@ int qemuDomainDetachThisHostDevice(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* search for a hostdev matching dev and detach it */
|
/* search for a hostdev matching dev and detach it */
|
||||||
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -2453,7 +2453,7 @@ int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
@ -2590,7 +2590,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
|
qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int type,
|
int type,
|
||||||
virDomainGraphicsAuthDefPtr auth,
|
virDomainGraphicsAuthDefPtr auth,
|
||||||
@ -2656,7 +2656,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainAttachLease(struct qemud_driver *driver,
|
int qemuDomainAttachLease(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainLeaseDefPtr lease)
|
virDomainLeaseDefPtr lease)
|
||||||
{
|
{
|
||||||
@ -2673,7 +2673,7 @@ int qemuDomainAttachLease(struct qemud_driver *driver,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuDomainDetachLease(struct qemud_driver *driver,
|
int qemuDomainDetachLease(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainLeaseDefPtr lease)
|
virDomainLeaseDefPtr lease)
|
||||||
{
|
{
|
||||||
|
@ -28,79 +28,79 @@
|
|||||||
# include "qemu_domain.h"
|
# include "qemu_domain.h"
|
||||||
# include "domain_conf.h"
|
# include "domain_conf.h"
|
||||||
|
|
||||||
int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
|
int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
bool force);
|
bool force);
|
||||||
int qemuDomainCheckEjectableMedia(struct qemud_driver *driver,
|
int qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob asyncJob);
|
enum qemuDomainAsyncJob asyncJob);
|
||||||
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk);
|
virDomainDiskDefPtr disk);
|
||||||
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
int qemuDomainAttachPciControllerDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainControllerDefPtr controller);
|
virDomainControllerDefPtr controller);
|
||||||
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk);
|
virDomainDiskDefPtr disk);
|
||||||
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk);
|
virDomainDiskDefPtr disk);
|
||||||
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainNetDefPtr net);
|
virDomainNetDefPtr net);
|
||||||
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev);
|
virDomainHostdevDefPtr hostdev);
|
||||||
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostUsbDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev);
|
virDomainHostdevDefPtr hostdev);
|
||||||
int qemuDomainAttachRedirdevDevice(struct qemud_driver *driver,
|
int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainRedirdevDefPtr hostdev);
|
virDomainRedirdevDefPtr hostdev);
|
||||||
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
|
int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainHostdevDefPtr hostdev);
|
virDomainHostdevDefPtr hostdev);
|
||||||
int qemuDomainChangeGraphics(struct qemud_driver *driver,
|
int qemuDomainChangeGraphics(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainGraphicsDefPtr dev);
|
virDomainGraphicsDefPtr dev);
|
||||||
int qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
|
int qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int type,
|
int type,
|
||||||
virDomainGraphicsAuthDefPtr auth,
|
virDomainGraphicsAuthDefPtr auth,
|
||||||
const char *defaultPasswd);
|
const char *defaultPasswd);
|
||||||
int qemuDomainChangeNet(struct qemud_driver *driver,
|
int qemuDomainChangeNet(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainPtr dom,
|
virDomainPtr dom,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainChangeNetLinkState(struct qemud_driver *driver,
|
int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainNetDefPtr dev,
|
virDomainNetDefPtr dev,
|
||||||
int linkstate);
|
int linkstate);
|
||||||
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
int qemuDomainDetachPciDiskDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
|
int qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
int qemuDomainDetachPciControllerDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
int qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev);
|
virDomainDeviceDefPtr dev);
|
||||||
int qemuDomainAttachLease(struct qemud_driver *driver,
|
int qemuDomainAttachLease(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainLeaseDefPtr lease);
|
virDomainLeaseDefPtr lease);
|
||||||
int qemuDomainDetachLease(struct qemud_driver *driver,
|
int qemuDomainDetachLease(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainLeaseDefPtr lease);
|
virDomainLeaseDefPtr lease);
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
static qemuMigrationCookieGraphicsPtr
|
static qemuMigrationCookieGraphicsPtr
|
||||||
qemuMigrationCookieGraphicsAlloc(struct qemud_driver *driver,
|
qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
|
||||||
virDomainGraphicsDefPtr def)
|
virDomainGraphicsDefPtr def)
|
||||||
{
|
{
|
||||||
qemuMigrationCookieGraphicsPtr mig = NULL;
|
qemuMigrationCookieGraphicsPtr mig = NULL;
|
||||||
@ -304,7 +304,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
static qemuMigrationCookieNetworkPtr
|
static qemuMigrationCookieNetworkPtr
|
||||||
qemuMigrationCookieNetworkAlloc(struct qemud_driver *driver ATTRIBUTE_UNUSED,
|
qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
qemuMigrationCookieNetworkPtr mig;
|
qemuMigrationCookieNetworkPtr mig;
|
||||||
@ -394,7 +394,7 @@ error:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
|
qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom)
|
virDomainObjPtr dom)
|
||||||
{
|
{
|
||||||
if (mig->flags & QEMU_MIGRATION_COOKIE_GRAPHICS) {
|
if (mig->flags & QEMU_MIGRATION_COOKIE_GRAPHICS) {
|
||||||
@ -418,7 +418,7 @@ qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieAddLockstate(qemuMigrationCookiePtr mig,
|
qemuMigrationCookieAddLockstate(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom)
|
virDomainObjPtr dom)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = dom->privateData;
|
qemuDomainObjPrivatePtr priv = dom->privateData;
|
||||||
@ -472,7 +472,7 @@ qemuMigrationCookieAddPersistent(qemuMigrationCookiePtr mig,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieAddNetwork(qemuMigrationCookiePtr mig,
|
qemuMigrationCookieAddNetwork(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom)
|
virDomainObjPtr dom)
|
||||||
{
|
{
|
||||||
if (mig->flags & QEMU_MIGRATION_COOKIE_NETWORK) {
|
if (mig->flags & QEMU_MIGRATION_COOKIE_NETWORK) {
|
||||||
@ -542,7 +542,7 @@ qemuMigrationCookieNetworkXMLFormat(virBufferPtr buf,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieXMLFormat(struct qemud_driver *driver,
|
qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver,
|
||||||
virBufferPtr buf,
|
virBufferPtr buf,
|
||||||
qemuMigrationCookiePtr mig)
|
qemuMigrationCookiePtr mig)
|
||||||
{
|
{
|
||||||
@ -599,7 +599,7 @@ qemuMigrationCookieXMLFormat(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *qemuMigrationCookieXMLFormatStr(struct qemud_driver *driver,
|
static char *qemuMigrationCookieXMLFormatStr(virQEMUDriverPtr driver,
|
||||||
qemuMigrationCookiePtr mig)
|
qemuMigrationCookiePtr mig)
|
||||||
{
|
{
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
@ -724,7 +724,7 @@ error:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
xmlDocPtr doc,
|
xmlDocPtr doc,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -884,7 +884,7 @@ error:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
|
qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
const char *xml,
|
const char *xml,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -909,7 +909,7 @@ cleanup:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
|
qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom,
|
virDomainObjPtr dom,
|
||||||
char **cookieout,
|
char **cookieout,
|
||||||
int *cookieoutlen,
|
int *cookieoutlen,
|
||||||
@ -949,7 +949,7 @@ qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
|
|||||||
|
|
||||||
|
|
||||||
static qemuMigrationCookiePtr
|
static qemuMigrationCookiePtr
|
||||||
qemuMigrationEatCookie(struct qemud_driver *driver,
|
qemuMigrationEatCookie(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom,
|
virDomainObjPtr dom,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -1012,7 +1012,7 @@ error:
|
|||||||
* talking to the destination in the first place, we are stuck with
|
* talking to the destination in the first place, we are stuck with
|
||||||
* the fact that older servers did not do checks on the source. */
|
* the fact that older servers did not do checks on the source. */
|
||||||
static bool
|
static bool
|
||||||
qemuMigrationIsAllowed(struct qemud_driver *driver, virDomainObjPtr vm,
|
qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
virDomainDefPtr def)
|
virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
int nsnapshots;
|
int nsnapshots;
|
||||||
@ -1103,7 +1103,7 @@ qemuMigrationIsSafe(virDomainDefPtr def)
|
|||||||
* Pause domain for non-live migration.
|
* Pause domain for non-live migration.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuMigrationSetOffline(struct qemud_driver *driver,
|
qemuMigrationSetOffline(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -1125,7 +1125,7 @@ qemuMigrationSetOffline(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
qemuMigrationUpdateJobStatus(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *job,
|
const char *job,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
@ -1215,7 +1215,7 @@ qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm,
|
qemuMigrationWaitForCompletion(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob asyncJob,
|
enum qemuDomainAsyncJob asyncJob,
|
||||||
virConnectPtr dconn)
|
virConnectPtr dconn)
|
||||||
{
|
{
|
||||||
@ -1269,7 +1269,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
|
qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuMigrationCookiePtr cookie)
|
qemuMigrationCookiePtr cookie)
|
||||||
{
|
{
|
||||||
@ -1305,7 +1305,7 @@ qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainMigrateOPDRelocate(struct qemud_driver *driver ATTRIBUTE_UNUSED,
|
qemuDomainMigrateOPDRelocate(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuMigrationCookiePtr cookie)
|
qemuMigrationCookiePtr cookie)
|
||||||
{
|
{
|
||||||
@ -1348,7 +1348,7 @@ cleanup:
|
|||||||
* qemuDomainMigratePerform3 and qemuDomainMigrateConfirm3.
|
* qemuDomainMigratePerform3 and qemuDomainMigrateConfirm3.
|
||||||
*/
|
*/
|
||||||
virDomainObjPtr
|
virDomainObjPtr
|
||||||
qemuMigrationCleanup(struct qemud_driver *driver,
|
qemuMigrationCleanup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn)
|
virConnectPtr conn)
|
||||||
{
|
{
|
||||||
@ -1403,7 +1403,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The caller is supposed to lock the vm and start a migration job. */
|
/* The caller is supposed to lock the vm and start a migration job. */
|
||||||
char *qemuMigrationBegin(struct qemud_driver *driver,
|
char *qemuMigrationBegin(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
const char *dname,
|
const char *dname,
|
||||||
@ -1473,7 +1473,7 @@ cleanup:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuMigrationPrepareCleanup(struct qemud_driver *driver,
|
qemuMigrationPrepareCleanup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
@ -1490,7 +1490,7 @@ qemuMigrationPrepareCleanup(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationPrepareAny(struct qemud_driver *driver,
|
qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -1700,7 +1700,7 @@ endjob:
|
|||||||
* sets up the corresponding virStream to handle the incoming data.
|
* sets up the corresponding virStream to handle the incoming data.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -1728,7 +1728,7 @@ qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -2075,7 +2075,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationConnect(struct qemud_driver *driver,
|
qemuMigrationConnect(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuMigrationSpecPtr spec)
|
qemuMigrationSpecPtr spec)
|
||||||
{
|
{
|
||||||
@ -2113,7 +2113,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationRun(struct qemud_driver *driver,
|
qemuMigrationRun(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -2327,7 +2327,7 @@ cancel:
|
|||||||
/* Perform migration using QEMU's native TCP migrate support,
|
/* Perform migration using QEMU's native TCP migrate support,
|
||||||
* not encrypted obviously
|
* not encrypted obviously
|
||||||
*/
|
*/
|
||||||
static int doNativeMigrate(struct qemud_driver *driver,
|
static int doNativeMigrate(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *uri,
|
const char *uri,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -2383,7 +2383,7 @@ static int doNativeMigrate(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int doTunnelMigrate(struct qemud_driver *driver,
|
static int doTunnelMigrate(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virStreamPtr st,
|
virStreamPtr st,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -2474,7 +2474,7 @@ cleanup:
|
|||||||
* from libvirt.c, but running in source libvirtd context,
|
* from libvirt.c, but running in source libvirtd context,
|
||||||
* instead of client app context & also adding in tunnel
|
* instead of client app context & also adding in tunnel
|
||||||
* handling */
|
* handling */
|
||||||
static int doPeer2PeerMigrate2(struct qemud_driver *driver,
|
static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
|
||||||
virConnectPtr sconn ATTRIBUTE_UNUSED,
|
virConnectPtr sconn ATTRIBUTE_UNUSED,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
@ -2612,7 +2612,7 @@ cleanup:
|
|||||||
* from libvirt.c, but running in source libvirtd context,
|
* from libvirt.c, but running in source libvirtd context,
|
||||||
* instead of client app context & also adding in tunnel
|
* instead of client app context & also adding in tunnel
|
||||||
* handling */
|
* handling */
|
||||||
static int doPeer2PeerMigrate3(struct qemud_driver *driver,
|
static int doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
||||||
virConnectPtr sconn,
|
virConnectPtr sconn,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
@ -2802,7 +2802,7 @@ finish:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int doPeer2PeerMigrate(struct qemud_driver *driver,
|
static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
||||||
virConnectPtr sconn,
|
virConnectPtr sconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
@ -2898,7 +2898,7 @@ cleanup:
|
|||||||
* perform phase of v2 non-peer2peer migration.
|
* perform phase of v2 non-peer2peer migration.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuMigrationPerformJob(struct qemud_driver *driver,
|
qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
@ -3012,7 +3012,7 @@ cleanup:
|
|||||||
* This implements perform phase of v3 migration protocol.
|
* This implements perform phase of v3 migration protocol.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuMigrationPerformPhase(struct qemud_driver *driver,
|
qemuMigrationPerformPhase(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *uri,
|
const char *uri,
|
||||||
@ -3093,7 +3093,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMigrationPerform(struct qemud_driver *driver,
|
qemuMigrationPerform(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
@ -3200,7 +3200,7 @@ err_exit:
|
|||||||
|
|
||||||
|
|
||||||
virDomainPtr
|
virDomainPtr
|
||||||
qemuMigrationFinish(struct qemud_driver *driver,
|
qemuMigrationFinish(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -3404,7 +3404,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuMigrationConfirm(struct qemud_driver *driver,
|
int qemuMigrationConfirm(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -3477,7 +3477,7 @@ cleanup:
|
|||||||
|
|
||||||
/* Helper function called while driver lock is held and vm is active. */
|
/* Helper function called while driver lock is held and vm is active. */
|
||||||
int
|
int
|
||||||
qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
|
qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
int fd, off_t offset, const char *path,
|
int fd, off_t offset, const char *path,
|
||||||
const char *compressor,
|
const char *compressor,
|
||||||
bool bypassSecurityDriver,
|
bool bypassSecurityDriver,
|
||||||
@ -3639,7 +3639,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMigrationJobStart(struct qemud_driver *driver,
|
qemuMigrationJobStart(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob job)
|
enum qemuDomainAsyncJob job)
|
||||||
{
|
{
|
||||||
@ -3662,7 +3662,7 @@ qemuMigrationJobStart(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuMigrationJobPhase phase)
|
enum qemuMigrationJobPhase phase)
|
||||||
{
|
{
|
||||||
@ -3679,7 +3679,7 @@ qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuMigrationJobStartPhase(struct qemud_driver *driver,
|
qemuMigrationJobStartPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuMigrationJobPhase phase)
|
enum qemuMigrationJobPhase phase)
|
||||||
{
|
{
|
||||||
@ -3715,7 +3715,7 @@ qemuMigrationJobIsActive(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
qemuMigrationJobFinish(struct qemud_driver *driver, virDomainObjPtr vm)
|
qemuMigrationJobFinish(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
return qemuDomainObjEndAsyncJob(driver, vm);
|
return qemuDomainObjEndAsyncJob(driver, vm);
|
||||||
}
|
}
|
||||||
|
@ -54,15 +54,15 @@ enum qemuMigrationJobPhase {
|
|||||||
};
|
};
|
||||||
VIR_ENUM_DECL(qemuMigrationJobPhase)
|
VIR_ENUM_DECL(qemuMigrationJobPhase)
|
||||||
|
|
||||||
int qemuMigrationJobStart(struct qemud_driver *driver,
|
int qemuMigrationJobStart(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob job)
|
enum qemuDomainAsyncJob job)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
void qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
void qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuMigrationJobPhase phase)
|
enum qemuMigrationJobPhase phase)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void qemuMigrationJobStartPhase(struct qemud_driver *driver,
|
void qemuMigrationJobStartPhase(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
enum qemuMigrationJobPhase phase)
|
enum qemuMigrationJobPhase phase)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
@ -71,17 +71,17 @@ bool qemuMigrationJobContinue(virDomainObjPtr obj)
|
|||||||
bool qemuMigrationJobIsActive(virDomainObjPtr vm,
|
bool qemuMigrationJobIsActive(virDomainObjPtr vm,
|
||||||
enum qemuDomainAsyncJob job)
|
enum qemuDomainAsyncJob job)
|
||||||
ATTRIBUTE_NONNULL(1);
|
ATTRIBUTE_NONNULL(1);
|
||||||
bool qemuMigrationJobFinish(struct qemud_driver *driver, virDomainObjPtr obj)
|
bool qemuMigrationJobFinish(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int qemuMigrationSetOffline(struct qemud_driver *driver,
|
int qemuMigrationSetOffline(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
virDomainObjPtr qemuMigrationCleanup(struct qemud_driver *driver,
|
virDomainObjPtr qemuMigrationCleanup(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
|
|
||||||
char *qemuMigrationBegin(struct qemud_driver *driver,
|
char *qemuMigrationBegin(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
const char *dname,
|
const char *dname,
|
||||||
@ -89,7 +89,7 @@ char *qemuMigrationBegin(struct qemud_driver *driver,
|
|||||||
int *cookieoutlen,
|
int *cookieoutlen,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
|
|
||||||
int qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
int qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -99,7 +99,7 @@ int qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
|||||||
const char *dname,
|
const char *dname,
|
||||||
const char *dom_xml);
|
const char *dom_xml);
|
||||||
|
|
||||||
int qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
int qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
@ -110,7 +110,7 @@ int qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
|||||||
const char *dname,
|
const char *dname,
|
||||||
const char *dom_xml);
|
const char *dom_xml);
|
||||||
|
|
||||||
int qemuMigrationPerform(struct qemud_driver *driver,
|
int qemuMigrationPerform(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *xmlin,
|
const char *xmlin,
|
||||||
@ -125,7 +125,7 @@ int qemuMigrationPerform(struct qemud_driver *driver,
|
|||||||
unsigned long resource,
|
unsigned long resource,
|
||||||
bool v3proto);
|
bool v3proto);
|
||||||
|
|
||||||
virDomainPtr qemuMigrationFinish(struct qemud_driver *driver,
|
virDomainPtr qemuMigrationFinish(virQEMUDriverPtr driver,
|
||||||
virConnectPtr dconn,
|
virConnectPtr dconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -136,7 +136,7 @@ virDomainPtr qemuMigrationFinish(struct qemud_driver *driver,
|
|||||||
int retcode,
|
int retcode,
|
||||||
bool v3proto);
|
bool v3proto);
|
||||||
|
|
||||||
int qemuMigrationConfirm(struct qemud_driver *driver,
|
int qemuMigrationConfirm(virQEMUDriverPtr driver,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
@ -145,7 +145,7 @@ int qemuMigrationConfirm(struct qemud_driver *driver,
|
|||||||
int retcode);
|
int retcode);
|
||||||
|
|
||||||
|
|
||||||
int qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
|
int qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
int fd, off_t offset, const char *path,
|
int fd, off_t offset, const char *path,
|
||||||
const char *compressor,
|
const char *compressor,
|
||||||
bool bypassSecurityDriver,
|
bool bypassSecurityDriver,
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
* Returns 0 on success
|
* Returns 0 on success
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuProcessRemoveDomainStatus(struct qemud_driver *driver,
|
qemuProcessRemoveDomainStatus(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
@ -108,7 +108,7 @@ qemuProcessRemoveDomainStatus(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
/* XXX figure out how to remove this */
|
/* XXX figure out how to remove this */
|
||||||
extern struct qemud_driver *qemu_driver;
|
extern virQEMUDriverPtr qemu_driver;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a callback registered with a qemuAgentPtr instance,
|
* This is a callback registered with a qemuAgentPtr instance,
|
||||||
@ -120,7 +120,7 @@ static void
|
|||||||
qemuProcessHandleAgentEOF(qemuAgentPtr agent,
|
qemuProcessHandleAgentEOF(qemuAgentPtr agent,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
VIR_DEBUG("Received EOF from agent on %p '%s'", vm, vm->def->name);
|
VIR_DEBUG("Received EOF from agent on %p '%s'", vm, vm->def->name);
|
||||||
@ -149,7 +149,7 @@ static void
|
|||||||
qemuProcessHandleAgentError(qemuAgentPtr agent ATTRIBUTE_UNUSED,
|
qemuProcessHandleAgentError(qemuAgentPtr agent ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
VIR_DEBUG("Received error from agent on %p '%s'", vm, vm->def->name);
|
VIR_DEBUG("Received error from agent on %p '%s'", vm, vm->def->name);
|
||||||
@ -202,7 +202,7 @@ qemuFindAgentConfig(virDomainDefPtr def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuConnectAgent(struct qemud_driver *driver, virDomainObjPtr vm)
|
qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -273,7 +273,7 @@ static void
|
|||||||
qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
int eventReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
int eventReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
||||||
@ -336,7 +336,7 @@ static void
|
|||||||
qemuProcessHandleMonitorError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandleMonitorError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
|
|
||||||
VIR_DEBUG("Received error on %p '%s'", vm, vm->def->name);
|
VIR_DEBUG("Received error on %p '%s'", vm, vm->def->name);
|
||||||
@ -505,7 +505,7 @@ static int
|
|||||||
qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event;
|
virDomainEventPtr event;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
static void
|
static void
|
||||||
qemuProcessFakeReboot(void *opaque)
|
qemuProcessFakeReboot(void *opaque)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainObjPtr vm = opaque;
|
virDomainObjPtr vm = opaque;
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
@ -604,7 +604,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuProcessShutdownOrReboot(struct qemud_driver *driver,
|
qemuProcessShutdownOrReboot(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
@ -631,7 +631,7 @@ static int
|
|||||||
qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
|
|
||||||
@ -687,7 +687,7 @@ static int
|
|||||||
qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
|
|
||||||
virDomainObjLock(vm);
|
virDomainObjLock(vm);
|
||||||
@ -736,7 +736,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
long long offset)
|
long long offset)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event;
|
virDomainEventPtr event;
|
||||||
|
|
||||||
virDomainObjLock(vm);
|
virDomainObjLock(vm);
|
||||||
@ -765,7 +765,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
int action)
|
int action)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr watchdogEvent = NULL;
|
virDomainEventPtr watchdogEvent = NULL;
|
||||||
virDomainEventPtr lifecycleEvent = NULL;
|
virDomainEventPtr lifecycleEvent = NULL;
|
||||||
|
|
||||||
@ -835,7 +835,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
int action,
|
int action,
|
||||||
const char *reason)
|
const char *reason)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr ioErrorEvent = NULL;
|
virDomainEventPtr ioErrorEvent = NULL;
|
||||||
virDomainEventPtr ioErrorEvent2 = NULL;
|
virDomainEventPtr ioErrorEvent2 = NULL;
|
||||||
virDomainEventPtr lifecycleEvent = NULL;
|
virDomainEventPtr lifecycleEvent = NULL;
|
||||||
@ -898,7 +898,7 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
int type,
|
int type,
|
||||||
int status)
|
int status)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
const char *path;
|
const char *path;
|
||||||
virDomainDiskDefPtr disk;
|
virDomainDiskDefPtr disk;
|
||||||
@ -950,7 +950,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
const char *x509dname,
|
const char *x509dname,
|
||||||
const char *saslUsername)
|
const char *saslUsername)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event;
|
virDomainEventPtr event;
|
||||||
virDomainEventGraphicsAddressPtr localAddr = NULL;
|
virDomainEventGraphicsAddressPtr localAddr = NULL;
|
||||||
virDomainEventGraphicsAddressPtr remoteAddr = NULL;
|
virDomainEventGraphicsAddressPtr remoteAddr = NULL;
|
||||||
@ -1039,7 +1039,7 @@ qemuProcessHandleTrayChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
const char *devAlias,
|
const char *devAlias,
|
||||||
int reason)
|
int reason)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
virDomainDiskDefPtr disk;
|
virDomainDiskDefPtr disk;
|
||||||
|
|
||||||
@ -1077,7 +1077,7 @@ static int
|
|||||||
qemuProcessHandlePMWakeup(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandlePMWakeup(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
virDomainEventPtr lifecycleEvent = NULL;
|
virDomainEventPtr lifecycleEvent = NULL;
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ static int
|
|||||||
qemuProcessHandlePMSuspend(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandlePMSuspend(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
virDomainEventPtr lifecycleEvent = NULL;
|
virDomainEventPtr lifecycleEvent = NULL;
|
||||||
|
|
||||||
@ -1168,7 +1168,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
unsigned long long actual)
|
unsigned long long actual)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event;
|
virDomainEventPtr event;
|
||||||
|
|
||||||
virDomainObjLock(vm);
|
virDomainObjLock(vm);
|
||||||
@ -1196,7 +1196,7 @@ static int
|
|||||||
qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
struct qemud_driver *driver = qemu_driver;
|
virQEMUDriverPtr driver = qemu_driver;
|
||||||
virDomainEventPtr event = NULL;
|
virDomainEventPtr event = NULL;
|
||||||
virDomainEventPtr lifecycleEvent = NULL;
|
virDomainEventPtr lifecycleEvent = NULL;
|
||||||
|
|
||||||
@ -1260,7 +1260,7 @@ static qemuMonitorCallbacks monitorCallbacks = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
|
qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -1634,7 +1634,7 @@ qemuProcessReadLogFD(int logfd, char *buf, int maxlen, int off)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessWaitForMonitor(struct qemud_driver* driver,
|
qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuCapsPtr caps,
|
qemuCapsPtr caps,
|
||||||
off_t pos)
|
off_t pos)
|
||||||
@ -1709,7 +1709,7 @@ closelog:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessDetectVcpuPIDs(struct qemud_driver *driver,
|
qemuProcessDetectVcpuPIDs(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
pid_t *cpupids = NULL;
|
pid_t *cpupids = NULL;
|
||||||
@ -1898,7 +1898,7 @@ qemuGetNumadAdvice(virDomainDefPtr def ATTRIBUTE_UNUSED)
|
|||||||
* just return a new allocated bitmap.
|
* just return a new allocated bitmap.
|
||||||
*/
|
*/
|
||||||
virBitmapPtr
|
virBitmapPtr
|
||||||
qemuPrepareCpumap(struct qemud_driver *driver,
|
qemuPrepareCpumap(virQEMUDriverPtr driver,
|
||||||
virBitmapPtr nodemask)
|
virBitmapPtr nodemask)
|
||||||
{
|
{
|
||||||
int i, hostcpus, maxcpu = QEMUD_CPUMASK_LEN;
|
int i, hostcpus, maxcpu = QEMUD_CPUMASK_LEN;
|
||||||
@ -1943,7 +1943,7 @@ qemuPrepareCpumap(struct qemud_driver *driver,
|
|||||||
* To be run between fork/exec of QEMU only
|
* To be run between fork/exec of QEMU only
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuProcessInitCpuAffinity(struct qemud_driver *driver,
|
qemuProcessInitCpuAffinity(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virBitmapPtr nodemask)
|
virBitmapPtr nodemask)
|
||||||
{
|
{
|
||||||
@ -2073,7 +2073,7 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessInitPasswords(virConnectPtr conn,
|
qemuProcessInitPasswords(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -2497,7 +2497,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessInitPCIAddresses(struct qemud_driver *driver,
|
qemuProcessInitPCIAddresses(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
@ -2518,7 +2518,7 @@ qemuProcessInitPCIAddresses(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int qemuProcessNextFreePort(struct qemud_driver *driver,
|
static int qemuProcessNextFreePort(virQEMUDriverPtr driver,
|
||||||
int startPort)
|
int startPort)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -2573,7 +2573,7 @@ static int qemuProcessNextFreePort(struct qemud_driver *driver,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuProcessReturnPort(struct qemud_driver *driver,
|
qemuProcessReturnPort(virQEMUDriverPtr driver,
|
||||||
int port)
|
int port)
|
||||||
{
|
{
|
||||||
if (port < driver->remotePortMin)
|
if (port < driver->remotePortMin)
|
||||||
@ -2609,7 +2609,7 @@ qemuProcessPrepareChardevDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessLimits(struct qemud_driver *driver)
|
qemuProcessLimits(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
|
|
||||||
@ -2642,7 +2642,7 @@ qemuProcessLimits(struct qemud_driver *driver)
|
|||||||
struct qemuProcessHookData {
|
struct qemuProcessHookData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
struct qemud_driver *driver;
|
virQEMUDriverPtr driver;
|
||||||
virBitmapPtr nodemask;
|
virBitmapPtr nodemask;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2706,7 +2706,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
qemuProcessPrepareMonitorChr(virQEMUDriverPtr driver,
|
||||||
virDomainChrSourceDefPtr monConfig,
|
virDomainChrSourceDefPtr monConfig,
|
||||||
const char *vm)
|
const char *vm)
|
||||||
{
|
{
|
||||||
@ -2729,7 +2729,7 @@ qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
|||||||
* {Enter,Exit}MonitorWithDriver
|
* {Enter,Exit}MonitorWithDriver
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
qemuProcessStartCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
qemuProcessStartCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
virConnectPtr conn, virDomainRunningReason reason,
|
virConnectPtr conn, virDomainRunningReason reason,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
@ -2765,7 +2765,7 @@ qemuProcessStartCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int qemuProcessStopCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
int qemuProcessStopCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||||
virDomainPausedReason reason,
|
virDomainPausedReason reason,
|
||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
@ -2829,7 +2829,7 @@ qemuProcessFiltersInstantiate(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessUpdateState(struct qemud_driver *driver, virDomainObjPtr vm)
|
qemuProcessUpdateState(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
virDomainState state;
|
virDomainState state;
|
||||||
@ -2890,7 +2890,7 @@ qemuProcessUpdateState(struct qemud_driver *driver, virDomainObjPtr vm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessRecoverMigration(struct qemud_driver *driver,
|
qemuProcessRecoverMigration(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
enum qemuDomainAsyncJob job,
|
enum qemuDomainAsyncJob job,
|
||||||
@ -3002,7 +3002,7 @@ qemuProcessRecoverMigration(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuProcessRecoverJob(struct qemud_driver *driver,
|
qemuProcessRecoverJob(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
const struct qemuDomainJobObj *job)
|
const struct qemuDomainJobObj *job)
|
||||||
@ -3095,7 +3095,7 @@ qemuProcessRecoverJob(struct qemud_driver *driver,
|
|||||||
|
|
||||||
struct qemuProcessReconnectData {
|
struct qemuProcessReconnectData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
struct qemud_driver *driver;
|
virQEMUDriverPtr driver;
|
||||||
void *payload;
|
void *payload;
|
||||||
struct qemuDomainJobObj oldjob;
|
struct qemuDomainJobObj oldjob;
|
||||||
};
|
};
|
||||||
@ -3111,7 +3111,7 @@ static void
|
|||||||
qemuProcessReconnect(void *opaque)
|
qemuProcessReconnect(void *opaque)
|
||||||
{
|
{
|
||||||
struct qemuProcessReconnectData *data = opaque;
|
struct qemuProcessReconnectData *data = opaque;
|
||||||
struct qemud_driver *driver = data->driver;
|
virQEMUDriverPtr driver = data->driver;
|
||||||
virDomainObjPtr obj = data->payload;
|
virDomainObjPtr obj = data->payload;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
virConnectPtr conn = data->conn;
|
virConnectPtr conn = data->conn;
|
||||||
@ -3370,14 +3370,14 @@ error:
|
|||||||
* about.
|
* about.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
qemuProcessReconnectAll(virConnectPtr conn, struct qemud_driver *driver)
|
qemuProcessReconnectAll(virConnectPtr conn, virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
struct qemuProcessReconnectData data = {.conn = conn, .driver = driver};
|
struct qemuProcessReconnectData data = {.conn = conn, .driver = driver};
|
||||||
virHashForEach(driver->domains.objs, qemuProcessReconnectHelper, &data);
|
virHashForEach(driver->domains.objs, qemuProcessReconnectHelper, &data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuProcessStart(virConnectPtr conn,
|
int qemuProcessStart(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *migrateFrom,
|
const char *migrateFrom,
|
||||||
int stdin_fd,
|
int stdin_fd,
|
||||||
@ -3931,7 +3931,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuProcessKill(struct qemud_driver *driver,
|
qemuProcessKill(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm, unsigned int flags)
|
virDomainObjPtr vm, unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -3971,7 +3971,7 @@ qemuProcessKill(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void qemuProcessStop(struct qemud_driver *driver,
|
void qemuProcessStop(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainShutoffReason reason,
|
virDomainShutoffReason reason,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -4196,7 +4196,7 @@ retry:
|
|||||||
|
|
||||||
|
|
||||||
int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
|
int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
pid_t pid,
|
pid_t pid,
|
||||||
const char *pidfile,
|
const char *pidfile,
|
||||||
@ -4410,7 +4410,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
static virDomainObjPtr
|
static virDomainObjPtr
|
||||||
qemuProcessAutoDestroy(struct qemud_driver *driver,
|
qemuProcessAutoDestroy(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr dom,
|
virDomainObjPtr dom,
|
||||||
virConnectPtr conn)
|
virConnectPtr conn)
|
||||||
{
|
{
|
||||||
@ -4448,7 +4448,7 @@ cleanup:
|
|||||||
return dom;
|
return dom;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
int qemuProcessAutoDestroyAdd(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn)
|
virConnectPtr conn)
|
||||||
{
|
{
|
||||||
@ -4457,14 +4457,14 @@ int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
|||||||
qemuProcessAutoDestroy);
|
qemuProcessAutoDestroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemuProcessAutoDestroyRemove(struct qemud_driver *driver,
|
int qemuProcessAutoDestroyRemove(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
VIR_DEBUG("vm=%s", vm->def->name);
|
VIR_DEBUG("vm=%s", vm->def->name);
|
||||||
return qemuDriverCloseCallbackUnset(driver, vm, qemuProcessAutoDestroy);
|
return qemuDriverCloseCallbackUnset(driver, vm, qemuProcessAutoDestroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool qemuProcessAutoDestroyActive(struct qemud_driver *driver,
|
bool qemuProcessAutoDestroyActive(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
qemuDriverCloseCallback cb;
|
qemuDriverCloseCallback cb;
|
||||||
|
@ -25,22 +25,22 @@
|
|||||||
# include "qemu_conf.h"
|
# include "qemu_conf.h"
|
||||||
# include "qemu_domain.h"
|
# include "qemu_domain.h"
|
||||||
|
|
||||||
int qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
int qemuProcessPrepareMonitorChr(virQEMUDriverPtr driver,
|
||||||
virDomainChrSourceDefPtr monConfig,
|
virDomainChrSourceDefPtr monConfig,
|
||||||
const char *vm);
|
const char *vm);
|
||||||
|
|
||||||
int qemuProcessStartCPUs(struct qemud_driver *driver,
|
int qemuProcessStartCPUs(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn,
|
virConnectPtr conn,
|
||||||
virDomainRunningReason reason,
|
virDomainRunningReason reason,
|
||||||
enum qemuDomainAsyncJob asyncJob);
|
enum qemuDomainAsyncJob asyncJob);
|
||||||
int qemuProcessStopCPUs(struct qemud_driver *driver,
|
int qemuProcessStopCPUs(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainPausedReason reason,
|
virDomainPausedReason reason,
|
||||||
enum qemuDomainAsyncJob asyncJob);
|
enum qemuDomainAsyncJob asyncJob);
|
||||||
|
|
||||||
void qemuProcessAutostartAll(struct qemud_driver *driver);
|
void qemuProcessAutostartAll(virQEMUDriverPtr driver);
|
||||||
void qemuProcessReconnectAll(virConnectPtr conn, struct qemud_driver *driver);
|
void qemuProcessReconnectAll(virConnectPtr conn, virQEMUDriverPtr driver);
|
||||||
|
|
||||||
int qemuProcessAssignPCIAddresses(virDomainDefPtr def);
|
int qemuProcessAssignPCIAddresses(virDomainDefPtr def);
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ typedef enum {
|
|||||||
} qemuProcessStartFlags;
|
} qemuProcessStartFlags;
|
||||||
|
|
||||||
int qemuProcessStart(virConnectPtr conn,
|
int qemuProcessStart(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *migrateFrom,
|
const char *migrateFrom,
|
||||||
int stdin_fd,
|
int stdin_fd,
|
||||||
@ -65,13 +65,13 @@ typedef enum {
|
|||||||
VIR_QEMU_PROCESS_STOP_NO_RELABEL = 1 << 1,
|
VIR_QEMU_PROCESS_STOP_NO_RELABEL = 1 << 1,
|
||||||
} qemuProcessStopFlags;
|
} qemuProcessStopFlags;
|
||||||
|
|
||||||
void qemuProcessStop(struct qemud_driver *driver,
|
void qemuProcessStop(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainShutoffReason reason,
|
virDomainShutoffReason reason,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
int qemuProcessAttach(virConnectPtr conn,
|
int qemuProcessAttach(virConnectPtr conn,
|
||||||
struct qemud_driver *driver,
|
virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
pid_t pid,
|
pid_t pid,
|
||||||
const char *pidfile,
|
const char *pidfile,
|
||||||
@ -84,19 +84,19 @@ typedef enum {
|
|||||||
VIR_QEMU_PROCESS_KILL_NOCHECK = 1 << 2, /* bypass the running vm check */
|
VIR_QEMU_PROCESS_KILL_NOCHECK = 1 << 2, /* bypass the running vm check */
|
||||||
} virQemuProcessKillMode;
|
} virQemuProcessKillMode;
|
||||||
|
|
||||||
int qemuProcessKill(struct qemud_driver *driver,
|
int qemuProcessKill(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm, unsigned int flags);
|
virDomainObjPtr vm, unsigned int flags);
|
||||||
|
|
||||||
int qemuProcessAutoDestroyInit(struct qemud_driver *driver);
|
int qemuProcessAutoDestroyInit(virQEMUDriverPtr driver);
|
||||||
void qemuProcessAutoDestroyShutdown(struct qemud_driver *driver);
|
void qemuProcessAutoDestroyShutdown(virQEMUDriverPtr driver);
|
||||||
int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
int qemuProcessAutoDestroyAdd(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
int qemuProcessAutoDestroyRemove(struct qemud_driver *driver,
|
int qemuProcessAutoDestroyRemove(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
bool qemuProcessAutoDestroyActive(struct qemud_driver *driver,
|
bool qemuProcessAutoDestroyActive(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
virBitmapPtr qemuPrepareCpumap(struct qemud_driver *driver,
|
virBitmapPtr qemuPrepareCpumap(virQEMUDriverPtr driver,
|
||||||
virBitmapPtr nodemask);
|
virBitmapPtr nodemask);
|
||||||
|
|
||||||
#endif /* __QEMU_PROCESS_H__ */
|
#endif /* __QEMU_PROCESS_H__ */
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# include "qemu/qemu_domain.h"
|
# include "qemu/qemu_domain.h"
|
||||||
# include "testutilsqemu.h"
|
# include "testutilsqemu.h"
|
||||||
|
|
||||||
static struct qemud_driver driver;
|
static virQEMUDriver driver;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
testCompareXMLToXMLFiles(const char *inxml, const char *uuid, int internal)
|
testCompareXMLToXMLFiles(const char *inxml, const char *uuid, int internal)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# include "testutilsqemu.h"
|
# include "testutilsqemu.h"
|
||||||
|
|
||||||
static struct qemud_driver driver;
|
static virQEMUDriver driver;
|
||||||
|
|
||||||
static int blankProblemElements(char *data)
|
static int blankProblemElements(char *data)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# include "testutilsqemu.h"
|
# include "testutilsqemu.h"
|
||||||
|
|
||||||
static const char *abs_top_srcdir;
|
static const char *abs_top_srcdir;
|
||||||
static struct qemud_driver driver;
|
static virQEMUDriver driver;
|
||||||
|
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
fakeSecretGetValue(virSecretPtr obj ATTRIBUTE_UNUSED,
|
fakeSecretGetValue(virSecretPtr obj ATTRIBUTE_UNUSED,
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# include "qemu/qemu_domain.h"
|
# include "qemu/qemu_domain.h"
|
||||||
# include "testutilsqemu.h"
|
# include "testutilsqemu.h"
|
||||||
|
|
||||||
static struct qemud_driver driver;
|
static virQEMUDriver driver;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
|
testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# include "testutilsqemu.h"
|
# include "testutilsqemu.h"
|
||||||
|
|
||||||
static const char *abs_top_srcdir;
|
static const char *abs_top_srcdir;
|
||||||
static struct qemud_driver driver;
|
static virQEMUDriver driver;
|
||||||
|
|
||||||
static int testCompareXMLToArgvFiles(const char *xml,
|
static int testCompareXMLToArgvFiles(const char *xml,
|
||||||
const char *cmdline,
|
const char *cmdline,
|
||||||
|
Loading…
Reference in New Issue
Block a user