From 1c5deaec77870961f6575e946d5af7a7d0831e57 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Thu, 6 Jul 2017 16:40:21 +0200 Subject: s390x: chsc nt2 events are pci-only The nt2 event class is pci-only - don't look for events if pci is not in the active cpu model. Reviewed-by: Thomas Huth Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- target/s390x/ioinst.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'target') diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 51fbea620d..3fa3301f50 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -599,6 +599,22 @@ static int chsc_sei_nt0_have_event(void) return 0; } +static int chsc_sei_nt2_get_event(void *res) +{ + if (s390_has_feat(S390_FEAT_ZPCI)) { + return pci_chsc_sei_nt2_get_event(res); + } + return 1; +} + +static int chsc_sei_nt2_have_event(void) +{ + if (s390_has_feat(S390_FEAT_ZPCI)) { + return pci_chsc_sei_nt2_have_event(); + } + return 0; +} + #define CHSC_SEI_NT0 (1ULL << 63) #define CHSC_SEI_NT2 (1ULL << 61) static void ioinst_handle_chsc_sei(ChscReq *req, ChscResp *res) -- cgit v1.2.3-55-g7522