[PATCH net-next v3 0/7] Suspend IRQs during application busy periods

2024-10-31 Thread Joe Damato
Greetings: Welcome to v3, see changelog below. Note that our performance tests were not re-run for this revision as we only updated a commit message and added a selftest. This series introduces a new mechanism, IRQ suspension, which allows network applications using epoll to mask IRQs during peri

Re: [PATCH v5 08/27] cxl/mem: Read dynamic capacity configuration from the device

2024-10-31 Thread Ira Weiny
Fan Ni wrote: > On Wed, Oct 30, 2024 at 06:34:41PM -0700, Davidlohr Bueso wrote: > > On Tue, 29 Oct 2024, ira.we...@intel.com wrote: > > > > > +/* See CXL 3.1 Table 8-164 get dynamic capacity config Output Payload */ > > > +struct cxl_mbox_get_dc_config_out { > > > + u8 avail_region_count; > > > +

Re: [PATCH v3 1/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-31 Thread David Hildenbrand
On 31.10.24 15:56, Eric Farman wrote: On Fri, 2024-10-25 at 16:14 +0200, David Hildenbrand wrote: Let's make it a generic KVM hypercall, allowing other subfunctions to be more independent of virtio. While at it, document that unsupported/unimplemented subfunctions result in a SPECIFICATION exce

Re: [PATCH v6 00/10] iommufd: Add vIOMMU infrastructure (Part-2: vDEVICE)

2024-10-31 Thread Jason Gunthorpe
On Thu, Oct 31, 2024 at 02:28:12PM +0800, Zhangfei Gao wrote: > > As for the implementation of the series, add driver support in ARM SMMUv3 > > for a real world use case. > > > > This series is on Github: > > https://github.com/nicolinc/iommufd/commits/iommufd_viommu_p2-v6 > > (QEMU branch for tes

Re: [PATCH v6 01/10] iommufd/viommu: Add IOMMUFD_OBJ_VDEVICE and IOMMU_VDEVICE_ALLOC ioctl

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 02:04:46PM -0300, Jason Gunthorpe wrote: > On Thu, Oct 31, 2024 at 09:56:37AM -0700, Nicolin Chen wrote: > > On Thu, Oct 31, 2024 at 10:29:41AM -0300, Jason Gunthorpe wrote: > > > On Wed, Oct 30, 2024 at 02:35:27PM -0700, Nicolin Chen wrote: > > > > +void iommufd_vdevice_des

RE: [resend PATCH 1/2] dim: make dim_calc_stats() inputs const pointers

2024-10-31 Thread Kiyanovski, Arthur
On 10/30/24 17:23, Caleb Sander Mateos wrote: > Make the start and end arguments to dim_calc_stats() const pointers to > clarify that the function does not modify their values. > > Signed-off-by: Caleb Sander Mateos Reviewed-by: Arthur Kiyanovski Thanks, Arthur

Re: [PATCH v3 0/7] virtio-mem: s390 support

2024-10-31 Thread Sumanth Korikkar
On Fri, Oct 25, 2024 at 04:14:45PM +0200, David Hildenbrand wrote: > Let's finally add s390 support for virtio-mem; my last RFC was sent > 4 years ago, and a lot changed in the meantime. > > The latest QEMU series is available at [1], which contains some more > details and a usage example on s390

Re: [PATCH v6 12/13] iommufd/selftest: Add IOMMU_VIOMMU_ALLOC test coverage

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 09:38:17AM -0700, Nicolin Chen wrote: > On Thu, Oct 31, 2024 at 10:16:37AM -0300, Jason Gunthorpe wrote: > > On Wed, Oct 30, 2024 at 02:34:38PM -0700, Nicolin Chen wrote: > > > +FIXTURE_SETUP(iommufd_viommu) ... > > > + EXPECT_ERRNO(EBUSY, > > > +

RE: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Kiyanovski, Arthur
> -Original Message- > From: Caleb Sander Mateos > Sent: Wednesday, October 30, 2024 5:23 PM > > net_dim() is currently passed a struct dim_sample argument by value. > struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 passes > it > on the stack. All callers have alrea

Re: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Louis Peens
On Wed, Oct 30, 2024 at 06:23:26PM -0600, Caleb Sander Mateos wrote: > net_dim() is currently passed a struct dim_sample argument by value. > struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 > passes it on the stack. All callers have already initialized dim_sample > on the stac

Re: [PATCH v6 07/13] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 10:14:59AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 30, 2024 at 02:34:33PM -0700, Nicolin Chen wrote: > > +static struct iommufd_hwpt_nested * > > +iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags, > > +const struct iom

Re: [PATCH v2 9/9] kselftest/arm64: Add 2024 dpISA extensions to hwcap test

2024-10-31 Thread Shuah Khan
On 10/30/24 09:34, Mark Brown wrote: We don't actually test SIGILL generation for CMPBR since the need to branch makes it a pain to generate and the SIGILL detection would be unreliable anyway. Since this should be very unusual we provide a stub function rather than supporting a missing function.

Re: (subset) [PATCH v6 0/6] Add PSCI v1.3 SYSTEM_OFF2 support for hibernation

2024-10-31 Thread David Woodhouse
On Thu, 2024-10-31 at 17:56 +, Oliver Upton wrote: > On Sat, 19 Oct 2024 18:15:41 +0100, David Woodhouse wrote: > > The PSCI v1.3 spec (https://developer.arm.com/documentation/den0022) > > adds support for a SYSTEM_OFF2 function enabling a HIBERNATE_OFF state > > which is analogous to ACPI S4.

Re: [PATCH v6 6/6] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate

2024-10-31 Thread David Woodhouse
On Fri, 2024-10-25 at 13:40 -0700, Oliver Upton wrote: > > No. You're leaving the work for the reader to: > >  (1) Figure out what you're talking about >  (2) Go dig up an "earlier version" of the spec >  (3) Realise that it means certain hypervisors only take 0x0 as an > argument No. There

Re: (subset) [PATCH v6 0/6] Add PSCI v1.3 SYSTEM_OFF2 support for hibernation

2024-10-31 Thread Oliver Upton
On Sat, 19 Oct 2024 18:15:41 +0100, David Woodhouse wrote: > The PSCI v1.3 spec (https://developer.arm.com/documentation/den0022) > adds support for a SYSTEM_OFF2 function enabling a HIBERNATE_OFF state > which is analogous to ACPI S4. This will allow hosting environments to > determine that a gues

Re: [PATCH v6 6/6] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate

2024-10-31 Thread Lorenzo Pieralisi
On Sat, Oct 19, 2024 at 06:15:47PM +0100, David Woodhouse wrote: [...] > +#ifdef CONFIG_HIBERNATION > +static int psci_sys_hibernate(struct sys_off_data *data) > +{ > + /* > + * Zero is an acceptable alternative to PSCI_1_3_OFF_TYPE_HIBERNATE_OFF > + * and is supported by hypervisor

Re: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Florian Fainelli
On 10/30/24 17:23, Caleb Sander Mateos wrote: net_dim() is currently passed a struct dim_sample argument by value. struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 passes it on the stack. All callers have already initialized dim_sample on the stack, so passing it by value req

Re: [PATCH v3 0/7] virtio-mem: s390 support

2024-10-31 Thread David Hildenbrand
On 31.10.24 17:47, Sumanth Korikkar wrote: On Thu, Oct 31, 2024 at 05:27:06PM +0100, Sumanth Korikkar wrote: On Fri, Oct 25, 2024 at 04:14:45PM +0200, David Hildenbrand wrote: Let's finally add s390 support for virtio-mem; my last RFC was sent 4 years ago, and a lot changed in the meantime. Th

Re: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Caleb Sander
On Thu, Oct 31, 2024 at 5:49 AM Louis Peens wrote: > > On Wed, Oct 30, 2024 at 06:23:26PM -0600, Caleb Sander Mateos wrote: > > net_dim() is currently passed a struct dim_sample argument by value. > > struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 > > passes it on the stack.

Re: (subset) [PATCH v6 0/6] Add PSCI v1.3 SYSTEM_OFF2 support for hibernation

2024-10-31 Thread David Woodhouse
On Thu, 2024-10-31 at 12:15 +, Catalin Marinas wrote: > On Fri, Oct 25, 2024 at 10:12:41PM +, Oliver Upton wrote: > > On Sat, 19 Oct 2024 18:15:41 +0100, David Woodhouse wrote: > > > The PSCI v1.3 spec (https://developer.arm.com/documentation/den0022) > > > adds support for a SYSTEM_OFF2 fu

Re: [resend PATCH 1/2] dim: make dim_calc_stats() inputs const pointers

2024-10-31 Thread Florian Fainelli
On 10/30/24 17:23, Caleb Sander Mateos wrote: Make the start and end arguments to dim_calc_stats() const pointers to clarify that the function does not modify their values. Signed-off-by: Caleb Sander Mateos Reviewed-by: Florian Fainelli -- Florian

Re: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Nelson, Shannon
On 10/30/2024 5:23 PM, Caleb Sander Mateos wrote: net_dim() is currently passed a struct dim_sample argument by value. struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 passes it on the stack. All callers have already initialized dim_sample on the stack, so passing it by valu

Re: [PATCH v6 01/10] iommufd/viommu: Add IOMMUFD_OBJ_VDEVICE and IOMMU_VDEVICE_ALLOC ioctl

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 10:29:41AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 30, 2024 at 02:35:27PM -0700, Nicolin Chen wrote: > > +void iommufd_vdevice_destroy(struct iommufd_object *obj) > > +{ > > + struct iommufd_vdevice *vdev = > > + container_of(obj, struct iommufd_vdevice, obj)

Re: [PATCH v6 01/10] iommufd/viommu: Add IOMMUFD_OBJ_VDEVICE and IOMMU_VDEVICE_ALLOC ioctl

2024-10-31 Thread Jason Gunthorpe
On Thu, Oct 31, 2024 at 09:56:37AM -0700, Nicolin Chen wrote: > On Thu, Oct 31, 2024 at 10:29:41AM -0300, Jason Gunthorpe wrote: > > On Wed, Oct 30, 2024 at 02:35:27PM -0700, Nicolin Chen wrote: > > > +void iommufd_vdevice_destroy(struct iommufd_object *obj) > > > +{ > > > + struct iommufd_vdevice

Re: [PATCH v3 0/7] virtio-mem: s390 support

2024-10-31 Thread Sumanth Korikkar
On Thu, Oct 31, 2024 at 05:27:06PM +0100, Sumanth Korikkar wrote: > On Fri, Oct 25, 2024 at 04:14:45PM +0200, David Hildenbrand wrote: > > Let's finally add s390 support for virtio-mem; my last RFC was sent > > 4 years ago, and a lot changed in the meantime. > > > > The latest QEMU series is avail

Re: [resend PATCH 2/2] dim: pass dim_sample to net_dim() by reference

2024-10-31 Thread Vladimir Oltean
On Wed, Oct 30, 2024 at 06:23:26PM -0600, Caleb Sander Mateos wrote: > net_dim() is currently passed a struct dim_sample argument by value. > struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 > passes it on the stack. All callers have already initialized dim_sample > on the stac

Re: [resend PATCH 1/2] dim: make dim_calc_stats() inputs const pointers

2024-10-31 Thread Vladimir Oltean
On Wed, Oct 30, 2024 at 06:23:25PM -0600, Caleb Sander Mateos wrote: > Make the start and end arguments to dim_calc_stats() const pointers > to clarify that the function does not modify their values. > > Signed-off-by: Caleb Sander Mateos > --- Reviewed-by: Vladimir Oltean

Re: [PATCH v6 00/10] iommufd: Add vIOMMU infrastructure (Part-2: vDEVICE)

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 08:59:37AM -0300, Jason Gunthorpe wrote: > On Thu, Oct 31, 2024 at 02:28:12PM +0800, Zhangfei Gao wrote: > > > > As for the implementation of the series, add driver support in ARM SMMUv3 > > > for a real world use case. > > > > > > This series is on Github: > > > https://gi

Re: [PATCH v6 00/10] iommufd: Add vIOMMU infrastructure (Part-2: vDEVICE)

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 02:28:12PM +0800, Zhangfei Gao wrote: > On Thu, 31 Oct 2024 at 05:36, Nicolin Chen wrote: > > > > Following the previous vIOMMU series, this adds another vDEVICE structure, > > representing the association from an iommufd_device to an iommufd_viommu. > > This gives the whol

Re: [PATCH v6 12/13] iommufd/selftest: Add IOMMU_VIOMMU_ALLOC test coverage

2024-10-31 Thread Nicolin Chen
On Thu, Oct 31, 2024 at 10:16:37AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 30, 2024 at 02:34:38PM -0700, Nicolin Chen wrote: > > +FIXTURE_SETUP(iommufd_viommu) > > +{ > > + self->fd = open("/dev/iommu", O_RDWR); > > + ASSERT_NE(-1, self->fd); > > + test_ioctl_ioas_alloc(&self->ioas_id); >

Re: [PATCH v5 08/27] cxl/mem: Read dynamic capacity configuration from the device

2024-10-31 Thread Fan Ni
On Wed, Oct 30, 2024 at 06:34:41PM -0700, Davidlohr Bueso wrote: > On Tue, 29 Oct 2024, ira.we...@intel.com wrote: > > > +/* See CXL 3.1 Table 8-164 get dynamic capacity config Output Payload */ > > +struct cxl_mbox_get_dc_config_out { > > + u8 avail_region_count; > > + u8 regions_returned; >

Re: [PATCH v6 09/10] iommufd/selftest: Add vIOMMU coverage for IOMMU_HWPT_INVALIDATE ioctl

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:35:35PM -0700, Nicolin Chen wrote: > Add a viommu_cache test function to cover vIOMMU invalidations using the > updated IOMMU_HWPT_INVALIDATE ioctl, which now allows passing in a vIOMMU > via its hwpt_id field. > > Reviewed-by: Kevin Tian > Signed-off-by: Nicolin Chen

Re: [PATCH v6 08/10] iommufd/selftest: Add IOMMU_TEST_OP_DEV_CHECK_CACHE test command

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:35:34PM -0700, Nicolin Chen wrote: > Similar to IOMMU_TEST_OP_MD_CHECK_IOTLB verifying a mock_domain's iotlb, > IOMMU_TEST_OP_DEV_CHECK_CACHE will be used to verify a mock_dev's cache. > > Reviewed-by: Kevin Tian > Signed-off-by: Nicolin Chen > --- > drivers/iommu/iom

Re: [PATCH v6 05/10] iommu: Add iommu_copy_struct_from_full_user_array helper

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:35:31PM -0700, Nicolin Chen wrote: > From: Jason Gunthorpe > > The iommu_copy_struct_from_user_array helper can be used to copy a single > entry from a user array which might not be efficient if the array is big. > > Add a new iommu_copy_struct_from_full_user_array to

Re: [PATCH v3 2/7] Documentation: s390-diag.rst: document diag500(STORAGE LIMIT) subfunction

2024-10-31 Thread Eric Farman
On Fri, 2024-10-25 at 16:14 +0200, David Hildenbrand wrote: > Let's document our new diag500 subfunction that can be implemented by > userspace. > > Signed-off-by: David Hildenbrand > --- > Documentation/virt/kvm/s390/s390-diag.rst | 17 + > 1 file changed, 17 insertions(+) Revi

Re: [PATCH v3 1/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-31 Thread Eric Farman
On Fri, 2024-10-25 at 16:14 +0200, David Hildenbrand wrote: > Let's make it a generic KVM hypercall, allowing other subfunctions to > be more independent of virtio. > > While at it, document that unsupported/unimplemented subfunctions result > in a SPECIFICATION exception. > > This is a preparati

Re: [PATCH v3 0/7] virtio-mem: s390 support

2024-10-31 Thread Eric Farman
On Wed, 2024-10-30 at 17:49 +0100, Christian Borntraeger wrote: > > Am 30.10.24 um 10:34 schrieb Heiko Carstens: > > On Fri, Oct 25, 2024 at 04:14:45PM +0200, David Hildenbrand wrote: > > > Let's finally add s390 support for virtio-mem; my last RFC was sent > > > 4 years ago, and a lot changed in

Re: [PATCH v5 08/27] cxl/mem: Read dynamic capacity configuration from the device

2024-10-31 Thread Ira Weiny
Davidlohr Bueso wrote: > On Tue, 29 Oct 2024, ira.we...@intel.com wrote: > > >Linux has no use for the trailing fields of the Get Dynamic Capacity > >Configuration Output Payload (Total number of supported extents, number > >of available extents, total number of supported tags, and number of > >av

Re: [PATCH v6 06/10] iommufd/viommu: Add iommufd_viommu_find_dev helper

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:35:32PM -0700, Nicolin Chen wrote: > This avoids a bigger trouble of exposing struct iommufd_device and struct > iommufd_vdevice in the public header. > > Reviewed-by: Kevin Tian > Signed-off-by: Nicolin Chen > --- > include/linux/iommufd.h| 8 > dri

Re: [PATCH v6 01/10] iommufd/viommu: Add IOMMUFD_OBJ_VDEVICE and IOMMU_VDEVICE_ALLOC ioctl

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:35:27PM -0700, Nicolin Chen wrote: > +void iommufd_vdevice_destroy(struct iommufd_object *obj) > +{ > + struct iommufd_vdevice *vdev = > + container_of(obj, struct iommufd_vdevice, obj); > + struct iommufd_viommu *viommu = vdev->viommu; > + > + /*

Re: [PATCH v6 12/13] iommufd/selftest: Add IOMMU_VIOMMU_ALLOC test coverage

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:34:38PM -0700, Nicolin Chen wrote: > +FIXTURE_SETUP(iommufd_viommu) > +{ > + self->fd = open("/dev/iommu", O_RDWR); > + ASSERT_NE(-1, self->fd); > + test_ioctl_ioas_alloc(&self->ioas_id); > + test_ioctl_set_default_memory_limit(); > + > + if (variant->

Re: [PATCH v6 07/13] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:34:33PM -0700, Nicolin Chen wrote: > +static struct iommufd_hwpt_nested * > +iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags, > + const struct iommu_user_data *user_data) > +{ > + struct iommufd_hwpt_nested *hwpt_

Re: [PATCH v6 04/13] iommufd: Verify object in iommufd_object_finalize/abort()

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:34:30PM -0700, Nicolin Chen wrote: > To support driver-allocated vIOMMU objects, it's required for IOMMU driver > to call the provided iommufd_viommu_alloc helper to embed the core struct. > However, there is no guarantee that every driver will call it and allocate > obje

Re: [PATCH v6 02/13] iommufd: Move _iommufd_object_alloc helper to a sharable file

2024-10-31 Thread Jason Gunthorpe
On Wed, Oct 30, 2024 at 02:34:28PM -0700, Nicolin Chen wrote: > The following patch will add a new vIOMMU allocator that will require this > _iommufd_object_alloc to be sharable with IOMMU drivers (and iommufd too). > > Add a new driver.c file that will be built with CONFIG_IOMMUFD_DRIVER_CORE > s

Re: [PATCH v6 6/6] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate

2024-10-31 Thread Catalin Marinas
On Sat, Oct 19, 2024 at 06:15:47PM +0100, David Woodhouse wrote: > From: David Woodhouse > > The PSCI v1.3 specification adds support for a SYSTEM_OFF2 function > which is analogous to ACPI S4 state. This will allow hosting > environments to determine that a guest is hibernated rather than just >

Re: (subset) [PATCH v6 0/6] Add PSCI v1.3 SYSTEM_OFF2 support for hibernation

2024-10-31 Thread Catalin Marinas
On Fri, Oct 25, 2024 at 10:12:41PM +, Oliver Upton wrote: > On Sat, 19 Oct 2024 18:15:41 +0100, David Woodhouse wrote: > > The PSCI v1.3 spec (https://developer.arm.com/documentation/den0022) > > adds support for a SYSTEM_OFF2 function enabling a HIBERNATE_OFF state > > which is analogous to AC