[libvirt] [PATCH 0/3] Misc virsh improvements
by Pino Toscano
Hi,
this series provides small improvements for virsh.
The patches are sent as single series as some of the changes would
conflict if sent as different patches.
Thanks,
Pino Toscano (3):
virsh: respect -q/--quiet more
virsh: avoid i18n puzzle
virsh: use vshError consistently after virBufferError checks
tests/virsh-undefine | 4 --
tools/virsh-domain.c | 130 ++++++++++++++++++++++++------------------------
tools/virsh-interface.c | 16 +++---
tools/virsh-network.c | 36 +++++++-------
tools/virsh-nodedev.c | 12 ++---
tools/virsh-nwfilter.c | 6 +--
tools/virsh-pool.c | 30 +++++------
tools/virsh-secret.c | 6 +--
tools/virsh-snapshot.c | 16 +++---
tools/virsh-volume.c | 20 ++++----
10 files changed, 137 insertions(+), 139 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [PATCH] tests: fix segault in objecteventtest
by Roman Bogorodskiy
Test 12 from objecteventtest (createXML add event) segaults on FreeBSD
with bus error.
At some point it calls testNodeDeviceDestroy() from the test driver. And
it fails when it tries to unlock the device in the "out:" label of this
function.
Unlocking fails because the previous step was a call to
virNodeDeviceObjRemove from conf/node_device_conf.c. This function
removes the given device from the device list and cleans up the object,
including destroying of its mutex. However, it does not nullify the pointer
that was given to it.
As a result, we end up in testNodeDeviceDestroy() here:
out:
if (obj)
virNodeDeviceObjUnlock(obj);
And instead of skipping this, we try to do Unlock and fail because of
malformed mutex.
Fix this by nullifying obj passed to virNodeDeviceObjRemove.
---
src/conf/node_device_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index a23d8ef..16b9d93 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -218,6 +218,7 @@ void virNodeDeviceObjRemove(virNodeDeviceObjListPtr devs,
if (devs->objs[i] == dev) {
virNodeDeviceObjUnlock(dev);
virNodeDeviceObjFree(devs->objs[i]);
+ *(void**)dev = NULL;
VIR_DELETE_ELEMENT(devs->objs, i, devs->count);
break;
--
2.7.4
8 years, 3 months
[libvirt] [PATCH] Fix remote_protocol-structs after recent commit
by Peter Krempa
Commit 0adc9d26ae0cfbb4aa227e89424f3d48bb977da0 broke the build since
remote_protocol-structs was not updated.
---
Pushed under the build-breaker rule.
src/remote_protocol-structs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 4552913..b71accc 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -3151,8 +3151,8 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_SET_USER_PASSWORD = 357,
REMOTE_PROC_DOMAIN_RENAME = 358,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION = 359,
- REMOTE_PROC_CONNECT_CLOSE_CALLBACK_REGISTER = 360,
- REMOTE_PROC_CONNECT_CLOSE_CALLBACK_UNREGISTER = 361,
+ REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK = 360,
+ REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK = 361,
REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED = 362,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED = 363,
REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY = 364,
--
2.8.2
8 years, 3 months
[libvirt] [PATCH] qemu: fix ip/route assigning on ethernet device
by Vasiliy Tolstov
After investigation, i found that ips and routes incorrectly assigning on device deletion.
Also after libvirt create tap device it does not up.
Vasiliy Tolstov (1):
qemu: fix ethernet network type ip/route assign
src/qemu/qemu_interface.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [libvirt-python][PATCH] PyArg_ParseTuple: Provide correct function names
by Michal Privoznik
Currently, we parse arguments passed to a python function by
calling PyArg_ParseTuple(). It takes what's called format string
which is something like printf's format string (not that %s would
work for PyArg_ParseTuple). Okay, maybe that wasn't the best
example. Anyway, at the end of the format string we put
:virFunctionName where ':' says "this is the end of argument
list", and virFunctionName is the prefix for error messages then.
However, in some cases we have had wrong names there. Some of
them are actually quite funny: xmlRegisterErrorHandler.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
libvirt-override.c | 24 ++++++++++++------------
libvirt-qemu-override.c | 3 ++-
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 07d1d19..fa3e2ca 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -1510,7 +1510,7 @@ libvirt_virDomainPinEmulator(PyObject *self ATTRIBUTE_UNUSED,
int i_retval;
unsigned int flags;
- if (!PyArg_ParseTuple(args, (char *)"OOI:virDomainPinVcpu",
+ if (!PyArg_ParseTuple(args, (char *)"OOI:virDomainPinEmulator",
&pyobj_domain, &pycpumap, &flags))
return NULL;
@@ -1577,7 +1577,7 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED,
int ret;
int cpunum;
- if (!PyArg_ParseTuple(args, (char *)"OI:virDomainEmulatorPinInfo",
+ if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetEmulatorPinInfo",
&pyobj_domain, &flags))
return NULL;
@@ -1907,7 +1907,7 @@ libvirt_virRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject *self,
PyObject *pyobj_f;
PyObject *pyobj_ctx;
- if (!PyArg_ParseTuple(args, (char *) "OO:xmlRegisterErrorHandler",
+ if (!PyArg_ParseTuple(args, (char *) "OO:virRegisterErrorHandler",
&pyobj_f, &pyobj_ctx))
return NULL;
@@ -2091,7 +2091,7 @@ libvirt_virGetVersion(PyObject *self ATTRIBUTE_UNUSED,
unsigned long libVer, typeVer = 0;
int c_retval;
- if (!PyArg_ParseTuple(args, (char *) "|s", &type))
+ if (!PyArg_ParseTuple(args, (char *) "|s:virGetVersion", &type))
return NULL;
LIBVIRT_BEGIN_ALLOW_THREADS;
@@ -2712,7 +2712,7 @@ libvirt_virDomainGetBlockInfo(PyObject *self ATTRIBUTE_UNUSED,
const char *path;
unsigned int flags;
- if (!PyArg_ParseTuple(args, (char *)"OzI:virDomainGetInfo",
+ if (!PyArg_ParseTuple(args, (char *)"OzI:virDomainGetBlockInfo",
&pyobj_domain, &path, &flags))
return NULL;
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
@@ -2750,7 +2750,7 @@ libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *pyobj_conn;
virNodeInfo info;
- if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetInfo", &pyobj_conn))
+ if (!PyArg_ParseTuple(args, (char *)"O:virNodeGetInfo", &pyobj_conn))
return NULL;
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
@@ -2865,7 +2865,7 @@ libvirt_virDomainGetSecurityLabelList(PyObject *self ATTRIBUTE_UNUSED,
virSecurityLabel *labels = NULL;
size_t i;
- if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetSecurityLabel",
+ if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetSecurityLabelList",
&pyobj_dom))
return NULL;
@@ -7338,7 +7338,7 @@ libvirt_virConnectUnregisterCloseCallback(PyObject * self ATTRIBUTE_UNUSED,
virConnectPtr conn;
int ret = 0;
- if (!PyArg_ParseTuple(args, (char *) "O:virConnectDomainEventUnregister",
+ if (!PyArg_ParseTuple(args, (char *) "O:virConnectUnregisterCloseCallback",
&pyobj_conn))
return NULL;
@@ -7482,7 +7482,7 @@ libvirt_virStreamSend(PyObject *self ATTRIBUTE_UNUSED,
Py_ssize_t datalen;
int ret;
- if (!PyArg_ParseTuple(args, (char *) "OO:virStreamRecv",
+ if (!PyArg_ParseTuple(args, (char *) "OO:virStreamSend",
&pyobj_stream, &pyobj_data))
return NULL;
@@ -8311,7 +8311,7 @@ libvirt_virNetworkGetDHCPLeases(PyObject *self ATTRIBUTE_UNUSED,
char *mac = NULL;
size_t i;
- if (!PyArg_ParseTuple(args, (char *) "OzI:virNetworkDHCPLeasePtr",
+ if (!PyArg_ParseTuple(args, (char *) "OzI:virNetworkGetDHCPLeases",
&pyobj_network, &mac, &flags))
return NULL;
@@ -8610,7 +8610,7 @@ libvirt_virDomainGetFSInfo(PyObject *self ATTRIBUTE_UNUSED,
size_t j;
PyObject *py_retval = NULL;
- if (!PyArg_ParseTuple(args, (char *)"OI:virDomainFSInfo",
+ if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetFSInfo",
&pyobj_domain, &flags))
return NULL;
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
@@ -8952,7 +8952,7 @@ libvirt_virConnectStoragePoolEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
virConnectPtr conn;
int ret = 0;
- if (!PyArg_ParseTuple(args, (char *) "Oi:virConnectStoragePoolEventDeregister",
+ if (!PyArg_ParseTuple(args, (char *) "Oi:virConnectStoragePoolEventDeregisterAny",
&pyobj_conn, &callbackID))
return NULL;
diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c
index f2e876a..f166f6e 100644
--- a/libvirt-qemu-override.c
+++ b/libvirt-qemu-override.c
@@ -270,7 +270,8 @@ libvirt_qemu_virConnectDomainQemuMonitorEventRegister(PyObject *self ATTRIBUTE_U
virDomainPtr dom;
unsigned int flags;
- if (!PyArg_ParseTuple(args, (char *) "OOzOI", &pyobj_conn, &pyobj_dom,
+ if (!PyArg_ParseTuple(args, (char *) "OOzOI:virConnectDomainQemuMonitorEventRegister",
+ &pyobj_conn, &pyobj_dom,
&event, &pyobj_cbData, &flags))
return NULL;
--
2.8.4
8 years, 3 months
[libvirt] [PATCH v2 00/23] qemu: Add support for new vcpu hotplug and unplug
by Peter Krempa
Version 2 attempts to address feedback on v1:
- added more documentation
- fixed various typos
- fixed bugs appearing when restarting daemon
- fixed fallback code
- tested upgrade of libvirt
Some of the patches were already pushed and this series is rebased on top
of that changes.
Patches 1-18 with exception of 16 were more or less ACKed already.
I've dropped the last patch adding the events from this series. I'm working on
adding a new event for vcpu lifecycle. I'm also working on reporting of the
vcpu granularity via the domcapabilities API. I'm going to post those
separately as well as the new API that will allow modifying the vcpus
individually.
Peter Krempa (23):
qemu: monitor: Return structures from qemuMonitorGetCPUInfo
qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs
qemu: caps: Add capability for query-hotpluggable-cpus command
qemu: Forbid config when topology based cpu count doesn't match the
config
qemu: capabilities: Extract availability of new cpu hotplug for
machine types
qemu: monitor: Extract QOM path from query-cpus reply
qemu: monitor: Add support for calling query-hotpluggable-cpus
qemu: monitor: Add algorithm for combining query-(hotpluggable-)-cpus
data
tests: Add test infrastructure for qemuMonitorGetCPUInfo
tests: cpu-hotplug: Add data for ppc64 platform including hotplug
tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug
tests: cpu-hotplug: Add data for ppc64 without threads enabled
qemu: domain: Extract cpu-hotplug related data
qemu: domain: Prepare for VCPUs vanishing while libvirt is not running
util: Extract and rename qemuDomainDelCgroupForThread to
virCgroupDelThread
conf: Add XML for individual vCPU hotplug
qemu: migration: Prepare for non-contiguous vcpu configurations
qemu: command: Add helper to convert vcpu definition to JSON props
qemu: process: Copy final vcpu order information into the vcpu
definition
qemu: command: Add support for sparse vcpu topologies
qemu: Use mondern vcpu hotplug approach if possible
qemu: hotplug: Allow marking unplugged devices by alias
qemu: hotplug: Add support for VCPU unplug
docs/formatdomain.html.in | 40 +++
docs/schemas/domaincommon.rng | 25 ++
src/conf/domain_conf.c | 152 +++++++++-
src/conf/domain_conf.h | 6 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 31 +-
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 50 +++-
src/qemu/qemu_command.h | 3 +
src/qemu/qemu_domain.c | 312 +++++++++++++++++----
src/qemu/qemu_domain.h | 19 +-
src/qemu/qemu_driver.c | 246 +++++++++-------
src/qemu/qemu_hotplug.c | 124 +++++++-
src/qemu/qemu_hotplug.h | 7 +
src/qemu/qemu_migration.c | 16 +-
src/qemu/qemu_monitor.c | 260 ++++++++++++++++-
src/qemu/qemu_monitor.h | 58 +++-
src/qemu/qemu_monitor_json.c | 266 +++++++++++++++---
src/qemu/qemu_monitor_json.h | 8 +-
src/qemu/qemu_monitor_text.c | 41 +--
src/qemu/qemu_monitor_text.h | 3 +-
src/qemu/qemu_process.c | 182 +++++++++++-
src/util/vircgroup.c | 20 ++
src/util/vircgroup.h | 4 +
.../generic-vcpus-individual.xml | 23 ++
tests/genericxml2xmltest.c | 2 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 55 ++--
.../qemumonitorjson-cpuinfo-ppc64-basic-cpus.json | 77 +++++
...emumonitorjson-cpuinfo-ppc64-basic-hotplug.json | 27 ++
.../qemumonitorjson-cpuinfo-ppc64-basic.data | 40 +++
...mumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 149 ++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json | 28 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-1.data | 51 ++++
...mumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 221 +++++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json | 29 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-2.data | 62 ++++
...mumonitorjson-cpuinfo-ppc64-hotplug-4-cpus.json | 221 +++++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-4-hotplug.json | 29 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data | 62 ++++
...umonitorjson-cpuinfo-ppc64-no-threads-cpus.json | 77 +++++
...nitorjson-cpuinfo-ppc64-no-threads-hotplug.json | 125 +++++++++
.../qemumonitorjson-cpuinfo-ppc64-no-threads.data | 72 +++++
...nitorjson-cpuinfo-x86-basic-pluggable-cpus.json | 50 ++++
...orjson-cpuinfo-x86-basic-pluggable-hotplug.json | 82 ++++++
...emumonitorjson-cpuinfo-x86-basic-pluggable.data | 39 +++
tests/qemumonitorjsontest.c | 183 +++++++++++-
.../qemuxml2argv-cpu-hotplug-startup.args | 20 ++
.../qemuxml2argv-cpu-hotplug-startup.xml | 29 ++
tests/qemuxml2argvtest.c | 2 +
tests/testutils.c | 4 +-
50 files changed, 3360 insertions(+), 276 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-vcpus-individual.xml
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable.data
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.xml
--
2.8.2
8 years, 3 months
[libvirt] libvirt-python virNodeGetInfo returns None
by Christian Loehle
I'm trying to use virt-manager with a custom libvirt hypervisor driver.
My current problem is that virt-manager closes the connection because virNodeGetInfo(the python binding) returns None:
Traceback (most recent call last):
File "/home/cloehle/Documents/libvirt/virt-manager/virtManager/connection.py", line 1390, in tick_from_engine
self._tick(*args, **kwargs)
File "/home/cloehle/Documents/libvirt/virt-manager/virtManager/connection.py", line 1280, in _tick
self._hostinfo = self._backend.getInfo()
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3612, in getInfo
if ret is None: raise libvirtError ('virNodeGetInfo() failed', conn=self)
libvirtError: internal error: client socket is closed
The virNodeGetInfo function of my driver should set a valid virNodeInfoPtr, since it only consists of the line:
return nodeGetInfo(NULL, info);
virsh shows no problems which is why I suspect this is a problem with libvirt-python.
So I looked at the source and the first thing that I noticed is in line 2753 of libvirt-override.c:
if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetInfo", &pyobj_conn))
return NULL;
Since this is for virNodeGetInfo this should probably be virNodeGetInfo instead of domain(the same thing occurs in line 2794 for another function).
This could be my source of error but doesn't have to be. Could someone walk me through finding the reason why libvirt-python returns None for my virNodeGetInfo?
Is there any good way of debugging where exactly libvirt-python encounters an error and returns None?
Any help appreciated,
Christian Loehle
8 years, 3 months
[libvirt] Does libvirt live migration have error handling on port bind failure
by Prasanna Kalever
Hello,
This was the scenario close to 3 years back, libvirt's live migration
tries to use ports in ephemeral port range, but has no fallback to use
(an)other port(s) when the one it wants is already in use.
If some port say 49152 is already used by some application say gluster
in our case (gluster as of today also uses 49152-65535), live
migration fails because of lack of fallback mechanism in libvirt,
that's where gluster had compromised to go with some hack [1] on bug
[2] since getting that addressed in libvirt takes more time than it
does with gluster.
As may releases passed from then in libvirt, I hope now there exist a
fallback mechanism for port conflicts in libvirt.
Can someone confirm so ?
Also It will be greatly appreciable, if someone can tell how the port
binding (mostly defense on clash) works with libvirt live migration
today ?
Sincere Thanks,
--
Prasanna
8 years, 3 months
[libvirt] [PATCH 0/9] add ACL checks to vz driver
by Nikolay Shirokovskiy
First (patches 1 - 8) prepare driver to add checks.
Nikolay Shirokovskiy (9):
vz: expand start/stop/... APIs for ACL checks
vz: implement plain create API thru createFlags instead of visa versa
vz: factor out block stats impl
vz: factor out converting block stats to params
vz: add missing flagged versions of API functions
vz: expand setting memory API calls
vz: prepare migration for ACL checks
remote: rename protocol names for close callbacks
vz: add ACL checks to API calls
daemon/remote.c | 4 +-
src/Makefile.am | 5 +-
src/check-aclrules.pl | 1 +
src/remote/remote_driver.c | 4 +-
src/remote/remote_protocol.x | 8 +-
src/vz/vz_driver.c | 889 +++++++++++++++++++++++++++++++++++--------
src/vz/vz_sdk.c | 172 ++++-----
src/vz/vz_sdk.h | 23 +-
8 files changed, 828 insertions(+), 278 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH RFC 0/5] Remove usb address set caching
by Tomasz Flendrich
During my work on removing addresses caching, usb addresses were added :).
It should be applied on top of:
https://www.redhat.com/archives/libvir-list/2016-August/msg00945.html
or some small conflicts appear.
I took an approach where exactly the same function is used to both
calculate and recalculate the address set. It forces us to keep all
the usb address handling in such state that reusing that function
doesn't perform any changes that aren't needed.
It might even be possible to unify the handling of usb devices into
one function, "qemuDomainAssignUSBAddresses", and remove some code.
For example, virDomainUSBAddressEnsure looks almost exactly like
qemuDomainAssignUSBPorts plus virDomainUSBAddressReserve. The end goal
would be simply calling qemuDomainAssignUSBAddresses() as many times
as we want, for example when creating a new domain or after a hotplug.
To see what I mean, please take a look at qemuDomainAttachUSBMassStorageDevice.
If I remove the call to virDomainUSBAddressEnsure and move creating the
USB address set somewhere down (after virDomainDiskInsertPreAlloced),
it works - the address is assigned flawlessly.
Does it make any sense?
Is there any reason why we don't add new usb hubs when hotplugging
devices?
By the way please excuse me for resending an old patch series a few
minutes ago, it was an accident.
Tomasz Flendrich (5):
Add qemuDomainUSBAddrSetCreateFromDomain
qemu_hotplug: use a recalculated usb address set
remove qemuDomainReleaseDeviceAddress and its uses
remove unused virDomainUSBAddressRelease
Add a USB hotplug testcase for reattachment
src/conf/domain_addr.c | 30 -------------
src/conf/domain_addr.h | 5 ---
src/libvirt_private.syms | 1 -
src/qemu/qemu_domain.c | 3 +-
src/qemu/qemu_domain.h | 2 -
src/qemu/qemu_domain_address.c | 62 ++++++++++++---------------
src/qemu/qemu_domain_address.h | 8 ++--
src/qemu/qemu_hotplug.c | 95 +++++++++++-------------------------------
src/qemu/qemu_process.c | 6 +--
tests/qemuhotplugtest.c | 7 +++-
10 files changed, 62 insertions(+), 157 deletions(-)
--
1.9.1
8 years, 3 months