Re: [libvirt] [PATCH 00/19] Use '#pragma once' in headers

2019-06-14 Thread Eric Blake
On 6/14/19 11:18 AM, Jonathon Jongsma wrote: >> >> Note that we do have syntax-check for this, it had to be loosened in: >> commit ac41ffb8fa1235c226377397842c6c240a677d87 >> Author: Cole Robinson >> AuthorDate: 2019-04-03 17:45:02 -0400 >> Commit: Cole Robinson >> CommitDate:

Re: [libvirt] [PATCH 00/19] Use '#pragma once' in headers

2019-06-14 Thread Jonathon Jongsma
On Fri, 2019-06-14 at 08:07 +0200, Ján Tomko wrote: > On Thu, Jun 13, 2019 at 10:23:30AM -0500, Eric Blake wrote: > > On 6/13/19 10:06 AM, Ján Tomko wrote: > > > > > > Jonathon Jongsma (19): > > > > Use #pragma once in driver headers > > > > src/access: use #pragma once in headers > > > >

Re: [libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-06-14 Thread Alex Williamson
On Fri, 14 Jun 2019 17:06:15 +0200 Christophe de Dinechin wrote: > > On 14 Jun 2019, at 16:23, Alex Williamson > > wrote: > > > > On Fri, 14 Jun 2019 11:54:42 +0200 > > Christophe de Dinechin wrote: > > > >> That is true irrespective of the usage, isn’t it? In other words, when you > >>

Re: [libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-06-14 Thread Christophe de Dinechin
> On 14 Jun 2019, at 16:23, Alex Williamson wrote: > > On Fri, 14 Jun 2019 11:54:42 +0200 > Christophe de Dinechin wrote: > >> That is true irrespective of the usage, isn’t it? In other words, when you >> invoke `mdevctl create-mdev`, you assert “I own that specific parent/type”. >> At

Re: [libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-06-14 Thread Alex Williamson
On Fri, 14 Jun 2019 11:54:42 +0200 Christophe de Dinechin wrote: > > On 13 Jun 2019, at 18:35, Alex Williamson > > wrote: > > > > On Thu, 13 Jun 2019 18:17:53 +0200 > > Christophe de Dinechin wrote: > > > >>> On 24 May 2019, at 01:20, Alex Williamson > >>> wrote: > >>> > >>> Hi, > >>>

Re: [libvirt] [RFC PATCH 0/5] qemu: drop command line parsing

2019-06-14 Thread Andrea Bolognani
On Fri, 2019-06-14 at 15:53 +0200, Ján Tomko wrote: > On Fri, Jun 14, 2019 at 03:30:22PM +0200, Peter Krempa wrote: > > All the code is mostly outdated and does not really help in most cases. > > > > Since this was already proposed and I did not see anything against here > > are the patches. > >

Re: [libvirt] [RFC PATCH 3/5] qemu: driver: Remove support for native->XML conversion

2019-06-14 Thread Andrea Bolognani
On Fri, 2019-06-14 at 15:30 +0200, Peter Krempa wrote: [...] > +virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", > + _("qemu driver no longer supports native to XML > conversion")); "Converting arbitrary QEMU command lines to libvirt domain XML is no longer supported".

Re: [libvirt] [RFC PATCH 1/5] qemu: driver: Drop support for qemu-attach

2019-06-14 Thread Andrea Bolognani
On Fri, 2019-06-14 at 15:30 +0200, Peter Krempa wrote: [...] > +virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", > + _("attaching to a non-libvirt qemu process is no longer > supported")); "Attaching to a QEMU process started outside of libvirt is no longer supported".

Re: [libvirt] [RFC PATCH 0/5] qemu: drop command line parsing

2019-06-14 Thread Ján Tomko
On Fri, Jun 14, 2019 at 03:30:22PM +0200, Peter Krempa wrote: All the code is mostly outdated and does not really help in most cases. Since this was already proposed and I did not see anything against here are the patches. As a follow up I'll refactor and move the rest of qemu_parse_command.c

Re: [libvirt] [RFC PATCH 5/5] qemu: parse: Drop unused qemu command line parsing infrastructure

2019-06-14 Thread Ján Tomko
On Fri, Jun 14, 2019 at 03:30:27PM +0200, Peter Krempa wrote: It's now unused and utterly obsolete. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c|2 + src/qemu/qemu_parse_command.c | 2622 + src/qemu/qemu_parse_command.h | 16 - 3 files

Re: [libvirt] [RFC PATCH 3/5] qemu: driver: Remove support for native->XML conversion

2019-06-14 Thread Ján Tomko
On Fri, Jun 14, 2019 at 03:30:25PM +0200, Peter Krempa wrote: This code is really neglected and does not at all work reliably. It can't even be used for converting our own commandline back. Since this was mostly useful for aiding migration from manually run qemu to libvirt and will not work for

Re: [libvirt] [PATCH RFC 0/1] mdevctl: further config for vfio-ap

2019-06-14 Thread Tony Krowiak
On 6/13/19 9:54 AM, Cornelia Huck wrote: On Fri, 7 Jun 2019 14:30:48 -0400 Tony Krowiak wrote: On 6/7/19 10:56 AM, Cornelia Huck wrote: On Thu, 6 Jun 2019 12:45:29 -0400 Matthew Rosato wrote: On 6/6/19 10:44 AM, Cornelia Huck wrote: This patch adds a very rough implementation of

[libvirt] [RFC PATCH 5/5] qemu: parse: Drop unused qemu command line parsing infrastructure

2019-06-14 Thread Peter Krempa
It's now unused and utterly obsolete. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c|2 + src/qemu/qemu_parse_command.c | 2622 + src/qemu/qemu_parse_command.h | 16 - 3 files changed, 3 insertions(+), 2637 deletions(-) diff --git

[libvirt] [RFC PATCH 1/5] qemu: driver: Drop support for qemu-attach

2019-06-14 Thread Peter Krempa
Attaching to modern qemu will not work with all this code and attempting to ressurect it would be mostly pointless. Signed-off-by: Peter Krempa --- src/check-aclrules.pl | 1 + src/qemu/qemu_driver.c | 87 +++--- 2 files changed, 6 insertions(+), 82

[libvirt] [RFC PATCH 4/5] tests: Drop qemuargv2xmltest

2019-06-14 Thread Peter Krempa
Now that we no longer use that functionality we can also drop the tests. Signed-off-by: Peter Krempa --- tests/Makefile.am | 11 +- tests/qemuargv2xmldata/boot-cdrom.args| 22 -- tests/qemuargv2xmldata/boot-cdrom.xml | 35 --

[libvirt] [RFC PATCH 3/5] qemu: driver: Remove support for native->XML conversion

2019-06-14 Thread Peter Krempa
This code is really neglected and does not at all work reliably. It can't even be used for converting our own commandline back. Since this was mostly useful for aiding migration from manually run qemu to libvirt and will not work for this puspose in many cases it's not worth having in my opinion.

[libvirt] [RFC PATCH 0/5] qemu: drop command line parsing

2019-06-14 Thread Peter Krempa
All the code is mostly outdated and does not really help in most cases. Since this was already proposed and I did not see anything against here are the patches. As a follow up I'll refactor and move the rest of qemu_parse_command.c once this is out of the way. you can fetch this by git fetch

[libvirt] [RFC PATCH 2/5] qemu: parse: Drop qemuParseCommandLinePid and friends

2019-06-14 Thread Peter Krempa
Now that we no longer support attaching to a live non-libvirt qemu we can drop the backend functions as well. Signed-off-by: Peter Krempa --- src/qemu/qemu_parse_command.c | 92 --- src/qemu/qemu_parse_command.h | 7 --- 2 files changed, 99 deletions(-) diff

Re: [libvirt] [PATCH RFC 1/1] allow to specify additional config data

2019-06-14 Thread Tony Krowiak
On 6/13/19 10:18 AM, Cornelia Huck wrote: On Tue, 11 Jun 2019 10:19:29 -0400 Tony Krowiak wrote: On 6/7/19 4:03 PM, Alex Williamson wrote: On Fri, 7 Jun 2019 14:26:13 -0400 Tony Krowiak wrote: On 6/6/19 12:15 PM, Alex Williamson wrote: On Thu, 6 Jun 2019 09:32:24 -0600 Alex Williamson

Re: [libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-06-14 Thread Christophe de Dinechin
> On 24 May 2019, at 01:20, Alex Williamson wrote: > > Hi, > > Currently mediated device management, much like SR-IOV VF management, > is largely left as an exercise for the user. This is an attempt to > provide something and see where it goes. I doubt we'll solve > everyone's needs on the

Re: [libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-06-14 Thread Christophe de Dinechin
> On 13 Jun 2019, at 18:35, Alex Williamson wrote: > > On Thu, 13 Jun 2019 18:17:53 +0200 > Christophe de Dinechin wrote: > >>> On 24 May 2019, at 01:20, Alex Williamson >>> wrote: >>> >>> Hi, >>> >>> Currently mediated device management, much like SR-IOV VF management, >>> is largely

Re: [libvirt] [PATCH] SpaprVio addresses are 32-bit, not 64-bit

2019-06-14 Thread Andrea Bolognani
On Tue, 2019-06-04 at 11:38 +1000, David Gibson wrote: > spapr-vio addresses are used on POWER platform qemu guests, which are based > on the PAPR specification. PAPR specifies a number of virtual devices (but > not virtio protocol) which are addressed in an abstract namespace. > > Currently,

[libvirt] [PATCH 2/7] qemu: Rework qemuDomainDeviceDefValidateAddress()

2019-06-14 Thread Andrea Bolognani
Introduce a switch() statement and prepare for validating more address types than just PCI. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c

[libvirt] [PATCH 7/7] docs: Update documentation for spapr-vio addresses

2019-06-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/formatdomain.html.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 22ddcb71d3..144baa2e85 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

[libvirt] [PATCH 4/7] tests: Add pseries-spaprvio-invalid

2019-06-14 Thread Andrea Bolognani
This test case shows that we now reject invalid spapr-vio addresses. Signed-off-by: Andrea Bolognani --- .../pseries-spaprvio-invalid.xml| 17 + tests/qemuxml2argvtest.c| 1 + 2 files changed, 18 insertions(+) create mode 100644

[libvirt] [PATCH 0/7] Validate spapr-vio addresses as 32-bit

2019-06-14 Thread Andrea Bolognani
An alternative take on David Gibson's patch https://www.redhat.com/archives/libvir-list/2019-June/msg00061.html from earlier this month. Andrea Bolognani (7): docs: Fix validation of spapr-vio addresses qemu: Rework qemuDomainDeviceDefValidateAddress() qemu: Validate spapr-vio addresses

[libvirt] [PATCH 5/7] conf: Format spapr-vio addresses as 32-bit

2019-06-14 Thread Andrea Bolognani
Using 8 hex digits all the time, regardless of whether the actual value can fit in fewer, makes it more obvious to the user what the limits are. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 2 +- tests/qemuargv2xmldata/nomachine-ppc64.xml | 2 +-

[libvirt] [PATCH 6/7] qemu: Format spapr-vio addresses as 32-bit

2019-06-14 Thread Andrea Bolognani
No reason not to be consistent with the user-visible value. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 2 +- tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/pseries-vio-user-assigned.args | 2 +-

[libvirt] [PATCH 3/7] qemu: Validate spapr-vio addresses

2019-06-14 Thread Andrea Bolognani
According to sPAPR, addresses are 32-bit rather than 64-bit. Update qemuDomainDeviceDefValidateAddress() accordingly. https://bugzilla.redhat.com/show_bug.cgi?id=1598657 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 15 ++- 1 file changed, 14 insertions(+), 1

[libvirt] [PATCH 1/7] docs: Fix validation of spapr-vio addresses

2019-06-14 Thread Andrea Bolognani
According to sPAPR, addresses are 32-bit (8 hex digits) rather than 64-bit (16 hex digits). Update the schema accordingly. Signed-off-by: Andrea Bolognani --- docs/schemas/domaincommon.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng

Re: [libvirt] [security-notice PATCH 9/9] notices: re-generate all branch/tag info

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:06PM +0100, Daniel P. Berrangé wrote: Use the new script logic to regenerate all branch tag info for flaws A few manual edits are still needed, as the script still doesn't cope with two situations: - The vulnerable commit from master was backported to an older

Re: [libvirt] [security-notice PATCH 7/9] scripts: add detection of cherry-picks in branches

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:04PM +0100, Daniel P. Berrangé wrote: Look at each fix on the branch to identify if it is a recorded cherry-pick from the fixes known for the master branch If all fixes from master are cherry-picked to the branch, then look at tags on the branch to identify if a

Re: [libvirt] [security-notice PATCH 8/9] scripts: fuzzy matching on subject to identify unannotated cherry picks

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:05PM +0100, Daniel P. Berrangé wrote: Sometimes fixes are mistakenly cherry picked into branches without using the '-x' flag to record the cherry pick master commit. Add fuzzy matching based on subject line to attempt to identify these fixes on branches.

Re: [libvirt] [security-notice PATCH 6/9] scripts: optimize tag to branch mapping

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:03PM +0100, Daniel P. Berrangé wrote: The tags have a well defined naming scheme, letting us identify the branch by simply stripping the last digit and appending '-maint'. This eliminates the need to run a query per branch. --- scripts/report-vulnerable-tags.pl | 31

Re: [libvirt] [security-notice PATCH 5/9] scripts: allow for notices to have multiple commit hashes

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:02PM +0100, Daniel P. Berrangé wrote: Sometimes a bug may be introduced across multiple commits, or fixed across multiple commits. We must thus honour the full list of commits. There might not even be a broken commit listed yet. Signed-off-by: Daniel P. Berrangé

Re: [libvirt] [security-notice PATCH 4/9] scripts: change to update notice files inplace

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:01PM +0100, Daniel P. Berrangé wrote: Instead of printing out a snippet which then has to be cut and pasted into the notice file, directly read the template notice file and update it in place with new branch/tag info. Signed-off-by: Daniel P. Berrangé ---

Re: [libvirt] [security-notice PATCH 3/9] scripts: add ability to handle a fixed commit hash

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:52:00PM +0100, Daniel P. Berrangé wrote: Currently when given a broken commit hash we assume everything newer than this is broken. If we are retroactively recording info on a flaw that is already fixed in git though, we might know a fixed commit hash. Use this info to

Re: [libvirt] [security-notice PATCH 2/9] scripts: report vulnerable branches which don't have any tags too

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:51:59PM +0100, Daniel P. Berrangé wrote: Currently we only report branches which have some tags on them which means we only pick up branches which have had stable releases. We must also report vulnerable status against other branches which exist but have not yet had

Re: [libvirt] [PATCH] test_driver: implement virDomainSendProcessSignal

2019-06-14 Thread Ilias Stamatis
On Fri, Jun 14, 2019 at 10:07 AM Erik Skultety wrote: > > On Thu, Jun 13, 2019 at 02:20:22PM +0200, Ilias Stamatis wrote: > > On Thu, Jun 13, 2019 at 10:20 AM Erik Skultety wrote: > > > > > > On Tue, Jun 04, 2019 at 03:17:43PM +0200, Ilias Stamatis wrote: > > > > Only succeed when @pid_value is

Re: [libvirt] [PATCH v3 03/15] vircgroup: introduce virCgroupV2DevicesAttachProg

2019-06-14 Thread Pavel Hrdina
On Thu, Jun 13, 2019 at 01:16:21PM +0200, Ján Tomko wrote: > On Thu, Apr 25, 2019 at 09:44:20AM +0200, Pavel Hrdina wrote: > > This function loads the BPF prog with prepared map into kernel and > > attaches it into guest cgroup. It can be also used to replace existing > > program in the cgroup if

Re: [libvirt] [security-notice PATCH 1/9] scripts: change data structures used to track branches & tags

2019-06-14 Thread Ján Tomko
On Mon, May 13, 2019 at 12:51:58PM +0100, Daniel P. Berrangé wrote: We need to track more info against each branch, so use a more advanced data structure. Signed-off-by: Daniel P. Berrangé --- scripts/report-vulnerable-tags.pl | 53 ++- 1 file changed, 38

Re: [libvirt] [PATCH] test_driver: implement virDomainSendProcessSignal

2019-06-14 Thread Erik Skultety
On Thu, Jun 13, 2019 at 02:20:22PM +0200, Ilias Stamatis wrote: > On Thu, Jun 13, 2019 at 10:20 AM Erik Skultety wrote: > > > > On Tue, Jun 04, 2019 at 03:17:43PM +0200, Ilias Stamatis wrote: > > > Only succeed when @pid_value is 1, since according to the docs this is > > > > Why do we need to

[libvirt] [PATCH 3/4] tests: Add riscv64-virt-graphics

2019-06-14 Thread Andrea Bolognani
Support for this has only relatively recently been added to virt-manager. Signed-off-by: Andrea Bolognani --- .../riscv64-virt-graphics.riscv64-latest.args | 59 +++ .../riscv64-virt-graphics.xml | 45 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCH 4/4] tests: Enable *-headless and *-graphics in qemuxml2xml

2019-06-14 Thread Andrea Bolognani
We didn't do this earlier because the DO_TEST_CAPS_ARCH_LATEST() macro was limited to qemuxml2argv until recently. Signed-off-by: Andrea Bolognani --- .../aarch64-virt-graphics.aarch64-latest.xml | 115 + .../aarch64-virt-headless.aarch64-latest.xml | 101 +++

[libvirt] [PATCH 0/4] tests: Tweaks and updates to *-headless and *-graphics

2019-06-14 Thread Andrea Bolognani
*** BLURBY MCBLURBFACE *** Andrea Bolognani (4): tests: Normalize quotes for *-graphics tests: Update *-headless and *-graphics tests: Add riscv64-virt-graphics tests: Enable *-headless and *-graphics in qemuxml2xml .../aarch64-virt-graphics.aarch64-latest.args | 6 +-

[libvirt] [PATCH 1/4] tests: Normalize quotes for *-graphics

2019-06-14 Thread Andrea Bolognani
Right now *-headless and *-graphics tests are using different quoting styles, which results in the diff between them being basically useless, whereas we would like it to be possible to compare these files directly and easily spot the differences. Convert all *-graphics tests to single quotes,

[libvirt] [PATCH 2/4] tests: Update *-headless and *-graphics

2019-06-14 Thread Andrea Bolognani
Use the latest virt-manager to regenerate the files. The command line is once again along the lines of $ virt-install \ --name guest --os-variant fedora29 \ --vcpus 4 --memory 4096 --disk size=5 \ --graphics (none|vnc) \ --print-xml with some minor tweaks performed afterwards.

[libvirt] [PATCH] virNodeDeviceCapPCIDefFormat: Drop useless space before end of tags

2019-06-14 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/conf/node_device_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1db045d9ac..4ef92d5129 100644 --- a/src/conf/node_device_conf.c +++

Re: [libvirt] [PATCH 00/19] Use '#pragma once' in headers

2019-06-14 Thread Ján Tomko
On Thu, Jun 13, 2019 at 10:23:30AM -0500, Eric Blake wrote: On 6/13/19 10:06 AM, Ján Tomko wrote: Jonathon Jongsma (19):  Use #pragma once in driver headers  src/access: use #pragma once in headers  src/admin: use #pragma once in headers  src/bhyve: use #pragma once in headers  conf: domain: