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

2019-01-29 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 28 Jan 2019 at 12:40, Gerd Hoffmann wrote: >> The tricky part is the access control here. On physical hardware you >> typically have one flash rom, say 16M below 4G (on x86). >> >> Our pflash device doesn't allow to define multiple regions, so we use >> multiple

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

2019-01-29 Thread Markus Armbruster
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 part later. Peter Maydell writes: > On Fri, 25 Jan 2019 at 15:11

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

2019-01-29 Thread Eric Blake
On 1/29/19 10:24 AM, 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 the synchronised phase. > > Since we are dealing with a computer interacting, the error that the

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

2019-01-29 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 w

Re: [libvirt] [PATCH 7/7] storage: Add storage backend pool/vol API's to capability output

2019-01-29 Thread John Ferlan
On 1/29/19 5:18 AM, Michal Privoznik wrote: > On 1/16/19 2:15 AM, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1581670 >> >> Add the Storage Pool and Volume API's defined for each generated >> capability output, such as: >> >>   >> dir >> >>    >>    >>

Re: [libvirt] [PATCH 6/7] storage: Process storage pool capabilities

2019-01-29 Thread John Ferlan
On 1/29/19 5:18 AM, Michal Privoznik wrote: > On 1/16/19 2:15 AM, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1581670 >> >> During storage driver backend initialization, let's save >> which backends are available in the storage pool capabilities. >> >> In order to format tho

Re: [libvirt] [PATCH v5 9/9] rbd: Utilize storage pool namespace to manage config options

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 01:22:08PM -0500, John Ferlan wrote: > Allow for adjustment of RBD configuration options via Storage > Pool XML Namespace adjustments. When namespace arguments are > used to start the pool, add a VIR_WARN to indicate that the > startup was tainted by custom config_opts. > >

Re: [libvirt] [PATCH v5 8/9] storage: Add storage pool namespace options to fs and netfs command lines

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 01:22:07PM -0500, John Ferlan wrote: > If the Storage Pool Namespace XML data exists, format the mount > options on the MOUNT command line and issue a VIR_WARN to indicate > that the storage pool was tainted by custom mount_opts. > > When the pool is started, the options wi

Re: [libvirt] [PATCH v5 7/9] storage: Add infrastructure to manage XML namespace options

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 01:22:06PM -0500, John Ferlan wrote: > Introduce the virStoragePoolFSMountOptionsDef to be used to > manage the Storage Pool XML Namespace for mount options. > > Using a new virStorageBackendNamespaceInit function, set the > virStoragePoolXMLNamespace into the _virStoragePo

Re: [libvirt] [PATCH v5 4/9] storage: Add the nfsvers to the command line

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 01:22:03PM -0500, John Ferlan wrote: > If protocolVer present, add the -o nfsvers=# to the command > line for the NFS Storage Pool > > Signed-off-by: John Ferlan > --- > src/storage/storage_util.c| 19 +-- > .../pool-netfs-protocol-ver-

Re: [libvirt] [PATCH v5 1/9] storage: Add default mount options for fs/netfs storage pools

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 01:22:00PM -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1584663 > > Modify the command generation to add some default options to the > fs/netfs storage pools based on the OS type. For Linux, it'll be > the "nodev, nosuid, noexec". For FreeBSD, it'

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

2019-01-29 Thread Daniel P . Berrangé
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 02:33:01PM +0100, Erik Skultety wrote: > > >> On Wed, Jan 23, 2019 at 01:24:13PM +

[libvirt] [PATCH v5 9/9] rbd: Utilize storage pool namespace to manage config options

2019-01-29 Thread John Ferlan
Allow for adjustment of RBD configuration options via Storage Pool XML Namespace adjustments. When namespace arguments are used to start the pool, add a VIR_WARN to indicate that the startup was tainted by custom config_opts. Based off original patch/concept: https://www.redhat.com/archives/libvi

[libvirt] [PATCH v5 6/9] conf: Introduce virStoragePoolXMLNamespace

2019-01-29 Thread John Ferlan
Introduce the infrastructure necessary to manage a Storage Pool XML Namespace. The general concept is similar to virDomainXMLNamespace, except that for Storage Pools the storage backend specific details can be stored within the _virStoragePoolOptions unlike the domain processing code which manages

[libvirt] [PATCH v5 5/9] virsh: Add source-protocol-ver for pool commands

2019-01-29 Thread John Ferlan
Allow the addition of the to the provided XML. Signed-off-by: John Ferlan Reviewed-by: Daniel P. Berrangé --- tools/virsh-pool.c | 12 ++-- tools/virsh.pod| 5 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 70ca3

[libvirt] [PATCH v5 0/9] Allow adding mountOpts to the storage pool mount command

2019-01-29 Thread John Ferlan
v4: https://www.redhat.com/archives/libvir-list/2019-January/msg00614.html NB: Still keeping same subject for cover to keep the same context even though the contents are very different from the original. Changes since v4: * Alter patch1 to make the addition of mount options more generic to

[libvirt] [PATCH v5 7/9] storage: Add infrastructure to manage XML namespace options

2019-01-29 Thread John Ferlan
Introduce the virStoragePoolFSMountOptionsDef to be used to manage the Storage Pool XML Namespace for mount options. Using a new virStorageBackendNamespaceInit function, set the virStoragePoolXMLNamespace into the _virStoragePoolOptions when the storage backend is loaded. Modify the storagepool.r

[libvirt] [PATCH v5 1/9] storage: Add default mount options for fs/netfs storage pools

2019-01-29 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1584663 Modify the command generation to add some default options to the fs/netfs storage pools based on the OS type. For Linux, it'll be the "nodev, nosuid, noexec". For FreeBSD, it'll be "nosuid, noexec". For others, just leave the options alone. Modi

[libvirt] [PATCH v5 3/9] conf: Add optional NFS Source Pool option

2019-01-29 Thread John Ferlan
Add an optional way to define which NFS Server version will be used to content the target NFS server. Signed-off-by: John Ferlan Reviewed-by: Daniel P. Berrangé --- docs/formatstorage.html.in| 16 ++ docs/schemas/storagepool.rng | 7 ++ src/

[libvirt] [PATCH v5 8/9] storage: Add storage pool namespace options to fs and netfs command lines

2019-01-29 Thread John Ferlan
If the Storage Pool Namespace XML data exists, format the mount options on the MOUNT command line and issue a VIR_WARN to indicate that the storage pool was tainted by custom mount_opts. When the pool is started, the options will be generated on the command line along with the options already defi

[libvirt] [PATCH v5 2/9] docs: Add news mention of default fs/netfs storage pool mount options

2019-01-29 Thread John Ferlan
Signed-off-by: John Ferlan Reviewed-by: Daniel P. Berrangé --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 5759a9e178..2aa4ed25d6 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -50,6 +50,17 @@ + +

[libvirt] [PATCH v5 4/9] storage: Add the nfsvers to the command line

2019-01-29 Thread John Ferlan
If protocolVer present, add the -o nfsvers=# to the command line for the NFS Storage Pool Signed-off-by: John Ferlan --- src/storage/storage_util.c| 19 +-- .../pool-netfs-protocol-ver-freebsd.argv | 1 + .../pool-netfs-protocol-ver-linux.argv|

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

2019-01-29 Thread Kashyap Chamarthy
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 the synchronised phase. > > Since we are dealing with a computer interactin

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

2019-01-29 Thread Markus Armbruster
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 name (which is > a host detail that better shouldn't have been leaked t

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

2019-01-29 Thread Peter Krempa
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 the synchronised phase. Since we are dealing with a computer interacting, the error that the job can't be finalized yet is not handled very wel

Re: [libvirt] [PATCH 1/3] bhyve: implement support for commandline args

2019-01-29 Thread Roman Bogorodskiy
Ján Tomko wrote: > On Fri, Jan 18, 2019 at 07:41:00PM +0400, Roman Bogorodskiy wrote: > >Implement support for passing custom command line arguments > >to bhyve using the 'bhyve:commandline' element: > > > > > > > > > > > > * Define virDomainXMLNamespace for the bhyve driver, which > >

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

2019-01-29 Thread Erik Skultety
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 02:33:01PM +0100, Erik Skultety wrote: > >> On Wed, Jan 23, 2019 at 01:24:13PM +, Daniel P. Berrangé wrote: > >>> On Wed, Jan 23, 2019 at 02:22:12PM +0

Re: [libvirt] [PATCH 31/32] qemu: Use the 'device_id' property of SCSI disks to avoid regressing

2019-01-29 Thread Daniel P . Berrangé
On Mon, Jan 28, 2019 at 05:19:00PM +0100, Peter Krempa wrote: > QEMU accidentally exposed the id of -drive (or same value as disk > serial, if provided) in one of the identifiers visible from the guest. > > To avoid regression in case when -blockdev will be used we need to > always specify it ours

Re: [libvirt] [PATCH v2 10/25] qemu: capabilities: Add virtio/vhost {non-}transitional

2019-01-29 Thread Andrea Bolognani
On Tue, 2019-01-29 at 15:48 +0100, Ján Tomko wrote: > On Wed, Jan 23, 2019 at 04:32:38PM -0500, Cole Robinson wrote: > > This adds QEMU_CAPS flags for the following devices > > > >virtio-blk-pci-transitional > >virtio-blk-pci-non-transitional > >virtio-net-pci-transitional > >virti

Re: [libvirt] [PATCH 3/3] scsi-disk: Deprecate device_id fallback to BlockBackend name

2019-01-29 Thread Daniel P . Berrangé
On Fri, Jan 25, 2019 at 06:46:53PM +0100, Kevin Wolf wrote: > We should never have exposed BlockBackend names to the guest, it's a > host detail. Deprecate this behaviour. Users who need to maintain the > guest ABI can explicitly set the value with the device_id property. I don't think we've depre

Re: [libvirt] [PATCH v2 25/25] qemu: domcaps: Report disk

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > +++ b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml > @@ -0,0 +1,154 @@ > + > + /usr/bin/qemu-system-x86_64 > + kvm > + pc-i440fx-4.0 ... > + This hunk... [...] > +++ b/tests/domaincapstest.c > @@ -502,6 +503,9 @@ mymain(v

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

2019-01-29 Thread Peter Krempa
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 narrow screens docs/apibuild.py | 10 ++ docs/lib

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

2019-01-29 Thread Peter Krempa
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 b/docs/libvirt.css index c5fe27fa3f..dcae2a338a 100644 --- a/docs/libvirt.css +++ b/docs/libvirt

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

2019-01-29 Thread Peter Krempa
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 the VIR_MIGRATE_TLS flag... to: VIR_MIGRATE_POSTCOPY = 32768 (0

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

2019-01-29 Thread Andrea Bolognani
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 > + virtio-transitional > + virtio-non-transit

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

2019-01-29 Thread Andrea Bolognani
On Tue, 2019-01-29 at 15:53 +0100, Andrea Bolognani wrote: > On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > [...] > > @@ -525,11 +525,21 @@ qemuBuildVirtioDevStr(virBufferPtr buf, > > ntmodel_cap = > > QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_PCI_NON_TRANSITIONAL; > >

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

2019-01-29 Thread Ján Tomko
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 when either the virCommandRun succeeded, but returned

Re: [libvirt] [PATCH 05/27] network: add missing bandwidth limits for bridge forward type

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 08, 2019 at 05:16:25PM +0100, Michal Privoznik wrote: > On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > > In the case of a network with forward=bridge, which has a bridge device > > listed, we are capable of setting bandwidth limits but fail to call the > > function to register them. >

Re: [libvirt] [PATCH 02/27] network: restrict usage of port management APIs

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 08, 2019 at 05:15:48PM +0100, Michal Privoznik wrote: > On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > > The port allocation APIs are currently called unconditionally for all > > types of NIC, but (mostly) only do anything for NICs with type=network. > > > > The exception is the port

Re: [libvirt] [PATCH v2 0/4] storage: More uniquely identify NPIV LUNs

2019-01-29 Thread Michal Privoznik
On 1/18/19 3:42 PM, John Ferlan wrote: v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00562.html but no review until January, see: https://www.redhat.com/archives/libvir-list/2019-January/msg00079.html Changes since v1: * Rework code to have virStorageBackendSCSISerial use

Re: [libvirt] [PATCH v2 3/4] util: Introduce virStorageFileGetNPIVKey

2019-01-29 Thread Michal Privoznik
On 1/18/19 3:42 PM, John Ferlan wrote: The vHBA/NPIV LUNs created via the udev processing of the VPORT_CREATE command end up using the same serial value as seen/generated by the /lib/udev/scsi_id as returned during virStorageFileGetSCSIKey. Therefore, in order to generate a unique enough key to b

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > @@ -525,11 +525,21 @@ qemuBuildVirtioDevStr(virBufferPtr buf, > ntmodel_cap = > QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_PCI_NON_TRANSITIONAL; > break; > > +case VIR_DOMAIN_DEVICE_CONTROLLER: > +

Re: [libvirt] [PATCH v2 20/25] qemu: Support vsock model=virtio-{non-}transitional

2019-01-29 Thread Ján Tomko
On Wed, Jan 23, 2019 at 04:32:48PM -0500, Cole Robinson wrote: Add model handling for virtio transitional devices. Ex: ... * "virtio-transitional" maps to qemu "vhost-vsock-pci-transitional" * "virtio-non-transitional" maps to qemu "vhost-vsock-pci-non-transitional" Signed-off-by: Cole

Re: [libvirt] [PATCH v2 10/25] qemu: capabilities: Add virtio/vhost {non-}transitional

2019-01-29 Thread Ján Tomko
On Wed, Jan 23, 2019 at 04:32:38PM -0500, Cole Robinson wrote: This adds QEMU_CAPS flags for the following devices virtio-blk-pci-transitional virtio-blk-pci-non-transitional virtio-net-pci-transitional virtio-net-pci-non-transitional vhost-scsi-pci-transitional vhost-scsi-pci-

Re: [libvirt] [PATCH 2/2] tests: Avoid "jump skips variable initialization" with GCC 9.

2019-01-29 Thread Daniel P . Berrangé
On Mon, Jan 21, 2019 at 04:38:25PM +0100, Peter Krempa wrote: > On Mon, Jan 21, 2019 at 15:13:21 +, Richard W.M. Jones wrote: > > GCC 9 gives pages of errors like: > > > > qemumonitorjsontest.c: In function 'mymain': > > qemumonitorjsontest.c:2904:9: error: jump skips variable initialization

Re: [libvirt] [PATCH v2 22/25] qemu: Support input model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > Add model handling for virtio transitional devices. Ex: > > > ... > > > * "virtio-transitional" maps to qemu "virtio-input-host-pci-transitional" > * "virtio-non-transitional" maps to qemu "virtio-input-host-non-transitional" >

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > devices lack the model= attribute which is used by > most other device types. To eventually support > virtio-input-host-pci-{non-}traditional in qemu, let's add > a standard model= attribute. This just adds the domain_conf > wiring > > Sig

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > devices lack the model= attribute which is used by > most other device types. To eventually support > virtio-input-host-pci-{non-}traditional in qemu, let's add > a standard model= attribute. This just adds the domain_conf > wiring > > Sig

Re: [libvirt] [PATCH v2 20/25] qemu: Support vsock model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > Add model handling for virtio transitional devices. Ex: > > > ... > > > * "virtio-transitional" maps to qemu "vhost-vsock-pci-transitional" > * "virtio-non-transitional" maps to qemu "vhost-vsock-pci-non-transitional" > > Signe

Re: [libvirt] [PATCH 10/11] qemu: hotplug: Refactor qemuHotplugPrepareDiskAccess to work on virStorageSource

2019-01-29 Thread Ján Tomko
On Wed, Jan 23, 2019 at 05:11:05PM +0100, Peter Krempa wrote: Rather than passing in a virStorageSource which would override the originally passed disk->src we can now drop passing in a disk completely as all functions called inside here require a virStorageSource. Signed-off-by: Peter Krempa -

Re: [libvirt] [PATCH v2 19/25] qemu: Support memballoon model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > Add new model values for virtio transitional devices. Ex: > > > > * "virtio-transitional" maps to qemu "virtio-balloon-pci-transitional" > * "virtio-non-transitional" maps to qemu "virtio-balloon-pci-non-transitional" > > Signed-off-b

Re: [libvirt] [PATCH 2/3] docs: bhyve: document commandline element

2019-01-29 Thread Daniel P . Berrangé
On Fri, Jan 18, 2019 at 07:41:01PM +0400, Roman Bogorodskiy wrote: > Document the element which allows > to inject custom command line arguments for bhyve. > > Signed-off-by: Roman Bogorodskiy > --- > docs/drvbhyve.html.in | 20 > 1 file changed, 20 insertions(+) > > diff

Re: [libvirt] [PATCH 1/3] bhyve: implement support for commandline args

2019-01-29 Thread Daniel P . Berrangé
On Fri, Jan 18, 2019 at 07:41:00PM +0400, Roman Bogorodskiy wrote: > Implement support for passing custom command line arguments > to bhyve using the 'bhyve:commandline' element: > > > > > > * Define virDomainXMLNamespace for the bhyve driver, which >at this point supports only th

Re: [libvirt] [PATCH v2 18/25] qemu: Support filesystem model=virtio-9p-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > @@ -677,7 +677,9 @@ > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > break; > > case VIR_DOMAIN_DEVICE_FS: > -/* the only type of filesystem so far is virtio-9p-pci */ > +/* Trans

Re: [libvirt] [PATCH 1/3] bhyve: implement support for commandline args

2019-01-29 Thread Ján Tomko
On Fri, Jan 18, 2019 at 07:41:00PM +0400, Roman Bogorodskiy wrote: Implement support for passing custom command line arguments to bhyve using the 'bhyve:commandline' element: * Define virDomainXMLNamespace for the bhyve driver, which at this point supports only the 'commandline' eleme

Re: [libvirt] [PATCH v4 01/10] storage: Add default mount options for NFS Storage Pools

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 08:43:31AM -0500, John Ferlan wrote: > > > On 1/29/19 6:44 AM, Daniel P. Berrangé wrote: > > On Thu, Jan 17, 2019 at 04:22:07PM -0500, John Ferlan wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1584663 > >> > >> Modify the command generation to add some default op

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > +++ b/docs/schemas/domaincommon.rng > @@ -2499,6 +2499,15 @@ > > > > + > + > + > +virtio-9p > +virtio-9p-transitional > +virtio-9p-non-transition

Re: [libvirt] [PATCH] docs: Format bit shift notation for bitwise flag enums

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 08:41:59AM -0500, John Ferlan wrote: > > > On 1/29/19 8:07 AM, Daniel P. Berrangé wrote: > > On Thu, Jan 24, 2019 at 03:43:15PM +0100, Peter Krempa wrote: > >> Big number itself does not make much sense in some cases. Format the > >> bitshift format as well. > >> > >> Chan

Re: [libvirt] [PATCH v4 01/10] storage: Add default mount options for NFS Storage Pools

2019-01-29 Thread John Ferlan
On 1/29/19 6:44 AM, Daniel P. Berrangé wrote: > On Thu, Jan 17, 2019 at 04:22:07PM -0500, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1584663 >> >> Modify the command generation to add some default options to >> an NFS Storage Pool based on the OS type. For Linux, it'll be >

Re: [libvirt] [PATCH] docs: Format bit shift notation for bitwise flag enums

2019-01-29 Thread John Ferlan
On 1/29/19 8:07 AM, Daniel P. Berrangé wrote: > On Thu, Jan 24, 2019 at 03:43:15PM +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

Re: [libvirt] [PATCH v3 4/4] util: move virtual network firwall rules into private chains

2019-01-29 Thread Michal Privoznik
On 1/24/19 3:05 PM, Daniel P. Berrangé wrote: The previous commit created new chains to hold the firewall rules. This commit changes the code that creates rules to place them in the new private chains instead of the builtin top level chains. With two networks running, the rules in the filter tab

Re: [libvirt] [PATCH v3 0/4] Restructure firewall rules for virtual networks into private chains

2019-01-29 Thread Michal Privoznik
On 1/24/19 3:05 PM, Daniel P. Berrangé wrote: v1: https://www.redhat.com/archives/libvir-list/2018-November/msg00018.html v2: https://www.redhat.com/archives/libvir-list/2018-December/msg00198.html The virtual networks in NAT mode are supposed to only allow outbound network access for gues

Re: [libvirt] [PATCH v2 16/25] qemu: Support rng model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > @@ -4550,6 +4550,14 @@ qemuDomainRNGDefValidate(const virDomainRNGDef *def, > model_supported = virQEMUCapsGet(qemuCaps, > QEMU_CAPS_DEVICE_VIRTIO_RNG); > break; > +case V

Re: [libvirt] [PATCH] docs: Format bit shift notation for bitwise flag enums

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 24, 2019 at 03:43:15PM +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

Re: [libvirt] [PATCH] docs: Format bit shift notation for bitwise flag enums

2019-01-29 Thread John Ferlan
On 1/24/19 9:43 AM, 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 the VIR_

Re: [libvirt] [PATCH v2 15/25] qemu: Support hostdev model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > @@ -479,12 +479,20 @@ qemuBuildVirtioDevStr(virBufferPtr buf, > ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_NET_PCI_NON_TRANSITIONAL; > break; > > +case VIR_DOMAIN_DEVICE_HOSTDEV: > +if (device

Re: [libvirt] [PATCH 2/3] qemu: cgroup: Expose /dev/sev/ only to domains that require SEV

2019-01-29 Thread Michal Privoznik
On 1/23/19 1:57 PM, Erik Skultety wrote: SEV has a limit on number of concurrent guests. From security POV we should only expose resources (any resources for that matter) to domains that truly need them. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 19 +++ 1 file

Re: [libvirt] [PATCH v4 08/10] docs, tests: Add schema, description, and tests for NFS namespace

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:14PM -0500, John Ferlan wrote: > Modify the storagepool.rng to allow for the usage of a different > XML namespace to parse the netfs_mount_opts to be included with > the netfs storage pool definition. > > Modify the storagepoolxml2xmltest to utilize a properly modifie

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

2019-01-29 Thread Philippe Mathieu-Daudé
On 1/25/19 6:46 PM, Kevin Wolf wrote: > 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 name (which is > a host detail that better shouldn't h

Re: [libvirt] [PATCH 1/3] qemu: conf: Remove /dev/sev from the default cgroup device acl list

2019-01-29 Thread Michal Privoznik
On 1/23/19 1:57 PM, Erik Skultety wrote: We should not give domains access to something they don't necessarily need by default. Signed-off-by: Erik Skultety --- src/qemu/qemu.conf | 2 +- src/qemu/qemu_cgroup.c | 2 +- src/qemu/test_libvirtd_qemu.aug.in | 1 - 3

Re: [libvirt] [PATCH 3/3] qemu: domain: Add /dev/sev into the domain mount namespace selectively

2019-01-29 Thread Michal Privoznik
On 1/23/19 1:57 PM, Erik Skultety wrote: Instead of exposing /dev/sev to every domain, do it selectively. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

Re: [libvirt] [Qemu-devel] [PATCH 2/3] scsi-disk: Add device_id property

2019-01-29 Thread Peter Krempa
On Tue, Jan 29, 2019 at 08:10:19 +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 28.01.2019 um 17:55 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 28.01.2019 um 09:50 hat Peter Krempa geschrieben: > >> [...] > >> >> 2) Is actually using 'scsi-cd'/'scsi-

Re: [libvirt] [PATCH v4 09/10] storage: Add NFS storage pool namespace options to command line

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:15PM -0500, John Ferlan wrote: > If the NetFS Storage Pool Namespace XML data exists, format the > mount options on the MOUNT command line. > > When the pool is started, the options will be generated on the > command line along with the options already defined. > > T

Re: [libvirt] [PATCH v4 10/10] rbd: Utilize storage pool namespace to manage config options

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:16PM -0500, John Ferlan wrote: > Allow for adjustment of RBD configuration options via Storage > Pool XML Namespace adjustments. > > Based off original patch/concept: > > https://www.redhat.com/archives/libvir-list/2014-May/msg00940.html > > Signed-off-by: John Ferl

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > qemu vhost-scsi devices map to XML roughly like: > > > > > > To support vhost-scsi-pci-{non-}traditional in qemu, we > need to to extend the SCSI Host hostdev XML to handle > model= value. This matches the XML model= forma

Re: [libvirt] [PATCH v4 09/10] storage: Add NFS storage pool namespace options to command line

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:15PM -0500, John Ferlan wrote: > If the NetFS Storage Pool Namespace XML data exists, format the > mount options on the MOUNT command line. > > When the pool is started, the options will be generated on the > command line along with the options already defined. > > T

Re: [libvirt] [PATCH v4 08/10] docs, tests: Add schema, description, and tests for NFS namespace

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:14PM -0500, John Ferlan wrote: > Modify the storagepool.rng to allow for the usage of a different > XML namespace to parse the netfs_mount_opts to be included with > the netfs storage pool definition. > > Modify the storagepoolxml2xmltest to utilize a properly modifie

Re: [libvirt] [PATCH v4 07/10] nfs: Add infrastructure to manage XML namespace options

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:13PM -0500, John Ferlan wrote: > Introduce the virStoragePoolNetFSMountOptionsDef to be used to > manage the NFS Storage Pool XML Namespace for mount options. > > Using a new virStorageBackendNamespaceInit function, set the > virStoragePoolXMLNamespace into the _virSt

Re: [libvirt] [PATCH v4 06/10] conf: Introduce virStoragePoolXMLNamespace

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:12PM -0500, John Ferlan wrote: > Introduce the infrastructure necessary to manage a Storage Pool XML > Namespace. The general concept is similar to virDomainXMLNamespace, > except that for Storage Pools the storage backend specific details > can be stored within the _v

Re: [libvirt] [PATCH v4 05/10] virsh: Add source-protocol-ver for pool commands

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:11PM -0500, John Ferlan wrote: > Allow the addition of the to the provided XML. > > Signed-off-by: John Ferlan > --- > tools/virsh-pool.c | 12 ++-- > tools/virsh.pod| 5 + > 2 files changed, 15 insertions(+), 2 deletions(-) Reviewed-by: Daniel P.

Re: [libvirt] [PATCH v4 04/10] storage: Add the nfsvers to the command line

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:10PM -0500, John Ferlan wrote: > If protocolVer present, add the -o nfsvers=# to the command > line for the NFS Storage Pool > > Signed-off-by: John Ferlan > --- > src/storage/storage_util.c| 20 +++ > .../pool-netfs-protocol-ver-

Re: [libvirt] [PATCH v4 03/10] conf: Add optional NFS Source Pool option

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:09PM -0500, John Ferlan wrote: > Add an optional way to define which NFS Server version will be > used to content the target NFS server. > > Signed-off-by: John Ferlan > --- > docs/formatstorage.html.in| 16 ++ > docs/schemas/storagep

Re: [libvirt] [PATCH v2 13/25] qemu: Support interface model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > @@ -472,9 +472,15 @@ qemuBuildVirtioDevStr(virBufferPtr buf, > ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_BLK_PCI_NON_TRANSITIONAL; > break; > > +case VIR_DOMAIN_DEVICE_NET: > +has_tmodel = STREQ_NU

Re: [libvirt] [PATCH v4 02/10] docs: Add news mention of NFS Storage Pool mount options

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:08PM -0500, John Ferlan wrote: > Signed-off-by: John Ferlan > --- > docs/news.xml | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index bc11791d03..12bff206c1 100644 > --- a/docs/news.xml > +++ b/docs/news.xml >

Re: [libvirt] [PATCH v4 01/10] storage: Add default mount options for NFS Storage Pools

2019-01-29 Thread Daniel P . Berrangé
On Thu, Jan 17, 2019 at 04:22:07PM -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1584663 > > Modify the command generation to add some default options to > an NFS Storage Pool based on the OS type. For Linux, it'll be > the "nodev, nosuid, noexec". For FreeBSD, it'll be "

Re: [libvirt] [PATCH v2 12/25] qemu: Support disk model=virtio-{non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > +switch (devtype) { > +case VIR_DOMAIN_DEVICE_DISK: > +has_tmodel = device.data.disk->model == > VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL; > +has_ntmodel = device.data.disk->model == > VIR_DOMAIN_

Re: [libvirt] [PATCH 6/7] storage: Process storage pool capabilities

2019-01-29 Thread Michal Privoznik
On 1/16/19 2:15 AM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1581670 During storage driver backend initialization, let's save which backends are available in the storage pool capabilities. In order to format those, we need add a connectGetCapabilities processor to the stor

Re: [libvirt] [PATCH 0/7] Add support to list Storage Driver backend capabilities

2019-01-29 Thread Michal Privoznik
On 1/16/19 2:15 AM, John Ferlan wrote: Although I suppose this could have been an RFC - I just went with a v1. I would think at least the first 4 patches are non controversial. Beyond that it depends on what is "expected" as output for the capabilities output for the storage driver. John Ferlan

Re: [libvirt] [PATCH 7/7] storage: Add storage backend pool/vol API's to capability output

2019-01-29 Thread Michal Privoznik
On 1/16/19 2:15 AM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1581670 Add the Storage Pool and Volume API's defined for each generated capability output, such as: dir

Re: [libvirt] question: about iothreads count restrict in virDomainDefCheckABIStabilityFlags

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 05:33:30PM +0800, WangJie (Pluto) wrote: > Hi, > > Migrate feature have a restrict: target domain iothreads count > must match source > > The relevant code as follows: > > > > if (src->niothreadids != dst->niothreadids) { > virReport

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

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: [...] > +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml > @@ -0,0 +1,18 @@ > + > + QEMUGuest1 > + c7a5fdbd-edaf-9455-926a-d65c16db1809 > + 219136 > + > +hvm > + You can drop the element both here... [...] > +++ b/tests

Re: [libvirt] [Qemu-devel] [PATCH 2/3] scsi-disk: Add device_id property

2019-01-29 Thread Peter Krempa
On Mon, Jan 28, 2019 at 17:55:14 +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 28.01.2019 um 09:50 hat Peter Krempa geschrieben: > [...] > >> 2) Is actually using 'scsi-cd'/'scsi-hd' the better option than > >> 'scsi-disk'? > > > > Yes, scsi-disk is a legacy device. Maybe we shoul

Re: [libvirt] [PATCH v2 10/25] qemu: capabilities: Add virtio/vhost {non-}transitional

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > This adds QEMU_CAPS flags for the following devices > > virtio-blk-pci-non-transitional > virtio-net-pci-transitional > virtio-net-pci-non-transitional > vhost-scsi-pci-transitional > vhost-scsi-pci-non-transitional >

[libvirt] question: about iothreads count restrict in virDomainDefCheckABIStabilityFlags

2019-01-29 Thread WangJie (Pluto)
Hi, Migrate feature have a restrict: target domain iothreads count must match source The relevant code as follows: if (src->niothreadids != dst->niothreadids) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target domain iothreads count %zu does not " "mat

Re: [libvirt] [PATCH v2 09/25] qemu: command: Add qemuCaps to BuildVirtioStr

2019-01-29 Thread Andrea Bolognani
On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote: > It will be used in future patches > > Signed-off-by: Cole Robinson > --- > src/qemu/qemu_command.c | 30 -- > 1 file changed, 16 insertions(+), 14 deletions(-) Reviewed-by: Andrea Bolognani -- Andrea Bologn

[libvirt] [PATCH v2] qemu: Assume migration with a network disk migration is safe

2019-01-29 Thread Michal Privoznik
If a domain has a disk that is type='network' we require specific cache mode to allow migration with it (either 'directsync' or 'none'). This doesn't make much sense since network disks are supposed to be safe to migrate by default. At the same time, we should be checking for the actual source typ