qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing
@ 2017-05-29 12:12 David Hildenbrand
  2017-05-29 14:33 ` Thomas Huth
  2017-06-04 17:24 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: David Hildenbrand @ 2017-05-29 12:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: rth, agraf, Aurelien Jarno, thuth, david

We have to make the address in the old PSW point at the next
instruction, as addressing exceptions are suppressing and not
nullifying.

I assume that there are a lot of other broken cases (as most instructions
we care about are suppressing) - all trigger_pgm_exception() specifying
and explicit number or ILEN_LATER look suspicious, however this is another
story that might require bigger changes (and I have to understand when
the address might already have been incremented first).

This is needed to make an upcoming kvm-unit-test work.

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

diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index 9978490..c09e391 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -204,7 +204,7 @@ int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr orig_vaddr,
     if (raddr > ram_size) {
         DPRINTF("%s: raddr %" PRIx64 " > ram_size %" PRIx64 "\n", __func__,
                 (uint64_t)raddr, (uint64_t)ram_size);
-        trigger_pgm_exception(env, PGM_ADDRESSING, ILEN_LATER);
+        trigger_pgm_exception(env, PGM_ADDRESSING, ILEN_LATER_INC);
         return 1;
     }
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing
  2017-05-29 12:12 [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing David Hildenbrand
@ 2017-05-29 14:33 ` Thomas Huth
  2017-06-04 17:24 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2017-05-29 14:33 UTC (permalink / raw)
  To: David Hildenbrand, qemu-devel; +Cc: agraf, Aurelien Jarno, rth

On 29.05.2017 14:12, David Hildenbrand wrote:
> We have to make the address in the old PSW point at the next
> instruction, as addressing exceptions are suppressing and not
> nullifying.

According to "Figure 6-1. Interruption Action" in the PoP, they could
also be terminating ... but anyway, not nullifying, so the PSW should be
increased afterwards. So:

Reviewed-by: Thomas Huth <thuth@redhat.com>


> I assume that there are a lot of other broken cases (as most instructions
> we care about are suppressing) - all trigger_pgm_exception() specifying
> and explicit number or ILEN_LATER look suspicious, however this is another
> story that might require bigger changes (and I have to understand when
> the address might already have been incremented first).
> 
> This is needed to make an upcoming kvm-unit-test work.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
> index 9978490..c09e391 100644
> --- a/target/s390x/helper.c
> +++ b/target/s390x/helper.c
> @@ -204,7 +204,7 @@ int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr orig_vaddr,
>      if (raddr > ram_size) {
>          DPRINTF("%s: raddr %" PRIx64 " > ram_size %" PRIx64 "\n", __func__,
>                  (uint64_t)raddr, (uint64_t)ram_size);
> -        trigger_pgm_exception(env, PGM_ADDRESSING, ILEN_LATER);
> +        trigger_pgm_exception(env, PGM_ADDRESSING, ILEN_LATER_INC);
>          return 1;
>      }
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing
  2017-05-29 12:12 [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing David Hildenbrand
  2017-05-29 14:33 ` Thomas Huth
@ 2017-06-04 17:24 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2017-06-04 17:24 UTC (permalink / raw)
  To: David Hildenbrand, qemu-devel; +Cc: agraf, Aurelien Jarno, thuth

On 05/29/2017 05:12 AM, David Hildenbrand wrote:
> We have to make the address in the old PSW point at the next
> instruction, as addressing exceptions are suppressing and not
> nullifying.
> 
> I assume that there are a lot of other broken cases (as most instructions
> we care about are suppressing) - all trigger_pgm_exception() specifying
> and explicit number or ILEN_LATER look suspicious, however this is another
> story that might require bigger changes (and I have to understand when
> the address might already have been incremented first).
> 
> This is needed to make an upcoming kvm-unit-test work.
> 
> Signed-off-by: David Hildenbrand<david@redhat.com>
> ---
>   target/s390x/helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-04 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-29 12:12 [Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing David Hildenbrand
2017-05-29 14:33 ` Thomas Huth
2017-06-04 17:24 ` Richard Henderson

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).