From: Jason Wang <jasowang@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 2/2] virtio_pci: add build offset check for the new common cfg items
Date: Sun, 8 Oct 2023 12:31:51 +0800 [thread overview]
Message-ID: <CACGkMEsbmhD1wXtaP3n2BfQR2ci70N6NUvv2xPd-8Hoonfmjaw@mail.gmail.com> (raw)
In-Reply-To: <20230925035830.117710-3-xuanzhuo@linux.alibaba.com>
On Mon, Sep 25, 2023 at 11:58 AM Xuan Zhuo <xuanzhuo@linux.alibaba.com> wrote:
>
> Add checks to the check_offsets(void) for queue_notify_data and
> queue_reset.
>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
> ---
> drivers/virtio/virtio_pci_modern_dev.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/virtio/virtio_pci_modern_dev.c b/drivers/virtio/virtio_pci_modern_dev.c
> index ef6667de1b38..47cb41160e1a 100644
> --- a/drivers/virtio/virtio_pci_modern_dev.c
> +++ b/drivers/virtio/virtio_pci_modern_dev.c
> @@ -203,6 +203,10 @@ static inline void check_offsets(void)
> offsetof(struct virtio_pci_common_cfg, queue_used_lo));
> BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDHI !=
> offsetof(struct virtio_pci_common_cfg, queue_used_hi));
> + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_NDATA !=
> + offsetof(struct virtio_pci_modern_common_cfg, queue_notify_data));
> + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_RESET !=
> + offsetof(struct virtio_pci_modern_common_cfg, queue_reset));
> }
>
> /*
> --
> 2.32.0.3.g01195cf9f
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2023-10-08 4:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 3:58 [PATCH 0/2] strictly check the acccess to the common cfg Xuan Zhuo
2023-09-25 3:58 ` [PATCH 1/2] virtio_pci: fix the common map size and add check for vq-reset Xuan Zhuo
2023-10-08 4:31 ` Jason Wang
2023-09-25 3:58 ` [PATCH 2/2] virtio_pci: add build offset check for the new common cfg items Xuan Zhuo
2023-10-08 4:31 ` Jason Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACGkMEsbmhD1wXtaP3n2BfQR2ci70N6NUvv2xPd-8Hoonfmjaw@mail.gmail.com \
--to=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).