[PATCH] bhyve: add support

2021-02-26 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).

Re: [PATCH RFC 0/3] Add checkpoint/restore support to LXC using CRIU

2021-02-26 Thread Julio Faracco
Hi guys, I marked this series as RFC to discuss some points. I'm interested in enhancing this specific part of LXC. So, some questions that I would like to hear as a feedback from community: 1. I decided to use a tar to compress all CRIU img files into a single file. Any other suggestions? 2. If

[PATCH RFC 3/3] lxc: Adding support to LXC driver to restore a container

2021-02-26 Thread Julio Faracco
This patch introduces the hability to restore a saved container using CRIU. It should be possible to start it using traditional methods: a simple container start; or from a saved state. Signed-off-by: Julio Faracco --- src/lxc/lxc_conf.c | 3 + src/lxc/lxc_conf.h | 2 +

[PATCH RFC 0/3] Add checkpoint/restore support to LXC using CRIU

2021-02-26 Thread Julio Faracco
This patch series implements a way to do checkpoint/restore to LXC driver using CRIU operations. This respects the other methods to save and restore processes states: using a file with a header with some metadata. The only difference here is basically the way LXC drivers join the files produced by

[PATCH RFC 2/3] lxc: Including CRIU functions and functions to support C/R.

2021-02-26 Thread Julio Faracco
This patch adds the source code of helper functions into files lxc_criu.{h,c} to support LXC checkpoint/restore using CRIU binary. To save container state, LXC follows the same pattern of QEMU and libxl using a file with a header with metadata, but as CRIU saves multiple files, it needs to

[PATCH RFC 1/3] meson: Add support to CRIU binary into meson

2021-02-26 Thread Julio Faracco
This patch includes CRIU binary checks into meson files to support checkpoint/restore for LXC driver. Signed-off-by: Julio Faracco --- meson.build | 10 ++ meson_options.txt | 1 + 2 files changed, 11 insertions(+) diff --git a/meson.build b/meson.build index

Re: [PATCH v2 31/31] qom: Drop QemuOpts based interfaces

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > user_creatable_add_opts() has only a single user left, which is a test > case. Rewrite the test to use user_creatable_add_type() instead (which > is the remaining function that doesn't require a QAPI schema) and drop > the QemuOpts related functions. > >

Re: [PATCH v2 30/31] vl: QAPIfy -object

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This switches the system emulator from a QemuOpts-based parser for > -object to user_creatable_parse_str() which uses a keyval parser and > enforces the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties accessible. > > This

Re: [PATCH v2 29/31] qom: Add user_creatable_parse_str()

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > The system emulator has a more complicated way of handling command line > options in that it reorders options before it processes them. This means > that parsing object options and creating the object happen at two > different points. Split the parsing part

Re: [PATCH v2 28/31] hmp: QAPIfy object_add

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This switches the HMP command object_add from a QemuOpts-based parser to > user_creatable_add_from_str() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties and help > accessible. In

Re: [PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This is a version of user_creatable_process_cmdline() with an Error > parameter that never calls exit() and is therefore usable in HMP. > > Signed-off-by: Kevin Wolf > --- > include/qom/object_interfaces.h | 16 > qom/object_interfaces.c

Re: [PATCH v2 26/31] qemu-nbd: Use user_creatable_process_cmdline() for --object

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This switches qemu-nbd from a QemuOpts-based parser for --object to > user_creatable_process_cmdline() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties accessible. > >

Re: [PATCH v2 25/31] qemu-img: Use user_creatable_process_cmdline() for --object

2021-02-26 Thread Eric Blake
On 2/26/21 3:56 PM, Eric Blake wrote: > On 2/24/21 7:52 AM, Kevin Wolf wrote: >> This switches qemu-img from a QemuOpts-based parser for --object to >> user_creatable_process_cmdline() which uses a keyval parser and enforces >> the QAPI schema. >> >> Apart from being a cleanup, this makes

Re: [PATCH v2 25/31] qemu-img: Use user_creatable_process_cmdline() for --object

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This switches qemu-img from a QemuOpts-based parser for --object to > user_creatable_process_cmdline() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties accessible. > >

Re: [PATCH v2 24/31] qemu-io: Use user_creatable_process_cmdline() for --object

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This switches qemu-io from a QemuOpts-based parser for --object to > user_creatable_process_cmdline() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties accessible. > > Signed-off-by:

Re: [PATCH v2 23/31] qom: Factor out user_creatable_process_cmdline()

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > The implementation for --object can be shared between > qemu-storage-daemon and other binaries, so move it into a function in > qom/object_interfaces.c that is accessible from everywhere. > > This also requires moving the implementation of qmp_object_add()

Re: [PATCH v2 22/31] qom: Remove user_creatable_add_dict()

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This function is now unused and can be removed. > > Signed-off-by: Kevin Wolf > --- > include/qom/object_interfaces.h | 18 -- > qom/object_interfaces.c | 32 > 2 files changed, 50 deletions(-) >

Re: [PATCH v2 21/31] qemu-storage-daemon: Implement --object with qmp_object_add()

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This QAPIfies --object and ensures that QMP and the command line option > behave the same. > > Signed-off-by: Kevin Wolf > --- > storage-daemon/qemu-storage-daemon.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 deletions(-) >

Re: [PATCH v2 20/31] qom: Make "object" QemuOptsList optional

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This code is going away anyway, but for a few more commits, we'll be in > a state where some binaries still use QemuOpts and others don't. If the > "object" QemuOptsList doesn't even exist, we don't have to remove (or > fail to remove, and therefore abort) a

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This converts object-add from 'gen': false to the ObjectOptions QAPI > type. As an immediate benefit, clients can now use QAPI schema > introspection for user creatable QOM objects. > > It is also the first step towards making the QAPI schema the only >

Re: [PATCH v2 18/31] qapi/qom: Add ObjectOptions for x-remote-object

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the x-remote-object > object. > > Signed-off-by: Kevin Wolf > --- > qapi/qom.json | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/qapi/qom.json b/qapi/qom.json >

Re: [PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the input-* objects. > > ui.json cannot be included in qom.json because the storage daemon can't > use it, so move GrabToggleKeys to common.json. > > Signed-off-by: Kevin Wolf > --- > qapi/common.json | 12

Re: [PATCH v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the objects implementing > the confidential-guest-support interface. > > pef-guest and s390x-pv-guest don't have any properties, so they only > need to be added to the ObjectType enum without adding a new branch

Re: [PATCH v2 15/31] qapi/qom: Add ObjectOptions for pr-manager-helper

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the pr-manager-helper > object. > > Signed-off-by: Kevin Wolf > --- > qapi/qom.json | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/qapi/qom.json b/qapi/qom.json > index

Re: [PATCH v2 14/31] qapi/qom: Add ObjectOptions for filter-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the filter-* objects. > > Some parts of the interface (in particular NetfilterProperties.position) > are very unusual for QAPI, but for now just describe the existing > interface. > > net.json can't be included

Re: [PATCH v2 13/31] qapi/qom: Add ObjectOptions for colo-compare

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the colo-compare object. > > Signed-off-by: Kevin Wolf > --- > qapi/qom.json | 49 + > 1 file changed, 49 insertions(+) > > diff --git a/qapi/qom.json

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the can-* objects. > > can-bus doesn't have any properties, so it only needs to be added to the > ObjectType enum without adding a new branch to ObjectOptions. I somewhat prefer 'can-bus': {}, to make it

Re: [PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the tls-* objects. > > The 'loaded' property doesn't seem to make sense as an external > interface: It is automatically set to true in ucc->complete, and > explicitly setting it to true earlier just means that

Re: [PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the secret* objects. > > The 'loaded' property doesn't seem to make sense as an external > interface: It is automatically set to true in ucc->complete, and > explicitly setting it to true earlier just means that

[PATCH] meson: Add documentation installation directory option

2021-02-26 Thread Chris Mayo
Allow the directory to be chosen at installation time, to support local conventions e.g. versioning. Signed-off-by: Chris Mayo --- meson.build | 6 +- meson_options.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

Re: [PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the throttle-group object. > > The only purpose of the x-* properties is to make the nested options in > 'limits' available for a command line parser that doesn't support > structs. Any parser that will use the

Re: [PATCH v2 08/31] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the rng-* objects. > > The 'opened' property doesn't seem to make sense as an external > interface: It is automatically set to true in ucc->complete, and > explicitly setting it to true earlier just means that

Re: [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the memory-backend-* > objects. > > HostMemPolicy has to be moved to an include file that can be used by the > storage daemon, too, because ObjectOptions must be the same in all > binaries if we don't want to

Re: [PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the dbus-vmstate object. > > A list represented as a comma separated string is clearly not very > QAPI-like, but for now just describe the existing interface. Does your alias proposal give us a path forward for

Re: [PATCH v2 05/31] qapi/qom: Add ObjectOptions for cryptodev-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the cryptodev-* objects. > > These interfaces have some questionable aspects (cryptodev-backend is > really an abstract base class without function, and the queues option > only makes sense for

Re: [PATCH v2 04/31] qapi/qom: Add ObjectOptions for authz-*

2021-02-26 Thread Eric Blake
On 2/24/21 7:52 AM, Kevin Wolf wrote: > This adds a QAPI schema for the properties of the authz-* objects. > > Signed-off-by: Kevin Wolf > --- > qapi/authz.json | 62 > qapi/qom.json| 10 + >

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-02-26 Thread Paolo Bonzini
On 24/02/21 14:52, Kevin Wolf wrote: +v = qobject_output_visitor_new(); +visit_type_ObjectOptions(v, NULL, , _abort); +visit_complete(v, ); +visit_free(v); + +props = qobject_to(QDict, qobj); +qdict_del(props, "qom-type"); +qdict_del(props, "id"); + +v =

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

2021-02-26 Thread Hao Wang
V5 -> V6: split DomainGetDirtyRateInfo(domdirtyrate) API into two parts: 1. DomainStartDirtyRateCalc(domdirtyrate-calc) for starting dirty rate calculation; 2. qemuDomainGetStatsDirtyRate(domstats --dirtyrate) for querying dirty rate infomation. V4 -> V5: squash 1/7 and bits

[PATCH v6 4/5] migration/dirtyrate: Implement qemuMonitorQueryDirtyRate

2021-02-26 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 | 14 src/qemu/qemu_monitor_json.c | 66

[PATCH v6 5/5] migration/dirtyrate: Introduce command 'virsh domstats --dirtyrate'

2021-02-26 Thread Hao Wang
Introduce command 'virsh domstats --dirtyrate' for reporting memory dirty rate infomation. The info is listed as: Domain: 'vm0' dirtyrate.calc_status=measured dirtyrate.calc_start_time=502814 dirtyrate.calc_period=1 dirtyrate.megabytes_per_second=2 Signed-off-by: Hao Wang ---

[PATCH v6 2/5] migration/dirtyrate: Implement qemuDomainStartDirtyRateCalc

2021-02-26 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 v6 1/5] migration/dirtyrate: Introduce virDomainStartDirtyRateCalc API

2021-02-26 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 v6 3/5] migration/dirtyrate: Introduce domdirtyrate-calc virsh api

2021-02-26 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| 63 + 2 files changed,