[libvirt PATCH 0/5] virnetdevopenvswitch: fix overindented label (glib chronicles)
by Ján Tomko
By removing it, of course.
Patch 1/5 also has the potential to fix the build on FreeBSD, but
it failed with an internal server error for me.
Ján Tomko (5):
build: only build virnetdevopenvswitchtest on Linux
tests: virnetdevopenvswitch: use g_auto
tests: virnetdevbandwidthtest: use g_auto
tests: introduce testVirNetDevBandwidthParse
tests: virnetdev*: remove unnecessary labels
tests/meson.build | 6 ++-
tests/virnetdevbandwidthtest.c | 56 ++++++++++++-------------
tests/virnetdevopenvswitchtest.c | 70 ++++++++++++++------------------
3 files changed, 61 insertions(+), 71 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH 0/6] nwfilter define: add support for validation against schema
by Kristina Hanicova
Kristina Hanicova (6):
api: add public virNWFilterDefineXMLFlags() and remote protocol
nwfilter: add nwfilterDefineXMLFlags()
api: add virNWFilterDefineFlags
nwfilter_conf: add validation against schema in define
nwfilter_driver: allow VIR_NWFILTER_DEFINE_VALIDATE flag
virsh: add support for '--validate' option in define nwfilter
docs/manpages/virsh.rst | 5 +++-
include/libvirt/libvirt-nwfilter.h | 7 +++++
src/conf/nwfilter_conf.c | 13 +++++----
src/conf/nwfilter_conf.h | 3 ++-
src/driver-nwfilter.h | 6 +++++
src/libvirt-nwfilter.c | 43 ++++++++++++++++++++++++++++++
src/libvirt_public.syms | 5 ++++
src/nwfilter/nwfilter_driver.c | 21 ++++++++++++---
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 18 ++++++++++++-
src/remote_protocol-structs | 8 ++++++
tools/virsh-nwfilter.c | 13 ++++++++-
12 files changed, 130 insertions(+), 13 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH 0/4] interface define: add support for validation against schema
by Kristina Hanicova
Kristina Hanicova (4):
api: add virInterfaceDefineFlags
conf: add validation and propagate flags into virInterfaceDefParse()
src: allow validation flag in interface define
virsh: add support for '--validate' option in define interface
docs/manpages/virsh.rst | 5 +++--
include/libvirt/libvirt-interface.h | 4 ++++
src/conf/interface_conf.c | 14 ++++++++------
src/conf/interface_conf.h | 3 ++-
src/conf/virinterfaceobj.c | 2 +-
src/interface/interface_backend_netcf.c | 6 +++---
src/libvirt-interface.c | 2 +-
src/test/test_driver.c | 4 ++--
tests/interfacexml2xmltest.c | 2 +-
tools/virsh-interface.c | 10 +++++++++-
10 files changed, 34 insertions(+), 18 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH 0/4] secret define: add support for validation against schema
by Kristina Hanicova
Kristina Hanicova (4):
api: add virSecretDefineFlags
secret_conf: add validation against schema in define
secret_driver: allow VIR_SECRET_DEFINE_VALIDATE flag
virsh: add support for '--validate' option in define secret
docs/manpages/virsh.rst | 4 +++-
include/libvirt/libvirt-secret.h | 5 +++++
src/conf/secret_conf.c | 13 ++++++++-----
src/conf/secret_conf.h | 2 +-
src/libvirt-secret.c | 2 +-
src/secret/secret_driver.c | 4 ++--
tools/virsh-secret.c | 10 +++++++++-
7 files changed, 29 insertions(+), 11 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH v2 00/12] Implement detach device related APIs for test driver
by Luke Yue
v2:
- Extract DetachXXXDeviceConfig functions from drivers and use them
- Add a trial implementation of detach memballoon and TPM, if they are
fine, more device support will be added to test driver in the future
- Add expectError to testCompareOutputLit for some "fail on purpose"
tests
- Refine tests
Luke Yue (12):
conf: Introduce virDomainInputDefRemove and fix memory leak
domain_driver: extract DetachXXXDeviceConfig related functions and use
them
test_driver: Implement virDomainDetachDeviceFlags
test_driver: Implement virDomainDetachDeviceAlias
test_driver: Implement virDomainDetachDevice
conf: Add tpm helpers for future use
test_driver: add TPM support for testDomainDetachDeviceLiveAndConfig
conf: Add a memballoon helper for future use
test_driver: add memballoon support for
testDomainDetachDeviceLiveAndConfig
examples: xml: test: add xml for testing devices related APIs
virshtest: add expectError parameter to testCompareOutputLit
tests: Test detach-device and detach-device-alias for test driver
examples/xml/test/testdevcontroller.xml | 1 +
examples/xml/test/testdevdiskcdrom.xml | 5 +
examples/xml/test/testdevfs.xml | 6 +
examples/xml/test/testdevhostdev.xml | 5 +
examples/xml/test/testdevif.xml | 6 +
examples/xml/test/testdevinput.xml | 1 +
examples/xml/test/testdevlease.xml | 5 +
examples/xml/test/testdevmem.xml | 6 +
examples/xml/test/testdevmemballoon.xml | 3 +
examples/xml/test/testdevrng.xml | 4 +
examples/xml/test/testdevshmem.xml | 4 +
examples/xml/test/testdevsound.xml | 3 +
examples/xml/test/testdevtpm.xml | 5 +
examples/xml/test/testdevvsock.xml | 3 +
examples/xml/test/testdevwatchdog.xml | 1 +
examples/xml/test/testdomfc5.xml | 54 +++++
examples/xml/test/testnodeinline.xml | 54 +++++
src/conf/domain_conf.c | 103 ++++++++
src/conf/domain_conf.h | 12 +
src/hypervisor/domain_driver.c | 303 ++++++++++++++++++++++++
src/hypervisor/domain_driver.h | 47 ++++
src/libvirt_private.syms | 20 ++
src/libxl/libxl_driver.c | 41 +---
src/lxc/lxc_driver.c | 37 +--
src/qemu/qemu_driver.c | 124 ++--------
src/test/test_driver.c | 239 +++++++++++++++++++
tests/virshtest.c | 131 ++++++++--
27 files changed, 1033 insertions(+), 190 deletions(-)
create mode 100644 examples/xml/test/testdevcontroller.xml
create mode 100644 examples/xml/test/testdevdiskcdrom.xml
create mode 100644 examples/xml/test/testdevfs.xml
create mode 100644 examples/xml/test/testdevhostdev.xml
create mode 100644 examples/xml/test/testdevif.xml
create mode 100644 examples/xml/test/testdevinput.xml
create mode 100644 examples/xml/test/testdevlease.xml
create mode 100644 examples/xml/test/testdevmem.xml
create mode 100644 examples/xml/test/testdevmemballoon.xml
create mode 100644 examples/xml/test/testdevrng.xml
create mode 100644 examples/xml/test/testdevshmem.xml
create mode 100644 examples/xml/test/testdevsound.xml
create mode 100644 examples/xml/test/testdevtpm.xml
create mode 100644 examples/xml/test/testdevvsock.xml
create mode 100644 examples/xml/test/testdevwatchdog.xml
--
2.33.0
3 years, 4 months
[libvirt PATCH 0/2] tests: use g_auto more (glib chronicles)
by Ján Tomko
Convert two more functions to use automatic cleanup.
Ján Tomko (2):
tests: use g_auto in testQemuGetCaps
tests: use g_auto in qemuTestParseCapabilitiesArch
tests/qemucaps2xmltest.c | 16 ++++++----------
tests/testutilsqemu.c | 10 +++-------
2 files changed, 9 insertions(+), 17 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH 0/2] qemu: block: Use correct format name when formatting overlay of qcow2+luks
by Peter Krempa
see 1/2
Peter Krempa (2):
qemu: block: Use correct format name when formatting overlay of
qcow2+luks
qemublocktest: Add test for creating a qcow2 on top of an
luks-encrypted qcow2
src/qemu/qemu_block.c | 3 ++-
tests/qemublocktest.c | 1 +
.../imagecreate/qcow2-backing-qcow2luks.json | 15 +++++++++++++++
.../imagecreate/qcow2-backing-qcow2luks.xml | 1 +
4 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2luks.json
create mode 120000 tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2luks.xml
--
2.31.1
3 years, 4 months
[PATCH] virsocket: Don't preserve errno in virSocketRecvFD()
by Michal Privoznik
When setting O_CLOEXEC flag on received FD fails the FD is closed
using VIR_FORCE_CLOSE(). But the call is wrapped in errno save
which is not necessary because VIR_FORCE_CLOSE() preservers errno
value.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virsocket.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/util/virsocket.c b/src/util/virsocket.c
index b971da16e3..a6f185114d 100644
--- a/src/util/virsocket.c
+++ b/src/util/virsocket.c
@@ -477,9 +477,7 @@ virSocketRecvFD(int sock, int fdflags)
/* set close-on-exec flag */
if (!MSG_CMSG_CLOEXEC && (fdflags & O_CLOEXEC)) {
if (virSetCloseExec(fd) < 0) {
- int saved_errno = errno;
VIR_FORCE_CLOSE(fd);
- errno = saved_errno;
return -1;
}
}
--
2.31.1
3 years, 4 months
[PATCH RFC v6 00/12] Add riscv kvm accel support
by Yifei Jiang
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv. It is based on temporarily unaccepted kvm:
https://github.com/kvm-riscv/linux (lastest version v19).
This series depends on above pending changes which haven't yet been
accepted, so this QEMU patch series is treated as RFC patches until
that dependency has been dealt with.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ make -j$(nproc)
2. Build kernel
https://github.com/kvm-riscv/linux
3. Build QEMU VM
Cross built in riscv toolchain.
$ PKG_CONFIG_LIBDIR=<toolchain pkgconfig path>
$ export PKG_CONFIG_SYSROOT_DIR=<toolchain sysroot path>
$ ./configure --target-list=riscv64-softmmu --enable-kvm \
--cross-prefix=riscv64-linux-gnu- --disable-libiscsi --disable-glusterfs \
--disable-libusb --disable-usb-redir --audio-drv-list= --disable-opengl \
--disable-libxml2
$ make -j$(nproc)
4. Start emulation
$ ./qemu-system-riscv64 -M virt -m 4096M -cpu rv64,x-h=true -nographic \
-name guest=riscv-hyp,debug-threads=on \
-smp 4 \
-bios ./fw_jump.bin \
-kernel ./Image \
-drive file=./hyp.img,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-append "root=/dev/vda rw console=ttyS0 earlycon=sbi"
5. Start kvm-acceled QEMU VM in emulation
$ ./qemu-system-riscv64 -M virt,accel=kvm -m 1024M -cpu host -nographic \
-name guest=riscv-guset \
-smp 2 \
-bios none \
-kernel ./Image \
-drive file=./guest.img,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-append "root=/dev/vda rw console=ttyS0 earlycon=sbi"
Changes since RFC v5
- Rebase on QEMU v6.1.0-rc1 and kvm-riscv linux v19.
- Move kvm interrupt setting to riscv_cpu_update_mip().
- Replace __u64 with uint64_t.
Changes since RFC v4
- Rebase on QEMU v6.0.0-rc2 and kvm-riscv linux v17.
- Remove time scaling support as software solution is incomplete.
Because it will cause unacceptable performance degradation. and
We will post a better solution.
- Revise according to Alistair's review comments.
- Remove compile time XLEN checks in kvm_riscv_reg_id
- Surround TYPE_RISCV_CPU_HOST definition by CONFIG_KVM and share
it between RV32 and RV64.
- Add kvm-stub.c for reduce unnecessary compilation checks.
- Add riscv_setup_direct_kernel() to direct boot kernel for KVM.
Changes since RFC v3
- Rebase on QEMU v5.2.0-rc2 and kvm-riscv linux v15.
- Add time scaling support(New patches 13, 14 and 15).
- Fix the bug that guest vm can't reboot.
Changes since RFC v2
- Fix checkpatch error at target/riscv/sbi_ecall_interface.h.
- Add riscv migration support.
Changes since RFC v1
- Add separate SBI ecall interface header.
- Add riscv32 kvm accel support.
Yifei Jiang (12):
linux-header: Update linux/kvm.h
target/riscv: Add target/riscv/kvm.c to place the public kvm interface
target/riscv: Implement function kvm_arch_init_vcpu
target/riscv: Implement kvm_arch_get_registers
target/riscv: Implement kvm_arch_put_registers
target/riscv: Support start kernel directly by KVM
target/riscv: Support setting external interrupt by KVM
target/riscv: Handle KVM_EXIT_RISCV_SBI exit
target/riscv: Add host cpu type
target/riscv: Add kvm_riscv_get/put_regs_timer
target/riscv: Implement virtual time adjusting with vm state changing
target/riscv: Support virtual time context synchronization
hw/riscv/boot.c | 11 +
hw/riscv/virt.c | 7 +
include/hw/riscv/boot.h | 1 +
linux-headers/linux/kvm.h | 8 +
meson.build | 2 +
target/riscv/cpu.c | 57 +++
target/riscv/cpu.h | 10 +
target/riscv/cpu_helper.c | 27 --
target/riscv/kvm-stub.c | 30 ++
target/riscv/kvm.c | 605 +++++++++++++++++++++++++++++
target/riscv/kvm_riscv.h | 25 ++
target/riscv/machine.c | 14 +
target/riscv/meson.build | 1 +
target/riscv/sbi_ecall_interface.h | 72 ++++
14 files changed, 843 insertions(+), 27 deletions(-)
create mode 100644 target/riscv/kvm-stub.c
create mode 100644 target/riscv/kvm.c
create mode 100644 target/riscv/kvm_riscv.h
create mode 100644 target/riscv/sbi_ecall_interface.h
--
2.19.1
3 years, 4 months
[PATCH] fix error in printf format string
by Zhenyu Ye
Use %s to print NULLSTR(duri).
Reported-by: Peng Liang <liangpeng10(a)huawei.com>
Signed-off-by: Zhenyu Ye <yezhenyu2(a)huawei.com>
---
src/libvirt-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 4eb14d4176..3c4204e563 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -4215,7 +4215,7 @@ virDomainMigrateToURI(virDomainPtr domain,
const char *dconnuri = NULL;
const char *miguri = NULL;
- VIR_DOMAIN_DEBUG(domain, "duri=%p, flags=0x%lx, dname=%s, bandwidth=%lu",
+ VIR_DOMAIN_DEBUG(domain, "duri=%s, flags=0x%lx, dname=%s, bandwidth=%lu",
NULLSTR(duri), flags, NULLSTR(dname), bandwidth);
virResetLastError();
--
2.27.0
3 years, 4 months