Re: [PATCH v3 3/4] qemu: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2021-01-06 Thread Nikolay Shirokovskiy
Sorry, looks like I'm compiling with debug options and missed this error. It was a deliberate change but compiler don't like it. The build fix is pushed. Nikolay On Wed, Jan 6, 2021 at 5:44 PM Daniel P. Berrangé wrote: > On Fri, Dec 18, 2020 at 09:56:47AM +0300, Nikolay Shirokovskiy wrote: >

Re: [PATCH 5/7] schema: Remove workaround for bug in libxml2 2.7.6

2021-01-06 Thread Ján Tomko
On a Wednesday in 2021, Peter Krempa wrote: New libxml2 handles '\n' properly so the literal newline is not necessary. , because 2.9.1 is the minimum version we support. Signed-off-by: Peter Krempa --- docs/schemas/domaincommon.rng | 8 ++-- docs/schemas/storagecommon.rng | 4 +--- 2

Re: [PATCH 6/7] schema: Add define for object names

2021-01-06 Thread Ján Tomko
On a Wednesday in 2021, Peter Krempa wrote: Objects such as domain, pool, etc re-define the regex for the format. Add more generic types for objects with/without a slash which we'll be able to reuse also for other objects. Signed-off-by: Peter Krempa --- docs/schemas/basictypes.rng| 13

[PATCH] docs/system: Remove deprecated 'fulong2e' machine alias

2021-01-06 Thread Philippe Mathieu-Daudé
The 'fulong2e' machine alias has been marked as deprecated since QEMU v5.1 (commit c3a09ff68dd, the machine is renamed 'fuloong2e'). Time to remove it now. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 5 - docs/system/removed-features.rst | 5 +

[PATCH v2 2/7] util: Added nfs params to virStorageSource

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/util/virstoragefile.c | 8 src/util/virstoragefile.h | 8 2 files changed, 16 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 1176630282..3097e11984 100644 --- a/src/util/virstoragefile.c +++

[PATCH v2 3/7] docs: added rng schema and formatdomain for NFS

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- docs/formatdomain.rst | 24 ++-- docs/schemas/domaincommon.rng | 32 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index

[PATCH v2 4/7] conf: Added NFS XML format/parse methods

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/conf/domain_conf.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 453e06491e..96ee009058 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6888,6

[PATCH v2 5/7] qemu: Added NFS JSON props methods

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/qemu/qemu_block.c | 67 +++- src/qemu/qemu_domain.c | 70 ++ 2 files changed, 136 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index

PATCH v2: Implement NFS Protocol

2021-01-06 Thread Ryan Gahagan
Per Issue 90[1], QEMU supports using an NFS disk but Libvirt had no support for attaching a disk of this type. This patch series adds in this capability as well as the tests necessary to make sure it works correctly. The changes in this second version over the previous patch series for this issue

[PATCH v2 6/7] util: Added a backing store NFS parser

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/util/virstoragefile.c | 49 +++ tests/virstoragetest.c| 13 +++ 2 files changed, 62 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 3097e11984..d67f0f2c3f 100644 ---

[PATCH v2 1/7] conf: Add NFS disk protocol

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/libxl/libxl_conf.c| 1 + src/libxl/xen_xl.c| 1 + src/qemu/qemu_block.c | 3 +++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c| 2 ++ src/qemu/qemu_snapshot.c | 3 +++ src/util/virstoragefile.c | 6 ++

[PATCH v2 7/7] tests: Added tests for NFS disk protocol

2021-01-06 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- .../disk-network-nfs.x86_64-latest.args | 56 +++ tests/qemuxml2argvdata/disk-network-nfs.xml | 48 tests/qemuxml2argvtest.c | 1 + ...isk-network-nfs-inactive.x86_64-latest.xml | 54 ++

Re: [PATCH 7/7] schema: secret: Relax requirements for usage name

2021-01-06 Thread Ján Tomko
On a Wednesday in 2021, Peter Krempa wrote: There's plenty of existing documentation [1] which shows as example a name which contains a space and a dot ('client.admin secret') as ceph usage name. Use a more relaxed type in the RNG schema since the usage name is actually just a string used to

Re: [PATCH 0/7] secret: Relax usage 'name' regex

2021-01-06 Thread Ján Tomko
On a Wednesday in 2021, Peter Krempa wrote: Patches 1-6 are mostly cleanups noticed while looking at the schema. See patch 7/7 for explanation. Peter Krempa (7): virSecretDefParseUsage: Use g_autofree for type_str secretXMLParseNode: Clean up freeing of memory virSecretLookupParseSecret:

Re: [PATCH] docs/system: Remove deprecated 'fulong2e' machine alias

2021-01-06 Thread Thomas Huth
Am Wed, 6 Jan 2021 19:46:02 +0100 schrieb Philippe Mathieu-Daudé : > The 'fulong2e' machine alias has been marked as deprecated since > QEMU v5.1 (commit c3a09ff68dd, the machine is renamed 'fuloong2e'). > Time to remove it now. > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [libvirt PATCH v3 00/21] Add support for persistent mediated devices

2021-01-06 Thread Han Han
On Tue, Jan 5, 2021 at 11:50 AM Yan Fu wrote: > Tested with v6.10.0-283-g1948d4e61e. > > 1.Can define/start/destroy mdev device successfully; > > 2.'virsh nodedev-list' has no '--active' option, which is inconsistent > with the description in the patch: > # virsh nodedev-list --active > error:

Re: [PATCH] docs/system: Remove deprecated 'fulong2e' machine alias

2021-01-06 Thread Huacai Chen
Reviewed-by: Huacai Chen On Thu, Jan 7, 2021 at 2:46 AM Philippe Mathieu-Daudé wrote: > > The 'fulong2e' machine alias has been marked as deprecated since > QEMU v5.1 (commit c3a09ff68dd, the machine is renamed 'fuloong2e'). > Time to remove it now. > > Signed-off-by: Philippe Mathieu-Daudé >

[libvirt PATCH 2/2] lxc: eliminate leaked and dangling pointers in virLXCProcessSetupInterfaceTap

2021-01-06 Thread Laine Stump
The two scenarios were found by Coverity after a seemingly-unrelated change to virLXCProcessSetupInterfaceTap() (in commit ecfc2d5f43), and explained by John Ferlan here: https://www.redhat.com/archives/libvir-list/2020-December/msg00810.html To re-explain: a) On entry to

Re: [PATCHv3 3/3] lxc: fix a memory leak

2021-01-06 Thread Laine Stump
On 12/18/20 10:45 PM, Shi Lei wrote: On 2020-12-18 at 22:01, John Ferlan wrote: Coverity reminds us of the ancient software engineering proverb related to being stuck with ownership because you touched the code last :-) - I know this patch didn't cause the problem, but because the code was

Re: [PATCH v2] conf: Add support for keeping TPM emulator state

2021-01-06 Thread Eiichi Tsukata
Hi Michal > On Jan 6, 2021, at 19:45, Michal Privoznik wrote: > > On 1/4/21 3:31 AM, Eiichi Tsukata wrote: >> Currently, swtpm TPM state file is removed when a transient domain is >> powered off or undefined. When we store TPM state on a shared storage >> such as NFS and use transient domain,

[libvirt PATCH 1/2] lxc: remove unnecessary call to virNetDevReserveName()

2021-01-06 Thread Laine Stump
In all cases *except* when parsing status XML as libvirt is being restarted, the XML parser will delete any manually specified interface name (aka "" aka net->ifname) that could have been generated by virNetDevGenerateName(). This means that during the setup when a domain is being started (e.g.

[libvirt PATCH 0/2] Two small LXC veth creation bugs

2021-01-06 Thread Laine Stump
Laine Stump (2): lxc: remove unnecessary call to virNetDevReserveName() lxc: eliminate leaked and dangling pointers in virLXCProcessSetupInterfaceTap src/lxc/lxc_process.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) -- 2.29.2

Re: Re: [PATCHv2 4/4] netlink: Introduce a helper function to simplify netlink functions

2021-01-06 Thread Shi Lei
On 2021-01-06 at 18:21, Michal Privoznik wrote: >On 1/6/21 3:40 AM, Shi Lei wrote: >> Extract common code as helper function virNetlinkTalk, then simplify >> the functions virNetlink[DumpLink|NewLink|DelLink|GetNeighbor]. >> >> Signed-off-by: Shi Lei >> --- >>   src/util/virnetlink.c | 225

Re: Re: [PATCHv2 4/4] netlink: Introduce a helper function to simplify netlink functions

2021-01-06 Thread Shi Lei
On 2021-01-07 at 10:52, Shi Lei wrote: >On 2021-01-06 at 18:21, Michal Privoznik wrote: >>On 1/6/21 3:40 AM, Shi Lei wrote: >>> Extract common code as helper function virNetlinkTalk, then simplify >>> the functions virNetlink[DumpLink|NewLink|DelLink|GetNeighbor]. >>> >>> -    default: >>> -   

[libvirt PATCH] util: validate pcie_cap_pos != 0 in virDeviceHasPCIExpressLink()

2021-01-06 Thread Laine Stump
virDeviceHasPCIExpressLink() wasn't checking that pcie_cap_pos was valid before attempting to use it, which could lead to reading the byte at offset 0+PCI_CAP_ID_EXP instead of [valid offset]+PCI_CAP_ID_EXP. In particular, this could happen for "integrated" PCI devices (those that are on the PCIe

Re: Ping: [PATCH] Qemu: migration: Not bind RAM info with active migration status

2021-01-06 Thread Keqian Zhu
Hi Jiri, On 2021/1/7 2:11, Jiri Denemark wrote: > On Tue, Jan 05, 2021 at 21:54:05 +0800, Keqian Zhu wrote: >> On 2021/1/5 21:34, Daniel P. Berrangé wrote: >>> On Tue, Jan 05, 2021 at 09:28:27PM +0800, Keqian Zhu wrote: >> The purpose of QEMU commit 65ace0604551 (migration: add postcopy total

Re: [libvirt PATCH] qemu: The TSC tolerance interval should be closed

2021-01-06 Thread Peter Krempa
On Wed, Jan 06, 2021 at 00:07:42 +0100, Jiri Denemark wrote: > The kernel refuses to set guest TSC frequency less than a minimum > frequency or greater than maximum frequency (both computed based on the > host TSC frequency). When writing the libvirt code with a reversed logic > (return success

Re: [PATCH 3/7] docs: added rng schema and formatdomain for NFS

2021-01-06 Thread Peter Krempa
On Mon, Jan 04, 2021 at 15:49:07 -0600, Ryan Gahagan wrote: > On Mon, Jan 4, 2021 at 8:24 AM Peter Krempa wrote: > > > On Tue, Dec 29, 2020 at 15:21:25 -0600, Ryan Gahagan wrote: > > > + > > > + > > > + > > > + > > > + > > > +nfs > > > + > > >

Re: [PATCH 6/7] util: Added a backing store NFS parser

2021-01-06 Thread Peter Krempa
On Mon, Jan 04, 2021 at 17:14:54 -0600, Ryan Gahagan wrote: > On Mon, Jan 4, 2021 at 8:41 AM Peter Krempa wrote: > > > On Tue, Dec 29, 2020 at 15:21:28 -0600, Ryan Gahagan wrote: > > > +src->nfs_uid = (uid_t) uidStore; > > > +src->nfs_gid = (gid_t) gidStore; > > > > This function must

Re: [RFC] exposing 'nodedev assigned to domain' info to users

2021-01-06 Thread Daniel P . Berrangé
On Tue, Jan 05, 2021 at 05:18:13PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This is something I've been giving a thought after working in Gitlab issue > #72 and decided to run through the ML before hitting the code. > > We don't have an easy way to retrieve the domain that is using an

Re: [libvirt PATCH] qemuDomainChangeNet: Check changed virtio network driver options

2021-01-06 Thread Daniel P . Berrangé
On Wed, Jan 06, 2021 at 10:47:23AM +0100, Tim Wiederhake wrote: > Changes to a virtio network device such as > > > > ... > > were quietly dismissed by `virsh update-device ... --live`. > > Signed-off-by: Tim Wiederhake > --- > src/qemu/qemu_hotplug.c | 10 ++ > 1

Re: [PATCH v3 3/4] qemu: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 18, 2020 at 09:56:47AM +0300, Nikolay Shirokovskiy wrote: > Otherwise in some places we can mistakenly report 'unsupported' error instead > of root cause. So let's handle root cause explicitly from the macro. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_migration.c

Re: [PATCHv2 0/4] netlink: Extract common code to simplify netlink functions

2021-01-06 Thread Daniel Henrique Barboza
On 1/5/21 11:40 PM, Shi Lei wrote: V1 here: https://www.redhat.com/archives/libvir-list/2020-December/msg00836.html Since V1: - Minor fixes for reporting system error in Patch 4. Shi Lei (4): netlink: Remove invalid flags(NLM_F_CREATE and NLM_F_EXCL) for RTM_DELLINK netlink:

[libvirt PATCH] qemuDomainChangeNet: Check changed virtio network driver options

2021-01-06 Thread Tim Wiederhake
Changes to a virtio network device such as ... were quietly dismissed by `virsh update-device ... --live`. Signed-off-by: Tim Wiederhake --- src/qemu/qemu_hotplug.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_hotplug.c

[PATCH] manpage: virsh: Drop note that 'domrename' doesn't work with snapshots/checkpoints

2021-01-06 Thread Peter Krempa
As of commits 3b1244bffdb and 4770a96c662 renaming of the domain works also with checkpoints and snapshots. Update the docs. https://bugzilla.redhat.com/show_bug.cgi?id=1913138 Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt PATCH 0/7] Define and enable Snowridge CPU model

2021-01-06 Thread Tim Wiederhake
This series adds and enables the Snowridge CPU model. Note that qemu currently uses the same model ID for Icelake-Server [1] and Snowridge [2]. The correct ID for Icelake is 106 [3], a mistake that has been fixed in libvirt already [4], but is still missing in qemu [5]. [1]

[libvirt PATCH 1/7] cputestdata: Add test data for Snowridge

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- ...64-cpuid-Atom-P5362-processor-disabled.xml |8 + ..._64-cpuid-Atom-P5362-processor-enabled.xml | 10 + .../x86_64-cpuid-Atom-P5362-processor.json| 2415 + .../x86_64-cpuid-Atom-P5362-processor.xml | 61 + 4 files changed, 2494

[libvirt PATCH 7/7] cpu_map: Define and enable Snowridge model

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_Snowridge.xml | 71 +++ .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 +

[libvirt PATCH 2/7] cpu_map: Add support for fsrm CPU feature

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/cpu_map/x86_features.xml | 3 +++ tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 + 3 files changed, 5 insertions(+) diff --git

[libvirt PATCH 6/7] cputestdata: Snowridge: Update with split-lock-detect feature

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tests/cputestdata/x86_64-cpuid-Atom-P5362-processor-disabled.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-processor-disabled.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-processor-disabled.xml index

[libvirt PATCH 4/7] cputestdata: Snowridge: Update with core-capability CPU feature

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- .../cputestdata/x86_64-cpuid-Atom-P5362-processor-disabled.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-processor-disabled.xml

[libvirt PATCH 3/7] cpu_map: Add support for core-capability CPU feature

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/cpu_map/x86_features.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml index b0bf22d916..a5a987deba 100644 --- a/src/cpu_map/x86_features.xml +++ b/src/cpu_map/x86_features.xml @@ -357,6

[libvirt PATCH 5/7] cpu_map: Add support for split-lock-detect CPU feature

2021-01-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/cpu_map/x86_features.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml index a5a987deba..4836595a8c 100644 --- a/src/cpu_map/x86_features.xml +++ b/src/cpu_map/x86_features.xml @@ -581,4

Re: [libvirt PATCH v3 07/21] nodedev: add mdevctl devices to node device list

2021-01-06 Thread Erik Skultety
On Thu, Dec 24, 2020 at 08:14:31AM -0600, Jonathon Jongsma wrote: > At startup, query devices that are defined by 'mdevctl' and add them to > the node device list. > > This adds a complication: we now have two potential sources of > information for a node device: > - udev for all devices and for

Re: [RFC] exposing 'nodedev assigned to domain' info to users

2021-01-06 Thread Daniel Henrique Barboza
On 1/6/21 7:09 AM, Daniel P. Berrangé wrote: On Tue, Jan 05, 2021 at 05:18:13PM -0300, Daniel Henrique Barboza wrote: Hi, This is something I've been giving a thought after working in Gitlab issue #72 and decided to run through the ML before hitting the code. We don't have an easy way to

Re: [libvirt PATCH v3 09/21] nodedev: handle mdevs that disappear from mdevctl

2021-01-06 Thread Erik Skultety
On Thu, Dec 24, 2020 at 08:14:33AM -0600, Jonathon Jongsma wrote: > mdevctl does not currently provide any events when the list of defined > devices changes, so we will need to poll mdevctl for the list of defined > devices periodically. When a mediated device no longer exists from one > iteration

Re: [PATCH] qemu_process: Release domain seclabel later in qemuProcessStop()

2021-01-06 Thread Michal Privoznik
On 12/9/20 11:26 AM, Michal Privoznik wrote: > Polite ping. Michal

Re: [PATCH 0/2] qemu: Restore default root qdisc when QoS is cleared out

2021-01-06 Thread Michal Privoznik
On 12/4/20 2:11 PM, Michal Privoznik wrote: > Polite ping. Michal

[libvirt PATCH v2 1/9] util: remove unused virStorageGenerateQcowPassphrase

2021-01-06 Thread Pavel Hrdina
The last user was removed by commit <40f0e0348dfc84f28a500e262c4953b0d3b44fa0>. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms| 1 - src/util/virstorageencryption.c | 34 - src/util/virstorageencryption.h | 2 -- 3

[libvirt PATCH v2 7/9] virfile: refactor virFileNBDDeviceAssociate

2021-01-06 Thread Pavel Hrdina
The only reason why virstoragefile.h needs to be included in virfile.h is that virFileNBDDeviceAssociate() takes virStorageFileFormat argument. The function doesn't need the enum value as it converts the value to string and uses only that. Change the argument to string which will allow us to

[libvirt PATCH v2 3/9] util: move virQEMUBuildQemuImgKeySecretOpts into storage

2021-01-06 Thread Pavel Hrdina
Function virQEMUBuildQemuImgKeySecretOpts is not used anywhere else so there is no need to have it in util. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/storage/storage_util.c | 74 -- src/util/virqemu.c

[libvirt PATCH v2 5/9] util: move virStorageFileCheckCompat into conf

2021-01-06 Thread Pavel Hrdina
It is not used anywhere else. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/storage_conf.c | 23 ++- src/util/virstoragefile.c | 24 src/util/virstoragefile.h | 2 -- 3 files changed, 22 insertions(+), 27 deletions(-) diff

[libvirt PATCH v2 2/9] virstoragefile: remove unused virStorageFileChainCheckBroken

2021-01-06 Thread Pavel Hrdina
The last usage outside of tests was removed by commit <780f8c94ca8b3dee7eb59c1bfbc32f672f965df8>. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstoragefile.c | 33 - src/util/virstoragefile.h | 3 ---

[libvirt PATCH v2 4/9] util: move virStorageFileGetLVMKey to locking

2021-01-06 Thread Pavel Hrdina
The function doesn't take virStorageSource as argument and has nothing in common with virStorageSource or storage file. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms| 1 - src/locking/lock_driver_lockd.c | 68 -

[libvirt PATCH v2 6/9] src: add missing headers to various files

2021-01-06 Thread Pavel Hrdina
All these headers are indirectly included provided by virfile.h having virstoragefile.h which will be removed in the following patch. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/driver.c | 1 + src/qemu/qemu_interop_config.c | 1 + src/qemu/qemu_shim.c

[libvirt PATCH v2 8/9] virstoragefile: move virStorageFileResize into virfile

2021-01-06 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 2 +- src/storage/storage_util.c | 2 +- src/util/virfile.c | 47 ++ src/util/virfile.h | 4 src/util/virstoragefile.c | 47

[libvirt PATCH v2 9/9] virstoragefile: move virStorageFileIsClusterFS into virfile

2021-01-06 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 2 +- src/qemu/qemu_migration.c | 2 +- src/util/virfile.c| 13 + src/util/virfile.h| 1 + src/util/virstoragefile.c | 11 --- src/util/virstoragefile.h | 1 - 6 files

[libvirt PATCH v2 0/9 PUSHED] cleanup storage source related code

2021-01-06 Thread Pavel Hrdina
This series is pushed, posting only to track the changes to fix the issues pointed out by Peter. Pavel Hrdina (9): util: remove unused virStorageGenerateQcowPassphrase virstoragefile: remove unused virStorageFileChainCheckBroken util: move virQEMUBuildQemuImgKeySecretOpts into storage

Re: [PATCH v3 4/4] src: don't hide error in VIR_DRV_SUPPORTS_FEATURE

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 18, 2020 at 09:56:48AM +0300, Nikolay Shirokovskiy wrote: > Otherwise we can get misleading error messages. One example is when connection > is broken we got "this function is not supported by the connection driver: > virDomainMigrate3" from virDomainMigrate3. > > Signed-off-by:

Re: [PATCH 0/3] schemas: Allow to have interleaved children

2021-01-06 Thread Ján Tomko
On a Wednesday in 2021, Michal Privoznik wrote: Tested with the following change: diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml index f6bb663e97..875e2316a0 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml

Re: [libvirt PATCH v3 10/21] nodedev: rename dataReady to udevReady

2021-01-06 Thread Erik Skultety
On Thu, Dec 24, 2020 at 08:14:34AM -0600, Jonathon Jongsma wrote: > The udev thread handles received udev events. This is accomplished by > setting dataReady to 'true' and signalling the thread. > > We also want to use this thread to handle mdev events, so we'll need to > add another variable to

Re: [libvirt PATCH v3 11/21] nodedev: Refresh mdev devices when changes are detected

2021-01-06 Thread Erik Skultety
On Thu, Dec 24, 2020 at 08:14:35AM -0600, Jonathon Jongsma wrote: > We need to periodically query mdevctl for changes to device definitions > since an administrator can define new devices with mdevctl outside of > libvirt. > > In the future, mdevctl may add a way to signal device add/remove via >

Re: [PATCH] qemu_process: Release domain seclabel later in qemuProcessStop()

2021-01-06 Thread Daniel P . Berrangé
On Wed, Dec 09, 2020 at 11:26:52AM +0100, Michal Privoznik wrote: > Some secdrivers (typically SELinux driver) generate unique > dynamic seclabel for each domain (unless a static one is > requested in domain XML). This is achieved by calling > qemuSecurityGenLabel() from qemuProcessPrepareDomain()

Re: [PATCH v3 1/4] src: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 18, 2020 at 09:56:45AM +0300, Nikolay Shirokovskiy wrote: > Otherwise in some places we can mistakenly report 'unsupported' error instead > of root cause. So let's handle root cause explicitly from the macro. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/libvirt-domain.c | 511

Re: [PATCH v3 2/4] libxl: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 18, 2020 at 09:56:46AM +0300, Nikolay Shirokovskiy wrote: > Otherwise in some places we can mistakenly report 'unsupported' error instead > of root cause. So let's handle root cause explicitly from the macro. > > Signed-off-by: Nikolay Shirokovskiy > --- >

Re: [PATCH] manpage: virsh: Drop note that 'domrename' doesn't work with snapshots/checkpoints

2021-01-06 Thread Han Han
On Wed, Jan 6, 2021 at 6:00 PM Peter Krempa wrote: > As of commits 3b1244bffdb and 4770a96c662 renaming of the domain works > also with checkpoints and snapshots. Update the docs. > > https://bugzilla.redhat.com/show_bug.cgi?id=1913138 > > Signed-off-by: Peter Krempa > --- >

Re: [PATCH 2/2] qemu: Restore default root qdisc when QoS is cleared out

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 02:11:24PM +0100, Michal Privoznik wrote: > When an interface has some bandwidth limitation set (it's root > qdisc is htb in that case) but this gets cleared out via public > API call (virDomainSetInterfaceParameters() or > virDomainUpdateDeviceFlags()) then

[PATCH 01/12] qemuMonitorJSONSetMigrationParams: Take double pointer for @params

2021-01-06 Thread Peter Krempa
This allows simplification of the caller as well as will enable a later refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_params.c | 9 +++-- src/qemu/qemu_monitor.c | 11 +++ src/qemu/qemu_monitor.h | 2 +-

Re: [PATCH v2] conf: Add support for keeping TPM emulator state

2021-01-06 Thread Michal Privoznik
On 1/4/21 3:31 AM, Eiichi Tsukata wrote: Currently, swtpm TPM state file is removed when a transient domain is powered off or undefined. When we store TPM state on a shared storage such as NFS and use transient domain, TPM states should be kept as it is. Add per-TPM emulator option

[PATCH 3/3] schemas: Allow direct children of to be interleaved

2021-01-06 Thread Michal Privoznik
Now that individual child elements allow their children to be interleaved, let's allow direct children of to be interleaved too. Signed-off-by: Michal Privoznik --- docs/schemas/domaincommon.rng | 346 +- 1 file changed, 174 insertions(+), 172 deletions(-) diff

[PATCH 2/3] schemas: Allow interleaving of fsBinary children

2021-01-06 Thread Michal Privoznik
The element of can have children elements ( and ). Allow them to be interleaved. Signed-off-by: Michal Privoznik --- docs/schemas/domaincommon.rng | 54 ++- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/schemas/domaincommon.rng

[PATCH 09/12] util: json: Replace virJSONValueObjectSteal by virJSONValueObjectRemoveKey

2021-01-06 Thread Peter Krempa
virJSONValueObjectRemoveKey can be used as direct replacement. Fix the one caller and remove the duplicate function. Signed-off-by: Peter Krempa --- src/util/virjson.c | 29 - 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/util/virjson.c

[PATCH 10/12] tests: qemuxml2argv: Don't check whether -netdev was QAPIfied repeatedly

2021-01-06 Thread Peter Krempa
Check once before looping through the args. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d2712e0dce..662d0d5df6 100644 ---

[PATCH 02/12] qemuMonitorSetMigrationCapabilities: Take double pointer for @caps

2021-01-06 Thread Peter Krempa
This allows simplification of the callers. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_params.c | 13 - src/qemu/qemu_monitor.c | 11 +++ src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c | 5 ++--- src/qemu/qemu_monitor_json.h

[PATCH 12/12] testCompareXMLToArgvValidateSchema: Populate autoNodeset

2021-01-06 Thread Peter Krempa
We create a new 'vm' so we must also fake the nodeset. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 662d0d5df6..8b2df07448 100644 --- a/tests/qemuxml2argvtest.c +++

[PATCH 03/12] qemuMonitorJSONSetMigrationCapabilities: Refactor cleanup

2021-01-06 Thread Peter Krempa
Use automatic memory freeing and remove the 'cleanup' label and 'ret' variable. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c

[PATCH 00/12 RESEND] qemu: Preparation for 'object-add' qapification

2021-01-06 Thread Peter Krempa
This is a resend of the patches from: https://www.redhat.com/archives/libvir-list/2020-November/msg01625.html which can be justified without the rest of the series. This series cleans up some monitor code and few related bits to testing. The reset of the series will be posted once there's

[PATCH 08/12] qemuMonitorAddObject: Refactor cleanup

2021-01-06 Thread Peter Krempa
Remove freeing/clearing of @props as the function doesn't guarantee that it happens on success, rename the variable hodling copy of the alias and use g_autofree to automatically free it and remove the cleanup label as well as 'ret' variable. Signed-off-by: Peter Krempa ---

[PATCH 11/12] qemuBuildChrChardevStr: Rename 'flags' to 'cdevflags'

2021-01-06 Thread Peter Krempa
The monitor code uses 'flags' for the flags of the monitor builder, while in this function it's a different set of flags. All callers pass a variable named 'cdevflags', so rename the argument to suit. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 10 +- 1 file changed, 5

[PATCH 05/12] qemuMonitorJSONAddObject: Take double pointer for @props

2021-01-06 Thread Peter Krempa
Prepare for a refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 +-- src/qemu/qemu_monitor_json.c | 5 +++-- src/qemu/qemu_monitor_json.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor.c

[PATCH 06/12] qemuMonitorJSONMakeCommandInternal: Clear @arguments when stolen

2021-01-06 Thread Peter Krempa
All callers of qemuMonitorJSONMakeCommandInternal will benefit from making @arguments a double pointer and passing it to virJSONValueObjectCreate directly which will clear it if it steals the value. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 32

[PATCH 04/12] testQemuMonitorJSONqemuMonitorJSONGetMigrationCapabilities: refactor cleanup

2021-01-06 Thread Peter Krempa
Use automatic memory freeing to remove the 'cleanup:' label and 'ret' variable. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c

[PATCH 07/12] qemuMonitorAddObject: Fix semantics of @alias

2021-01-06 Thread Peter Krempa
The callers of qemuMonitorAddObject rely on the fact that @alias is filled only when the object is added successfully. This is documented but the code didn't behave like that. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

Re: [libvirt PATCH 04/17] util: move virStorageFileGetLVMKey to locking

2021-01-06 Thread Pavel Hrdina
On Mon, Jan 04, 2021 at 04:30:03PM +0100, Peter Krempa wrote: > On Mon, Dec 14, 2020 at 16:55:24 +0100, Pavel Hrdina wrote: > > The function doesn't take virStorageSource as argument and has nothing > > in common with virStorageSource or storage file. > > > > Signed-off-by: Pavel Hrdina > > ---

Re: [PATCHv2 4/4] netlink: Introduce a helper function to simplify netlink functions

2021-01-06 Thread Michal Privoznik
On 1/6/21 3:40 AM, Shi Lei wrote: Extract common code as helper function virNetlinkTalk, then simplify the functions virNetlink[DumpLink|NewLink|DelLink|GetNeighbor]. Signed-off-by: Shi Lei --- src/util/virnetlink.c | 225 +- src/util/virnetlink.h |

Re: [libvirt PATCH v3 07/21] nodedev: add mdevctl devices to node device list

2021-01-06 Thread Erik Skultety
On Wed, Jan 06, 2021 at 11:27:09AM +0100, Erik Skultety wrote: > On Thu, Dec 24, 2020 at 08:14:31AM -0600, Jonathon Jongsma wrote: > > At startup, query devices that are defined by 'mdevctl' and add them to > > the node device list. > > > > This adds a complication: we now have two potential

[PATCH] schema: Fix TPM version rules

2021-01-06 Thread Michal Privoznik
According to our parser (virDomainTPMDefParseXML()) the version is an optional attribute and independent of TPM backend type. Therefore, it's not a choice group, which is what our RNG schema suggests. Signed-off-by: Michal Privoznik --- docs/schemas/domaincommon.rng | 20 1

Re: [libvirt PATCH v3 07/21] nodedev: add mdevctl devices to node device list

2021-01-06 Thread Erik Skultety
On Wed, Jan 06, 2021 at 11:27:09AM +0100, Erik Skultety wrote: > On Thu, Dec 24, 2020 at 08:14:31AM -0600, Jonathon Jongsma wrote: > > At startup, query devices that are defined by 'mdevctl' and add them to > > the node device list. > > > > This adds a complication: we now have two potential

[PATCH 1/3] schemas: Allow fsDriver to be interleaved

2021-01-06 Thread Michal Privoznik
Our element can have child element. But with the way our schema is written it can't be interleaved and has to go first. Signed-off-by: Michal Privoznik --- docs/schemas/domaincommon.rng | 42 +-- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git

[PATCH 0/3] schemas: Allow to have interleaved children

2021-01-06 Thread Michal Privoznik
Tested with the following change: diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml index f6bb663e97..875e2316a0 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml +++

Re: [PATCH 1/2] qemu: Set default qdisc before setting bandwidth

2021-01-06 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 02:11:23PM +0100, Michal Privoznik wrote: > While the code that's setting default qdisc is clever enough to > not overwrite any bandwidth (potentially) set by > virNetDevBandwidthSet() (and thus the root qdisc htb is not > replaced with noqueue), it does print a debug

Re: [PATCH] schema: Fix TPM version rules

2021-01-06 Thread Daniel Henrique Barboza
On 1/6/21 7:53 AM, Michal Privoznik wrote: According to our parser (virDomainTPMDefParseXML()) the version is an optional attribute and independent of TPM backend type. Therefore, it's not a choice group, which is what our RNG schema suggests. Signed-off-by: Michal Privoznik ---

Re: [libvirt PATCH v3 06/21] nodedev: add STOPPED/STARTED lifecycle events

2021-01-06 Thread Daniel P . Berrangé
On Thu, Dec 24, 2020 at 08:14:30AM -0600, Jonathon Jongsma wrote: > Since a mediated device can be persistently defined by the mdevctl > backend, we need additional lifecycle events beyond CREATED/DELETED to > indicate that e.g. the device has been stopped but the device definition > still exists.

Re: [libvirt PATCH v3 12/21] api: add virNodeDeviceDefineXML()

2021-01-06 Thread Erik Skultety
On Thu, Dec 24, 2020 at 08:14:36AM -0600, Jonathon Jongsma wrote: > With mediated devices, we can now define persistent node devices that > can be started and stopped. In order to take advantage of this, we need > an API to define new node devices. > > Signed-off-by: Jonathon Jongsma > --- ...

Re: [RFC] exposing 'nodedev assigned to domain' info to users

2021-01-06 Thread Erik Skultety
On Wed, Jan 06, 2021 at 08:00:52AM -0300, Daniel Henrique Barboza wrote: > > > On 1/6/21 7:09 AM, Daniel P. Berrangé wrote: > > On Tue, Jan 05, 2021 at 05:18:13PM -0300, Daniel Henrique Barboza wrote: > > > Hi, > > > > > > This is something I've been giving a thought after working in Gitlab

[libvirt PATCH v2] qemuDomainChangeNet: Check changed virtio network driver options

2021-01-06 Thread Tim Wiederhake
Changes to a virtio network device such as ... were quietly dismissed by `virsh update-device ... --live`. Signed-off-by: Tim Wiederhake Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_hotplug.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: [libvirt PATCH v2 15/16] docs: add manpage for virtvzd

2021-01-06 Thread Jiri Denemark
On Tue, Jan 05, 2021 at 17:25:53 +, Daniel P. Berrangé wrote: > This is an adaptation of the libvirtd manpage. > > Signed-off-by: Daniel P. Berrangé > --- > docs/manpages/index.rst | 1 + > docs/manpages/meson.build | 1 + > docs/manpages/virtvzd.rst | 215

[PATCH v2 1/1] NEWS.rst: update with pSeries initial memory fix

2021-01-06 Thread Daniel Henrique Barboza
Commit v6.10.0-103-g198c1eb6b4 fixed this issue. Signed-off-by: Daniel Henrique Barboza --- Changes from v2: - clarified that the bug fix will not affect existing guests that will update from an older Libvirt version to 7.0.0. NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git

Re: [PATCH 1/1] NEWS.rst: update with pSeries initial memory fix

2021-01-06 Thread Daniel Henrique Barboza
On 1/6/21 12:03 PM, Daniel P. Berrangé wrote: On Wed, Jan 06, 2021 at 12:00:30PM -0300, Daniel Henrique Barboza wrote: On 1/6/21 11:47 AM, Daniel P. Berrangé wrote: On Wed, Jan 06, 2021 at 11:42:09AM -0300, Daniel Henrique Barboza wrote: Commit v6.10.0-103-g198c1eb6b4 fixed this issue.

Re: [libvirt PATCH v2 16/16] docs: add manpage for virtxend

2021-01-06 Thread Jiri Denemark
On Tue, Jan 05, 2021 at 17:25:54 +, Daniel P. Berrangé wrote: > This is an adaptation of the libvirtd manpage. > > Signed-off-by: Daniel P. Berrangé > --- > docs/manpages/index.rst| 1 + > docs/manpages/meson.build | 1 + > docs/manpages/virtxend.rst | 215

  1   2   >