[libvirt] [PATCH v2] selinux: Avoid label reservations for type = none

2014-09-04 Thread Shivaprasad G Bhat
For security type='none' libvirt according to the docs should not generate seclabel be it for selinux or any model. So, skip the reservation of labels when type is none. Signed-off-by: Shivaprasad G Bhat --- src/security/security_selinux.c |4 +++- 1 file changed, 3 insert

[libvirt] [PATCH] Fix nodeinfo output on PPC64 KVM hosts

2015-06-24 Thread Shivaprasad G Bhat
displayed by the nodeinfo is also fixed when the host is in valid kvm state. Test results with and without fix: http://ur1.ca/mx25y Signed-off-by: Shivaprasad G Bhat --- src/nodeinfo.c | 85 1 file changed, 85 insertions(+) diff --git a/src

[libvirt] [PATCH v2 1/2] Fix nodeinfo output on PPC64 KVM hosts

2015-07-01 Thread Shivaprasad G Bhat
displayed by the nodeinfo is also fixed when the host is in valid kvm state. Test results with and without fix: http://ur1.ca/mx25y Signed-off-by: Shivaprasad G Bhat --- src/libvirt_private.syms |1 + src/nodeinfo.c | 87 -- src/util

[libvirt] [PATCH] Allow vfio hotplug of a device to the domain which owns the iommu

2015-07-14 Thread Shivaprasad G Bhat
The commit 7e72de4 didn't consider the hotplug scenarios. The patch addresses the hotplug case whereby if atleast one of the pci function is owned by a guest, the hotplug of other functions/devices in the same iommu group to the same guest goes through successfully. Signed-off-by: Shivapra

[libvirt] [PATCH] Close the source fd if the destination qemu exits during tunnelled migration

2015-09-02 Thread Shivaprasad G Bhat
tween Power hosts running in different subcores-per-core modes. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_migration.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index ff89ab5..4f9aced 100644 --- a/src

[libvirt] [PATCH v2] Close the source fd if the destination qemu exits during tunnelled migration

2015-09-14 Thread Shivaprasad G Bhat
ecessary duplicate attempts.(Would this trigger a Coverity error? I don't have a setup to check.) Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_migration.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c

[libvirt] [PATCH v3] Close the source fd if the destination qemu exits during tunnelled migration

2015-10-08 Thread Shivaprasad G Bhat
cible with repeated migrations between Power hosts running in different subcores-per-core modes. Changes from v2 -> v3: VIR_FORCE_CLOSE() needn't be called on the qemu source fd as that is closed by qemuMigrationIOFunc() for tunnelled migration. Set the fd to -1. Signed-off-by: Shiva

[libvirt] [PATCH 1/8] Initialize the stubDriver of pci devices if bound to a valid one

2015-10-29 Thread Shivaprasad G Bhat
The stubDriver name can be used to make useful decisions if readily available. Set it if bound to a valid one during initialisation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH 3/8] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-10-29 Thread Shivaprasad G Bhat
It is incorrect to attempt the device reattach of a function, when some other domain is using some functions belonging to the same iommu group. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util

[libvirt] [PATCH 2/8] Add iommu group number info to virPCIDevice

2015-10-29 Thread Shivaprasad G Bhat
The iommu group number need not be fetched from the sysfs everytime as it remains constant. Fetch it once during allocation Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c index 5acf486

[libvirt] [PATCH 4/8] Wait for vfio-pci device cleanups before reassinging the device to host driver

2015-10-29 Thread Shivaprasad G Bhat
Before unbind from stub driver libvirt should be sure the guest is not using the device anymore. The libvirt today waits for pci-stub driver alone in /proc/iommu. The same wait is needed for vfio devices too. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c |7 +++ 1 file

[libvirt] [PATCH 5/8] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-10-29 Thread Shivaprasad G Bhat
The reprobe needs to be called multiple times for vfio devices for each device in the iommu group in future patch. So split the reprobe into a new function. No functional change. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 54

[libvirt] [PATCH 7/8] Postpone reprobing till all the devices in iommu group are unbound from vfio

2015-10-29 Thread Shivaprasad G Bhat
Author: Shivaprasad G Bhat The host will crash if a device is bound to host driver when the device belonging to same iommu group is in use by any of the guests. So, do the host driver probe only after all the devices in the iommu group have unbound from the vfio. The patch fixes https

[libvirt] [PATCH 6/8] Pass activeDevs and inactiveDevs to virPCIDeviceUnbindFromStub and virPCIDeviceBindToStub

2015-10-29 Thread Shivaprasad G Bhat
The inactiveDevs need to be selectively altered for more than one device in case of vfio devices. So, pass the whole list. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src

[libvirt] [PATCH 8/8] Wait for iommmu device to go away before reprobing the host driver

2015-10-29 Thread Shivaprasad G Bhat
Author: Shivaprasad G Bhat There could be a delay of 1 or 2 seconds before the vfio-pci driver is unbound and the device file /dev/vfio/ is actually removed. If the file exists, the host driver probing the device can lead to crash. So, wait and avoid the crash. Setting the timeout to 15 seconds

[libvirt] [PATCH 0/8] Few vfio related fixes

2015-10-30 Thread Shivaprasad G Bhat
w, to get any feedback that might change things drastically. --- Shivaprasad G Bhat (8): Initialize the stubDriver of pci devices if bound to a valid one Add iommu group number info to virPCIDevice Refuse to reattach from vfio if the iommu group is in use by any domain Wai

[libvirt] [PATCH v2 0/9] Few VFIO related fixes

2015-11-01 Thread Shivaprasad G Bhat
The following series fixes few VFIO related host crashes during hotplug/unplug or bind/unbind. --- Shivaprasad G Bhat (9): Implement virPCIIsAKnownStub function Initialize the stubDriver of pci devices if bound to a valid one Add iommu group number info to virPCIDevice

[libvirt] [PATCH v2 1/9] Implement virPCIIsAKnownStub function

2015-11-01 Thread Shivaprasad G Bhat
The checks to known stubs can be easily done having this implementation and easy to reuse. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index

[libvirt] [PATCH 2/9] Initialize the stubDriver of pci devices if bound to a valid one

2015-11-01 Thread Shivaprasad G Bhat
The stubDriver name can be used to make useful decisions if readily available. Set it if bound to a valid one during initialisation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c |9 + 1 file changed, 9 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c

[libvirt] [PATCH v2 3/9] Add iommu group number info to virPCIDevice

2015-11-01 Thread Shivaprasad G Bhat
The iommu group number need not be fetched from the sysfs everytime as it remains constant. Fetch it once during allocation. Add a helper to set the value to set it from tests. Signed-off-by: Shivaprasad G Bhat --- src/libvirt_private.syms |1 + src/util/virpci.c| 11

[libvirt] [PATCH v2 4/9] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-01 Thread Shivaprasad G Bhat
It is incorrect to attempt the device reattach of a function, when some other domain is using some functions belonging to the same iommu group. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util

[libvirt] [PATCH v2 5/9] Wait for vfio-pci device cleanups before reassinging the device to host driver

2015-11-01 Thread Shivaprasad G Bhat
Before unbind from stub driver libvirt should be sure the guest is not using the device anymore. The libvirt today waits for pci-stub driver alone in /proc/iommu. The same wait is needed for vfio devices too. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c |7 +++ 1 file

[libvirt] [PATCH v2 6/9] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-01 Thread Shivaprasad G Bhat
The reprobe needs to be called multiple times for vfio devices for each device in the iommu group in future patch. So split the reprobe into a new function. No functional change. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 44 1 file

[libvirt] [PATCH v2 7/9] Pass activeDevs and inactiveDevs to virPCIDeviceUnbindFromStub and virPCIDeviceBindToStub

2015-11-01 Thread Shivaprasad G Bhat
The inactiveDevs need to be selectively altered for more than one device in case of vfio devices. So, pass the whole list. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src

[libvirt] [PATCH v2 8/9] Postpone reprobing till all the devices in iommu group are unbound from vfio

2015-11-01 Thread Shivaprasad G Bhat
removed. We need to add a new negative one with a new driver. The patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=1272300 Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 135 + tests/virpcimock.c | 173

[libvirt] [PATCH v2 9/9] Wait for iommmu device to go away before reprobing the host driver

2015-11-01 Thread Shivaprasad G Bhat
There could be a delay of 1 or 2 seconds before the vfio-pci driver is unbound and the device file /dev/vfio/ is actually removed. If the file exists, the host driver probing the device can lead to crash. So, wait and avoid the crash. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c

[libvirt] [PATCH v3 0/9] Few VFIO related fixes

2015-11-02 Thread Shivaprasad G Bhat
The following series implements... --- Addressed comments on V2 and V1 Fixed the while loop exit in P8 virPCIDeviceUnbindFromStub() Shivaprasad G Bhat (9): Implement virPCIIsKnownStub function Initialize the stubDriver of pci devices if bound to a valid one Add iommu group

[libvirt] [PATCH v3 1/9] Implement virPCIIsKnownStub function

2015-11-02 Thread Shivaprasad G Bhat
The checks to knwon stubs can be easily done having this implementation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 35b1459..bff37d7

[libvirt] [PATCH v3 5/9] Wait for vfio-pci device cleanups before reassinging the device to host driver

2015-11-02 Thread Shivaprasad G Bhat
Before unbind from stub driver libvirt should be sure the guest is not using the device anymore. The libvirt today waits for pci-stub driver alone in /proc/iommu. The same wait is needed for vfio devices too. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c |7 +++ 1 file

[libvirt] [PATCH v3 3/9] Add iommu group number info to virPCIDevice

2015-11-02 Thread Shivaprasad G Bhat
The iommu group number need not be fetched from the sysfs everytime as it remains constant. Fetch it once during allocation Signed-off-by: Shivaprasad G Bhat --- src/libvirt_private.syms |1 + src/util/virpci.c| 11 +++ src/util/virpci.h|2 ++ 3 files changed

[libvirt] [PATCH v3 4/9] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-02 Thread Shivaprasad G Bhat
It is incorrect to attempt the device reattach of a function, when some other domain is using some functions belonging to the same iommu group. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util

[libvirt] [PATCH 7/9] Pass activeDevs and inactiveDevs to virPCIDeviceUnbindFromStub and virPCIDeviceBindToStub

2015-11-02 Thread Shivaprasad G Bhat
The inactiveDevs need to be selectively altered for more than one device in case of vfio devices. So, pass the whole list. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src

[libvirt] [PATCH v3 2/9] Initialize the stubDriver of pci devices if bound to a valid one

2015-11-02 Thread Shivaprasad G Bhat
The stubDriver name can be used to make useful decisions if readily available. Set it if bound to a valid one during initialisation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 12 1 file changed, 12 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c

[libvirt] [PATCH 8/9] Postpone reprobing till all the devices in iommu group are unbound from vfio

2015-11-02 Thread Shivaprasad G Bhat
removed. We need to add a new one with a new driver. The patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=1272300 Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 141 ++ tests/virpcimock.c | 173

[libvirt] [PATCH 9/9] Wait for iommmu device to go away before reprobing the host driver

2015-11-02 Thread Shivaprasad G Bhat
There could be a delay of 1 or 2 seconds before the vfio-pci driver is unbound and the device file /dev/vfio/ is actually removed. If the file exists, the host driver probing the device can lead to crash. So, wait and avoid the crash. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c

[libvirt] [PATCH v3 6/9] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-02 Thread Shivaprasad G Bhat
The reprobe needs to be called multiple times for vfio devices for each device in the iommu group in future patch. So split the reprobe into a new function. No functional change. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 47 +++ 1

[libvirt] [PATCH v4 00/10] Few VFIO related fixes

2015-11-14 Thread Shivaprasad G Bhat
ew patch. Shivaprasad G Bhat (10): Implement virPCIIsKnownStub function Add iommu group number info to virPCIDevice Refuse to reattach from vfio if the iommu group is in use by any domain Wait for vfio-pci device cleanups before reassinging the device to host driver

[libvirt] [PATCH v4 01/10] Implement virPCIIsKnownStub function

2015-11-14 Thread Shivaprasad G Bhat
The checks to known stubs can be easily done having this implementation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 35b1459..bff37d7

[libvirt] [PATCH v4 03/10] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-14 Thread Shivaprasad G Bhat
It is incorrect to attempt the device reattach of a function, when some other domain is using some functions belonging to the same iommu group. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a

[libvirt] [PATCH v4 02/10] Add iommu group number info to virPCIDevice

2015-11-14 Thread Shivaprasad G Bhat
The iommu group number need not be fetched from the sysfs everytime as it remains constant. Fetch it once during allocation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c index bff37d7

[libvirt] [PATCH v4 04/10] Wait for vfio-pci device cleanups before reassinging the device to host driver

2015-11-14 Thread Shivaprasad G Bhat
Before unbind from stub driver libvirt should be sure the guest is not using the device anymore. The libvirt today waits for pci-stub driver alone in /proc/iommu. The same wait is needed for vfio devices too. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c |7 +++ 1 file

[libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-14 Thread Shivaprasad G Bhat
The reprobe needs to be called multiple times for vfio devices for each device in the iommu group in future patch. So split the reprobe into a new function. No functional change. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 47 +++ 1

[libvirt] [PATCH v4 07/10] Change the negative test case to try pciback instead of vfio-pci

2015-11-14 Thread Shivaprasad G Bhat
The next few patches implement the vfio-pci tests. So, change the test case to test the negative test case on pciback instead. Signed-off-by: Shivaprasad G Bhat --- tests/virpcimock.c |2 +- tests/virpcitest.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests

[libvirt] [PATCH v4 06/10] Pass activeDevs and inactiveDevs to virPCIDeviceUnbindFromStub and virPCIDeviceBindToStub

2015-11-14 Thread Shivaprasad G Bhat
The inactiveDevs need to be selectively altered for more than one device in case of vfio devices. So, pass the whole list. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src

[libvirt] [PATCH v4 08/10] Add iommu info for pci on mocked sysfs

2015-11-14 Thread Shivaprasad G Bhat
The iommu group info can be used to check if the devices are bound/unbound from vfio at the group level granualrity. Add the info to mock as to help add test cases later. Signed-off-by: Shivaprasad G Bhat --- tests/virpcimock.c | 180 +++- 1 file

[libvirt] [PATCH v4 09/10] Postpone reprobing till all the devices in iommu group are unbound from vfio

2015-11-14 Thread Shivaprasad G Bhat
://bugzilla.redhat.com/show_bug.cgi?id=1272300 Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 156 +++- tests/virpcitest.c | 115 ++ 2 files changed, 257 insertions(+), 14 deletions(-) diff --git a/src

[libvirt] [PATCH v4 10/10] Wait for iommmu device to go away before reprobing the host driver

2015-11-14 Thread Shivaprasad G Bhat
simulated. The mock changes here are to just let the test cases pass for access() call to check if the /dev/vfio/ exists. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 41 + tests/virpcimock.c | 11 ++- 2 files changed, 51 insertions(+), 1

Re: [libvirt] [PATCH v4 03/10] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 08:51 PM, Laine Stump wrote: On 11/14/2015 03:36 AM, Shivaprasad G Bhat wrote: > Refuse to reattach from vfio if the iommu group is in use by any domain util: refuse to reattach device if any device in the same group is in use by any domain It is incorrect to attempt

Re: [libvirt] [PATCH v4 07/10] Change the negative test case to try pciback instead of vfio-pci

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 10:35 PM, Laine Stump wrote: On 11/14/2015 03:37 AM, Shivaprasad G Bhat wrote: The next few patches implement the vfio-pci tests. So, change the test case to test the negative test case on pciback instead. Signed-off-by: Shivaprasad G Bhat --- tests/virpcimock.c |2

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 11:30 PM, Alex Williamson wrote: On Fri, 2015-11-20 at 12:24 -0500, Laine Stump wrote: On 11/20/2015 11:58 AM, Andrea Bolognani wrote: On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: Seems safe, but is this really what we want to do? I haven't read/understood the remaining

[libvirt] [PATCH] qemu: align the cur_balloon too if not explicitly specified by the user

2015-12-10 Thread Shivaprasad G Bhat
omain start wherever possible. For qemu align the cur_balloon too iow assign the aligned actual memory when not specified by the user. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_conf.c |3 +-- src/libxl/libxl_conf.c |2 ++ src/lxc/lxc_process.c |3 +++ src/o

[libvirt] [PATCH] Dont set ABI update flag during migration cookie parsing for persistent copy

2016-01-26 Thread Shivaprasad G Bhat
furture restart would/should anyway do the ABI updates and flag correct errors. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_migration.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 51e7125..39e259a 100644

[libvirt] [RFC PATCH 0/2] nodeinfo: PPC64: Fix topology and siblings info on capabilities and nodeinfo

2016-01-28 Thread Shivaprasad G Bhat
ed by many clients would have no impact except for PPC64. To the extent I looked at code, the siblings changes dont affect existing libvirt functionality. Please do let me know otherwise. --- Shivaprasad G Bhat (2): nodeinfo: Reflect guest usable host topology on PPC64 Introduce c

[libvirt] [RFC PATCH 1/2] nodeinfo: Reflect guest usable host topology on PPC64

2016-01-28 Thread Shivaprasad G Bhat
today. If we can display the guest usable topology info for subcore_per_core=2 and 4 too, then it can help making guest topology decisions. Signed-off-by: Shivaprasad G Bhat --- src/nodeinfo.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/nodeinfo.c b/src/nodeinfo.c

[libvirt] [RFC PATCH 2/2] Introduce capacity to virCapsHostNUMACellCPU to help vcpu pinning decisions

2016-01-28 Thread Shivaprasad G Bhat
archs, the capacity will be set to "1" indicating to treat each core in the sibling list to be pinned only once. Signed-off-by: Shivaprasad G Bhat --- src/conf/capabilities.c|3 +- src/conf/capabilities.h|1 + src/nodeinfo.c

[libvirt] [PATCH] send default USB controller in xml to destination during migration on PPC64

2016-03-02 Thread Shivaprasad G Bhat
ed on destination takes the smallest slot number and that would lead to savestate mismatch and migration failure. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_domain.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 90

[libvirt] [PATCH v2 1/2] Implement virPCIDeviceGetAddress function

2015-01-14 Thread Shivaprasad G Bhat
Basically a getter function which is implemented for accessing the address fields in virPCIDevice. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 16 src/util/virpci.h |1 + 2 files changed, 17 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c

[libvirt] [PATCH v2 0/2] check IOMMU group devices usage when preparing device for vfio passthrough

2015-01-14 Thread Shivaprasad G Bhat
--- Shivaprasad G Bhat (2): Implement virPCIDeviceGetAddress function check IOMMU group devices usage when preparing device for vfio passthrough src/util/virhostdev.c | 89 ++--- src/util/virpci.c | 16 + src/util/virpci.h

[libvirt] [PATCH v2 2/2] check IOMMU group devices usage when preparing device for vfio passthrough

2015-01-14 Thread Shivaprasad G Bhat
iommu group. Solution: Iterate the iommu group of the hostdev and error our neatly in case a device in the same iommu group is busy. Reattach code also does the same kind of check, remove duplicate code as well. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 89

[libvirt] [PATCH] check "fc_host" and "vport_ops" capabilitis in SCSI host nodedevs

2015-02-03 Thread Shivaprasad G Bhat
low python script. - import libvirt conn = libvirt.openReadOnly('qemu:///system') fc = conn.listDevices('fc_host', 0) print(fc) ---- --- Shivaprasad G Bhat (1): check "fc_host" and "vport_ops" capabilities in SCSI host nodedevs s

[libvirt] [PATCH] check "fc_host" and "vport_ops" capabilities in SCSI host nodedevs

2015-02-03 Thread Shivaprasad G Bhat
devices. Signed-off-by: Shivaprasad G Bhat --- src/conf/node_device_conf.c |8 1 file changed, 8 insertions(+) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 03b88a2..ab27829 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.

[libvirt] [PATCH] network_conf: check sysfs if the bridge exists on host for user created bridges

2015-03-09 Thread Shivaprasad G Bhat
twork from isolated error: Unable to create bridge virbr1: File exists === --- The following series implements... Shivaprasad G Bhat (1): network_conf: check sysfs if the bridge exists on host for user created bridges src/conf/network_conf.c | 16 +

[libvirt] [PATCH] network_conf: check sysfs if the bridge exists on host for user created bridges

2015-03-09 Thread Shivaprasad G Bhat
virNetworkBridgeInUse() doesn't check if the bridge is manually created outside of libvirt. Check the bridge name file in the sysfs to see if the bridge is in use. Signed-off-by: Shivaprasad G Bhat --- src/conf/network_conf.c | 16 ++-- 1 file changed, 14 insertions(

[libvirt] [PATCH v2 0/2] network_conf: check if bridge exists on host for user created bridges

2015-03-11 Thread Shivaprasad G Bhat
twork from isolated error: Unable to create bridge virbr1: File exists === --- Shivaprasad G Bhat (2): cleanup conf/device_conf.h reference from util/virnetdev.h network_conf: check if bridge exists on host for user created bridges src/Makefile.am

[libvirt] [PATCH 1/2] cleanup conf/device_conf.h reference from util/virnetdev.h

2015-03-11 Thread Shivaprasad G Bhat
. Signed-off-by: Shivaprasad G Bhat --- src/Makefile.am|3 +-- src/conf/device_conf.h | 21 + src/util/virnetdev.h | 21 - 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d38432e

[libvirt] [PATCH v2 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-11 Thread Shivaprasad G Bhat
virNetworkBridgeInUse() doesn't check if the bridge is manually created outside of libvirt. Check if the bridge actually exist on host using the virNetDevExists(). Signed-off-by: Shivaprasad G Bhat --- src/conf/network_conf.c | 11 +-- 1 file changed, 9 insertions(+), 2 dele

[libvirt] [PATCH v3 0/2] network_conf: check if bridge exists on host for user created bridges

2015-03-24 Thread Shivaprasad G Bhat
twork from isolated error: Unable to create bridge virbr1: File exists === --- Shivaprasad G Bhat (2): cleanup conf/device_conf.h inclusion from util/virnetdev.h network_conf: check if bridge exists on host for user created bridges src/conf/device_conf

[libvirt] [PATCH v3 1/2] cleanup conf/device_conf.h inclusion from util/virnetdev.h

2015-03-24 Thread Shivaprasad G Bhat
mask some easily resolvable failures. So dont touch the Makefile.am for now. Resolve the wrong inclusions in separate patches. Signed-off-by: Shivaprasad G Bhat --- src/conf/device_conf.h | 38 +- src/util/virnetdev.h | 38

[libvirt] [PATCH v3 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-24 Thread Shivaprasad G Bhat
virNetworkBridgeInUse() doesn't check if the bridge is manually created outside of libvirt. Check if the bridge actually exist on host using the virNetDevExists(). Signed-off-by: Shivaprasad G Bhat --- src/conf/network_conf.c | 15 --- 1 file changed, 12 insertions(+), 3 dele

[libvirt] [PATCH v4 0/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Shivaprasad G Bhat
twork from isolated error: Unable to create bridge virbr1: File exists === --- Shivaprasad G Bhat (2): cleanup conf/device_conf.h inclusion from util/virnetdev.h network_conf: check if bridge exists on host for user created bridges src/conf/device_conf

[libvirt] [PATCH v4 1/2] cleanup conf/device_conf.h inclusion from util/virnetdev.h

2015-03-25 Thread Shivaprasad G Bhat
mask some easily resolvable failures. So dont touch the Makefile.am for now. Resolve the wrong inclusions in separate patches. Signed-off-by: Shivaprasad G Bhat --- src/conf/device_conf.h | 38 +- src/util/virnetdev.h | 38

[libvirt] [PATCH v4 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Shivaprasad G Bhat
virNetworkBridgeInUse() doesn't check if the bridge is manually created outside of libvirt. Check if the bridge actually exist on host using the virNetDevExists(). Signed-off-by: Shivaprasad G Bhat --- src/conf/network_conf.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-)

[libvirt] [PATCH] hostdev: Report the domain name for used hostdevs during nodedev-detach

2015-04-01 Thread Shivaprasad G Bhat
The nodedev-detach can report the name of the domain using the device just the way nodedev-reattach does it. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 23365a3

[libvirt] [PATCH] check if console PTY is null before attempting to open

2015-05-27 Thread Shivaprasad G Bhat
crashes in virChrdevLockFilePath().The patch attempts to fix the crash by adding a check before attempting to open. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_driver.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1233d8f

[libvirt] [PATCH v2] check if console/channel PTY is null before attempting to open

2015-05-31 Thread Shivaprasad G Bhat
attempting to open. Signed-off-by: Shivaprasad G Bhat --- src/conf/virchrdev.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 5f28f29..701b326 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -350,6 +350,11 @@ int virChrdevOpen

[libvirt] [PATCH 0/2] Fix network names with quotes

2015-06-01 Thread Shivaprasad G Bhat
The following series implements... --- Shivaprasad G Bhat (2): fix domaincommon.rng to accept network name with quotes escape quotes for dsmasq conf contents docs/schemas/domaincommon.rng |2 +- src/util/virdnsmasq.c | 25

[libvirt] [PATCH 1/2] fix domaincommon.rng to accept network name with quotes

2015-06-01 Thread Shivaprasad G Bhat
The network name is currently of type "deviceName" but it should be "text" as name is defined in the network.rng. Signed-off-by: Shivaprasad G Bhat --- docs/schemas/domaincommon.rng |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/dom

[libvirt] [PATCH 2/2] escape quotes for dsmasq conf contents

2015-06-01 Thread Shivaprasad G Bhat
dnsmasq conf file contents needs to have quotes escaped for it to work. Because of this, the network-create/start for a network with quotes in the name fails. The patch escapes strings for the entries that go into the conf file. Signed-off-by: Shivaprasad G Bhat --- src/util/virdnsmasq.c

[libvirt] [PATCH] Increase the size of REMOTE_MIGRATE_COOKIE_MAX to REMOTE_STRING_MAX

2014-05-28 Thread Shivaprasad G Bhat
During guest migration, if the domain xml is bigger than 16384 which is easily possible for a guest with good number of disks, message encode fails for xdr_remote_domain_migrate_perform3_ret(). So, Increase the COOKIE_MAX to STRING_MAX value. Signed-off-by: Shivaprasad G Bhat --- src/remote

[libvirt] [PATCH v2] qemu: Properly label FDs when restoring domain with static label

2014-05-29 Thread Shivaprasad G Bhat
The restore of a saved image file fails when the selinux context is static. The libvirt has to set the conext of save image file handle to that of the guest before handing off the FD to qemu. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_process.c |4 ++-- 1 file changed, 2

[libvirt] [PATCH] qemu: Properly label FDs while saving domain for successful restores in case of static labelling.

2014-06-10 Thread Shivaprasad G Bhat
fix applies to both managedsave and save codepath. The managedsave works as is without the fix as well since the files are saved in the directory having viable default context. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_driver.c |3 +++ 1 file changed, 3 insertions(+) diff --git a

[libvirt] [PATCH] selinux: Avoid label reservations for type = none during restart

2014-06-10 Thread Shivaprasad G Bhat
reservation, the second attempt to reserve the same range fails and the Guests would be killed. The fix is to avoid reserving labels for type = none during libvirt restart. Signed-off-by: Shivaprasad G Bhat --- src/security/security_selinux.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

[libvirt] [PATCH v4] qemu: Properly label FDs when restoring domain with static label

2014-06-11 Thread Shivaprasad G Bhat
When saving domain with relabel=no, the file that gets created must have the context set anyway. That way restore can be successful without the need of relabeling the file. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_driver.c |3 +++ 1 file changed, 3 insertions(+) diff --git a

[libvirt] [PATCH 0/4] Enable spapr-pci-vfio-host-bridge controllers for VFIO passthrough support

2014-10-17 Thread Shivaprasad G Bhat
. Every hostdev get their pci address in the relavent domain. Tha patch series take care of device addressing in passthrough hostdevs, SR-IOV interfaces and network interface from SRIOV virtual function pools. --- Shivaprasad G Bhat (4): qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC

[libvirt] [PATCH 1/4] qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC platform

2014-10-17 Thread Shivaprasad G Bhat
To support VFIO for PPC, it is needed spapr-vfio-pci-host-bridge in QEMU. This patch is to add one capability for it. Signed-off-by: Li Zhang Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_capabilities.c |2 ++ src/qemu/qemu_capabilities.h |1 + 2 files changed, 3 insertions

[libvirt] [PATCH 2/4] qemu: parse and add spapr-vfio-pci controller into domain

2014-10-17 Thread Shivaprasad G Bhat
every new iommu group. The sample controller tags would look like below: Signed-off-by: Shivaprasad G Bhat Signed-off-by: Pradipta Kumar Banerjee --- src/bhyve/bhyve_domain.c |2 - src/conf/domain_conf.c | 149 -- src/conf/dom

[libvirt] [PATCH 3/4] qemu: assign addresses for spapr vfio hostdevices and generate cli

2014-10-17 Thread Shivaprasad G Bhat
the controller alias. For Example, The live xml and the lspci output of a running guest can be seen at http://fpaste.org/142911/ Signed-off-by: Shivaprasad G Bhat Signed-off-by: Pradipta Kumar Banerjee --- src/conf/domain_addr.c |8 + src/conf/domain_addr.h |1 src/libvirt_private.sy

[libvirt] [PATCH 4/4] qemu: add test case for spapr-pci-vfio-host-bridge

2014-10-17 Thread Shivaprasad G Bhat
The test case adds passthrough hostdevices and interface of type hostdev. The test case tests the address for multifunction, multibus, and pci bridges within the spapr-vfio domain. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Pradipta Kumar Banerjee --- docs/schemas/domaincommon.rng

[libvirt] [RFC PATCH v2 0/4] Enable spapr-pci-vfio-host-bridge controllers for VFIO passthrough support

2014-11-17 Thread Shivaprasad G Bhat
2. --- Shivaprasad G Bhat (4): qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC platform qemu: parse spapr-vfio-pci controller from xml qemu: assign addresses for spapr vfio hostdevices and generate cli qemu: add test case for spapr-pci-vfio-host-bridge docs/schemas

[libvirt] [RFC PATCH v2 1/4] qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC platform

2014-11-17 Thread Shivaprasad G Bhat
To support VFIO for PPC, spapr-vfio-pci-host-bridge is needed in QEMU. This patch adds capability for it. Signed-off-by: Li Zhang Signed-off-by: Shivaprasad G Bhat Reviewed-by: Prerna Saxena --- src/qemu/qemu_capabilities.c |2 ++ src/qemu/qemu_capabilities.h |1 + 2 files changed, 3

[libvirt] [RFC PATCH v2 3/4] qemu: assign addresses for spapr vfio hostdevices and generate cli

2014-11-17 Thread Shivaprasad G Bhat
the controller alias. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Pradipta Kumar Banerjee Reviewed-by: Prerna Saxena --- src/conf/domain_addr.c |8 + src/conf/domain_addr.h |2 src/libvirt_private.syms |1 src/qemu/qemu_command.c | 274 +++

[libvirt] [RFC PATCH v2 2/4] qemu: parse spapr-vfio-pci controller from xml

2014-11-17 Thread Shivaprasad G Bhat
ow: Like other architectures, unassigned and unmanaged devices in the iommu group need to be detached manually before the guest is created . The spapr-vfio-pci controllers are removed when there are no corresponding hostdevices in xml. Signed-off-by: Shivaprasad G Bhat Signed-of

[libvirt] [RFC PATCH v2 4/4] qemu: add test case for spapr-pci-vfio-host-bridge

2014-11-17 Thread Shivaprasad G Bhat
The test case adds passthrough hostdevices and interface of type hostdev. The test case tests the address for multifunction, multibus, and pci bridges within the spapr-vfio domain. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Pradipta Kumar Banerjee Reviewed-by: Prerna Saxena

[libvirt] [PATCH 0/2] check IOMMU group devices usage during vfio device passthrough

2014-12-03 Thread Shivaprasad G Bhat
vm10 --- Shivaprasad G Bhat (2): Move struct _virPCIDevice definition from virpci.c to virpci.h check IOMMU group devices usage when preparing device for vfio passthrough src/util/virhostdev.c | 87 + src/util/virpci.c | 29

[libvirt] [PATCH 1/2] Move struct _virPCIDevice definition from virpci.c to virpci.h

2014-12-03 Thread Shivaprasad G Bhat
The struct members can't be referenced from files including the .h. Moving the definition to .h from .c helps referencing the members. The patch is just the struct definition code movement. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 29 - src

[libvirt] [PATCH 2/2] check IOMMU group devices usage when preparing device for vfio passthrough

2014-12-03 Thread Shivaprasad G Bhat
iommu group. Solution: Iterate the iommu group of the hostdev and error our neatly in case a device in the same iommu group is busy. Reattach code also does the same kind of check, remove duplicate code as well. Signed-off-by: Shivaprasad G Bhat --- src/util/virhostdev.c | 87

[libvirt] [PATCH v2] send default USB controller in xml to destination during migration

2016-04-29 Thread Shivaprasad G Bhat
disks/interfaces and one of them is hot-unplugged, then the default USB controller added on destination takes the smallest slot number and that would lead to savestate mismatch and migration failure. Seen and verified on PPC64. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_domain.c |6

[libvirt] [PATCH] ppc64: get the maxvcpus from the qemu caps instead of /dev/kvm

2016-05-02 Thread Shivaprasad G Bhat
On PPC64, the KVM_MAX_VCPUS is defined to be 1024 where as qemu has MAX_CPUMASK_BITS defined at 255 in include/sysemu/sysemu.h. virsh domacapabilities and virsh maxvcpus --type kvm return different maxvcpus values and is confusing as to know what actually works. Signed-off-by: Shivaprasad G Bhat

[libvirt] [PATCH] leave out the default USB controller only on i440fx during migration

2016-05-04 Thread Shivaprasad G Bhat
Further followup discussions in list on commit 192a53e concluded that we should be leaving out the USB controller only for i440fx machines as default USB can be used by someone on q35 at random slots. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_domain.c |3 ++- 1 file changed, 2

[libvirt] [PATCH v2] Get the maxvcpus from both the qemuCaps and /dev/kvm

2016-05-04 Thread Shivaprasad G Bhat
actually works. The minimum of the two values is what actually works. For example on PPC64, the KVM_MAX_VCPUS is defined to be 1024 in kernel where as qemu has MAX_CPUMASK_BITS defined at 255 in include/sysemu/sysemu.h. The guest can go upto 256 vcpus here. Signed-off-by: Shivaprasad G Bhat --- src

  1   2   3   >