summaryrefslogtreecommitdiff
path: root/include/linux/virtio_pci_modern.h
diff options
context:
space:
mode:
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>2023-10-19 11:49:02 +0800
committerMichael S. Tsirkin <mst@redhat.com>2023-11-01 09:19:59 -0400
commite0592acd1ef2497b861ef7ed6eda14b092b1e667 (patch)
treeba4a09255d46d09b320943599ac73b56098cfd00 /include/linux/virtio_pci_modern.h
parentfafb51a67fb883eb2dde352539df939a251851be (diff)
virtio_pci: add check for common cfg size
Some buggy devices, the common cfg size may not match the features. This patch checks the common cfg size for the features(VIRTIO_F_NOTIF_CONFIG_DATA, VIRTIO_F_RING_RESET). When the common cfg size does not match the corresponding feature, we fail the probe and print error message. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20231019034902.7346-1-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_pci_modern.h')
-rw-r--r--include/linux/virtio_pci_modern.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/virtio_pci_modern.h b/include/linux/virtio_pci_modern.h
index a38c729d1973..d0f2797420f7 100644
--- a/include/linux/virtio_pci_modern.h
+++ b/include/linux/virtio_pci_modern.h
@@ -45,6 +45,7 @@ struct virtio_pci_modern_device {
size_t notify_len;
size_t device_len;
+ size_t common_len;
int notify_map_cap;