listen type socket support for rdp graphics

2020-03-19 Thread Vasiliy Tolstov
Hi! How hard implement listen type socket support for rdp graphics? VNC and SPICE already have such options? And does this support for rdp available for qemu driver? (I need to access qemu vm via rdp) Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

[PATCH v1 4/4] qemu_domain.c: do not launch ppc64 guests with Hyperv settings

2020-03-19 Thread Daniel Henrique Barboza
Hyperv features aren't supported in QEMU for ppc64. The declaration in the XML by itself is benign, but any of its 14 current features will break QEMU with an error like this: qemu-kvm: Expected key=value format, found hv_relaxed This is a more extreme case than the one for apic eoi because we

[PATCH v1 1/4] qemu_domain.c: do not launch ppc64 guests with APIC-EOI setting

2020-03-19 Thread Daniel Henrique Barboza
The "" feature, although it's not available for pseries, can be declared in the domain XML of ppc64 guests without errors. But setting its 'eoi' attribute will break QEMU. For "": qemu-kvm: Expected key=value format, found +kvm_pv_eoi A similar error happens with eoi='off'. One can argue that

[PATCH v1 3/4] qemu_domain.c: do not launch ppc64 guests with 'pmu' setting

2020-03-19 Thread Daniel Henrique Barboza
The Perfomance Monitoring Unit (PMU) feature is not available for the Power architecture. The "" feature will always have a value 'on' or 'off' after saving the domain XML, and both will be rejected by QEMU when launching. This is the error message for "": qemu-kvm: can't apply global

[PATCH v1 2/4] qemu_domain.c: do not launch ppc64 guests with 'pvspinlock' setting

2020-03-19 Thread Daniel Henrique Barboza
PowerPC does not support the 'pvspinlock' feature. The "" declaration will always have a value 'on' or 'off', and both will break QEMU when launching. This is the error message for "": qemu-kvm: Expected key=value format, found +kvm_pv_unhalt A similar error message is thrown for "". This patch

[PATCH v1 0/4] Prevent ppc64 guest launch with broken features

2020-03-19 Thread Daniel Henrique Barboza
Hi, This work was intended to fix a bug with APIC-EOI setting only (patch 1). I decided to take a closer look and ended up handling more cases. I consider the first 3 patches to be straightforward: those are conditions that QEMU will complain about and I'm simply refusing to launch while giving

[PATCH 5/6] jsontest: Add test cases for deflattening of arrays

2020-03-19 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../deflatten-dotted-array-in.json| 27 .../deflatten-dotted-array-out.json | 43 +++ tests/virjsontest.c | 1 + 3 files changed, 71 insertions(+) create mode 100644

[PATCH 4/6] virjson: Deflatten arrays generated by the json->commandline generator

2020-03-19 Thread Peter Krempa
For the few instances where we'd generate an array in dotted syntax we should be able to parse it back. Add another step in deflattening of the dotted syntax which reconstructs the arrays so that the backing store parser can parse it. https://bugzilla.redhat.com/show_bug.cgi?id=1466177

[PATCH 1/6] virBitmapNewEmpty: Use g_new0 to allocate and remove error checking

2020-03-19 Thread Peter Krempa
virBitmapNewEmpty can't fail now so we can make it obvious and fix all callers. Signed-off-by: Peter Krempa --- src/util/virbitmap.c | 14 +++--- src/util/virhostcpu.c | 6 ++ src/util/virtpm.c | 3 +-- tests/virbitmaptest.c | 8 ++-- 4 files changed, 8 insertions(+), 23

[PATCH 2/6] virJSONValueObjectDeflattenWorker: Refactor cleanup

2020-03-19 Thread Peter Krempa
Use automatic memory handling to remove the cleanup section. Signed-off-by: Peter Krempa --- src/util/virjson.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index 2d7368b0b6..f308927fa0 100644 ---

[PATCH 0/6] Parse back some legacy backing store strings

2020-03-19 Thread Peter Krempa
See patch 4 for code and 6 for what we try to parse back. Peter Krempa (6): virBitmapNewEmpty: Use g_new0 to allocate and remove error checking virJSONValueObjectDeflattenWorker: Refactor cleanup util: json: Extract deflattening of keys into a separate function virjson: Deflatten arrays

[PATCH 3/6] util: json: Extract deflattening of keys into a separate function

2020-03-19 Thread Peter Krempa
Extract the code so that there's a clean separation once we'll want do do other steps. Signed-off-by: Peter Krempa --- src/util/virjson.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index

[PATCH 6/6] tests: virstoragetest: validate that array deflattening works for gluster

2020-03-19 Thread Peter Krempa
Validate that we are able to parse back the dotted syntax arrays we were generating in the pre-blockdev era. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index

Re: [PATCH 5/6] virprocess: Passthru error from virProcessRunInForkHelper

2020-03-19 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: When running a function in a forked child, so far the only thing we could report is exit status of the child and the error message. However, it may be beneficial to the caller to know the actual error that happened in the child. Signed-off-by:

Re: libvirt-devaddr: a new library for device address assignment

2020-03-19 Thread Laine Stump
TL;DR - I'm not as anti-XML as the proposal seems to be, but also not pro-XML. I also (after thinking about it) understand the advantage of putting this in a separate library. So yeah, let's go it! On 3/13/20 6:47 AM, Daniel P. Berrangé wrote: On Fri, Mar 13, 2020 at 11:23:44AM +0200, Dan

Re: [PATCH 5/6] virprocess: Passthru error from virProcessRunInForkHelper

2020-03-19 Thread Pavel Mores
On Wed, Mar 18, 2020 at 06:32:15PM +0100, Michal Privoznik wrote: > When running a function in a forked child, so far the only thing > we could report is exit status of the child and the error > message. However, it may be beneficial to the caller to know the > actual error that happened in the

Re: [PATCH] Minor doc fix

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Sebastian Mitterle wrote: 1. Fix link to knowledge base article 2. Use to make sure kbase.html has page title These are actually two fixes. I've split them up using these bullet points as commit messages. Signed-off-by Sebastian Mitterle You can use 'git commit

Re: [PULL v2 00/11] Bitmaps patches

2020-03-19 Thread John Snow
On 3/19/20 1:57 PM, Peter Maydell wrote: > On Wed, 18 Mar 2020 at 20:24, John Snow wrote: >> >> The following changes since commit d649689a8ecb2e276cc20d3af6d416e3c299cb17: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >> staging (2020-03-17 18:33:05 +) >>

Re: [PULL v2 00/11] Bitmaps patches

2020-03-19 Thread Peter Maydell
On Wed, 18 Mar 2020 at 20:24, John Snow wrote: > > The following changes since commit d649689a8ecb2e276cc20d3af6d416e3c299cb17: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2020-03-17 18:33:05 +) > > are available in the Git repository at: > >

Re: [PATCH 2/6] qemuDomainBuildNamespace: Try harder to remove temp directories

2020-03-19 Thread Pavel Mores
On Wed, Mar 18, 2020 at 06:32:12PM +0100, Michal Privoznik wrote: > If building namespace fails somewhere in the middle (that is some > files exists under devMountsSavePath[i]), then plain rmdir() is > not enough to remove dir. Umount the temp location and use > virFileDeleteTree() to remove the

Re: [PATCH] qemu: Don't crash when getting targets for a multipath

2020-03-19 Thread Peter Krempa
On Thu, Mar 19, 2020 at 18:39:58 +0100, Michal Privoznik wrote: > On 19. 3. 2020 17:43, Peter Krempa wrote: > > On Thu, Mar 19, 2020 at 17:22:37 +0100, Michal Privoznik wrote: > >> In one of my previous commits I've introduced code that creates > >> all devices for given (possible) multipath

Re: [PATCH 2/2] virStorageEncryptionSecretCopy: Properly copy internals

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: On Thu, Mar 19, 2020 at 18:14:15 +0100, Ján Tomko wrote: On a Thursday in 2020, Peter Krempa wrote: > virStorageEncryptionSecretPtr may have a string inside it, thus we must > copy the string too. Use virSecretLookupDefCopy to do that. > > Likely

Re: [PATCH] qemu: Don't crash when getting targets for a multipath

2020-03-19 Thread Michal Prívozník
On 19. 3. 2020 17:43, Peter Krempa wrote: > On Thu, Mar 19, 2020 at 17:22:37 +0100, Michal Privoznik wrote: >> In one of my previous commits I've introduced code that creates >> all devices for given (possible) multipath target. But I've made >> a mistake there - the code accesses src->path

Re: [PATCH 2/2] virStorageEncryptionSecretCopy: Properly copy internals

2020-03-19 Thread Peter Krempa
On Thu, Mar 19, 2020 at 18:14:15 +0100, Ján Tomko wrote: > On a Thursday in 2020, Peter Krempa wrote: > > virStorageEncryptionSecretPtr may have a string inside it, thus we must > > copy the string too. Use virSecretLookupDefCopy to do that. > > > > Likely caused by 756b46ddd24. > > Please

Re: [PATCH 0/2] Fix wrong copy of encryption 'usage' string

2020-03-19 Thread Michal Prívozník
On 19. 3. 2020 17:48, Peter Krempa wrote: > Copying the pointer caused double-free when clearing the domain object. > > Peter Krempa (2): > virSecretLookupDefCopy: Remove return value > virStorageEncryptionSecretCopy: Properly copy internals > > src/util/virsecret.c| 3 +-- >

Re: [PATCH 0/2] Fix wrong copy of encryption 'usage' string

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: Copying the pointer caused double-free when clearing the domain object. Peter Krempa (2): virSecretLookupDefCopy: Remove return value virStorageEncryptionSecretCopy: Properly copy internals src/util/virsecret.c| 3 +--

Re: [PATCH 2/2] virStorageEncryptionSecretCopy: Properly copy internals

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: virStorageEncryptionSecretPtr may have a string inside it, thus we must copy the string too. Use virSecretLookupDefCopy to do that. Likely caused by 756b46ddd24. Please remove the period from the end. Also, at the times of that commit, memcpy was

[PATCH] Minor doc fix

2020-03-19 Thread Sebastian Mitterle
1. Fix link to knowledge base article 2. Use to make sure kbase.html has page title Signed-off-by Sebastian Mitterle --- docs/formatbackup.html.in | 2 +- docs/kbase.html.in| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatbackup.html.in

Re: [PATCH 0/4] qemu: Fix usage of 'slice' and 'luks'

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: We special cased some behaviour and it broke on combination with other special case. Peter Krempa (4): qemuxml2argvdata/disk-slices: Add test case for 'luks' encryption qemu: block: Extract logic decision when to use a separate 'raw' layer for

[PATCH 1/2] virSecretLookupDefCopy: Remove return value

2020-03-19 Thread Peter Krempa
The function always returns succes so there's no need for a return value. Signed-off-by: Peter Krempa --- src/util/virsecret.c | 3 +-- src/util/virsecret.h | 4 ++-- src/util/virstoragefile.c | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/util/virsecret.c

[PATCH 2/2] virStorageEncryptionSecretCopy: Properly copy internals

2020-03-19 Thread Peter Krempa
virStorageEncryptionSecretPtr may have a string inside it, thus we must copy the string too. Use virSecretLookupDefCopy to do that. Likely caused by 756b46ddd24. https://bugzilla.redhat.com/show_bug.cgi?id=1814923 Signed-off-by: Peter Krempa --- src/util/virstorageencryption.c | 8 +++- 1

[PATCH 0/2] Fix wrong copy of encryption 'usage' string

2020-03-19 Thread Peter Krempa
Copying the pointer caused double-free when clearing the domain object. Peter Krempa (2): virSecretLookupDefCopy: Remove return value virStorageEncryptionSecretCopy: Properly copy internals src/util/virsecret.c| 3 +-- src/util/virsecret.h| 4 ++--

Re: [PATCH] qemu: Don't crash when getting targets for a multipath

2020-03-19 Thread Peter Krempa
On Thu, Mar 19, 2020 at 17:22:37 +0100, Michal Privoznik wrote: > In one of my previous commits I've introduced code that creates > all devices for given (possible) multipath target. But I've made > a mistake there - the code accesses src->path without checking if > the disk source is local. Note

Re: [PATCH] qemu: Don't crash when getting targets for a multipath

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Michal Privoznik wrote: In one of my previous commits I've introduced code that creates all devices for given (possible) multipath target. But I've made a mistake there - the code accesses src->path without checking if the disk source is local. Note that the path is NULL

[PATCH 3/4] qemuBlockStorageSourceNeedsStorageSliceLayer: Deal with 'luks' files

2020-03-19 Thread Peter Krempa
The 'luks' driver in qemu is as any other non-raw format driver and thus doesn't support the properties for 'slice'. Since libvirt considers luks files to be raw+encryption we need to special case them when dealing with the slice. https://bugzilla.redhat.com/show_bug.cgi?id=1814975

[PATCH 1/4] qemuxml2argvdata/disk-slices: Add test case for 'luks' encryption

2020-03-19 Thread Peter Krempa
Since libvirt handles the luks encryption in a weird special way (raw+encryption) we should really test that case with slices as well. Signed-off-by: Peter Krempa --- .../disk-slices.x86_64-latest.args| 38 --- tests/qemuxml2argvdata/disk-slices.xml| 13

[PATCH 0/4] qemu: Fix usage of 'slice' and 'luks'

2020-03-19 Thread Peter Krempa
We special cased some behaviour and it broke on combination with other special case. Peter Krempa (4): qemuxml2argvdata/disk-slices: Add test case for 'luks' encryption qemu: block: Extract logic decision when to use a separate 'raw' layer for slice

[PATCH 4/4] qemu: block: Split up formatting of JSON props for 'raw' and 'luks' drivers

2020-03-19 Thread Peter Krempa
qemuBlockStorageSourceGetFormatRawProps aggregated both formats but since we now have props specific for either of those formats it's unwanted to aggregate the code such way. Split out the 'luks' props formatter into qemuBlockStorageSourceGetFormatLUKSProps. The wrong separation demonstrates

[PATCH 2/4] qemu: block: Extract logic decision when to use a separate 'raw' layer for slice

2020-03-19 Thread Peter Krempa
Introduce qemuBlockStorageSourceNeedsStorageSliceLayer which will hold the decision logic and fix all places that open-code it. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 24 +--- src/qemu/qemu_block.h | 3 +++ src/qemu/qemu_domain.c | 3 +-- 3 files

[PATCH] qemu: Don't crash when getting targets for a multipath

2020-03-19 Thread Michal Privoznik
In one of my previous commits I've introduced code that creates all devices for given (possible) multipath target. But I've made a mistake there - the code accesses src->path without checking if the disk source is local. Note that the path is NULL if the source is not local. Fixes:

Re: [PATCH 1/1] conf: qemu 9pfs: add 'multidevs' option

2020-03-19 Thread Ján Tomko
On a Thursday in 2020, Christian Schoenebeck wrote: On Donnerstag, 19. März 2020 14:10:26 CET Ján Tomko wrote: On a Tuesday in 2020, Christian Schoenebeck wrote: >Introduce new 'multidevs' option for filesystem. > > I don't like the 'multidevs' name, but cannot think of anything beter.

Re: [PATCH 1/1] conf: qemu 9pfs: add 'multidevs' option

2020-03-19 Thread Christian Schoenebeck
On Donnerstag, 19. März 2020 14:10:26 CET Ján Tomko wrote: > On a Tuesday in 2020, Christian Schoenebeck wrote: > >Introduce new 'multidevs' option for filesystem. > > > > > > I don't like the 'multidevs' name, but cannot think of anything > beter. > > 'collisions' maybe? Not sure if

Re: [PATCH 1/1] conf: qemu 9pfs: add 'multidevs' option

2020-03-19 Thread Daniel P . Berrangé
On Thu, Mar 19, 2020 at 04:57:41PM +0100, Christian Schoenebeck wrote: > On Donnerstag, 19. März 2020 14:10:26 CET Ján Tomko wrote: > > On a Tuesday in 2020, Christian Schoenebeck wrote: > > >Introduce new 'multidevs' option for filesystem. > > > > > > > > > > I don't like the 'multidevs' name,

Re: [PATCH 1/6] qemuDomainCreateDeviceRecursive: Report error if mkdir() fails

2020-03-19 Thread Pavel Mores
On Wed, Mar 18, 2020 at 06:32:11PM +0100, Michal Privoznik wrote: > The virFileMakePathWithMode() which is our recursive version of > mkdir() fails, it simply just returns a negative value with errno > set. No error is reported (as compared to virFileTouch() for > instance). > > Signed-off-by:

Re: [PATCH 4/6] virfile: Handle directories in virFileBindMountDevice()

2020-03-19 Thread Pavel Mores
On Wed, Mar 18, 2020 at 06:32:14PM +0100, Michal Privoznik wrote: > The @src is not always a file. It may also be a directory (for > instance qemuDomainCreateDeviceRecursive() assumes that) - even > though it doesn't happen usually. Anyway, mount() can mount only > a dir onto a dir and a file onto

Re: [PATCH 3/6] qemuDomainBuildNamespace: Make @devPath const

2020-03-19 Thread Pavel Mores
On Wed, Mar 18, 2020 at 06:32:13PM +0100, Michal Privoznik wrote: > The @devPath variable is not modifiable. It merely just points to > string containing path where private devtmpfs is being > constructed. Make it const so it doesn't look weird that it's not > freed. > > Signed-off-by: Michal

Re: [PATCH 1/1] conf: qemu 9pfs: add 'multidevs' option

2020-03-19 Thread Ján Tomko
On a Tuesday in 2020, Christian Schoenebeck wrote: Introduce new 'multidevs' option for filesystem. I don't like the 'multidevs' name, but cannot think of anything beter. 'collisions' maybe? This option prevents misbheaviours on guest if a 9pfs export contains multiple

Re: [PATCH] tests: switch away from HAVE_SOCKETPAIR

2020-03-19 Thread Daniel P . Berrangé
On Thu, Mar 19, 2020 at 12:05:17PM +0100, Pino Toscano wrote: > Since the removal of gnulib, HAVE_SOCKETPAIR is no more defined, making > these two tests effectively skipped. Doh, I had compared the config.h file before & after gnulib removal to identify HAVE_* macros that no longer existed, but

[PATCH] tests: switch away from HAVE_SOCKETPAIR

2020-03-19 Thread Pino Toscano
Since the removal of gnulib, HAVE_SOCKETPAIR is no more defined, making these two tests effectively skipped. Use the same strategy used in other generic library bits, i.e. exclude the socketpair usage on Windows. Semi-related change in virnetdaemontest.c to make it build: since virutil.h does

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

2020-03-19 Thread Daniel P . Berrangé
On Thu, Mar 19, 2020 at 10:21:39AM +0100, Andrea Bolognani wrote: > On Wed, 2020-03-18 at 18:01 +0100, Michal Prívozník wrote: > > On 18. 3. 2020 16:47, Andrea Bolognani wrote: > > > if I use either one of > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > both

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

2020-03-19 Thread Andrea Bolognani
On Wed, 2020-03-18 at 18:01 +0100, Michal Prívozník wrote: > On 18. 3. 2020 16:47, Andrea Bolognani wrote: > > if I use either one of > > > > > > > > > > > > > > > > > > > > both qemu:///embed instances try to use the same paths: > > > >

Re: [PATCH 0/5] qemu: Don't log spurious errors on qemuMonitorDelObject

2020-03-19 Thread Michal Prívozník
On 18. 3. 2020 12:40, Peter Krempa wrote: > qemuMonitorDelObject is often used in cleanup cases so we need to > control whether to log errors. > > First patch actually prevents one of the spurious calls in cases we know > it would be pointless. > > Peter Krempa (5): >