Re: [PATCH 2/3] vfio/ap: Remove pointless apdev variable

2023-10-09 Thread Tony Krowiak
Reviewed-by: Tony Krowiak On 10/8/23 22:20, Zhenzhong Duan wrote: No need to double-cast, call VFIO_AP_DEVICE() on DeviceState. No functional changes. Signed-off-by: Zhenzhong Duan --- hw/vfio/ap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ap.c

[PATCH v2 2/2] s390x/ap: Wire up the device request notifier interface

2023-06-02 Thread Tony Krowiak
Let's wire up the device request notifier interface to handle device unplug requests for AP. Signed-off-by: Tony Krowiak Link: https://lore.kernel.org/qemu-devel/20230530225544.280031-1-akrow...@linux.ibm.com/ --- hw/vfio/ap.c | 113 +++ 1 file

[PATCH v2 0/2] s390x/ap: fix hang when mdev attached to guest is removed

2023-06-02 Thread Tony Krowiak
is being removed, the handler will unplug the device, thus avoiding the hang condition. Link: https://lore.kernel.org/r/20230530223538.279198-4-akrow...@linux.ibm.com Tony Krowiak (2): linux-headers: Update with vfio_ap IRQ index mapping s390x/ap: Wire up the device request notifier interface

[PATCH v2 1/2] linux-headers: Update with vfio_ap IRQ index mapping

2023-06-02 Thread Tony Krowiak
Note: This is a placeholder patch that includes unmerged uapi changes. Signed-off-by: Tony Krowiak Link: https://lore.kernel.org/qemu-devel/20230530225544.280031-1-akrow...@linux.ibm.com/ --- include/standard-headers/linux/const.h| 2 +- include/standard-headers/linux/virtio_blk.h

[PATCH 0/2] s390x/ap: fix hang when mdev attached to guest is removed

2023-05-30 Thread Tony Krowiak
is being removed, the handler will unplug the device, thus avoiding the hang condition. Tony Krowiak (2): linux-headers: Update with vfio_ap IRQ index mapping s390x/ap: Wire up the device request notifier interface hw/vfio/ap.c | 113 + linux

[PATCH 1/2] linux-headers: Update with vfio_ap IRQ index mapping

2023-05-30 Thread Tony Krowiak
Signed-off-by: Tony Krowiak --- linux-headers/linux/vfio.h | 9 + 1 file changed, 9 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 4a534edbdcba..2658fda219e8 100644 --- a/linux-headers/linux/vfio.h +++ b/linux-headers/linux/vfio.h @@ -646,6

[PATCH 2/2] s390x/ap: Wire up the device request notifier interface

2023-05-30 Thread Tony Krowiak
Let's wire up the device request notifier interface to handle device unplug requests for AP. Signed-off-by: Tony Krowiak --- hw/vfio/ap.c | 113 +++ 1 file changed, 113 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index e0dd561e85a3

Re: [PATCH v4 02/21] vfio: Convert to ram_block_discard_disable()

2020-06-10 Thread Tony Krowiak
to qemu_balloon_inhibit(). Leave "x-balloon-allowed" named as it is for now. Cc: Cornelia Huck Cc: Alex Williamson Cc: Christian Borntraeger Cc: Tony Krowiak Cc: Halil Pasic Cc: Pierre Morel Cc: Eric Farman Signed-off-by: David Hildenbrand See my two minor comments, other than that: Reviewe

Re: [Qemu-devel] [PATCH v3 0/2] s390x/vfio-ap: hot plug/unplug vfio-ap device

2019-03-11 Thread Tony Krowiak
On 2/25/19 7:42 AM, Cornelia Huck wrote: On Mon, 18 Feb 2019 14:49:55 -0500 Tony Krowiak wrote: This patch series introduces hot plug/unplug of a vfio-ap device. To hot plug a vfio-ap device, the QEMU device_add function may be used: (qemu) device_add vfio-ap,sysfsdev=$path-to-mdev

Re: [Qemu-devel] [PATCH v3 2/2] s390x/vfio-ap: document hot plug/unplug of vfio-ap device

2019-03-11 Thread Tony Krowiak
On 2/21/19 11:32 AM, Cornelia Huck wrote: On Thu, 21 Feb 2019 11:26:53 -0500 Tony Krowiak wrote: On 2/20/19 10:51 AM, Cornelia Huck wrote: On Mon, 18 Feb 2019 14:49:57 -0500 Tony Krowiak wrote: Let's update the vfio-ap.txt document to include the hot plug/unplug support introduced

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-03-04 Thread Tony Krowiak
On 12/17/18 10:57 AM, Tony Krowiak wrote: Ping!! I'm wondering who might be responsible for merging this fix? The qbus_is_full(BusState *bus) function (qdev_monitor.c) compares the max_index value of the BusState structure with the max_dev value of the BusClass structure to determine whether

Re: [Qemu-devel] [PATCH v3 2/2] s390x/vfio-ap: document hot plug/unplug of vfio-ap device

2019-02-21 Thread Tony Krowiak
On 2/20/19 10:51 AM, Cornelia Huck wrote: On Mon, 18 Feb 2019 14:49:57 -0500 Tony Krowiak wrote: Let's update the vfio-ap.txt document to include the hot plug/unplug support introduced in this patch set. s/ introduced in this patch set// Nobody will know about this patch set when they look

[Qemu-devel] [PATCH v3 0/2] s390x/vfio-ap: hot plug/unplug vfio-ap device

2019-02-18 Thread Tony Krowiak
enabled (e.g., -cpu host,ap=on). Tony Krowiak (2): s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device s390x/vfio-ap: document hot plug/unplug of vfio-ap device docs/vfio-ap.txt | 58 +++- hw/s390x/ap-bridge.c | 12

[Qemu-devel] [PATCH v3 1/2] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-02-18 Thread Tony Krowiak
performs its periodic scan and finds there are no longer any AP resources assigned to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Tested-by: Pierre Morel --- hw/s390x/ap-bridge.c | 12 +++- hw/vfio/ap.c

[Qemu-devel] [PATCH v3 2/2] s390x/vfio-ap: document hot plug/unplug of vfio-ap device

2019-02-18 Thread Tony Krowiak
Let's update the vfio-ap.txt document to include the hot plug/unplug support introduced in this patch set. Signed-off-by: Tony Krowiak --- docs/vfio-ap.txt | 61 +++- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/docs/vfio

Re: [Qemu-devel] [PATCH v2 0/2] s390x/vfio-ap: hot plug/unplug vfio-ap device

2019-02-18 Thread Tony Krowiak
On 2/18/19 12:59 PM, Tony Krowiak wrote: PLEASE IGNORE THIS PATCH SERIES. A v3 VERSION IS FORTHCOMING. VERSION v2 has already been posted and reviewed. This patch series introduces hot plug/unplug of a vfio-ap device. A vfio-ap device can be hot plugged only if: 1. The guest does not yet

[Qemu-devel] [PATCH v2 1/2] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-02-18 Thread Tony Krowiak
periodic scan and finds there are no longer any AP resources assigned to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Tested-by: Pierre Morel --- hw/s390x/ap-bridge.c | 12 +++- hw/vfio/ap.c | 2 +- 2 files

[Qemu-devel] [PATCH v2 2/2] s390x/vfio-ap: document hot plug/unplug of vfio-ap device

2019-02-18 Thread Tony Krowiak
Let's update the vfio-ap.txt document to include the hot plug/unplug support introduced in this patch set. Signed-off-by: Tony Krowiak --- docs/vfio-ap.txt | 58 +++- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/docs/vfio

[Qemu-devel] [PATCH v2 0/2] s390x/vfio-ap: hot plug/unplug vfio-ap device

2019-02-18 Thread Tony Krowiak
if: 1. The guest was started with a vfio-ap device configured for it: -device vfio-ap,sysfsdev=$path-to-mdev 2. The guest was started with the following CPU model features enabled: * ap=on Tony Krowiak (2): s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device s390x/vfio-ap: document

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-02-18 Thread Tony Krowiak
On 2/6/19 3:34 AM, Igor Mammedov wrote: On Mon, 28 Jan 2019 15:35:09 -0500 Tony Krowiak wrote: ping! Who is the maintainer responsible for merging this?

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-28 Thread Tony Krowiak
On 12/17/18 10:57 AM, Tony Krowiak wrote: The qbus_is_full(BusState *bus) function (qdev_monitor.c) compares the max_index value of the BusState structure with the max_dev value of the BusClass structure to determine whether the maximum number of children has been reached for the bus

[Qemu-devel] [PATCH v2] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-28 Thread Tony Krowiak
periodic scan and finds there are no longer any AP resources assigned to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Tested-by: Pierre Morel --- docs/vfio-ap.txt | 58

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-28 Thread Tony Krowiak
On 1/14/19 9:16 AM, Cornelia Huck wrote: On Thu, 10 Jan 2019 11:22:48 -0500 Tony Krowiak wrote: Can you extend this patch description a little bit, including what we discussed here? Maybe a short comment that explains why qdev_simple_device_unplug_cb() is appropriate as well (i.e. hits

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-10 Thread Tony Krowiak
On 1/9/19 12:28 PM, David Hildenbrand wrote: On 09.01.19 18:13, Halil Pasic wrote: On Wed, 9 Jan 2019 17:37:49 +0100 David Hildenbrand wrote: On 09.01.19 17:27, Tony Krowiak wrote: On 1/9/19 6:30 AM, Cornelia Huck wrote: On Tue, 8 Jan 2019 23:13:39 +0100 David Hildenbrand wrote

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-10 Thread Tony Krowiak
On 1/9/19 12:35 PM, Halil Pasic wrote: On Wed, 9 Jan 2019 10:36:11 -0500 Tony Krowiak wrote: On 1/9/19 5:14 AM, Cornelia Huck wrote: On Tue, 8 Jan 2019 15:34:37 -0500 Tony Krowiak wrote: On 1/8/19 12:06 PM, Cornelia Huck wrote: On Tue, 8 Jan 2019 17:50:21 +0100 Halil Pasic wrote

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-09 Thread Tony Krowiak
On 1/9/19 6:30 AM, Cornelia Huck wrote: On Tue, 8 Jan 2019 23:13:39 +0100 David Hildenbrand wrote: On 08.01.19 20:52, Tony Krowiak wrote: On 1/8/19 11:09 AM, David Hildenbrand wrote: On 08.01.19 17:01, Tony Krowiak wrote: Introduces hot plug/unplug support for the vfio-ap device. Note

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-09 Thread Tony Krowiak
On 1/9/19 5:14 AM, Cornelia Huck wrote: On Tue, 8 Jan 2019 15:34:37 -0500 Tony Krowiak wrote: On 1/8/19 12:06 PM, Cornelia Huck wrote: On Tue, 8 Jan 2019 17:50:21 +0100 Halil Pasic wrote: On Tue, 8 Jan 2019 17:31:13 +0100 Cornelia Huck wrote: On Tue, 8 Jan 2019 11:08:56 -0500 Tony

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-08 Thread Tony Krowiak
On 1/8/19 12:06 PM, Cornelia Huck wrote: On Tue, 8 Jan 2019 17:50:21 +0100 Halil Pasic wrote: On Tue, 8 Jan 2019 17:31:13 +0100 Cornelia Huck wrote: On Tue, 8 Jan 2019 11:08:56 -0500 Tony Krowiak wrote: On 12/17/18 10:57 AM, Tony Krowiak wrote: The qbus_is_full(BusState *bus

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-08 Thread Tony Krowiak
On 1/8/19 11:09 AM, David Hildenbrand wrote: On 08.01.19 17:01, Tony Krowiak wrote: Introduces hot plug/unplug support for the vfio-ap device. Note that only one vfio-ap device can be attached to the ap-bus, so a vfio-ap device can only be hot plugged if the '-device vfio-ap,sysfsdev

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-08 Thread Tony Krowiak
On 1/8/19 11:01 AM, Tony Krowiak wrote: Introduces hot plug/unplug support for the vfio-ap device. Note that only one vfio-ap device can be attached to the ap-bus, so a vfio-ap device can only be hot plugged if the '-device vfio-ap,sysfsdev=$path_to_mdev' option is not specified on the QEMU

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-08 Thread Tony Krowiak
On 12/17/18 10:57 AM, Tony Krowiak wrote: The qbus_is_full(BusState *bus) function (qdev_monitor.c) compares the max_index value of the BusState structure with the max_dev value of the BusClass structure to determine whether the maximum number of children has been reached for the bus

[Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-08 Thread Tony Krowiak
Introduces hot plug/unplug support for the vfio-ap device. Note that only one vfio-ap device can be attached to the ap-bus, so a vfio-ap device can only be hot plugged if the '-device vfio-ap,sysfsdev=$path_to_mdev' option is not specified on the QEMU command line. Signed-off-by: Tony Krowiak

[Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2018-12-17 Thread Tony Krowiak
is actually empty. To resolve the problem, a new 'num_children' field is being added to the BusState structure to keep track of the number of children plugged into the bus. It will be incremented when a child is plugged, and decremented when a child is unplugged. Signed-off-by: Tony Krowiak Reviewed

Re: [Qemu-devel] [PATCH v2] qdev/core: Can not replug device on bus that allows one device

2018-12-14 Thread Tony Krowiak
On 12/14/18 7:09 AM, Halil Pasic wrote: On Thu, 13 Dec 2018 11:26:42 -0500 Tony Krowiak wrote: If the maximum number of devices allowed on a bus is 1 and a device which is plugged into the bus is subsequently unplugged, attempting to replug the device fails with error "Bus 'xxx'

Re: [Qemu-devel] [PATCH v2] qdev/core: Can not replug device on bus that allows one device

2018-12-14 Thread Tony Krowiak
On 12/14/18 4:16 AM, Pierre Morel wrote: On 13/12/2018 17:26, Tony Krowiak wrote: If the maximum number of devices allowed on a bus is 1 and a device which is plugged into the bus is subsequently unplugged, attempting to replug the device fails with error "Bus 'xxx' does not su

[Qemu-devel] [PATCH v2] qdev/core: Can not replug device on bus that allows one device

2018-12-13 Thread Tony Krowiak
State *bus) function (qdev_monitor.c) because bus->max_index >= bus_class->max_dev. The root of the problem is that the bus->max_index is not decremented when a device is unplugged from the bus. This patch fixes that problem. Signed-off-by: Tony Krowiak --- hw/core/qdev.c | 3 +++ in

Re: [Qemu-devel] [PATCH] qdev/core: Can not replug device on bus that allows one device

2018-12-13 Thread Tony Krowiak
On 12/13/18 8:03 AM, Halil Pasic wrote: On Thu, 13 Dec 2018 13:09:59 +0100 Igor Mammedov wrote: On Tue, 11 Dec 2018 14:41:00 -0500 Tony Krowiak wrote: On 12/11/18 10:23 AM, Igor Mammedov wrote: On Mon, 10 Dec 2018 14:14:14 -0500 Tony Krowiak wrote: If the maximum number of devices

Re: [Qemu-devel] [PATCH] qdev/core: Can not replug device on bus that allows one device

2018-12-11 Thread Tony Krowiak
On 12/11/18 10:23 AM, Igor Mammedov wrote: On Mon, 10 Dec 2018 14:14:14 -0500 Tony Krowiak wrote: If the maximum number of devices allowed on a bus is 1 and a device which is plugged into the bus is subsequently unplugged, attempting to replug the device fails with error "Bus 'xxx'

[Qemu-devel] [PATCH] qdev/core: Can not replug device on bus that allows one device

2018-12-10 Thread Tony Krowiak
State *bus) function (qdev_monitor.c) because bus->max_index >= bus_class->max_dev. The root of the problem is that the bus->max_index is not decremented when a device is unplugged from the bus. This patch fixes that problem. Signed-off-by: Tony Krowiak --- hw/core/qdev.c | 2 ++ 1 file changed,

Re: [Qemu-devel] [PATCH RFC] vfio-ap: flag as compatible with balloon

2018-12-06 Thread Tony Krowiak
* This needs to be set before vfio_get_device() for vfio common to + * handle the balloon inhibitor. + */ +vapdev->vdev.balloon_allowed = true; + ret = vfio_get_device(vfio_group, mdevid, >vdev, _err); if (ret) { goto out_get_dev_err; Tested-by: Tony Krowiak

Re: [Qemu-devel] [PATCH RFC] vfio-ap: flag as compatible with balloon

2018-12-06 Thread Tony Krowiak
On 12/6/18 7:48 AM, Cornelia Huck wrote: On Thu, 6 Dec 2018 13:32:39 +0100 Halil Pasic wrote: On Thu, 6 Dec 2018 09:28:34 +0100 David Hildenbrand wrote: On 05.12.18 18:25, Christian Borntraeger wrote: On 05.12.2018 17:45, Cornelia Huck wrote: On Wed, 5 Dec 2018 17:38:22 +0100 David

Re: [Qemu-devel] [PATCH v2 2/6] s390x/vfio: ap: Use the APdevice as a child of the APBus

2018-11-30 Thread Tony Krowiak
On 11/30/18 4:31 AM, Pierre Morel wrote: On 29/11/2018 21:42, Tony Krowiak wrote: On 11/22/18 11:35 AM, Pierre Morel wrote: Two good reasons to use the base device as a child of the AP BUS: - We can easily find the device without traversing the qtree. - In case we have different APdevice

Re: [Qemu-devel] [PATCH v2 6/6] s390x/vfio: ap: Implementing AP Queue Interrupt Control

2018-11-29 Thread Tony Krowiak
/vfio/ap.c @@ -4,6 +4,7 @@ * Copyright 2018 IBM Corp. * Author(s): Tony Krowiak *Halil Pasic + *Pierre Morel * * This work is licensed under the terms of the GNU GPL, version 2 or (at * your option) any later version. See the COPYING file in the top-leve

Re: [Qemu-devel] [PATCH v2 4/6] s390x/cpumodel: Set up CPU model for AQIC interception

2018-11-29 Thread Tony Krowiak
arget/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -448,6 +448,7 @@ static uint16_t full_GEN12_GA1[] = { S390_FEAT_EDAT_2, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_AP_QUERY_CONFIG_INFO, +S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP, }; Reviewed-by: Tony Krowiak

Re: [Qemu-devel] [PATCH v2 1/6] s390x/vfio: ap: Finding the AP bridge

2018-11-29 Thread Tony Krowiak
On 11/22/18 11:35 AM, Pierre Morel wrote: In the case we will enter QEMU through interception of instructions, we will need to retrieve the AP devices. The base device is the AP bridge. Let us implement a way to retrieve the AP Bridge from qtree. Signed-off-by: Pierre Morel ---

Re: [Qemu-devel] [PATCH v2 2/6] s390x/vfio: ap: Use the APdevice as a child of the APBus

2018-11-29 Thread Tony Krowiak
On 11/22/18 11:35 AM, Pierre Morel wrote: Two good reasons to use the base device as a child of the AP BUS: - We can easily find the device without traversing the qtree. - In case we have different APdevice instantiation, VFIO with interception or emulation, we will need the APDevice as a

Re: [Qemu-devel] [PATCH v2 2/6] s390x/vfio: ap: Use the APdevice as a child of the APBus

2018-11-29 Thread Tony Krowiak
On 11/29/18 6:45 AM, Cornelia Huck wrote: On Thu, 22 Nov 2018 17:35:51 +0100 Pierre Morel wrote: Two good reasons to use the base device as a child of the AP BUS: - We can easily find the device without traversing the qtree. - In case we have different APdevice instantiation, VFIO with

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: report correct error

2018-10-16 Thread Tony Krowiak
ret) { error_report("%s: failed to reset %s device: %s", __func__, - vapdev->vdev.name, strerror(ret)); + vapdev->vdev.name, strerror(errno)); } } Reviewed-by: Tony Krowiak

[Qemu-devel] [PATCH v11 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
to be signaled. The vfio_ap device driver's group notification handler will get called at which time the device driver will configure the the AP devices to which the guest will be granted access. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel Acked-by: Halil Pasic Tested-by: Pierre Morel Tested

[Qemu-devel] [PATCH v11 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-10 Thread Tony Krowiak
Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel Acked-by: David Hildenbrand Reviewed-by: Thomas Huth Reviewed-by: Halil Pasic --- MAINTAINERS | 12 ++ hw/s390x/Makefile.objs | 2 + hw/s390x/ap

[Qemu-devel] [PATCH v11 6/6] s390: doc: detailed specifications for AP virtualization

2018-10-10 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Tested-by: Pierre Morel

[Qemu-devel] [PATCH v11 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-10-10 Thread Tony Krowiak
-off-by: Tony Krowiak Tested-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Reviewed-by: Christian Borntraeger Acked-by: Halil Pasic --- target/s390x/kvm.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c

[Qemu-devel] [PATCH v11 1/6] linux-headers: linux header updates for AP support

2018-10-10 Thread Tony Krowiak
Updates the linux header files in preparation for introduction of the VFIO AP device: * Added device attributes to the KVM_S390_VM_CRYPTO group to indicate whether AP instructions are to be interpreted * Added VFIO device information for AP devices Signed-off-by: Tony Krowiak --- linux

[Qemu-devel] [PATCH v11 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-10-10 Thread Tony Krowiak
is available on the host. This feature will be exposed by KVM only if APFT is installed on the host. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Reviewed-by: Christian Borntraeger --- target/s390x/cpu_features.c | 3

[Qemu-devel] [PATCH v11 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-10-10 Thread Tony Krowiak
nterpreted by default if AP facilities are installed to handle the case where feature ap=on and no vfio-ap device is configured for the guest. Tony Krowiak (6): linux-headers: linux header updates for AP support s390x/cpumodel: Set up CPU model for AP device support s390x/kvm: enable AP

Re: [Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
On 10/10/2018 05:21 AM, Cornelia Huck wrote: On Tue, 9 Oct 2018 13:52:25 -0400 Tony Krowiak wrote: diff --git a/MAINTAINERS b/MAINTAINERS index 97e8ed808bc0..29041da69237 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1209,6 +1209,7 @@ F: hw/s390x/ap-device.c F: hw/s390x/ap-bridge.c F

Re: [Qemu-devel] [qemu-s390x] [PATCH v10 6/6] s390: doc: detailed specifications for AP virtualization

2018-10-10 Thread Tony Krowiak
On 10/10/2018 04:14 AM, Thomas Huth wrote: On 2018-10-09 19:52, Tony Krowiak wrote: This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM

Re: [Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
On 10/10/2018 08:49 AM, Christian Borntraeger wrote: On 10/10/2018 02:37 PM, Pierre Morel wrote: On 09/10/2018 19:52, Tony Krowiak wrote: +static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp) +{ +GError *gerror; +char *symlink, *group_path; +int groupid

Re: [Qemu-devel] [qemu-s390x] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
On 10/10/2018 04:52 AM, Cornelia Huck wrote: On Wed, 10 Oct 2018 10:25:22 +0200 Thomas Huth wrote: On 2018-10-09 19:52, Tony Krowiak wrote: [...] +static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp) +{ +GError *gerror; +char *symlink, *group_path; +int

Re: [Qemu-devel] [qemu-s390x] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
On 10/10/2018 04:25 AM, Thomas Huth wrote: On 2018-10-09 19:52, Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated

Re: [Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-10 Thread Tony Krowiak
On 10/09/2018 03:51 PM, David Hildenbrand wrote: +static void vfio_ap_realize(DeviceState *dev, Error **errp) +{ +int ret; +char *mdevid; +Error *local_err = NULL; +VFIOGroup *vfio_group; +APDevice *apdev = AP_DEVICE(dev); +VFIOAPDevice *vapdev = VFIO_AP_DEVICE(apdev);

Re: [Qemu-devel] [PATCH v10 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-10 Thread Tony Krowiak
On 10/10/2018 04:14 AM, Cornelia Huck wrote: On Tue, 9 Oct 2018 13:52:24 -0400 Tony Krowiak wrote: diff --git a/hw/s390x/ap-device.c b/hw/s390x/ap-device.c new file mode 100644 index ..fb6e35024c82 --- /dev/null +++ b/hw/s390x/ap-device.c @@ -0,0 +1,39 @@ +/* + * Adjunct

Re: [Qemu-devel] [PATCH v10 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-10-10 Thread Tony Krowiak
On 10/09/2018 03:48 PM, David Hildenbrand wrote: On 09/10/2018 21:14, Christian Borntraeger wrote: On 10/09/2018 07:52 PM, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1

[Qemu-devel] [PATCH v10 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-09 Thread Tony Krowiak
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel Acked-by: David Hildenbrand --- MAINTAINERS | 12 ++ hw/s390x/Makefile.objs | 2 + hw/s390x/ap-bridge.c | 78

[Qemu-devel] [PATCH v10 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-10-09 Thread Tony Krowiak
From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP instructions must be interpreted by default; otherwise, they will be intercepted. This attribute

[Qemu-devel] [PATCH v10 1/6] linux-headers: linux header updates for AP support

2018-10-09 Thread Tony Krowiak
Updates the linux header files in preparation for introduction of the VFIO AP device: * Added device attributes to the KVM_S390_VM_CRYPTO group to indicate whether AP instructions are to be interpreted * Added VFIO device information for AP devices Signed-off-by: Tony Krowiak --- linux

[Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-09 Thread Tony Krowiak
to be signaled. The vfio_ap device driver's group notification handler will get called at which time the device driver will configure the the AP devices to which the guest will be granted access. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel --- MAINTAINERS | 1 + default

[Qemu-devel] [PATCH v10 6/6] s390: doc: detailed specifications for AP virtualization

2018-10-09 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Tested-by: Pierre Morel

[Qemu-devel] [PATCH v10 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-10-09 Thread Tony Krowiak
From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework and provides the infrastructure for granting exclusive guest access to crypto devices installed

[Qemu-devel] [PATCH v10 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-10-09 Thread Tony Krowiak
is available on the host. This feature will be exposed by KVM only if APFT is installed on the host. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel --- target/s390x/cpu_features.c | 3 +++ target/s390x/cpu_features_def.h | 3 +++ target/s390x/cpu_models.c | 2 ++ target/s390x

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 10/08/2018 10:44 AM, Thomas Huth wrote: On 2018-10-08 16:20, Tony Krowiak wrote: On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 10/08/2018 10:35 AM, Cornelia Huck wrote: On Mon, 8 Oct 2018 16:22:27 +0200 David Hildenbrand wrote: On 08/10/2018 16:20, Tony Krowiak wrote: On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- +typedef struct APBridge

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-02 Thread Tony Krowiak
On 09/28/2018 08:51 AM, Halil Pasic wrote: On 09/27/2018 02:52 PM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-02 Thread Tony Krowiak
On 09/27/2018 09:56 AM, Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated

Re: [Qemu-devel] [PATCH v9 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-10-02 Thread Tony Krowiak
On 09/27/2018 05:28 AM, Cornelia Huck wrote: On Wed, 26 Sep 2018 18:54:34 -0400 Tony Krowiak wrote: From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-28 Thread Tony Krowiak
On 09/27/2018 08:29 AM, Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- [...] diff --git a/hw/s390x/ap-bridge.c b/hw/s390x/ap-bridge.c new file mode 100644 index

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-28 Thread Tony Krowiak
On 09/28/2018 09:57 AM, Halil Pasic wrote: On 09/27/2018 12:54 AM, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. [..] + +static char *vfio_ap_bus_get_dev_path(DeviceState *dev) Cover letter states you want to remove vifo_ap

Re: [Qemu-devel] [PATCH v9 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-09-28 Thread Tony Krowiak
On 09/27/2018 03:52 AM, David Hildenbrand wrote: On 27/09/2018 00:54, Tony Krowiak wrote: From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP

Re: [Qemu-devel] [PATCH v9 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-27 Thread Tony Krowiak
On 09/27/2018 03:50 AM, David Hildenbrand wrote: On 27/09/2018 00:54, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The S390_FEAT_AP CPU model feature indicates whether AP

Re: [Qemu-devel] [PATCH v9 1/6] linux-headers: linux header updates for AP support

2018-09-27 Thread Tony Krowiak
On 09/27/2018 03:41 AM, David Hildenbrand wrote: On 27/09/2018 00:54, Tony Krowiak wrote: Updates the linux header files in preparation for introduction of the VFIO AP device: * Added a feature ID to indicate AP facilities are installed * Added device attributes to the KVM_S390_VM_CRYPTO

[Qemu-devel] [PATCH v9 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-26 Thread Tony Krowiak
is available on the host. This feature will be exposed by KVM only if APFT is installed on the host. Signed-off-by: Tony Krowiak --- target/s390x/cpu_features.c | 3 +++ target/s390x/cpu_features_def.h | 3 +++ target/s390x/cpu_models.c | 2 ++ target/s390x/gen-features.c | 3

[Qemu-devel] [PATCH v9 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP instructions must be interpreted by default; otherwise, they will be intercepted. This attribute

[Qemu-devel] [PATCH v9 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-26 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak --- MAINTAINERS | 1 + docs/vfio-ap.txt

[Qemu-devel] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- MAINTAINERS | 12 ++ hw/s390x/Makefile.objs | 2 + hw/s390x/ap-bridge.c | 81 hw/s390x/ap-device.c

[Qemu-devel] [PATCH v9 1/6] linux-headers: linux header updates for AP support

2018-09-26 Thread Tony Krowiak
information for AP devices Signed-off-by: Tony Krowiak --- linux-headers/asm-s390/kvm.h | 3 +++ linux-headers/linux/vfio.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 1ab9901911bf..b4948706468e 100644 --- a/linux-headers/asm

[Qemu-devel] [PATCH v9 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework and provides the infrastructure for granting exclusive guest access to crypto devices installed

[Qemu-devel] [PATCH v9 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-09-26 Thread Tony Krowiak
to be signaled. The vfio_ap device driver's group notification handler will get called at which time the device driver will configure the the AP devices to which the guest will be granted access. Signed-off-by: Tony Krowiak --- MAINTAINERS | 1 + default-configs/s390x-softmmu.mak

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 3/6] s390x/kvm: enable/disable AP instruction interpretation for guest

2018-09-18 Thread Tony Krowiak
On 09/17/2018 04:43 AM, David Hildenbrand wrote: Am 12.09.18 um 22:08 schrieb Tony Krowiak: From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable or disable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is installed, AP

Re: [Qemu-devel] [PATCH v8 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-17 Thread Tony Krowiak
On 09/17/2018 04:19 AM, David Hildenbrand wrote: Am 12.09.18 um 22:08 schrieb Tony Krowiak: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The KVM_S390_VM_CPU_FEAT_AP CPU model feature indicates that AP

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-14 Thread Tony Krowiak
On 09/13/2018 02:24 PM, Halil Pasic wrote: On 09/13/2018 07:15 PM, Tony Krowiak wrote: On 09/13/2018 01:02 PM, Tony Krowiak wrote: On 09/13/2018 02:29 AM, Christian Borntraeger wrote: On 09/13/2018 07:48 AM, Thomas Huth wrote: On 2018-09-12 22:08, Tony Krowiak wrote: From: Tony Krowiak

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-13 Thread Tony Krowiak
On 09/13/2018 01:02 PM, Tony Krowiak wrote: On 09/13/2018 02:29 AM, Christian Borntraeger wrote: On 09/13/2018 07:48 AM, Thomas Huth wrote: On 2018-09-12 22:08, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-13 Thread Tony Krowiak
On 09/13/2018 02:29 AM, Christian Borntraeger wrote: On 09/13/2018 07:48 AM, Thomas Huth wrote: On 2018-09-12 22:08, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- [...] diff --git a/hw/s390x/ap

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-13 Thread Tony Krowiak
On 09/13/2018 02:06 AM, Thomas Huth wrote: On 2018-09-12 22:08, Tony Krowiak wrote: This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 3/6] s390x/kvm: enable/disable AP instruction interpretation for guest

2018-09-13 Thread Tony Krowiak
On 09/13/2018 01:28 AM, Thomas Huth wrote: On 2018-09-12 22:08, Tony Krowiak wrote: From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable or disable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is installed, AP instructions

[Qemu-devel] [PATCH v8 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-12 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak --- MAINTAINERS |1 + docs/vfio-ap.txt

[Qemu-devel] [PATCH v8 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-09-12 Thread Tony Krowiak
to be signaled. The vfio_ap device driver's group notification handler will get called at which time the device driver will configure the the AP devices to which the guest will be granted access. Signed-off-by: Tony Krowiak --- MAINTAINERS |1 + default-configs/s390x-softmmu.mak

[Qemu-devel] [PATCH v8 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-12 Thread Tony Krowiak
if the QCI is installed on the host. 2. The S390_FEAT_AP_FACILITY_TEST feature indicates that the AP Facility Test (APFT) facility is installed. This feature will be enabled by the kernel only if the APFT facility is installed on the host. Signed-off-by: Tony Krowiak --- target

[Qemu-devel] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-12 Thread Tony Krowiak
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- MAINTAINERS | 12 +++ hw/s390x/Makefile.objs |2 + hw/s390x/ap-bridge.c | 76 ++ hw/s390x/ap

[Qemu-devel] [PATCH v8 1/6] linux-headers: linux header updates for AP support

2018-09-12 Thread Tony Krowiak
information for AP devices Signed-off-by: Tony Krowiak --- linux-headers/asm-s390/kvm.h |3 +++ linux-headers/linux/vfio.h |2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 1ab9901..b494870 100644 --- a/linux

  1   2   >