Commit 327e0ab3 authored by Xuan Zhuo's avatar Xuan Zhuo Committed by Michael S. Tsirkin
Browse files

virtio_pci: add build offset check for the new common cfg items



Add checks to the check_offsets(void) for queue_notify_data and
queue_reset.

Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Message-Id: <20231010031120.81272-5-xuanzhuo@linux.alibaba.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 70e16c90
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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));
}

/*