Re: [RFC PATCH v13 4/4] s390: implementing CHSC SEI for AP config change

2025-06-27 Thread Anthony Krowiak
Sure On 6/27/25 11:12 AM, Matthew Rosato wrote: AFAICT this portion of the handler including mutex should be moved out of ap.c into chsc_sei_nt0_get_event().  When vfio_ap is not in use, we can't call into it.  Can't you also build without VFIO_AP?  I didn't try it but that sure seems like it

Re: [RFC PATCH v13 4/4] s390: implementing CHSC SEI for AP config change

2025-06-27 Thread Anthony Krowiak
such circumstance. Also added the following to hw/s390x/meson.build if CONFIG_VFIO_AP is false, it will use the stub file. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Reviewed-by: Cédric Le Goater FYI, this patch (or some part of this series) breaks hotplug for PCI devices on s390

Re: [RFC PATCH v12 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-09 Thread Anthony Krowiak
On 6/6/25 2:37 PM, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak

Re: [RFC PATCH v12 2/4] hw/vfio/ap: store object indicating AP config changed in a queue

2025-06-09 Thread Anthony Krowiak
-off-by: Rorie Reyes See comment below. With that change made: Reviewed-by: Anthony Krowiak --- hw/vfio/ap.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 93c74ebedb..fc435f5c5b 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -41,6 +41,13

Re: [RFC PATCH v11 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-06 Thread Anthony Krowiak
On 6/5/25 1:57 PM, Rorie Reyes wrote: On 6/4/25 9:47 AM, Anthony Krowiak wrote: On 6/3/25 4:30 PM, Cédric Le Goater wrote: On 6/3/25 20:01, Rorie Reyes wrote: On 6/3/25 10:21 AM, Cédric Le Goater wrote: On 6/3/25 14:58, Rorie Reyes wrote: Hey Cedric, You mentioned the following in

Re: [RFC PATCH v11 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-04 Thread Anthony Krowiak
On 6/3/25 4:30 PM, Cédric Le Goater wrote: On 6/3/25 20:01, Rorie Reyes wrote: On 6/3/25 10:21 AM, Cédric Le Goater wrote: On 6/3/25 14:58, Rorie Reyes wrote: Hey Cedric, You mentioned the following in my v9 patches "In that case, let's keep it simple (no mutex) and add a assert(bql_lo

Re: [RFC PATCH v9 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-27 Thread Anthony Krowiak
On 5/26/25 4:43 AM, Cédric Le Goater wrote: On 5/22/25 20:55, Anthony Krowiak wrote: On 5/22/25 9:30 AM, Cédric Le Goater wrote: On 5/12/25 20:02, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests

Re: [RFC PATCH v10 4/4] s390: implementing CHSC SEI for AP config change

2025-05-23 Thread Anthony Krowiak
to hw/s390x/meson.build if CONFIG_VFIO_AP is false, it will use the stub file. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Reviewed-by: Cédric Le Goater --- MAINTAINERS | 1 + hw/s390x/ap-stub.c| 25 + hw/s390x/meson.build | 1 + target/

Re: [RFC PATCH v10 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-23 Thread Anthony Krowiak
On 5/23/25 12:47 AM, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c

Re: [RFC PATCH v9 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-22 Thread Anthony Krowiak
On 5/22/25 9:30 AM, Cédric Le Goater wrote: On 5/12/25 20:02, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie

Re: [RFC PATCH v9 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-22 Thread Anthony Krowiak
On 5/22/25 1:17 PM, Rorie Reyes wrote: On 5/22/25 9:30 AM, Cédric Le Goater wrote: On 5/12/25 20:02, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct pr

Re: [RFC PATCH v9 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-22 Thread Anthony Krowiak
On 5/22/25 9:35 AM, Cédric Le Goater wrote: On 5/12/25 20:02, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie

Re: [RFC PATCH v9 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-05-13 Thread Anthony Krowiak
On 5/12/25 2:02 PM, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak

Re: [RFC PATCH v9 4/4] s390: implementing CHSC SEI for AP config change

2025-05-13 Thread Anthony Krowiak
s390x/meson.build if CONFIG_VFIO_AP is false, it will use the stub file. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak --- MAINTAINERS | 1 + hw/s390x/ap-stub.c| 25 + hw/s390x/meson.build | 1 + target/s390x/ioinst.c | 11 +-

Re: [RFC PATCH v9 2/4] hw/vfio/ap: store object indicating AP config changed in a queue

2025-05-13 Thread Anthony Krowiak
-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak --- hw/vfio/ap.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 3d0af7a54a..5ea5dd9cca 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -41,6 +41,13 @@ struct VFIOAPDevice

Re: [PATCH v2 04/15] vfio: add vfio_device_get_irq_info() helper

2025-05-01 Thread Anthony Krowiak
On 4/30/25 3:39 PM, John Levon wrote: Add a helper similar to vfio_device_get_region_info() and use it everywhere. Replace a couple of needless allocations with stack variables. As a side-effect, this fixes a minor error reporting issue in the call from vfio_msix_early_setup(). Reviewed-by

Re: [RFC PATCH v3 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-03-15 Thread Anthony Krowiak
On 3/10/25 11:35 AM, Rorie Reyes wrote: Creates an object indicating that an AP configuration change event has been received and stores it in a queue. These objects will later be used to store event information for an AP configuration change when the CHSC instruction is intercepted. Signed-o

Re: [RFC PATCH v4 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-03-12 Thread Anthony Krowiak
-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak --- hw/vfio/ap.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 3614657218..3fa986ca45 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -41,6 +41,13 @@ struct VFIOAPDevice

Re: [RFC PATCH v4 4/5] hw/vfio/ap: Storing event information for an AP configuration change event

2025-03-12 Thread Anthony Krowiak
On 3/11/25 11:16 AM, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak

Re: [RFC PATCH v3 2/5] hw/vfio/ap: notification handler for AP config changed event

2025-03-11 Thread Anthony Krowiak
On 3/10/25 11:35 AM, Rorie Reyes wrote: Register an event notifier handler to process AP configuration change events by queuing the event and generating a CRW to let the guest know its AP configuration has changed Signed-off-by: Rorie Reyes LGTM: Reviewed-by: Anthony Krowiak --- hw

Re: [RFC PATCH v3 4/5] hw/vfio/ap: Storing event information for an AP configuration change event

2025-03-11 Thread Anthony Krowiak
On 3/10/25 11:35 AM, Rorie Reyes wrote: These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c

Re: [RFC PATCH v2 2/5] hw/vfio/ap: notification handler for AP config changed event

2025-03-07 Thread Anthony Krowiak
On 2/4/25 12:07 PM, Rorie Reyes wrote: Register an event notifier handler to process AP configuration change events by queuing the event and generating a CRW to let the guest know its AP configuration has changed Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 29 +++

Re: [RFC PATCH v2 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-03-07 Thread Anthony Krowiak
On 2/4/25 12:07 PM, Rorie Reyes wrote: Creates an object indicating that an AP configuration change event has been received and stores it in a queue. These objects will later be used to store event information for an AP configuration change when the CHSC instruction is intercepted. Signed-of

Re: [PATCH v4] vfio: Add property documentation

2025-02-25 Thread Anthony Krowiak
;); +#ifdef CONFIG_IOMMUFD +object_class_property_set_description(klass, /* 9.0 */ + "iommufd", + "Set host IOMMUFD backend device"); +#endif } static const TypeInfo vfio_ap_info = { For ap.c: Reviewed-by: Anthony Krowiak

Re: [PATCH v1 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-02-03 Thread Anthony Krowiak
-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Tested-by: Anthony Krowiak --- hw/vfio/ap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 533cadb2dd..508c6eed7a 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -41,6 +41,13 @@ struct

Re: [PATCH v1 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-01-27 Thread Anthony Krowiak
-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Tested-by: Anthony Krowiak --- hw/vfio/ap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 533cadb2dd..508c6eed7a 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -41,6 +41,13 @@ struct

Re: [PATCH v1 2/5] hw/vfio/ap: notification handler for AP config changed event

2025-01-15 Thread Anthony Krowiak
On 1/7/25 1:43 PM, Rorie Reyes wrote: Register an event notifier handler to process AP configuration change events by queuing the event and generating a CRW to let the guest know its AP configuration has changed Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Tested-by: Anthony

Re: [PATCH 1/2] vfio/ap: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Anthony Krowiak
On 7/22/24 5:18 AM, Joao Martins wrote: On 22/07/2024 08:07, Zhenzhong Duan wrote: mdevs aren't "physical" devices and when asking for backing IOMMU info, it fails the entire provisioning of the guest. Fix that by setting vbasedev->mdev true so skipping HostIOMMUDevice initialization in the pr

Re: [PATCH 05/16] vfio/helpers: Make vfio_device_get_name() return bool

2024-05-24 Thread Anthony Krowiak
-634,7 +634,7 @@ int vfio_device_get_name(VFIODevice *vbasedev, Error **errp) } } -return 0; +return true; } For the two functions above: Reviewed-by: Anthony Krowiak snip ...

Re: [PATCH 04/16] vfio/helpers: Make vfio_set_irq_signaling() return bool

2024-05-24 Thread Anthony Krowiak
On 5/15/24 4:20 AM, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 4 ++-- hw/vfio/ap.c | 8 +++

Re: [PATCH 3/7] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize()

2024-05-24 Thread Anthony Krowiak
On 5/22/24 1:01 PM, Cédric Le Goater wrote: Use the 'Error **errp' argument of s390_ccw_realize() instead and remove the error_propagate() call. Signed-off-by: Cédric Le Goater Reviewed-by: Anthony Krowiak --- hw/s390x/s390-ccw.c | 13 + 1 file changed, 5

Re: [PATCH 4/7] s390x/css: Make S390CCWDeviceClass::realize return bool

2024-05-24 Thread Anthony Krowiak
Le Goater Reviewed-by: Anthony Krowiak --- include/hw/s390x/s390-ccw.h | 2 +- hw/s390x/s390-ccw.c | 7 --- hw/vfio/ccw.c | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-c

Re: [PATCH 7/7] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors

2024-05-24 Thread Anthony Krowiak
Goater Reviewed-by: Anthony Krowiak --- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index c12531a7886a2fe87598be0861fba5923bd2c206..0c4354e3e70169ec072e16da0919936647d1d351 100644 --- a/hw/vfio

Re: [PATCH 2/7] s390x/css: Make CCWDeviceClass::realize return bool

2024-05-24 Thread Anthony Krowiak
Reviewed-by: Anthony Krowiak --- hw/s390x/ccw-device.h | 2 +- hw/s390x/ccw-device.c | 3 ++- hw/s390x/s390-ccw.c | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h index 6dff95225df11c63f9b66975019026

Re: [PATCH 5/7] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize()

2024-05-24 Thread Anthony Krowiak
Signed-off-by: Cédric Le Goater Reviewed-by: Anthony Krowiak --- hw/vfio/ccw.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 9a8e052711fe2f7c067c52808b2af30d0ebfee0c..a468fa2342b97e0ee36bd5fb8443025cc90a0453 100644 --- a

Re: [PATCH 1/7] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool

2024-05-24 Thread Anthony Krowiak
On 5/22/24 1:01 PM, Cédric Le Goater wrote: Since s390_ccw_get_dev_info() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. While at it, modify the call in s390_ccw_realize(). Signed-off-by: Cédric Le Goater Reviewed-b

Re: [PATCH v2 1/4] vfio/ap: Use g_autofree variable in vfio_ap_register_irq_notifier()

2024-04-26 Thread Anthony Krowiak
On 4/25/24 5:02 AM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) LGTM Reviewed-by: Anthony Krowiak diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 7c4caa5938636937680fec87e999249ac84a4498

Re: [PATCH] vfio/ap: Use g_autofree variable

2024-04-26 Thread Anthony Krowiak
On 4/24/24 8:54 AM, Cédric Le Goater wrote: Also change the return value of vfio_ap_register_irq_notifier() to be a bool since it takes and 'Error **' argument. See the qapi/error.h Rules section. LGTM Signed-off-by: Anthony Krowiak Signed-off-by: Cédric Le Goater --- hw

Re: [PATCH 05/17] hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-04 Thread Anthony Krowiak
On 2/29/24 12:30 PM, Thomas Huth wrote: On 29/02/2024 15.39, Zhao Liu wrote: From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: .

Re: [PATCH 1/1] linux-headers: update to v6.5-rc1

2023-07-11 Thread Anthony Krowiak
For the vfio-ap bus driver IRQ index mapping: Reviewed-by: Tony Krowiak On 7/9/23 5:23 PM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- include/standard-headers/drm/drm_fourcc.h | 43 ++ include/standard-headers/linux/const.h| 2 +- include/standard-head

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

2023-07-03 Thread Anthony Krowiak
On 7/3/23 12:31 PM, Cédric Le Goater wrote: On 6/2/23 16:11, Tony Krowiak wrote: 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/ I am preparing a vf

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

2023-06-02 Thread Anthony Krowiak
On 6/2/23 10:28 AM, Cédric Le Goater wrote: Hello Tony, On 6/2/23 16:11, Tony Krowiak wrote: 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...@

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

2023-05-31 Thread Anthony Krowiak
On 5/31/23 9:07 AM, Cornelia Huck wrote: On Wed, May 31 2023, Anthony Krowiak wrote: On 5/30/23 8:56 PM, Matthew Rosato wrote: On 5/30/23 6:55 PM, Tony Krowiak wrote: Signed-off-by: Tony Krowiak --- linux-headers/linux/vfio.h | 9 + 1 file changed, 9 insertions(+) Worth

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

2023-05-31 Thread Anthony Krowiak
On 5/31/23 9:07 AM, Matthew Rosato wrote: On 5/31/23 8:52 AM, Anthony Krowiak wrote: On 5/30/23 8:56 PM, Matthew Rosato wrote: On 5/30/23 6:55 PM, Tony Krowiak wrote: Signed-off-by: Tony Krowiak ---   linux-headers/linux/vfio.h | 9 +   1 file changed, 9 insertions(+) Worth

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

2023-05-31 Thread Anthony Krowiak
On 5/30/23 8:56 PM, Matthew Rosato wrote: On 5/30/23 6:55 PM, Tony Krowiak wrote: Signed-off-by: Tony Krowiak --- linux-headers/linux/vfio.h | 9 + 1 file changed, 9 insertions(+) Worth nothing here that linux-headers patches should be generated using scripts/update-linux-heade

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

2023-05-31 Thread Anthony Krowiak
The required kernel changes associated with the patch are here: https://lore.kernel.org/linux-s390/20230530223538.279198-1-akrow...@linux.ibm.com/ On 5/30/23 6:55 PM, Tony Krowiak wrote: When a user attempts to remove a vfio-ap mediated device attached to a guest, the operation hangs until the