[PATCH v2] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-16 Thread Jiaxun Yang
Upstream kernel had removed both host[1] and guest[2] support. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 [2]:

[libvirt PATCH] nodedev: Don't crash when exiting before init is done

2021-03-16 Thread Jonathon Jongsma
If libvirtd is terminated before the node driver finishes initialization, it can crash with a backtrace similar to the following: Stack trace of thread 1922933: #0 0x7f8515178774 g_hash_table_find (libglib-2.0.so.0) #1 0x7f851593ea98 virHashSearch (libvirt.so.0) #2

Re: [PULL 00/13] Usb 20210315 patches

2021-03-16 Thread Peter Maydell
On Mon, 15 Mar 2021 at 18:26, Gerd Hoffmann wrote: > > The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-= > request' into staging (2021-03-14 17:47:49 +) > > are available in the Git

Re: [libvirt PATCH] util: tell users that memory locking ulimit is too low for BPF

2021-03-16 Thread Pavel Hrdina
On Tue, Mar 16, 2021 at 05:06:33PM +, Daniel P. Berrangé wrote: > If running libvirtd via systemd, it gets a 64 MB memlock limit, but if > running from the shell it will only get 64 KB on a Fedora 33 system. > The latter low limit causes any attempt to use BPF to fail and it is > not obvious

Re: [PATCH v1] tests: Adjust libxlxml2domconfigtest to work with Xen < 4.8

2021-03-16 Thread Daniel Henrique Barboza
On 3/8/21 10:29 AM, Olaf Hering wrote: Commit fcdc387410fadfb066b95395c5b5d2a6a16f7066 used a libxl API which is only available since Xen 4.8. Due to lack of a specific guard for this API change, reuse another guard from libxl.h. Signed-off-by: Olaf Hering --- The patch failed the

Re: [PATCH] vm : forbid to start a removing vm

2021-03-16 Thread Daniel Henrique Barboza
On 3/10/21 10:13 PM, Hogan Wang wrote: From: Zhuang Shengen When a vm is doing migration phase confirm, and then start it concurrently, it will lead to the vm out of libvirtd control. Cause Analysis: 1. thread1 migrate vm out. 2. thread2 start the migrating vm. 3. thread1 remove vm from

[libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

2021-03-16 Thread Erik Skultety
This function checks whether there are any stale Docker images in the registry that can be purged. Since we're pulling available container images from our GitLab registry with the 'list-images' action, it could happen that we'd list old (already unsupported) images and make them available for the

[libvirt PATCH v2 3/6] ci: helper: Introduce --quiet

2021-03-16 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index 8f34f4b59d..abac686d22 100755 --- a/ci/helper +++

[libvirt PATCH v2 5/6] ci: helper: Rewrite image listing to Python

2021-03-16 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety --- ci/Makefile | 12 +--- ci/helper | 37

[libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-16 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety --- ci/util.py | 39 +++ 1 file changed, 39 insertions(+) create mode 100644

[libvirt PATCH v2 1/6] ci: Makefile: Specify a help target to replace ci-help

2021-03-16 Thread Erik Skultety
It's quite pointless to have a 'ci-help' target in the Makefile when one needs to actually open the Makefile to go through the list of targets to know what functionality the Makefile actually provides. It's much more intuitive to run "make help" in that case. Therefore, add a 'help' target and

[libvirt PATCH v2 2/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-16 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper +++ b/ci/helper @@ -79,6 +79,7 @@

[libvirt PATCH v2 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-16 Thread Erik Skultety
Technically v2 of https://listman.redhat.com/archives/libvir-list/2021-February/msg00641.html, but the changes are not minor anymore so I had to change the subject. since v1: - integrated the standalone script to the recently added 'helper' script - ditched the hardcode libvirt project ID

[libvirt PATCH] util: tell users that memory locking ulimit is too low for BPF

2021-03-16 Thread Daniel P . Berrangé
If running libvirtd via systemd, it gets a 64 MB memlock limit, but if running from the shell it will only get 64 KB on a Fedora 33 system. The latter low limit causes any attempt to use BPF to fail and it is not obvious why. This improves the error message thus: # virsh -c lxc:/// start sh

Re: [libvirt PATCH] src: ensure GSource background unref happens in correct event loop

2021-03-16 Thread Martin Kletzander
On Tue, Mar 16, 2021 at 04:30:32PM +, Daniel P. Berrangé wrote: The g_idle_add function adds a callback to the primary GMainContext. To workaround the GSource unref bugs, we need to add our callbacks to the GMainContext that is associated with the GSource being unref'd. Thus code using the

Re: [PATCH] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-16 Thread Philippe Mathieu-Daudé
Jiaxun, ping for moving the section? On 3/12/21 10:43 AM, Philippe Mathieu-Daudé wrote: > +Paolo/Thomas/KVM > > On 3/12/21 2:03 AM, Jiaxun Yang wrote: >> Upstream kernel had removed both host[1] and guest[2] support. >> >> [1]: >>

[PULL 13/13] block: remove support for using "file" driver with block/char devices

2021-03-16 Thread Daniel P . Berrangé
The 'host_device' and 'host_cdrom' drivers must be used instead. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 17 ++--- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++

[PULL 12/13] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-03-16 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/qapi.c| 5 - docs/system/deprecated.rst | 13 -

[PULL 11/13] block: remove dirty bitmaps 'status' field

2021-03-16 Thread Daniel P . Berrangé
The same information is available via the 'recording' and 'busy' fields. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/dirty-bitmap.c | 38 docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 +

[PULL 10/13] block: remove 'encryption_key_missing' flag from QAPI

2021-03-16 Thread Daniel P . Berrangé
This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided up front instead of using interactive prompts. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 -

[PULL 09/13] hw/scsi: remove 'scsi-disk' device

2021-03-16 Thread Daniel P . Berrangé
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 6 hw/i386/pc.c | 1 - hw/scsi/scsi-disk.c |

[PULL 08/13] hw/ide: remove 'ide-drive' device

2021-03-16 Thread Daniel P . Berrangé
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 8 +++ hw/i386/pc.c

[PULL 07/13] chardev: reject use of 'wait' flag for socket client chardevs

2021-03-16 Thread Daniel P . Berrangé
This only makes sense conceptually when used with listener chardevs. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c| 12 docs/system/deprecated.rst | 6 -- docs/system/removed-features.rst | 6 ++ 3 files

[PULL 06/13] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-03-16 Thread Daniel P . Berrangé
Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 6 + hw/core/machine-qmp-cmds.c | 41 qapi/machine.json| 22 - 4 files

[PULL 05/13] machine: remove 'query-cpus' QMP command

2021-03-16 Thread Daniel P . Berrangé
The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command. Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Moschetta Signed-off-by: Daniel P. Berrangé ---

[PULL 04/13] migrate: remove QMP/HMP commands for speed, downtime and cache size

2021-03-16 Thread Daniel P . Berrangé
The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so

[PULL 03/13] monitor: remove 'query-events' QMP command

2021-03-16 Thread Daniel P . Berrangé
The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé ---

[PULL 02/13] monitor: raise error when 'pretty' option is used with HMP

2021-03-16 Thread Daniel P . Berrangé
This is only semantically useful for QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 6 ++ monitor/monitor.c| 4 ++-- qemu-options.hx | 5 +++--

[PULL 01/13] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-03-16 Thread Daniel P . Berrangé
The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 16 --- docs/system/removed-features.rst | 13

[PULL 00/13] misc patches removing deprecated features

2021-03-16 Thread Daniel P . Berrangé
The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-03-16 10:53:47 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/dep-many-pull-request

[libvirt PATCH] src: ensure GSource background unref happens in correct event loop

2021-03-16 Thread Daniel P . Berrangé
The g_idle_add function adds a callback to the primary GMainContext. To workaround the GSource unref bugs, we need to add our callbacks to the GMainContext that is associated with the GSource being unref'd. Thus code using the per-VM virEventThread must use its private GMainContext.

Re: [PATCH 6/6] lib: Drop internal virXXXPtr typedefs

2021-03-16 Thread Michal Privoznik
On 3/12/21 8:59 AM, Michal Privoznik wrote: On 3/11/21 7:47 PM, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 06:54:20PM +0100, Michal Privoznik wrote: Historically, we declared pointer type to our types:    typedef struct _virXXX virXXX;    typedef virXXX *virXXXPtr; Also

[PATCH v7 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2021-03-16 Thread Hao Wang
V6 -> V7: add virDomainDirtyRateStatus enum define calc_status as int split 5/5 in v6 into two parts: 6/7 in v7: extend dirtyrate statistics for domGetStats 7/7 in v7: extend corresponding virsh command V5 -> V6: split DomainGetDirtyRateInfo(domdirtyrate) API into two parts: 1.

[PATCH v7 4/7] migration/dirtyrate: Introduce virDomainDirtyRateStatus enum

2021-03-16 Thread Hao Wang
Introduce virDomainDirtyRateStatus enum. Signed-off-by: Hao Wang --- include/libvirt/libvirt-domain.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 7aa5ef4543..b05bb94131 100644 ---

[PATCH v7 2/7] migration/dirtyrate: Implement qemuDomainStartDirtyRateCalc

2021-03-16 Thread Hao Wang
Implement qemuDomainStartDirtyRateCalc which calculates domain's memory dirty rate calling qmp "calc-dirty-rate". Signed-off-by: Hao Wang --- src/qemu/qemu_driver.c | 59 src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 4 +++

[PATCH v7 3/7] migration/dirtyrate: Introduce domdirtyrate-calc virsh api

2021-03-16 Thread Hao Wang
Introduce domdirtyrate-calc virsh api to start calculating domain's memory dirty rate: # virsh domdirtyrate-calc [--seconds ] Signed-off-by: Hao Wang --- docs/manpages/virsh.rst | 17 tools/virsh-domain.c| 58 + 2 files changed,

[PATCH v7 5/7] migration/dirtyrate: Implement qemuMonitorQueryDirtyRate

2021-03-16 Thread Hao Wang
Implement qemuMonitorQueryDirtyRate which query domain's memory dirty rate calling qmp "query-dirty-rate". Signed-off-by: Hao Wang --- src/qemu/qemu_monitor.c | 12 ++ src/qemu/qemu_monitor.h | 15 +++ src/qemu/qemu_monitor_json.c | 79

[PATCH v7 1/7] migration/dirtyrate: Introduce virDomainStartDirtyRateCalc API

2021-03-16 Thread Hao Wang
Introduce virDomainStartDirtyRateCalc API for start calculation of a domain's memory dirty rate with a specified time. Signed-off-by: Hao Wang --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hypervisor.h | 6 + src/libvirt-domain.c | 44

[PATCH v7 6/7] migration/dirtyrate: Extend dirtyrate statistics for domGetStats

2021-03-16 Thread Hao Wang
Extend dirtyrate statistics for domGetStats to display the information of a domain's memory dirty rate produced by domainStartDirtyRateCalc. Signed-off-by: Hao Wang --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 15 ++ src/qemu/qemu_driver.c |

[PATCH v7 7/7] migration/dirtyrate: Introduce command 'virsh domstats --dirtyrate'

2021-03-16 Thread Hao Wang
Introduce command 'virsh domstats --dirtyrate' for reporting memory dirty rate information. The info is listed as: Domain: 'vm0' dirtyrate.calc_status=2 dirtyrate.calc_start_time=1534523 dirtyrate.calc_period=1 dirtyrate.megabytes_per_second=5 Signed-off-by: Hao Wang ---

[PATCH v2] bhyve: add support

2021-03-16 Thread Roman Bogorodskiy
Implement "" support for bhyve driver. As there are not really lot of options, try to find "BHYVE_UEFI.fd" firmware which is installed by the sysutils/uefi-edk2-bhyve FreeBSD port. If not found, just use the first found firmware in the firmwares directory (which is configurable via config file).

[PATCH v2 1/2] network: Implement virConnectSupportsFeature()

2021-03-16 Thread Michal Privoznik
So far, it was not needed, but shortly a client will want to know whether virNetworkUpdate() API is fixed or not. See next commits for more info. Side note, this driver's implementation is called only when using sub-driver's connection, i.e. "network:///system". For any other URI the

[PATCH v2 2/2] lib: Fix calling of virNetworkUpdate() driver callback

2021-03-16 Thread Michal Privoznik
The order in which virNetworkUpdate() accepts @section and @command arguments is not the same as in which it passes them onto networkUpdate() callback. Until recently, it did not really matter, because calling the API on client side meant arguments were encoded in reversed order (compared to the

[PATCH v2 0/2] Fix calling of virNetworkUpdate() driver callback

2021-03-16 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2021-March/msg00052.html I've pushed 1/2 from the v1 series (which just debug printed all arguments) which is unrelated to this problem. diff to v1: - Implemented different approach as suggested by Jano in his review of v1. I must say I

Re: [PATCH] docs/compiling: Add note on how to check minimum meson version

2021-03-16 Thread Michal Privoznik
On 3/16/21 10:24 AM, Peter Krempa wrote: Give guidance on how to check minimum meson version for a given package. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/140 Signed-off-by: Peter Krempa --- docs/compiling.rst | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Michal

Re: [PATCH] docs/compiling: Add note on how to check minimum meson version

2021-03-16 Thread Erik Skultety
On Tue, Mar 16, 2021 at 10:24:55AM +0100, Peter Krempa wrote: > Give guidance on how to check minimum meson version for a given package. > > Resolves: https://gitlab.com/libvirt/libvirt/-/issues/140 > Signed-off-by: Peter Krempa facepalm...the whole point of the conversion of this file to RST

[PATCH] docs/compiling: Add note on how to check minimum meson version

2021-03-16 Thread Peter Krempa
Give guidance on how to check minimum meson version for a given package. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/140 Signed-off-by: Peter Krempa --- docs/compiling.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/compiling.rst b/docs/compiling.rst index

Re: [PATCH 2/2] lib: Fix calling of virNetworkUpdate() driver callback

2021-03-16 Thread Michal Privoznik
On 3/16/21 2:34 AM, Ján Tomko wrote: On a Tuesday in 2021, Michal Privoznik wrote: Let me take you ~8 years back. Back then, virNetworkUpdate() API was introduced and the public implementation is nothing special - it calls the networkUpdate() callback of the network driver. Except, a small