mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
virtio_pci: move structure to a header
These are guest/host interfaces, so they belong in the header where e.g. qemu will know to find them. Note: we added a new structure as opposed to extending existing one because someone might be relying on the size of the existing structure staying unchanged. Add a warning to avoid using sizeof. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
This commit is contained in:
@@ -166,6 +166,17 @@ struct virtio_pci_common_cfg {
|
||||
__le32 queue_used_hi; /* read-write */
|
||||
};
|
||||
|
||||
/*
|
||||
* Warning: do not use sizeof on this: use offsetofend for
|
||||
* specific fields you need.
|
||||
*/
|
||||
struct virtio_pci_modern_common_cfg {
|
||||
struct virtio_pci_common_cfg cfg;
|
||||
|
||||
__le16 queue_notify_data; /* read-write */
|
||||
__le16 queue_reset; /* read-write */
|
||||
};
|
||||
|
||||
/* Fields in VIRTIO_PCI_CAP_PCI_CFG: */
|
||||
struct virtio_pci_cfg_cap {
|
||||
struct virtio_pci_cap cap;
|
||||
|
||||
Reference in New Issue
Block a user