Re: [libvirt] [PATCH 08/10] tests: qemucapabilities: Test commands used to query capabilities

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > Use qemuMonitorTestNewFromFileFull which allows to test commands used > along with providing replies. This has two advantages: > > 1) It's easier to see which command was used when looking at the files > 2) We check that the used commands are

Re: [libvirt] [PATCH 07/10] tests: qemucapsprobemock: Prepare 'qemucapsprobe' for the new format

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > Change the output of qemucapsprobe to record the commands used for > querying. This allows to easily identify which reply belongs to which > command and also will allow to test whether we use stable queries. Yay! So painful to try and matching

Re: [libvirt] [PATCH 01/13] conf: Add definitions for 'uid' and 'fid' PCI address attributes

2018-06-07 Thread Laine Stump
On 05/24/2018 08:24 AM, Xiao Feng Ren wrote: > From: Yi Min Zhao > > Add zPCI definitions in preparation of extending the PCI address > with parameters uid (user-defined identifier) and fid (PCI function > identifier). > > Signed-off-by: Yi Min Zhao > Reviewed-by: Boris Fiuczynski >

Re: [libvirt] [PATCH 08/13] conf: Introduce parser, formatter for uid and fid

2018-06-07 Thread Laine Stump
On 05/25/2018 07:05 AM, Pino Toscano wrote: > On Thursday, 24 May 2018 14:24:33 CEST Xiao Feng Ren wrote: >> From: Yi Min Zhao >> >> This patch introduces new XML parser/formatter functions. Uid is >> 16-bit and non-zero. Fid is 32-bit. They are added as two new >> attributes of PCI address, and

Re: [libvirt] [PATCH 05/10] tests: qemucapsprobemock: Simplify and extract skipping of empty lines

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > The prettyfied output may sometimes contain empty lines which would > desynchonize the test monitor workers. The skipping code can be much > simplified though. Also a extract it so so that it's obvious what > it's doing and can be reused. > >

Re: [libvirt] [PATCH 06/10] tests: qemucapsprobemock: Fail if JSON reply from qemu can't be reformatted

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > Rather than skipping output on failure fail loudly. > > Signed-off-by: Peter Krempa > --- > tests/qemucapsprobemock.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > Reviewed-by: John Ferlan John -- libvir-list mailing

Re: [libvirt] [PATCH 04/10] tests: qemumonitor: Optimize control flow when concatenating replies

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > The test file can be broken up by newlines and is automatically > concatenated back. Fix the control flow so that the concatenation code > 'continues' the loop rather than branching out. > > Also add an anotation to the concatenation code. > >

Re: [libvirt] [PATCH 03/10] tests: qemumonitor: Simplify handling of end of file in full file test

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > On EOF, the loop can be terminated right away since most of it is > skipped anyways and the handling of the last command is repeated after > the loop. > > Signed-off-by: Peter Krempa > --- > tests/qemumonitortestutils.c | 24

Re: [libvirt] [PATCH 02/10] tests: qemucapabilities: Reset command sequence before second probe

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > The test data for capabilities is obtained from two consecutive qemu > runs when the regular monitor object will be reset. Do the same for the > test monitor object which is not disposed between runs by calling > qemuMonitorResetCommandID. > >

Re: [libvirt] [PATCH 01/10] qemu: monitor: Add possibility to reset command sequence in tests

2018-06-07 Thread John Ferlan
On 06/04/2018 09:58 AM, Peter Krempa wrote: > qemucapabilitiestest for simplicity uses one test monitor object for > simulating work of two separate inquiries of the qemu process. To allow > better testing in the future it will be required to reset the counter > so that it accurately simulates

Re: [libvirt] [PATCH 10/10] Move host cache handling from conf/ to util/

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:31PM +0200, Martin Kletzander wrote: Introduce virCache{Info,Bank} as structures describing host cache information including the ways they can be managed by resctrl. This has couple of advantages. First and foremost the virResctrlAllocCreate() is no longer

Re: [libvirt] [PATCH 09/10] util: Remove cbm_mask from virResctrlInfoPerType

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:30PM +0200, Martin Kletzander wrote: It was used just temporarily to do a calculation, no need to keep that around. Also use virBitmap in the code instead of reimplementing two of its existing functions. And move the counting part next to where the value is read.

Re: [libvirt] [PATCH 08/10] Move virCacheKernel enum implemetation from conf/ to util/

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:29PM +0200, Martin Kletzander wrote: It will be used in that file later on, plus it makes sense for all the implementations to be in same place. Also comment each one of them nicely and add a comment explaining why they all need to end with the same _LAST value.

Re: [libvirt] [PATCH 07/10] util: Initialize virResctrlInfo struct right away

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:28PM +0200, Martin Kletzander wrote: There is no need to have virResctrlGetInfo() when it must be called after virResctrlInfoNew() anyway, otherwise it's just an unusable object. When we wrap the logic inside the New() function we'll save some calls later as well.

Re: [libvirt] [PATCH 06/10] util: Reorder parts of virresctrl

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:27PM +0200, Martin Kletzander wrote: Move description of the purpose of the file before any definition. One empty line between related enum definitions. All typedefs before all structs. This is exception from the usual, but not the only one, we already have

Re: [libvirt] [PATCH 05/10] util: Use virFileFlock() in virresctrl

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:26PM +0200, Martin Kletzander wrote: That way we get rid of the last preprocessor conditional so the code compiles on all platforms. Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 31 --- 1 file changed, 4 insertions(+), 27

Re: [libvirt] [PATCH 04/10] util: Avoid needless preprocessor conditionals in virresctrl

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:25PM +0200, Martin Kletzander wrote: By exporting virResctrlAllocMasksAssign() we can remove most of the conditionals. And that function should be used from the tests later anyway. I fail to see the relevance of exporting virResctrlAllocMasksAssign in this patch

Re: [libvirt] [PATCH 03/10] util: Introduce virFileFlock

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:24PM +0200, Martin Kletzander wrote: We already have virFileLock(), but we are now using flock() in the code as well (due to requirements for mutual exclusion between libvirt and other programs using flock() as well), so let's have a function for that as well so we

Re: [libvirt] [PATCH 02/10] util: Fix typo in error message %ud -> %u

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:23PM +0200, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: Digital signature -- libvir-list mailing list

Re: [libvirt] [PATCH 01/10] util: Rename resctrl to alloc if it is virResctrlAllocPtr

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:54:22PM +0200, Martin Kletzander wrote: Just to stay consistent. Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 64 +-- src/util/virresctrl.h | 6 ++-- 2 files changed, 35 insertions(+), 35 deletions(-)

Re: [libvirt] [PATCH v2] tests: qemuxml2argv: Make tests based on DO_TEST_CAPS_LATEST stable

2018-06-07 Thread John Ferlan
On 06/04/2018 09:43 AM, Peter Krempa wrote: > To avoid problems with test cases specifying an alias machine type which > would change once capabilities for a newer version are added strip all > alias machine types for the DO_TEST_CAPS_LATEST based tests. > > Signed-off-by: Peter Krempa > ---

Re: [libvirt] [PATCH 10/10] util: storage: remove 'allow_probe' from virStorageFileGetMetadata

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:52AM +0200, Peter Krempa wrote: All callers pass 'false' now so it's no longer needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 4 +--- src/security/virt-aa-helper.c | 2 +- src/util/virstoragefile.c | 18 +++---

Re: [libvirt] [PATCH] Add Virtlyst web application to apps.html

2018-06-07 Thread John Ferlan
On 06/04/2018 02:44 PM, Daniel Nicoletti wrote: > Signed-off-by: Daniel Nicoletti > --- > docs/apps.html.in | 15 +++ > 1 file changed, 15 insertions(+) > ACK'd and pushed, Tks, John -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 09/10] tests: storage: Drop duplicate tests with TEST_CHAIN

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:51AM +0200, Peter Krempa wrote: Now that all test cases with TEST_CHAIN were testing the same thing twice drop one of them. Note that some of the cases were duplicate even before dropping the image format probing tests. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH 08/10] tests: storage: Drop format probing from tests

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:50AM +0200, Peter Krempa wrote: Storage drivers now don't allow it so there's no need to test it. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH 1/4] qemu: Move checks for SMM from command-line creation into validation phase

2018-06-07 Thread Martin Kletzander
On Thu, Jun 07, 2018 at 11:09:41PM +0200, Ján Tomko wrote: On Thu, Jun 07, 2018 at 11:04:48PM +0200, Martin Kletzander wrote: On Thu, Jun 07, 2018 at 09:31:50PM +0200, Ján Tomko wrote: The commit summary speaks of moving checks, but the commit actually relaxes them. I would not expect

Re: [libvirt] [PATCH 4/4] qemu: Add support for setting the TSEG size

2018-06-07 Thread Martin Kletzander
On Thu, Jun 07, 2018 at 09:58:04PM +0200, Ján Tomko wrote: On Thu, Jun 07, 2018 at 10:37:43AM +0200, Martin Kletzander wrote: The default is stable per machine type so there should be no need to keep that. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1469338 Signed-off-by: Martin

Re: [libvirt] [PATCH 07/10] tests: storage: Absorb ALLOW_PROBE flag into the TEST_CHAIN macro

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:49AM +0200, Peter Krempa wrote: The second set of arguments for TEST_CHAIN always specifies the 'ALLOW_PROBE' flag. Make it part of the macro. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 48 1 file

Re: [libvirt] [PATCH 1/4] qemu: Move checks for SMM from command-line creation into validation phase

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 11:04:48PM +0200, Martin Kletzander wrote: On Thu, Jun 07, 2018 at 09:31:50PM +0200, Ján Tomko wrote: The commit summary speaks of moving checks, but the commit actually relaxes them. I would not expect functional changes from that message. How about: qemu: relax and

Re: [libvirt] [PATCH 4/4] qemu: Add support for setting the TSEG size

2018-06-07 Thread Martin Kletzander
On Thu, Jun 07, 2018 at 10:14:38PM +0200, Laszlo Ersek wrote: On 06/07/18 21:58, Ján Tomko wrote: Does a size of 0 MiB make sense? It's divisible by 1 MiB. "-global mch.extended-tseg-mbytes=0" makes QEMU behave as if it lacked the extended TSEG feature; the guest will believe that only the

Re: [libvirt] [PATCH 06/10] tests: virstoragetest: Add complementary test case for QED format

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:48AM +0200, Peter Krempa wrote: We have a test case for QED disk image with autodetection but not with the format explicitly specified. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 05/10] security: aa-helper: Remove the -p parameter

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:47AM +0200, Peter Krempa wrote: As the aa-helper binary is supposed to be used only with libvirt, we can fully remove it. Signed-off-by: Peter Krempa --- src/security/virt-aa-helper.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-)

Re: [libvirt] [PATCH 04/10] security: Remove VIR_SECURITY_MANAGER_ALLOW_DISK_PROBE

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:46AM +0200, Peter Krempa wrote: Nothing is setting that flag now so it can be removed. Note that removing 'mgr' from 'load_profile' in the apparmor driver would create a lot of churn. Signed-off-by: Peter Krempa --- src/security/security_apparmor.c | 6 ++

Re: [libvirt] [PATCH 1/4] qemu: Move checks for SMM from command-line creation into validation phase

2018-06-07 Thread Martin Kletzander
On Thu, Jun 07, 2018 at 09:31:50PM +0200, Ján Tomko wrote: The commit summary speaks of moving checks, but the commit actually relaxes them. I would not expect functional changes from that message. How about: qemu: relax and move SMM checks to validation phase Here you suggest changing the

Re: [libvirt] [PATCH 03/10] qemu: driver: Remove impossible code path in qemuDomainSnapshotCreateInactiveExternal

2018-06-07 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:45AM +0200, Peter Krempa wrote: Previous patch naively removed all code relevant to disk format checking. The semantics now dictate that the format check when creating external snapshots is now impossible as we always fill in the format for disks in domain

Re: [libvirt] [PATCH] nwfilter: fix build error when pcap-config is not present

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:46:27PM -0500, Brijesh Singh wrote: The compilation fails with the following error when pcap-config is not present on the host: nwfilter/nwfilter_learnipaddr.c:824:1: error: conflicting types for 'virNWFilterLearnIPAddress'

[libvirt] [PATCH] nwfilter: fix build error when pcap-config is not present

2018-06-07 Thread Brijesh Singh
The compilation fails with the following error when pcap-config is not present on the host: nwfilter/nwfilter_learnipaddr.c:824:1: error: conflicting types for 'virNWFilterLearnIPAddress' virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver ATTRIBUTE_UNUSED, In file included from

Re: [libvirt] [PATCH 4/4] qemu: Add support for setting the TSEG size

2018-06-07 Thread Laszlo Ersek
On 06/07/18 21:58, Ján Tomko wrote: > Does a size of 0 MiB make sense? It's divisible by 1 MiB. "-global mch.extended-tseg-mbytes=0" makes QEMU behave as if it lacked the extended TSEG feature; the guest will believe that only the standard 1 / 2 / 8 MB TSEG sizes are available, and pick one of

Re: [libvirt] [PATCH 5/4] docs: Add TSEG support info into news.xml

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 03:59:58PM +0200, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- docs/news.xml | 8 1 file changed, 8 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 4/4] qemu: Add support for setting the TSEG size

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 10:37:43AM +0200, Martin Kletzander wrote: The default is stable per machine type so there should be no need to keep that. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1469338 Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c|

Re: [libvirt] [PATCH v9 06/17] qemu: Extend QEMU with external TPM support

2018-06-07 Thread bushuanshuan
... > +static int > +qemuExtTPMStartEmulator(virQEMUDriverPtr driver, > +virDomainDefPtr def, > +qemuDomainLogContextPtr logCtxt) > +{ ... > +if (!(cmd = qemuTPMEmulatorBuildCommand(tpm, def->name, def->uuid, > +

Re: [libvirt] [PATCH 3/4] qemu: Add capability flag for setting the extended tseg size

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 10:37:42AM +0200, Martin Kletzander wrote: For getting the reply I queried the newest and oldest QEMU using test/qemucapsprobe. From the differences I only extracted the reply to the new QMP command and discarded the rest. For all the versions below the one which added

Re: [libvirt] [PATCH 2/4] conf, schema, docs: Add support for TSEG size setting

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 10:37:41AM +0200, Martin Kletzander wrote: TSEG (Top of Memory Segment) is one of many regions that SMM (System Management Mode) can occupy. This one, however is special, because a) most of the SMM code lives in TSEG nowadays and b) QEMU just (well, some time ago) added

[libvirt] [PATCH v1 20/21] util: bitmap: remove redundant include directive

2018-06-07 Thread Sukrit Bhatnagar
The include directive for viralloc.h is added in virbitmap.h in the previous patch. --- src/util/virbitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 0cc5292..ef18dad 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -31,7

[libvirt] [PATCH v1 21/21] util: bitmap: use VIR_AUTOPTR for aggregate types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOPTR macro, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virbitmap.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-)

[libvirt] [PATCH v1 15/21] util: json: remove redundant include directive

2018-06-07 Thread Sukrit Bhatnagar
The include directive for viralloc.h is added in virjson.h in the previous patch. --- src/util/virjson.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index 0559d40..92f3994 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -24,7 +24,6 @@

[libvirt] [PATCH v1 19/21] util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-06-07 Thread Sukrit Bhatnagar
Using the VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. --- src/util/virbitmap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[libvirt] [PATCH v1 18/21] util: identity: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/viridentity.c | 54 -- 1 file changed,

[libvirt] [PATCH v1 16/21] util: json: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virjson.c | 29 + 1 file changed, 9 insertions(+), 20

[libvirt] [PATCH v1 17/21] util: json: use VIR_AUTOPTR for aggregate types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOPTR macro, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virjson.c | 15 --- 1 file changed, 4 insertions(+), 11

[libvirt] [PATCH v1 13/21] util: auth: use VIR_AUTOPTR for aggregate types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOPTR macro, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virauth.c | 15 +-- 1 file changed, 5 insertions(+), 10

[libvirt] [PATCH v1 09/21] util: authconfig: remove redundant include directive

2018-06-07 Thread Sukrit Bhatnagar
The include directive for viralloc.h is added in virauthconfig.h in the previous patch. --- src/util/virauthconfig.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 91c9c0c..3487cc2 100644 --- a/src/util/virauthconfig.c +++

[libvirt] [PATCH v1 12/21] util: auth: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virauth.c | 45 + 1 file changed, 13

[libvirt] [PATCH v1 14/21] util: json: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-06-07 Thread Sukrit Bhatnagar
Using the VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. --- src/util/virjson.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[libvirt] [PATCH v1 08/21] util: authconfig: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-06-07 Thread Sukrit Bhatnagar
Using the VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. --- src/util/virauthconfig.h | 3 +++ 1 file changed, 3 insertions(+) diff

[libvirt] [PATCH v1 05/21] util: fcp: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virfcp.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-)

[libvirt] [PATCH v1 11/21] util: auth: remove redundant include directive

2018-06-07 Thread Sukrit Bhatnagar
The include directive for viralloc.h is added in virauthconfig.h in a previous patch. --- src/util/virauth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virauth.c b/src/util/virauth.c index adb093e..c6a2ce7 100644 --- a/src/util/virauth.c +++ b/src/util/virauth.c @@ -26,7 +26,6 @@

[libvirt] [PATCH v1 10/21] util: authconfig: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virauthconfig.c | 34 -- 1 file changed, 12

[libvirt] [PATCH v1 04/21] util: audit: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/viraudit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[libvirt] [PATCH v1 07/21] util: filecache: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virfilecache.c | 35 +++ 1 file changed, 11

[libvirt] [PATCH v1 06/21] util: eventpoll: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/vireventpoll.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

[libvirt] [PATCH v1 03/21] util: iohelper: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/iohelper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[libvirt] [PATCH v1 01/21] add macros for implementing automatic cleanup functionality

2018-06-07 Thread Sukrit Bhatnagar
New macros are added to src/util/viralloc.h which help in adding GCC's cleanup attribute to variable declarations. --- src/util/viralloc.h | 68 + 1 file changed, 68 insertions(+) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index

[libvirt] [PATCH v1 00/21] use GCC's cleanup attribute in src/util

2018-06-07 Thread Sukrit Bhatnagar
This series of patches introduces a new set of macros which help in using GCC's __attribute__((cleanup)) in the code. Then the patches modify a few files in src/util to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory and get rid of some VIR_FREE macro invocations and *Free

[libvirt] [PATCH v1 02/21] util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-06-07 Thread Sukrit Bhatnagar
By making use of the GCC's __attribute__((cleanup)) handled by VIR_AUTOFREE macro, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. --- src/util/virarptable.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-)

Re: [libvirt] [PATCH 1/4] qemu: Move checks for SMM from command-line creation into validation phase

2018-06-07 Thread Ján Tomko
The commit summary speaks of moving checks, but the commit actually relaxes them. I would not expect functional changes from that message. How about: qemu: relax and move SMM checks to validation phase On Thu, Jun 07, 2018 at 10:37:40AM +0200, Martin Kletzander wrote: We are still hoping all

Re: [libvirt] [PATCH 2/4] conf, schema, docs: Add support for TSEG size setting

2018-06-07 Thread Laszlo Ersek
On 06/07/18 10:37, Martin Kletzander wrote: > TSEG (Top of Memory Segment) is one of many regions that SMM (System > Management > Mode) can occupy. This one, however is special, because a) most of the SMM > code > lives in TSEG nowadays and b) QEMU just (well, some time ago) added support >

Re: [libvirt] [PATCH 07/13] qemu: Add hotpluging support for PCI devices on S390 guests

2018-06-07 Thread Laine Stump
On 05/29/2018 05:04 AM, Cornelia Huck wrote: > On Mon, 28 May 2018 16:26:57 +0800 > Xiao Feng Ren wrote: > >> On 5/25/2018 6:22 PM, Bjoern Walk wrote: >>> Cornelia Huck [2018-05-24, 06:25PM +0200]: On Thu, 24 May 2018 14:24:32 +0200 Xiao Feng Ren wrote: > From: Yi Min

Re: [libvirt] [PATCH v8 08/11] qemu: add support to launch SEV guest

2018-06-07 Thread Ján Tomko
On Wed, Jun 06, 2018 at 12:50:14PM -0500, Brijesh Singh wrote: QEMU >= 2.12 provides 'sev-guest' object which is used to launch encrypted VMs on AMD platform using SEV feature. The various inputs required to launch SEV guest is provided through the tag. A typical SEV guest launch command line

Re: [libvirt] [PATCH v8 09/11] libvirt: add new public API to get launch security info

2018-06-07 Thread Ján Tomko
On Thu, Jun 07, 2018 at 11:54:30AM -0500, Brijesh Singh wrote: On 06/07/2018 11:46 AM, Erik Skultety wrote: Better commit subject would be: libvirt: Introduce virDomainGetLaunchSecurityInfo public API On Wed, Jun 06, 2018 at 12:50:15PM -0500, Brijesh Singh wrote: The API can be used outside

Re: [libvirt] [PATCH v9 13/17] security: Add swtpm paths to the domain's AppArmor profile

2018-06-07 Thread Stefan Berger
On 06/04/2018 11:46 AM, Stefan Berger wrote: This patch extends the AppArmor domain profile with file paths the swtpm accesses for state, log, pid, and socket files. Both, QEMU and swtpm, use this AppArmor profile. Signed-off-by: Stefan Berger Cc: Christian Ehrhardt After the recent

Re: [libvirt] [PATCH v8 09/11] libvirt: add new public API to get launch security info

2018-06-07 Thread Brijesh Singh
On 06/07/2018 11:46 AM, Erik Skultety wrote: Better commit subject would be: libvirt: Introduce virDomainGetLaunchSecurityInfo public API On Wed, Jun 06, 2018 at 12:50:15PM -0500, Brijesh Singh wrote: The API can be used outside the libvirt to get the launch security information. When SEV

Re: [libvirt] [PATCH v8 0/9] x86: Secure Encrypted Virtualization (AMD)

2018-06-07 Thread Erik Skultety
> Change since v7: > * rename virNodeSEVCapability() -> virNodeSEVInfo() > * rebase the series The series looked solid, I found minor nits to which I provided you with a squash-in diff so that you don't have to spend any more time on it, I had a functional comment to patch 5 - might not work

Re: [libvirt] [PATCH v8 05/11] qemu: Add support to get the SEV info

2018-06-07 Thread Brijesh Singh
On 06/07/2018 11:37 AM, Erik Skultety wrote: more verbose commit subject: qemu: Implement the driver backend for virNodeGetSEVInfo On Wed, Jun 06, 2018 at 12:50:11PM -0500, Brijesh Singh wrote: Signed-off-by: Brijesh Singh <> --- src/qemu/qemu_capabilities.c | 7

Re: [libvirt] [PATCH v8 11/11] qemu: Add support to launch security info

2018-06-07 Thread Erik Skultety
Similarly to the NodeGetInfo, probably better subject: Implement the driver backend for virDomainGetLaunchSecurityInfo... On Wed, Jun 06, 2018 at 12:50:17PM -0500, Brijesh Singh wrote: > This patch implements the internal driver API for launch event into > qemu driver. When SEV is enabled,

Re: [libvirt] [PATCH v8 09/11] libvirt: add new public API to get launch security info

2018-06-07 Thread Erik Skultety
Better commit subject would be: libvirt: Introduce virDomainGetLaunchSecurityInfo public API On Wed, Jun 06, 2018 at 12:50:15PM -0500, Brijesh Singh wrote: > The API can be used outside the libvirt to get the launch security > information. When SEV is enabled, the API can be used to get the >

Re: [libvirt] [PATCH v8 07/11] qemu/cgroup: add /dev/sev in shared devices list

2018-06-07 Thread Erik Skultety
On Wed, Jun 06, 2018 at 12:50:13PM -0500, Brijesh Singh wrote: > QEMU uses /dev/sev device while creating the SEV guest, lets add /dev/sev > in the list of devices allowed to be accessed by the QEMU. > > Signed-off-by: Brijesh Singh <> > Reviewed-by: Erik Skultety > --- > docs/drvqemu.html.in

Re: [libvirt] [PATCH v8 06/11] conf: introduce launch-security element in domain

2018-06-07 Thread Erik Skultety
On Wed, Jun 06, 2018 at 12:50:12PM -0500, Brijesh Singh wrote: > The launch-security element can be used to define the security > model to use when launching a domain. Currently we support 'sev'. > > When 'sev' is used, the VM will be launched with AMD SEV feature enabled. > SEV feature supports

Re: [libvirt] [PATCH v8 05/11] qemu: Add support to get the SEV info

2018-06-07 Thread Erik Skultety
more verbose commit subject: qemu: Implement the driver backend for virNodeGetSEVInfo On Wed, Jun 06, 2018 at 12:50:11PM -0500, Brijesh Singh wrote: > Signed-off-by: Brijesh Singh <> > --- > src/qemu/qemu_capabilities.c | 7 > src/qemu/qemu_capabilities.h | 4 ++ > src/qemu/qemu_driver.c

Re: [libvirt] [PATCH v8 04/11] remote: implement the remote protocol for virNodeSEVInfo()

2018-06-07 Thread Erik Skultety
On Wed, Jun 06, 2018 at 12:50:10PM -0500, Brijesh Singh wrote: > Add remote support for virNodeSEVInfo(). virNodeGetSEVInfo() > > Signed-off-by: Brijesh Singh <> > --- > src/remote/remote_daemon_dispatch.c | 44 > + > src/remote/remote_driver.c | 40

Re: [libvirt] [PATCH v8 03/11] libvirt: add new public API to get SEV Info

2018-06-07 Thread Erik Skultety
A better commit subject would have been: libvirt: Introduce virNodeGetSEVInfo public API On Wed, Jun 06, 2018 at 12:50:09PM -0500, Brijesh Singh wrote: > The API can be used by application to retrieve the Platform Diffie-Hellman > Key and Platform Certificate chain. > > Signed-off-by: Brijesh

Re: [libvirt] [PATCH v8 02/11] conf: expose SEV feature in domain capabilities

2018-06-07 Thread Erik Skultety
On Wed, Jun 06, 2018 at 12:50:08PM -0500, Brijesh Singh wrote: > Extend hypervisor capabilities to include sev feature. When available, > hypervisor supports launching an encrypted VM on AMD platform. The > sev feature tag provides additional details like Platform Diffie-Hellman > (PDH) key and

Re: [libvirt] [PATCH v8 01/11] qemu: provide support to query the SEV capability

2018-06-07 Thread Erik Skultety
On Wed, Jun 06, 2018 at 12:50:07PM -0500, Brijesh Singh wrote: > QEMU version >= 2.12 provides support for launching an encrypted VMs on > AMD x86 platform using Secure Encrypted Virtualization (SEV) feature. > This patch adds support to query the SEV capability from the qemu. > > Signed-off-by:

[libvirt] [PATCH 1/4] travis: Skip macOS upgrade

2018-06-07 Thread Andrea Bolognani
Upgrading takes quite a bit of time, doesn't offer any real value and causes a lot of grief. Let's just skip it. We need to install xz explicitly now, since it's required to make dist and no longer being dragged in by Python 3. Signed-off-by: Andrea Bolognani --- .travis.yml | 4 +--- 1 file

[libvirt] [PATCH 2/4] travis: Don't duplicate Docker invocation

2018-06-07 Thread Andrea Bolognani
All variable parts are taken from the environment, so we can exploit inheritance and avoid duplication. This will become more important as we start building on additional platforms. Signed-off-by: Andrea Bolognani --- .travis.yml | 31 +++ 1 file changed, 11

[libvirt] [PATCH 4/4] travis: Rename DOCKER_CMD to LINUX_CMD

2018-06-07 Thread Andrea Bolognani
The new name is arguably more informative, especially now that we have MACOS_CMD and knowing that MINGW_CMD will likely be introduced at some point. Signed-off-by: Andrea Bolognani --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml

[libvirt] [PATCH 0/4] travis: Various cleanups

2018-06-07 Thread Andrea Bolognani
Just getting rid of some useless stuff and making the whole thing simpler and more consistent. Andrea Bolognani (4): travis: Skip macOS upgrade travis: Don't duplicate Docker invocation travis: Introduce MACOS_CMD travis: Rename DOCKER_CMD to LINUX_CMD .travis.yml | 65

[libvirt] [PATCH 3/4] travis: Introduce MACOS_CMD

2018-06-07 Thread Andrea Bolognani
It mirrors the existing DOCKER_CMD, both in how it's defined as part of the environment and how it's called by passing it directly to the shell. In addition to making the configuration more consistent, this also allows us to move from having the macOS build script divided into four steps, some of

Re: [libvirt] [PATCH v2 1/2] bhyve: add CPU topology support

2018-06-07 Thread Roman Bogorodskiy
John Ferlan wrote: > On 06/07/2018 09:45 AM, Roman Bogorodskiy wrote: > > John Ferlan wrote: > > > >> > >> > >> On 05/29/2018 12:57 PM, Roman Bogorodskiy wrote: > >>> Recently, bhyve started supporting specifying guest CPU topology. > >>> It looks this way: > >>> > >>> bhyve -c

Re: [libvirt] [PATCH] docs: remove git snapshot download links

2018-06-07 Thread Andrea Bolognani
On Thu, 2018-06-07 at 15:07 +0100, Daniel P. Berrangé wrote: > The process used to build the snapshots no longer works because the box > it runs on is outdated. Analysing the web logs shows the majority of > traffic to these links is from search engine bots. With those removed, > there is about 1

[libvirt] [PATCH] docs: remove git snapshot download links

2018-06-07 Thread Daniel P . Berrangé
The process used to build the snapshots no longer works because the box it runs on is outdated. Analysing the web logs shows the majority of traffic to these links is from search engine bots. With those removed, there is about 1 hit per day from (probable) humans. Most users needing a tarball are

Re: [libvirt] [PATCH 03/10] util: Introduce virFileFlock

2018-06-07 Thread Martin Kletzander
On Thu, Jun 07, 2018 at 02:58:12PM +0100, Daniel P. Berrangé wrote: On Thu, Jun 07, 2018 at 03:54:24PM +0200, Martin Kletzander wrote: We already have virFileLock(), but we are now using flock() in the code as well (due to requirements for mutual exclusion between libvirt and other programs

[libvirt] [PATCH 5/4] docs: Add TSEG support info into news.xml

2018-06-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/news.xml | 8 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 6e079e8321ff..5df8f7c579e9 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,14 @@ its own virtual TPM. +

Re: [libvirt] [PATCH 03/10] util: Introduce virFileFlock

2018-06-07 Thread Daniel P . Berrangé
On Thu, Jun 07, 2018 at 03:54:24PM +0200, Martin Kletzander wrote: > We already have virFileLock(), but we are now using flock() in the code as > well (due to requirements for mutual exclusion between libvirt and other > programs using flock() as well), so let's have a function for that as well so

[libvirt] [PATCH 04/10] util: Avoid needless preprocessor conditionals in virresctrl

2018-06-07 Thread Martin Kletzander
By exporting virResctrlAllocMasksAssign() we can remove most of the conditionals. And that function should be used from the tests later anyway. Signed-off-by: Martin Kletzander --- src/libvirt_private.syms | 1 + src/util/virresctrl.c | 30 +-

[libvirt] [PATCH 02/10] util: Fix typo in error message %ud -> %u

2018-06-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index c140276c0909..9a118fc3595d 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -941,7 +941,7 @@

[libvirt] [PATCH 10/10] Move host cache handling from conf/ to util/

2018-06-07 Thread Martin Kletzander
Introduce virCache{Info,Bank} as structures describing host cache information including the ways they can be managed by resctrl. This has couple of advantages. First and foremost the virResctrlAllocCreate() is no longer dependent on a data structure initialized in another part of the code and

[libvirt] [PATCH 09/10] util: Remove cbm_mask from virResctrlInfoPerType

2018-06-07 Thread Martin Kletzander
It was used just temporarily to do a calculation, no need to keep that around. Also use virBitmap in the code instead of reimplementing two of its existing functions. And move the counting part next to where the value is read. Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 37

[libvirt] [PATCH 06/10] util: Reorder parts of virresctrl

2018-06-07 Thread Martin Kletzander
Move description of the purpose of the file before any definition. One empty line between related enum definitions. All typedefs before all structs. This is exception from the usual, but not the only one, we already have something similar for some other structs. This way we can move contents

[libvirt] [PATCH 00/10] Some CAT cleanups

2018-06-07 Thread Martin Kletzander
Just so we have something before more code gets in, this makes future changes more straight-forward. Martin Kletzander (10): util: Rename resctrl to alloc if it is virResctrlAllocPtr util: Fix typo in error message %ud -> %u util: Introduce virFileFlock util: Avoid needless preprocessor

  1   2   >