[libvirt] [PATCH 0/3] Speeding up the wait for session daemon
by Martin Kletzander
When the session daemon is spawned and ends with an error before the
spawning process notices, it becomes waiting for Godot (fortunately
with a timeout of about 20 seconds). With this series, there is
pidfile created for the spawned daemon and the pid is being checked
for to make sure we are not wasting precious time.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=927369
Martin Kletzander (3):
Add missing error reporting
Move daemonPidFilePath into virutil.c
Speed up waiting for the session daemon
daemon/libvirtd.c | 43 +++----------------------------------------
src/libvirt_private.syms | 1 +
src/rpc/virnetsocket.c | 41 +++++++++++++++++++++++++++++++++++------
src/util/virutil.c | 45 ++++++++++++++++++++++++++++++++++++++++++++-
src/util/virutil.h | 4 ++++
5 files changed, 87 insertions(+), 47 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] Add USER support to virt-sandbox-service
by dwalsh@redhat.com
This patch set is adding support for UID/GID/USERNAME/USERDIR for use with openshift
containers
[sandbox PATCH 1/6] Add UID/GID support for use with interactive
[sandbox PATCH 2/6] We should not turn on the sanbox shell by
[sandbox PATCH 3/6] Only create the destination directory if it does
[sandbox PATCH 4/6] Add support for --homedir and --username setting
[sandbox PATCH 5/6] Add support for --uid, --gid, --username,
[sandbox PATCH 6/6] Update man page to document current
11 years, 7 months
[libvirt] [PATCH] Reusing the result of virArchFromHost instead of calling it multiple times
by Tal Kain
Signed-off-by: Tal Kain <tal.kain(a)ravellosystems.com>
---
src/qemu/qemu_capabilities.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 50712b0..b235059 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -860,8 +860,8 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
{
virCapsPtr caps;
int i;
-
- if ((caps = virCapabilitiesNew(virArchFromHost(),
+ virArch hostarch = virArchFromHost();
+ if ((caps = virCapabilitiesNew(hostarch,
1, 1)) == NULL)
goto error;
@@ -874,7 +874,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
- if (virQEMUCapsInitCPU(caps, virArchFromHost()) < 0)
+ if (virQEMUCapsInitCPU(caps, hostarch) < 0)
VIR_WARN("Failed to get host CPU");
/* Add the power management features of the host */
@@ -891,7 +891,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
*/
for (i = 0 ; i < VIR_ARCH_LAST ; i++)
if (virQEMUCapsInitGuest(caps, cache,
- virArchFromHost(),
+ hostarch,
i) < 0)
goto error;
@@ -1639,13 +1639,14 @@ int virQEMUCapsGetDefaultVersion(virCapsPtr caps,
if (*version > 0)
return 0;
+ virArch hostarch = virArchFromHost();
if ((binary = virCapabilitiesDefaultGuestEmulator(caps,
"hvm",
- virArchFromHost(),
+ hostarch,
"qemu")) == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot find suitable emulator for %s"),
- virArchToString(virArchFromHost()));
+ virArchToString(hostarch));
return -1;
}
--
1.7.9.5
11 years, 7 months
[libvirt] libvirt-1.0.3 vs qemu-1.4
by Yin Olivia-R63875
Hi guys,
I used to go through libvirt (1.0.3) use cases with qemu-1.0 + linux-3.0.43.
Recently I tried Linux-3.8.4 + qemu-1.4. But it can't start qemu domain.
---------------------------------
root@p1022ds:~# virsh version
Compiled against library: libvirt 1.0.3
Using library: libvirt 1.0.3
Using API: QEMU 1.0.3
Running hypervisor: QEMU 1.4.0
root@p1022ds:~# cat test.args
/usr/bin/qemu-system-ppc -name test -M mpc8544ds -enable-kvm -m 256 -nographic -kernel /media/ram/uImage -initrd /media/ram/ramdisk -append "root=/dev/ram rw console=ttyS0,115200" -serial pty
root@p1022ds:~# virsh domxml-from-native qemu-argv test.args >test.xml
root@p1022ds:~# virsh define test.xml
Domain test defined from test.xml
root@p1022ds:~# virsh start test
error: Failed to start domain test
error: internal error no assigned pty for device charserial0
---------------------------------
I don't know if it depends on qemu version or kernel config.
Do you have any idea about this issue?
Best Regards,
Olivia
11 years, 7 months
[libvirt] [PATCH] Switch to a more extensible annotation system for RPC protocols
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Currently the RPC protocol files can contain annotations after
the protocol enum eg
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */
This is not very extensible as the number of annotations grows.
Change it to use
/**
* @generate: both
* @priority: high
*/
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247,
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/locking/lock_protocol.x | 68 +-
src/remote/lxc_protocol.x | 39 +-
src/remote/qemu_protocol.x | 51 +-
src/remote/remote_protocol.x | 1832 +++++++++++++++++++++++++++++++++---------
src/rpc/gendispatch.pl | 67 +-
5 files changed, 1638 insertions(+), 419 deletions(-)
diff --git a/src/locking/lock_protocol.x b/src/locking/lock_protocol.x
index 5f40f9a..aef928e 100644
--- a/src/locking/lock_protocol.x
+++ b/src/locking/lock_protocol.x
@@ -77,19 +77,63 @@ const VIR_LOCK_SPACE_PROTOCOL_PROGRAM = 0xEA7BEEF;
const VIR_LOCK_SPACE_PROTOCOL_PROGRAM_VERSION = 1;
enum virLockSpaceProtocolProcedure {
- /* Each function must have a two-word comment. The first word is
- * whether remote_generator.pl handles daemon, the second whether
- * it handles src/remote. Additional flags can be specified after a
- * pipe.
+ /* Each function must be preceeded by a comment providing one or
+ * more annotations:
+ *
+ * - @generate: none|client|server|both
+ *
+ * Whether to generate the dispatch stubs for the server
+ * and/or client code.
+ *
+ * - @readstream: paramnumber
+ * - @writestream: paramnumber
+ *
+ * The @readstream or @writestream annotations let daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point
+ * of view. A readstream transfers data from daemon to src/remote. The
+ * <paramnumber> specifies at which offset the stream parameter is inserted
+ * in the function parameter list.
+ *
+ * - @priority: low|high
+ *
+ * Each API that might eventually access hypervisor's monitor (and thus
+ * block) MUST fall into low priority. However, there are some exceptions
+ * to this rule, e.g. domainDestroy. Other APIs MAY be marked as high
+ * priority. If in doubt, it's safe to choose low. Low is taken as default,
+ * and thus can be left out.
*/
- VIR_LOCK_SPACE_PROTOCOL_PROC_REGISTER = 1, /* skipgen skipgen */
- VIR_LOCK_SPACE_PROTOCOL_PROC_RESTRICT = 2, /* skipgen skipgen */
- VIR_LOCK_SPACE_PROTOCOL_PROC_NEW = 3, /* skipgen skipgen */
- VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_RESOURCE = 4, /* skipgen skipgen */
- VIR_LOCK_SPACE_PROTOCOL_PROC_DELETE_RESOURCE = 5, /* skipgen skipgen */
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_REGISTER = 1,
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_RESTRICT = 2,
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_NEW = 3,
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_RESOURCE = 4,
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_DELETE_RESOURCE = 5,
- VIR_LOCK_SPACE_PROTOCOL_PROC_ACQUIRE_RESOURCE = 6, /* skipgen skipgen */
- VIR_LOCK_SPACE_PROTOCOL_PROC_RELEASE_RESOURCE = 7, /* skipgen skipgen */
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_ACQUIRE_RESOURCE = 6,
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_RELEASE_RESOURCE = 7,
- VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_LOCKSPACE = 8 /* skipgen skipgen */
+ /**
+ * @generate: none
+ */
+ VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_LOCKSPACE = 8
};
diff --git a/src/remote/lxc_protocol.x b/src/remote/lxc_protocol.x
index 1453f89..020fcba 100644
--- a/src/remote/lxc_protocol.x
+++ b/src/remote/lxc_protocol.x
@@ -37,13 +37,34 @@ const LXC_PROGRAM = 0x00068000;
const LXC_PROTOCOL_VERSION = 1;
enum lxc_procedure {
- /* Each function must have a three-word comment. The first word is
- * whether gendispatch.pl handles daemon, the second whether
- * it handles src/remote.
- * The last argument describes priority of API. There are two accepted
- * values: low, high; Each API that might eventually access hypervisor's
- * monitor (and thus block) MUST fall into low priority. However, there
- * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
- * be marked as high priority. If in doubt, it's safe to choose low. */
- LXC_PROC_DOMAIN_OPEN_NAMESPACE = 1 /* skipgen skipgen priority:low */
+ /* Each function must be preceeded by a comment providing one or
+ * more annotations:
+ *
+ * - @generate: none|client|server|both
+ *
+ * Whether to generate the dispatch stubs for the server
+ * and/or client code.
+ *
+ * - @readstream: paramnumber
+ * - @writestream: paramnumber
+ *
+ * The @readstream or @writestream annotations let daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point
+ * of view. A readstream transfers data from daemon to src/remote. The
+ * <paramnumber> specifies at which offset the stream parameter is inserted
+ * in the function parameter list.
+ *
+ * - @priority: low|high
+ *
+ * Each API that might eventually access hypervisor's monitor (and thus
+ * block) MUST fall into low priority. However, there are some exceptions
+ * to this rule, e.g. domainDestroy. Other APIs MAY be marked as high
+ * priority. If in doubt, it's safe to choose low. Low is taken as default,
+ * and thus can be left out.
+ */
+ /**
+ * @generate: none
+ * @priority: low
+ */
+ LXC_PROC_DOMAIN_OPEN_NAMESPACE = 1
};
diff --git a/src/remote/qemu_protocol.x b/src/remote/qemu_protocol.x
index d555cbb..e284180 100644
--- a/src/remote/qemu_protocol.x
+++ b/src/remote/qemu_protocol.x
@@ -63,15 +63,44 @@ const QEMU_PROGRAM = 0x20008087;
const QEMU_PROTOCOL_VERSION = 1;
enum qemu_procedure {
- /* Each function must have a three-word comment. The first word is
- * whether gendispatch.pl handles daemon, the second whether
- * it handles src/remote.
- * The last argument describes priority of API. There are two accepted
- * values: low, high; Each API that might eventually access hypervisor's
- * monitor (and thus block) MUST fall into low priority. However, there
- * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
- * be marked as high priority. If in doubt, it's safe to choose low. */
- QEMU_PROC_MONITOR_COMMAND = 1, /* skipgen skipgen priority:low */
- QEMU_PROC_DOMAIN_ATTACH = 2, /* autogen autogen priority:low */
- QEMU_PROC_DOMAIN_AGENT_COMMAND = 3 /* autogen autogen priority:low */
+ /* Each function must be preceeded by a comment providing one or
+ * more annotations:
+ *
+ * - @generate: none|client|server|both
+ *
+ * Whether to generate the dispatch stubs for the server
+ * and/or client code.
+ *
+ * - @readstream: paramnumber
+ * - @writestream: paramnumber
+ *
+ * The @readstream or @writestream annotations let daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point
+ * of view. A readstream transfers data from daemon to src/remote. The
+ * <paramnumber> specifies at which offset the stream parameter is inserted
+ * in the function parameter list.
+ *
+ * - @priority: low|high
+ *
+ * Each API that might eventually access hypervisor's monitor (and thus
+ * block) MUST fall into low priority. However, there are some exceptions
+ * to this rule, e.g. domainDestroy. Other APIs MAY be marked as high
+ * priority. If in doubt, it's safe to choose low. Low is taken as default,
+ * and thus can be left out.
+ */
+ /**
+ * @generate: none
+ * @priority: low
+ */
+ QEMU_PROC_MONITOR_COMMAND = 1,
+ /**
+ * @generate: both
+ * @priority: low
+ */
+ QEMU_PROC_DOMAIN_ATTACH = 2,
+ /**
+ * @generate: both
+ * @priority: low
+ */
+ QEMU_PROC_DOMAIN_AGENT_COMMAND = 3
};
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index d384225..d1f5a4f 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1921,7 +1921,7 @@ struct remote_node_device_destroy_args {
};
-/**
+/*
* Events Register/Deregister:
* It would seem rpcgen does not like both args, and ret
* to be null. It will not generate the prototype otherwise.
@@ -2744,370 +2744,1478 @@ const REMOTE_PROGRAM = 0x20008086;
const REMOTE_PROTOCOL_VERSION = 1;
enum remote_procedure {
- /* Each function must have a three-word comment. The first word is
- * whether gendispatch.pl handles daemon, the second whether
- * it handles src/remote. Additional flags can be specified after a
- * pipe.
- * The last argument describes priority of API. There are two accepted
- * values: low, high; Each API that might eventually access hypervisor's
- * monitor (and thus block) MUST fall into low priority. However, there
- * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
- * be marked as high priority. If in doubt, it's safe to choose low.
- * Low is taken as default, and thus can be left out.
+ /* Each function must be preceeded by a comment providing one or
+ * more annotations:
+ *
+ * - @generate: none|client|server|both
+ *
+ * Whether to generate the dispatch stubs for the server
+ * and/or client code.
+ *
+ * - @readstream: paramnumber
+ * - @writestream: paramnumber
*
- * The (readstream|writestream)@<offset> flag lets daemon and src/remote
- * create a stream. The direction is defined from the src/remote point
- * of view. A readstream transfers data from daemon to src/remote. The
- * <offset> specifies at which offset the stream parameter is inserted
- * in the function parameter list. */
- REMOTE_PROC_OPEN = 1, /* skipgen skipgen priority:high */
- REMOTE_PROC_CLOSE = 2, /* skipgen skipgen priority:high */
- REMOTE_PROC_GET_TYPE = 3, /* autogen skipgen priority:high */
- REMOTE_PROC_GET_VERSION = 4, /* autogen autogen priority:high */
- REMOTE_PROC_GET_MAX_VCPUS = 5, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_GET_INFO = 6, /* autogen autogen priority:high */
- REMOTE_PROC_GET_CAPABILITIES = 7, /* autogen autogen */
- REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8, /* autogen autogen */
- REMOTE_PROC_DOMAIN_CREATE = 9, /* autogen skipgen */
- REMOTE_PROC_DOMAIN_CREATE_XML = 10, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_DEFINE_XML = 11, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_DESTROY = 12, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_XML_DESC = 14, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_INFO = 16, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_VCPUS = 20, /* skipgen skipgen priority:high */
-
- REMOTE_PROC_LIST_DEFINED_DOMAINS = 21, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_PIN_VCPU = 26, /* autogen autogen */
- REMOTE_PROC_DOMAIN_REBOOT = 27, /* autogen autogen */
- REMOTE_PROC_DOMAIN_RESUME = 28, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30, /* autogen autogen priority:high */
-
- REMOTE_PROC_DOMAIN_SET_MEMORY = 31, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SET_VCPUS = 32, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SHUTDOWN = 33, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SUSPEND = 34, /* autogen autogen */
- REMOTE_PROC_DOMAIN_UNDEFINE = 35, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_DEFINED_NETWORKS = 36, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_DOMAINS = 37, /* autogen skipgen priority:high */
- REMOTE_PROC_LIST_NETWORKS = 38, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_CREATE = 39, /* autogen autogen */
- REMOTE_PROC_NETWORK_CREATE_XML = 40, /* autogen autogen */
-
- REMOTE_PROC_NETWORK_DEFINE_XML = 41, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_DESTROY = 42, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_GET_XML_DESC = 43, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_GET_AUTOSTART = 44, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_SET_AUTOSTART = 48, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_UNDEFINE = 49, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50, /* autogen autogen priority:high */
-
- REMOTE_PROC_NUM_OF_DOMAINS = 51, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_NETWORKS = 52, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_CORE_DUMP = 53, /* autogen autogen */
- REMOTE_PROC_DOMAIN_RESTORE = 54, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SAVE = 55, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57, /* skipgen autogen */
- REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58, /* autogen autogen */
- REMOTE_PROC_GET_HOSTNAME = 59, /* autogen autogen priority:high */
- REMOTE_PROC_SUPPORTS_FEATURE = 60, /* skipgen autogen priority:high */
-
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63, /* autogen autogen */
- REMOTE_PROC_DOMAIN_BLOCK_STATS = 64, /* autogen autogen */
- REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65, /* autogen autogen priority:high */
- REMOTE_PROC_AUTH_LIST = 66, /* skipgen skipgen priority:high */
- REMOTE_PROC_AUTH_SASL_INIT = 67, /* skipgen skipgen priority:high */
- REMOTE_PROC_AUTH_SASL_START = 68, /* skipgen skipgen priority:high */
- REMOTE_PROC_AUTH_SASL_STEP = 69, /* skipgen skipgen priority:high */
- REMOTE_PROC_AUTH_POLKIT = 70, /* skipgen skipgen priority:high */
-
- REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_STORAGE_POOLS = 72, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74, /* autogen autogen priority:high */
- REMOTE_PROC_FIND_STORAGE_POOL_SOURCES = 75, /* autogen skipgen */
- REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76, /* autogen autogen */
- REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_CREATE = 78, /* autogen autogen */
- REMOTE_PROC_STORAGE_POOL_BUILD = 79, /* autogen autogen */
- REMOTE_PROC_STORAGE_POOL_DESTROY = 80, /* autogen autogen priority:high */
-
- REMOTE_PROC_STORAGE_POOL_DELETE = 81, /* autogen autogen */
- REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_REFRESH = 83, /* autogen autogen */
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_GET_INFO = 87, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90, /* autogen autogen priority:high */
-
- REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_DELETE = 94, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_GET_INFO = 98, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_GET_PATH = 100, /* autogen autogen priority:high */
-
- REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101, /* autogen skipgen priority:high */
- REMOTE_PROC_NODE_GET_FREE_MEMORY = 102, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109, /* autogen autogen */
- REMOTE_PROC_GET_URI = 110, /* autogen skipgen priority:high */
-
- REMOTE_PROC_NODE_NUM_OF_DEVICES = 111, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_LIST_DEVICES = 112, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114, /* autogen autogen */
- REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115, /* skipgen autogen priority:high */
- REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117, /* autogen autogen priority:high */
- REMOTE_PROC_NODE_DEVICE_DETTACH = 118, /* autogen skipgen */
- REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119, /* autogen skipgen */
- REMOTE_PROC_NODE_DEVICE_RESET = 120, /* autogen skipgen */
-
- REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121, /* skipgen skipgen priority:high */
- REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122, /* skipgen skipgen priority:high */
- REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123, /* autogen autogen */
- REMOTE_PROC_NODE_DEVICE_DESTROY = 124, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125, /* autogen autogen */
- REMOTE_PROC_NUM_OF_INTERFACES = 126, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_INTERFACES = 127, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_GET_XML_DESC = 130, /* autogen autogen */
-
- REMOTE_PROC_INTERFACE_DEFINE_XML = 131, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_UNDEFINE = 132, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_CREATE = 133, /* autogen autogen */
- REMOTE_PROC_INTERFACE_DESTROY = 134, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_XML_FROM_NATIVE = 135, /* autogen autogen */
- REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136, /* autogen autogen */
- REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_DEFINED_INTERFACES = 138, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_SECRETS = 139, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_SECRETS = 140, /* autogen autogen priority:high */
-
- REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141, /* autogen autogen priority:high */
- REMOTE_PROC_SECRET_DEFINE_XML = 142, /* autogen autogen priority:high */
- REMOTE_PROC_SECRET_GET_XML_DESC = 143, /* autogen autogen priority:high */
- REMOTE_PROC_SECRET_SET_VALUE = 144, /* autogen autogen priority:high */
- REMOTE_PROC_SECRET_GET_VALUE = 145, /* skipgen skipgen priority:high */
- REMOTE_PROC_SECRET_UNDEFINE = 146, /* autogen autogen priority:high */
- REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* autogen autogen | writestream@1 */
- REMOTE_PROC_IS_SECURE = 149, /* autogen skipgen priority:high */
- REMOTE_PROC_DOMAIN_IS_ACTIVE = 150, /* autogen autogen priority:high */
-
- REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_IS_ACTIVE = 152, /* autogen autogen priority:high */
- REMOTE_PROC_NETWORK_IS_PERSISTENT = 153, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154, /* autogen autogen priority:high */
- REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155, /* autogen autogen priority:high */
- REMOTE_PROC_INTERFACE_IS_ACTIVE = 156, /* autogen autogen priority:high */
- REMOTE_PROC_GET_LIB_VERSION = 157, /* autogen autogen priority:high */
- REMOTE_PROC_CPU_COMPARE = 158, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_MEMORY_STATS = 159, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161, /* autogen autogen */
- REMOTE_PROC_CPU_BASELINE = 162, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163, /* autogen autogen */
- REMOTE_PROC_DOMAIN_ABORT_JOB = 164, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_WIPE = 165, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENTS_REGISTER_ANY = 167, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER_ANY = 168, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173, /* autogen autogen */
- REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174, /* autogen autogen */
- REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175, /* autogen autogen priority:high */
- REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176, /* autogen autogen priority:high */
- REMOTE_PROC_NWFILTER_GET_XML_DESC = 177, /* autogen autogen priority:high */
- REMOTE_PROC_NUM_OF_NWFILTERS = 178, /* autogen autogen priority:high */
- REMOTE_PROC_LIST_NWFILTERS = 179, /* autogen autogen priority:high */
- REMOTE_PROC_NWFILTER_DEFINE_XML = 180, /* autogen autogen priority:high */
-
- REMOTE_PROC_NWFILTER_UNDEFINE = 181, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182, /* autogen autogen */
- REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191, /* autogen autogen */
- REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195, /* autogen autogen */
- REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* autogen autogen | readstream@2 */
- REMOTE_PROC_DOMAIN_IS_UPDATED = 202, /* autogen autogen priority:high */
- REMOTE_PROC_GET_SYSINFO = 203, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* autogen autogen | writestream@1 */
- REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* autogen autogen | readstream@1 */
- REMOTE_PROC_DOMAIN_INJECT_NMI = 210, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* autogen autogen | readstream@1 */
- REMOTE_PROC_DOMAIN_GET_STATE = 212, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215, /* autogen skipgen | writestream@1 */
- REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219, /* autogen autogen */
- REMOTE_PROC_INTERFACE_CHANGE_BEGIN = 220, /* autogen autogen */
-
- REMOTE_PROC_INTERFACE_CHANGE_COMMIT = 221, /* autogen autogen */
- REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223, /* skipgen autogen */
- REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SEND_KEY = 226, /* autogen autogen */
- REMOTE_PROC_NODE_GET_CPU_STATS = 227, /* skipgen skipgen priority:high */
- REMOTE_PROC_NODE_GET_MEMORY_STATS = 228, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_GET_CONTROL_INFO = 229, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO = 230, /* skipgen skipgen */
-
- REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS = 231, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SAVE_FLAGS = 232, /* autogen autogen */
- REMOTE_PROC_DOMAIN_RESTORE_FLAGS = 233, /* autogen autogen */
- REMOTE_PROC_DOMAIN_DESTROY_FLAGS = 234, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML = 236, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT = 237, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO = 238, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239, /* autogen autogen */
- REMOTE_PROC_DOMAIN_BLOCK_PULL = 240, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242, /* autogen autogen */
- REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_RESET = 245, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249, /* skipgen skipgen */
- REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_BLOCK_RESIZE = 251, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE = 252, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE = 253, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS = 254, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS = 255, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS = 256, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS = 257, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS = 258, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN = 259, /* autogen autogen */
- REMOTE_PROC_STORAGE_VOL_RESIZE = 260, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION = 261, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_GET_DISK_ERRORS = 263, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_METADATA = 264, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_METADATA = 265, /* autogen autogen */
- REMOTE_PROC_DOMAIN_BLOCK_REBASE = 266, /* autogen autogen */
- REMOTE_PROC_DOMAIN_PM_WAKEUP = 267, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270, /* autogen autogen */
-
- REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT = 271, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA = 272, /* autogen autogen */
- REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS = 273, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS = 274, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN = 275, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE = 276, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_HOSTNAME = 277, /* autogen autogen */
- REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST = 278, /* skipgen skipgen priority:high */
- REMOTE_PROC_DOMAIN_PIN_EMULATOR = 279, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO = 280, /* skipgen skipgen */
-
- REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS = 281, /* skipgen skipgen priority:high */
- REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES = 282, /* skipgen skipgen priority:high */
- REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS = 283, /* skipgen skipgen priority:high */
- REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES = 284, /* skipgen skipgen priority:high */
- REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES = 285, /* skipgen skipgen priority:high */
- REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286, /* skipgen skipgen priority:high */
- REMOTE_PROC_CONNECT_LIST_ALL_SECRETS = 287, /* skipgen skipgen priority:high */
- REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS = 288, /* autogen autogen */
- REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS = 289, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_BLOCK_COMMIT = 290, /* autogen autogen */
-
- REMOTE_PROC_NETWORK_UPDATE = 291, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK = 292, /* autogen autogen */
- REMOTE_PROC_NODE_GET_CPU_MAP = 293, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_FSTRIM = 294, /* autogen autogen */
- REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL = 295, /* autogen autogen */
- REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296, /* autogen autogen | readstream@2 */
- REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN = 297, /* autogen autogen priority:high */
- REMOTE_PROC_DOMAIN_GET_JOB_STATS = 298, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE = 299, /* autogen autogen */
- REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE = 300 /* autogen autogen */
+ * The @readstream or @writestream annotations let daemon and src/remote
+ * create a stream. The direction is defined from the src/remote point
+ * of view. A readstream transfers data from daemon to src/remote. The
+ * <paramnumber> specifies at which offset the stream parameter is inserted
+ * in the function parameter list.
+ *
+ * - @priority: low|high
+ *
+ * Each API that might eventually access hypervisor's monitor (and thus
+ * block) MUST fall into low priority. However, there are some exceptions
+ * to this rule, e.g. domainDestroy. Other APIs MAY be marked as high
+ * priority. If in doubt, it's safe to choose low. Low is taken as default,
+ * and thus can be left out.
+ */
+
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_OPEN = 1,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CLOSE = 2,
+ /**
+ * @generate: server
+ * @priority: high
+ */
+ REMOTE_PROC_GET_TYPE = 3,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_GET_VERSION = 4,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_GET_MAX_VCPUS = 5,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_INFO = 6,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_GET_CAPABILITIES = 7,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8,
+ /**
+ * @generate: server
+ */
+ REMOTE_PROC_DOMAIN_CREATE = 9,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_CREATE_XML = 10,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_DEFINE_XML = 11,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_DESTROY = 12,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_XML_DESC = 14,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_INFO = 16,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_VCPUS = 20,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_DEFINED_DOMAINS = 21,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_PIN_VCPU = 26,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_REBOOT = 27,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_RESUME = 28,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_MEMORY = 31,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_VCPUS = 32,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SHUTDOWN = 33,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SUSPEND = 34,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_UNDEFINE = 35,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_DEFINED_NETWORKS = 36,
+ /**
+ * @generate: server
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_DOMAINS = 37,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_NETWORKS = 38,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NETWORK_CREATE = 39,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NETWORK_CREATE_XML = 40,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_DEFINE_XML = 41,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_DESTROY = 42,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_GET_XML_DESC = 43,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_GET_AUTOSTART = 44,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_SET_AUTOSTART = 48,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_UNDEFINE = 49,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_DOMAINS = 51,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_NETWORKS = 52,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_CORE_DUMP = 53,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_RESTORE = 54,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SAVE = 55,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56,
+ /**
+ * @generate: client
+ */
+ REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_GET_HOSTNAME = 59,
+ /**
+ * @generate: client
+ * @priority: high
+ */
+ REMOTE_PROC_SUPPORTS_FEATURE = 60,
+
+
+
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_STATS = 64,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_AUTH_LIST = 66,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_AUTH_SASL_INIT = 67,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_AUTH_SASL_START = 68,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_AUTH_SASL_STEP = 69,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_AUTH_POLKIT = 70,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_STORAGE_POOLS = 72,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74,
+ /**
+ * @generate: server
+ */
+ REMOTE_PROC_FIND_STORAGE_POOL_SOURCES = 75,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_POOL_CREATE = 78,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_POOL_BUILD = 79,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 80,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_POOL_DELETE = 81,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_POOL_REFRESH = 83,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 87,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_DELETE = 94,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 98,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 100,
+
+
+
+ /**
+ * @generate: server
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_FREE_MEMORY = 102,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109,
+ /**
+ * @generate: server
+ * @priority: high
+ */
+ REMOTE_PROC_GET_URI = 110,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_NUM_OF_DEVICES = 111,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_LIST_DEVICES = 112,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114,
+ /**
+ * @generate: client
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117,
+ /**
+ * @generate: server
+ */
+ REMOTE_PROC_NODE_DEVICE_DETTACH = 118,
+ /**
+ * @generate: server
+ */
+ REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119,
+ /**
+ * @generate: server
+ */
+ REMOTE_PROC_NODE_DEVICE_RESET = 120,
+
+
+
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_DESTROY = 124,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_INTERFACES = 126,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_INTERFACES = 127,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_INTERFACE_GET_XML_DESC = 130,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_DEFINE_XML = 131,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_UNDEFINE = 132,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_INTERFACE_CREATE = 133,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_DESTROY = 134,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_XML_FROM_NATIVE = 135,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_DEFINED_INTERFACES = 138,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_SECRETS = 139,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_SECRETS = 140,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_DEFINE_XML = 142,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_GET_XML_DESC = 143,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_SET_VALUE = 144,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_GET_VALUE = 145,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_UNDEFINE = 146,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147,
+ /**
+ * @generate: both
+ * @writestream: 1
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148,
+ /**
+ * @generate: server
+ * @priority: high
+ */
+ REMOTE_PROC_IS_SECURE = 149,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_IS_ACTIVE = 150,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_IS_ACTIVE = 152,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_IS_PERSISTENT = 153,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_INTERFACE_IS_ACTIVE = 156,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_GET_LIB_VERSION = 157,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_CPU_COMPARE = 158,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MEMORY_STATS = 159,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_CPU_BASELINE = 162,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_WIPE = 165,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_EVENTS_REGISTER_ANY = 167,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER_ANY = 168,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NWFILTER_GET_XML_DESC = 177,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NUM_OF_NWFILTERS = 178,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_LIST_NWFILTERS = 179,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NWFILTER_DEFINE_XML = 180,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NWFILTER_UNDEFINE = 181,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200,
+
+
+
+ /**
+ * @generate: both
+ * @readstream: 2
+ */
+ REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_IS_UPDATED = 202,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_GET_SYSINFO = 203,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207,
+ /**
+ * @generate: both
+ * @writestream: 1
+ */
+ REMOTE_PROC_STORAGE_VOL_UPLOAD = 208,
+ /**
+ * @generate: both
+ * @readstream: 1
+ */
+ REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_INJECT_NMI = 210,
+
+
+
+ /**
+ * @generate: both
+ * @readstream: 1
+ */
+ REMOTE_PROC_DOMAIN_SCREENSHOT = 211,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_STATE = 212,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214,
+ /**
+ * @generate: server
+ * @writestream: 1
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_INTERFACE_CHANGE_BEGIN = 220,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_INTERFACE_CHANGE_COMMIT = 221,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222,
+ /**
+ * @generate: client
+ */
+ REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SEND_KEY = 226,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_CPU_STATS = 227,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_GET_MEMORY_STATS = 228,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_CONTROL_INFO = 229,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO = 230,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS = 231,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SAVE_FLAGS = 232,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_RESTORE_FLAGS = 233,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_DESTROY_FLAGS = 234,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML = 236,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT = 237,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO = 238,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_PULL = 240,
+
+
+
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_RESET = 245,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_RESIZE = 251,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE = 252,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE = 253,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS = 254,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS = 255,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS = 256,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS = 257,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS = 258,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN = 259,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_STORAGE_VOL_RESIZE = 260,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION = 261,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_DISK_ERRORS = 263,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SET_METADATA = 264,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_METADATA = 265,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_REBASE = 266,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_PM_WAKEUP = 267,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270,
+
+
+
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT = 271,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA = 272,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS = 273,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS = 274,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN = 275,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE = 276,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_GET_HOSTNAME = 277,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST = 278,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_PIN_EMULATOR = 279,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO = 280,
+
+
+
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS = 281,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES = 282,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS = 283,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES = 284,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES = 285,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286,
+ /**
+ * @generate: none
+ * @priority: high
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_SECRETS = 287,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS = 288,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS = 289,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_BLOCK_COMMIT = 290,
+
+
+
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NETWORK_UPDATE = 291,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK = 292,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_NODE_GET_CPU_MAP = 293,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_FSTRIM = 294,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL = 295,
+ /**
+ * @generate: both
+ * @readstream: 2
+ */
+ REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296,
+ /**
+ * @generate: both
+ * @priority: high
+ */
+ REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN = 297,
+ /**
+ * @generate: none
+ */
+ REMOTE_PROC_DOMAIN_GET_JOB_STATS = 298,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE = 299,
+ /**
+ * @generate: both
+ */
+ REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE = 300
+
+
/*
* Notice how the entries are grouped in sets of 10 ?
* Nice isn't it. Please keep it this way when adding more.
- *
- * Each function must have a three-word comment. The first word is
- * whether gendispatch.pl handles daemon, the second whether
- * it handles src/remote. Additional flags can be specified after a
- * pipe.
- * The last argument describes priority of API. There are two accepted
- * values: low, high; Each API that might eventually access hypervisor's
- * monitor (and thus block) MUST fall into low priority. However, there
- * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
- * be marked as high priority. If in doubt, it's safe to choose low.
- * Low is taken as default, and thus can be left out.
- *
- * The (readstream|writestream)@<offset> flag lets daemon and src/remote
- * create a stream. The direction is defined from the src/remote point
- * of view. A readstream transfers data from daemon to src/remote. The
- * <offset> specifies at which offset the stream parameter is inserted
- * in the function parameter list. */
+ */
};
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index ef387e0..65a0ac2 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -82,10 +82,11 @@ sub name_to_TypeName {
# Read the input file (usually remote_protocol.x) and form an
# opinion about the name, args and return type of each RPC.
-my ($name, $ProcName, $id, $flags, %calls, @calls);
+my ($name, $ProcName, $id, $flags, %calls, @calls, %opts);
my $collect_args_members = 0;
my $collect_ret_members = 0;
+my $collect_opts = 0;
my $last_name;
open PROTOCOL, "<$protocol" or die "cannot open $protocol: $!";
@@ -103,6 +104,19 @@ while (<PROTOCOL>) {
} elsif ($_ =~ m/^\s*(.*\S)\s*$/) {
push(@{$calls{$name}->{ret_members}}, $1);
}
+ } elsif ($collect_opts) {
+ if (m,^\s*\*\s*\@(\w+)\s*:\s*(\w+)\s*$,) {
+ $opts{$1} = $2;
+ } elsif (m,^\s*\*/\s*$,) {
+ $collect_opts = 0;
+ } elsif (m,^\s*\*\s*$,) {
+ # pass
+ } else {
+ die "cannot parse $_";
+ }
+ } elsif (m,/\*\*,) {
+ %opts = ();
+ $collect_opts = 1;
} elsif (/^struct (${structprefix}_(.*)_args)/ ||
/^struct (${structprefix}(.*)Args)/) {
my $structname = $1;
@@ -171,11 +185,10 @@ while (<PROTOCOL>) {
$collect_args_members = 0;
$collect_ret_members = 0;
- } elsif (/^\s*(${procprefix}_PROC_(.*?))\s*=\s*(\d+)\s*,?(.*)$/) {
+ } elsif (/^\s*(${procprefix}_PROC_(.*?))\s*=\s*(\d+)\s*,?\s*$/) {
my $constname = $1;
$name = $2;
$id = $3;
- $flags = $4;
$ProcName = name_to_ProcName ($name);
$name = lc $name;
$name =~ s/_//g;
@@ -195,41 +208,45 @@ while (<PROTOCOL>) {
$calls{$name}->{constname} = $constname;
if ($opt_b or $opt_k) {
- if (!($flags =~ m/^\s*\/\*\s*(\S+)\s+(\S+)\s*(\|.*)?\s+(priority:(\S+))?\s*\*\/\s*$/)) {
- die "invalid generator flags '$flags' for $constname"
+ if (!exists $opts{generate}) {
+ die "'\@generate' annotation missing for $constname";
}
- my $genmode = $opt_b ? $1 : $2;
- my $genflags = $3;
- my $priority = defined $5 ? $5 : "low";
+ if ($opts{generate} !~ /^(both|server|client|none)$/) {
+ die "'\@generate' annotation value '$opts{generate}' invalid";
+ }
- if ($genmode eq "autogen") {
+ if ($opts{generate} eq "both") {
+ push(@autogen, $ProcName);
+ } elsif ($opt_b && ($opts{generate} eq "server")) {
+ push(@autogen, $ProcName);
+ } elsif (!$opt_b && ($opts{generate} eq "client")) {
push(@autogen, $ProcName);
- } elsif ($genmode eq "skipgen") {
- # ignore it
- } else {
- die "invalid generator flags for ${procprefix}_PROC_${name}"
}
- if (defined $genflags and $genflags ne "") {
- if ($genflags =~ m/^\|\s*(read|write)stream@(\d+)\s*$/) {
- $calls{$name}->{streamflag} = $1;
- $calls{$name}->{streamoffset} = int($2);
- } else {
- die "invalid generator flags for ${procprefix}_PROC_${name}"
- }
+ if (exists $opts{readstream}) {
+ $calls{$name}->{streamflag} = "read";
+ $calls{$name}->{streamoffset} = int($opts{readstream});
+ } elsif (exists $opts{writestream}) {
+ $calls{$name}->{streamflag} = "write";
+ $calls{$name}->{streamoffset} = int($opts{writestream});
} else {
$calls{$name}->{streamflag} = "none";
}
+
# for now, we distinguish only two levels of prioroty:
# low (0) and high (1)
- if ($priority eq "high") {
- $calls{$name}->{priority} = 1;
- } elsif ($priority eq "low") {
- $calls{$name}->{priority} = 0;
+ if (exists $opts{priority}) {
+ if ($opts{priority} eq "high") {
+ $calls{$name}->{priority} = 1;
+ } elsif ($opts{priority} eq "low") {
+ $calls{$name}->{priority} = 0;
+ } else {
+ die "\@priority annotation value '$opts{priority}' invalid for $constname"
+ }
} else {
- die "invalid priority ${priority} for ${procprefix}_PROC_${name}"
+ $calls{$name}->{priority} = 0;
}
}
--
1.8.1.4
11 years, 7 months
[libvirt] doc: write separate module for hostdev passthrough and in-use tracking
by Chunyan Liu
Hi, List,
As the mail I've sent a week before:
https://www.redhat.com/archives/libvir-list/2013-March/msg00730.html
I'm willing to push this work forward so that the passthrough APIs
could be reused by qemu driver and libxl driver (which doesn't support
pci passthrough yet and tries to add this function recently), or other
drivers.
But since this work affacts a lot, I'm not sure if I can control it in
a correct way. I write a draft to describe what I'm considering how to
do, as in the following and in attachment. Hope to get your review,
comment and guidence to improve the work before start coding. Any
feedback will be very appreciated!
Thanks!
Chunyan
------------------------
DRAFT:
Write separate module for hostdev passthrough
1. Purposes:
* Move hostdev passthrough APIs from qemu_hostdev.ch to separate module so
that they could be reused by other hypervisors too
* Maintain global in-use state of hostdevs
2. Module design (draft):
* New module name: hostdev_driver
* New module files: hostdev_driver.ch hostdev_conf.ch
* New Definitions:
## [src/driver.h]
typedef struct _virHostdevDriver virHostdevDriver;
typedef virHostdevDriver *virHostdevDriverPtr;
struct _virHosedevDriver {
const char *name;
virDrvOpen open;
virDrvClose close;
virDrvPrepareHostdevs prepareHostdevs;
virDrvPreparePciHostdevs preparePciHostdevs;
virDrvprepareUsbHostdevs prepareUsbHostdevs;
virDrvReattachHostdevs reattachHostdevs;
virDrvReattachPciHostdevs reattachPciHostdevs;
virDrvReattachUsbHostdevs reattachUsbHostdevs;
virDrvGetActivePciHostdevList getActivePciHostdevList;
virDrvGetActiveUsbHostdevList getActiveUsbHostdevList;
virDrvGetDomainActivePciHostdevList
getDomainActivePciHostdevList;
virDrvGetDomainActiveUsbHostdevList
getDomainActiveUsbHostdevList;
};
## [src/hostdev/hostdev_conf.h]
typedef struct _virHostdevDriverState virHostdevDriverState;
typedef virHostdevDriverState *virHostdevDriverStatePtr;
struct _virHostdevDriverState {
virMutex lock;
virPCIDeviceListPtr activePciHostdevs;
virPCIDeviceListPtr inactivePciHostdevs;
virUSBDeviceListPtr activeUsbHostdevs;
};
## [src/hostdev/hostdev_driver.c]
static virHostdevDriver hostdevDriver = {
.name = "hostdev",
.open = hostdevDriverOpen,
.close = hostdevDriverClose,
.prepareHostdevs = virPrepareHostdevs,
.preparePciHostdevs = virPreparePciHostdevs,
.prepareUsbHostdevs = virPrepareUsbHostdevs
.reattachHostdevs = virReattachHostdevs,
.reattachPciHostdevs = virReattachPciHostdevs,
.reattachUsbHostdevs = virReattachUsbHostdevs,
.getActivePciHostdevList = virGetActivePciHostdevList,
.getActiveUsbHostdevList = virGetActiveUsbHostdevList,
.getDomainActivePciHostdevList = virGetDomainActivePciHostdevList,
.getDomainActiveUsbHostdevList = virGetDomainActiveUsbHostdevList,
};
static virStateDriver hostdevStateDriver = {
.name = "hostdev",
.initialize = hostdevDriverStartup,
.cleanup = hostdevDriverCleanup,
.reload = hostdevDriverReload,
};
* Changed Definitions:
struct _virPCIDevice {
......
--- const char *used_by; /* The domain which uses the device */
+++ virDomainObjPtr used_by; /* include domname and conn info */
......
};
struct _virUSBDevice {
......
--- const char *used_by; /* name of the domain using this dev */
+++ virDomainObjPtr used_by; /* include domname and conn info */
};
* APIs:
typedef int
(*virDrvPrepareHostdevs)(virHostdevDriverPtr driver,
virDomainObjPtr vm,
unsigned int flags);
/*
- workflow:
call PrepareHostdevPciDevices and PrepareHostdevUsbDevices
to do specific work.
- reference:
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
virDomainDefPtr def,
bool coldBoot);
- new parameter:
- flags:
- could set "coldBoot" for usb usage
- could set hypervisor tag since for qemu it will use
pci-stub, for libxl, it will use pciback.
*/
typedef int
(*virDrvPreparePciHostdevs)(virHostdevDriverPtr driver,
virDomainObjPtr vm,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
unsigned int flags);
/*
- workflow:
1. check things (e.g. assignability to non-managed device)
2. detach managed device and reset work
3. set usedby to 'vm', update activePciHostdevs and
inactivePciHostdevs
- reference:
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
const char *name,
const unsigned char *uuid,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs);
*/
typedef int
(*virDrvprepareUsbHostdevs)((virHostdevDriverPtr driver,
virDomainObjPtr vm,
virUSBDeviceListPtr list);
/*
- workflow:
check usb device, set usedby to 'vm', update activeUsbHostdevs
- reference:
int qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
const char *name,
virUSBDeviceListPtr list);
*/
typedef void
(*virDrvReattachHostdevs)(virHostdevDriverPtr driver,
virDomainObjPtr vm);
/*
- workflow:
call reattachPciHostDevices and reattachUsbHostDevices to
do specific work.
- reference:
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
virDomainDefPtr def)
*/
typedef void
(*virDrvReattachPciHostdevs) (virHostdevDriverPtr driver,
virDomainObjPtr vm,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs);
/*
- workflow:
unbind and bind to original driver, free
usedby, activePciHostdevs and inactivePciHostdevs.
- reference:
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtrdriver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
*/
typedef void
(*virDrvReattachUsbHostdevs) (virHostdevDriverPtr driver,
virDomainObjPtr vm,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs);
/*
- workflow:
free usedby, activePciHostdevs and inactivePciHostdevs.
- reference:
static void
qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
*/
typedef virPCIDeviceListPtr
(*virDrvGetActivePciHostdevList) (virHostdevDriverPtr driver);
/*
- could be used to check if a pci hostdev is already in-use.
*/
typedef virUSBDeviceListPtr
(*virDrvGetActiveUsbHostdevList) (virHostdevDriverPtr driver);
/*
- could be used to check if a usb hostdev is already in-use.
*/
typedef virPCIDeviceListPtr
(*virDrvGetDomainActivePciHostdevList) (virHostdevDriverPtr driver);
/*
- could be used to reattach all in-use pci hostdevs by a
domain (e.g. when a domain shutdown)
*/
typedef virPCIDeviceListPtr
(*virDrvGetDomainActiveUsbHostdevList) (virHostdevDriverPtr driver);
/*
- could be used to reattach all in-use usb hostdevs by a
domain
*/
3. Use the module
* Register hostdev driver
- define 'virHostdevDriverTab' and 'virHostdevDriverTabCount'
- add hostdev driver register work in libvirtd.c daemonInitialize()
* add hostdev driver areas to _virConnect
struct _virConnect {
.......
virNWFilterDriverPtr nwfilterDriver;
+++ virHostdevDriverPtr hostdevDriver;
.......
void * nwfilterPrivateData;
+++ void * hostdevPrivateData;
.......
}
* add conn->hostdevDriver parser in libvirt.c: do_open()
Then hypervisor drivers can get use of hostdev driver APIs.
* moments that could be affacted:
- domain start/shutoff
- attach/detach hostdev to domain
--------------------------------------------
11 years, 7 months
[libvirt] [[libvirt-designer v4] 1/2] Add transfer annotation to *init.argv
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
Add transfer annotation to argv parameter of library init functions.
---
libvirt-designer/libvirt-designer-main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libvirt-designer/libvirt-designer-main.c b/libvirt-designer/libvirt-designer-main.c
index 927eb21..ce69024 100644
--- a/libvirt-designer/libvirt-designer-main.c
+++ b/libvirt-designer/libvirt-designer-main.c
@@ -33,7 +33,9 @@
/**
* gvir_designer_init:
* @argc: (inout): pointer to application's argc
- * @argv: (inout) (array length=argc) (allow-none): pointer to application's argv
+ * @argv: (inout) (array length=argc) (allow-none) (transfer none): Address of the
+ * <parameter>argv</parameter> parameter of main(), or %NULL. Any options
+ * understood by GTK+ are stripped before return.
*/
void gvir_designer_init(int *argc,
char ***argv)
@@ -57,7 +59,9 @@ static void gvir_log_handler(const gchar *log_domain G_GNUC_UNUSED,
/**
* gvir_designer_init_check:
* @argc: (inout): pointer to application's argc
- * @argv: (inout) (array length=argc) (allow-none): pointer to application's argv
+ * @argv: (inout) (array length=argc) (allow-none) (transfer none): Address of the
+ * <parameter>argv</parameter> parameter of main(), or %NULL. Any options
+ * understood by GTK+ are stripped before return.
* @err: pointer to a #GError to which a message will be posted on error
*/
gboolean gvir_designer_init_check(int *argc,
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH v4 1/2] Add NVRAM device
by Li Zhang
From: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device.
Users are allowed to specify spapr-vio devices'address.
But NVRAM is not supported in libvirt. So this patch is to
add NVRAM device to allow users to specify its address.
In QEMU, NVRAM device's address is specified by
"-global spapr-nvram.reg=xxxxx".
In libvirt, XML file is defined as the following:
<nvram>
<address type='spapr-vio' reg='0x3000'/>
</nvram>
Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
---
v4 -> v3:
* Sperate NVRAM definition from qemu command line parser.
v3 -> v2:
* Add NVRAM in domaincommon.rng and formatdomain.xml.in suggested by Daniel P.Berrange
* Add NVRAM test cases suggested by Daniel P.Berrange
* Remove nvram allocation when it is not specified suggested by Daniel P.Berrange
* Add several error reports suggested by Daniel P.Berrange
v2 -> v1:
* Add NVRAM parameters parsing in qemuParseCommandLine
docs/formatdomain.html.in | 35 ++++++++++++++++++++
docs/schemas/domaincommon.rng | 10 ++++++
src/conf/domain_conf.c | 76 +++++++++++++++++++++++++++++++++++++++++++
src/conf/domain_conf.h | 10 ++++++
4 files changed, 131 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d400e35..f590304 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4415,6 +4415,41 @@ qemu-kvm -net nic,model=? /dev/null
</dl>
+ <h4><a name="elementsNVRAM">NVRAM device</a></h4>
+ <p>
+ One NVRAM device is always added to pSeries guests on PPC64.
+ And on PPC64, NVRAM devices' address type are VIO which
+ allows users to change.<code>nvram</code> element in XML file
+ is provided to specify its address.
+ Currently, libvirt only considers configuration for pSeries guests.
+ </p>
+ <p>
+ Example: usage of NVRAM configuration
+ </p>
+<pre>
+ ...
+ <devices>
+ <nvram>
+ <address type='spapr-vio' reg='0x3000'/>
+ </nvram>
+ </devices>
+ ...
+</pre>
+ <dl>
+ <dt><code>spapr-vio</code></dt>
+ <dd>
+ <p>
+ VIO device address type, this is only for PPC64.
+ </p>
+ </dd>
+ <dt><code>reg</code></dt>
+ <dd>
+ <p>
+ Devices' address
+ </p>
+ </dd>
+ </dl>
+
<h3><a name="seclabel">Security label</a></h3>
<p>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 2c31f76..2b58d95 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2764,6 +2764,13 @@
</optional>
</element>
</define>
+ <define name="nvram">
+ <element name="nvram">
+ <optional>
+ <ref name="address"/>
+ </optional>
+ </element>
+ </define>
<define name="memballoon">
<element name="memballoon">
<attribute name="model">
@@ -3208,6 +3215,9 @@
<optional>
<ref name="memballoon"/>
</optional>
+ <optional>
+ <ref name="nvram"/>
+ </optional>
</interleave>
</element>
</define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 36a46da..3a5e59a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -193,6 +193,7 @@ VIR_ENUM_IMPL(virDomainDevice, VIR_DOMAIN_DEVICE_LAST,
"smartcard",
"chr",
"memballoon",
+ "nvram",
"rng")
VIR_ENUM_IMPL(virDomainDeviceAddress, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST,
@@ -1552,6 +1553,16 @@ void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def)
VIR_FREE(def);
}
+void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def)
+{
+ if (!def)
+ return;
+
+ virDomainDeviceInfoClear(&def->info);
+
+ VIR_FREE(def);
+}
+
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def)
{
if (!def)
@@ -1718,6 +1729,7 @@ void virDomainDeviceDefFree(virDomainDeviceDefPtr def)
case VIR_DOMAIN_DEVICE_SMARTCARD:
case VIR_DOMAIN_DEVICE_CHR:
case VIR_DOMAIN_DEVICE_MEMBALLOON:
+ case VIR_DOMAIN_DEVICE_NVRAM:
case VIR_DOMAIN_DEVICE_LAST:
break;
}
@@ -1910,6 +1922,7 @@ void virDomainDefFree(virDomainDefPtr def)
virDomainWatchdogDefFree(def->watchdog);
virDomainMemballoonDefFree(def->memballoon);
+ virDomainNVRAMDefFree(def->nvram);
for (i = 0; i < def->nseclabels; i++)
virSecurityLabelDefFree(def->seclabels[i]);
@@ -2478,6 +2491,12 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
if (cb(def, &device, &def->rng->info, opaque) < 0)
return -1;
}
+ if (def->nvram) {
+ device.type = VIR_DOMAIN_DEVICE_NVRAM;
+ device.data.nvram = def->nvram;
+ if (cb(def, &device, &def->nvram->info, opaque) < 0)
+ return -1;
+ }
device.type = VIR_DOMAIN_DEVICE_HUB;
for (i = 0; i < def->nhubs ; i++) {
device.data.hub = def->hubs[i];
@@ -2509,6 +2528,7 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
case VIR_DOMAIN_DEVICE_SMARTCARD:
case VIR_DOMAIN_DEVICE_CHR:
case VIR_DOMAIN_DEVICE_MEMBALLOON:
+ case VIR_DOMAIN_DEVICE_NVRAM:
case VIR_DOMAIN_DEVICE_LAST:
case VIR_DOMAIN_DEVICE_RNG:
break;
@@ -7994,6 +8014,23 @@ error:
goto cleanup;
}
+static virDomainNVRAMDefPtr
+virDomainNVRAMDefParseXML(const xmlNodePtr node,
+ unsigned int flags)
+{
+ virDomainNVRAMDefPtr def;
+
+ if (VIR_ALLOC(def) < 0) {
+ virReportOOMError();
+ return NULL;
+ }
+
+ if ( virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0 )
+ return NULL;
+
+ return def;
+}
+
static virSysinfoDefPtr
virSysinfoParseXML(const xmlNodePtr node,
xmlXPathContextPtr ctxt)
@@ -11105,6 +11142,26 @@ virDomainDefParseXML(xmlDocPtr xml,
VIR_FREE(nodes);
}
+ def->nvram = NULL;
+ if ((n = virXPathNodeSet("./devices/nvram", ctxt, &nodes)) < 0) {
+ goto error;
+ }
+
+ if (n > 1) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("only a single nvram device is supported"));
+ goto error;
+ }
+
+ if (n > 0) {
+ virDomainNVRAMDefPtr nvram =
+ virDomainNVRAMDefParseXML(nodes[0], flags);
+ if (!nvram)
+ goto error;
+ def->nvram = nvram;
+ VIR_FREE(nodes);
+ }
+
/* analysis of the hub devices */
if ((n = virXPathNodeSet("./devices/hub", ctxt, &nodes)) < 0) {
goto error;
@@ -14159,6 +14216,21 @@ virDomainMemballoonDefFormat(virBufferPtr buf,
}
static int
+virDomainNVRAMDefFormat(virBufferPtr buf,
+ virDomainNVRAMDefPtr def,
+ unsigned int flags)
+{
+ virBufferAsprintf(buf, " <nvram>\n");
+ if (virDomainDeviceInfoIsSet(&def->info, flags))
+ if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0)
+ return -1;
+
+ virBufferAddLit(buf, " </nvram>\n");
+
+ return 0;
+}
+
+static int
virDomainSysinfoDefFormat(virBufferPtr buf,
virSysinfoDefPtr def)
{
@@ -15469,6 +15541,9 @@ virDomainDefFormatInternal(virDomainDefPtr def,
if (def->rng)
virDomainRNGDefFormat(buf, def->rng, flags);
+ if (def->nvram)
+ virDomainNVRAMDefFormat(buf, def->nvram, flags);
+
virBufferAddLit(buf, " </devices>\n");
virBufferAdjustIndent(buf, 2);
@@ -16749,6 +16824,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
case VIR_DOMAIN_DEVICE_SMARTCARD:
case VIR_DOMAIN_DEVICE_CHR:
case VIR_DOMAIN_DEVICE_MEMBALLOON:
+ case VIR_DOMAIN_DEVICE_NVRAM:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Copying definition of '%d' type "
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 3ab0f15..d98bec1 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -109,6 +109,9 @@ typedef virDomainChrDef *virDomainChrDefPtr;
typedef struct _virDomainMemballoonDef virDomainMemballoonDef;
typedef virDomainMemballoonDef *virDomainMemballoonDefPtr;
+typedef struct _virDomainNVRAMDef virDomainNVRAMDef;
+typedef virDomainNVRAMDef *virDomainNVRAMDefPtr;
+
typedef struct _virDomainSnapshotObj virDomainSnapshotObj;
typedef virDomainSnapshotObj *virDomainSnapshotObjPtr;
@@ -137,6 +140,7 @@ typedef enum {
VIR_DOMAIN_DEVICE_SMARTCARD,
VIR_DOMAIN_DEVICE_CHR,
VIR_DOMAIN_DEVICE_MEMBALLOON,
+ VIR_DOMAIN_DEVICE_NVRAM,
VIR_DOMAIN_DEVICE_RNG,
VIR_DOMAIN_DEVICE_LAST
@@ -163,6 +167,7 @@ struct _virDomainDeviceDef {
virDomainSmartcardDefPtr smartcard;
virDomainChrDefPtr chr;
virDomainMemballoonDefPtr memballoon;
+ virDomainNVRAMDefPtr nvram;
virDomainRNGDefPtr rng;
} data;
};
@@ -1442,6 +1447,9 @@ struct _virDomainMemballoonDef {
virDomainDeviceInfo info;
};
+struct _virDomainNVRAMDef {
+ virDomainDeviceInfo info;
+};
enum virDomainSmbiosMode {
VIR_DOMAIN_SMBIOS_NONE = 0,
@@ -1883,6 +1891,7 @@ struct _virDomainDef {
/* Only 1 */
virDomainWatchdogDefPtr watchdog;
virDomainMemballoonDefPtr memballoon;
+ virDomainNVRAMDefPtr nvram;
virCPUDefPtr cpu;
virSysinfoDefPtr sysinfo;
virDomainRedirFilterDefPtr redirfilter;
@@ -2041,6 +2050,7 @@ int virDomainChrSourceDefCopy(virDomainChrSourceDefPtr src,
void virDomainSoundCodecDefFree(virDomainSoundCodecDefPtr def);
void virDomainSoundDefFree(virDomainSoundDefPtr def);
void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def);
+void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def);
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
void virDomainVideoDefFree(virDomainVideoDefPtr def);
virDomainHostdevDefPtr virDomainHostdevDefAlloc(void);
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH v2.5 00/10] add support for scsi-generic for virtio-scsi
by Han Cheng
This patch series tried to add support for scsi-generic for virtio-scsi.
Changes from v2:
- Lots of fixs on comments
Thank you guys who reviewed these. Thank you for your help.
There is some work left. As time comes up and I don't have much time to
do this, I'd like to ask Osier to help me finish this. Could you?
TODO:
change readonly to bool and change related managed and missing for
consistency.
Han Cheng (10):
conf: Change help function
docs/schemas: Move PortNumber and sourceinfoadapter to basictypes.rng
conf: Introduce scsi hostdev
qemu: New cap flag for scsi-generic
utils: util functions for scsi hostdev
qemu: Build qemu command line for scsi-generic
qemu: Basic management functions for scsi hostdev
qemu: cgroup and selinux for scsi hostdev
qemu: hotplug support for scsi hostdev
tests: tests for scsi hostdev
docs/formatdomain.html.in | 38
docs/schemas/basictypes.rng | 42 +
docs/schemas/domaincommon.rng | 34
docs/schemas/storagepool.rng | 42 -
po/POTFILES.in | 1
src/Makefile.am | 1
src/conf/domain_audit.c | 10
src/conf/domain_conf.c | 189 ++++
src/conf/domain_conf.h | 14
src/libvirt_private.syms | 24
src/qemu/qemu_capabilities.c | 14
src/qemu/qemu_capabilities.h | 2
src/qemu/qemu_cgroup.c | 67 +
src/qemu/qemu_cgroup.h | 3
src/qemu/qemu_command.c | 138 +++
src/qemu/qemu_command.h | 6
src/qemu/qemu_conf.h | 2
src/qemu/qemu_driver.c | 3
src/qemu/qemu_hostdev.c | 218 +++++
src/qemu/qemu_hostdev.h | 10
src/qemu/qemu_hotplug.c | 211 ++++-
src/qemu/qemu_process.c | 3
src/security/security_selinux.c | 56 +
src/util/virscsi.c | 392 ++++++++++
src/util/virscsi.h | 83 ++
tests/qemuhelpdata/qemu-1.0-device | 10
tests/qemuhelpdata/qemu-1.1.0-device | 10
tests/qemuhelpdata/qemu-1.2.0-device | 5
tests/qemuhelpdata/qemu-kvm-1.2.0-device | 5
tests/qemuhelptest.c | 19
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args | 10
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.xml | 34
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args | 10
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.xml | 35
tests/qemuxml2argvtest.c | 9
tests/qemuxml2xmltest.c | 3
36 files changed, 1624 insertions(+), 129 deletions(-)
11 years, 7 months