From 111d7f4a69751d333bac32526cd252add6b071d3 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 3 Jun 2015 23:09:41 +0200 Subject: [PATCH] target-s390x: fix exception for invalid operation code When an operation code is not recognized (ie invalid instruction) an operation exception should be generated instead of a specification exception. The latter is for valid opcode, with invalid operands or modifiers. This give a very basic GDB support in the guest, as it uses the invalid opcode 0x0001 to generate a trap. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno Signed-off-by: Alexander Graf --- target-s390x/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index d508bc2b54..c7ebd21ec8 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -320,7 +320,7 @@ static void gen_program_exception(DisasContext *s, int code) static inline void gen_illegal_opcode(DisasContext *s) { - gen_program_exception(s, PGM_SPECIFICATION); + gen_program_exception(s, PGM_OPERATION); } #ifndef CONFIG_USER_ONLY -- 2.11.4.GIT