[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code

From: Halil Pasic
Subject: Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code
Date: Tue, 16 Feb 2021 18:11:46 +0100

On Tue, 16 Feb 2021 17:15:19 +0100
Thomas Huth <thuth@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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]