[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 13/14] virtio-ccw: fix virtio_set_ind_atomic
From: |
Cornelia Huck |
Subject: |
Re: [PULL 13/14] virtio-ccw: fix virtio_set_ind_atomic |
Date: |
Mon, 6 Jul 2020 13:38:23 +0200 |
On Mon, 6 Jul 2020 13:23:11 +0200
Halil Pasic <pasic@linux.ibm.com> wrote:
> On Fri, 3 Jul 2020 12:06:49 +0200
> Cornelia Huck <cohuck@redhat.com> wrote:
>
> > From: Halil Pasic <pasic@linux.ibm.com>
> >
> > The atomic_cmpxchg() loop is broken because we occasionally end up with
> > old and _old having different values (a legit compiler can generate code
> > that accessed *ind_addr again to pick up a value for _old instead of
> > using the value of old that was already fetched according to the
> > rules of the abstract machine). This means the underlying CS instruction
> > may use a different old (_old) than the one we intended to use if
> > atomic_cmpxchg() performed the xchg part.
> >
> > Let us use volatile to force the rules of the abstract machine for
> > accesses to *ind_addr. Let us also rewrite the loop so, we that the
>
> Michael T. Has pointed out that this sentence is ungrammatical.
>
> s/we// would IMHO solve the problem. Can we fix this before it gets
> merged?
Unfortunately, it's already too late :(
>
> > new old is used to compute the new desired value if the xchg part
> > is not performed.
- [PULL 05/14] pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64, (continued)
- [PULL 05/14] pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64, Cornelia Huck, 2020/07/03
- [PULL 06/14] pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR, Cornelia Huck, 2020/07/03
- [PULL 07/14] pc-bios: s390x: Move panic() into header and add infinite loop, Cornelia Huck, 2020/07/03
- [PULL 08/14] pc-bios: s390x: Use ebcdic2ascii table, Cornelia Huck, 2020/07/03
- [PULL 09/14] pc-bios: s390x: Make u32 ptr check explicit, Cornelia Huck, 2020/07/03
- [PULL 10/14] pc-bios/s390-ccw: Generate and include dependency files in the Makefile, Cornelia Huck, 2020/07/03
- [PULL 11/14] pc-bios/s390: Update s390-ccw bios binaries with the latest changes, Cornelia Huck, 2020/07/03
- [PULL 12/14] target/s390x: Fix SQXBR, Cornelia Huck, 2020/07/03
- [PULL 13/14] virtio-ccw: fix virtio_set_ind_atomic, Cornelia Huck, 2020/07/03
- [PULL 14/14] s390x/pci: fix set_ind_atomic, Cornelia Huck, 2020/07/03
- Re: [PULL 00/14] s390x update, no-reply, 2020/07/03
- Re: [PULL 00/14] s390x update, Peter Maydell, 2020/07/04