[PATCH] iommu/iova: fix 'domain' typos

2020-12-22 Thread Stefano Garzarella
Replace misspelled 'doamin' with 'domain' in several comments.

Signed-off-by: Stefano Garzarella 
---
 drivers/iommu/iova.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index 4bb3293ae4d7..d20b8b333d30 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -358,7 +358,7 @@ static void private_free_iova(struct iova_domain *iovad, 
struct iova *iova)
  * @iovad: - iova domain in question.
  * @pfn: - page frame number
  * This function finds and returns an iova belonging to the
- * given doamin which matches the given pfn.
+ * given domain which matches the given pfn.
  */
 struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn)
 {
@@ -601,7 +601,7 @@ void queue_iova(struct iova_domain *iovad,
 EXPORT_SYMBOL_GPL(queue_iova);
 
 /**
- * put_iova_domain - destroys the iova doamin
+ * put_iova_domain - destroys the iova domain
  * @iovad: - iova domain in question.
  * All the iova's in that domain are destroyed.
  */
@@ -712,9 +712,9 @@ EXPORT_SYMBOL_GPL(reserve_iova);
 
 /**
  * copy_reserved_iova - copies the reserved between domains
- * @from: - source doamin from where to copy
+ * @from: - source domain from where to copy
  * @to: - destination domin where to copy
- * This function copies reserved iova's from one doamin to
+ * This function copies reserved iova's from one domain to
  * other.
  */
 void
-- 
2.26.2

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v11 05/12] vhost-vdpa: Handle the failure of vdpa_reset()

2021-08-24 Thread Stefano Garzarella

On Wed, Aug 18, 2021 at 08:06:35PM +0800, Xie Yongji wrote:

The vdpa_reset() may fail now. This adds check to its return
value and fail the vhost_vdpa_open().

Signed-off-by: Xie Yongji 
---
drivers/vhost/vdpa.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)


Reviewed-by: Stefano Garzarella 

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v11 03/12] vdpa: Fix some coding style issues

2021-08-24 Thread Stefano Garzarella

On Wed, Aug 18, 2021 at 08:06:33PM +0800, Xie Yongji wrote:

Fix some code indent issues and following checkpatch warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
371: FILE: include/linux/vdpa.h:371:
+static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,

Signed-off-by: Xie Yongji 
---
include/linux/vdpa.h | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)


Reviewed-by: Stefano Garzarella 



diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 954b340f6c2f..8a645f8f4476 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -43,17 +43,17 @@ struct vdpa_vq_state_split {
 * @last_used_idx: used index
 */
struct vdpa_vq_state_packed {
-u16last_avail_counter:1;
-u16last_avail_idx:15;
-u16last_used_counter:1;
-u16last_used_idx:15;
+   u16 last_avail_counter:1;
+   u16 last_avail_idx:15;
+   u16 last_used_counter:1;
+   u16 last_used_idx:15;
};

struct vdpa_vq_state {
- union {
-  struct vdpa_vq_state_split split;
-  struct vdpa_vq_state_packed packed;
- };
+   union {
+   struct vdpa_vq_state_split split;
+   struct vdpa_vq_state_packed packed;
+   };
};

struct vdpa_mgmt_dev;
@@ -131,7 +131,7 @@ struct vdpa_iova_range {
 *  @vdev: vdpa device
 *  @idx: virtqueue index
 *  @state: pointer to returned state 
(last_avail_idx)
- * @get_vq_notification:   Get the notification area for a virtqueue
+ * @get_vq_notification:   Get the notification area for a virtqueue
 *  @vdev: vdpa device
 *  @idx: virtqueue index
 *  Returns the notifcation area
@@ -353,25 +353,25 @@ static inline struct device *vdpa_get_dma_dev(struct 
vdpa_device *vdev)

static inline void vdpa_reset(struct vdpa_device *vdev)
{
-const struct vdpa_config_ops *ops = vdev->config;
+   const struct vdpa_config_ops *ops = vdev->config;

vdev->features_valid = false;
-ops->set_status(vdev, 0);
+   ops->set_status(vdev, 0);
}

static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
{
-const struct vdpa_config_ops *ops = vdev->config;
+   const struct vdpa_config_ops *ops = vdev->config;

vdev->features_valid = true;
-return ops->set_features(vdev, features);
+   return ops->set_features(vdev, features);
}

-
-static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
-  void *buf, unsigned int len)
+static inline void vdpa_get_config(struct vdpa_device *vdev,
+  unsigned int offset, void *buf,
+  unsigned int len)
{
-const struct vdpa_config_ops *ops = vdev->config;
+   const struct vdpa_config_ops *ops = vdev->config;

/*
 * Config accesses aren't supposed to trigger before features are set.
--
2.11.0



___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-18 Thread Stefano Garzarella

On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote:

This will enable cleanups down the road.
The idea is to disable cbs, then add "flush_queued_cbs" callback
as a parameter, this way drivers can flush any work
queued after callbacks have been disabled.

Signed-off-by: Michael S. Tsirkin 
---
arch/um/drivers/virt-pci.c | 2 +-
drivers/block/virtio_blk.c | 4 ++--
drivers/bluetooth/virtio_bt.c  | 2 +-
drivers/char/hw_random/virtio-rng.c| 2 +-
drivers/char/virtio_console.c  | 4 ++--
drivers/crypto/virtio/virtio_crypto_core.c | 8 
drivers/firmware/arm_scmi/virtio.c | 2 +-
drivers/gpio/gpio-virtio.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_kms.c   | 2 +-
drivers/i2c/busses/i2c-virtio.c| 2 +-
drivers/iommu/virtio-iommu.c   | 2 +-
drivers/net/caif/caif_virtio.c | 2 +-
drivers/net/virtio_net.c   | 4 ++--
drivers/net/wireless/mac80211_hwsim.c  | 2 +-
drivers/nvdimm/virtio_pmem.c   | 2 +-
drivers/rpmsg/virtio_rpmsg_bus.c   | 2 +-
drivers/scsi/virtio_scsi.c | 2 +-
drivers/virtio/virtio.c| 5 +
drivers/virtio/virtio_balloon.c| 2 +-
drivers/virtio/virtio_input.c  | 2 +-
drivers/virtio/virtio_mem.c| 2 +-
fs/fuse/virtio_fs.c| 4 ++--
include/linux/virtio.h | 1 +
net/9p/trans_virtio.c  | 2 +-
net/vmw_vsock/virtio_transport.c   | 4 ++--


Reviewed-by: Stefano Garzarella 

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu