[PATCH 0/5] qemu: Retire two virtio related capabilities
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (5):
test: Drop unused .args or .xml files
qemuxml2argvtest: Drop negative virtio-*-iommu tests
qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM
qemuxml2argvtest: Drop negative virtio-*-ats tests
qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_ATS
src/qemu/qemu_capabilities.c | 14 +-----
src/qemu/qemu_capabilities.h | 4 +-
src/qemu/qemu_validate.c | 16 ------
.../caps_2.11.0.s390x.xml | 2 -
.../caps_2.11.0.x86_64.xml | 2 -
.../caps_2.12.0.aarch64.xml | 2 -
.../caps_2.12.0.ppc64.xml | 2 -
.../caps_2.12.0.s390x.xml | 2 -
.../caps_2.12.0.x86_64.xml | 2 -
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 2 -
.../caps_3.0.0.riscv32.xml | 1 -
.../caps_3.0.0.riscv64.xml | 1 -
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 2 -
.../caps_3.0.0.x86_64.xml | 2 -
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 2 -
.../caps_3.1.0.x86_64.xml | 2 -
.../caps_4.0.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 2 -
.../caps_4.0.0.riscv32.xml | 2 -
.../caps_4.0.0.riscv64.xml | 2 -
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 -
.../caps_4.0.0.x86_64.xml | 2 -
.../caps_4.1.0.x86_64.xml | 2 -
.../caps_4.2.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 2 -
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 2 -
.../caps_4.2.0.x86_64.xml | 2 -
.../caps_5.0.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 2 -
.../caps_5.0.0.riscv64.xml | 2 -
.../caps_5.0.0.x86_64.xml | 2 -
.../caps_5.1.0.x86_64.xml | 2 -
.../caps_5.2.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 2 -
.../caps_5.2.0.riscv64.xml | 2 -
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 2 -
.../caps_5.2.0.x86_64.xml | 2 -
.../caps_6.0.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 2 -
.../caps_6.0.0.x86_64.xml | 2 -
.../caps_6.1.0.x86_64.xml | 2 -
.../caps_6.2.0.x86_64.xml | 2 -
.../luks-disks-source-qcow2.args | 49 -------------------
.../virtio-options-controller-ats.err | 1 -
.../virtio-options-controller-iommu.err | 1 -
.../virtio-options-disk-ats.err | 1 -
.../virtio-options-disk-iommu.err | 1 -
.../virtio-options-fs-ats.err | 1 -
.../virtio-options-fs-iommu.err | 1 -
.../virtio-options-input-ats.err | 1 -
.../virtio-options-input-iommu.err | 1 -
.../virtio-options-memballoon-ats.err | 1 -
.../virtio-options-memballoon-iommu.err | 1 -
.../virtio-options-net-ats.err | 1 -
.../virtio-options-net-iommu.err | 1 -
.../virtio-options-rng-ats.err | 1 -
.../virtio-options-rng-iommu.err | 1 -
.../virtio-options-video-ats.err | 1 -
.../virtio-options-video-iommu.err | 1 -
tests/qemuxml2argvtest.c | 26 ----------
.../qemuxml2xmloutdata/disk-virtio-queues.xml | 1 -
tests/qemuxml2xmloutdata/panic-isa.xml | 41 ----------------
62 files changed, 4 insertions(+), 239 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/luks-disks-source-qcow2.args
delete mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.err
delete mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.err
delete mode 120000 tests/qemuxml2xmloutdata/disk-virtio-queues.xml
delete mode 100644 tests/qemuxml2xmloutdata/panic-isa.xml
--
2.32.0
3 years, 1 month
[PATCH v3 0/2] Implement paeg-per-vq to virtio devices
by Han Han
Diff from v2:
- Remove the code of qemu capabilities since the least supported QEMU
version is over the version introducing paeg-per-vq.
- Rebase to latest upstream
v2: https://listman.redhat.com/archives/libvir-list/2021-October/msg00489.html
Han Han (2):
conf: Add page_per_vq for driver element
qemu: Add support for virtio device option page-per-vq
docs/formatdomain.rst | 9 +++++++
docs/schemas/domaincommon.rng | 5 ++++
src/conf/domain_conf.c | 16 ++++++++++++
src/conf/domain_conf.h | 1 +
src/conf/domain_validate.c | 6 +++++
src/qemu/qemu_command.c | 1 +
src/qemu/qemu_hotplug.c | 3 ++-
src/qemu/qemu_validate.c | 1 +
.../virtio-options.x86_64-latest.args | 24 ++++++++---------
tests/qemuxml2argvdata/virtio-options.xml | 26 +++++++++----------
10 files changed, 66 insertions(+), 26 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH v2 0/3] Implement paeg-per-vq to virtio devices
by Han Han
Diff from v1:
- Remove some duplicated test cases
- Merge some err msgs of 2 lines into one line
- Rebase to latest upstream
v1: https://listman.redhat.com/archives/libvir-list/2021-September/msg00087.html
Han Han (3):
qemu_capabilities: Add flag QEMU_CAPS_VIRTIO_PAGE_PER_VQ
conf: Add page_per_vq for driver element
qemu: Add support for virtio device option page-per-vq
docs/formatdomain.rst | 9 +++++
docs/schemas/domaincommon.rng | 5 +++
src/conf/domain_conf.c | 16 ++++++++
src/conf/domain_conf.h | 1 +
src/conf/domain_validate.c | 6 +++
src/qemu/qemu_capabilities.c | 6 +++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 4 ++
src/qemu/qemu_hotplug.c | 3 +-
src/qemu/qemu_validate.c | 7 ++++
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
.../caps_5.2.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../caps_6.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
.../caps_6.0.0.x86_64.xml | 1 +
.../caps_6.1.0.x86_64.xml | 1 +
.../virtio-options-controller-page_per_vq.err | 1 +
.../virtio-options-controller-page_per_vq.xml | 38 +++++++++++++++++++
.../virtio-options-disk-page_per_vq.err | 1 +
.../virtio-options-disk-page_per_vq.xml | 34 +++++++++++++++++
.../virtio-options-fs-page_per_vq.err | 1 +
.../virtio-options-fs-page_per_vq.xml | 34 +++++++++++++++++
.../virtio-options-input-page_per_vq.err | 1 +
.../virtio-options-input-page_per_vq.xml | 30 +++++++++++++++
.../virtio-options-memballoon-page_per_vq.err | 1 +
.../virtio-options-memballoon-page_per_vq.xml | 23 +++++++++++
.../virtio-options-net-page_per_vq.err | 1 +
.../virtio-options-net-page_per_vq.xml | 34 +++++++++++++++++
.../virtio-options-rng-page_per_vq.err | 1 +
.../virtio-options-rng-page_per_vq.xml | 32 ++++++++++++++++
.../virtio-options-video-page_per_vq.err | 1 +
.../virtio-options-video-page_per_vq.xml | 36 ++++++++++++++++++
.../virtio-options.x86_64-latest.args | 26 ++++++-------
tests/qemuxml2argvdata/virtio-options.xml | 26 ++++++-------
tests/qemuxml2argvtest.c | 14 +++++++
65 files changed, 402 insertions(+), 27 deletions(-)
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-page_per_vq.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-page_per_vq.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-page_per_vq.xml
--
2.31.1
3 years, 1 month
[RFC PATCH] qemu: Do not report eof when processing monitor IO
by Jim Fehlig
There have been countless reports from users concerned about the following
error reported by libvirtd when qemu domains are shutdown
internal error: End of file from qemu monitor
While the error is harmless, users often mistaken it for real problem with
their deployments. EOF from the monitor can't be entirely ignored since
other threads may be using the monitor and must be able to detect the EOF
condition.
One potential fix is to delay reporting EOF until the monitor is used
after EOF is detected. This patch adds a 'goteof' member to the
qemuMonitor structure, which is set when EOF is detected on the monitor
socket. If another thread later tries to send data on the monitor, the
EOF error is reported.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
An RFC patch to squelch qemu monitor EOF error messages on VM shutdown.
Previous discussions and information on testing of the patch can be
found in this thread
https://listman.redhat.com/archives/libvir-list/2021-September/msg00949.html
src/qemu/qemu_monitor.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 5fc23f13d3..751ec8ba6c 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -113,6 +113,7 @@ struct _qemuMonitor {
/* true if qemu no longer wants 'props' sub-object of object-add */
bool objectAddNoWrap;
+ bool goteof;
};
/**
@@ -526,10 +527,10 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
{
qemuMonitor *mon = opaque;
bool error = false;
- bool eof = false;
bool hangup = false;
virObjectRef(mon);
+ mon->goteof = false;
/* lock access to the monitor and protect fd */
virObjectLock(mon);
@@ -544,7 +545,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (mon->lastError.code != VIR_ERR_OK) {
if (cond & (G_IO_HUP | G_IO_ERR))
- eof = true;
+ mon->goteof = true;
error = true;
} else {
if (cond & G_IO_OUT) {
@@ -562,7 +563,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (errno == ECONNRESET)
hangup = true;
} else if (got == 0) {
- eof = true;
+ mon->goteof = true;
} else {
/* Ignore hangup/error cond if we read some data, to
* give time for that data to be consumed */
@@ -575,22 +576,19 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (cond & G_IO_HUP) {
hangup = true;
- if (!error) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from qemu monitor"));
- eof = true;
- }
+ if (!error)
+ mon->goteof = true;
}
- if (!error && !eof &&
+ if (!error && !mon->goteof &&
cond & G_IO_ERR) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid file descriptor while waiting for monitor"));
- eof = true;
+ mon->goteof = true;
}
}
- if (error || eof) {
+ if (error || mon->goteof) {
if (hangup && mon->logFunc != NULL) {
/* Check if an error message from qemu is available and if so, use
* it to overwrite the actual message. It's done only in early
@@ -609,7 +607,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* Already have an error, so clear any new error */
virResetLastError();
} else {
- if (virGetLastErrorCode() == VIR_ERR_OK)
+ if (virGetLastErrorCode() == VIR_ERR_OK && !mon->goteof)
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Error while processing monitor IO"));
virCopyLastError(&mon->lastError);
@@ -630,7 +628,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* We have to unlock to avoid deadlock against command thread,
* but is this safe ? I think it is, because the callback
* will try to acquire the virDomainObj *mutex next */
- if (eof) {
+ if (mon->goteof) {
qemuMonitorEofNotifyCallback eofNotify = mon->cb->eofNotify;
virDomainObj *vm = mon->vm;
@@ -949,6 +947,11 @@ qemuMonitorSend(qemuMonitor *mon,
virSetError(&mon->lastError);
return -1;
}
+ if (mon->goteof) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("End of file from qemu monitor"));
+ return -1;
+ }
mon->msg = msg;
qemuMonitorUpdateWatch(mon);
--
2.33.0
3 years, 1 month
VM paused during multipath iSCSI reservation
by Vojtech Juranek
Hi,
I'm trying to find the root cause for BZ #1898049 [1]. When setting up Windows HA
cluster on Windows Server VMs run on top of oVirt, Windows cluster validator runs couple of tests
and fails during test "Validate SCSI-3 Persistent Reservation" and one of the VMs of
the cluster is paused with IO error. Disk definition is as follows:
<disk type='block' device='lun' sgio='unfiltered' snapshot='no'>
<driver name='qemu' type='raw' cache='none' error_policy='stop' io='native'/>
<source dev='/dev/mapper/3600a09803830447a4f244c4657616f6f' index='1'>
<seclabel model='dac' relabel='no'/>
<reservations managed='yes'>
<source type='unix' path='/var/lib/libvirt/qemu/domain-1-Windows-2016-2/pr-helper0.sock' mode='client'/>
</reservations>
</source>
<backingStore/>
<target dev='sdb' bus='scsi'/>
<shareable/>
<alias name='ua-26b4975e-e1d4-4e27-b2c6-2ea0894a571b'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
and libvirt error I get is bellow [2].
When I try to create reservation from Windows VM manually, I get following error
(but not sure I do it whole process correctly):
.\sg_persist --out --register --param-sark=123abc e:
QEMU QEMU HARDDISK 2.5+
Peripheral device type: disk
PR out (Register): command not supported
sg_persist failed: Illegal request, Invalid opcode
Do you have any ideas what could be wrong or how to determine
the root cause of this this issue?
Thanks in advance.
Vojta
[1] https://bugzilla.redhat.com/1898049
[2] libvirt debug log:
2021-10-12 11:43:25.148+0000: 2006427: debug : qemuMonitorEmitIOError:1243 : mon=0x7fb02006a020
2021-10-12 11:43:25.148+0000: 2006427: info : virObjectRef:402 : OBJECT_REF: obj=0x7fb02006a020
2021-10-12 11:43:25.148+0000: 2006427: info : virObjectRef:402 : OBJECT_REF: obj=0x7fafd0130020
2021-10-12 11:43:25.148+0000: 2000208: info : virObjectRef:402 : OBJECT_REF: obj=0x7fafd010d340
2021-10-12 11:43:25.148+0000: 2006427: info : virObjectNew:258 : OBJECT_NEW: obj=0x7fb020082590 classname=virDomainEventIOError
2021-10-12 11:43:25.148+0000: 2000208: info : vir_object_finalize:321 : OBJECT_DISPOSE: obj=0x7fb020082500
2021-10-12 11:43:25.148+0000: 2006427: info : virObjectNew:258 : OBJECT_NEW: obj=0x7fb020082620 classname=virDomainEventIOError
2021-10-12 11:43:25.148+0000: 2000208: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb020082500
2021-10-12 11:43:25.148+0000: 2006427: debug : qemuProcessHandleIOError:907 : Transitioned guest Windows-2016-2 to paused state due to IO error
2021-10-12 11:43:25.148+0000: 2000208: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fafd010d340
2021-10-12 11:43:25.148+0000: 2006427: info : virObjectNew:258 : OBJECT_NEW: obj=0x7fafbc1fb8c0 classname=virDomainEventLifecycle
2021-10-12 11:43:25.148+0000: 2006427: debug : virDomainLockProcessPause:204 : plugin=0x7fafd01272a0 dom=0x7fb01400f5e0 state=0x7fb02401d768
2021-10-12 11:43:25.148+0000: 2006427: debug : virDomainLockManagerNew:134 : plugin=0x7fafd01272a0 dom=0x7fb01400f5e0 withResources=1
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerPluginGetDriver:276 : plugin=0x7fafd01272a0
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerNew:300 : driver=0x7fafd444a000 type=0 nparams=5 params=0x7fafd77de640 flags=0x0
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerLogParams:97 : key=uuid type=uuid value=70eee88c-ba2c-4c6c-bd51-c2b663db27f8
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerLogParams:90 : key=name type=string value=Windows-2016-2
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerLogParams:78 : key=id type=uint value=1
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerLogParams:78 : key=pid type=uint value=2006418
2021-10-12 11:43:25.148+0000: 2006427: debug : virLockManagerLogParams:93 : key=uri type=cstring value=(null)
2021-10-12 11:43:25.148+0000: 2006427: debug : virDomainLockManagerNew:146 : Adding leases
2021-10-12 11:43:25.148+0000: 2006427: debug : virDomainLockManagerNew:151 : Adding disks
2021-10-12 11:43:25.149+0000: 2006427: debug : virDomainLockManagerAddImage:90 : Add disk /rhev/data-center/mnt/blockSD/7c4f09b6-9e87-436f-bda9-22d1f0b50955/images/f5d6e074-dfe9-462d-8cfd-3e14b0eb5aea/766e36b2-84a6-43e7-a48b-a5f47e669860
2021-10-12 11:43:25.149+0000: 2006427: debug : virLockManagerAddResource:326 : lock=0x7fafbc19e250 type=0 name=/rhev/data-center/mnt/blockSD/7c4f09b6-9e87-436f-bda9-22d1f0b50955/images/f5d6e074-dfe9-462d-8cfd-3e14b0eb5aea/766e36b2-84a6-43e7-a48b-a5f47e669860 nparams=0 params=(nil) flags=0x0
2021-10-12 11:43:25.149+0000: 2006427: debug : virDomainLockManagerAddImage:90 : Add disk /dev/mapper/3600a09803830447a4f244c4657616f6f
2021-10-12 11:43:25.149+0000: 2006427: debug : virLockManagerAddResource:326 : lock=0x7fafbc19e250 type=0 name=/dev/mapper/3600a09803830447a4f244c4657616f6f nparams=0 params=(nil) flags=0x2
2021-10-12 11:43:25.149+0000: 2006427: debug : virLockManagerRelease:359 : lock=0x7fafbc19e250 state=0x7fb02401d768 flags=0x0
2021-10-12 11:43:25.149+0000: 2006427: debug : virLockManagerFree:381 : lock=0x7fafbc19e250
2021-10-12 11:43:25.149+0000: 2006427: debug : qemuProcessHandleIOError:920 : Preserving lock state '<null>'
2021-10-12 11:43:25.150+0000: 2006427: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fafd0130020
2021-10-12 11:43:25.150+0000: 2006427: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb02006a020
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectRef:402 : OBJECT_REF: obj=0x7fafd010d340
2021-10-12 11:43:25.150+0000: 2000208: info : vir_object_finalize:321 : OBJECT_DISPOSE: obj=0x7fb020082590
2021-10-12 11:43:25.150+0000: 2006427: info : virObjectRef:402 : OBJECT_REF: obj=0x7fb02006a020
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb020082590
2021-10-12 11:43:25.150+0000: 2006427: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb02006a020
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectNew:258 : OBJECT_NEW: obj=0x564a89a4cc60 classname=virDomain
2021-10-12 11:43:25.150+0000: 2006427: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb02006a020
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectRef:402 : OBJECT_REF: obj=0x7fafd0018ca0
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectRef:402 : OBJECT_REF: obj=0x564a89978df0
2021-10-12 11:43:25.150+0000: 2000208: debug : virAccessManagerCheckDomain:238 : manager=0x564a89978df0(name=stack) driver=QEMU domain=0x7ffd2c677010 perm=0
2021-10-12 11:43:25.150+0000: 2000208: debug : virAccessManagerCheckDomain:238 : manager=0x564a89978e50(name=none) driver=QEMU domain=0x7ffd2c677010 perm=0
2021-10-12 11:43:25.150+0000: 2000208: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x564a89978df0
2021-10-12 11:43:25.150+0000: 2000208: debug : remoteRelayDomainEventIOErrorReason:529 : Relaying domain io error Windows-2016-2 1 /dev/mapper/3600a09803830447a4f244c4657616f6f ua-26b4975e-e1d4-4e27-b2c6-2ea0894a571b 1 , callback 3
3 years, 1 month
[libvirt PATCH 0/7] Accumulated mdev fixes
by Jonathon Jongsma
These patches fix a couple of outstanding issues with mdev support. These include:
1. output proper xml for the mdev parent device when run under the test suite
2. mdevctl allows multiple devices with the same UUID (but different parents),
so we have to be prepared to handle this. This also requires a change in
nodedev name for mdev devices. From 'mdev_$UUID' to 'mdev_$UUID_$PARENTADDR'
3. validate input xml when defining or creating mdevs (e.g. ensure we have a
proper parent device)
This patch obsoletes the previous patch titled "nodedev: Handle inactive mdevs
with the same UUID"
Jonathon Jongsma (7):
nodedev: add internal virNodeDeviceObjListFind()
nodedev: fix xml output for mdev parents in test suite
nodedev: cache parent address in mdev caps
nodedev: Add parser validation for node devices
nodedev: add PostParse callback for nodedev parsing
nodedev: Handle inactive mdevs with the same UUID
nodedev: look up mdevs by UUID and parent
src/conf/node_device_conf.c | 37 +++-
src/conf/node_device_conf.h | 21 +-
src/conf/virnodedeviceobj.c | 71 +++++--
src/conf/virnodedeviceobj.h | 15 +-
src/hypervisor/domain_driver.c | 7 +-
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 182 ++++++++++++++----
src/node_device/node_device_driver.h | 6 +
src/node_device/node_device_udev.c | 21 +-
src/test/test_driver.c | 6 +-
.../mdevctl-list-multiple.out.xml | 16 +-
tests/nodedevmdevctltest.c | 36 +++-
tests/nodedevxml2xmltest.c | 3 +-
13 files changed, 338 insertions(+), 84 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH v1] tools: add virt-host-validate-ch for ch driver
by Praveen K Paladugu
Signed-off-by: Wei-Chen Chen <weicche(a)microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal(a)linux.microsoft.com>
---
po/POTFILES.in | 1 +
tools/meson.build | 5 +++
tools/virt-host-validate-ch.c | 85 +++++++++++++++++++++++++++++++++++
tools/virt-host-validate-ch.h | 24 ++++++++++
tools/virt-host-validate.c | 12 +++++
5 files changed, 127 insertions(+)
create mode 100644 tools/virt-host-validate-ch.c
create mode 100644 tools/virt-host-validate-ch.h
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c200d7452a..b554cf08ca 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -369,6 +369,7 @@
@SRCDIR(a)tools/virsh.h
@SRCDIR(a)tools/virt-admin.c
@SRCDIR(a)tools/virt-host-validate-bhyve.c
+@SRCDIR(a)tools/virt-host-validate-ch.c
@SRCDIR(a)tools/virt-host-validate-common.c
@SRCDIR(a)tools/virt-host-validate-lxc.c
@SRCDIR(a)tools/virt-host-validate-qemu.c
diff --git a/tools/meson.build b/tools/meson.build
index 2acf7b0aaf..bf0eab8b6b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -58,6 +58,11 @@ if conf.has('WITH_HOST_VALIDATE')
'virt-host-validate-bhyve.c',
]
endif
+ if conf.has('WITH_CH')
+ virt_host_validate_sources += [
+ 'virt-host-validate-ch.c',
+ ]
+ endif
executable(
'virt-host-validate',
diff --git a/tools/virt-host-validate-ch.c b/tools/virt-host-validate-ch.c
new file mode 100644
index 0000000000..a6d8a01d1b
--- /dev/null
+++ b/tools/virt-host-validate-ch.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright Microsoft Corp. 2020-2021
+ *
+ * virt-host-validate-ch.c: Sanity check a CH hypervisor host
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+
+#include "virarch.h"
+#include "virbitmap.h"
+#include "virt-host-validate-ch.h"
+#include "virt-host-validate-common.h"
+
+int virHostValidateCh(void)
+{
+ int ret = 0;
+ virBitmap *flags;
+ bool hasHwVirt = false;
+ bool hasVirtFlag = false;
+ virArch arch = virArchFromHost();
+ const char *kvmhint =
+ _("Check that CPU and firmware supports virtualization "
+ "and kvm module is loaded");
+
+ if (!(flags = virHostValidateGetCPUFlags()))
+ return -1;
+
+ // Cloud-Hypervisor only supports x86_64 and aarch64
+ switch ((int)arch) {
+ case VIR_ARCH_X86_64:
+ hasVirtFlag = true;
+ kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are "
+ "loaded & the BIOS has enabled virtualization");
+ if (virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) ||
+ virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX))
+ hasHwVirt = true;
+ break;
+ case VIR_ARCH_AARCH64:
+ hasVirtFlag = true;
+ hasHwVirt = true;
+ break;
+ default:
+ hasHwVirt = false;
+ break;
+ }
+
+ if (hasVirtFlag) {
+ virHostMsgCheck("CH", "%s", _("for hardware virtualization"));
+ if (hasHwVirt) {
+ virHostMsgPass();
+ } else {
+ virHostMsgFail(VIR_HOST_VALIDATE_FAIL,
+ _("Only emulated CPUs are available, performance will be "
+ "significantly limited"));
+ ret = -1;
+ }
+ }
+
+ if (hasHwVirt || !hasVirtFlag) {
+ if (virHostValidateDeviceExists("CH", "/dev/kvm", VIR_HOST_VALIDATE_FAIL,
+ kvmhint) < 0)
+ ret = -1;
+ else if (virHostValidateDeviceAccessible(
+ "CH", "/dev/kvm", VIR_HOST_VALIDATE_FAIL,
+ _("Check /dev/kvm is world writable or you are in "
+ "a group that is allowed to access it")) < 0)
+ ret = -1;
+ }
+
+ return ret;
+}
diff --git a/tools/virt-host-validate-ch.h b/tools/virt-host-validate-ch.h
new file mode 100644
index 0000000000..b16e7d36ab
--- /dev/null
+++ b/tools/virt-host-validate-ch.h
@@ -0,0 +1,24 @@
+/*
+ * virt-host-validate-ch.h: Sanity check a CH hypervisor host
+ *
+ * Copyright Microsoft Corp. 2020-2021
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+int virHostValidateCh(void);
diff --git a/tools/virt-host-validate.c b/tools/virt-host-validate.c
index 806d61bc8e..4dae97910a 100644
--- a/tools/virt-host-validate.c
+++ b/tools/virt-host-validate.c
@@ -40,6 +40,9 @@
#if WITH_BHYVE
# include "virt-host-validate-bhyve.h"
#endif
+#if WITH_CH
+# include "virt-host-validate-ch.h"
+#endif
static void
show_help(FILE *out, const char *argv0)
@@ -53,6 +56,7 @@ show_help(FILE *out, const char *argv0)
" - qemu\n"
" - lxc\n"
" - bhyve\n"
+ " - ch\n"
"\n"
" Options:\n"
" -h, --help Display command line help\n"
@@ -146,6 +150,14 @@ main(int argc, char **argv)
}
#endif
+#if WITH_CH
+ if (!hvname || STREQ(hvname, "ch")) {
+ usedHvname = true;
+ if (virHostValidateCh() < 0)
+ ret = EXIT_FAILURE;
+ }
+#endif
+
if (hvname && !usedHvname) {
fprintf(stderr, _("%s: unsupported hypervisor name %s\n"),
argv[0], hvname);
--
2.27.0
3 years, 1 month
[PATCH] spec: change the ownership of cache directory
by Peng Liang
In a50c473ad6c9 ("qemu: move temp file of screenshot and memorypeek to
per-domain dir") and c4f3c955d578 ("qemu: don't change ownership of
cache directory"), I move the temporary files of screenshot and
memorypeek from the cache directory to per-domain directory, and the
only user of the cache directory is the domain capabilities currently.
Since the domain capabilities are used by libvirtd, no need to set the
ownership of the cache directory to qemu_user and qemu_group.
Signed-off-by: Peng Liang <liangpeng10(a)huawei.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1725e5eb14a2..4ecb28114ce8 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1868,7 +1868,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%ghost %dir %{_rundir}/libvirt/qemu/
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
+%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
--
2.31.1
3 years, 1 month