Skip to content
Commit d71de9ec authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

virtio: core support for config generation



virtio 1.0 spec says:

Drivers MUST NOT assume reads from fields greater than 32 bits wide are
atomic, nor are reads from multiple fields: drivers SHOULD read device
configuration space fields like so:
	u32 before, after;
	do {
		before = get_config_generation(device);
		// read config entry/entries.
		after = get_config_generation(device);
	} while (after != before);

Do exactly this, for transports that support it.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 0dce3771
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