summaryrefslogtreecommitdiff
path: root/virtio-v1.0-wd01-part1-specification.txt
diff options
context:
space:
mode:
authorrusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2013-10-31 22:48:28 +0000
committerrusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2013-10-31 22:48:28 +0000
commita009ddd167d1e0d08979df8f7d4ed0736a4290f7 (patch)
treeefc8d3b4169a60e99057c2819d0df6f8bb1aff79 /virtio-v1.0-wd01-part1-specification.txt
parent306baacdd420a62903dd496624af10c6c96669bb (diff)
configuration space endian-ness
make it all LE and require natural width accesses resolves VIRTIO-9 Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@au1.ibm.com> (rebase) git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@75 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
Diffstat (limited to 'virtio-v1.0-wd01-part1-specification.txt')
-rw-r--r--virtio-v1.0-wd01-part1-specification.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt
index 908d631..6b5d46e 100644
--- a/virtio-v1.0-wd01-part1-specification.txt
+++ b/virtio-v1.0-wd01-part1-specification.txt
@@ -92,6 +92,8 @@ o Feature bits
o Configuration space
o One or more virtqueues
+Unless explicitly specified otherwise, all multi-byte fields are little-endian.
+
2.1.1. Device Status Field
-------------------------
@@ -226,7 +228,13 @@ Thus drivers should read configuration space fields like so:
after = get_config_generation(device);
} while (after != before);
-Note that this space is generally the guest's native endian,
+Note that configuration space generally uses the little-endian format
+for multi-byte fields.
+
+100.100.4.1. Legacy Interface: A Note on Configuration Space endian-ness
+--------------------------------------
+
+Note that for legacy interfaces, configuration space is generally the guest's native endian,
rather than PCI's little-endian.
2.1.3.1. Legacy Interface: Configuration Space
@@ -954,8 +962,8 @@ device-specific region can be accessed using any width accesses, and
should obtain the same results.
Note that this is possible because while the virtio header is PCI
-(i.e. little) endian, the device-specific region is encoded in
-the native endian of the guest (where such distinction is
+(i.e. little) endian, when using the legacy interface the device-specific
+region is encoded in the native endian of the guest (where such distinction is
applicable).
When used through the legacy interface, the virtio header looks as follows: