Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio-mmio: use byte to byte in read/write config when length != 1,2…
…,4,8 The length of some config elements are not equal to 1,2,4,8, so we can't assert in virtio_mmio_config_read/write() direclty when length != 1,2,4,8 For example, in virtio_net_config from virtio spec v1.2 struct virtio_net_config { u8 mac[6]; le16 status; le16 max_virtqueue_pairs; le16 mtu; le32 speed; u8 duplex; u8 rss_max_key_size; le16 rss_max_indirection_table_length; le32 supported_hash_types; }; The mac length is 6 and not equal to 1,2,4,8 Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
- Loading branch information