All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] virtio_ring: fix errors to make virtio tools
@ 2021-07-14  2:28 ` Cai Huoqing
  0 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: virtualization, linux-kernel, Cai Huoqing

the errors occurs when run "make virtio" in linux/tools

Cai Huoqing (2):
  virtio_ring: fix error - unknown type name 'spinlock_t'
  virtio_ring: fix error - 'prev' and 'head_flags' may be used
    uninitialized in this function

 drivers/virtio/virtio_ring.c | 6 +++---
 include/linux/vringh.h       | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 0/2] virtio_ring: fix errors to make virtio tools
@ 2021-07-14  2:28 ` Cai Huoqing
  0 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: linux-kernel, virtualization

the errors occurs when run "make virtio" in linux/tools

Cai Huoqing (2):
  virtio_ring: fix error - unknown type name 'spinlock_t'
  virtio_ring: fix error - 'prev' and 'head_flags' may be used
    uninitialized in this function

 drivers/virtio/virtio_ring.c | 6 +++---
 include/linux/vringh.h       | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

--
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'
  2021-07-14  2:28 ` Cai Huoqing
@ 2021-07-14  2:28   ` Cai Huoqing
  -1 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: virtualization, linux-kernel, Cai Huoqing

when run "make virtio" in linux/tools,
the error: unknown type name 'spinlock_t' occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 include/linux/vringh.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/vringh.h b/include/linux/vringh.h
index 84db7b8f912f..ff21c2643792 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -43,11 +43,13 @@ struct vringh {
        /* The vring (note: it may contain user pointers!) */
        struct vring vring;

+#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
        /* IOTLB for this vring */
        struct vhost_iotlb *iotlb;

        /* spinlock to synchronize IOTLB accesses */
        spinlock_t *iotlb_lock;
+#endif

        /* The function to call to notify the guest about added buffers */
        void (*notify)(struct vringh *);
--
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'
@ 2021-07-14  2:28   ` Cai Huoqing
  0 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: linux-kernel, virtualization

when run "make virtio" in linux/tools,
the error: unknown type name 'spinlock_t' occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 include/linux/vringh.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/vringh.h b/include/linux/vringh.h
index 84db7b8f912f..ff21c2643792 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -43,11 +43,13 @@ struct vringh {
        /* The vring (note: it may contain user pointers!) */
        struct vring vring;

+#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
        /* IOTLB for this vring */
        struct vhost_iotlb *iotlb;

        /* spinlock to synchronize IOTLB accesses */
        spinlock_t *iotlb_lock;
+#endif

        /* The function to call to notify the guest about added buffers */
        void (*notify)(struct vringh *);
--
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] virtio_ring: fix error - 'prev' and 'head_flags' may be used uninitialized in this function
  2021-07-14  2:28 ` Cai Huoqing
@ 2021-07-14  2:28   ` Cai Huoqing
  -1 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: virtualization, linux-kernel, Cai Huoqing

when run "make virtio" in linux/tools,
the error: "'prev' and 'head_flags' may be used
uninitialized in this function" occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/virtio/virtio_ring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 89bfe46a8a7f..290bdf8a3d36 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -486,7 +486,7 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
        struct vring_virtqueue *vq = to_vvq(_vq);
        struct scatterlist *sg;
        struct vring_desc *desc;
-       unsigned int i, n, avail, descs_used, prev, err_idx;
+       unsigned int i, n, avail, descs_used, prev = 0, err_idx;
        int head;
        bool indirect;

@@ -1173,8 +1173,8 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq,
        struct vring_packed_desc *desc;
        struct scatterlist *sg;
        unsigned int i, n, c, descs_used, err_idx;
-       __le16 head_flags, flags;
-       u16 head, id, prev, curr, avail_used_flags;
+       __le16 head_flags = 0, flags;
+       u16 head, id, prev = 0, curr, avail_used_flags;

        START_USE(vq);

--
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] virtio_ring: fix error - 'prev' and 'head_flags' may be used uninitialized in this function
@ 2021-07-14  2:28   ` Cai Huoqing
  0 siblings, 0 replies; 8+ messages in thread
From: Cai Huoqing @ 2021-07-14  2:28 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: linux-kernel, virtualization

when run "make virtio" in linux/tools,
the error: "'prev' and 'head_flags' may be used
uninitialized in this function" occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/virtio/virtio_ring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 89bfe46a8a7f..290bdf8a3d36 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -486,7 +486,7 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
        struct vring_virtqueue *vq = to_vvq(_vq);
        struct scatterlist *sg;
        struct vring_desc *desc;
-       unsigned int i, n, avail, descs_used, prev, err_idx;
+       unsigned int i, n, avail, descs_used, prev = 0, err_idx;
        int head;
        bool indirect;

@@ -1173,8 +1173,8 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq,
        struct vring_packed_desc *desc;
        struct scatterlist *sg;
        unsigned int i, n, c, descs_used, err_idx;
-       __le16 head_flags, flags;
-       u16 head, id, prev, curr, avail_used_flags;
+       __le16 head_flags = 0, flags;
+       u16 head, id, prev = 0, curr, avail_used_flags;

        START_USE(vq);

--
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'
  2021-07-14  2:28   ` Cai Huoqing
@ 2021-07-19  5:14     ` Cai,Huoqing
  -1 siblings, 0 replies; 8+ messages in thread
From: Cai,Huoqing @ 2021-07-19  5:14 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: virtualization, linux-kernel

Is it a error,  try “make virtio” in the path of linux/tools/ with config VHOST_IOTLB=n

-----Original Message-----
From: Cai,Huoqing <caihuoqing@baidu.com> 
Sent: 2021年7月14日 10:29
To: sgarzare@redhat.com; mst@redhat.com; jasowang@redhat.com
Cc: virtualization@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Cai,Huoqing <caihuoqing@baidu.com>
Subject: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'

when run "make virtio" in linux/tools,
the error: unknown type name 'spinlock_t' occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 include/linux/vringh.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 84db7b8f912f..ff21c2643792 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -43,11 +43,13 @@ struct vringh {
        /* The vring (note: it may contain user pointers!) */
        struct vring vring;

+#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
        /* IOTLB for this vring */
        struct vhost_iotlb *iotlb;

        /* spinlock to synchronize IOTLB accesses */
        spinlock_t *iotlb_lock;
+#endif

        /* The function to call to notify the guest about added buffers */
        void (*notify)(struct vringh *);
--
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'
@ 2021-07-19  5:14     ` Cai,Huoqing
  0 siblings, 0 replies; 8+ messages in thread
From: Cai,Huoqing @ 2021-07-19  5:14 UTC (permalink / raw)
  To: sgarzare, mst, jasowang; +Cc: linux-kernel, virtualization

Is it a error,  try “make virtio” in the path of linux/tools/ with config VHOST_IOTLB=n

-----Original Message-----
From: Cai,Huoqing <caihuoqing@baidu.com> 
Sent: 2021年7月14日 10:29
To: sgarzare@redhat.com; mst@redhat.com; jasowang@redhat.com
Cc: virtualization@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Cai,Huoqing <caihuoqing@baidu.com>
Subject: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'

when run "make virtio" in linux/tools,
the error: unknown type name 'spinlock_t' occurs

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 include/linux/vringh.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 84db7b8f912f..ff21c2643792 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -43,11 +43,13 @@ struct vringh {
        /* The vring (note: it may contain user pointers!) */
        struct vring vring;

+#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
        /* IOTLB for this vring */
        struct vhost_iotlb *iotlb;

        /* spinlock to synchronize IOTLB accesses */
        spinlock_t *iotlb_lock;
+#endif

        /* The function to call to notify the guest about added buffers */
        void (*notify)(struct vringh *);
--
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-19  5:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14  2:28 [PATCH 0/2] virtio_ring: fix errors to make virtio tools Cai Huoqing
2021-07-14  2:28 ` Cai Huoqing
2021-07-14  2:28 ` [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t' Cai Huoqing
2021-07-14  2:28   ` Cai Huoqing
2021-07-19  5:14   ` Cai,Huoqing
2021-07-19  5:14     ` Cai,Huoqing
2021-07-14  2:28 ` [PATCH 2/2] virtio_ring: fix error - 'prev' and 'head_flags' may be used uninitialized in this function Cai Huoqing
2021-07-14  2:28   ` Cai Huoqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.