Re: [libvirt] [PATCH 09/10] storage: open secret driver connection at time of use

2018-01-28 Thread Michal Privoznik
On 01/26/2018 02:35 PM, Daniel P. Berrangé wrote: > Instead of passing around a virConnectPtr object, just open a connection > to the secret driver at time of use. Opening connections on demand will > be beneficial when the secret driver is in a separate daemon. It also > solves the problem that a

Re: [libvirt] [PATCH 00/10] Enable direct use of secondary drivers

2018-01-28 Thread Michal Privoznik
On 01/26/2018 02:35 PM, Daniel P. Berrangé wrote: > Currently the secondary drivers can only be used if you have a > connection to a primary hypervisor driver. This series introduces > explicit URIs that allow opening a connection that only talks to a > specific secondary driver. In the future

Re: [libvirt] [PATCH 1/6] port allocator: make used port bitmap global

2018-01-28 Thread Michal Privoznik
On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > Host tcp4/tcp6 ports is a global resource thus we need to make > port accounting also global or we have issues described in [1] when > port allocator ranges of different instances are overlapped (which > is by default for qemu for example). >

Re: [libvirt] [PATCH 2/6] port allocator: remove range on manual port reserving

2018-01-28 Thread Michal Privoznik
On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > Range check in virPortAllocatorSetUsed is not useful anymore > when we manage ports for entire unsigned short range values. > --- > src/bhyve/bhyve_command.c | 4 +--- > src/bhyve/bhyve_process.c | 4 +--- > src/qemu/qemu_process.c |

Re: [libvirt] [PATCH 3/6] port allocator: remove range check in release function

2018-01-28 Thread Michal Privoznik
On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > Range check in virPortAllocatorSetUsed is not useful anymore > when we manage ports for entire unsigned short range values. > --- > src/bhyve/bhyve_process.c| 3 +-- > src/libxl/libxl_domain.c | 3 +-- > src/libxl/libxl_migration.c

Re: [libvirt] [PATCH 4/6] port allocator: drop skip flag

2018-01-28 Thread Michal Privoznik
On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > This flag is only used for tests and tests overload socket and bind > functions using virportallocatormock.c already in a suitable fashion > so we don't need this flag at all. > --- > src/bhyve/bhyve_driver.c | 2 +- >

Re: [libvirt] [PATCH 5/6] port allocator: remove release functionality from set used

2018-01-28 Thread Michal Privoznik
On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > Let's use virPortAllocatorRelease instead of virPortAllocatorSetUsed(false). > --- > src/bhyve/bhyve_command.c | 2 +- > src/bhyve/bhyve_process.c | 2 +- > src/qemu/qemu_process.c | 16 > src/util/virportallocator.c

Re: [libvirt] [PATCH] qemu: Fix memory leak in processGuestPanicEvent

2018-01-28 Thread Michal Privoznik
On 01/26/2018 09:43 PM, John Ferlan wrote: > After processing the processEvent->data for a qemuProcessEventHandler > callout, it's expected that the called processEvent->eventType helper > will perform the proper free on the data field. In this case it's > a qemuMonitorEventPanicInfoPtr. > >

Re: [libvirt] [PATCH v5 08/16] qemu: Introduce qemuDomainDeviceDefValidateControllerPCI

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move PCI validation checks out of qemu_command into the proper > qemu_domain validation helper. > > Since there's a lot to move, we'll start slow by replicating the > pcie-root and pci-root avoidance from qemuBuildSkipController and > the first switch

Re: [libvirt] [PATCH v5 07/16] qemu: Introduce qemuDomainDeviceDefValidateControllerSCSI

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move SCSI validation from qemu_command into qemu_domain. > > Rename/reorder the args in qemuCheckSCSIControllerIOThreads > to match the caller as well as fixing up the comments to > remove the previously removed qemuCaps arg. > > Signed-off-by: John

Re: [libvirt] [PATCH v5 09/16] qemu: Add missing checks for pcie-root-port options

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > From: Andrea Bolognani > > We format the 'chassis' and 'port' properties on the QEMU command > line later on, so we should make sure they've been set. > > Signed-off-by: Andrea Bolognani > Signed-off-by:

Re: [libvirt] [PATCH v5 01/16] qemu: Split qemuDomainSetSCSIControllerModel

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Rather than one function serving two purposes, let's split things > up into qemuDomainResetSCSIControllerModel for all current callers > and then add qemuDomainCheckSCSIControllerModel when building the > controller command line to check the

Re: [libvirt] [PATCH v5 15/16] qemu: Introduce qemuDomainDeviceDefValidateControllerSATA

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move the SATA controller check from command line building to > controller def validation. This includes copying the SATA > skip check found in qemuBuildSkipController. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH v5 06/16] qemu: Add check for iothread attribute in validate controller

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Let's make sure that non SCSI virtio-scsi isn't used for any type > other than a virtio-scsi controller. > > This includes removing the check from qemuCheckSCSIControllerIOThreads > which is a very suble difference because although def->model was used

Re: [libvirt] [PATCH v5 16/16] qemu: Use switch statement for address types in qemuBuildControllerDevStr

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > From: Marc Hartmayer > > Use a switch statement instead of if-else-if statements. Move the > command line building of the iothread attribute into the common path > as the SCSI controller attributes are already validated. >

Re: [libvirt] [PATCH v5 13/16] qemu: Move PCI more command checks to controller def validate

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Excluding the qemuCaps checks, move the remainder of the checks > that validate whether the PCI definition is valid or not into > qemuDomainControllerDefValidatePCI. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c |

Re: [libvirt] [PATCH v5 05/16] qemu: Adjust SCSI controller switch in qemuBuildControllerDevStr

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Modify the SCSI controller switch during command line building > to account for all virDomainControllerModelSCSI types rather > than using the default label. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 7

Re: [libvirt] [PATCH v5 03/16] qemu: Move and rename qemuBuildCheckSCSIControllerModel

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move to qemu_domain during the validation of controller options and > rename qemuDomainCheckSCSIControllerModel. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 54 >

Re: [libvirt] [PATCH v5 02/16] qemu: Introduce qemuDomainDeviceDefValidateControllerAttributes

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move the checks that various attributes are not set on any controller > other than SCSI controller using virtio-scsi model into the common > controller validate checks. > > Need to also add a qemuDomainResetSCSIControllerModel call in order > to ensure

Re: [libvirt] [PATCH v5 12/16] qemu: Move PCI command modelName TypeToString to controller def validate

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Similar to the checking the modelName vs. NAME_NONE, let's make the > ModelNameTypeToString check more generic too within the checking done > in controller validation (with the same ignore certain models. > > NB: We need to keep the

Re: [libvirt] [PATCH v5 10/16] qemu: Use virDomainPCIControllerOpts in qemuBuildControllerDevStr

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Shorten up a few characters and reference the pciopts pointer > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 118 > > 1 file changed, 60 insertions(+), 58

Re: [libvirt] [PATCH v5 11/16] qemu: Move PCI command modelName check to controller def validate

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move the various modelName == NAME_NONE from the command line > generation into domain controller validation. Also rather than > have multiple cases with the same check, let's make the code > more generic, but also note that it was the modelName option

Re: [libvirt] [PATCH v5 14/16] qemu: Complete PCI command checks to controller def validate

2018-01-28 Thread Michal Privoznik
On 01/06/2018 12:47 AM, John Ferlan wrote: > Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI. > > This requires two test updates in order to set the correct capability > bit for an xml2xml test as well as setting up the similar capability > for the pseries memlocktest. > >