[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: |
Peter Maydell |
Subject: |
Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code |
Date: |
Tue, 16 Feb 2021 16:44:48 +0000 |
On Tue, 16 Feb 2021 at 16:15, Thomas Huth <thuth@redhat.com> wrote:
> 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)
>
> So maybe that's worth a try: Peter, could you please apply this patch
> on top an see whether it makes a difference?
>
> diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
> --- a/pc-bios/s390-ccw/virtio.c
> +++ b/pc-bios/s390-ccw/virtio.c
> @@ -54,6 +54,7 @@ static long kvm_hypercall(unsigned long nr, unsigned long
> param1,
> register ulong r_param3 asm("4") = param3;
> register long retval asm("2");
>
> + virtio_mb();
> asm volatile ("diag 2,4,0x500"
> : "=d" (retval)
> : "d" (r_nr), "0" (r_param1), "r"(r_param2), "d"(r_param3)
Doesn't really help (maybe brings the occurrence rate down a bit
more, towards about 1 in 9?)
-- PMM
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, (continued)
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Cornelia Huck, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Thomas Huth, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Cornelia Huck, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Peter Maydell, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Thomas Huth, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Peter Maydell, 2021/02/16
- Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Cornelia Huck, 2021/02/16
Re: [PATCH] pc-bios/s390-ccw: Use memory barriers in virtio code, Halil Pasic, 2021/02/16