Re: [libvirt] [PATCH 4/4] conf: domain: gfx: Iterate over graphics devices when doing validation

2018-12-12 Thread Erik Skultety
On Tue, Dec 11, 2018 at 06:54:31PM -0500, John Ferlan wrote: > > > On 12/7/18 9:47 AM, Erik Skultety wrote: > > The validation code for graphics has been in place for a while, but > > because it is only executed from the device iterator, that validation > &g

Re: [libvirt] [PATCH 4/4] conf: domain: gfx: Iterate over graphics devices when doing validation

2018-12-12 Thread Erik Skultety
On Tue, Dec 11, 2018 at 06:54:31PM -0500, John Ferlan wrote: > > > On 12/7/18 9:47 AM, Erik Skultety wrote: > > The validation code for graphics has been in place for a while, but > > because it is only executed from the device iterator, that validation > &g

Re: [libvirt] [PATCH 3/4] tests: Introduce negative versions of DO_TEST_CAPS_LATEST

2018-12-12 Thread Erik Skultety
On Tue, Dec 11, 2018 at 06:51:56PM -0500, John Ferlan wrote: > > > On 12/7/18 9:47 AM, Erik Skultety wrote: > > As commit d8266ebe161 demonstrated, it's so easy to forget to add a > > single capability which in turn can easily fool the test suite so that > > tests e

Re: [libvirt] [PATCH 2/4] conf: domain: Introduce virDomainDeviceInfoIterate flags

2018-12-12 Thread Erik Skultety
On Tue, Dec 11, 2018 at 06:50:19PM -0500, John Ferlan wrote: > > > On 12/7/18 9:47 AM, Erik Skultety wrote: > > One of the usages of the device iterator is to run config validation. > > That's a problem for graphics devices, because they don't have any @info > > data (g

Re: [libvirt] [PATCH 1/4] qemu: domain: gfx: Fix shadowing the ptr argument to graphics validation

2018-12-12 Thread Erik Skultety
On Tue, Dec 11, 2018 at 06:48:26PM -0500, John Ferlan wrote: > > > On 12/7/18 9:47 AM, Erik Skultety wrote: > > Since the code was never run, this stupid mistake could have only been > > spotted by an accident. > > > > Signed-off-by: Erik Skultety > &

[libvirt] [PATCH 0/2] AMD SEV: Relabel session data under /var/lib/libvirt

2018-12-11 Thread Erik Skultety
o QEMU cmdline. QEMU then uses these files within its communication with SEV firmware, provided it has access to those files. https://bugzilla.redhat.com/show_bug.cgi?id=1658112 Erik Skultety (2): qemu: process: SEV: Assume libDir to be the directory to create files in qemu: process: SEV: R

[libvirt] [PATCH 2/2] qemu: process: SEV: Relabel guest owner's SEV files created before start

2018-12-11 Thread Erik Skultety
, except when it doesn't have permissions to open those files since we don't relabel them. https://bugzilla.redhat.com/show_bug.cgi?id=1658112 Signed-off-by: Erik Skultety --- src/qemu/qemu_process.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu

[libvirt] [PATCH 1/2] qemu: process: SEV: Assume libDir to be the directory to create files in

2018-12-11 Thread Erik Skultety
Since SEV operates on a per domain basis, it's very likely that all SEV launch-related data will be created under /var/lib/libvirt/qemu/. Therefore, when calling into qemuProcessSEVCreateFile we can assume @libDir as the directory prefix rather than passing it explicitly. Signed-off-by: Erik

[libvirt] [PATCH 4/4] conf: domain: gfx: Iterate over graphics devices when doing validation

2018-12-07 Thread Erik Skultety
tests started failing as a result, so fix those too. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 13 - tests/qemuxml2argvtest.c | 7 ++- tests/qemuxml2xmltest.c | 10 +++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b

[libvirt] [PATCH 3/4] tests: Introduce negative versions of DO_TEST_CAPS_LATEST

2018-12-07 Thread Erik Skultety
a domain with multiple OpenGL-enabled graphics devices to start successfully. As a precaution measure, introduce negative versions of DO_TEST_CAPS_LATEST macros, so that we eliminate this vector from now on. Signed-off-by: Erik Skultety --- tests/qemuxml2argvtest.c | 13 +++-- 1 file changed

[libvirt] [PATCH 0/4] Few more graphics-related fixes

2018-12-07 Thread Erik Skultety
So, this series fixes a few issues that are very tightly coupled, so buckle up if you want to read further, if not, here you go: TL;DR: Issue: there's a test passing even though the code doesn't really work Result: fix both the code and the test LONG STORY: The main issue is that we allow

[libvirt] [PATCH 2/4] conf: domain: Introduce virDomainDeviceInfoIterate flags

2018-12-07 Thread Erik Skultety
. Fix this problem by introducing iterator flags. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b70dca6c61..11552bff5b 100644 --- a/src

[libvirt] [PATCH 1/4] qemu: domain: gfx: Fix shadowing the ptr argument to graphics validation

2018-12-07 Thread Erik Skultety
Since the code was never run, this stupid mistake could have only been spotted by an accident. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 509da6bfea

Re: [libvirt] [PATCH] domain: conf: graphics: Fix picking DRI renderer automatically for SPICE

2018-12-07 Thread Erik Skultety
On Fri, Dec 07, 2018 at 10:45:00AM +0100, Ján Tomko wrote: > On Thu, Dec 06, 2018 at 05:12:36PM +0100, Erik Skultety wrote: > > Commit 255e0732 introduced a few graphics-related helpers. The problem > > is that virDomainGraphicsNeedsAutoRenderNode returns true if it gets > &g

[libvirt] [PATCH] domain: conf: graphics: Fix picking DRI renderer automatically for SPICE

2018-12-06 Thread Erik Skultety
is not true for SPICE though, and unless the XML specifies for SPICE, there's no need for any renderer. https://bugzilla.redhat.com/show_bug.cgi?id=1656895 Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conf

Re: [libvirt] [PATCH 10/10] tests: virerror: Make sure that error messages stay in correct order

2018-12-06 Thread Erik Skultety
= virErrorMsgStrings[i].error) { I hope coverity is smart enough not to think that ^^this is a comparison between a signed and unsigned integer. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 08/10] util: error: Use a more declarative approach in virErrorMsg

2018-12-06 Thread Erik Skultety
nter in", "invalid domain > pointer in %s" }, Most of the messages exceed the 80 chars limit, I think it's reasonable to play the consistency card (+ personally I find it more readable too) and say that every member should be on a separate line. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 06/10] util: error: Improve docs for virErrorMsg

2018-12-06 Thread Erik Skultety
ke" and "how it looks" seems to be quite debatable, some people say the meaning is the same while some say there's a slight difference. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 05/10] tests: Add test for virErrorMsg message constraints

2018-12-06 Thread Erik Skultety
> modifiers and the version with info has exactly one. > > Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 04/10] util: error: Export virErrorMsg for use in testsuite

2018-12-06 Thread Erik Skultety
define __VIR_ERROR_ALLOW_INCLUDE_PRIV_H__ > +#include "virerrorpriv.h" >From consistency POV, you also want: #undefine __VIR_ERROR_ALLOW_INCLUDE_PRIV_H__ With the proposed adjustments: Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 03/10] util: error: Add error message versions with info for some error codes

2018-12-06 Thread Erik Skultety
nsistency we'll > provide them. s/we'll/we should Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 02/10] util: error: Fix error message strings to play well with additional info

2018-12-06 Thread Erik Skultety
On Thu, Dec 06, 2018 at 08:56:59AM +0100, Erik Skultety wrote: > On Wed, Dec 05, 2018 at 05:47:43PM +0100, Peter Krempa wrote: > > Additional information for a string is always in form of a string or s/for a string/for an error message s/always/either > > empty. Fix two offende

Re: [libvirt] [PATCH 02/10] util: error: Fix error message strings to play well with additional info

2018-12-05 Thread Erik Skultety
d-off-by: Peter Krempa > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 01/10] include: error: Add enum sentinel for virErrorNumber enum

2018-12-05 Thread Erik Skultety
changed, 6 insertions(+) Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] util: Fix the build on MinGW because of missing DT_CHR dirent type

2018-12-04 Thread Erik Skultety
Caused by commit 39480969 Signed-off-by: Erik Skultety --- Pushed under the build breaker rule. src/util/virutil.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index da12a11e04..279e6aedc0 100644 --- a/src/util/virutil.c +++ b/src/util

Re: [libvirt] [PATCH v3 01/11] util: Introduce virHostGetDRMRenderNode helper

2018-12-03 Thread Erik Skultety
On Mon, Dec 03, 2018 at 03:18:47PM +, Daniel P. Berrangé wrote: > On Thu, Nov 29, 2018 at 03:20:11PM +0100, Erik Skultety wrote: > > This is the first step towards libvirt picking the first available > > render node instead of QEMU. It also makes sense for us to be able to do

Re: [libvirt] [PATCH v3 11/11] qemu: command: gfx: egl-headless: Add 'rendernode' option to the cmdline

2018-12-03 Thread Erik Skultety
On Mon, Dec 03, 2018 at 09:49:28AM +0100, Ján Tomko wrote: > On Thu, Nov 29, 2018 at 03:20:21PM +0100, Erik Skultety wrote: > > Depending on whether QEMU actually supports the option, we can put the > > 'rendernode' on the '-display egl-headless' cmdline. > > > > S

[libvirt] [PATCH v3 09/11] qemu: cgroup: gfx: egl-headless: Add the DRI device into the cgroup list

2018-11-29 Thread Erik Skultety
Just like for SPICE, we need to put the render node DRI device into the device cgroup list so that users don't need to add it manually via qemu.conf file. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src

[libvirt] [PATCH v3 06/11] conf: gfx: Add egl-headless as a member to virDomainGraphicsDef struct

2018-11-29 Thread Erik Skultety
Since we need to specify the rendernode option onto QEMU cmdline, we need this union member to retain consistency in how we build the cmdline. Signed-off-by: Erik Skultety --- src/conf/domain_conf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf

[libvirt] [PATCH v3 10/11] security: dac: gfx: egl-headless: Relabel the DRI device

2018-11-29 Thread Erik Skultety
Just like for SPICE, we need to change the permissions on the DRI device used as the @rendernode for egl-headless graphics type. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/security

[libvirt] [PATCH v3 11/11] qemu: command: gfx: egl-headless: Add 'rendernode' option to the cmdline

2018-11-29 Thread Erik Skultety
Depending on whether QEMU actually supports the option, we can put the 'rendernode' on the '-display egl-headless' cmdline. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 32 --- ...egl-headless-rendernode.x86_64-latest.args | 31

[libvirt] [PATCH v3 03/11] qemu: process: spice: Pick the first available DRM render node

2018-11-29 Thread Erik Skultety
it shouldn't be libvirt picking the DRM render node instead of QEMU, that way (and because we're using namespaces by default), we can safely relabel the device within the namespace. Signed-off-by: Erik Skultety --- src/qemu/qemu_process.c | 22 +++- src/util

[libvirt] [PATCH v3 00/11] Autoselect a DRM node for egl-headless add it to cmdline

2018-11-29 Thread Erik Skultety
tests to CAPS_LATEST only which would also be wrong because QEMU can still pick a DRM node so that's a valid use case (not a practical one though) - the 3.1.0 capabilities patch was merged separately Erik Skultety (11): util: Introduce virHostGetDRMRenderNode helper conf: Introduce

[libvirt] [PATCH v3 01/11] util: Introduce virHostGetDRMRenderNode helper

2018-11-29 Thread Erik Skultety
. The algorithm used for that is essentially the same as the one QEMU uses. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virutil.c | 53 src/util/virutil.h | 2 ++ 3 files changed, 56 insertions(+) diff --git a/src

[libvirt] [PATCH v3 05/11] qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability

2018-11-29 Thread Erik Skultety
Now that we have QAPI introspection of display types in QEMU upstream, we can check whether the 'rendernode' option is supported with egl-headless display type. Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[libvirt] [PATCH v3 07/11] conf: gfx: egl-headless: Introduce a new subelement

2018-11-29 Thread Erik Skultety
further down the road. Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 11 +++-- docs/schemas/domaincommon.rng | 17 +-- src/conf/domain_conf.c| 45 ++- src/qemu/qemu_process.c | 16

[libvirt] [PATCH v3 04/11] qemu: command: Introduce qemuBuildGraphicsEGLHeadlessCommandLine helper

2018-11-29 Thread Erik Skultety
We're going to need a bit more logic for egl-headless down the road so prepare a helper just like for the other display types. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH v3 02/11] conf: Introduce virDomainGraphics-related helpers

2018-11-29 Thread Erik Skultety
A few simple helpers that allow us to determine whether a graphics can and will need to make use of a DRM render node. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 41 src/conf/domain_conf.h | 9 + src/libvirt_private.syms | 3

[libvirt] [PATCH v3 08/11] qemu: domain: egl-headless: Add the DRI device into the namespace

2018-11-29 Thread Erik Skultety
Just like for SPICE, we need to put the DRI device into the namespace, otherwise it will be left out from the DAC relabeling process. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src

Re: [libvirt] [PATCH v2 00/13] Autoselect a DRM node for egl-headless and add it to cmdline

2018-11-29 Thread Erik Skultety
On Wed, Nov 28, 2018 at 02:38:10PM +0100, Erik Skultety wrote: > Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1628892. > The problem is that we didn't put the DRI device into the namespace for QEMU > to > access, but that was only a part of the issue. The other part

Re: [libvirt] [PATCH 1/2] qemu: Save qemuDomainGetStats error

2018-11-28 Thread Erik Skultety
On Wed, Nov 28, 2018 at 12:28:21PM +, Daniel P. Berrangé wrote: > On Wed, Nov 28, 2018 at 01:26:17PM +0100, Erik Skultety wrote: > > On Wed, Nov 28, 2018 at 12:08:51PM +, Daniel P. Berrangé wrote: > > > On Wed, Nov 28, 2018 at 12:49:14PM +0100, Erik Skultety wrote: >

Re: [libvirt] [PATCH v2 06/13] squash into rendernode capability patch

2018-11-28 Thread Erik Skultety
On Wed, Nov 28, 2018 at 03:13:29PM +0100, Peter Krempa wrote: > On Wed, Nov 28, 2018 at 14:38:16 +0100, Erik Skultety wrote: > > Signed-off-by: Erik Skultety > > This needs to be commited as a separate patch adding the caps and not > squashed into any random capability addi

[libvirt] [PATCH v2 05/13] qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability

2018-11-28 Thread Erik Skultety
Now that we have QAPI introspection of display types in QEMU upstream, we can check whether the 'rendernode' option is supported with egl-headless display type. Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3

[libvirt] [PATCH v2 12/13] security: dac: gfx: egl-headless: Relabel the DRI device

2018-11-28 Thread Erik Skultety
Just like for SPICE, we need to change the permissions on the DRI device used as the @rendernode for egl-headless graphics type. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/security

[libvirt] [PATCH v2 13/13] qemu: command: gfx: egl-headless: Add 'rendernode' option to the cmdline

2018-11-28 Thread Erik Skultety
-by: Erik Skultety --- src/qemu/qemu_command.c | 29 --- ...graphics-egl-headless-rendernode-auto.args | 26 + .../graphics-egl-headless-rendernode-auto.xml | 1 + .../graphics-egl-headless.args| 2 +- .../graphics-spice-egl

[libvirt] [PATCH v2 04/13] qemu: command: Introduce qemuBuildGraphicsEGLHeadlessCommandLine helper

2018-11-28 Thread Erik Skultety
We're going to need a bit more logic for egl-headless down the road so prepare a helper just like for the other display types. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH v2 07/13] conf: gfx: Add egl-headless as a member to virDomainGraphicsDef struct

2018-11-28 Thread Erik Skultety
Since we need to specify the rendernode option onto QEMU cmdline, we need this union member to retain consistency in how we build the cmdline. Signed-off-by: Erik Skultety --- src/conf/domain_conf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf

[libvirt] [PATCH v2 03/13] qemu: process: spice: Pick the first available DRM render node

2018-11-28 Thread Erik Skultety
it shouldn't be libvirt picking the DRM render node instead of QEMU, that way (and because we're using namespaces by default), we can safely relabel the device within the namespace. Signed-off-by: Erik Skultety --- src/qemu/qemu_process.c | 14 +++ src/util/virutil.h

[libvirt] [PATCH v2 02/13] conf: Introduce virDomainGraphics-related helpers

2018-11-28 Thread Erik Skultety
A few simple helpers that allow us to determine whether a graphics can and will need to make use of a DRM render node. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 41 src/conf/domain_conf.h | 9 + src/libvirt_private.syms | 3

[libvirt] [PATCH v2 11/13] qemu: cgroup: gfx: egl-headless: Add the DRI device into the cgroup list

2018-11-28 Thread Erik Skultety
Just like for SPICE, we need to put the render node DRI device into the device cgroup list so that users don't need to add it manually via qemu.conf file. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src

[libvirt] [PATCH v2 09/13] qemu: process: gfx: egl-headless: Pick the first available DRM node

2018-11-28 Thread Erik Skultety
Just like for SPICE, pick the first available DRM render node for egl-headless. Signed-off-by: Erik Skultety --- src/qemu/qemu_process.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f3d194b0ce..bb2b8e8358

[libvirt] [PATCH v2 10/13] qemu: domain: egl-headless: Add the DRI device into the namespace

2018-11-28 Thread Erik Skultety
Just like for SPICE, we need to put the DRI device into the namespace, otherwise it will be left out from the DAC relabeling process. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src

[libvirt] [PATCH v2 08/13] conf: gfx: egl-headless: Introduce a new subelement

2018-11-28 Thread Erik Skultety
further down the road. Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 11 +++-- docs/schemas/domaincommon.rng | 17 +-- src/conf/domain_conf.c| 45 ++- .../graphics-egl-headless-rendernode.xml | 33

[libvirt] [PATCH v2 01/13] util: Introduce virHostGetDRMRenderNode helper

2018-11-28 Thread Erik Skultety
. The algorithm used for that is essentially the same as the one QEMU uses. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virutil.c | 53 src/util/virutil.h | 2 ++ 3 files changed, 56 insertions(+) diff --git a/src

[libvirt] [PATCH v2 00/13] Autoselect a DRM node for egl-headless and add it to cmdline

2018-11-28 Thread Erik Skultety
- provided more test cases as requested - added a new XML sub-element for egl-headless graphics type Erik Skultety (13): util: Introduce virHostGetDRMRenderNode helper conf: Introduce virDomainGraphics-related helpers qemu: process: spice: Pick the first available DRM render node qemu: command

Re: [libvirt] [PATCH 1/2] qemu: Save qemuDomainGetStats error

2018-11-28 Thread Erik Skultety
On Wed, Nov 28, 2018 at 12:08:51PM +, Daniel P. Berrangé wrote: > On Wed, Nov 28, 2018 at 12:49:14PM +0100, Erik Skultety wrote: > > On Tue, Nov 27, 2018 at 11:23:22AM -0500, John Ferlan wrote: > > > During qemuConnectGetAllDomainStats if qemuDomainGetStats causes > >

Re: [libvirt] [PATCH 1/2] qemu: Save qemuDomainGetStats error

2018-11-28 Thread Erik Skultety
On Tue, Nov 27, 2018 at 11:23:22AM -0500, John Ferlan wrote: > During qemuConnectGetAllDomainStats if qemuDomainGetStats causes > a failure, then when collecting more than one domain's worth of > statistics the loop in virDomainStatsRecordListFree would call > virDomainFree which would call

[libvirt] [PATCH 04/12] qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability

2018-11-22 Thread Erik Skultety
Now that we have QAPI introspection of display types in QEMU upstream, we can check whether the 'rendernode' option is supported with egl-headless display type. Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3

[libvirt] [PATCH 03/12] qemu: caps: Start probing for egl-headless display type

2018-11-22 Thread Erik Skultety
-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fde27010e4..90b76db034 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu

[libvirt] [PATCH 10/12] security: dac: Relabel the DRI render device for egl-headless too

2018-11-22 Thread Erik Skultety
Just like for SPICE, we need to change the permissions on the DRI device used as the @rendernode for egl-headless graphics type. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/security

[libvirt] [PATCH 00/12] Autoselect a DRM node for egl-headless and add it to cmdline

2018-11-22 Thread Erik Skultety
hus having a subelement for egl-headless type is rather confusing Erik Skultety (12): util: Introduce virHostGetDRMRenderNode helper qemu: command: spice: Pick the first available DRM render node qemu: caps: Start probing for egl-headless display type qemu: caps: Introduce QEMU_EGL_HEADLESS_

[libvirt] [PATCH 08/12] qemu: cgroup: Add the DRI device to the cgroup list for egl-headless too

2018-11-22 Thread Erik Skultety
Just like for SPICE, we need to put the render node DRI device into the the cgroup list so that users don't need to add it manually via qemu.conf file. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH 12/12] docs: Provide a news update for libvirt being able to pick a DRI device

2018-11-22 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/news.xml | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4406aeb775..0a98e5b963 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -70,6 +70,19 @@ + + + Start

[libvirt] [PATCH 11/12] tests: Add a test case for the egl-headless' rendernode option

2018-11-22 Thread Erik Skultety
We don't need a new input source, hence the symlink, we just need a new .args output, since the functionality is determined by a QEMU capability. Signed-off-by: Erik Skultety --- src/util/virutil.h| 2 +- ...cs-egl-headless-rendernode-autoselect.args | 26

[libvirt] [PATCH 07/12] qemu: domain: Put the egl-headless' rendernode device into the namespace

2018-11-22 Thread Erik Skultety
Just like for SPICE, we need to put the DRI device into the namespace, otherwise it will be left out from the DAC relabeling process. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH 02/12] qemu: command: spice: Pick the first available DRM render node

2018-11-22 Thread Erik Skultety
it shouldn't be libvirt picking the DRM render node instead of QEMU, that way (and because we're using namespaces by default), we can safely relabel the device within the namespace. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 25 +++-- 1 file changed, 15 insertions

[libvirt] [PATCH 01/12] util: Introduce virHostGetDRMRenderNode helper

2018-11-22 Thread Erik Skultety
. The algorithm used for that is essentially the same as the one QEMU uses. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virutil.c | 53 src/util/virutil.h | 2 ++ 3 files changed, 56 insertions(+) diff --git a/src

[libvirt] [PATCH 05/12] qemu: command: Introduce qemuBuildGraphicsEGLHeadlessCommandLine helper

2018-11-22 Thread Erik Skultety
We're going to need a bit more logic for egl-headless down the road so prepare a helper just like for the other display types. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH 06/12] conf: Add egl-headless to virDomainGraphicsDef union

2018-11-22 Thread Erik Skultety
Since we need to specify the rendernode option onto QEMU cmdline, we need this union member to retain consistency in how we build the cmdline. Signed-off-by: Erik Skultety --- src/conf/domain_conf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf

[libvirt] [PATCH 09/12] command: Put the 'rendernode' option onto egl-headless graphics cmdline

2018-11-22 Thread Erik Skultety
Depending on whether QEMU actually supports the option, we need to pick the first available rendernode first. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/qemu

Re: [libvirt] [PATCH v2] security: aa-helper: fix static defined vfio MDEVs

2018-11-22 Thread Erik Skultety
. > > Signed-off-by: Christian Ehrhardt > Reviewed-by: Erik Skultety > Reviewed-by: Boris Fiuczynski > --- I'm sorry if I sounded like I need to see a v2, I just wanted to give other people time to look at it too before I merge it. Anyhow, I merged the patch. Thanks, Erik -- li

Re: [libvirt] [PATCH] security: aa-helper: fix static defined vfio MDEVs

2018-11-22 Thread Erik Skultety
06afafb. > > Signed-off-by: Christian Ehrhardt > --- Apart from the tiny typographical nit pick I had - you don't even need to agree to them as I'm not a native speaker myself - I don't see a functional problem with the patch from libvirt's perspective, so: Reviewed-by: Erik Skultety

Re: [libvirt] [PATCH v3 2/2] util: Fix virDoes*Exist return typ

2018-11-20 Thread Erik Skultety
On Mon, Nov 19, 2018 at 10:35:57PM +0100, Martin Kletzander wrote: > Since the functions only return 0 or 1, they should return bool. I missed the > change when "refactoring" the first commit. > > Signed-off-by: Martin Kletzander > --- Reviewed-by: Erik Skultety --

Re: [libvirt] [PATCH v3 1/2] qemu: Fix virDoes*Exist usage

2018-11-20 Thread Erik Skultety
On Mon, Nov 19, 2018 at 10:35:56PM +0100, Martin Kletzander wrote: > The virGet*ID() functions should be called only if the user exists not when it > doesn't. > > Signed-off-by: Martin Kletzander > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@r

Re: [libvirt] [PATCH] docs: remove redundant words and blank lines

2018-11-19 Thread Erik Skultety
ait for a second revision which leads me to the next thing - this patch should have been sent with the -v2 prefix to reflect the aforementioned fact. I added a short commit message and pushed the patch with: Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com ht

[libvirt] [libvirt-go PATCH] build: Fix the go build caused by a missing commentary end sequence

2018-11-14 Thread Erik Skultety
Commit 20ab0c4d added a new constant to reflect recent libvirt upstream changes. However, it also introduced a tiny typo which caused the build to fail. Signed-off-by: Erik Skultety --- Pushed both under trivial and build-breaker rules. domain_compat.h | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCHv2] libvirt: add daemon itself as shutdown reason

2018-11-13 Thread Erik Skultety
nt. > > This action would occur during reconnection when processing > encounters an error once the monitor reconnection is successful. > > Signed-off-by: Nikolay Shirokovskiy > Reviewed-by: John Ferlan > --- FWIW: Reviewed-by: Erik Skultety -- libvir-list mailing list

Re: [libvirt] [PATCH] util: fix handling of unspecified port in URI

2018-11-13 Thread Erik Skultety
en the server name is not provided. This was a reasonable > assumption, but none the less libvirt did look at it :-) > > The fix is to ensure we explicitly set port to 0 when server name > is not present, avoiding undefined behaviour for the port field in > libxml2. > > Signed-off-by: Dani

Re: [libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-13 Thread Erik Skultety
On Tue, Nov 13, 2018 at 10:02:43AM +0100, Boris Fiuczynski wrote: > On 11/13/18 9:22 AM, Erik Skultety wrote: > > On Mon, Nov 12, 2018 at 05:39:38PM +0100, Boris Fiuczynski wrote: > > > On 11/12/18 1:14 PM, Erik Skultety wrote: > > > > Even though commit 11708641 c

Re: [libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-13 Thread Erik Skultety
On Mon, Nov 12, 2018 at 04:28:09PM +0100, Boris Fiuczynski wrote: > On 11/12/18 1:14 PM, Erik Skultety wrote: > > Since we'll need to validate other models apart from VFIO PCI too, > > having a helper for each model should keep the code base cleaner. > > > > S

Re: [libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-13 Thread Erik Skultety
On Mon, Nov 12, 2018 at 05:39:38PM +0100, Boris Fiuczynski wrote: > On 11/12/18 1:14 PM, Erik Skultety wrote: > > Even though commit 11708641 claims that a domain is allowed have a > > single VFIO AP hostdev only, this is a limitation posed by the platform > > vendor on p

Re: [libvirt] [PATCH v2] conf: Add new module node_device_util

2018-11-12 Thread Erik Skultety
On Mon, Nov 12, 2018 at 03:25:02PM +0100, Michal Privoznik wrote: > On 11/12/2018 12:56 PM, Erik Skultety wrote: > > There's a lot of stuff going on in src/conf/nodedev_conf which is > > sometimes not directly related to config and we're not really consistent > > with putting

Re: [libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-12 Thread Erik Skultety
On Mon, Nov 12, 2018 at 03:03:34PM +0100, Marc Hartmayer wrote: > On Mon, Nov 12, 2018 at 01:14 PM +0100, Erik Skultety > wrote: > > Since we'll need to validate other models apart from VFIO PCI too, > > having a helper for each model should keep the code base cleaner.

[libvirt] [PATCH 0/2] Don't perform the vfio-ap mdev validation in post parse

2018-11-12 Thread Erik Skultety
Move the respective bits to QEMU validation code instead. Erik Skultety (2): qemu: Extract MDEV VFIO PCI validation code into a separate helper conf: Move VFIO AP validation from post parse to QEMU validation code src/conf/domain_conf.c | 28 --- src/qemu/qemu_domain.c | 61

[libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-12 Thread Erik Skultety
device migration to slightly older libvirt, there would be most probably a driver mismatch that would render the migration impossible anyway. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 28 src/qemu/qemu_domain.c | 28 +++- 2 files

[libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-12 Thread Erik Skultety
Since we'll need to validate other models apart from VFIO PCI too, having a helper for each model should keep the code base cleaner. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 35 +-- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git

Re: [libvirt] [PATCH] nodedev: Add new module node_device_util

2018-11-12 Thread Erik Skultety
On Fri, Nov 02, 2018 at 03:30:56PM +0100, Michal Privoznik wrote: > On 11/01/2018 04:50 PM, Erik Skultety wrote: > > There's a lot of stuff going on in src/conf/nodedev_conf which not > > always has to do anything with config, so even though we're trying, > > we're not really

[libvirt] [PATCH v2] conf: Add new module node_device_util

2018-11-12 Thread Erik Skultety
-agnostic. Signed-off-by: Erik Skultety --- src/conf/Makefile.inc.am | 2 + src/conf/node_device_conf.c | 199 --- src/conf/node_device_conf.h | 11 -- src/conf/node_device_util.c | 229 +++ src/conf

Re: [libvirt] [PATCH] spec: Drop support for Fedora 27

2018-11-08 Thread Erik Skultety
ni > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] lxc: Clang is complaining about possible NULL pointer.

2018-11-05 Thread Erik Skultety
On Mon, Nov 05, 2018 at 04:58:14PM -0200, Julio Faracco wrote: > The array "mount" inside lxc_container is not being checked before for > loop. Clang syntax scan is complaining about this segmentation fault. Which in this specific case is a false positive since nmounts pretty much protects us

Re: [libvirt] [PATCH] qemu: Dissolve qemuBuildVhostuserCommandLine in qemuBuildInterfaceCommandLine

2018-11-04 Thread Erik Skultety
On Fri, Nov 02, 2018 at 04:01:44PM +0100, Michal Privoznik wrote: > On 11/02/2018 03:44 PM, Erik Skultety wrote: > > On Fri, Nov 02, 2018 at 01:56:17PM +0100, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1524230 > >> > >> The qemuBuil

Re: [libvirt] [PATCH] qemu: Dissolve qemuBuildVhostuserCommandLine in qemuBuildInterfaceCommandLine

2018-11-02 Thread Erik Skultety
IR_FREE(host); > -VIR_FREE(tapfdName); > -VIR_FREE(vhostfdName); > +VIR_FREE(nic); I don't see how ^this hunk made it better. If anything, then the VIR_FREEs should be probably coupled like: VIR_FREE(tapfd); VIR_FREE(tapfdName); VIR_FREE(vhostfd); VIR_FREE(vhostfdName); It would also need to be a separate patch. To the rest of the changes: Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2] nodedev: Document the udevEventHandleThread

2018-11-02 Thread Erik Skultety
On Fri, Nov 02, 2018 at 01:33:32PM +0100, Andrea Bolognani wrote: > On Fri, 2018-11-02 at 07:46 -0400, John Ferlan wrote: > > > > + * NB: Usage of event based socket algorithm causes some issues with > > > > + * older platforms such as CentOS 6 in which the data socket is opened > > > > > >

Re: [libvirt] [PATCH v2] nodedev: Document the udevEventHandleThread

2018-11-02 Thread Erik Skultety
On Fri, Nov 02, 2018 at 07:46:35AM -0400, John Ferlan wrote: > > > On 11/2/18 3:48 AM, Erik Skultety wrote: > > On Thu, Nov 01, 2018 at 01:48:39PM -0400, John Ferlan wrote: > >> Commit cdbe1332 neglected to document the API. So let's add some > >> details about

Re: [libvirt] [PATCH v2] nodedev: Document the udevEventHandleThread

2018-11-02 Thread Erik Skultety
On Thu, Nov 01, 2018 at 01:48:39PM -0400, John Ferlan wrote: > Commit cdbe1332 neglected to document the API. So let's add some > details about the algorithm and why it was used to help future > readers understand the issues encountered. Based largely off a > description provided by E

[libvirt] [PATCH] nodedev: Add new module node_device_util

2018-11-01 Thread Erik Skultety
to the nodedev driver and put a few helper APIs which want to open a secondary driver connection in there (similar to storage_util module). Signed-off-by: Erik Skultety --- I verified the build with debian 9, centos 7, fedora 28, rawhide, and freebsd 11 src/conf/Makefile.inc.am | 1

Re: [libvirt] [PATCH] qemu: Report warning if QoS is set for vhostuser interface

2018-11-01 Thread Erik Skultety
On Thu, Nov 01, 2018 at 02:07:21PM +0100, Michal Privoznik wrote: > On 11/01/2018 10:33 AM, Erik Skultety wrote: > > On Wed, Oct 31, 2018 at 04:47:45PM +0100, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1524230 > >> > >&g

Re: [libvirt] [PATCH] nodedev: Document the udevEventHandleThread

2018-11-01 Thread Erik Skultety
On Fri, Oct 19, 2018 at 08:04:43AM -0400, John Ferlan wrote: > Add details of the algorithm and why it was used to help future > readers understand the issues encountered. Based largely off a > description provided by Erik Skultety . Since the link to the archive would be missing from t

Re: [libvirt] [PATCH] qemu: Report warning if QoS is set for vhostuser interface

2018-11-01 Thread Erik Skultety
On Wed, Oct 31, 2018 at 04:47:45PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1524230 > > Because of historical reasons, we are not denying starting a > domain which has QoS set for unsupported type of device. We do > report just a warning instead. And even though

Re: [libvirt] [jenkins-ci PATCH v2 0/3] Add libvirt-ocaml

2018-10-31 Thread Erik Skultety
r upstream changes Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

<    1   2   3   4   5   6   7   8   9   10   >