From 66dc50f7057b9a0191f54e55764412202306858d Mon Sep 17 00:00:00 2001 From: Halil Pasic Date: Tue, 17 Oct 2017 16:04:49 +0200 Subject: s390x: improve error handling for SSCH and RSCH Simplify the error handling of the SSCH and RSCH handler avoiding arbitrary and cryptic error codes being used to tell how the instruction is supposed to end. Let the code detecting the condition tell how it's to be handled in a less ambiguous way. It's best to handle SSCH and RSCH in one go as the emulation of the two shares a lot of code. For passthrough this change isn't pure refactoring, but changes the way kernel reported EFAULT is handled. After clarifying the kernel interface we decided that EFAULT shall be mapped to unit exception. Same goes for unexpected error codes and absence of required ORB flags. Signed-off-by: Halil Pasic Message-Id: <20171017140453.51099-4-pasic@linux.vnet.ibm.com> Tested-by: Dong Jia Shi [CH: cosmetic changes] Reviewed-by: Dong Jia Shi Signed-off-by: Cornelia Huck --- include/hw/s390x/s390-ccw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/s390x/s390-ccw.h') diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-ccw.h index 9f45cf1347..7d15a1a5d4 100644 --- a/include/hw/s390x/s390-ccw.h +++ b/include/hw/s390x/s390-ccw.h @@ -33,7 +33,7 @@ typedef struct S390CCWDeviceClass { CCWDeviceClass parent_class; void (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp); void (*unrealize)(S390CCWDevice *dev, Error **errp); - int (*handle_request) (ORB *, SCSW *, void *); + IOInstEnding (*handle_request) (SubchDev *sch); } S390CCWDeviceClass; #endif -- cgit v1.2.3