qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 6/9] s390x/mmu: Implement enhanced suppression-on-protection facility 2
Date: Mon, 19 Aug 2019 16:58:42 +0200	[thread overview]
Message-ID: <92832679-d994-9697-4a47-dd8af9cd8b96@redhat.com> (raw)
In-Reply-To: <20190805152947.28536-7-david@redhat.com>

On 8/5/19 5:29 PM, David Hildenbrand wrote:
> We already implement ESOP-1. For ESOP-2, we only have to indicate all
> protection exceptions properly. Due to EDAT-1, we already indicate DAT
> exceptions properly. We don't trigger KCP/ALCP/IEP exceptions yet.
> 
> So all we have to do is set the TEID (TEC) to the right values
> (bit 56, 60, 61) in case of LAP.
> 
> We don't have any side-effects (e.g., no guarded-storage facility),
> therefore, bit 64 of the TEID (TEC) is always 0.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/mmu_helper.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
> index f3e988e4fd..631cc29c28 100644
> --- a/target/s390x/mmu_helper.c
> +++ b/target/s390x/mmu_helper.c
> @@ -333,6 +333,8 @@ int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc,
>          *flags |= PAGE_WRITE_INV;
>          if (is_low_address(vaddr) && rw == MMU_DATA_STORE) {
>              if (exc) {
> +                /* LAP sets bit 56 */
> +                tec |= 0x80;
>                  trigger_access_exception(env, PGM_PROTECTION, ilen, tec);
>              }
>              return -EACCES;
> @@ -520,6 +522,8 @@ int mmu_translate_real(CPUS390XState *env, target_ulong raddr, int rw,
>          /* see comment in mmu_translate() how this works */
>          *flags |= PAGE_WRITE_INV;
>          if (is_low_address(raddr) && rw == MMU_DATA_STORE) {
> +            /* LAP sets bit 56 */
> +            tec |= 0x80;
>              trigger_access_exception(env, PGM_PROTECTION, ILEN_AUTO, tec);
>              return -EACCES;
>          }

I'd suggest to merge this with the previous patch since the other bits
are only valid if bit 56 is enabled.

 Thomas




  reply	other threads:[~2019-08-19 14:59 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   ` [Qemu-devel] [qemu-s390x] " Thomas Huth
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   ` Thomas Huth [this message]
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=92832679-d994-9697-4a47-dd8af9cd8b96@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).