On Tue, 16 Feb 2021 17:15:19 +0100 Thomas Huth <th...@redhat.com> wrote:
> >> (Note: The virtio spec also talks about using a memory barrier > >> *after* incrementing the idx field, but if I understood correctly > >> this is only required when using notification suppression - which > >> we don't use in the s390-ccw bios here) > > > > I suggest to the barrier after incrementing the idx field for two > > reasons. First: If the device were to see the notification, but > > not see the incremented idx field, it would effectively loose > > initiative. That is pretty straight forward, because the > > notification just says 'check out that queue', and if we don't > > see the incremented index, miss the buffer that was made available > > by incrementing idx. > > I was just about to reply that this is certainly not necessary, since > the DIAGNOSE instruction that we use for the notification hypercall > should be serializing anyway ... but after looking at the PoP, it > actually is not marked as a serializing instruction! (while e.g. > SVC - supervisor call - is explicitly marked as serializing) I was talking about whether a suitable barrier is needed, from virtio perspective. How the suitable barrier is put in place is a different issue. Regards, Halil