diff mbox

[v2] virtio-spec: Fix wrong bit number of device status

Message ID 20110607130942.GA16234@t400 (mailing list archive)
State New, archived
Headers show

Commit Message

Amos Kong June 7, 2011, 1:09 p.m. UTC
qemu-kvm/hw/virtio_config.h:
 #define VIRTIO_CONFIG_S_ACKNOWLEDGE     1
 #define VIRTIO_CONFIG_S_DRIVER          2
 #define VIRTIO_CONFIG_S_DRIVER_OK       4
 #define VIRTIO_CONFIG_S_FAILED          0x80

virtio-spec:
ACKNOWLEDGE(1) :
DRIVER(2)      :
DRIVER_OK(3)   :
FAILED(128)    :

The spec refers to bit numbers and the headers use absolute numbers,
they are not consistent.

it shoule be 'FAILED(8)'.
2^(8-1) = 128

Changes from V1:
- Fix wrong patch body

Signed-off-by: Amos Kong <akong@redhat.com>
---
 virtio-spec.lyx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Rusty Russell June 7, 2011, 11:35 p.m. UTC | #1
On Tue, 7 Jun 2011 21:09:42 +0800, Amos Kong <akong@redhat.com> wrote:
> 
> qemu-kvm/hw/virtio_config.h:
>  #define VIRTIO_CONFIG_S_ACKNOWLEDGE     1
>  #define VIRTIO_CONFIG_S_DRIVER          2
>  #define VIRTIO_CONFIG_S_DRIVER_OK       4
>  #define VIRTIO_CONFIG_S_FAILED          0x80
> 
> virtio-spec:
> ACKNOWLEDGE(1) :
> DRIVER(2)      :
> DRIVER_OK(3)   :
> FAILED(128)    :
> 
> The spec refers to bit numbers and the headers use absolute numbers,
> they are not consistent.
> 
> it shoule be 'FAILED(8)'.
> 2^(8-1) = 128
> 
> Changes from V1:
> - Fix wrong patch body
> 
> Signed-off-by: Amos Kong <akong@redhat.com>

Thanks, applied!
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index 448af76..1fc3e59 100644
--- a/virtio-spec.lyx
+++ b/virtio-spec.lyx
@@ -1552,7 +1552,7 @@  FAILED
 \begin_inset space ~
 \end_inset
 
-(128) Indicates that something went wrong in the guest, and it has given
+(8) Indicates that something went wrong in the guest, and it has given
  up on the device.
  This could be an internal error, or the driver didn't like the device for
  some reason, or even a fatal error during device operation.