Thread (1 message) 1 message, 1 author, 2022-11-10

Re: [PATCH] virtio_pci: use PAGE_SIZE for pci vring align

From: Jason Wang <hidden>
Date: 2022-11-10 06:26:57
Also in: lkml

On Thu, Nov 10, 2022 at 2:14 PM Xianting Tian
[off-list ref] wrote:
quoted hunk
As the comments of VIRTIO_PCI_VRING_ALIGN shows, we should use
PAGE_SZIE not the hard code 4096.

Signed-off-by: Xianting Tian <redacted>
---
 include/uapi/linux/virtio_pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index f703afc7ad31..ed5f678c682b 100644
--- a/include/uapi/linux/virtio_pci.h
+++ b/include/uapi/linux/virtio_pci.h
@@ -90,7 +90,7 @@

 /* The alignment to use between consumer and producer parts of vring.
  * x86 pagesize again. */
See the comment above, PAGE_SIZE varies among archs.

Thanks
-#define VIRTIO_PCI_VRING_ALIGN         4096
+#define VIRTIO_PCI_VRING_ALIGN         PAGE_SIZE

 #endif /* VIRTIO_PCI_NO_LEGACY */

--
2.17.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help