[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [qemu-s390x] [PATCH-for-4.2 v1 4/9] s390x/mmu: Add EDAT
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [qemu-s390x] [PATCH-for-4.2 v1 4/9] s390x/mmu: Add EDAT2 translation support |
Date: |
Mon, 19 Aug 2019 14:01:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/5/19 5:29 PM, David Hildenbrand wrote:
> This only adds basic support to the DAT translation, but no EDAT2 support
> for TCG. E.g., the gdbstub under kvm uses this function, too, to
> translate virtual addresses.
>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
> target/s390x/mmu_helper.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
> index de7798284d..5c9c7d385d 100644
> --- a/target/s390x/mmu_helper.c
> +++ b/target/s390x/mmu_helper.c
> @@ -139,6 +139,7 @@ static int mmu_translate_asce(CPUS390XState *env,
> target_ulong vaddr,
> {
> const bool edat1 = (env->cregs[0] & CR0_EDAT) &&
> s390_has_feat(S390_FEAT_EDAT);
> + const bool edat2 = edat1 && s390_has_feat(S390_FEAT_EDAT_2);
> const int asce_tl = asce & ASCE_TABLE_LENGTH;
> const int asce_p = asce & ASCE_PRIVATE_SPACE;
> hwaddr gaddr = asce & ASCE_ORIGIN;
> @@ -234,9 +235,16 @@ static int mmu_translate_asce(CPUS390XState *env,
> target_ulong vaddr,
> if ((entry & REGION_ENTRY_TT) != REGION_ENTRY_TT_REGION3) {
> return PGM_TRANS_SPEC;
> }
> + if (edat2 && (entry & REGION3_ENTRY_CR) && asce_p) {
> + return PGM_TRANS_SPEC;
> + }
> if (edat1 && (entry & REGION_ENTRY_P)) {
> *flags &= ~PAGE_WRITE;
> }
> + if (edat2 && (entry & REGION3_ENTRY_FC)) {
> + *raddr = entry & REGION3_ENTRY_RFAA;
> + return 0;
> + }
> if (VADDR_SEGMENT_TL(vaddr) < (entry & REGION_ENTRY_TF) >> 6 ||
> VADDR_SEGMENT_TL(vaddr) > (entry & REGION_ENTRY_TL)) {
> return PGM_SEGMENT_TRANS;
Reviewed-by: Thomas Huth <address@hidden>
- [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), (continued)
- [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), David Hildenbrand, 2019/08/05
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), Cornelia Huck, 2019/08/08
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), Thomas Huth, 2019/08/12
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), David Hildenbrand, 2019/08/12
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), Cornelia Huck, 2019/08/12
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), David Hildenbrand, 2019/08/12
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), Cornelia Huck, 2019/08/12
- Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug(), David Hildenbrand, 2019/08/12
[Qemu-devel] [PATCH-for-4.2 v1 4/9] s390x/mmu: Add EDAT2 translation support, David Hildenbrand, 2019/08/05
- Re: [Qemu-devel] [qemu-s390x] [PATCH-for-4.2 v1 4/9] s390x/mmu: Add EDAT2 translation support,
Thomas Huth <=
[Qemu-devel] [PATCH-for-4.2 v1 2/9] s390x/tcg: Rework MMU selection for instruction fetches, David Hildenbrand, 2019/08/05
[Qemu-devel] [PATCH-for-4.2 v1 5/9] s390x/mmu: Implement access-exception-fetch/store-indication facility, David Hildenbrand, 2019/08/05
[Qemu-devel] [PATCH-for-4.2 v1 3/9] s390x/mmu: DAT translation rewrite, David Hildenbrand, 2019/08/05