summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2016-03-15 19:34:41 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:39 -0600
commit1c3655e24c9cc6f8aad2ccd244e3fea701f34b52 (patch)
tree7a96b1881966cc3da94a7f6773166cb897a31664 /docs
parent69f215f3220b4631acf661ec21393b0170b07747 (diff)
downloadhqemu-1c3655e24c9cc6f8aad2ccd244e3fea701f34b52.zip
hqemu-1c3655e24c9cc6f8aad2ccd244e3fea701f34b52.tar.gz
ivshmem: Propagate errors through ivshmem_recv_setup()
This kills off the funny state described in the previous commit. Simplify ivshmem_io_read() accordingly, and update documentation. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1458066895-20632-27-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/specs/ivshmem-spec.txt20
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/specs/ivshmem-spec.txt b/docs/specs/ivshmem-spec.txt
index 0cd63ad..4c33973 100644
--- a/docs/specs/ivshmem-spec.txt
+++ b/docs/specs/ivshmem-spec.txt
@@ -62,11 +62,11 @@ There are two ways to use this device:
likely want to write a kernel driver to handle interrupts. Requires
the device to be configured for interrupts, obviously.
-If the device is configured for interrupts, BAR2 is initially invalid.
-It becomes safely accessible only after the ivshmem server provided
-the shared memory. Guest software should wait for the IVPosition
-register (described below) to become non-negative before accessing
-BAR2.
+Before QEMU 2.6.0, BAR2 can initially be invalid if the device is
+configured for interrupts. It becomes safely accessible only after
+the ivshmem server provided the shared memory. Guest software should
+wait for the IVPosition register (described below) to become
+non-negative before accessing BAR2.
The device is not capable to tell guest software whether it is
configured for interrupts.
@@ -82,7 +82,7 @@ BAR 0 contains the following registers:
4 4 read/write 0 Interrupt Status
bit 0: peer interrupt
bit 1..31: reserved
- 8 4 read-only 0 or -1 IVPosition
+ 8 4 read-only 0 or ID IVPosition
12 4 write-only N/A Doorbell
bit 0..15: vector
bit 16..31: peer ID
@@ -100,12 +100,14 @@ when an interrupt request from a peer is received. Reading the
register clears it.
IVPosition Register: if the device is not configured for interrupts,
-this is zero. Else, it's -1 for a short while after reset, then
-changes to the device's ID (between 0 and 65535).
+this is zero. Else, it is the device's ID (between 0 and 65535).
+
+Before QEMU 2.6.0, the register may read -1 for a short while after
+reset.
There is no good way for software to find out whether the device is
configured for interrupts. A positive IVPosition means interrupts,
-but zero could be either. The initial -1 cannot be reliably observed.
+but zero could be either.
Doorbell Register: writing this register requests to interrupt a peer.
The written value's high 16 bits are the ID of the peer to interrupt,
OpenPOWER on IntegriCloud