[Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag

Cornelia Huck posted 3 patches 8 years, 5 months ago
[Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag
Posted by Cornelia Huck 8 years, 5 months ago
While the PoP is silent on the issue, z/VM documentation states
that unknown diagnose codes trigger a specification exception.
We already do that when running with kvm, so change tcg to do so
as well.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/misc_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index d23ffcd890..5a1eba02ab 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -109,7 +109,7 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
     }
 
     if (r) {
-        program_interrupt(env, PGM_OPERATION, ILEN_AUTO);
+        program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);
     }
 }
 
-- 
2.13.5


Re: [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag
Posted by Thomas Huth 8 years, 5 months ago
On 18.08.2017 13:48, Cornelia Huck wrote:
> While the PoP is silent on the issue, z/VM documentation states
> that unknown diagnose codes trigger a specification exception.
> We already do that when running with kvm, so change tcg to do so
> as well.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  target/s390x/misc_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
> index d23ffcd890..5a1eba02ab 100644
> --- a/target/s390x/misc_helper.c
> +++ b/target/s390x/misc_helper.c
> @@ -109,7 +109,7 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
>      }
>  
>      if (r) {
> -        program_interrupt(env, PGM_OPERATION, ILEN_AUTO);
> +        program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);
>      }
>  }

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