From: Thomas Huth <thuth@redhat.com>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Janosch Frank <frankja@linux.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, Richard Henderson <rth@twiddle.net>,
Ilya Leoshkevich <iii@linux.ibm.com>
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 [thread overview]
Message-ID: <0f4336fe-c273-f798-6e4a-239ced50f1fb@redhat.com> (raw)
In-Reply-To: <20190805152947.28536-5-david@redhat.com>
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 <david@redhat.com>
> ---
> 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 <thuth@redhat.com>
next prev parent reply other threads:[~2019-08-19 12:03 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 15:29 [Qemu-devel] [PATCH-for-4.2 v1 0/9] s390x: MMU changes and extensions David Hildenbrand
2019-08-05 15:29 ` [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-08 12:57 ` Cornelia Huck
2019-08-08 13:02 ` David Hildenbrand
2019-08-12 7:12 ` Thomas Huth
2019-08-12 7:52 ` David Hildenbrand
2019-08-12 13:40 ` Cornelia Huck
2019-08-12 13:45 ` David Hildenbrand
2019-08-12 13:58 ` Cornelia Huck
2019-08-12 14:14 ` David Hildenbrand
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 2/9] s390x/tcg: Rework MMU selection for instruction fetches David Hildenbrand
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 3/9] s390x/mmu: DAT translation rewrite David Hildenbrand
2019-08-12 7:20 ` Thomas Huth
2019-08-12 7:43 ` David Hildenbrand
2019-08-12 8:04 ` David Hildenbrand
2019-08-19 11:40 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-08-19 11:58 ` David Hildenbrand
2019-08-19 12:00 ` Thomas Huth
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 4/9] s390x/mmu: Add EDAT2 translation support David Hildenbrand
2019-08-19 12:01 ` Thomas Huth [this message]
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 5/9] s390x/mmu: Implement access-exception-fetch/store-indication facility David Hildenbrand
2019-08-19 12:16 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-08-19 12:22 ` Thomas Huth
2019-08-19 12:26 ` David Hildenbrand
2019-08-19 12:30 ` Thomas Huth
2019-08-19 12:35 ` David Hildenbrand
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 6/9] s390x/mmu: Implement enhanced suppression-on-protection facility 2 David Hildenbrand
2019-08-19 14:58 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 7/9] s390x/mmu: Implement Instruction-Execution-Protection Facility David Hildenbrand
2019-08-19 15:03 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 8/9] s390x/cpumodel: Prepare for changes of QEMU model David Hildenbrand
2019-08-13 16:02 ` Cornelia Huck
2019-08-19 15:07 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-08-05 15:29 ` [Qemu-devel] [PATCH-for-4.2 v1 9/9] s390x/cpumodel: Add new TCG features to QEMU cpu model David Hildenbrand
2019-08-13 16:07 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f4336fe-c273-f798-6e4a-239ced50f1fb@redhat.com \
--to=thuth@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).