[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 26/28] s390x/tcg: MVST: Fault-sa
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 26/28] s390x/tcg: MVST: Fault-safe handling |
Date: |
Wed, 11 Sep 2019 17:52:50 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/6/19 3:57 AM, David Hildenbrand wrote:
> + /*
> + * Our access should not exceed single pages, as we must not report
> access
> + * exceptions exceeding the actually copied range (which we don't know at
> + * this point). We might over-indicate watchpoints within the pages
> + * (if we ever care, we have to limit processing to a single byte).
> + */
> + srca = access_prepare(env, s, len, MMU_DATA_LOAD, ra);
> + desta = access_prepare(env, d, len, MMU_DATA_STORE, ra);
> + for (i = 0; i < len; i++) {
> + const uint8_t v = access_get_byte(env, &srca, i, ra);
> +
> + access_set_byte(env, &desta, i, v, ra);
> if (v == c) {
> - set_address_zero(env, r1, d + len);
> + set_address_zero(env, r1, d + i);
> return 1;
> }
Worth using memchr + memmove w/ nondestructive overlap?
That said,
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 23/28] s390x/tcg: MVCIN: Fault-safe handling, (continued)
- [qemu-s390x] [PATCH v2 25/28] s390x/tcg: MVZ: Fault-safe handling, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 22/28] s390x/tcg: NC: Fault-safe handling, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 24/28] s390x/tcg: MVN: Fault-safe handling, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 27/28] s390x/tcg: MVO: Fault-safe handling, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 26/28] s390x/tcg: MVST: Fault-safe handling, David Hildenbrand, 2019/09/06
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 26/28] s390x/tcg: MVST: Fault-safe handling,
Richard Henderson <=
- [qemu-s390x] [PATCH v2 28/28] tests/tcg: target/s390x: Test MVO, David Hildenbrand, 2019/09/06
- Re: [qemu-s390x] [PATCH v2 00/28] s390x/tcg: mem_helper: Fault-safe handling, David Hildenbrand, 2019/09/11