[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 15/28] s390x/tcg: Fault-safe mem
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v2 15/28] s390x/tcg: Fault-safe memset |
Date: |
Wed, 11 Sep 2019 11:29:59 -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:
> + if (likely(desta.haddr1)) {
> + memset(desta.haddr1, byte, desta.size1);
> + } else {
> + for (i = 0; i < desta.size1; i++) {
> + helper_ret_stb_mmu(env, desta.vaddr1 + i, byte, oi, ra);
> + }
The only thing perhaps that we could do better here is to re-check
tlb_vaddr_to_host after a singe access. This would handle NOTDIRTY with a
single iotlb access and then fall back to memset, without re-checking host
address for real mmio after every store.
> + if (likely(desta.haddr2)) {
> + memset(desta.haddr2, byte, desta.size2);
Indentation.
> + } else {
> + for (i = 0; i < desta.size2; i++) {
> + helper_ret_stb_mmu(env, desta.vaddr2 + i, byte, oi, ra);
> }
Likewise wrt NOTDIRTY, which suggests a subroutine to handle a single page?
That said, what's here looks correct so
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 11/28] s390x/tcg: MVCS/MVCP: Properly wrap the length, (continued)
- [qemu-s390x] [PATCH v2 12/28] s390x/tcg: MVST: Check for specification exceptions, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 13/28] s390x/tcg: MVST: Fix storing back the addresses to registers, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 14/28] s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 15/28] s390x/tcg: Fault-safe memset, David Hildenbrand, 2019/09/06
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 15/28] s390x/tcg: Fault-safe memset,
Richard Henderson <=
- [qemu-s390x] [PATCH v2 17/28] s390x/tcg: MVCS/MVCP: Use access_memmove_idx(), David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 16/28] s390x/tcg: Fault-safe memmove, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 18/28] s390x/tcg: MVC: Fault-safe handling on destructive overlaps, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 19/28] s390x/tcg: MVCLU: Fault-safe handling, David Hildenbrand, 2019/09/06