[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [PATCH 1/6] configuration space endian-ness
From: "Michael S. Tsirkin" <mst@redhat.com> 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) --- virtio-v1.0-wd01-part1-specification.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt index d1b15c6..8340c42 100644 --- a/virtio-v1.0-wd01-part1-specification.txt +++ b/virtio-v1.0-wd01-part1-specification.txt @@ -88,6 +88,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 ------------------------- @@ -203,7 +205,13 @@ Interface' in the section title. Configuration space is generally used for rarely-changing or initialization-time parameters. -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.4. Virtqueues @@ -888,8 +896,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: -- 1.8.1.2
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]