Re: [libvirt][PATCH v13 0/6] Support query and use SGX

2022-07-22 Thread Michal Prívozník
On 7/22/22 08:57, Yang, Lin A wrote: >> BTW: I can see in QEMU sources /dev/sgx_vepc and /dev/sgx_provision being >> opened, but not sgx_enclave. And I see the former two on my system but not >> the last one. Can you Yang, share more info on this please? > > True, QEMU only need read and write acc

[PATCH] news: qemu: Add support for zero-copy migration

2022-07-22 Thread Fangge Jin
Signed-off-by: Fangge Jin --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 79aad652e8..0eb3299e3b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -42,6 +42,11 @@ v8.5.0 (2022-07-01) A new ``VIR_MIGRATE_POSTCOPY_RESUME`` flag (``virsh migrate --postcopy

[PATCH] qemu_migration: Acquire correct job in qemuMigrationSrcIsAllowed

2022-07-22 Thread Martin Kletzander
Commit 62627524607f added the acquiring of a job, but it is not always VIR_ASYNC_JOB_MIGRATION_OUT, so the code fails when doing save or anything else. Correct the async job by passing it from the caller as another parameter. Signed-off-by: Martin Kletzander --- This will hopefully fix the integr

Re: [PATCH] qemu_migration: Acquire correct job in qemuMigrationSrcIsAllowed

2022-07-22 Thread Jiri Denemark
On Fri, Jul 22, 2022 at 12:22:54 +0200, Martin Kletzander wrote: > Commit 62627524607f added the acquiring of a job, but it is not always > VIR_ASYNC_JOB_MIGRATION_OUT, so the code fails when doing save or anything > else. > Correct the async job by passing it from the caller as another parameter.

[PATCH 1/3] ci: Move builds from alpine-314 to alpine-315

2022-07-22 Thread Peter Krempa
'lcitool' dropped alpine-314 Signed-off-by: Peter Krempa --- ci/containers/alpine-314.Dockerfile | 81 - ci/gitlab.yml | 2 +- ci/gitlab/builds.yml| 11 ci/gitlab/containers.yml| 8 --- ci/manifest.yml

[PATCH 2/3] ci: Move active Debian-10 jobs to Debian-11

2022-07-22 Thread Peter Krempa
Debian 10 will reach EOL in august of 2022 and thus libvirt will no longer target it. Move CI jobs over to Debian-11. Signed-off-by: Peter Krempa --- ci/gitlab/builds.yml | 4 ++-- ci/gitlab/containers.yml | 3 ++- ci/manifest.yml | 5 ++--- 3 files changed, 6 insertions(+), 6 delet

[PATCH 3/3] ci: Drop Debian 10

2022-07-22 Thread Peter Krempa
Debian 10 reaches EOL in August of 2022. Signed-off-by: Peter Krempa --- .../debian-10-cross-aarch64.Dockerfile| 125 -- .../debian-10-cross-armv6l.Dockerfile | 124 - .../debian-10-cross-armv7l.Dockerfile | 125 -- ci/conta

[PATCH 0/3] ci: Drop Alpine-314 and Debian-10

2022-07-22 Thread Peter Krempa
Alpine-314 was dropped by lcitool recently. Debian-10 will reach EOL in August, so patches 2-3/3 should be pushed only after the upcoming release. Pipeline: https://gitlab.com/pipo.sk/libvirt/-/pipelines/594315458 Peter Krempa (3): ci: Move builds from alpine-314 to alpine-315 ci: Move activ

Re: [PATCH 1/2] qemu_hotplug: Close FDs in QEMU on failed chardev hotplug

2022-07-22 Thread Kristina Hanicova
On Mon, Jul 18, 2022 at 4:50 PM Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_hotplug.c | 17 ++--- > 1 file changed, 6 insertions(+), 11 deletions(-) > Reviewed-by: Kristina Hanicova

Re: [PATCH 2/2] qemu_hotplug: Create chardev files before attempting to relabel them

2022-07-22 Thread Kristina Hanicova
On Mon, Jul 18, 2022 at 4:50 PM Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_hotplug.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > Reviewed-by: Kristina Hanicova

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-22 Thread Kristina Hanicova
On Thu, Jul 14, 2022 at 7:54 AM Amneesh Singh wrote: > Related: https://gitlab.com/libvirt/libvirt/-/issues/276 > > This patch adds an API for the "query-stats" QMP command. > > The query returns a JSON containing the statistics based on the target, > which can either be vCPU or VM, and the provi

Re: [PATCH] tests: qemucapabilities: Update test data for the qemu-7.1 cycle on x86_64

2022-07-22 Thread Michal Prívozník
On 7/22/22 16:16, Peter Krempa wrote: > Update to v7.0.0-2780-g5288bee45f > > Notable changes: > - set-vcpu-dirty-limit/cancel-vcpu-dirty-limit/query-vcpu-dirty-limit > command added > - snapshot-save/snapshot-load command added > - dirty-sync-missed-zero-copy migration statistic added > - po

[PATCH 0/4] jobs: use virDomainObjResetJob()

2022-07-22 Thread Kristina Hanicova
*** BLURB HERE *** Kristina Hanicova (4): qemu & hypervisor: move qemuDomainObjResetJob() into hypervisor libxl: use virDomainObjResetJob() LXC: use virDomainObjResetJob() CH: use virDomainObjResetJob() src/ch/ch_domain.c | 13 ++--- src/hypervisor/domain_job.c | 9

[PATCH 2/4] libxl: use virDomainObjResetJob()

2022-07-22 Thread Kristina Hanicova
This patch removes and replaces libxlDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova --- src/libxl/libxl_domain.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index

[PATCH 3/4] LXC: use virDomainObjResetJob()

2022-07-22 Thread Kristina Hanicova
This patch removes and replaces virLXCDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova --- src/lxc/lxc_domain.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index fed4ae088a

[PATCH 1/4] qemu & hypervisor: move qemuDomainObjResetJob() into hypervisor

2022-07-22 Thread Kristina Hanicova
This patch moves qemuDomainObjResetJob() as virDomainObjResetJob() into hypervisor in order to be used by other hypervisors as well. Signed-off-by: Kristina Hanicova --- src/hypervisor/domain_job.c | 9 + src/hypervisor/domain_job.h | 2 ++ src/libvirt_private.syms| 1 + src/qemu/

[PATCH 4/4] CH: use virDomainObjResetJob()

2022-07-22 Thread Kristina Hanicova
This patch removes and replaces virCHDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova --- src/ch/ch_domain.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index ae53c6fe05..499d3

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-22 Thread Martin Kletzander
On Thu, Jul 14, 2022 at 11:22:02AM +0530, Amneesh Singh wrote: Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based on the target, which can either be vCPU or VM, and the provi

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-22 Thread Martin Kletzander
On Fri, Jul 22, 2022 at 02:44:30PM +0200, Kristina Hanicova wrote: On Thu, Jul 14, 2022 at 7:54 AM Amneesh Singh wrote: Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based

Re: [libvirt PATCH 0/3] qemu: Allow IOMMU devices to have aliases

2022-07-22 Thread Michal Prívozník
On 7/21/22 11:32, Andrea Bolognani wrote: > > > Andrea Bolognani (3): > schema: Allow IOMMU devices to have aliases > qemu: Assign default alias to IOMMU devices > qemu: Add IOMMU device alias to command line > > src/conf/schemas/domaincommon.rng | 3 +++ > src/qemu/

Re: [PATCH 0/4] jobs: use virDomainObjResetJob()

2022-07-22 Thread Jonathon Jongsma
Reviewed-by: Jonathon Jongsma On 7/22/22 9:25 AM, Kristina Hanicova wrote: *** BLURB HERE *** Kristina Hanicova (4): qemu & hypervisor: move qemuDomainObjResetJob() into hypervisor libxl: use virDomainObjResetJob() LXC: use virDomainObjResetJob() CH: use virDomainObjResetJob() s

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-22 Thread Martin Kletzander
On Thu, Jul 14, 2022 at 11:22:02AM +0530, Amneesh Singh wrote: Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based on the target, which can either be vCPU or VM, and the provi

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-22 Thread Martin Kletzander
On Fri, Jul 22, 2022 at 02:44:30PM +0200, Kristina Hanicova wrote: On Thu, Jul 14, 2022 at 7:54 AM Amneesh Singh wrote: Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based

[libvirt PATCH 0/3] qemu: Properly reset migration parameters on reconnect

2022-07-22 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=2107892 Jiri Denemark (3): qemu_migration: Store original migration params in status XML qemu_migration_params: Refactor qemuMigrationParamsApply qemu_migration_params: Refactor qemuMigrationParamsReset src/qemu/qemu_migration.c| 6 +++

[libvirt PATCH 2/3] qemu_migration_params: Refactor qemuMigrationParamsApply

2022-07-22 Thread Jiri Denemark
qemuMigrationParamsApply restricts when capabilities can be set, but this is not useful in all cases. Let's create new helpers for setting migration capabilities and parameters which can be reused in more places without the restriction. https://bugzilla.redhat.com/show_bug.cgi?id=2107892 Signed-o

[libvirt PATCH 3/3] qemu_migration_params: Refactor qemuMigrationParamsReset

2022-07-22 Thread Jiri Denemark
Because qemuMigrationParamsReset used to call qemuMigrationParamsApply for resetting migration capabilities and parameters, it did not work well since commit v5.1.0-83-ga1dec315c9 which only allowed capabilities to be set from an async job. However, when reconnecting to running domains after daemon

[libvirt PATCH 1/3] qemu_migration: Store original migration params in status XML

2022-07-22 Thread Jiri Denemark
We keep original values of migration parameters so that we can restore them at the end of migration to make sure later migration does not use some random values. However, this does not really work when libvirt daemon is restarted on the source host because we failed to explicitly save the status XM

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-07-22 Thread Martin Kletzander
On Thu, Jul 14, 2022 at 11:22:04AM +0530, Amneesh Singh wrote: Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" and "halt_poll_fail_ns" for every vCPU. The respective values for each vCPU are then added together. Sign

[libvirt PATCH 0/2] qemu: support stateless UEFI firmware

2022-07-22 Thread Daniel P . Berrangé
This is to enable SEV builds of UEFI which provide only a single CODE.fd file, with not VARS.fd. Daniel P. Berrangé (2): conf: support stateless UEFI firmware qemu: support use of stateless EFI firmware docs/formatdomain.rst | 9 +++- src/conf/domain_conf.c

[libvirt PATCH 2/2] qemu: support use of stateless EFI firmware

2022-07-22 Thread Daniel P . Berrangé
When the attribute is set, the QEMU driver needs to do three things - Avoid looking for an NVRAM template - Avoid auto-populating an path - Find firmware descriptors with mode=stateless instead of mode=split Note, the first thing happens automatically when we solve the second thing. Signed-

[libvirt PATCH 1/2] conf: support stateless UEFI firmware

2022-07-22 Thread Daniel P . Berrangé
Normally when an UEFI firmware is marked as read-only, an associated NVRAM file will be created. Some builds of UEFI firmware, however, wish to remain stateless and so will be read-only, but never have any NVRAM file. To represent this concept a 'stateless' tristate bool attribute is introduced on

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-07-22 Thread Paolo Bonzini
On 7/22/22 17:43, Martin Kletzander wrote: As mentioned before, all these failures do not have to exit the function, but rather fallback to the old way. You can even create two new functions for the new and old implementations and then call them from here to make the fallback easier to spot (an

RE: [libvirt][PATCH v13 0/6] Support query and use SGX

2022-07-22 Thread Yang, Lin A
> Well, as discussed with Daniel earlier, libvirt creates a separate mount > namespace for each QEMU and inside it creates a very thin /dev with only a > handful of nodes (per guest config). And what my patch does (and what we > already do for /dev/sev) is mknod() /dev/sgx_provision and /dev/sgx_ve