Re: [PATCH] conf: qemu: add support for io_uring

2020-03-12 Thread Peter Krempa
On Thu, Mar 12, 2020 at 15:17:32 +0800, Zhenyu Ye wrote: > QEMU has added support for io_uring IO mode, see: > > https://git.qemu.org/git/qemu.git/ adcd6e93. > > This patch add support for io_uring in libvirt. > > Signed-off-by: Zhenyu Ye > --- > src/conf/domain_conf.c | 1 + >

[libvirt PATCH 0/3] cpu: Honor check='full' for host-passthrough CPUs

2020-03-12 Thread Jiri Denemark
See patch 3/3 for explanation. Jiri Denemark (3): cpu: Change control flow in virCPUUpdateLive cpu_x86: Prepare virCPUx86UpdateLive for easier extension cpu: Honor check='full' for host-passthrough CPUs src/cpu/cpu.c | 12 +++- src/cpu/cpu_x86.c | 20 +--- 2

[libvirt PATCH 3/3] cpu: Honor check='full' for host-passthrough CPUs

2020-03-12 Thread Jiri Denemark
The check attribute was completely ignored for host-passthrough CPUs even if they explicitly requested some features to be enabled. For example, a domain with the following CPU definition would happily start even when 'svm' cannot be enabled. Let's call virCPUArchUpdateLive for

Re: qemu:///embed and isolation from global components

2020-03-12 Thread Andrea Bolognani
On Wed, 2020-03-11 at 17:32 +0100, Michal Privoznik wrote: > I still don't quite see the value in machinectl (maybe because I'm not > using systemd :-D) Honestly, so far I haven't been able to figure out the use case for registering libvirt VMs with machined either :) Most of the operations are

Re: qemu:///embed and isolation from global components

2020-03-12 Thread Andrea Bolognani
On Thu, 2020-03-12 at 12:09 +, Daniel P. Berrangé wrote: > On Thu, Mar 12, 2020 at 12:57:36PM +0100, Andrea Bolognani wrote: > > Honestly, so far I haven't been able to figure out the use case for > > registering libvirt VMs with machined either :) > > > > Most of the operations are either

[libvirt PATCH 1/3] cpu: Change control flow in virCPUUpdateLive

2020-03-12 Thread Jiri Denemark
The updateLive CPU sub-driver function is supposed to be called only for a subset of CPU definitions. Let's make it more obvious by turning a negative test and return into a positive check. Signed-off-by: Jiri Denemark --- src/cpu/cpu.c | 11 ++- 1 file changed, 6 insertions(+), 5

[libvirt PATCH 2/3] cpu_x86: Prepare virCPUx86UpdateLive for easier extension

2020-03-12 Thread Jiri Denemark
Adding more checks into the existing if statements would turn them into an unreadable mess. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index dca9ed2979..5a6b7bb1d8

Re: qemu:///embed and isolation from global components

2020-03-12 Thread Daniel P . Berrangé
On Thu, Mar 12, 2020 at 01:50:49PM +0100, Andrea Bolognani wrote: > On Thu, 2020-03-12 at 12:09 +, Daniel P. Berrangé wrote: > > On Thu, Mar 12, 2020 at 12:57:36PM +0100, Andrea Bolognani wrote: > > > Honestly, so far I haven't been able to figure out the use case for > > > registering libvirt

Re: qemu:///embed and isolation from global components

2020-03-12 Thread Daniel P . Berrangé
On Thu, Mar 12, 2020 at 12:57:36PM +0100, Andrea Bolognani wrote: > On Wed, 2020-03-11 at 17:32 +0100, Michal Privoznik wrote: > > I still don't quite see the value in machinectl (maybe because I'm not > > using systemd :-D) > > Honestly, so far I haven't been able to figure out the use case for

[PATCH] conf: qemu: add support for io_uring

2020-03-12 Thread Zhenyu Ye
QEMU has added support for io_uring IO mode, see: https://git.qemu.org/git/qemu.git/ adcd6e93. This patch add support for io_uring in libvirt. Signed-off-by: Zhenyu Ye --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + 2 files changed, 2 insertions(+) diff --git

RE: [PATCHv2 0/5] update tls files without restarting libvirtd

2020-03-12 Thread Zhangbo (Oscar)
Thank you, Daniel ! I appreciate that. Signed-off-by: Zhang Bo Signed-off-by: Wu Qingliang > -Original Message- > From: Daniel P. Berrangé [mailto:berra...@redhat.com] > Sent: Thursday, March 12, 2020 12:22 AM > To: Zhangbo (Oscar) > Cc: libvir-list@redhat.com; dengkai (A) ; wujing

[PATCH 2/2] qemuDomainGetGuestInfo: Don't try to free a negative number of entries

2020-03-12 Thread Peter Krempa
'nfs' variable was set to -1 or -2 on agent failure. Cleanup then tried to free 'nfs' elements of the array which resulted into a crash. Make 'nfs' size_t and assign it only on successful agent call. https://bugzilla.redhat.com/show_bug.cgi?id=1812965 Broken by commit 599ae372d8cf092

[libvirt PATCH] util: ensure min/maj are initialized in virGetDeviceID

2020-03-12 Thread Daniel P . Berrangé
The stub impl of virGetDeviceID just returns ENOSYS and does not initialize the min/maj output parameters. This lead to a false positive warning on mingw about possible use of uninitialized variables. Signed-off-by: Daniel P. Berrangé --- src/util/virutil.c | 5 +++-- 1 file changed, 3

Re: [PATCH 1/2] qemu: agent: sync once if qemu has serial port event

2020-03-12 Thread Michal Privoznik
On 3/11/20 12:12 PM, Nikolay Shirokovskiy wrote: On 11.03.2020 12:38, Michal Privoznik wrote: On 3/5/20 3:47 PM, Nikolay Shirokovskiy wrote: Sync was introduced in [1] to check for ga presence. This check is racy but in the era before serial events are available there was not better solution

[RFCv2] qemu: convert DomainLogContext class to use GObject

2020-03-12 Thread Gaurav Agrawal
--- src/qemu/qemu_domain.c | 35 +++ src/qemu/qemu_domain.h | 6 +++--- src/qemu/qemu_process.c | 4 ++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4b467afa81..b3f17b8382 100644 ---

[libvirt PATCH] tests: fix double-lock of monitor in hotplug test

2020-03-12 Thread Daniel P . Berrangé
The qemuMonitorTestNew() function returns with the monitor object locked, and expects it to still be locked when qemuMonitorTestFree is called. The qemuhotplug test, however, explicitly unlocks the monitor, but then forgets to lock it again. As a result the qemuMonitorTestFree function is

[PATCH v4 7/7] qemu-img: Deprecate use of -b without -F

2020-03-12 Thread Eric Blake
Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot, although these days tools like libvirt are aware of the issue enough to prevent the worst effects).

Re: [PATCH 12/30] qemuDomainGetSecretAESAlias: Replace outstanding uses with qemuAliasForSecret

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: There are two last callers of this function. Replace them by qemuAliasForSecret and delete qemuDomainGetSecretAESAlias. Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c| 29 - src/qemu/qemu_alias.h

Re: [PATCH 14/30] conf: Add support for cookies for HTTP based disks

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Add possibility to specify one or more cookies for http based disks. This patch adds the config parser, storage and validation of the cookies. Cookies are delicious delicacies. Signed-off-by: Peter Krempa --- docs/formatdomain.html.in

Re: qemu:///embed and isolation from global components

2020-03-12 Thread Andrea Bolognani
On Wed, 2020-03-11 at 09:53 +, Daniel P. Berrangé wrote: > On Tue, Mar 10, 2020 at 07:25:46PM +0100, Andrea Bolognani wrote: > > In your scenario, when you don't specify a scope you get the same > > one as the primary driver is using (this matches the current > > behavior): so if you are using

[PATCH v4 0/7] Tighten qemu-img rules on missing backing format

2020-03-12 Thread Eric Blake
v3 was here: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg01730.html In v4: - old patch 1 was reworked into new patch 1-3, with stricter rules on which backing formats are accepted [Kevin] - patch 4 is new: amend is handled differently from rebase [Kashyap] - rebase to master Eric

[PATCH v4 2/7] vmdk: Add trivial backing_fmt support

2020-03-12 Thread Eric Blake
vmdk already requires that if backing_file is present, that it be another vmdk image (see vmdk_co_do_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F vmdk work, while

[PATCH v4 4/7] qcow2: Deprecate use of qemu-img amend to change backing file

2020-03-12 Thread Eric Blake
The use of 'qemu-img amend' to change qcow2 backing files is not tested very well. In particular, our implementation has a bug where if a new backing file is provided without a format, then the prior format is blindly reused, even if this results in data corruption, but this is not caught by

[PATCH v4 1/7] sheepdog: Add trivial backing_fmt support

2020-03-12 Thread Eric Blake
Sheepdog already requires that if backing_file is present, that it be another sheepdog image (see sd_co_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F sheepdog work, while

[PATCH v4 6/7] block: Add support to warn on backing file change without format

2020-03-12 Thread Eric Blake
For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- include/block/block.h | 4 ++-- block.c

[PATCH v4 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-03-12 Thread Eric Blake
qcow has no space in the metadata to store a backing format, and there are existing qcow images backed both by raw or by other formats (usually qcow) images, reliant on probing to tell the difference. While we don't recommend the creation of new qcow images (as qcow2 is hands-down better), we can

Re: [PATCH 13/30] conf: Add support for modifying ssl validation for https/ftps disks

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: To allow turning of verification of SSL cerificates add a new element turning off to the disk source XML which will allow configuring the validation process using the 'verify' attribute. Signed-off-by: Peter Krempa --- docs/formatdomain.html.in

Re: [PATCH V4 0/5] Introduce Advanced Watch Dog module

2020-03-12 Thread Paolo Bonzini
On 09/03/20 10:32, Zhang, Chen wrote: > 4. Implementation issue. > > The AWD script as an optional feature is OK for me. > > And report the triggering of the watchdog via QMP events is enough for > current usage. > > But it looks have limitation to notify outside Qemu. I don't know which > is

[PATCH v2] conf: Don't generate machine names with a dot

2020-03-12 Thread Michal Privoznik
According to the linked BZ, machined expects either valid hostname or valid FQDN (see systemd commit v239-3092-gd65652f1f2). While in case of multiple dots, a trailing one doesn't violate FQDN, it does violate the rule in case of something simple, like "domain.". But it's safe to remove it in both

[PATCH 1/2] qemuAgentFSInfoFormatParams: Remove pointless returned value

2020-03-12 Thread Peter Krempa
The only caller doesn't check the value and also there are no real errors to report anyways. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_driver.c

[PATCH 0/2] qemu: fix crash in qemuDomainGetGuestInfo

2020-03-12 Thread Peter Krempa
See patch 2/2 Peter Krempa (2): qemuAgentFSInfoFormatParams: Remove pointless returned value qemuDomainGetGuestInfo: Don't try to free a negative number of entries src/qemu/qemu_agent.c | 2 +- src/qemu/qemu_driver.c | 43 -- 2 files changed, 21

Re: [PATCH 11/30] qemuDomainSecretStorageSourcePrepare: Change aliases for disk secrets

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Originally there was only the secret for authentication so we didn't use any suffix to tell it apart. With the introduction of encryption we added a 'luks' suffix for the encryption secrets. Since encryption is really generic and authentication is not the

Re: [PATCHv2 1/3] Share Dup Daemon Function *SetupLogging

2020-03-12 Thread Ján Tomko
On a Wednesday in 2020, LAN BAI wrote: On Mar 11, 2020 9:30 AM, Ján Tomko wrote: On a Sunday in 2020, Lan wrote: One of the BiteSizedTasks Introduce src/util/virdaemon.c/h files Introduce a new function virDaemonSetupLogging (src/util/virdaemon.c) for shared code in

Re: [PATCH 07/30] qemuDomainSecretStorageSourcePrepare: Fix naming of alias variables

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: The naming of the variables was tied to what they are used for not what the alias represents. Since we'll need to use some of the aliases for another type of secrets fix the name so that it makes sense. Signed-off-by: Peter Krempa ---

Re: [PATCH 09/30] qemu: Split out initialization of secrets for 'iscsi' hostdevs

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Currently we don't have infrastructure to remember the secret aliases for hostdevs. Since an upcomming patch is going to change aliases for upcoming the disks, initialize the iscsi hostdevs separately so that we can keep the alias. At the same time

Re: [PATCH 10/30] qemuDomainSecretAESSetupFromSecret: Use 'qemuAliasForSecret'

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Replace qemuDomainGetSecretAESAlias by the new function si that we can s/si/so/ reuse qemuDomainSecretAESSetupFromSecret also for setting up other kinds of objects. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 30

Re: [PATCH] virQEMUCaps: Drop unused usedQMP member

2020-03-12 Thread Daniel Henrique Barboza
On 3/11/20 1:20 PM, Michal Privoznik wrote: The virQEMUCaps structure has usedQMP member which in the past used to tell if qemu we are dealing with is capable of QMP. Well, we don't support HMP anymore (minus a few HMP passthrough commands, which are wrapped into QMP anyways) and the member

Re: [PATCH 0/2] qemu: fix crash in qemuDomainGetGuestInfo

2020-03-12 Thread Daniel Henrique Barboza
On 3/12/20 1:01 PM, Peter Krempa wrote: See patch 2/2 Peter Krempa (2): qemuAgentFSInfoFormatParams: Remove pointless returned value qemuDomainGetGuestInfo: Don't try to free a negative number of entries src/qemu/qemu_agent.c | 2 +- src/qemu/qemu_driver.c | 43

Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format

2020-03-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200312192822.3739399-1-ebl...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format

2020-03-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200312192822.3739399-1-ebl...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format

2020-03-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200312192822.3739399-1-ebl...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format

2020-03-12 Thread Eric Blake
On 3/12/20 4:39 PM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200312192822.3739399-1-ebl...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it

Re: [PATCH 15/30] conf: Add support for setting timeout and readahead size for network disks

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Some disk backends support configuring the readahead buffer or timeout for requests. Add the knobs to the XML. Signed-off-by: Peter Krempa --- docs/formatdomain.html.in | 16 + docs/schemas/domaincommon.rng

Re: [PATCH 19/30] qemu: domain: Store data for 'secret' object representing http cookies

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: The http cookies can have potentially sensitive values and thus should not be leaked into the command line. This means that we'll need to instantiate a 'secret' object in qemu to pass the value encrypted. This patch adds infrastructure for storing of the

Re: [PATCH 16/30] qemuDomainValidateStorageSource: Validate new network storage parameters

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Ensure that the new fields are allowed only when -blockdev is used or when they are in the detected part of the backing chain where qemu will handle them internally. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 55

Re: [PATCH 17/30] qemuxml2argvtest: Add test case for disks with http(s) source

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Upcoming patches will implement the support for sslverify, cookies, readahead, and timeout properties. Add a test file which will collect the cases. Signed-off-by: Peter Krempa --- .../disk-network-http.x86_64-latest.args | 57 +++

Re: [PATCH 18/30] qemu: block: Implement ssl verification configuration

2020-03-12 Thread Ján Tomko
On a Monday in 2020, Peter Krempa wrote: Allow disabling of SSL certificate validation for HTTPS and FTPS drives in qemu. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 1 + tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args | 3 ++-