virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] virtio_pci: use PAGE_SIZE for pci vring align
       [not found] <20221110061111.383076-1-xianting.tian@linux.alibaba.com>
@ 2022-11-10  6:25 ` Jason Wang
  2022-11-10  6:27 ` Michael S. Tsirkin
  1 sibling, 0 replies; 2+ messages in thread
From: Jason Wang @ 2022-11-10  6:25 UTC (permalink / raw)
  To: Xianting Tian; +Cc: virtualization, linux-kernel, mst

On Thu, Nov 10, 2022 at 2:14 PM Xianting Tian
<xianting.tian@linux.alibaba.com> wrote:
>
> As the comments of VIRTIO_PCI_VRING_ALIGN shows, we should use
> PAGE_SZIE not the hard code 4096.
>
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>  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

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

* Re: [PATCH] virtio_pci: use PAGE_SIZE for pci vring align
       [not found] <20221110061111.383076-1-xianting.tian@linux.alibaba.com>
  2022-11-10  6:25 ` [PATCH] virtio_pci: use PAGE_SIZE for pci vring align Jason Wang
@ 2022-11-10  6:27 ` Michael S. Tsirkin
  1 sibling, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2022-11-10  6:27 UTC (permalink / raw)
  To: Xianting Tian; +Cc: linux-kernel, virtualization

On Thu, Nov 10, 2022 at 02:11:11PM +0800, Xianting Tian wrote:
> As the comments of VIRTIO_PCI_VRING_ALIGN shows, we should use
> PAGE_SZIE not the hard code 4096.
> 
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>


where does it show this?
what is the problem you are trying to solve?
PAGE_SIZE is generally not valid in uapi

> ---
>  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. */
> -#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

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

end of thread, other threads:[~2022-11-10  6:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20221110061111.383076-1-xianting.tian@linux.alibaba.com>
2022-11-10  6:25 ` [PATCH] virtio_pci: use PAGE_SIZE for pci vring align Jason Wang
2022-11-10  6:27 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).