[libvirt] [PATCH] qemu: Don't assign alias to disabled balloon device
by Jiri Denemark
<memballoon model='none'/> is the only way to disable balloon driver
since libvirt will add one automatically if the memballoon element is
missing. In other words, there's no balloon device if model is 'none'
and generating an alias for it makes no sense. The alias will be ignored
when parsing the XML and it will disappear once libvirtd is restarted.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_alias.c | 3 ++-
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml | 4 +---
...muhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 4 +---
.../qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml | 4 +---
...emuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml | 4 +---
.../qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 4 +---
.../qemuhotplug-base-ccw-live-with-ccw-virtio.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml | 4 +---
.../qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml | 4 +---
.../qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml | 4 +---
.../qemuhotplug-base-live+watchdog-user-alias.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml | 4 +---
tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml | 4 +---
.../qemuhotplug-base-with-scsi-controller-live.xml | 4 +---
.../qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml | 4 +---
20 files changed, 21 insertions(+), 58 deletions(-)
diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c
index d0ca15bae2..95d1e0370a 100644
--- a/src/qemu/qemu_alias.c
+++ b/src/qemu/qemu_alias.c
@@ -612,7 +612,8 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
if (qemuAssignDeviceWatchdogAlias(def->watchdog) < 0)
return -1;
}
- if (def->memballoon) {
+ if (def->memballoon &&
+ def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) {
if (qemuAssingDeviceMemballoonAlias(def->memballoon, 0) < 0)
return -1;
}
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
index 75948f324e..f501cde333 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
@@ -50,9 +50,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
index bb9d427c2f..223e929ad5 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
@@ -60,9 +60,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
index c41f5affdd..c745d48558 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
@@ -50,9 +50,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
index b1114dba9b..3189294b65 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
@@ -59,9 +59,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
index b1114dba9b..3189294b65 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
@@ -59,9 +59,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
index 3476f61db5..edf57fcd3f 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
@@ -49,9 +49,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
index 3a202d069e..b97bba78c6 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
@@ -40,9 +40,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<panic model='s390'/>
</devices>
<seclabel type='none' model='none'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
index 4c3ea3202b..035ec25304 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
@@ -66,9 +66,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
index 493a615fd3..dd65a48057 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
@@ -54,9 +54,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
index 3609819ea3..c161e5b289 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
@@ -54,9 +54,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
index b88b220e33..299d595d6e 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
@@ -54,9 +54,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
index 11ffd9fba8..a6930bfa69 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
@@ -44,9 +44,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<shmem name='shmem0'>
<model type='ivshmem-plain'/>
<size unit='M'>4</size>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
index 9736f6bda7..757b6b0980 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
@@ -44,9 +44,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
<shmem name='shmem0'>
<model type='ivshmem-plain'/>
<size unit='M'>4</size>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
index 051273ccf6..b1ba51b2d8 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
@@ -50,9 +50,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
index 27aff2b6f8..1fddd68a27 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
@@ -48,9 +48,7 @@
<alias name='ua-UserWatchdog'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</watchdog>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
index 9f8f983e5d..76b573f25c 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
@@ -48,9 +48,7 @@
<alias name='watchdog0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</watchdog>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
index 67cf41ad6b..d46e20fa58 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
@@ -44,9 +44,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
index d23d3d483e..5ee6ea25c3 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
@@ -48,9 +48,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
index cceb678bb9..d35fea6f5f 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
@@ -58,9 +58,7 @@
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
- <memballoon model='none'>
- <alias name='balloon0'/>
- </memballoon>
+ <memballoon model='none'/>
</devices>
<seclabel type='none' model='none'/>
</domain>
--
2.16.2
7 years, 1 month
[libvirt] [PATCH 00/22] Python tweaks
by Radostin Stoyanov
These patches improve the code style of python code
by applying some PEP8 recommendations and simplifying
some functions.
Radostin Stoyanov (22):
apibuild: Use isinctance for type checking
apibuild: Split imports on separate lines
apibuild: Remove whitespace before ',' and ':'
python: Add whitespace around = and % operators
esx_vi_generator: Simplify generate_helper_source
esx_vi_generator: Simplify generate_helper_header
esx_vi_generator: Simplify get_occurrence_comment
esx_vi_generator: Simplify alignment function
apibuild: Simplify conditional statements
python: Remove space around = in keyword args
WmiClass: Don't share "versions" between instances
apibuild: Simplify uniq function
apibuild: Avoid double sorting of ids
python3: cpu-reformat: Use the print() function
apibuild: Drop backslash between brackets
apibuild: Fix indentation not multiple of 4
apibuild: Simplify strip_lead_star()
apibuild: Simplify parseTypeComment()
apibuild: Simplify type checking of literals
apibuild: Use list comprehension insteand of map
apibuild: Simplify merging of preproc tokens
apibuild: Simplify parsing string tokens
docs/apibuild.py | 643 +++++++++++++++++--------------------
docs/index.py | 54 ++--
src/esx/esx_vi_generator.py | 179 +++++------
src/hyperv/hyperv_wmi_generator.py | 36 ++-
tests/cputestdata/cpu-cpuid.py | 6 +-
tests/cputestdata/cpu-reformat.py | 6 +-
6 files changed, 424 insertions(+), 500 deletions(-)
--
2.14.3
7 years, 1 month
[libvirt] [PATCH v5 0/9] Add setting CPU features (CPUID) with libxenlight driver.
by Marek Marczykowski-Górecki
Add support for CPUID setting based on <cpu> element. Since libxl format
support only adjusting specific bits over host CPU, only
mode='host-passthrough' is supported - other values are rejected (including
default 'custom'). This will break some configurations working before (bare
<cpu> element with for example NUMA configuration), but libxl driver never
supported full 'custom' mode - it was silently ignored, which might lead to
some unexpected effects.
Since mode='host-passthrough' is now necessary to specify CPU options, do not
enable nested HVM feature by mere presence of this element, require also
enabling it in libxl.conf. Nested HVM is still in "preview" state, so better be
explicit here.
v2 of this patch series:
https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html
v3 of this patch series:
https://www.redhat.com/archives/libvir-list/2017-December/msg00314.html
v4 of this patch series:
https://www.redhat.com/archives/libvir-list/2018-February/msg00504.html
Marek Marczykowski-Górecki (9):
libxl: fix libxlDriverConfigDispose for partially constructed object
libxl: pass driver config to libxlMakeDomBuildInfo
libxl: error out on not supported CPU mode, instead of silently ignoring
libxl: do not enable nested HVM unless global nested_hvm option enabled
xenconfig: do not override def->cpu if already set elsewhere
libxl: add support for CPUID features policy
tests: check CPU features handling in libxl driver
xenconfig: add CPUID handling to domXML <-> xl.cfg conversion
tests: add test case for CPUID in xenconfig driver
src/libxl/libvirtd_libxl.aug | 2 +-
src/libxl/libxl.conf | 8 +-
src/libxl/libxl_conf.c | 70 ++-
src/libxl/libxl_conf.h | 6 +-
src/libxl/libxl_domain.c | 7 +-
src/libxl/test_libvirtd_libxl.aug.in | 1 +-
src/xenconfig/xen_xl.c | 238 ++++++++-
src/xenconfig/xen_xl.h | 2 +-
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 64 ++-
tests/libxlxml2domconfigdata/fullvirt-cpuid.xml | 37 +-
tests/libxlxml2domconfigtest.c | 27 +-
tests/virmocklibxl.c | 25 +-
tests/xlconfigdata/test-fullvirt-cpuid.cfg | 25 +-
tests/xlconfigdata/test-fullvirt-cpuid.xml | 35 +-
tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg | 1 +-
tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg | 1 +-
tests/xlconfigdata/test-fullvirt-vnuma-nodistances.xml | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg | 1 +-
tests/xlconfigdata/test-fullvirt-vnuma-partialdist.xml | 2 +-
tests/xlconfigdata/test-fullvirt-vnuma.cfg | 1 +-
tests/xlconfigdata/test-fullvirt-vnuma.xml | 2 +-
tests/xlconfigtest.c | 1 +-
23 files changed, 509 insertions(+), 51 deletions(-)
create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.json
create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.xml
base-commit: 6ce3acc129bfdbe7fd02bcb8bbe8af6d13903684
--
git-series 0.9.1
7 years, 1 month
[libvirt] [dbus PATCH 0/8] some improvements and rewrite to GDBus
by Pavel Hrdina
Pavel Hrdina (8):
configure: call AC_PROG_CC_STDC to enable C99 if necessary
configure: use LIBVIRT_ARG_WITH macro
spec: explicitly require gcc
m4: remove gnulib compile warning exceptions
maint: set the first minimal version that will be released
introduce support for GDBus implementation
switch from sd-bus to GDBus implementation
main: introduce thread pool to process D-Bus messages
README | 2 +-
configure.ac | 53 ++--
data/Makefile.am | 7 +
data/org.libvirt.Connect.xml | 56 ++++
data/org.libvirt.Domain.xml | 51 +++
libvirt-dbus.spec.in | 11 +-
m4/virt-compile-warnings.m4 | 37 ---
src/Makefile.am | 20 +-
src/connect.c | 320 ++++++++-----------
src/connect.h | 36 +--
src/domain.c | 729 +++++++++++++++++++------------------------
src/domain.h | 7 +-
src/events.c | 177 +++++------
src/gdbus.c | 448 ++++++++++++++++++++++++++
src/gdbus.h | 99 ++++++
src/main.c | 307 ++++++++----------
src/util.c | 170 +++++-----
src/util.h | 53 ++--
test/Makefile.am | 3 +-
test/travis-run | 2 +-
20 files changed, 1468 insertions(+), 1120 deletions(-)
create mode 100644 data/org.libvirt.Connect.xml
create mode 100644 data/org.libvirt.Domain.xml
create mode 100644 src/gdbus.c
create mode 100644 src/gdbus.h
--
2.14.3
7 years, 1 month
[libvirt] [PATCH] pci: Ignore 32-bit PCIe domains
by Keith Busch
Intel VMD creates secondary PCIe domain, where child devices in this
domain are aggregated behind a single end point. Linux exposes these
as special 32-bit domains, and devices in them are not individually
assignable.
This patch ignores devices in such domains as desired, and prevents
logging excessive errors, like:
internal error: dev->name buffer overflow: 10000:00:00.0
Cc: Jonathan Derrick <jonathan.derrick(a)intel.com>
Signed-off-by: Keith Busch <keith.busch(a)intel.com>
---
src/util/virpci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 55e4c3e49..53a6f2e51 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1762,6 +1762,13 @@ virPCIDeviceNew(unsigned int domain,
char *vendor = NULL;
char *product = NULL;
+
+ /* Devices in a 32-bit domain are special. Currently applicable to Intel
+ * VMD PCIe, where individual devices are not individually assignable.
+ */
+ if (domain > USHRT_MAX)
+ return NULL;
+
if (VIR_ALLOC(dev) < 0)
return NULL;
--
2.14.3
7 years, 1 month
[libvirt] [PATCH] virt-aa-helper: resolve file symlinks
by Christian Ehrhardt
In a recent change b932ed69: "virt-aa-helper: resolve yet to be created
paths" several cases with symlinks in paths were fixed, but it regressed
cases where the file being last element of the path was the actual link.
In the case of the last element being the symlink realpath can (and shall)
be called on the full path that was passed.
Examples would be zfs/lvm block devices like:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/mapper/testlvm-testvol1'/>
<target dev='vdd' bus='virtio'/>
</disk>
With the target being:
/dev/mapper/testlvm-testvol1 -> ../dm-0
That currently is rendered as
"/dev/mapper/testlvm-testvol1" rwk,
but instead should be (and is with the fix):
"/dev/dm-0" rwk,
Fixes: b932ed69: "virt-aa-helper: resolve yet to be created paths"
Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1756394
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
---
src/security/virt-aa-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 992bd44..456cfce 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -777,7 +777,7 @@ vah_add_path(virBufferPtr buf, const char *path, const char *perms, bool recursi
* 3. re-combine the realpath with the remaining suffix
* Note: A totally non existent path is used as-is
*/
- if ((pathdir = mdir_name(path)) == NULL)
+ if (VIR_STRDUP_QUIET(pathdir, path) < 0)
goto cleanup;
while (!virFileExists(pathdir)) {
if ((pathtmp = mdir_name(pathdir)) == NULL)
--
2.7.4
7 years, 1 month
[libvirt] [PATCH tck] Relabel SELinux when customizing virt-builder image
by Daniel P. Berrangé
When you tell virt-builder to install extra RPMs, this potentially
looses the SELinux labelling that Anaconda had originally setup. Thus we
must tell virt-builder to enable SELinux relabelling.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
lib/Sys/Virt/TCK.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index e9da8d2..b39f578 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -405,7 +405,7 @@ sub create_virt_builder_disk {
}
print "# running virt-builder $osname\n";
- system "virt-builder", "--install", "dsniff", "--root-password", "password:$password", "--output", $target, $osname;
+ system "virt-builder", "--install", "dsniff", "--selinux-relabel", "--root-password", "password:$password", "--output", $target, $osname;
die "cannot run virt-builder: $?" if $? != 0;
--
2.14.3
7 years, 1 month
[libvirt] [PATCH 0/2] python3: Further minor tweaks
by Andrea Bolognani
Andrea Bolognani (2):
docs: Import print_function in reformat-news.py
python: Drop explicit version where possible
docs/reformat-news.py | 4 +++-
src/esx/esx_vi_generator.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.14.3
7 years, 1 month
[libvirt] [PATCH v2 0/2] Fix the odd VFIO error for a non-existent mdev when IOMMU is disabled
by Erik Skultety
Unlike GPU assignment, mdev doesn't need the IOMMU to be enabled within kernel,
since the physical parent device takes care of the isolation, i.e. there's an
IOMMU group entry for each mdev created under sysfs, thus a VM can start
successfully.
Since v1:
- adjusted the error msg in patch 1 according to reviewer
- rephrased the commit message for patch 2 to make it less confusing
Erik Skultety (2):
util: mdev: Improve the error msg on non-existent mdev prior to VM
start
qemu: hostdev: Fix the error on VM start with an mdev when IOMMU is
off
src/qemu/qemu_hostdev.c | 7 ++++++-
src/util/virmdev.c | 16 +++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
--
2.13.6
7 years, 1 month
[libvirt] [PATCH] virNetlinkDumpCommand: Don't leak response buffer
by Michal Privoznik
==16451== 32,768 bytes in 2 blocks are definitely lost in loss record 1,007 of 1,013
==16451== at 0x4C2AF0F: malloc (vg_replace_malloc.c:299)
==16451== by 0x7CADB40: nl_recv (in /usr/lib64/libnl-3.so.200.23.0)
==16451== by 0x532DFAC: virNetlinkDumpCommand (virnetlink.c:363)
==16451== by 0x53236AE: virNetDevIPCheckIPv6Forwarding (virnetdevip.c:641)
==16451== by 0xE3E4A1A: networkStartNetworkVirtual (bridge_driver.c:2490)
==16451== by 0xE3E55F5: networkStartNetwork (bridge_driver.c:2832)
==16451== by 0xE3DFFE5: networkAutostartConfig (bridge_driver.c:531)
==16451== by 0x53F47E0: virNetworkObjListForEachHelper (virnetworkobj.c:1412)
==16451== by 0x52FE69F: virHashForEach (virhash.c:606)
==16451== by 0x53F4857: virNetworkObjListForEach (virnetworkobj.c:1439)
==16451== by 0xE3E0BF4: networkStateAutoStart (bridge_driver.c:808)
==16451== by 0x55689CE: virStateInitialize (libvirt.c:758)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virnetlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 0e281b06b8..955f1558ee 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -360,6 +360,7 @@ virNetlinkDumpCommand(struct nl_msg *nl_msg,
goto cleanup;
while (!end) {
+ VIR_FREE(resp);
len = nl_recv(nlhandle, &nladdr, (unsigned char **)&resp, NULL);
VIR_WARNINGS_NO_CAST_ALIGN
for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) {
@@ -378,6 +379,7 @@ virNetlinkDumpCommand(struct nl_msg *nl_msg,
ret = 0;
cleanup:
+ VIR_FREE(resp);
virNetlinkFree(nlhandle);
return ret;
}
--
2.16.1
7 years, 1 month