qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>,
	Alexander Graf <agraf@suse.de>, Cornelia Huck <cohuck@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] [PATCH v1 for-2.12 1/2] s390x/mmu: don't overwrite pending exception in mmu translate
Date: Mon,  9 Apr 2018 13:30:18 +0200	[thread overview]
Message-ID: <20180409113019.14568-2-david@redhat.com> (raw)
In-Reply-To: <20180409113019.14568-1-david@redhat.com>

If we already triggered another exception, don't overwrite it with a
protection exception.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 target/s390x/mmu_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index 1deeb6e6e4..a25deef5dd 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -325,7 +325,7 @@ static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr,
 
     r = mmu_translate_region(env, vaddr, asc, asce, level, raddr, flags, rw,
                              exc);
-    if (rw == MMU_DATA_STORE && !(*flags & PAGE_WRITE)) {
+    if (!r && rw == MMU_DATA_STORE && !(*flags & PAGE_WRITE)) {
         trigger_prot_fault(env, vaddr, asc, rw, exc);
         return -1;
     }
-- 
2.14.3

  reply	other threads:[~2018-04-09 11:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 11:30 [Qemu-devel] [PATCH v1 for-2.12 0/2] s390x/kvm: last minute fixes David Hildenbrand
2018-04-09 11:30 ` David Hildenbrand [this message]
2018-04-09 11:44   ` [Qemu-devel] [PATCH v1 for-2.12 1/2] s390x/mmu: don't overwrite pending exception in mmu translate Thomas Huth
2018-04-09 11:50   ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2018-04-09 11:55     ` Cornelia Huck
2018-04-09 11:30 ` [Qemu-devel] [PATCH v1 for-2.12 2/2] s390x: load_psw() should only exchange the PSW for KVM David Hildenbrand
2018-04-09 11:35   ` Christian Borntraeger
2018-04-09 11:36     ` David Hildenbrand
2018-04-09 11:40       ` Christian Borntraeger
2018-04-09 11:44         ` David Hildenbrand
2018-04-09 11:46           ` Christian Borntraeger
2018-04-09 11:49           ` Cornelia Huck
2018-04-09 11:56   ` Thomas Huth
2018-04-09 12:35 ` [Qemu-devel] [PATCH v1 for-2.12 0/2] s390x/kvm: last minute fixes 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=20180409113019.14568-2-david@redhat.com \
    --to=david@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /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).