* [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values
[not found] ` <20130226111812.GA11111@redhat.com>
@ 2013-03-07 18:02 ` Michael S. Tsirkin
2013-03-08 7:55 ` Cornelia Huck
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2013-03-07 18:02 UTC (permalink / raw)
To: Cornelia Huck
Cc: Carsten Otte, rusty, KVM, Gleb Natapov, linux-s390,
Marcelo Tosatti, Heiko Carstens, Alexander Graf, qemu-devel,
Christian Borntraeger, Martin Schwidefsky, virtualization
virtio-s390 on kvm can use a cookie value passed to guest
to optimize channel/VQ lookups.
Document this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index 72d956c..91aed06 100644
--- a/virtio-spec.lyx
+++ b/virtio-spec.lyx
@@ -10627,7 +10626,252 @@ Guest->Host Notification
For notifying the host of virtqueue buffers, the guest unfortunately can't
use a channel command (the asynchronous characteristics of channel I/O
interact badly with the host block I/O backend).
- Instead, it uses a diagnose 0x500 call with subcode 3 specifying the queue.
+ Instead, it uses a diagnose 0x500 call with subcode 3 specifying the queue
+\change_inserted 1986246365 1362677938
+, as follows:
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted 1986246365 1362677973
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362677978
+GPR
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678629
+Input Value
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678627
+Output Value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362677991
+1
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678208
+0x3
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678620
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678226
+2
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678498
+Subchannel ID
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678642
+Host Cookie
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678500
+3
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678540
+Virtqueue number
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678620
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678529
+4
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678644
+Host Cookie
+\change_unchanged
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362678620
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\change_deleted 1986246365 1362677938
+.
+\change_inserted 1986246365 1362678646
+
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted 1986246365 1362679010
+Host cookie is an optional per-virtqueue 64 bit value that can be used by
+ the hypervisor to speed up the notification execution.
+ For each notification, the output value is returned in GPR2 and should
+ be passed in GPR4 for the next notification:
+\end_layout
+
+\begin_layout LyX-Code
+
+\change_inserted 1986246365 1362679011
+\begin_inset listings
+inline false
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted 1986246365 1362679033
+
+info->cookie = do_notify(schid, virtqueue_get_queue_index(vq), info->cookie);
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Subsubsection*
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values
2013-03-07 18:02 ` [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values Michael S. Tsirkin
@ 2013-03-08 7:55 ` Cornelia Huck
2013-03-12 3:47 ` Rusty Russell
0 siblings, 1 reply; 3+ messages in thread
From: Cornelia Huck @ 2013-03-08 7:55 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Carsten Otte, rusty, KVM, Gleb Natapov, linux-s390,
Marcelo Tosatti, Heiko Carstens, Alexander Graf, qemu-devel,
Christian Borntraeger, Martin Schwidefsky, virtualization
On Thu, 7 Mar 2013 20:02:21 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> virtio-s390 on kvm can use a cookie value passed to guest
s/virtio-s390/virtio-ccw/ (to avoid confusion with s390-virtio, which
was never specced)
> to optimize channel/VQ lookups.
> Document this.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Otherwise:
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Rusty, could you please apply?
>
> ---
> diff --git a/virtio-spec.lyx b/virtio-spec.lyx
> index 72d956c..91aed06 100644
> --- a/virtio-spec.lyx
> +++ b/virtio-spec.lyx
> @@ -10627,7 +10626,252 @@ Guest->Host Notification
> For notifying the host of virtqueue buffers, the guest unfortunately can't
> use a channel command (the asynchronous characteristics of channel I/O
> interact badly with the host block I/O backend).
> - Instead, it uses a diagnose 0x500 call with subcode 3 specifying the queue.
> + Instead, it uses a diagnose 0x500 call with subcode 3 specifying the queue
> +\change_inserted 1986246365 1362677938
> +, as follows:
> +\end_layout
> +
> +\begin_layout Standard
> +
> +\change_inserted 1986246365 1362677973
> +\begin_inset Tabular
> +<lyxtabular version="3" rows="5" columns="3">
> +<features tabularvalignment="middle">
> +<column alignment="center" valignment="top" width="0">
> +<column alignment="center" valignment="top" width="0">
> +<column alignment="center" valignment="top" width="0">
> +<row>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362677978
> +GPR
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678629
> +Input Value
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678627
> +Output Value
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362677991
> +1
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678208
> +0x3
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678620
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678226
> +2
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678498
> +Subchannel ID
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678642
> +Host Cookie
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678500
> +3
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678540
> +Virtqueue number
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678620
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +<row>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678529
> +4
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678644
> +Host Cookie
> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
> +\begin_inset Text
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362678620
> +
> +\end_layout
> +
> +\end_inset
> +</cell>
> +</row>
> +</lyxtabular>
> +
> +\end_inset
> +
> +
> +\change_deleted 1986246365 1362677938
> +.
> +\change_inserted 1986246365 1362678646
> +
> +\end_layout
> +
> +\begin_layout Standard
> +
> +\change_inserted 1986246365 1362679010
> +Host cookie is an optional per-virtqueue 64 bit value that can be used by
> + the hypervisor to speed up the notification execution.
> + For each notification, the output value is returned in GPR2 and should
> + be passed in GPR4 for the next notification:
> +\end_layout
> +
> +\begin_layout LyX-Code
> +
> +\change_inserted 1986246365 1362679011
> +\begin_inset listings
> +inline false
> +status open
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1362679033
> +
> +info->cookie = do_notify(schid, virtqueue_get_queue_index(vq), info->cookie);
> +\end_layout
> +
> +\end_inset
> +
> +
> \end_layout
>
> \begin_layout Subsubsection*
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values
2013-03-08 7:55 ` Cornelia Huck
@ 2013-03-12 3:47 ` Rusty Russell
0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2013-03-12 3:47 UTC (permalink / raw)
To: Cornelia Huck, Michael S. Tsirkin
Cc: Carsten Otte, KVM, Gleb Natapov, linux-s390, Marcelo Tosatti,
Heiko Carstens, Alexander Graf, qemu-devel, Christian Borntraeger,
Martin Schwidefsky, virtualization
Cornelia Huck <cornelia.huck@de.ibm.com> writes:
> On Thu, 7 Mar 2013 20:02:21 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
>> virtio-s390 on kvm can use a cookie value passed to guest
>
> s/virtio-s390/virtio-ccw/ (to avoid confusion with s390-virtio, which
> was never specced)
>
>> to optimize channel/VQ lookups.
>> Document this.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Otherwise:
> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>
> Rusty, could you please apply?
Modified and committed.
Thanks!
Rusty.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-12 11:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1361806070-62465-1-git-send-email-cornelia.huck@de.ibm.com>
[not found] ` <20130226110421.GB10915@redhat.com>
[not found] ` <20130226111812.GA11111@redhat.com>
2013-03-07 18:02 ` [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values Michael S. Tsirkin
2013-03-08 7:55 ` Cornelia Huck
2013-03-12 3:47 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).