RE: [PATCH V3 6/6] vDPA: fix 'cast to restricted le16' warnings in vdpa.c

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > This commit fixes spars warnings: cast to restricted __le16 in function > vdpa_dev_net_config_fill() and > vdpa_fill_stats_rec() > Missing fixes tag. But I fail to understand the warning. config.status is le16, and API used is to

RE: [PATCH V3 4/6] vDPA: !FEATURES_OK should not block querying device config space

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > Users may want to query the config space of a vDPA device, to choose a > appropriate one for a certain guest. This means the users need to read the > config space before FEATURES_OK, and the existence of config space > contents

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue pair, so > when userspace querying queue pair numbers, it should return mq=1 than > zero. > > Function vdpa_dev_net_config_fill() fills the attributions of the vDPA >

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Fixes: a64917bc2e9b vdpa: (Provide interface to read driver

Re: [PATCH v4 1/5] iommu: Return -EMEDIUMTYPE for incompatible domain and device/group

2022-07-01 Thread Robin Murphy
On 01/07/2022 5:43 pm, Nicolin Chen wrote: On Fri, Jul 01, 2022 at 11:21:48AM +0100, Robin Murphy wrote: diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 2ed3594f384e..072cac5ab5a4 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c +++

Call for papers - ICITS'2023 | Cusco, Peru | Deadline: September 4

2022-07-01 Thread ICITS-2023
* Indexed in Scopus, WoS, DBLP, etc. * Google Scholar H5-Index = 15 ICITS'23 - The 6th International Conference on Information Technology & Systems Cusco, Peru, 8 - 10 February

Re: [PATCH v4 1/5] iommu: Return -EMEDIUMTYPE for incompatible domain and device/group

2022-07-01 Thread Robin Murphy
On 2022-06-30 21:36, Nicolin Chen wrote: Cases like VFIO wish to attach a device to an existing domain that was not allocated specifically from the device. This raises a condition where the IOMMU driver can fail the domain attach because the domain and device are incompatible with each other.

Re: [PATCH v11 28/40] virtio_pci: introduce helper to get/set queue reset

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Introduce new helpers to implement queue reset and get queue reset status. https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 Signed-off-by: Xuan Zhuo Acked-by: Jason Wang ---

Re: [PATCH v11 25/40] virtio: allow to unbreak/break virtqueue individually

2022-07-01 Thread Jason Wang
在 2022/7/1 14:31, Michael S. Tsirkin 写道: On Wed, Jun 29, 2022 at 02:56:41PM +0800, Xuan Zhuo wrote: This patch allows the new introduced __virtqueue_break()/__virtqueue_unbreak() to break/unbreak the virtqueue. Signed-off-by: Xuan Zhuo I wonder how this interacts with the hardening patches.

Re: [PATCH v11 24/40] virtio_pci: struct virtio_pci_common_cfg add queue_notify_data

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Add queue_notify_data in struct virtio_pci_common_cfg, which comes from here https://github.com/oasis-tcs/virtio-spec/issues/89 Since I want to add queue_reset after queue_notify_data, I submitted this patch first. Signed-off-by: Xuan Zhuo Acked-by: Jason

Re: [PATCH v11 23/40] virtio_pci: move struct virtio_pci_common_cfg to virtio_pci_modern.h

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: In order to facilitate the expansion of virtio_pci_common_cfg in the future, move it from uapi to virtio_pci_modern.h. In this way, we can freely expand virtio_pci_common_cfg in the future. Other projects using virtio_pci_common_cfg in uapi need to maintain a

Re: [PATCH v11 22/40] virtio_ring: introduce virtqueue_resize()

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Introduce virtqueue_resize() to implement the resize of vring. Based on these, the driver can dynamically adjust the size of the vring. For example: ethtool -G. virtqueue_resize() implements resize based on the vq reset function. In case of failure to allocate

Re: [PATCH v11 21/40] virtio_ring: packed: introduce virtqueue_resize_packed()

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: virtio ring packed supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error,

Re: [PATCH v11 14/40] virtio_ring: split: introduce virtqueue_resize_split()

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: virtio ring split supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error,

Re: [PATCH v11 13/40] virtio_ring: split: reserve vring_align, may_reduce_num

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: In vring_create_virtqueue_split() save vring_align, may_reduce_num to structure vring_virtqueue_split. Used to create a new vring when implementing resize . Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 9 +

Re: [PATCH v11 11/40] virtio_ring: split: extract the logic of vring init

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Separate the logic of initializing vring, and subsequent patches will call it separately. This function completes the variable initialization of split vring. It together with the logic of atatch constitutes the initialization of vring. Signed-off-by: Xuan Zhuo

Re: [PATCH v11 10/40] virtio_ring: split: extract the logic of attach vring

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Separate the logic of attach vring, subsequent patches will call it separately. Since the "struct vring_virtqueue_split split" is created on the stack and has been initialized to 0. So using split->queue_dma_addr/split->queue_size_in_bytes assignment for

Re: [PATCH v11 09/40] virtio_ring: split: extract the logic of alloc state and extra

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Separate the logic of creating desc_state, desc_extra, and subsequent patches will call it independently. Since only the structure vring is passed into __vring_new_virtqueue(), when creating the function vring_alloc_state_extra_split(), we prefer to use

Re: [PATCH v11 08/40] virtio_ring: split: extract the logic of alloc queue

2022-07-01 Thread Xuan Zhuo
On Fri, 1 Jul 2022 16:26:25 +0800, Jason Wang wrote: > > 在 2022/6/29 14:56, Xuan Zhuo 写道: > > Separate the logic of split to create vring queue. > > > > This feature is required for subsequent virtuqueue reset vring. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/virtio/virtio_ring.c |

Re: [PATCH v11 08/40] virtio_ring: split: extract the logic of alloc queue

2022-07-01 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: Separate the logic of split to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 68 ++-- 1 file changed, 42 insertions(+), 26

Re: [PATCH] virtio: VIRTIO_HARDEN_NOTIFICATION is broken

2022-07-01 Thread Cornelia Huck
On Thu, Jun 30 2022, "Michael S. Tsirkin" wrote: > This option doesn't really work and breaks too many drivers. > Not yet sure what's the right thing to do, for now > let's make sure randconfig isn't broken by this. > > Fixes: c346dae4f3fb ("virtio: disable notification hardening by default") >

Re: [PATCH v11 01/40] virtio: add helper virtqueue_get_vring_max_size()

2022-07-01 Thread Xuan Zhuo
On Thu, 30 Jun 2022 14:35:38 +0800, Jason Wang wrote: > On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote: > > > > Record the maximum queue num supported by the device. > > > > virtio-net can display the maximum (supported by hardware) ring size in > > ethtool -g eth0. > > > > When the subsequent

Re: [PATCH v11 02/40] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-07-01 Thread Xuan Zhuo
On Fri, 1 Jul 2022 02:28:46 -0400, "Michael S. Tsirkin" wrote: > On Wed, Jun 29, 2022 at 02:56:18PM +0800, Xuan Zhuo wrote: > > reset can be divided into the following four steps (example): > > 1. transport: notify the device to reset the queue > > 2. vring: recycle the buffer submitted > >

Re: [PATCH v11 25/40] virtio: allow to unbreak/break virtqueue individually

2022-07-01 Thread Michael S. Tsirkin
On Wed, Jun 29, 2022 at 02:56:41PM +0800, Xuan Zhuo wrote: > This patch allows the new introduced > __virtqueue_break()/__virtqueue_unbreak() to break/unbreak the > virtqueue. > > Signed-off-by: Xuan Zhuo I wonder how this interacts with the hardening patches. Jason? > --- >

Re: [PATCH v11 02/40] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-07-01 Thread Michael S. Tsirkin
On Wed, Jun 29, 2022 at 02:56:18PM +0800, Xuan Zhuo wrote: > reset can be divided into the following four steps (example): > 1. transport: notify the device to reset the queue > 2. vring: recycle the buffer submitted > 3. vring: reset/resize the vring (may re-alloc) > 4. transport:

Re: [PATCH] rpmsg: virtio: Fix broken rpmsg_probe()

2022-07-01 Thread Michael S. Tsirkin
On Fri, Jul 01, 2022 at 09:22:15AM +0800, Jason Wang wrote: > On Fri, Jul 1, 2022 at 3:20 AM Michael S. Tsirkin wrote: > > > > On Thu, Jun 30, 2022 at 11:51:30AM -0600, Mathieu Poirier wrote: > > > + virtualization@lists.linux-foundation.org > > > + jasow...@redhat.com > > > + m...@redhat.com > >

Re: [PATCH v1 1/1] virtio: Restore semantics of vq->broken in virtqueues

2022-07-01 Thread Michael S. Tsirkin
On Fri, Jul 01, 2022 at 09:12:58AM +0800, Jason Wang wrote: > On Thu, Jun 30, 2022 at 11:44 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 30, 2022 at 01:08:53PM +0300, Alexander Atanasov wrote: > > > Hello, > > > > > > On 30/06/2022 12:46, Michael S. Tsirkin wrote: > > > > On Thu, Jun 30, 2022