Re: [PATCH] security: do not remember/recall labels for VFIO MDEVs

2023-04-13 Thread Eric Farman
On Thu, 2023-04-13 at 16:35 +0200, Michal Prívozník wrote: > On 4/1/23 02:42, Eric Farman wrote: > > Commit dbf1f68410 ("security: do not remember/recall labels for > > VFIO") > > rightly changed the DAC and SELinux labeling parameters to fix a > > problem >

Re: [PATCH] security: do not remember/recall labels for VFIO MDEVs

2023-04-13 Thread Eric Farman
On Sat, 2023-04-01 at 02:42 +0200, Eric Farman wrote: > Commit dbf1f68410 ("security: do not remember/recall labels for > VFIO") > rightly changed the DAC and SELinux labeling parameters to fix a > problem > with "VFIO hostdevs" but really only addressed the P

[PATCH] security: do not remember/recall labels for VFIO MDEVs

2023-03-31 Thread Eric Farman
ice guest ~/disk.xml error: Failed to attach device from /home/test/disk.xml error: Requested operation is not valid: Setting different SELinux label on /dev/vfio/3 which is already in use Make the same changes as reported in commit dbf1f68410, for the mdev paths. Reported-by: Matthew Rosato Signed

[PATCH] qemuAppendLoadparmMachineParm: add loadparm from hostdev

2023-03-09 Thread Eric Farman
means the loadparm is accepted, but not given to QEMU. Correct this, and add some XML/argv tests. Signed-off-by: Eric Farman --- src/qemu/qemu_command.c | 24 ++ ...machine-loadparm-hostdev.s390x-latest.args | 33 +++ .../machine-loadparm

Re: [libvirt PATCH 0/2] fix cgroups BPF FDs leak

2021-04-13 Thread Eric Farman
3 ++- > src/util/vircgroupv2devices.c | 14 -- > src/util/vircgroupv2devices.h | 2 +- > 4 files changed, 8 insertions(+), 13 deletions(-) > Works well for me. Series: Tested-by: Eric Farman Reviewed-by: Eric Farman

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-09 Thread Eric Farman
On 4/9/21 10:14 AM, Pavel Hrdina wrote: On Fri, Apr 09, 2021 at 09:13:32AM -0400, Eric Farman wrote: I still fail to see how calling virCgroupRemove(group->nested) in virCgroupRemove() would help at all. The original issue you mentioned in the commit message is that we log this er

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-09 Thread Eric Farman
On 4/9/21 6:02 AM, Pavel Hrdina wrote: On Thu, Apr 08, 2021 at 10:00:32PM -0400, Eric Farman wrote: On 4/8/21 8:12 AM, Pavel Hrdina wrote: On Wed, Apr 07, 2021 at 11:28:48PM -0400, Eric Farman wrote: On 4/7/21 9:07 AM, Pavel Hrdina wrote: On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-08 Thread Eric Farman
On 4/8/21 8:12 AM, Pavel Hrdina wrote: On Wed, Apr 07, 2021 at 11:28:48PM -0400, Eric Farman wrote: On 4/7/21 9:07 AM, Pavel Hrdina wrote: On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: The introduction of nested cgroups used a little macro virCgroupGetNested() to retrieve

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-07 Thread Eric Farman
On 4/7/21 9:07 AM, Pavel Hrdina wrote: On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: The introduction of nested cgroups used a little macro virCgroupGetNested() to retrieve the nested cgroup pointer, if one exists. But this macro isn't used when removing cgroups, resulting

Re: [PATCH 0/1] vircgroup: Fix nested cgroup on cleanup

2021-04-07 Thread Eric Farman
Polite ping, now that release freeze has finished. On 3/26/21 12:25 PM, Eric Farman wrote: Hi Pavel, et al, Running Fedora 33 KVM/QEMU on s390x, I recently noticed a couple of oddities when shutting down my guests, which I bisected between 7.0.0 and 7.1.0 to your commit: commit

[PATCH 0/1] vircgroup: Fix nested cgroup on cleanup

2021-03-26 Thread Eric Farman
well be way off track and would appreciate your feedback in the matter. Apologies for hitting this on the same day as freeze; I had not noticed the messages previously, and started digging yesterday when I noted the number of file descriptors left open by libvirt. Thanks, Eric Eric Farman (1

[PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-03-26 Thread Eric Farman
that it picks up the right structure and can remove the associated resources properly. Fixes: 184245f53b94 ("vircgroup: introduce nested cgroup to properly work with systemd") Signed-off-by: Eric Farman --- src/util/vircgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: device compatibility interface for live migration with assigned devices

2020-08-13 Thread Eric Farman
On 8/13/20 11:33 AM, Cornelia Huck wrote: > On Fri, 7 Aug 2020 13:59:42 +0200 > Cornelia Huck wrote: > >> On Wed, 05 Aug 2020 12:35:01 +0100 >> Sean Mooney wrote: >> >>> On Wed, 2020-08-05 at 12:53 +0200, Jiri Pirko wrote: Wed, Aug 05, 2020 at 11:33:38AM CEST, yan.y.z...@intel.com

Re: [libvirt] [PATCH 0/3] Fix memlock limit during hotplug of mdev devices

2019-09-06 Thread Eric Farman
ed out. Thanks for the reviews, and the suggestions! - Eric > > Thanks, > > > DHB > > > > On 9/3/19 5:09 PM, Eric Farman wrote: >> The routine qemuDomainGetMemLockLimitBytes() has a couple tests >> to determine what the maximum limit of locked memory s

[libvirt] [PATCH 0/3] Fix memlock limit during hotplug of mdev devices

2019-09-03 Thread Eric Farman
successfully $ grep locked /proc/83543/limits Max locked memory 3221225472 3221225472 bytes Eric Farman (3): qemu: Refactor the max memlock routine qemu: Reset the maximum locked memory on hotplug fail qemu: Adjust max memlock on mdev hotplug src/qemu

[libvirt] [PATCH 3/3] qemu: Adjust max memlock on mdev hotplug

2019-09-03 Thread Eric Farman
o involved for the problem I was trying to fix. Maybe another day.) Signed-off-by: Eric Farman --- src/qemu/qemu_hotplug.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 979e97b608..ae7c5395d2 100644 --- a/src/qemu/qemu_hotplug.c +++

[libvirt] [PATCH 2/3] qemu: Reset the maximum locked memory on hotplug fail

2019-09-03 Thread Eric Farman
the way it was. Signed-off-by: Eric Farman --- src/qemu/qemu_hotplug.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 24e75e49be..979e97b608 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1469,6 +1469,7

[libvirt] [PATCH 1/3] qemu: Refactor the max memlock routine

2019-09-03 Thread Eric Farman
Let's pull this hunk out into a function, so it can be reused in another codepath that needs to do the same thing. Signed-off-by: Eric Farman --- src/qemu/qemu_domain.c | 30 ++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_hotplug.c | 11 +-- 3 files

Re: [libvirt] [PATCH 3/4] conf: Use existing SCSI hostdev model to create new

2017-12-15 Thread Eric Farman
, either way I think it's fine. Reviewed-by: Eric Farman <far...@linux.vnet.ibm.com> } } @@ -17702,7 +17712,8 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDefPtr def) return 0; for (i = 0; i <= maxController; i++)

Re: [libvirt] [PATCH 4/4] conf: Fix generating addresses for SCSI hostdev

2017-12-15 Thread Eric Farman
On 12/06/2017 08:08 AM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1519130 Commit id 'dc692438' reverted the automagic addition of a SCSI controller attempt during virDomainHostdevAssignAddress; however, the logic to determine where to place the next_unit depended upon

Re: [libvirt] [PATCH 2/4] qemu: Use same model when adding hostdev SCSI controller

2017-12-13 Thread Eric Farman
On 12/13/2017 02:39 PM, John Ferlan wrote: On 12/13/2017 10:43 AM, Eric Farman wrote: On 12/06/2017 08:08 AM, John Ferlan wrote: When qemuDomainFindOrCreateSCSIDiskController adds a controller, let's use the same model as a currently found controller under the assumption that the reason

Re: [libvirt] [PATCH 2/4] qemu: Use same model when adding hostdev SCSI controller

2017-12-13 Thread Eric Farman
On 12/06/2017 08:08 AM, John Ferlan wrote: When qemuDomainFindOrCreateSCSIDiskController adds a controller, let's use the same model as a currently found controller under the assumption that the reason to add the controller in hotplug is because virDomainHostdevAssignAddress determined that

Re: [libvirt] [PATCH 1/4] qemu: Tolerate storage source private data being NULL for hotplug SCSI hostdev

2017-12-13 Thread Eric Farman
fer...@redhat.com> Reviewed-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 6ef28bf05..9317e134a 100644 --- a/src/qemu/qemu_hotplug.c ++

Re: [libvirt] [PATCH 1/3] qemu: Need to assign PCI address to vhost-scsi

2017-12-13 Thread Eric Farman
On 12/13/2017 09:05 AM, John Ferlan wrote: On 12/13/2017 08:28 AM, Eric Farman wrote: On 12/12/2017 09:22 AM, John Ferlan wrote: Commit id '70249927b' neglected to cover this case because the test had taken the "shortcut" to already add the , so I altered that too just to

Re: [libvirt] [PATCH 2/3] util: Fix error path in virSCSIVHostOpenVhostSCSI

2017-12-13 Thread Eric Farman
viewed-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/util/virscsivhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index dc7df757a..d6fbf5ed5 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@

Re: [libvirt] [PATCH 1/3] qemu: Need to assign PCI address to vhost-scsi

2017-12-13 Thread Eric Farman
d not have a PCI address where the address is related to the guest PCI address provided. Signed-off-by: John Ferlan <jfer...@redhat.com> Reviewed-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_domain_address.c | 3 +- .../hostdev-s

Re: [libvirt] [PATCH 3/3] util: Report error if vhost-scsi device file cannot be found

2017-12-13 Thread Eric Farman
clear why the failure occurred. Signed-off-by: John Ferlan <jfer...@redhat.com> Reviewed-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/util/virscsivhost.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/virscsivhost.c b/src/util/virscsiv

[libvirt] [PATCH v2 3/3] qemu: Remove extra messages for vhost-scsi hotplug

2017-04-26 Thread Eric Farman
As with virtio-scsi, the "internal error" messages after preparing a vhost-scsi hostdev overwrites more meaningful error messages deeper in the callchain. Remove it too. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 7 +-- 1 file chan

[libvirt] [PATCH v2 0/3] Cleanup messages after hotplug of scsi hostdev

2017-04-26 Thread Eric Farman
v1 was here: https://www.redhat.com/archives/libvir-list/2017-April/msg01066.html Per review, removed the "internal error" messages and split the resulting patch into patches 2 (virtio-scsi) and 3 (vhost-scsi). Patch 1 fixes a return code check that is a little off. Eric Farman (

[libvirt] [PATCH v2 1/3] qemu: Check return code from qemuHostdevPrepareSCSIDevices

2017-04-26 Thread Eric Farman
Signed-off-by: Eric Farman <far...@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 eec99af..6d568d6 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hot

[libvirt] [PATCH v2 2/3] qemu: Remove extra messages from virtio-scsi hotplug

2017-04-26 Thread Eric Farman
tter messages deeper in the callchain so these "internal error" messages overwrite any of them. Remove them, so that the more detailed errors are seen. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 17 + 1 file changed, 1 insertion(+), 16

Re: [libvirt] [PATCH] qemu: Do not overwrite existing messages in hotplug

2017-04-26 Thread Eric Farman
On 04/26/2017 01:55 PM, John Ferlan wrote: On 04/24/2017 02:02 PM, Eric Farman wrote: I tried to attach a SCSI LUN to two different guests, and forgot to specify "shareable" in the hostdev XML. Attaching the device to the second guest failed, but the message was not helpful in

[libvirt] [PATCH] qemu: Do not overwrite existing messages in hotplug

2017-04-24 Thread Eric Farman
adjustment for both virtio-scsi and vhost-scsi devices. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 13 ++--- 1 file

Re: [libvirt] [PATCH 07/11] iscsi: Change order of checks in createVport

2016-12-08 Thread Eric Farman
On 11/18/2016 09:26 AM, John Ferlan wrote: Move the check for an already existing vHBA to the top of the function. No sense in first decoding a provided parent if the next thing we're going to do is fail if a provided wwnn/wwpn already exists. Signed-off-by: John Ferlan

Re: [libvirt] [PATCH v4 9/9] docs: Add vhost-scsi

2016-12-08 Thread Eric Farman
On 12/07/2016 08:16 PM, Jim Fehlig wrote: On 11/22/2016 02:16 PM, John Ferlan wrote: On 11/21/2016 10:58 PM, Eric Farman wrote: Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 inse

[libvirt] [PATCH v2] qemu: Prevent detaching SCSI controller used by hostdev

2016-11-29 Thread Eric Farman
guest_01 scsicontroller.xml Device detached successfully Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 10 ++ 1 file chan

Re: [libvirt] [PATCH] qemu: Prevent detaching SCSI controller used by hostdev

2016-11-29 Thread Eric Farman
On 11/28/2016 04:14 PM, John Ferlan wrote: On 11/28/2016 09:01 AM, Eric Farman wrote: Consider a guest started with the following XML snippet: That's an awfully large unit # isn't it? For the guest... Large, yes. Unreasonable

[libvirt] Wiki account

2016-11-28 Thread Eric Farman
I believe this is still the preferred method... Could I please have an account "farman" for the libvirt wiki, in order to contribute some of the cover-letter "howto" information from the recent vhost-scsi series? Thanks, - Eric -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] qemu: Prevent detaching SCSI controller used by hostdev

2016-11-28 Thread Eric Farman
$ virsh detach-device guest_one_virtio_scsi scsicontroller.xml Device detached successfully Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/q

Re: [libvirt] [PATCH v4 9/9] docs: Add vhost-scsi

2016-11-28 Thread Eric Farman
On 11/22/2016 04:16 PM, John Ferlan wrote: On 11/21/2016 10:58 PM, Eric Farman wrote: Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) This will get squashed in with the conf patch

Re: [libvirt] [PATCH v4 6/9] conf: Wire up the vhost-scsi connection from/to XML

2016-11-28 Thread Eric Farman
On 11/22/2016 04:12 PM, John Ferlan wrote: On 11/21/2016 10:58 PM, Eric Farman wrote: With the QEMU components in place, provide the XML parsing to invoke that code when given the following XML snippet: An optional address element can be specified within the hostdev

Re: [libvirt] [PATCH v4 4/9] qemu: Add vhost-scsi string for -device parameter

2016-11-28 Thread Eric Farman
On 11/22/2016 04:08 PM, John Ferlan wrote: [...] void +qemuHostdevReAttachSCSIVHostDevices(virQEMUDriverPtr driver, +const char *name, +virDomainHostdevDefPtr *hostdevs, +int

[libvirt] [PATCH v4 3/9] util: Management routines for scsi_host devices

2016-11-21 Thread Eric Farman
"SCSIHost" to refer to a hostdev type='scsi' protcol='none'. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 18 +++ src/util/virhostdev.c| 163

[libvirt] [PATCH v4 1/9] qemu: Introduce vhost-scsi capability

2016-11-21 Thread Eric Farman
Do all the stuff for the vhost-scsi capability in QEMU, so it's in place for our checks later. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c| 2

[libvirt] [PATCH v4 0/9] Implementation of QEMU vhost-scsi

2016-11-21 Thread Eric Farman
48.html v2:https://www.redhat.com/archives/libvir-list/2016-August/msg01028.html v1:https://www.redhat.com/archives/libvir-list/2016-July/msg01004.html [1] http://www.redhat.com/archives/libvir-list/2014-July/msg01235.html [2] http://www.redhat.com/archives/libvir-list/2014-July

[libvirt] [PATCH v4 4/9] qemu: Add vhost-scsi string for -device parameter

2016-11-21 Thread Eric Farman
a vhost-scsi-ccw device in the case of an s390 machine, or vhost-scsi-pci for any others. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_cgroup.c | 32 + src/qemu/qemu_command.c| 80 ++ sr

[libvirt] [PATCH v4 7/9] security: Include vhost-scsi in security labels

2016-11-21 Thread Eric Farman
Ensure that the vhost-scsi wwpn information is passed to the different security policies. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/security/security_apparmor.c | 20 - src/security/security_dac.c | 46 ++-

[libvirt] [PATCH v4 9/9] docs: Add vhost-scsi

2016-11-21 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 4e40aa1..6bd02cc 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH v4 8/9] tests: Introduce basic vhost-scsi tests

2016-11-21 Thread Eric Farman
These tests were cloned from hostdev-scsi-virtio-scsi in both xml2argv and xml2xml We add ones for both vhost-scsi-ccw and vhost-scsi-pci since the syntaxes are slightly different between them. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynsk

[libvirt] [PATCH v4 6/9] conf: Wire up the vhost-scsi connection from/to XML

2016-11-21 Thread Eric Farman
With the QEMU components in place, provide the XML parsing to invoke that code when given the following XML snippet: An optional address element can be specified within the hostdev (pick CCW or PCI as necessary): Signed-off-by: Eric Farman <

[libvirt] [PATCH v4 2/9] Introduce framework for a hostdev SCSI_host subsystem type

2016-11-21 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/conf/domain_conf.c | 11 ++- src/conf/domain_conf.h | 18 ++ src/qemu/qemu_cgroup.c | 7 +++ src/qemu/qemu_hotplug.c | 2 ++ src/security/security_ap

[libvirt] [PATCH v4 5/9] qemu: Allow hotplug of vhost-scsi device

2016-11-21 Thread Eric Farman
so that shutting down the guest cleans up the host cgroup entries and allows future guests to use vhost-scsi devices. (Otherwise the guest will silently end.) Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 164 +++

Re: [libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-11-18 Thread Eric Farman
On 11/17/2016 06:18 PM, John Ferlan wrote: [...] I don't think the current code naming is incorrect, but it does slightly paint us into a box with this work. I'll mull this over overnight, and maybe cook up a cleanup patch separate from this series. Or perhaps take your other suggestion

Re: [libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-11-17 Thread Eric Farman
On 11/14/2016 05:20 PM, Eric Farman wrote: On 11/14/2016 04:59 PM, John Ferlan wrote: On 11/14/2016 08:31 AM, Eric Farman wrote: On 11/11/2016 04:41 PM, John Ferlan wrote: s/$SUBJ/Introduce framework for hostdev SCSI_Host subsys type On 11/08/2016 01:26 PM, Eric Farman wrote: We

Re: [libvirt] [PATCH v3 07/10] conf: Wire up the vhost-scsi connection from/to XML

2016-11-16 Thread Eric Farman
On 11/11/2016 04:53 PM, John Ferlan wrote: need a commit message here. On 11/08/2016 01:26 PM, Eric Farman wrote: Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/schemas/domaincommon.rng | 23 src/conf/domain_audit.c | 7 src/conf/domain_

[libvirt] [PATCH RFC] Rework existing code for scsi hostdev scsi_host protocol

2016-11-16 Thread Eric Farman
//www.redhat.com/archives/libvir-list/2016-November/msg00738.html Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/conf/domain_audit.c | 2 +- src/conf/domain_conf.c | 20 - src/conf/domain_conf.h | 8 +++ src/qemu/qemu_cgroup.c

Re: [libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-11-14 Thread Eric Farman
On 11/14/2016 04:59 PM, John Ferlan wrote: On 11/14/2016 08:31 AM, Eric Farman wrote: On 11/11/2016 04:41 PM, John Ferlan wrote: s/$SUBJ/Introduce framework for hostdev SCSI_Host subsys type On 11/08/2016 01:26 PM, Eric Farman wrote: We already have a "scsi" hostdev type, wh

Re: [libvirt] [PATCH v3 04/10] util: Management routines for scsi_host devices

2016-11-14 Thread Eric Farman
On 11/14/2016 04:40 PM, John Ferlan wrote: On 11/14/2016 03:38 PM, Eric Farman wrote: On 11/11/2016 04:44 PM, John Ferlan wrote: While perhaps mostly obvious - you need some sort of commit message here. On 11/08/2016 01:26 PM, Eric Farman wrote: Signed-off-by: Eric Farman <

Re: [libvirt] [PATCH v3 04/10] util: Management routines for scsi_host devices

2016-11-14 Thread Eric Farman
On 11/11/2016 04:44 PM, John Ferlan wrote: While perhaps mostly obvious - you need some sort of commit message here. On 11/08/2016 01:26 PM, Eric Farman wrote: Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + src/Makefile.am

Re: [libvirt] [PATCH v3 06/10] qemu: Allow hotplug of vhost-scsi device

2016-11-14 Thread Eric Farman
On 11/11/2016 04:47 PM, John Ferlan wrote: On 11/08/2016 01:26 PM, Eric Farman wrote: Adjust the device string that is built for vhost-scsi devices so that it can be invoked from hotplug. >From the QEMU command line, the file descriptors are expect to be numeric only. s/>// Look

Re: [libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-11-14 Thread Eric Farman
On 11/11/2016 04:41 PM, John Ferlan wrote: s/$SUBJ/Introduce framework for hostdev SCSI_Host subsys type On 11/08/2016 01:26 PM, Eric Farman wrote: We already have a "scsi" hostdev type, which refers to a single LUN that is passed through to a guest. But what of things where mul

Re: [libvirt] [PATCH v3 02/10] qemu: Introduce vhost-scsi capability

2016-11-14 Thread Eric Farman
On 11/11/2016 04:40 PM, John Ferlan wrote: On 11/08/2016 01:26 PM, Eric Farman wrote: Do all the stuff for the vhost-scsi capability in QEMU, so it's in place for our checks later. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynsk

[libvirt] [PATCH v3 02/10] qemu: Introduce vhost-scsi capability

2016-11-08 Thread Eric Farman
Do all the stuff for the vhost-scsi capability in QEMU, so it's in place for our checks later. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c| 2

[libvirt] [PATCH v3 08/10] security: Include vhost-scsi in security labels

2016-11-08 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/security/security_apparmor.c | 18 - src/security/security_dac.c | 42 ++-- src/security/security_selinux.c | 39 +++-- 3 files chang

[libvirt] [PATCH v3 06/10] qemu: Allow hotplug of vhost-scsi device

2016-11-08 Thread Eric Farman
so that shutting down the guest cleans up the host cgroup entries and allows future guests to use vhost-scsi devices. (Otherwise the guest will silently end.) Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 158 +++

[libvirt] [PATCH v3 09/10] tests: Introduce basic vhost-scsi test

2016-11-08 Thread Eric Farman
These tests were cloned from hostdev-scsi-virtio-scsi in both xml2argv and xml2xml Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- .../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24 + .../qemuxml2

[libvirt] [PATCH v3 04/10] util: Management routines for scsi_host devices

2016-11-08 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 19 +++ src/util/virhost.c | 299 +++ src/util/virhost.h | 72 sr

[libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-11-08 Thread Eric Farman
We already have a "scsi" hostdev type, which refers to a single LUN that is passed through to a guest. But what of things where multiple LUNs are passed through via a single SCSI HBA, such as with the vhost-scsi target? Create a new hostdev type that will carry this. Signed-off-by: E

[libvirt] [PATCH v3 10/10] docs: Add vhost-scsi

2016-11-08 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 11b3330..ed96ca4 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH v3 07/10] conf: Wire up the vhost-scsi connection from/to XML

2016-11-08 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/schemas/domaincommon.rng | 23 src/conf/domain_audit.c | 7 src/conf/domain_conf.c| 81 +-- 3 files changed, 109 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH v3 05/10] qemu: Add vhost-scsi string for -device parameter

2016-11-08 Thread Eric Farman
a vhost-scsi-ccw device in the case of an s390 machine, or vhost-scsi-pci for any others. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_cgroup.c | 32 + src/qemu/qemu_command.c| 79 ++ sr

[libvirt] [PATCH v3 01/10] Cleanup switch statements on the hostdev subsystem type

2016-11-08 Thread Eric Farman
As was suggested in an earlier review comment[1], we can catch some additional code points by cleaning up how we use the hostdev subsystem type in some switch statements. [1] End of https://www.redhat.com/archives/libvir-list/2016-September/msg00399.html Signed-off-by: Eric Farman <

[libvirt] [PATCH RESEND v3.2 00/10] Implementation of QEMU vhost-scsi

2016-11-08 Thread Eric Farman
tember/msg00148.html v2:https://www.redhat.com/archives/libvir-list/2016-August/msg01028.html v1:https://www.redhat.com/archives/libvir-list/2016-July/msg01004.html [1] http://www.redhat.com/archives/libvir-list/2014-July/msg01235.html [2] http://www.redhat.com/archives/libvir-list/2014-July/

[libvirt] [PATCH v3 01/10] Cleanup switch statements on the hostdev subsystem type

2016-10-31 Thread Eric Farman
As was suggested in an earlier review comment[1], we can catch some additional code points by cleaning up how we use the hostdev subsystem type in some switch statements. [1] End of https://www.redhat.com/archives/libvir-list/2016-September/msg00399.html Signed-off-by: Eric Farman <

[libvirt] [PATCH v3.1 00/10] Implementation of QEMU vhost-scsi

2016-10-31 Thread Eric Farman
https://www.redhat.com/archives/libvir-list/2016-August/msg01028.html v1:https://www.redhat.com/archives/libvir-list/2016-July/msg01004.html [1] http://www.redhat.com/archives/libvir-list/2014-July/msg01235.html [2] http://www.redhat.com/archives/libvir-list/2014-July/msg01390.html Eric Farman (10):

[libvirt] [PATCH v3 07/10] conf: Wire up the vhost-scsi connection from/to XML

2016-10-31 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/schemas/domaincommon.rng | 23 src/conf/domain_audit.c | 7 src/conf/domain_conf.c| 81 +-- 3 files changed, 109 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH v3 06/10] qemu: Allow hotplug of vhost-scsi device

2016-10-31 Thread Eric Farman
so that shutting down the guest cleans up the host cgroup entries and allows future guests to use vhost-scsi devices. (Otherwise the guest will silently end.) Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 158 +++

[libvirt] [PATCH v3 09/10] tests: Introduce basic vhost-scsi test

2016-10-31 Thread Eric Farman
These tests were cloned from hostdev-scsi-virtio-scsi in both xml2argv and xml2xml Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- .../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24 + .../qemuxml2

[libvirt] [PATCH v3 08/10] security: Include vhost-scsi in security labels

2016-10-31 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/security/security_apparmor.c | 18 - src/security/security_dac.c | 42 ++-- src/security/security_selinux.c | 39 +++-- 3 files chang

[libvirt] [PATCH v3 10/10] docs: Add vhost-scsi

2016-10-31 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c70377b..6ef864f 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH v3 04/10] util: Management routines for scsi_host devices

2016-10-31 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/Makefile.am | 1 + src/libvirt_private.syms | 19 +++ src/util/virhost.c | 301 +++ src/util/virhost.h | 72 src/util/virhostdev.c

[libvirt] [PATCH v3 05/10] qemu: Add vhost-scsi string for -device parameter

2016-10-31 Thread Eric Farman
a vhost-scsi-ccw device in the case of an s390 machine, or vhost-scsi-pci for any others. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_cgroup.c | 32 + src/qemu/qemu_command.c| 79 ++ sr

[libvirt] [PATCH v3 02/10] qemu: Introduce vhost-scsi capability

2016-10-31 Thread Eric Farman
Do all the stuff for the vhost-scsi capability in QEMU, so it's in place for our checks later. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c| 2

[libvirt] [PATCH v3 03/10] Introduce a "scsi_host" hostdev type

2016-10-31 Thread Eric Farman
We already have a "scsi" hostdev type, which refers to a single LUN that is passed through to a guest. But what of things where multiple LUNs are passed through via a single SCSI HBA, such as with the vhost-scsi target? Create a new hostdev type that will carry this. Signed-off-by: E

Re: [libvirt] [PATCH v3 0/9] Implementation of QEMU vhost-scsi

2016-10-31 Thread Eric Farman
On 10/29/2016 08:33 AM, John Ferlan wrote: On 10/26/2016 05:42 PM, Eric Farman wrote: [Author note: Apologies for an extra release or two in between versions, I was sidetracked by another project. This is probably too close to the impending freeze for 2.4, so I just updated doc to 2.5

[libvirt] [PATCH v3 0/9] Implementation of QEMU vhost-scsi

2016-10-26 Thread Eric Farman
-list/2014-July/msg01235.html [2] http://www.redhat.com/archives/libvir-list/2014-July/msg01390.html Eric Farman (9): qemu: Introduce vhost-scsi capability Introduce a "scsi_host" hostdev type util: Management routines for scsi_host devices qemu: Add vhost-scsi string for -devi

[libvirt] [PATCH v3 7/9] security: Include vhost-scsi in security labels

2016-10-26 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/security/security_apparmor.c | 18 - src/security/security_dac.c | 42 ++-- src/security/security_selinux.c | 39 +++-- 3 files chang

[libvirt] [PATCH v3 4/9] qemu: Add vhost-scsi string for -device parameter

2016-10-26 Thread Eric Farman
a vhost-scsi-ccw device in the case of an s390 machine, or vhost-scsi-pci for any others. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_cgroup.c | 32 + src/qemu/qemu_command.c| 79 ++ sr

[libvirt] [PATCH v3 5/9] qemu: Allow hotplug of vhost-scsi device

2016-10-26 Thread Eric Farman
so that shutting down the guest cleans up the host cgroup entries and allows future guests to use vhost-scsi devices. (Otherwise the guest will silently end.) Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/qemu/qemu_hotplug.c | 158 +++

[libvirt] [PATCH v3 9/9] docs: Add vhost-scsi

2016-10-26 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c70377b..6ef864f 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH v3 8/9] tests: Introduce basic vhost-scsi test

2016-10-26 Thread Eric Farman
These tests were cloned from hostdev-scsi-virtio-scsi in both xml2argv and xml2xml Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- .../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24 + .../qemuxml2

[libvirt] [PATCH v3 1/9] qemu: Introduce vhost-scsi capability

2016-10-26 Thread Eric Farman
Do all the stuff for the vhost-scsi capability in QEMU, so it's in place for our checks later. Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c| 2

[libvirt] [PATCH v3 2/9] Introduce a "scsi_host" hostdev type

2016-10-26 Thread Eric Farman
We already have a "scsi" hostdev type, which refers to a single LUN that is passed through to a guest. But what of things where multiple LUNs are passed through via a single SCSI HBA, such as with the vhost-scsi target? Create a new hostdev type that will carry this. Signed-off-by: E

[libvirt] [PATCH v3 3/9] util: Management routines for scsi_host devices

2016-10-26 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- src/Makefile.am | 1 + src/libvirt_private.syms | 19 +++ src/util/virhost.c | 301 +++ src/util/virhost.h | 72 src/util/virhostdev.c

[libvirt] [PATCH v3 6/9] conf: Wire up the vhost-scsi connection from/to XML

2016-10-26 Thread Eric Farman
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> --- docs/schemas/domaincommon.rng | 23 src/conf/domain_audit.c | 7 src/conf/domain_conf.c| 81 +-- 3 files changed, 109 insertions(+), 2 deletions(-) diff

Re: [libvirt] [PATCH v2 1/5] Introduce a "scsi_host" hostdev type

2016-10-05 Thread Eric Farman
On 09/13/2016 05:48 PM, Eric Farman wrote: On 09/13/2016 04:49 PM, John Ferlan wrote: [...] Thanks for the review. (Silent ACK on a lot of the above comments.) I'll try to get these all in place for a v3 with a little runway before the next freeze. OK - hopefully I won't be neck deep

Re: [libvirt] [PATCH v2 3/5] qemu: Add vhost-scsi string for -device parameter

2016-09-16 Thread Eric Farman
On 09/13/2016 04:55 PM, John Ferlan wrote: [...] diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 4843367..290b692 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -105,6 +105,32 @@ virSCSIDeviceGetAdapterId(const char *adapter, return -1; } +int

Re: [libvirt] [PATCH v2 1/5] Introduce a "scsi_host" hostdev type

2016-09-13 Thread Eric Farman
On 09/13/2016 04:49 PM, John Ferlan wrote: [...] I took a peek at the v1, but suffice to say didn't follow it that closely since there's a number of changes in v2 related to patch ordering. You could get 3 different opinions on that matter too! Hopefully a consensus before too long. :)

Re: [libvirt] [PATCH v2 3/5] qemu: Add vhost-scsi string for -device parameter

2016-09-13 Thread Eric Farman
On 09/12/2016 06:10 PM, John Ferlan wrote: On 09/06/2016 08:58 AM, Eric Farman wrote: Open /dev/vhost-scsi, and record the resulting file descriptor, so that the guest has access to the host device outside of the libvirt daemon. Pass this information, along with data parsed from the XML file

Re: [libvirt] [PATCH v2 1/5] Introduce a "scsi_host" hostdev type

2016-09-13 Thread Eric Farman
On 09/12/2016 05:34 PM, John Ferlan wrote: On 09/06/2016 08:58 AM, Eric Farman wrote: We already have a "scsi" hostdev type, which refers to a single LUN that is passed through to a guest. But what of things where multiple LUNs are passed through via a single SCSI HBA, such as with

  1   2   >