[libvirt] [PATCH] storage: fix the error message when encrypted raw volume resize

2018-08-20 Thread Shivaprasad G Bhat
The vol-dumpxml shows the volume target format type as raw for encrypted volumes. The error message when attempting to resize with prealloc is confusing here. Signed-off-by: Shivaprasad G Bhat --- src/storage/storage_util.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [RFC PATCH 00/28] Enable multifunction pci hotplug

2018-03-15 Thread Shivaprasad G Bhat
On 03/15/2018 08:03 PM, Daniel P. Berrangé wrote: On Thu, Mar 15, 2018 at 07:54:47PM +0530, Shivaprasad G Bhat wrote: On 03/15/2018 03:31 PM, Daniel P. Berrangé wrote: On Wed, Mar 14, 2018 at 10:44:30PM +0530, Shivaprasad G Bhat wrote: Hi All, I have revisited/rewritten my previously

Re: [libvirt] [RFC PATCH 00/28] Enable multifunction pci hotplug

2018-03-15 Thread Shivaprasad G Bhat
On 03/15/2018 03:31 PM, Daniel P. Berrangé wrote: On Wed, Mar 14, 2018 at 10:44:30PM +0530, Shivaprasad G Bhat wrote: Hi All, I have revisited/rewritten my previously posted patches. Here is the RFC. Since this patchset is a complete rewrite, I am starting with v1 here. The semantics

[libvirt] [RFC PATCH 03/28] tests: pci: Mock the iommu groups and vfio

2018-03-15 Thread Shivaprasad G Bhat
The iommu group, /dev/vfio/ behaviours of the host are mocked. This patch implments support for multifunction/multiple devices per iommu groups and emulates the /dev/vfio/ file correctly. This code helps adding necessary testcases for pci-hotplug code. Signed-off-by: Shivaprasad G Bhat <

[libvirt] [RFC PATCH 07/28] tests: Add a baseline test for multifunction pci device use case

2018-03-15 Thread Shivaprasad G Bhat
00.X - are Multifunction PCI cards. :06:12.[5|6] - are SRIOV Virtual functions The next few commits improve on automatically detecting the multifunction cards and auto-assinging the addresses appropriately. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- .../h

[libvirt] [RFC PATCH 25/28] qemu: hotplug: Implement multifunction device hotplug

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c |2 src/qemu/qemu_domain_address.c | 68 + src/qemu/qemu_domain_address.h |5 + src/qemu/qemu_dr

[libvirt] [RFC PATCH 23/28] qemu: hotplug: Queue and wait for multiple devices

2018-03-15 Thread Shivaprasad G Bhat
With multifunction devices, multiple delete requests are sent to qemu and all the requests should be queued up. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.h |3 ++- src/qemu/qemu_hotplug.c | 38 -- 2

[libvirt] [RFC PATCH 13/28] util: make virHostdevIsVirtualFunction() public

2018-03-15 Thread Shivaprasad G Bhat
This function will be useful in qemu_domain_address.c, so promote it from static. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |1 + src/util/virhostdev.c|2 +- src/util/virhostdev.h|3 +++ 3 files changed, 5 insertions

[libvirt] [RFC PATCH 00/28] Enable multifunction pci hotplug

2018-03-15 Thread Shivaprasad G Bhat
but necessary for the remaining patches. = Patch 7-14 - Detect and auto-address PCI multifunction devices. = Patch 15-25 - Refactor/Prepare for hotplug/unplug Patch 26-28 - Finally implement Hotplug/Unplug Thanks, Shivaprasad --- Shivaprasad G Bhat (28): Fix the iommu group

[libvirt] [RFC PATCH 02/28] util: move hostdev passthrough support functions to utility

2018-03-15 Thread Shivaprasad G Bhat
There is some duplicity of code here. Move them to common place. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |2 + src/qemu/qemu_capabilities.c |5 +-- src/qemu/qemu_driver.c |5 +-- src/qemu/qemu_hostdev.c

[libvirt] [RFC PATCH 26/28] qemu: hotplug : Prevent updates to mulitfunction device

2018-03-15 Thread Shivaprasad G Bhat
The PCI hostdevs once part of the domain, cant be changed. So, prevent attempts. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/sr

[libvirt] [RFC PATCH 27/28] qemu: hotplug: Move out the Single function check

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index a339e92bfa..5f6302eaf9 100644 --- a/src/qemu/qemu_hot

[libvirt] [RFC PATCH 04/28] virpcitest: Change the stub driver to vfio from pci-stub

2018-03-15 Thread Shivaprasad G Bhat
The pci-stub is obsolete for a while now. Upcoming test cases try to test the VFIO hotplug/unplug cases. Change the default test driver to vfio-pci instead of pci-stub, and fail bind for pci-stub instead. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tests/virhostdev

[libvirt] [RFC PATCH 17/28] qemu: hotplug: Move the detach of PCI device to the beginnging of live hotplug

2018-03-15 Thread Shivaprasad G Bhat
detach all funtions first before attempting to hotplug any. We need not move the detach for net devices using SRIOV as all SRIOV devices are single function devices and can be independently detached as usual. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hot

[libvirt] [RFC PATCH 15/28] conf: Add helper to get active functions of a slot of domain

2018-03-15 Thread Shivaprasad G Bhat
In some cases it may be better to have a bitmap representing state of individual functions rather than iterating the definition. The new helper creates a bitmap representing the state from the domain definition. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- sr

[libvirt] [RFC PATCH 09/28] tests: qemu: mock pci environment for qemuargv2xmltests

2018-03-15 Thread Shivaprasad G Bhat
The upcoming patches verify the sysfs for pci hostdevs. So, preload the mock library and change the device to what exists on the mock environment to avoid a failure. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tests/qemuargv2xmldata/hostdev-pci-address.args |2 +-

[libvirt] [RFC PATCH 06/28] tests: qemu: Add test case for pci-hostdev hotplug

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/util/virprocess.h |2 - tests/Makefile.am |7 ++ tests/qemuhotplugtest.c| 42 ++ .../qemuhotplug-hostdev-p

[libvirt] [RFC PATCH 18/28] qemu: hotplug: move assignment outside qemuDomainAttachHostPCIDevice

2018-03-15 Thread Shivaprasad G Bhat
No functional change. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 214e169980..007e

[libvirt] [RFC PATCH 11/28] qemu: address: Separate the slots into multiple aggregates

2018-03-15 Thread Shivaprasad G Bhat
-root-ports and >= 2 for the the PCI multifunction cards(coming..). Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/device_conf.h |1 src/conf/domain_addr.c | 43 ++--- src/conf/domain_addr.h | 36 -

[libvirt] [RFC PATCH 05/28] virpcimock: Mock the SRIOV Virtual functions

2018-03-15 Thread Shivaprasad G Bhat
to use the newly added VFs for their use case. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- .../hostdev-pci-address-device.args|2 +- .../hostdev-pci-address-device.xml |2 +- tests/qemuxml2argvdata/hostdev-pci-address.args

[libvirt] [RFC PATCH 19/28] Introduce virDomainDeviceDefParseXMLMany

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/domain_conf.c | 169 -- src/conf/domain_conf.h | 36 ++ src/libvirt_private.syms |6 ++ 3 files changed, 190 insertions(+), 21 deletions(-) diff --git

[libvirt] [RFC PATCH 20/28] Introduce qemuDomainDeviceParseXMLMany

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c | 67 src/qemu/qemu_domain.h |5 2 files changed, 72 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 12ed

[libvirt] [RFC PATCH 10/28] virhostdev: Introduce virHostdevPCIDevicesBelongToSameSlot

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |2 ++ src/util/virhostdev.c| 29 + src/util/virhostdev.h|5 + src/util/virpci.c|2 +- src/util/virpci.h|3 +++ 5 files chang

[libvirt] [RFC PATCH 16/28] qemu: hostdev: Move the hostdev preparation to a separate function

2018-03-15 Thread Shivaprasad G Bhat
No functional change. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 90 +-- src/qemu/qemu_hotplug.h |5 +++ 2 files changed, 60 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_hotpl

[libvirt] [RFC PATCH 12/28] qemu: address: Enable auto addressing multifunction cards

2018-03-15 Thread Shivaprasad G Bhat
function being part of the xml, this has never been supported. So, the libvirt doesn't consider this either as a multifunction card. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.h | 11 + src/qemu/qemu_domain_add

[libvirt] [RFC PATCH 28/28] qemu: hotplug: Implement multifunction device unplug

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c | 48 +--- src/qemu/qemu_hotplug.c | 111 +++ src/qemu/qemu_hotplug.h |5 ++ tests/qemuhotplugtest.c | 26 --- 4 files change

[libvirt] [RFC PATCH 14/28] conf: qemu: validate multifunction hostdevice domain configs

2018-03-15 Thread Shivaprasad G Bhat
It is invalid to have secondary functions without the primary functions part of the domain. Prevents new domain define, but existing ones would not vanish. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c |3 + sr

[libvirt] [RFC PATCH 08/28] util: virpci: detect if the device is a multifunction device from sysfs

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |1 + src/node_device/node_device_udev.c |2 +- src/util/virhostdev.c |2 +- src/util/virpci.c | 20 ++-- src/util/vi

[libvirt] [RFC PATCH 24/28] domain: addr: Introduce virDomainPCIAddressEnsureMultifunctionAddress

2018-03-15 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/device_conf.h |6 +++ src/conf/domain_addr.c | 84 ++ src/conf/domain_addr.h |5 +++ src/libvirt_private.syms |1 + src/util/virpci.h|2 + 5

[libvirt] [RFC PATCH 22/28] qemu: refactor qemuDomain[Attach|Detach]DeviceLive

2018-03-15 Thread Shivaprasad G Bhat
Helps calling multiple time per device --- src/qemu/qemu_driver.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 18e88f05bb..d2e10082ea 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [RFC PATCH 21/28] qemu: refactor qemuDomain[Attach|Detach]DeviceConfig

2018-03-15 Thread Shivaprasad G Bhat
This helps calling the routines with a list of devices. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/sr

[libvirt] [RFC PATCH 01/28] tests: Fix the iommu group path in mock pci

2018-03-15 Thread Shivaprasad G Bhat
The mocked path falls into /sys/bus/kernel/iommu_groups instead of /sys/kernel/iommu_groups. Needed for adding some new test cases. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tests/virpcimock.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [libvirt] [PATCH v4] virt-aa-helper: Set the supported features

2018-02-06 Thread Shivaprasad G Bhat
Actually Christian On 02/06/2018 07:12 PM, Peter Krempa wrote: On Tue, Feb 06, 2018 at 08:08:14 -0500, Shivaprasad G Bhat wrote: The virt-aa-helper fails to parse the xmls with the memory/cpu hotplug features or user assigned aliases. Set the features in xmlopt->config for the pars

[libvirt] [PATCH v4] virt-aa-helper: Set the supported features

2018-02-06 Thread Shivaprasad G Bhat
The virt-aa-helper fails to parse the xmls with the memory/cpu hotplug features or user assigned aliases. Set the features in xmlopt->config for the parsing to succeed. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/domain_conf.h|2 ++ src/securit

[libvirt] [PATCH v3] virt-aa-helper: Skip feature support checks while parsing

2018-02-05 Thread Shivaprasad G Bhat
virt-aa-helper need not verify the feature support as libvirt does it during domain creation anyway. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/domain_conf.c|3 +++ src/conf/domain_conf.h|1 + src/security/virt-aa-helper.c |6 +++

[libvirt] [PATCH v2] virt-aa-helper: Set the supported features

2018-01-19 Thread Shivaprasad G Bhat
The virt-aa-helper fails to parse the xmls with the memory/cpu hotplug features or user assigned aliases. Set the features in xmlopt->config for the parsing to succeed. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/security/virt-aa-helper.c |8 +++- 1 fil

[libvirt] [PATCH] virt-aa-helper: Allow parsing supported features for qemu/kvm

2018-01-11 Thread Shivaprasad G Bhat
The virt-aa-helper fails to parse the xmls with the memory/cpu hotplug features or user assigned aliases. Set the features in xmlopt->config for the parsing to succeed. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/conf/domain_conf.c

[libvirt] [PATCH v2 2/2] qemu: Add support for pseries machine's max-cpu-compat= parameter

2018-01-05 Thread Shivaprasad G Bhat
When the -machine pseries,max-cpu-compat=X is supported use machine parameter instead of -cpu host,compat=X parameter as that is deprecated now with qemu > v2.10. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1519146 Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> ---

[libvirt] [PATCH v2 1/2] qemu: Add capability for pseries machine's max-cpu-compat= parameter

2018-01-05 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |7 +++ src/qemu/qemu_capabilities.h |1 + tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml |1 + 3 files changed, 9 insertions(+) diff

[libvirt] [PATCH v2 0/2] Enable pseries machine's max-cpu-compat parameter

2018-01-05 Thread Shivaprasad G Bhat
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1519146 --- Shivaprasad G Bhat (2): qemu: Add capability for pseries machine's max-cpu-compat= parameter qemu: Add support for pseries machine's max-cpu-compat= parameter src/qemu/qemu_capabilities.c |7

[libvirt] [PATCH 2/2] qemu: Add support for pseries machine's max-cpu-compat= parameter

2018-01-04 Thread Shivaprasad G Bhat
When the -machine pseries,max-cpu-compat=X is supported use machine parameter instead of -cpu host,compat=X parameter as that is deprecated now with qemu > v2.10. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1519146 Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> ---

[libvirt] [PATCH 1/2] qemu: Add capability for pseries machine's max-cpu-compat= parameter

2018-01-04 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |7 +++ src/qemu/qemu_capabilities.h |2 ++ tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml |1 + 3 files changed, 10 insertions(+) diff

[libvirt] [PATCH 0/2] Enable pseries machine's max-cpu-compat parameter

2018-01-04 Thread Shivaprasad G Bhat
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1519146 --- Shivaprasad G Bhat (2): qemu: Add capability for pseries machine's max-cpu-compat= parameter qemu: Add support for pseries machine's max-cpu-compat= parameter src/qemu/qemu_capabilities.c |7

[libvirt] [PATCH] qemu_capabilities: Fix the formatting with a space

2017-07-23 Thread Shivaprasad G Bhat
It was observed while adding new property that there should be a space before closing a curly brace in intel-iommu object property definition. Fixing it as a separate patch. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |2 +- 1 file chan

Re: [libvirt] [PATCH v2 2/3] qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE

2017-07-21 Thread Shivaprasad G Bhat
On 07/19/2017 07:08 PM, Andrea Bolognani wrote: On Mon, 2017-07-17 at 21:28 +0530, Shivaprasad G Bhat wrote: [...] @@ -1900,6 +1905,9 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { { "intel-iommu", virQEMUCapsObjectPropsIntelIOMMU, ARRAY_C

Re: [libvirt] [PATCH v2 3/3] qemu: Enable NUMA node tag in pci-root for PPC64

2017-07-21 Thread Shivaprasad G Bhat
Hi Andrea, On 07/20/2017 09:16 PM, Andrea Bolognani wrote: On Mon, 2017-07-17 at 21:29 +0530, Shivaprasad G Bhat wrote: @@ -3786,6 +3786,11 @@ part of the specified NUMA node (it is up to the user of the libvirt API to attach host devices to the correct pci

[libvirt] [PATCH v3 3/3] qemu: Enable NUMA node tag in pci-root for PPC64

2017-07-21 Thread Shivaprasad G Bhat
option applies to all the PHBs unless explicitly specified with the option on the respective PHB of CLI. The default PHB has the emulated devices only, so the patch prevents setting the NUMA node for the default PHB. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> ---

[libvirt] [PATCH v3 2/3] qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE

2017-07-21 Thread Shivaprasad G Bhat
The patch adds a capability for spapr-pci-host-bridge.numa_node. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> Reviewed-by: Andrea Bolognani <abolo...@redhat.com> --- src/qemu/qemu_capabilities.c | 10 ++ src/qemu/qemu_ca

[libvirt] [PATCH v2 3/3] qemu: Enable NUMA node tag in pci-root for PPC64

2017-07-17 Thread Shivaprasad G Bhat
option applies to all the PHBs unless explicitly specified with the option on the respective PHB of CLI. The default PHB has the emulated devices only, so the patch prevents setting the NUMA node for the default PHB. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> ---

[libvirt] [PATCH v2 2/3] qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE

2017-07-17 Thread Shivaprasad G Bhat
The patch adds a capability for spapr-pci-host-bridge.numa_node. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |8 ++ src/qemu/qemu_capabilities.h |1 .../caps_2.6.0.ppc64le.r

[libvirt] [PATCH v2 0/3] qemu: Enable NUMA node tag in pci-root for PPC64

2017-07-17 Thread Shivaprasad G Bhat
.com/archives/libvir-list/2017-July/msg00383.html --- Shivaprasad G Bhat (3): Add capabilities for qemu-2.9.0 ppc64 qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE qemu: Enable NUMA node tag in pci-root for PPC64 docs/formatdomain.htm

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-12 Thread Shivaprasad G Bhat
On 07/12/2017 04:25 PM, Andrea Bolognani wrote: [libvir-list added to the loop] On Tue, 2017-07-04 at 10:47 +0200, Greg Kurz wrote: On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson wrote: On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: The sPAPR

[libvirt] [PATCH] qemu: Take all PHBs into account while calculating memlock limits

2017-06-30 Thread Shivaprasad G Bhat
Now that the multi-phb support series is in, work on the TODO at qemuDomainGetMemLockLimitBytes() to arrive at the correct memlock limit value. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- This patch should be applied on top of Andrea's multi-phb support patchset. sr

[libvirt] [PATCH] qemu: hotplug: Release address properly when redirected device attach failure

2017-05-30 Thread Shivaprasad G Bhat
The virDomainUSBAddressEnsure returns 0 or -1 and checking for 1 is wrong. Fix it. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/sr

[libvirt] [PATCH] virpci: Enable GEN4 card Link speed (16GT/s)

2017-03-01 Thread Shivaprasad G Bhat
This enables GEN4 link speed (16GT/s) property to be fetched properly and thus allows the detach/reattach/dumpxml to work. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- Verified on Mellanox MT27800 Family ConnectX-5 IB card. # lspci -kvvvs 0001:01:00.4 0001:01:00.4 Infi

[libvirt] [PATCH] qemu: Use iohelper during restore

2017-01-27 Thread Shivaprasad G Bhat
Commit afe6e58 & c4caab53 made necessary changes to use io-helpers during save and restore. The commit c4caab53 missed to remove the redundant check in qemuDomainSaveImageOpen() because of which virFileWrapperFdNew() is not called if bypass_cache is false. Signed-off-by: Shivaprasad G Bhat

Re: [libvirt] [PATCH v2] util: disallow assigning or resetting a pci-bridge device

2017-01-23 Thread Shivaprasad G Bhat
Hi Laine, On 01/21/2017 01:50 AM, Laine Stump wrote: On 01/18/2017 11:10 AM, Martin Kletzander wrote: On Wed, Jan 18, 2017 at 07:29:29PM +0530, Shivaprasad G Bhat wrote: It is destructive to attempt reset on a pci-bridge, the host can crash. The bridges won't contain any guest data

[libvirt] [PATCH v2 2/2] util: disallow resetting a pci-bridge device

2017-01-23 Thread Shivaprasad G Bhat
It is destructive to attempt reset on a pci-bridge, the host can crash. The bridges won't contain any guest data and neither they can be passed through using vfio/stub. So, no point in allowing a reset on them. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/util/vi

[libvirt] [PATCH v2 1/2] util: virhostdev: disallow assigning a pci-bridge to a guest

2017-01-23 Thread Shivaprasad G Bhat
Non-endpoint devices like pci-bridges cannot be passedthrough to guests. Prevent such attempts. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/util/virhostdev.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/util/virhostdev.c b/src/util/virhos

[libvirt] [PATCH v2] util: disallow assigning or resetting a pci-bridge device

2017-01-18 Thread Shivaprasad G Bhat
It is destructive to attempt reset on a pci-bridge, the host can crash. The bridges won't contain any guest data and neither they can be passed through using vfio/stub. So, no point in allowing a reset on them. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- sr

[libvirt] [PATCH] util: disallow resetting a pci-bridge device

2017-01-17 Thread Shivaprasad G Bhat
It is distructive to attempt a reset on pci-bridge, the host can crash. The bridges won't contain any guest data and neither they can be passed through using vfio/stub. So, no point in allowing a reset for them. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/util/vi

Re: [libvirt] [PATCH] NEWS: Update after virtio console on ppc64 fix

2016-12-21 Thread Shivaprasad G Bhat
Hi Andrea, On 12/21/2016 11:06 PM, Andrea Bolognani wrote: + qemu: Make virtio console usable on ppc64 guests + The chardev detection code has been improved and can now handle this + configuration properly. + Thanks for this patch. Missed it, I am yet to get

Re: [libvirt] [PATCH 2/2] qemu: Enable NUMA node tag in pci-root for PPC64

2016-11-14 Thread Shivaprasad G Bhat
Hi Daniel, Can we have this patch for now ? Or should it come along with multiple-phb support ? Thanks, Shivaprasad On 11/08/2016 07:40 PM, Shivaprasad G Bhat wrote: On 11/08/2016 05:59 PM, Daniel P. Berrange wrote: That doesn't really solve the bug above properly - your solution here

Re: [libvirt] [PATCH 2/2] qemu: Enable NUMA node tag in pci-root for PPC64

2016-11-08 Thread Shivaprasad G Bhat
On 11/08/2016 05:59 PM, Daniel P. Berrange wrote: That doesn't really solve the bug above properly - your solution here only works if all the PCI devices (whether emulated or host-assigned) are to be associated with the same guest NUMA node. This is a pretty restrictive setup and so of limited

[libvirt] [PATCH 2/2] qemu: Enable NUMA node tag in pci-root for PPC64

2016-11-08 Thread Shivaprasad G Bhat
be exposed on a per-PHB/per-domain basis. So, enable NUMA node tag in pci-root controller on PPC. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- docs/formatdomain.html.in |5 ++ src/qemu/qemu_command.c| 25 +++

[libvirt] [PATCH 1/2] qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE

2016-11-08 Thread Shivaprasad G Bhat
The patch adds a capability for spapr-pci-host-bridge.numa_node. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |7 ++ src/qemu/qemu_capabilities.h |1 .../qemucapabilitiesdata/caps_1.2.2.

[libvirt] [PATCH 0/2] qemu: Enable NUMA node tag in pci-root for PPC64

2016-11-08 Thread Shivaprasad G Bhat
could be enforced during migration. Not addressing that in these two patches. --- Shivaprasad G Bhat (2): qemu: capabilitity: Introduce QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE qemu: Enable NUMA node tag in pci-root for PPC docs/formatdomain.html.in |5

[libvirt] [PATCH] Allow virtio-console on PPC64

2016-10-19 Thread Shivaprasad G Bhat
before. Fixes - https://bugzilla.redhat.com/show_bug.cgi?id=1257813 Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/sr

Re: [libvirt] [PATCH 7/7] qemu: Allow making vcpus hotpluggable with virDomainSetVcpusFlags

2016-09-29 Thread Shivaprasad G Bhat
On 09/29/2016 05:50 PM, Peter Krempa wrote: On Thu, Sep 29, 2016 at 17:37:53 +0530, Shivaprasad G Bhat wrote: On 09/29/2016 05:32 PM, Peter Krempa wrote: On Thu, Sep 29, 2016 at 16:29:13 +0530, Shivaprasad G Bhat wrote: On 09/21/2016 05:19 PM, Peter Krempa wrote: Implement support

Re: [libvirt] [PATCH 7/7] qemu: Allow making vcpus hotpluggable with virDomainSetVcpusFlags

2016-09-29 Thread Shivaprasad G Bhat
On 09/29/2016 05:32 PM, Peter Krempa wrote: On Thu, Sep 29, 2016 at 16:29:13 +0530, Shivaprasad G Bhat wrote: On 09/21/2016 05:19 PM, Peter Krempa wrote: Implement support for VIR_DOMAIN_VCPU_HOTPLUGGABLE so that users can choose to make vcpus added by the API removable. --- src/qemu

Re: [libvirt] [PATCH 7/7] qemu: Allow making vcpus hotpluggable with virDomainSetVcpusFlags

2016-09-29 Thread Shivaprasad G Bhat
On 09/21/2016 05:19 PM, Peter Krempa wrote: Implement support for VIR_DOMAIN_VCPU_HOTPLUGGABLE so that users can choose to make vcpus added by the API removable. --- src/qemu/qemu_driver.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git

Re: [libvirt] [PATCH] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-09-15 Thread Shivaprasad G Bhat
Hi Peter, This saves few lines of code for sure :) I see the ignore_error for virXPathInt(). I see no issues. ACK Thanks a lot! -Shivaprasad On 09/15/2016 01:47 PM, Peter Krempa wrote: From: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> virsh maxvcpus --type kvm output is useless

Re: [libvirt] [PATCH] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-09-07 Thread Shivaprasad G Bhat
On 09/06/2016 05:56 PM, Peter Krempa wrote: On Tue, Sep 06, 2016 at 16:59:09 +0530, Shivaprasad G Bhat wrote: virsh maxvcpus --type kvm output is useless on PPC. Also, in commit e6806d79 we documented not rely on virConnectGetMaxVcpus output. Fix the maxvcpus to use

[libvirt] [PATCH v4] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-09-07 Thread Shivaprasad G Bhat
and arch which is what the command intends to show anyway. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tools/virsh-host.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c

[libvirt] [PATCH] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-09-06 Thread Shivaprasad G Bhat
and arch which is what the command intends to show anyway. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tools/virsh-host.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 5

Re: [libvirt] [PATCH v2 08/23] qemu: monitor: Add algorithm for combining query-(hotpluggable-)-cpus data

2016-08-23 Thread Shivaprasad G Bhat
On 08/19/2016 08:08 PM, Peter Krempa wrote: For hotplug purposes it's necessary to retrieve data using query-hotpluggable-cpus while the old query-cpus API report thread IDs and order of hotplug. This patch adds code that merges the data using a rather non-trivial algorithm and fills the data

[libvirt] [PATCH v2] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-07-29 Thread Shivaprasad G Bhat
and arch which is what the command intends to show anyway. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tools/virsh-host.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 5

[libvirt] [PATCH] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-07-27 Thread Shivaprasad G Bhat
previous patches in this yet. Previous series fixing the virConnectGetDomainCapabilities can be found here. https://www.redhat.com/archives/libvir-list/2016-June/msg01873.html --- Shivaprasad G Bhat (1): virsh: use virConnectGetDomainCapabilities with maxvcpus tools/virsh-host.c | 33

[libvirt] [PATCH] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-07-27 Thread Shivaprasad G Bhat
and arch which is what the command intends to do anyway. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- tools/virsh-host.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 5

[libvirt] [PATCH] qemu: Adjust the cur_ballon on coldplug/unplug of dimms

2016-07-21 Thread Shivaprasad G Bhat
The cur_balloon also increases/decreases with dimm hotplug/unplug. To be consistent, adjust the value for coldplug too. This was inconsistently taken care when cur_ballon != memory to begin with. The patch fixes it irrespective of that. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.

[libvirt] [PATCH v2 3/3] Document to not rely on virConnectGetMaxVcpus API

2016-06-24 Thread Shivaprasad G Bhat
The API virConnectGetMaxVcpus doesn't really reflect the actual usable number of cpus as the maximum limits can be different for kvm and/or qemu. So update the documentation to use virConnectGetDomainCapabilities() instead. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --

[libvirt] [PATCH v2 2/3] qemu: check the kvm host cpu max limits in virConnectGetDomainCapabilities

2016-06-24 Thread Shivaprasad G Bhat
The qemu limit and host limit both should be considered for the domain vcpu max limits. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c | 11 --- src/qemu/qemu_capabilities.h |3 ++- src/qemu/qemu_driver.c |2 +-

[libvirt] [PATCH v2 0/3] Fix the domain capabilities wrt maxvcpus

2016-06-24 Thread Shivaprasad G Bhat
. http://www.redhat.com/archives/libvir-list/2016-June/msg00947.html --- Shivaprasad G Bhat (3): Rename kvmGetMaxVCPUs() to virHostCPUGetKVMMaxVCPUs() Check the kvm host cpu max limits in virConnectGetDomainCapabilities Document to not rely on virConnectGetMaxVcpus API src

[libvirt] [PATCH v2 1/3] Rename kvmGetMaxVCPUs() to virHostCPUGetKVMMaxVCPUs()

2016-06-24 Thread Shivaprasad G Bhat
This kvmGetMaxVCPUs() needs to be used at two different places so move it to utils with appropriate name and mark it as private global now. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |1 + src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 0/4] Fix the domain capabilities wrt maxvcpus

2016-06-24 Thread Shivaprasad G Bhat
On 06/22/2016 08:55 PM, Andrea Bolognani wrote: On Wed, 2016-06-15 at 09:54 +, Shivaprasad G Bhat wrote: This series addresses the comments to my patch in http://www.redhat.com/archives/libvir-list/2016-May/msg00218.html The v2 got quite a lot of criticism to not to change

[libvirt] [PATCH 4/4] Check the kvm host cpu max limits in virConnectGetDomainCapabilities()

2016-06-15 Thread Shivaprasad G Bhat
The qemu limit and host limit both should be considered for the domain vcpu max limits. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- docs/formatdomaincaps.html.in |4 ++-- src/conf/domain_capabilities.c | 10 +++--- src/conf/domain_capabilities.h |1 + sr

[libvirt] [PATCH 3/4] Check for VFIO too where the Legacy passthrough is checked

2016-06-15 Thread Shivaprasad G Bhat
On PPC the Legacy patthrough is not supported and only VFIO is supported. So, the checks at places to confirm if the host is passthrough capable checks only Legacy, fix it. This is seen at only one place now. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_dr

[libvirt] [PATCH 2/4] Rename and move kvmGetMaxVCPUs to utils and extend it

2016-06-15 Thread Shivaprasad G Bhat
This function needs to be used at two different places and make it global now. Also, extend it to return the NR_CPUs when needed. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/libvirt_private.syms |1 + src/qemu/qemu_driver.c

[libvirt] [PATCH 1/4] Document to not rely on virConnectGetMaxVcpus API

2016-06-15 Thread Shivaprasad G Bhat
The API virConnectGetMaxVcpus doesnt really reflect the actual usable number of cpus as the maximum limits can be different for kvm and/or qemu. So update the documentation to use virConnectGetDomainCapabilities() instead. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --

[libvirt] [PATCH 0/4] Fix the domain capabilities wrt maxvcpus

2016-06-15 Thread Shivaprasad G Bhat
() is extended to check for the host limits and the NR_CPUs are also returned. I am planning to follow up this series with possible fixes to maxvcpus command once this merged. --- Shivaprasad G Bhat (4): Document to not rely on virConnectGetMaxVcpus API Rename and move kvmGetMaxVCPUs

[libvirt] [PATCH] Call qemuDomainObjEndJob when qemuCaps is null during hotplug

2016-05-25 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 249393a..3f26f1f 100644 --- a/src/qemu/qemu_driver.c +++ b/sr

[libvirt] [PATCH] Unref the cfg in qemuDomainAttachHostPCIDevice()

2016-05-25 Thread Shivaprasad G Bhat
Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 807aaf8..41a0e4f 100644 --- a/src/qemu/qemu_hotplug.c +++ b/sr

[libvirt] [PATCH v3 05/13] Separate the hostdevice preparation and checks to a new funtion

2016-05-23 Thread Shivaprasad G Bhat
No Functional change. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 90 +-- src/qemu/qemu_hotplug.h |5 +++ 2 files changed, 61 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_hotpl

[libvirt] [PATCH v3 12/13] Pass virDomainDeviceDefListPtr to hotplug functions

2016-05-23 Thread Shivaprasad G Bhat
This actually does all the things as though there were more than one device in list. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c | 50 +++--- src/qemu/qemu_domain.h |6 +-- src/qemu/qemu_driver.c

[libvirt] [PATCH v3 13/13] Enable PCI Multifunction hotplug/unplug

2016-05-23 Thread Shivaprasad G Bhat
The flow is to parse and create a list of devices and pass onto the hotplug functions. The patch also removes all checks forbidding the multifunction hotplug. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c

[libvirt] [PATCH v3 11/13] Move the detach of PCI device to the beginnging of live hotplug

2016-05-23 Thread Shivaprasad G Bhat
detach all funtions first before attempting to hotplug any. We need not move the detach for net devices using SRIOV as all SRIOV devices are single function devices and can be independently detached as usual. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hot

[libvirt] [PATCH v3 10/13] Move the virDomainDefCompatibleDevice checks a level down

2016-05-23 Thread Shivaprasad G Bhat
The checks need to be performed per device and its better to do them a level down in stack as we prepare for multifunction hotplug. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c | 12 src/qemu/qemu_driver.c

[libvirt] [PATCH v3 09/13] Introduce qemuDomain*DeviceConfigInternal

2016-05-23 Thread Shivaprasad G Bhat
This helps moving some checks into the top function before actually going ahead with the operation. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c | 45 - 1 file changed, 36 insertions(+), 9 deletions(-)

[libvirt] [PATCH v3 06/13] Move the qemu[*]DomainDeviceConfig to qemu_domain.c

2016-05-23 Thread Shivaprasad G Bhat
No functional change. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_domain.c | 401 src/qemu/qemu_domain.h | 17 ++ src/qemu/qemu_driver.c | 401 3 files c

[libvirt] [PATCH v3 08/13] Introduce qemuDomain*DeviceLiveInternal

2016-05-23 Thread Shivaprasad G Bhat
This helps moving some checks into the top function before actually going ahead with the operation. Signed-off-by: Shivaprasad G Bhat <sb...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 47 +++ 1 file changed, 39 insertions(+), 8 del

  1   2   3   >