[libvirt] [PATCH v2 0/4] qemu: block: implement optional removal of committed snapshot images
by Pavel Mores
v2 fixes a mess-up in handling of strerror_r() return value.
Pavel Mores (4):
qemu: block: propagate the delete flag to where it can actually be
used
qemu: block: use the delete flag to delete snapshot images if
requested
qemu: block: store the delete flag in libvirtd's status XML
qemu: block: add unit test of storing the delete flag in status XML
src/qemu/qemu_blockjob.c | 35 ++++++++++++++++++-
src/qemu/qemu_blockjob.h | 4 ++-
src/qemu/qemu_domain.c | 4 +++
src/qemu/qemu_driver.c | 5 +--
.../blockjob-blockdev-in.xml | 1 +
5 files changed, 45 insertions(+), 4 deletions(-)
--
2.21.0
5 years, 1 month
[libvirt] [PATCH v3 00/52] qemu: Store default CPU in domain XML
by Jiri Denemark
When starting a domain without a CPU model specified in the domain XML,
QEMU will choose a default one. Which is fine unless the domain gets
migrated to another host because libvirt doesn't perform any CPU ABI
checks and the virtual CPU provided by QEMU on the destination host can
differ from the one on the source host.
With QEMU 4.2.0 we can probe for the default CPU model used by QEMU for
a particular machine type and store it in the domain XML. This way the
chosen CPU model is more visible to users and libvirt will make sure
the guest will see the exact same CPU after migration.
https://bugzilla.redhat.com/show_bug.cgi?id=1598151
https://bugzilla.redhat.com/show_bug.cgi?id=1598162
Version 2:
- more tests
- TCG-only support for non x86_64 architectures
Version 3:
- as a result of talking with QEMU developers dealing with s390 and
ppc64 I have to enhance the series so that libvirt is able to fetch
different default CPU models on TCG vs. KVM
---
Some patches were too large so I decided to shorten them before sending
to the list. You can check the full version of this series with
git fetch https://gitlab.com/jirkade/libvirt cpu-default-type
Jiri Denemark (52):
tests: Add capabilities for QEMU 4.2.0 on s390x
tests: Update 4.2.0 capabilities data on ppc64
conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd
conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd
qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions
qemu: Filter models in virQEMUCapsGetCPUDefinitions
qemu: Use virQEMUCapsGetCPUDefinitions more
qemu: Use g_autoptr in qemuMonitorJSONGetCPUDefinitions
qemu: Change return type of virQEMUCapsFetchCPUDefinitions
qemu: Introduce qemuMonitorCPUDefs struct
qemu: Flatten qemuMonitorCPUDefs.cpus
qemu: Add qemuMonitorCPUDefsCopy
qemu: Use g_autofree in virQEMUCapsLoadCPUModels
qemu: Use virDomainCapsCPUUsable in qemuMonitorCPUDefInfo
qemu: Introduce virQEMUCapsCPUDefsToModels
qemu: Rename virQEMUCaps{Get,Fetch}CPUDefinitions
qemu: Split virQEMUCapsFetchCPUModels
qemu: Switch qemuCaps to use qemuMonitorCPUDefs
conf: Drop unused virDomainCapsCPUModelsFilter
conf: Drop virDomainCapsCPUModelsAddSteal
qemu: Store typename from query-cpu-definitions in qemuCaps
qemu: Drop unused virQEMUCapsGetDefaultMachine
qemu: Add virQEMUCaps{Load,Format}Accel
qemu: Introduce virQEMUCapsAccel structure
qemu: Introduce virQEMUCapsAccelCopy
qemu: Introduce virQEMUCapsAccelClear
qemu: Introduce and use virQEMUCapsGetAccel
qemu: Drop virQEMUCapsGetHostCPUData
qemu: Refactor virQEMUCapsLoadAccel
qemu: Refactor virQEMUCapsFormatAccel
qemu: Introduce virQEMUCapsProbeCPUDefinitionsTest
qemu: Refactor probing of accelerator dependent data
qemu: Make virQEMUCapsGetMachineTypesCaps static
qemu: Make virQEMUCapsIsMachineSupported static
qemu: Refactor virQEMUCapsLoadCache a bit
qemu: Refactor virQEMUCapsFormatCache a bit
qemu: Pass virDomainVirtType to APIs dealing with machine types
qemu: Move machine type data in capabilities cache
qemu: Use typedef for virQEMUCapsMachineType
qemu: Introduce virQEMUCapsCopyMachineTypes
qemu: Make probed machine types depend on accelerator
qemu: Probe machine types for both KVM and TCG
qemu: Probe for default CPU types
qemu: Introduce virQEMUCapsGetMachineDefaultCPU
qemu: Use g_autoptr in qemuDomainDefPostParse
conf: Define g_autoptr cleanup function for virCPUDef
qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests
qemuxml2*test: Add test cases for default CPU models on aarch64
qemuxml2*test: Add test cases for default CPU models on ppc64
qemuxml2*test: Add test cases for default CPU models on s390x
qemuxml2*test: Add test cases for default CPU models on x86_64
qemu: Store default CPU in domain XML
src/conf/cpu_conf.h | 1 +
src/conf/domain_capabilities.c | 86 +-
src/conf/domain_capabilities.h | 10 +-
src/libvirt_private.syms | 2 -
src/qemu/qemu_capabilities.c | 1064 +-
src/qemu/qemu_capabilities.h | 29 +-
src/qemu/qemu_capspriv.h | 5 +-
src/qemu/qemu_domain.c | 97 +-
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_monitor.c | 61 +-
src/qemu/qemu_monitor.h | 19 +-
src/qemu/qemu_monitor_json.c | 82 +-
src/qemu/qemu_monitor_json.h | 2 +-
src/qemu/qemu_process.c | 24 +-
tests/cputest.c | 12 +-
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 202 +
tests/domaincapstest.c | 10 +-
.../caps_1.5.3.x86_64.replies | 78 +
.../caps_1.5.3.x86_64.xml | 45 +-
.../caps_1.6.0.x86_64.replies | 86 +
.../caps_1.6.0.x86_64.xml | 51 +-
.../caps_1.7.0.x86_64.replies | 94 +
.../caps_1.7.0.x86_64.xml | 57 +-
.../caps_2.1.1.x86_64.replies | 110 +
.../caps_2.1.1.x86_64.xml | 69 +-
.../caps_2.10.0.aarch64.replies | 272 +
.../caps_2.10.0.aarch64.xml | 279 +-
.../caps_2.10.0.ppc64.replies | 123 +
.../caps_2.10.0.ppc64.xml | 575 +-
.../caps_2.10.0.s390x.replies | 53 +
.../caps_2.10.0.s390x.xml | 285 +-
.../caps_2.10.0.x86_64.replies | 194 +
.../caps_2.10.0.x86_64.xml | 387 +-
.../caps_2.11.0.s390x.replies | 58 +
.../caps_2.11.0.s390x.xml | 288 +-
.../caps_2.11.0.x86_64.replies | 194 +
.../caps_2.11.0.x86_64.xml | 327 +-
.../caps_2.12.0.aarch64.replies | 302 +
.../caps_2.12.0.aarch64.xml | 307 +-
.../caps_2.12.0.ppc64.replies | 143 +
.../caps_2.12.0.ppc64.xml | 591 +-
.../caps_2.12.0.s390x.replies | 63 +
.../caps_2.12.0.s390x.xml | 291 +-
.../caps_2.12.0.x86_64.replies | 204 +
.../caps_2.12.0.x86_64.xml | 631 +-
.../caps_2.4.0.x86_64.replies | 134 +
.../caps_2.4.0.x86_64.xml | 87 +-
.../caps_2.5.0.x86_64.replies | 142 +
.../caps_2.5.0.x86_64.xml | 93 +-
.../caps_2.6.0.aarch64.replies | 180 +
.../caps_2.6.0.aarch64.xml | 123 +-
.../caps_2.6.0.ppc64.replies | 77 +
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 45 +-
.../caps_2.6.0.x86_64.replies | 118 +
.../caps_2.6.0.x86_64.xml | 75 +-
.../caps_2.7.0.s390x.replies | 38 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 12 +-
.../caps_2.7.0.x86_64.replies | 154 +
.../caps_2.7.0.x86_64.xml | 81 +-
.../caps_2.8.0.s390x.replies | 43 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 15 +-
.../caps_2.8.0.x86_64.replies | 174 +
.../caps_2.8.0.x86_64.xml | 93 +-
.../caps_2.9.0.ppc64.replies | 118 +
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 572 +-
.../caps_2.9.0.s390x.replies | 48 +
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 274 +-
.../caps_2.9.0.x86_64.replies | 184 +
.../caps_2.9.0.x86_64.xml | 277 +-
.../caps_3.0.0.ppc64.replies | 148 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 594 +-
.../caps_3.0.0.riscv32.replies | 42 +
.../caps_3.0.0.riscv32.xml | 10 +-
.../caps_3.0.0.riscv64.replies | 42 +
.../caps_3.0.0.riscv64.xml | 10 +-
.../caps_3.0.0.s390x.replies | 68 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 302 +-
.../caps_3.0.0.x86_64.replies | 214 +
.../caps_3.0.0.x86_64.xml | 447 +-
.../caps_3.1.0.ppc64.replies | 153 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 597 +-
.../caps_3.1.0.x86_64.replies | 224 +
.../caps_3.1.0.x86_64.xml | 587 +-
.../caps_4.0.0.aarch64.replies | 347 +
.../caps_4.0.0.aarch64.xml | 346 +-
.../caps_4.0.0.ppc64.replies | 158 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 600 +-
.../caps_4.0.0.riscv32.replies | 42 +
.../caps_4.0.0.riscv32.xml | 10 +-
.../caps_4.0.0.riscv64.replies | 42 +
.../caps_4.0.0.riscv64.xml | 10 +-
.../caps_4.0.0.s390x.replies | 78 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 324 +-
.../caps_4.0.0.x86_64.replies | 224 +
.../caps_4.0.0.x86_64.xml | 583 +-
.../caps_4.1.0.x86_64.replies | 329 +
.../caps_4.1.0.x86_64.xml | 930 +-
.../caps_4.2.0.aarch64.replies | 556 +
.../caps_4.2.0.aarch64.xml | 358 +-
.../caps_4.2.0.ppc64.replies | 305 +-
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 611 +-
.../caps_4.2.0.s390x.replies | 22548 ++++++++++++++++
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 3359 +++
.../caps_4.2.0.x86_64.replies | 389 +
.../caps_4.2.0.x86_64.xml | 942 +-
tests/qemumonitorjsontest.c | 42 +-
...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 38 +
.../aarch64-default-cpu-kvm-virt-4.2.xml | 20 +
...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 39 +
.../aarch64-default-cpu-tcg-virt-4.2.xml | 20 +
.../disk-cache.x86_64-latest.args | 1 +
.../disk-cdrom-network.x86_64-latest.args | 1 +
.../disk-cdrom-tray.x86_64-latest.args | 1 +
.../disk-copy_on_read.x86_64-latest.args | 1 +
.../disk-detect-zeroes.x86_64-latest.args | 1 +
.../disk-floppy-q35-2_11.x86_64-latest.args | 1 +
.../disk-floppy-q35-2_9.x86_64-latest.args | 1 +
.../os-firmware-bios.x86_64-latest.args | 1 +
...os-firmware-efi-secboot.x86_64-latest.args | 1 +
.../os-firmware-efi.x86_64-latest.args | 1 +
...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 39 +
.../ppc64-default-cpu-kvm-pseries-2.7.xml | 22 +
...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 39 +
.../ppc64-default-cpu-kvm-pseries-3.1.xml | 22 +
...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 39 +
.../ppc64-default-cpu-kvm-pseries-4.2.xml | 22 +
...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 39 +
.../ppc64-default-cpu-tcg-pseries-2.7.xml | 22 +
...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 39 +
.../ppc64-default-cpu-tcg-pseries-3.1.xml | 22 +
...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 39 +
.../ppc64-default-cpu-tcg-pseries-4.2.xml | 22 +
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 32 +
.../s390-default-cpu-kvm-ccw-virtio-4.2.xml | 16 +
...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 32 +
.../s390-default-cpu-tcg-ccw-virtio-4.2.xml | 16 +
.../tpm-emulator-tpm2-enc.x86_64-latest.args | 1 +
.../tpm-emulator-tpm2.x86_64-latest.args | 1 +
.../tpm-emulator.x86_64-latest.args | 1 +
.../tseg-explicit-size.x86_64-latest.args | 1 +
.../vhost-vsock-auto.x86_64-latest.args | 1 +
.../vhost-vsock.x86_64-latest.args | 1 +
...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 37 +
.../x86_64-default-cpu-kvm-pc-4.2.xml | 24 +
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 42 +
.../x86_64-default-cpu-kvm-q35-4.2.xml | 24 +
...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 37 +
.../x86_64-default-cpu-tcg-pc-4.2.xml | 24 +
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 42 +
.../x86_64-default-cpu-tcg-q35-4.2.xml | 24 +
tests/qemuxml2argvtest.c | 19 +
...efault-cpu-kvm-virt-4.2.aarch64-latest.xml | 38 +
...efault-cpu-tcg-virt-4.2.aarch64-latest.xml | 41 +
.../os-firmware-bios.x86_64-latest.xml | 3 +
.../os-firmware-efi-secboot.x86_64-latest.xml | 3 +
.../os-firmware-efi.x86_64-latest.xml | 3 +
...fault-cpu-kvm-pseries-2.7.ppc64-latest.xml | 48 +
...fault-cpu-kvm-pseries-3.1.ppc64-latest.xml | 48 +
...fault-cpu-kvm-pseries-4.2.ppc64-latest.xml | 48 +
...fault-cpu-tcg-pseries-2.7.ppc64-latest.xml | 48 +
...fault-cpu-tcg-pseries-3.1.ppc64-latest.xml | 48 +
...fault-cpu-tcg-pseries-4.2.ppc64-latest.xml | 48 +
...lt-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml | 24 +
...lt-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml | 26 +
.../tpm-emulator-tpm2-enc.x86_64-latest.xml | 3 +
.../tpm-emulator-tpm2.x86_64-latest.xml | 3 +
.../tpm-emulator.x86_64-latest.xml | 3 +
.../tpm-passthrough-crb.x86_64-latest.xml | 3 +
.../tpm-passthrough.x86_64-latest.xml | 3 +
...4-default-cpu-kvm-pc-4.2.x86_64-latest.xml | 40 +
...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 63 +
...4-default-cpu-tcg-pc-4.2.x86_64-latest.xml | 40 +
...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 63 +
tests/qemuxml2xmltest.c | 15 +
tests/testutilsqemu.c | 6 +-
tests/testutilsqemu.h | 1 +
176 files changed, 42397 insertions(+), 6735 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_4.2.0.s390x.xml
create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.s390x.replies
create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
create mode 100644 tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.xml
create mode 100644 tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.xml
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.xml
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.xml
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.xml
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.xml
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.xml
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.xml
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.xml
create mode 100644 tests/qemuxml2xmloutdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
--
2.23.0
5 years, 1 month
[libvirt] [PATCH 0/4] apparmor fixes triggered by multi disk snapshots
by Christian Ehrhardt
Hi,
the bugs [1][2] that made me debug into this actually only need the
last patch (one line), but while coming along I found several
opportunities for minor improvements of the apparmor code in libvirt.
But that way it became a 4 patch series around apparmor.
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1746684
[2]: https://bugs.launchpad.net/libvirt/+bug/1845506
Christian Ehrhardt (4):
virt-aa-helper: clarify command line options
apparmor: drop useless call to get_profile_name
apparmor: refactor AppArmorSetSecurityImageLabel
apparmor: let AppArmorSetSecurityImageLabel append rules
src/security/security_apparmor.c | 52 +++++++-------------------------
src/security/virt-aa-helper.c | 14 +++++----
2 files changed, 19 insertions(+), 47 deletions(-)
--
2.23.0
5 years, 1 month
[libvirt] [PATCH 0/2] virt-aa-helper for shmem device
by Christian Ehrhardt
Cole was recently adding a few of the usual apparmor suspects to BZ 1761645
and I was taking a look at the low hanging fruits of it today. It isn't
perfect, but would resolve the reported issue - so I'd appreciate a
review.
Limitations:
- One could break the path creating elements in qemuBuildShmemBackendMemProps
and qemuDomainPrepareShmemChardev into extra functions and then use those
from virt-aa-helper. But I haven't done so yet and unless it is strictly
required consider it too much for what we want/need to achieve here.
- I haven't covered hotplug of shmem devices yet, it seems there is no
infrastructure for their labels yet and I wasn't sure how important
shmem-hotplug would even be to anyone.
Christian Ehrhardt (2):
virt-aa-helper: add rules for shmem devices
virt-aa-helper: testcase for shmem devices
src/security/virt-aa-helper.c | 35 +++++++++++++++++++++++++++++++++++
tests/virt-aa-helper-test | 15 +++++++++++++++
2 files changed, 50 insertions(+)
--
2.23.0
5 years, 1 month
[libvirt] [patch 1/1] virt-aa-helper: Add support for smartcard host-certificates
by Arnaud Patard
When emulating smartcard with host certificates, qemu needs to
be able to read the certificates files, which is denied by apparmor.
Add necessary code to add the smartcard certificates related directory
to the apparmor profile.
This code supports only this case smartcard 'host' and 'passthrough'
settings are not supported, as I can't test them.
Signed-off-by: Arnaud Patard <apatard(a)hupstream.com>
Index: libvirt-5.0.0/src/security/virt-aa-helper.c
===================================================================
--- libvirt-5.0.0.orig/src/security/virt-aa-helper.c
+++ libvirt-5.0.0/src/security/virt-aa-helper.c
@@ -1251,6 +1251,26 @@ get_files(vahControl * ctl)
}
}
+ for (i = 0; i < ctl->def->nsmartcards; i++) {
+ virDomainSmartcardDefPtr sc = ctl->def->smartcards[i];
+ virDomainSmartcardType sc_type = sc->type;
+ char *sc_db = (char *)VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE;
+ if (sc->data.cert.database)
+ sc_db = sc->data.cert.database;
+ switch(sc_type) {
+ case VIR_DOMAIN_SMARTCARD_TYPE_HOST:
+ break;
+ case VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES:
+ virBufferAsprintf(&buf, " \"%s/\" rk,\n", sc_db);
+ virBufferAsprintf(&buf, " \"%s/*\" rk,\n", sc_db);
+ break;
+ case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH:
+ break;
+ case VIR_DOMAIN_SMARTCARD_TYPE_LAST:
+ break;
+ }
+ }
+
if (ctl->def->virtType == VIR_DOMAIN_VIRT_KVM) {
for (i = 0; i < ctl->def->nnets; i++) {
virDomainNetDefPtr net = ctl->def->nets[i];
5 years, 1 month
[libvirt] [PATCH] virsh: limit completion of 'domhostname' to active domains
by Pino Toscano
Getting the hostname of guest usually requires a in-guest agent, or
generally can be determined only on active domains.
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index b248a15c16..6be9780836 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11668,7 +11668,7 @@ static const vshCmdInfo info_domhostname[] = {
};
static const vshCmdOptDef opts_domhostname[] = {
- VIRSH_COMMON_OPT_DOMAIN_FULL(0),
+ VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE),
{.name = NULL}
};
--
2.21.0
5 years, 1 month
[libvirt] FYI mail problems for libvirt lists
by Daniel P. Berrangé
It has come to our attention that many, possibly even all, people with
non-redhat.com email addresses are unable to send mail to most libvirt
mailing lists, receiving bounce messages saying the address doesn't
exist eg
Final-Recipient: rfc822; libvirt-users(a)redhat.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; us-smtp-inbound-1.mimecast.com
Diagnostic-Code: smtp; 550 Invalid Recipient -
https://community.mimecast.com/docs/DOC-1369#550
[boadZMN8PrGodBBK6pzKWg.us309]
In my testing, libvir-list(a)redhat.com is the only list that is currently
accepting incoming mail from non-redhat.com addresses.
I see bounces from libvirt-users(a)redhat.com, libvirt-ci(a)redhat.com,
libvirt-announce(a)redhat.com and libvirt-security(a)redhat.com, as well
as from the undocumented alias libvirt-list(a)redhat.com
We believe outgoing mail delivery is still working normally in all
cases.
The problems appear to be caused by some changes that Red Hat
administrators made to the email infrastructure recently.
We have a severity 1 ticket open for this issue and are taking all
possible steps to escalate it & get it resolved at the soonest
opportunity.
In the mean time if any users need assistance with libvirt questions,
please feel free to ignore our normal guidance and use the main development
list libvir-list(a)redhat.com for questions, as this appears to still be
working.
Alternatively you can use IRC #virt on irc.oftc.net
If you need to report any security issues with libvirt, please try the
libvirt-security(a)redhat.com list first, but if you get a bounce then
email myself directly.
Please accept our apologies for the disruption this is causing to the
libvirt mailing lists.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
5 years, 1 month
[libvirt] [PATCH 00/13] drop usage of c-type gnulib module
by Pavel Hrdina
Pavel Hrdina (13):
util: define IS_BLANK instead of using c_isblank from gnulib
use g_ascii_isalnum instead of c_isalnum from gnulib
use g_ascii_isalpha instead of c_isalpha from gnulib
use g_ascii_iscntrl instead of c_iscntrl from gnulib
use g_ascii_isdigit instead of c_isdigit frum gnulib
use g_ascii_islower instead of c_islower from gnulib
use g_ascii_isprint instead of c_isprint from gnulib
use g_ascii_isspace instead of c_isspace from gnulib
use g_ascii_isxdigit instead of c_isxdigit from gnulib
use g_ascii_tolower instead of c_tolower from gnulib
use g_ascii_toupper instead of c_toupper from gnulib
syntax-check: update c-type checks to refer to Glib
bootstrap.conf: drop usage of c-type gnulib module
bootstrap.conf | 1 -
build-aux/syntax-check.mk | 11 ++---------
src/bhyve/bhyve_parse_command.c | 3 +--
src/conf/network_conf.c | 3 +--
src/conf/nwfilter_conf.c | 3 +--
src/interface/interface_backend_udev.c | 5 ++---
src/libxl/libxl_conf.c | 3 +--
src/node_device/node_device_udev.c | 3 +--
src/qemu/qemu_agent.c | 3 +--
src/qemu/qemu_domain.c | 3 +--
src/qemu/qemu_monitor.c | 3 +--
src/qemu/qemu_qapi.c | 4 +---
src/remote/remote_driver.c | 3 +--
src/rpc/virnetsocket.c | 3 +--
src/storage/parthelper.c | 5 ++---
src/util/virbitmap.c | 5 ++---
src/util/virconf.c | 18 +++++++++---------
src/util/virfile.c | 8 +++-----
src/util/virhostcpu.c | 7 +++----
src/util/virkeyfile.c | 9 +++++----
src/util/virmacaddr.c | 11 +++++------
src/util/virnetdevvportprofile.c | 3 +--
src/util/virpidfile.c | 3 +--
src/util/virstoragefile.c | 3 +--
src/util/virstring.c | 13 ++++++-------
src/util/virutil.c | 11 +++++------
src/util/viruuid.c | 9 ++++-----
src/vmx/vmx.c | 8 +++-----
tools/virsh-console.c | 3 +--
tools/virsh-domain.c | 3 +--
tools/vsh-table.c | 5 ++---
tools/vsh.c | 5 ++---
32 files changed, 71 insertions(+), 109 deletions(-)
--
2.23.0
5 years, 1 month
[libvirt] [PATCH 0/9] Batch removal of gnulib modules
by Peter Krempa
This is a series of patches collecting gnulib module removals.
Patches from Jano and Pavel have alreadny my R-bs but at least one of my
patches does not.
Jano, I couldn't find your patch for removal of the mkostemp functions
so please provide it.
I'll push it later today once I get Jano's patch so that we have only
one point of disruption.
Ján Tomko (3):
gnulib: remove use of 'byteswap' module
gnulib: remove use of 'vsnprintf' module
bootstrap: remove regex module
Pavel Hrdina (4):
bootstrap.conf: remove usage of snprintf gnulib module
syntax-check: update of sprintf rule to mention g_snpritnf
syntax-check: forbid usage of snprintf
bootstrap.conf: drop c-strcasestr gnulib module
Peter Krempa (2):
gnulib: remove 'areadlink' module
gnulib: Remove use of 'strsep' module
bootstrap.conf | 7 -------
build-aux/syntax-check.mk | 12 ++++++++++--
po/POTFILES.in | 1 -
src/qemu/qemu_monitor_json.c | 1 -
4 files changed, 10 insertions(+), 11 deletions(-)
--
2.23.0
5 years, 1 month
[libvirt] [PATCH] bootstrap.conf: drop c-strcasestr gnulib module
by Pavel Hrdina
Last usage was removed by commit
<41f88886198e231285cc813f8c0687c8ec5c9488> and commit
<0f4d31720430b4e3735064cc0d8f88a1a438e154> forgot to drop include.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
bootstrap.conf | 1 -
src/qemu/qemu_monitor_json.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 4c784487e2..3eab6e1f3c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -24,7 +24,6 @@ bind
byteswap
c-ctype
c-strcase
-c-strcasestr
canonicalize-lgpl
chown
clock-time
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 10f6a4cadc..fb662cb18b 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -40,7 +40,6 @@
#include "virprobe.h"
#include "virstring.h"
#include "cpu/cpu_x86.h"
-#include "c-strcasestr.h"
#include "virenum.h"
#ifdef WITH_DTRACE_PROBES
--
2.23.0
5 years, 1 month