Re: [libvirt] AMD SEV's /dev/sev permissions and probing QEMU for capabilities

2019-01-30 Thread Erik Skultety
On Tue, Jan 29, 2019 at 06:40:08PM +, Daniel P. Berrangé wrote: > On Tue, Jan 29, 2019 at 05:15:42PM +0100, Erik Skultety wrote: > > On Wed, Jan 23, 2019 at 03:02:28PM +, Singh, Brijesh wrote: > > > > > > > > > On 1/23/19 7:36 AM, Daniel P. Berrangé wrote: > > > > On Wed, Jan 23, 2019 at

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Gerd Hoffmann
Hi, > > (Migration compat is left as an exercise for the reader :-)) > > It's not just migration compatibility, it's also guest ABI: "the guest > can tell the difference". Is that actually the case on x86? I don't think so. Note: arm is different, because the flash is listed in the device

Re: [libvirt] [PATCH 5/7] conf: Introduce storage pool functions into capabilities

2019-01-30 Thread Pavel Hrdina
On Tue, Jan 15, 2019 at 08:15:47PM -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1581670 > > Introduce the bare bones functions to processing capability > data for the storage driver. Currently just looking to store > and format the storage pool types in output, such as:

Re: [libvirt] [PATCH] qemu: blockjob: Don't report block job progress at 100% if job isn't ready

2019-01-30 Thread Peter Krempa
On Tue, Jan 29, 2019 at 18:52:37 +0100, Kashyap Chamarthy wrote: > On Tue, Jan 29, 2019 at 05:24:09PM +0100, Peter Krempa wrote: > > Some clients take the advice to poll virDomainGetBlockJobInfo rather > > than wait for the ready event. In some cases qemu can get to 100% and > > still not reach

Re: [libvirt] [Qemu-devel] [PATCH 1/3] scsi-disk: Don't use empty string as device id

2019-01-30 Thread Kevin Wolf
Am 29.01.2019 um 17:37 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > scsi-disk includes in the Device Identification VPD page, depending on > > configuration amongst others, a vendor specific designator that consists > > either of the serial number if given or the BlockBackend

Re: [libvirt] AMD SEV's /dev/sev permissions and probing QEMU for capabilities

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 09:06:30AM +0100, Erik Skultety wrote: > Thanks for ^this bit which helped me understand the bits below. When I read > the > man page yesterday the first question was, okay, how do I figure out whether > the file capabilities bit is set? Well, use xattrs...which didn't

Re: [libvirt] [PATCH 04/11] security: Remove security driver internals for disk labelling

2019-01-30 Thread Peter Krempa
On Mon, Jan 28, 2019 at 09:26:45 -0500, John Ferlan wrote: > > > On 1/23/19 11:10 AM, Peter Krempa wrote: > > Security labelling of disks consists of labelling of the disk image > > *labeling > > > itself and it's backing chain. Modify > > virSecurityManager[Set|Restore]ImageLabel to take a

Re: [libvirt] [PATCH v2 0/2] Enum formating changes

2019-01-30 Thread Ján Tomko
On Tue, Jan 29, 2019 at 04:32:34PM +0100, Peter Krempa wrote: v2 contains a tweak to the CSS to widen the page slightly and keep borders on narrow screen. Peter Krempa (2): docs: Format bit shift and hex notation for bitwise flag enums docs: css: Make docs page wider while still accomodating

Re: [libvirt] [PATCH v2 1/2] docs: Format bit shift and hex notation for bitwise flag enums

2019-01-30 Thread Ján Tomko
On Tue, Jan 29, 2019 at 04:32:35PM +0100, Peter Krempa wrote: Big number itself does not make much sense in some cases. Format the bitshift format as well. Changes our web page docs from: VIR_MIGRATE_POSTCOPY = 32768 : Setting the VIR_MIGRATE_POSTCOPY... VIR_MIGRATE_TLS = 65536 : Setting

Re: [libvirt] AMD SEV's /dev/sev permissions and probing QEMU for capabilities

2019-01-30 Thread Erik Skultety
> > > though, we need a #ifdef check for existance of PR_CAP_AMBIENT > > > > > > > An alternative question I've been playing ever since we exchanged the > > > > last few > > > > emails is that can't we wait until the ioctls are compared against > > > > permissions > > > > in kernel so that

[libvirt] [nicsysco.com] Weird Libvirt Behavior

2019-01-30 Thread nico
Hi folks, First time contributor, but I felt that what I discovered was (probably) a very rare situation. I'm running a Centos server (my only Linux deployment) to which customers all over the U.S. connect to process their micro-lender businesses. There are several VM's, among other one

Re: [libvirt] [PATCH] qemu: Rework setting process affinity

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 02:56:46PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1503284 > > The way we currently start qemu from CPU affinity POV is as > follows: > > 1) the child process is set affinity to all online CPUs (unless > some vcpu pinning was given in

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Paolo Bonzini
On 30/01/19 15:13, Markus Armbruster wrote: > -global driver=cfi.pflash01,property=secure,value=on > > Affects *all* such devices, but fortunately we have at most two, and the > one we don't want to affect happens to ignore the property value. Is this true? I think both need secure=on, at

[libvirt] [PATCH] tests: Build and run storagevolxml2xmltest iff WITH_STORAGE

2019-01-30 Thread Michal Privoznik
Commit 7a227688a83880 assumes that libvirt_driver_storage_impl.la is always available. Well it is not. Users have option to turn the storage driver off in which case it isn't build and linking the test with the library then fails. Signed-off-by: Michal Privoznik --- And alternative approach

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Laszlo Ersek
On 01/30/19 16:24, Peter Maydell wrote: > Well, nobody who does anything with x86 has cared enough to > make the pflash implementation actually correct. I feel sort of included under this umbrella, so: I haven't been aware of any particular pflash implementation errors. I "didn't care" because

Re: [libvirt] [PATCH 0/2] Fix a couple build issues

2019-01-30 Thread Michal Privoznik
On 1/30/19 3:40 PM, John Ferlan wrote: Recent adjustment to add XML namespace processing for storage pool XML processing broke the mingw* builds: CC storagevolxml2xmltest.o gmake[2]: *** No rule to make target '../src/libvirt_driver_storage_impl.la', needed by

[libvirt] list vsock cids allocated to VMs?

2019-01-30 Thread Brian Kroth
Other than dumping and parsing the config for all running VMs, is there a way to get the current map of vsock cids allocated to their VM domains? Thanks, Brian -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [nicsysco.com] Weird Libvirt Behavior

2019-01-30 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 06:18:21PM -0800, nico wrote: > Hi folks, > > > > First time contributor, but I felt that what I discovered was (probably) a > very rare situation. > > > > I'm running a Centos server (my only Linux deployment) to which customers > all over the U.S. connect to

Re: [libvirt] [PATCH] tests: Build and run storagevolxml2xmltest iff WITH_STORAGE

2019-01-30 Thread John Ferlan
On 1/30/19 9:33 AM, Michal Privoznik wrote: > Commit 7a227688a83880 assumes that libvirt_driver_storage_impl.la > is always available. Well it is not. Users have option to turn > the storage driver off in which case it isn't build and linking > the test with the library then fails. > >

Re: [libvirt] [PATCH 11/11] qemu: Label backing chain of user-provided target of blockCopy when starting the job

2019-01-30 Thread Peter Krempa
On Mon, Jan 28, 2019 at 13:00:03 -0500, John Ferlan wrote: > > > On 1/23/19 11:11 AM, Peter Krempa wrote: > > Be more sensible when setting labels of the target of a > > virDomainBlockCopy operation. Previously we'd relabel everything in case > > it's a copy job even if there's no unlabelled

Re: [libvirt] [PATCH 5/7] conf: Introduce storage pool functions into capabilities

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 03:55:05PM +, Daniel P. Berrangé wrote: > On Wed, Jan 30, 2019 at 10:03:43AM -0500, John Ferlan wrote: > > > > > > On 1/30/19 3:31 AM, Pavel Hrdina wrote: > > > On Tue, Jan 15, 2019 at 08:15:47PM -0500, John Ferlan wrote: > > >>

Re: [libvirt] [PATCH 5/7] conf: Introduce storage pool functions into capabilities

2019-01-30 Thread John Ferlan
On 1/30/19 3:31 AM, Pavel Hrdina wrote: > On Tue, Jan 15, 2019 at 08:15:47PM -0500, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1581670 >> >> Introduce the bare bones functions to processing capability >> data for the storage driver. Currently just looking to store >> and

Re: [libvirt] [PATCH v2 11/25] conf: Add

2019-01-30 Thread Pavel Hrdina
On Wed, Jan 23, 2019 at 04:32:39PM -0500, Cole Robinson wrote: > devices lack the model= attribute which is used by > most other device types. bus= mostly acts as one, but it > serves other purposes too like determing what target= > prefix to use, and for matching against controller type= >

Re: [libvirt] list vsock cids allocated to VMs?

2019-01-30 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 10:07:16AM -0600, Brian Kroth wrote: > Other than dumping and parsing the config for all running VMs, is > there a way to get the current map of vsock cids allocated to their VM > domains? What you describe is the only supported approach from libvirt's POV. Regards,

[libvirt] [PATCH 2/2] tests: Add storagepoolxml2argvtest source to EXTRA_DIST

2019-01-30 Thread John Ferlan
Commit f2f84b4d4 added storagepoolxml2argvtest processing; however, it didn't follow alter the else to !WITH_STORAGE and add the source itself to the EXTRA_DIST like the other WITH_STORAGE options for virstorageutiltest and storagevolxml2argvtest. Signed-off-by: John Ferlan ---

[libvirt] [PATCH 0/2] Fix a couple build issues

2019-01-30 Thread John Ferlan
Recent adjustment to add XML namespace processing for storage pool XML processing broke the mingw* builds: CC storagevolxml2xmltest.o gmake[2]: *** No rule to make target '../src/libvirt_driver_storage_impl.la', needed by 'storagepoolxml2xmltest.exe'. Stop. gmake[2]: *** Waiting for

[libvirt] [PATCH 1/2] tests: Fix build issue with storagevolxml2xmltest

2019-01-30 Thread John Ferlan
Commit 7a227688a caused a build failure on mingw. Following other uses of including ../src/libvirt_driver_storage_impl.la I moved to under the WITH_STORAGE conditional. Signed-off-by: John Ferlan --- tests/Makefile.am | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-)

Re: [libvirt] [PATCH 05/11] qemu: security: Add 'backingChain' flag to qemuSecurity[Set|Restore]ImageLabel

2019-01-30 Thread Peter Krempa
On Mon, Jan 28, 2019 at 09:27:51 -0500, John Ferlan wrote: > > > On 1/23/19 11:11 AM, Peter Krempa wrote: > > Allow callers use the new flag. > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_domain.c | 4 ++-- > > src/qemu/qemu_security.c | 10 ++ > >

Re: [libvirt] list vsock cids allocated to VMs?

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 11:25:25AM -0600, Brian Kroth wrote: > OK, I was expecting it to maintain a list internally (at least for the > things it knows about) so that the auto property in the domxml can work > nicely, but I suppose it would still need to fallback to letting the kernel > reject an

Re: [libvirt] AMD SEV's /dev/sev permissions and probing QEMU for capabilities

2019-01-30 Thread Singh, Brijesh
On 1/30/19 7:39 AM, Erik Skultety wrote: though, we need a #ifdef check for existance of PR_CAP_AMBIENT > An alternative question I've been playing ever since we exchanged the > last few > emails is that can't we wait until the ioctls are compared against >

[libvirt] [PATCH 0/6] A few misc fixes from LGTM static analysis

2019-01-30 Thread Daniel P . Berrangé
There is an online service call LGTM (Looks Good To Me) which does static analysis of open source projects and I happened to learn that they include coverage of libvirt https://lgtm.com/projects/g/libvirt/libvirt I looked at the alerts they reported. Currently no errors, 41 warnings and 90

[libvirt] [PATCH 2/6] remote: remove variable whose value is a constant

2019-01-30 Thread Daniel P . Berrangé
The 'rv' variable is never changed after being declared, so can be removed. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c

Re: [libvirt] AMD SEV's /dev/sev permissions and probing QEMU for capabilities

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 02:39:54PM +0100, Erik Skultety wrote: > > > > though, we need a #ifdef check for existance of PR_CAP_AMBIENT > > > > > > > > > An alternative question I've been playing ever since we exchanged the > > > > > last few > > > > > emails is that can't we wait until the ioctls

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Peter Maydell
On Wed, 30 Jan 2019 at 07:24, Markus Armbruster wrote: > > Let me reply to the "why is the cfi.pflash01 device so weird" part > first, because that's relatively quick, and because it could easily > distract us from the more important "how do we want to configure OVMF" > part. I'll reply to that

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Laszlo Ersek
On 01/30/19 15:33, Paolo Bonzini wrote: > On 30/01/19 15:13, Markus Armbruster wrote: >> -global driver=cfi.pflash01,property=secure,value=on >> >> Affects *all* such devices, but fortunately we have at most two, and >> the one we don't want to affect happens to ignore the property value. > >

Re: [libvirt] [PATCH v2 24/25] qemu: Support scsi controller model=virtio-{non-}transitional

2019-01-30 Thread Pavel Hrdina
On Tue, Jan 29, 2019 at 04:32:09PM +0100, Andrea Bolognani wrote: > On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > [...] > > +++ b/docs/schemas/domaincommon.rng > > @@ -2153,6 +2153,8 @@ > >ibmvscsi > >virtio-scsi > >lsisas1078

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Peter Maydell
On Wed, 30 Jan 2019 at 16:44, Laszlo Ersek wrote: > > On 01/30/19 16:24, Peter Maydell wrote: > > > Well, nobody who does anything with x86 has cared enough to > > make the pflash implementation actually correct. > > I feel sort of included under this umbrella, so: > > I haven't been aware of any

Re: [libvirt] list vsock cids allocated to VMs?

2019-01-30 Thread Brian Kroth
OK, I was expecting it to maintain a list internally (at least for the things it knows about) so that the auto property in the domxml can work nicely, but I suppose it would still need to fallback to letting the kernel reject an already taken cid number anyways (eg: due to a manually executed qemu

Re: [libvirt] [PATCH 5/7] conf: Introduce storage pool functions into capabilities

2019-01-30 Thread Daniel P . Berrangé
On Wed, Jan 30, 2019 at 10:03:43AM -0500, John Ferlan wrote: > > > On 1/30/19 3:31 AM, Pavel Hrdina wrote: > > On Tue, Jan 15, 2019 at 08:15:47PM -0500, John Ferlan wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1581670 > >> > >> Introduce the bare bones functions to processing

Re: [libvirt] [PATCH v2 2/4] storage: Rework virStorageBackendSCSISerial

2019-01-30 Thread John Ferlan
On 1/29/19 10:14 AM, Ján Tomko wrote: > On Fri, Jan 18, 2019 at 09:42:35AM -0500, John Ferlan wrote: >> Alter the code to use the virStorageFileGetSCSIKey helper >> to fetch the unique key for the SCSI disk. Alter the logic >> to follow the former code which would return a duplicate >> of @dev

[libvirt] [PATCH 6/6] hyperv: use "is None" not "== None" for PEP-8 compliance

2019-01-30 Thread Daniel P . Berrangé
PEP 8 says: "Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators." There are potentially semantics differences, though in the case of this libvirt code its merely a style change:

[libvirt] [PATCH 3/6] storage: pass struct _virStorageBackendQemuImgInfo by reference

2019-01-30 Thread Daniel P . Berrangé
The struct _virStorageBackendQemuImgInfo is quite large so it is preferrable to pass it by reference instead of by value. This requires us to stop modifying the "compat" field. Signed-off-by: Daniel P. Berrangé --- src/storage/storage_util.c | 35 +-- 1 file

[libvirt] [PATCH 1/6] conf: remove pointless check on enum value

2019-01-30 Thread Daniel P . Berrangé
'val' is initialized from virDomainCapsFeatureTypeFromString and a few lines earlier there was already a check for 'val < 0'. The 'val >= 0' is thus always true. The enum conversion similarly ensures that the val will be less than VIR_DOMAIN_CAPS_FEATURE_LAST, so "val <

[libvirt] [PATCH 5/6] hyperv: remove unused 'total' variable

2019-01-30 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/hyperv/hyperv_wmi_generator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_generator.py index 518a55fd6d..fc1370955f 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++

[libvirt] [PATCH 4/6] qemu: pass virDomainDeviceInfo by reference

2019-01-30 Thread Daniel P . Berrangé
The virDomainDeviceInfo parameter is a large struct so it is preferrable to pass it by reference instead of by value. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c| 4 ++-- src/qemu/qemu_domain.c | 10 +- src/qemu/qemu_domain.h | 9 +

[libvirt] [PATCH] tests: Fix storagepoolxml2xmltest execution for XML namespaces

2019-01-30 Thread John Ferlan
Only run the pool-netfs-ns-mountopts if built WITH_STORAGE_FS and only run pool-rbd-ns-configopts if built with WITH_STORAGE_RBD since the namespace support is only enabled if the pool is enabled. Signed-off-by: John Ferlan --- tests/storagepoolxml2xmltest.c | 4 1 file changed, 4

Re: [libvirt] [PATCH v2 2/2] docs: css: Make docs page wider while still accomodating narrow screens

2019-01-30 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 04:32:36PM +0100, Peter Krempa wrote: > Bump the width to 85em while keeping a maximum width of 90%. > > Signed-off-by: Peter Krempa > --- > docs/libvirt.css | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/docs/libvirt.css

Re: [libvirt] [PATCH 4/6] qemu: pass virDomainDeviceInfo by reference

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > The virDomainDeviceInfo parameter is a large struct so it is preferrable > to pass it by reference instead of by value. > > Signed-off-by: Daniel P. Berrangé > --- > src/qemu/qemu_command.c| 4 ++-- > src/qemu/qemu_domain.c |

Re: [libvirt] [PATCH 6/6] hyperv: use "is None" not "== None" for PEP-8 compliance

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > PEP 8 says: > > "Comparisons to singletons like None should always be done > with 'is' or 'is not', never the equality operators." > > There are potentially semantics differences, though in the case of this > libvirt code its merely a

Re: [libvirt] [PATCH 5/6] hyperv: remove unused 'total' variable

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > src/hyperv/hyperv_wmi_generator.py | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: John Ferlan John -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 1/6] conf: remove pointless check on enum value

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > 'val' is initialized from virDomainCapsFeatureTypeFromString and a > few lines earlier there was already a check for 'val < 0'. > > The 'val >= 0' is thus always true. The enum conversion similarly > ensures that the val will be less than

Re: [libvirt] [PATCH 2/6] remote: remove variable whose value is a constant

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > The 'rv' variable is never changed after being declared, so can be > removed. > > Signed-off-by: Daniel P. Berrangé > --- > src/remote/remote_daemon_dispatch.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > Reviewed-by:

Re: [libvirt] [PATCH 3/6] storage: pass struct _virStorageBackendQemuImgInfo by reference

2019-01-30 Thread John Ferlan
On 1/30/19 12:40 PM, Daniel P. Berrangé wrote: > The struct _virStorageBackendQemuImgInfo is quite large so it is > preferrable to pass it by reference instead of by value. This requires > us to stop modifying the "compat" field. > > Signed-off-by: Daniel P. Berrangé > --- >

[libvirt] [PATCH] qemu: Rework setting process affinity

2019-01-30 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1503284 The way we currently start qemu from CPU affinity POV is as follows: 1) the child process is set affinity to all online CPUs (unless some vcpu pinning was given in the domain XML) 2) Once qemu is running, cpuset cgroup is configured taking

Re: [libvirt] [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-30 Thread Markus Armbruster
Cc: Paolo for additonal device infrastructure expertise. Peter Maydell writes: > On Fri, 25 Jan 2019 at 15:11, Markus Armbruster wrote: >> (1) cfi.pflash01 isn't available with -device. >> >> (2) "Magic board code picks up the backend [created for -drive >> if=pflash], creates a frontend