[libvirt PATCH] qemu: Log which API is trying to acquire a job
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_domainjob.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c
index c8fe8ad555..1ecde5af86 100644
--- a/src/qemu/qemu_domainjob.c
+++ b/src/qemu/qemu_domainjob.c
@@ -827,9 +827,11 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
unsigned long long duration = 0;
unsigned long long agentDuration = 0;
unsigned long long asyncDuration = 0;
+ const char *currentAPI = virThreadJobGet();
- VIR_DEBUG("Starting job: job=%s agentJob=%s asyncJob=%s "
+ VIR_DEBUG("Starting job: API=%s job=%s agentJob=%s asyncJob=%s "
"(vm=%p name=%s, current job=%s agentJob=%s async=%s)",
+ NULLSTR(currentAPI),
qemuDomainJobTypeToString(job),
qemuDomainAgentJobTypeToString(agentJob),
qemuDomainAsyncJobTypeToString(asyncJob),
@@ -931,13 +933,14 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
if (priv->job.asyncJob && priv->job.asyncStarted)
asyncDuration = now - priv->job.asyncStarted;
- VIR_WARN("Cannot start job (%s, %s, %s) for domain %s; "
+ VIR_WARN("Cannot start job (%s, %s, %s) in API %s for domain %s; "
"current job is (%s, %s, %s) "
"owned by (%llu %s, %llu %s, %llu %s (flags=0x%lx)) "
"for (%llus, %llus, %llus)",
qemuDomainJobTypeToString(job),
qemuDomainAgentJobTypeToString(agentJob),
qemuDomainAsyncJobTypeToString(asyncJob),
+ NULLSTR(currentAPI),
obj->def->name,
qemuDomainJobTypeToString(priv->job.active),
qemuDomainAgentJobTypeToString(priv->job.agentActive),
--
2.34.1
2 years, 10 months
[libvirt PATCH 0/6] util: virnetdev: use g_auto for virCommand
by Ján Tomko
Refactor some functions to remove more manual virCommand freeing.
virNetDevBandwidthSet is left untouched.
Ján Tomko (6):
util: midonet: use g_auto for virCommand
util: virNetDevBandwidthUpdateRate: refactor
util: virNetDevBandwidthManipulateFilter: use g_auto
util: virNetDevBandwidthClear: use g_auto
util: refactor virNetDevBandwidthPlug
util: refactor virNetDevBandwidthUnplug
src/util/virnetdevbandwidth.c | 128 +++++++++++++---------------------
src/util/virnetdevmidonet.c | 20 ++----
2 files changed, 53 insertions(+), 95 deletions(-)
--
2.31.1
2 years, 10 months
[libvirt PATCH 0/6] util: openvswitch: cleanup
by Ján Tomko
Rearrange some code and remove 'cmd' variable reuse to get rid of
manual 'virCommandFree' in functions using g_auto.
Ján Tomko (6):
util: openvswitch: move InterfaceClear{Rx,Tx}Qos
util: openvswitch: unexport InterfaceClear{Rx,Tx}Qos
util: openvswitch: split out virNetDevOpenvswitchInterfaceSetTxQos
util: openvswitch: split out virNetDevOpenvswitchInterfaceSetRxQos
util: openvswitch: do not reuse cmd in InterfaceSetTxQos
util: openvswitch: do not reuse cmd in InterfaceClearTxQos
src/libvirt_private.syms | 2 -
src/util/virnetdevopenvswitch.c | 406 +++++++++++++++++---------------
src/util/virnetdevopenvswitch.h | 7 -
3 files changed, 213 insertions(+), 202 deletions(-)
--
2.31.1
2 years, 10 months
[PATCH v5 00/13] Add riscv kvm accel support
by Yifei Jiang
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv.
Because of RISC-V KVM has been merged into the Linux master, so this
series are changed from RFC to patch.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ make -j$(nproc)
2. Build kernel
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 -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 patch v4
- Commit enable kvm accel as an independent patch.
- Bugfix some checkpatch errors.
- Bugfix lost a interrupt in the sifive_u machine.
Changes since patch v3
- Re-write the for-loop in sifive_plic_create().
- Drop unnecessary change in hw/riscv/virt.c.
- Use serial to handle console sbi call.
Changes since patch v2
- Create a macro for get and put timer csr.
- Remove M-mode PLIC contexts when kvm is enabled.
- Add get timer frequency.
- Move cpu_host_load to vmstate_kvmtimer.
Changes since patch v1
- Rebase on recent commit a216e7cf119c91ffdf5931834a1a030ebea40d70
- Sync-up headers with Linux-5.16-rc4.
- Fixbug in kvm_arch_init_vcpu.
- Create a macro for get and put regs csr.
- Start kernel directly when kvm_enabled.
- Use riscv_cpu_set_irq to inject KVM interrupts.
- Use the Semihosting Console API for RISC-V kvm handle sbi.
- Update vmstate_riscv_cpu version id.
Placing kvm_timer into a subsection.
Changes since RFC v6
- Rebase on recent commit 8627edfb3f1fca24a96a0954148885c3241c10f8
- Sync-up headers with Linux-5.16-rc1
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 (13):
update-linux-headers: Add asm-riscv/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
target/riscv: enable riscv kvm accel
hw/intc/sifive_plic.c | 20 +-
hw/riscv/boot.c | 16 +-
hw/riscv/virt.c | 83 +++--
include/hw/riscv/boot.h | 1 +
linux-headers/asm-riscv/kvm.h | 128 +++++++
meson.build | 2 +
target/riscv/cpu.c | 29 +-
target/riscv/cpu.h | 11 +
target/riscv/kvm-stub.c | 30 ++
target/riscv/kvm.c | 535 +++++++++++++++++++++++++++++
target/riscv/kvm_riscv.h | 25 ++
target/riscv/machine.c | 30 ++
target/riscv/meson.build | 1 +
target/riscv/sbi_ecall_interface.h | 72 ++++
14 files changed, 951 insertions(+), 32 deletions(-)
create mode 100644 linux-headers/asm-riscv/kvm.h
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
2 years, 10 months
[PATCH v8 0/2] remove sysconfig files
by Olaf Hering
remove comments for legacy qemu audio
remove comments from libvirt-guests script
rebased to 4902dc68e555ccf28af3427f75661c54a2fffc0f
Olaf Hering (2):
remove sysconfig files
NEWS: mention removal of sysconfig
NEWS.rst | 10 ++++
docs/daemons.rst | 21 ++++++++
docs/remote.html.in | 6 +--
libvirt.spec.in | 69 +++++++++++++++++++------
src/ch/meson.build | 5 --
src/ch/virtchd.service.in | 1 +
src/ch/virtchd.sysconf | 3 --
src/interface/meson.build | 5 --
src/interface/virtinterfaced.service.in | 1 +
src/interface/virtinterfaced.sysconf | 3 --
src/libxl/meson.build | 5 --
src/libxl/virtxend.service.in | 1 +
src/libxl/virtxend.sysconf | 3 --
src/locking/meson.build | 5 --
src/locking/virtlockd.service.in | 1 +
src/locking/virtlockd.sysconf | 3 --
src/logging/meson.build | 5 --
src/logging/virtlogd.sysconf | 3 --
src/lxc/meson.build | 5 --
src/lxc/virtlxcd.service.in | 1 +
src/lxc/virtlxcd.sysconf | 3 --
src/meson.build | 16 ------
src/network/meson.build | 5 --
src/network/virtnetworkd.service.in | 1 +
src/network/virtnetworkd.sysconf | 3 --
src/node_device/meson.build | 5 --
src/node_device/virtnodedevd.service.in | 1 +
src/node_device/virtnodedevd.sysconf | 3 --
src/nwfilter/meson.build | 5 --
src/nwfilter/virtnwfilterd.service.in | 1 +
src/nwfilter/virtnwfilterd.sysconf | 3 --
src/qemu/meson.build | 5 --
src/qemu/virtqemud.service.in | 1 +
src/qemu/virtqemud.sysconf | 12 -----
src/remote/libvirtd.service.in | 1 +
src/remote/libvirtd.sysconf | 21 --------
src/remote/meson.build | 10 ----
src/remote/virtproxyd.service.in | 1 +
src/remote/virtproxyd.sysconf | 3 --
src/secret/meson.build | 5 --
src/secret/virtsecretd.service.in | 1 +
src/secret/virtsecretd.sysconf | 3 --
src/storage/meson.build | 5 --
src/storage/virtstoraged.service.in | 1 +
src/storage/virtstoraged.sysconf | 3 --
src/vbox/meson.build | 5 --
src/vbox/virtvboxd.service.in | 1 +
src/vbox/virtvboxd.sysconf | 3 --
src/vz/meson.build | 5 --
src/vz/virtvzd.service.in | 1 +
src/vz/virtvzd.sysconf | 3 --
tools/libvirt-guests.sysconf | 50 ------------------
tools/meson.build | 6 ---
53 files changed, 103 insertions(+), 245 deletions(-)
delete mode 100644 src/ch/virtchd.sysconf
delete mode 100644 src/interface/virtinterfaced.sysconf
delete mode 100644 src/libxl/virtxend.sysconf
delete mode 100644 src/locking/virtlockd.sysconf
delete mode 100644 src/logging/virtlogd.sysconf
delete mode 100644 src/lxc/virtlxcd.sysconf
delete mode 100644 src/network/virtnetworkd.sysconf
delete mode 100644 src/node_device/virtnodedevd.sysconf
delete mode 100644 src/nwfilter/virtnwfilterd.sysconf
delete mode 100644 src/qemu/virtqemud.sysconf
delete mode 100644 src/remote/libvirtd.sysconf
delete mode 100644 src/remote/virtproxyd.sysconf
delete mode 100644 src/secret/virtsecretd.sysconf
delete mode 100644 src/storage/virtstoraged.sysconf
delete mode 100644 src/vbox/virtvboxd.sysconf
delete mode 100644 src/vz/virtvzd.sysconf
delete mode 100644 tools/libvirt-guests.sysconf
2 years, 10 months
[PATCH V2 0/2] docs: Add man page for libvirt-guests
by Jim Fehlig
V2 of https://listman.redhat.com/archives/libvir-list/2022-January/msg00336.html
Changes since V1:
- New patch to only install libvirt-guests when building libvirtd
- Only install libvirt-guests man page when building libvirtd
- Default config overridden in sysconfig file, not environment
Jim Fehlig (2):
build: Only install libvirt-guests when building libvirtd
docs: Add man page for libvirt-guests
docs/manpages/index.rst | 1 +
docs/manpages/libvirt-guests.rst | 151 +++++++++++++++++++++++++++++++
docs/manpages/meson.build | 1 +
libvirt.spec.in | 1 +
tools/libvirt-guests.service.in | 2 +-
tools/meson.build | 38 ++++----
6 files changed, 175 insertions(+), 19 deletions(-)
create mode 100644 docs/manpages/libvirt-guests.rst
--
2.34.1
2 years, 10 months
[PATCH v2] docs: domain: document legacy audio for qemu
by Olaf Hering
Adding a blurb like this was forgotten in 2009.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
docs/formatdomain.rst | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index d4f30bb8af..f07ea34232 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -7079,6 +7079,20 @@ is permitted with the following attributes.
The audio format, one of ``s8``, ``u8``, ``s16``, ``u16``,
``s32``, ``u32``, ``f32``. The default is hypervisor specific.
+Note:
+If no ``<audio/>`` element is defined, and the ``graphics`` element is set to
+either 'vnc' or 'sdl', the libvirtd or virtqemud process will honor the following
+environment variables:
+
+* ``SDL_AUDIODRIVER``
+
+ Valid values are 'pulseaudio', 'esd', 'alsa' or 'arts'.
+
+* ``QEMU_AUDIO_DRV``
+
+ Valid values are 'pa', 'pulseaudio', 'none', 'alsa', 'coreaudio', 'jack',
+ 'oss', 'sdl', 'spice' or 'file'.
+
None audio backend
^^^^^^^^^^^^^^^^^^
2 years, 10 months
[PATCH] testutils: Terminate usage string with a new line
by Michal Privoznik
If a test binary is executed with an argument then usage
information is printed out (that no arguments are accepted and
what environment variables affect execution). The string is
printed onto stderr but it is not terminated with a newline
character producing not so nice output.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed as trivial.
tests/testutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/testutils.c b/tests/testutils.c
index 322c3b9400..2b37c1965d 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -826,7 +826,7 @@ int virTestMain(int argc,
fprintf(stderr, "Usage: %s\n", argv[0]);
fputs("effective environment variables:\n"
"VIR_TEST_VERBOSE set to show names of individual tests\n"
- "VIR_TEST_DEBUG set to show information for debugging failures",
+ "VIR_TEST_DEBUG set to show information for debugging failures\n",
stderr);
return EXIT_FAILURE;
}
--
2.34.1
2 years, 10 months