Commit 79268954 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio_mem: correct tags for config space fields

Since this is a modern-only device,
tag config space fields as having little endian-ness.

TODO: check other uses of __virtioXX types in this header,
should probably be __leXX.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 0ebcffcc
...@@ -185,27 +185,27 @@ struct virtio_mem_resp { ...@@ -185,27 +185,27 @@ struct virtio_mem_resp {
struct virtio_mem_config { struct virtio_mem_config {
/* Block size and alignment. Cannot change. */ /* Block size and alignment. Cannot change. */
__u64 block_size; __le64 block_size;
/* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */ /* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */
__u16 node_id; __le16 node_id;
__u8 padding[6]; __u8 padding[6];
/* Start address of the memory region. Cannot change. */ /* Start address of the memory region. Cannot change. */
__u64 addr; __le64 addr;
/* Region size (maximum). Cannot change. */ /* Region size (maximum). Cannot change. */
__u64 region_size; __le64 region_size;
/* /*
* Currently usable region size. Can grow up to region_size. Can * Currently usable region size. Can grow up to region_size. Can
* shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL (in which case no config * shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL (in which case no config
* update will be sent). * update will be sent).
*/ */
__u64 usable_region_size; __le64 usable_region_size;
/* /*
* Currently used size. Changes due to plug/unplug requests, but no * Currently used size. Changes due to plug/unplug requests, but no
* config updates will be sent. * config updates will be sent.
*/ */
__u64 plugged_size; __le64 plugged_size;
/* Requested size. New plug requests cannot exceed it. Can change. */ /* Requested size. New plug requests cannot exceed it. Can change. */
__u64 requested_size; __le64 requested_size;
}; };
#endif /* _LINUX_VIRTIO_MEM_H */ #endif /* _LINUX_VIRTIO_MEM_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment