[libvirt] [PATCH v2 0/3] unplug timeout changes for PPC64
by Daniel Henrique Barboza
This is a redesign of the previous patch series [1].
After the reviews of the first version, I ended up discarding
the idea of a qemu user configuration for the unplug timeout
value. Instead, this patch series now handles the problematic
case of PPC64 guests with an exclusive PPC64 only timeout
value of 10 seconds.
Patch 3 now changes how the 'unplug timeout' message is
reported, using VIR_ERR_OPERATION_TIMEOUT instead of
VIR_ERR_OPERATION_FAILED and making it clearer that
the timeout does not equal to unplug failed.
[1] https://www.redhat.com/archives/libvir-list/2019-August/msg00698.html
Daniel Henrique Barboza (3):
qemu: use a bigger unplug timeout for PPC64 guests
qemu: Remove qemu_hotplugpriv.h and qemuDomainRemoveDeviceWaitTime
qemu_hotplug: make setvcpus timeout error message user-friendlier
src/qemu/Makefile.inc.am | 1 -
src/qemu/qemu_conf.h | 3 +++
src/qemu/qemu_driver.c | 11 +++++++++++
src/qemu/qemu_hotplug.c | 21 +++++++++------------
src/qemu/qemu_hotplugpriv.h | 32 --------------------------------
tests/qemuhotplugtest.c | 3 +--
6 files changed, 24 insertions(+), 47 deletions(-)
delete mode 100644 src/qemu/qemu_hotplugpriv.h
--
2.21.0
5 years, 1 month
[libvirt] [PATCH v2 1/3] libxl: add acpi slic table support
by Marek Marczykowski-Górecki
From: Ivan Kardykov <kardykov(a)tabit.pro>
Libxl driver did not support setup additional acpi firmware to xen
guest. It is necessary to activate OEM Windows installs. This patch
allow to define in OS section acpi table param (which supported domain
common schema).
Signed-off-by: Ivan Kardykov <kardykov(a)tabit.pro>
[added info to docs/formatdomain.html.in]
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
docs/formatdomain.html.in | 3 ++-
src/libxl/libxl_conf.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 86a5261..c80f09a 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -363,7 +363,8 @@
<dd>The <code>table</code> element contains a fully-qualified path
to the ACPI table. The <code>type</code> attribute contains the
ACPI table type (currently only <code>slic</code> is supported)
- <span class="since">Since 1.3.5 (QEMU only)</span></dd>
+ <span class="since">Since 1.3.5 (QEMU)</span>
+ <span class="since">Since 5.8.0 (Xen)</span></dd>
</dl>
<h4><a id="elementsOSContainer">Container boot</a></h4>
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index c76704a..c0d4861 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -506,6 +506,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
def->features[VIR_DOMAIN_FEATURE_ACPI] ==
VIR_TRISTATE_SWITCH_ON);
+ /* copy SLIC table path to acpi_firmware */
+ if (def->os.slic_table &&
+ VIR_STRDUP(b_info->u.hvm.acpi_firmware, def->os.slic_table) < 0)
+ return -1;
+
if (def->nsounds > 0) {
/*
* Use first sound device. man xl.cfg(5) describes soundhw as
base-commit: 281a7f1d400aeb0d4d53dd3b628b7275f49854d0
--
git-series 0.9.1
5 years, 1 month
[libvirt] [PATCH 0/5] security_stack: Perform rollback if one of stacked drivers fails
by Michal Privoznik
See 5/5 for explanation.
Michal Prívozník (5):
security: Pass @migrated to virSecurityManagerSetAllLabel
security: Rename virSecurityManagerGetDriver() to
virSecurityManagerGetVirtDriver()
security: Introduce virSecurityManagerGetDriver()
security_stack: Turn list of nested drivers into a doubly linked list
security_stack: Perform rollback if one of stacked drivers fails
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_process.c | 3 +-
src/qemu/qemu_security.c | 6 +-
src/qemu/qemu_security.h | 3 +-
src/security/security_apparmor.c | 3 +-
src/security/security_dac.c | 3 +-
src/security/security_driver.h | 3 +-
src/security/security_manager.c | 17 ++-
src/security/security_manager.h | 4 +-
src/security/security_nop.c | 3 +-
src/security/security_selinux.c | 9 +-
src/security/security_stack.c | 220 +++++++++++++++++++++++++------
tests/qemusecuritytest.c | 2 +-
tests/securityselinuxlabeltest.c | 2 +-
14 files changed, 222 insertions(+), 58 deletions(-)
--
2.21.0
5 years, 1 month
[libvirt] [PATCH v3 00/12] hostdev: handle usb detach/attach on node
by Nikolay Shirokovskiy
Diff to v2[1] version:
- add 'replug' attribute for hostdev element to allow replug semantics
- avoid accuiring domain lock in event loop thread on udev events as
suggested by Peter
- nit picks after review by Daniel Henrique Barboza
* is used to mark patches that were 'Reviewed-by' by Daniel (sometimes
with very minor changes to take into account new replug flag).
[1] https://www.redhat.com/archives/libvir-list/2019-September/msg00321.html
Nikolay Shirokovskiy (12):
conf: add replug option for usb hostdev
qemu: track hostdev delete intention
qemu: support host usb device unplug *
qemu: support usb hostdev plugging back *
qemu: handle host usb device add/del udev events
qemu: handle libvirtd restart after host usb device unplug *
qemu: handle race on device deletion and usb host device plugging *
qemu: hotplug: update device list on device deleted event
qemu: handle host usb device plug/unplug when libvirtd is down *
qemu: don't mess with non mandatory hostdevs on reattaching *
qemu: handle detaching of unplugged hostdev
conf: parse hostdev missing flag *
docs/formatdomain.html.in | 10 +-
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 62 +++
src/conf/domain_conf.h | 17 +
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_conf.h | 3 +
src/qemu/qemu_domain.c | 2 +
src/qemu/qemu_domain.h | 2 +
src/qemu/qemu_driver.c | 404 +++++++++++++++++-
src/qemu/qemu_hotplug.c | 104 ++++-
src/qemu/qemu_hotplug.h | 3 +-
src/qemu/qemu_process.c | 60 +++
src/util/virhostdev.c | 2 +
tests/qemuhotplugtest.c | 2 +-
tests/qemuxml2argvdata/hostdev-usb-replug.xml | 36 ++
.../qemuxml2xmloutdata/hostdev-usb-replug.xml | 40 ++
tests/qemuxml2xmltest.c | 1 +
17 files changed, 733 insertions(+), 22 deletions(-)
create mode 100644 tests/qemuxml2argvdata/hostdev-usb-replug.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-usb-replug.xml
--
2.23.0
5 years, 1 month
[libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
by Li Feng
Hi Guys,
And I want to add the vhost-user-scsi-pci/vhost-user-blk-pci support
for libvirt.
The usage in qemu like this:
Vhost-SCSI
-chardev socket,id=char0,path=/var/tmp/vhost.0
-device vhost-user-scsi-pci,id=scsi0,chardev=char0
Vhost-BLK
-chardev socket,id=char1,path=/var/tmp/vhost.1
-device vhost-user-blk-pci,id=blk0,chardev=char1
What type should I add for libvirt.
Type1:
<hostdev mode='subsystem' type='vhost-user'>
<source protocol='vhost-user-scsi' path='/tmp/vhost-scsi.sock'></source>
<alias name="vhost-user-scsi-disk1"/>
</hostdev>
Type2:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source protocol='vhost-user' path='/tmp/vhost-scsi.sock'>
</source>
<target dev='sdb' bus='vhost-user-scsi'/>
<boot order='3'/>
<alias name='scsi0-0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source protocol='vhost-user' path='/tmp/vhost-blk.sock'>
</source>
<target dev='vda' bus='vhost-user-blk'/>
<boot order='1'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
</disk>
Could anyone give some suggestions?
Thanks,
Feng Li
--
The SmartX email address is only for business purpose. Any sent message
that is not related to the business is not authorized or permitted by
SmartX.
本邮箱为北京志凌海纳科技有限公司(SmartX)工作邮箱. 如本邮箱发出的邮件与工作无关,该邮件未得到本公司任何的明示或默示的授权.
5 years, 1 month
[libvirt] [PATCH] libvirt_python:fix bug of sanitytest.py script
by ossdev@puresoftware.com
From: ossdev <ossdev(a)puresoftware.com>
libvirt-python:fix bug of sanitytest.py script
Signed-off-by: ossdev <ossdev(a)puresoftware.com>
---
sanitytest.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/sanitytest.py b/sanitytest.py
index e87b57d..c5d1f42 100644
--- a/sanitytest.py
+++ b/sanitytest.py
@@ -22,6 +22,21 @@ def get_libvirt_api_xml_path():
sys.exit(proc.returncode)
return stdout.splitlines()[0]
+def sanitize_enum_val(value):
+ if value == 'VIR_TYPED_PARAM_INT':
+ value = 1
+ elif value == 'VIR_TYPED_PARAM_UINT':
+ value = 2
+ elif value == 'VIR_TYPED_PARAM_LLONG':
+ value = 3
+ elif value == 'VIR_TYPED_PARAM_ULLONG':
+ value = 4
+ elif value == 'VIR_TYPED_PARAM_DOUBLE':
+ value = 5
+ elif value == 'VIR_TYPED_PARAM_BOOLEAN':
+ value = 6
+ return value
+
# Path to the libvirt API XML file
if len(sys.argv) >= 3:
xml = sys.argv[2]
@@ -48,8 +63,8 @@ set = tree.xpath('/api/symbols/enum')
for n in set:
typ = n.attrib['type']
name = n.attrib['name']
- val = n.attrib['value']
-
+ #val = n.attrib['value']
+ val = sanitize_enum_val(n.attrib['value'])
if typ not in enumvals:
enumvals[typ] = {}
--
2.17.1
--
*Disclaimer* -The information transmitted is intended solely for the
individual
or entity to which it is addressed and may contain confidential
and/or
privileged material. Any review, re-transmission, dissemination or
other use of
or taking action in reliance upon this information by persons
or entities other
than the intended recipient is prohibited. If you have
received this email in
error please contact the sender and delete the
material from any computer. In
such instances you are further prohibited
from reproducing, disclosing,
distributing or taking any action in reliance
on it.As a recipient of this email,
you are responsible for screening its
contents and the contents of any
attachments for the presence of viruses.
No liability is accepted for any
damages caused by any virus transmitted by
this email.
5 years, 1 month
[libvirt] [PATCH 1/4] qemu: validate bochs-display capability
by Jonathon Jongsma
When the bochs display type was added, the capability was never checked.
Add that check in the same place as the other video device capability
checks.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/qemu/qemu_process.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 955ba4de4c..b93af966e2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5278,7 +5278,9 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm,
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU)) ||
(video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
video->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW))) {
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW)) ||
+ (video->type == VIR_DOMAIN_VIDEO_TYPE_BOCHS &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_BOCHS_DISPLAY))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("this QEMU does not support '%s' video device"),
virDomainVideoTypeToString(video->type));
--
2.21.0
5 years, 1 month
[libvirt] [PATCH 0/3] Fix ppc64 CPU configuration for QEMU 2.11+
by Jiri Denemark
The original fix was both incomplete and too general. It only fixed
domain startup, but libvirt would still report empty list of supported
CPU models with recent QEMU for ppc64. On the other hand, while ppc64
QEMU ignores case when looking up CPU model names, x86_64 QEMU does
case sensitive lookup.
Jiri Denemark (3):
Revert "domcaps: Treat host models as case-insensitive strings"
util: Introduce virStringListSearch
qemu: Adapt to changed ppc64 CPU model names
src/conf/domain_capabilities.c | 2 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 28 +++++++++++++++++--
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_process.c | 2 +-
src/util/virstring.c | 28 +++++++++++++++++++
src/util/virstring.h | 3 ++
.../qemu_2.12.0.ppc64.xml | 6 +++-
.../caps_2.12.0.ppc64.xml | 12 ++++----
9 files changed, 73 insertions(+), 12 deletions(-)
--
2.17.0
5 years, 1 month
[libvirt] [PATCH] qemu: add pointer check in qemuMonitorLastError
by Xu Yandong
We found a exception when libvirt occurrs segmentation fault.
thread 1 is waiting object lock in qemuConnectMonitor,
qemu process exits and sends EOF event as well, so thread 2 invokes
qemuMonitorLastError but pointer mon is NULL.
Signed-off-by: Xu Yandong <xuyandong2(a)huawei.com>
---
src/qemu/qemu_monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index aa230b3306..28f18391a5 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1103,7 +1103,7 @@ qemuMonitorSend(qemuMonitorPtr mon,
virErrorPtr
qemuMonitorLastError(qemuMonitorPtr mon)
{
- if (mon->lastError.code == VIR_ERR_OK)
+ if (!mon || mon->lastError.code == VIR_ERR_OK)
return NULL;
return virErrorCopyNew(&mon->lastError);
--
2.18.1
5 years, 1 month
[libvirt] [PATCH v5 00/15] CPU Model Baseline and Comparison for s390x
by Collin Walling
Note: since I've made some changes to a lot of these patches / split
up some patches, I've decided to hold off on adding any r-b's in case
there is a specific change that someone does not agree with.
Changelog:
- Properly refactored code from CPU model expansion function
- Introduced a cleanup patch for CPU model expansion function
- Introduced patches that modifies the refactored code to suit
needs for baseline/comparison
- CPU expansion function now accepts a virCPUDefPtr
- Removed props parsing from CPU model comparison (they weren't
used)
- Cleaner error reporting when baselining/comparing with erroneous
CPU models / features
- Various cleanups based on feedback
___
To run these patches, execute the virsh hypervisor-cpu-compare or
hypervisor-cpu-baseline commands and pass an XML file describing one or
more CPU definition. You can use the definition from virsh domcapabilities
or from a guest XML. There is no need extract it from the file and place
it a new one, as the XML parser will look specifically for the CPU tags.
___
These patches hookup the virsh hypervisor-cpu-compare/baseline commands
for the s390x architecture. They take an XML file describing some CPU
definitions and passes the data to QEMU, where the actual CPU model
comparison / baseline calculation is handled (available since QEMU 2.8.5).
When baselining CPU models with the --features argument, s390x will report
a full CPU model expansion.
Thanks.
Collin Walling (15):
qemu_monitor: refactor cpu model expansion
qemu_monitor: expansion cleanups
qemu_monitor: use cpu def instead of char for expansion
qemu_monitor: add features to CPU model for QMP command
qemu_monitor: allow cpu props to be optional
qemu_monitor: make qemuMonitorJSONParseCPUModelData command-agnostic
qemu_monitor: implement query-cpu-model-baseline
qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_BASELINE
qemu_driver: hook up query-cpu-model-baseline
qemu_driver: expand cpu features after baseline
qemu_monitor: implement query-cpu-model-comparison
qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON
cpu_conf: xml to cpu definition parse helper
qemu_driver: hook up query-cpu-model-comparison
qemu_driver: improve comparison/baseline error reporting
src/conf/cpu_conf.c | 29 +++
src/conf/cpu_conf.h | 5 +
src/cpu/cpu.c | 14 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 21 +-
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_driver.c | 215 +++++++++++++++++
src/qemu/qemu_monitor.c | 39 +++-
src/qemu/qemu_monitor.h | 13 +-
src/qemu/qemu_monitor_json.c | 279 +++++++++++++++++------
src/qemu/qemu_monitor_json.h | 17 +-
tests/cputest.c | 11 +-
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 +
19 files changed, 573 insertions(+), 89 deletions(-)
--
2.7.4
5 years, 1 month