From 777c98c32ce577a9671b9267ff6e2802f69ebafd Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 13 Jun 2015 00:45:56 +0200 Subject: target-s390x: basic PER event handling This patch add basic support to generate PER exceptions. It adds two fields to the cpu structure to record for the PER address and PER code & ATMID values. When an exception is triggered and a PER event is pending, the two PER values are copied to the lowcore area. At the end of an instruction, an helper is checking for a possible pending PER event and triggers an exception in that case. For that to work with branches, we need to disable TB chaining when PER is activated. Fortunately it's already in the TB flags. Finally in case of a SERVICE CALL exception, we need to trigger the PER exception immediately after. Signed-off-by: Aurelien Jarno Signed-off-by: Alexander Graf --- target-s390x/helper.h | 1 + 1 file changed, 1 insertion(+) (limited to 'target-s390x/helper.h') diff --git a/target-s390x/helper.h b/target-s390x/helper.h index 53db5193d9..7d2fa904eb 100644 --- a/target-s390x/helper.h +++ b/target-s390x/helper.h @@ -116,6 +116,7 @@ DEF_HELPER_FLAGS_2(lura, TCG_CALL_NO_WG, i64, env, i64) DEF_HELPER_FLAGS_2(lurag, TCG_CALL_NO_WG, i64, env, i64) DEF_HELPER_FLAGS_3(stura, TCG_CALL_NO_WG, void, env, i64, i64) DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i64, i64) +DEF_HELPER_1(per_check_exception, void, env) DEF_HELPER_2(xsch, void, env, i64) DEF_HELPER_2(csch, void, env, i64) -- cgit v1.2.1