KVM: s390: Use defines for intercept code
authorFarhan Ali <alifm@linux.vnet.ibm.com>
Fri, 17 Mar 2017 13:59:32 +0000 (09:59 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Mar 2017 10:10:35 +0000 (11:10 +0100)
Let's use #define values for better readability.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/intercept.c

index 18e9c9d83b23e2b0c00a0fdcfc0f8195377e7d28..54e36e7cd201d628a72ce7660ed27bc646172f6e 100644 (file)
@@ -175,7 +175,10 @@ struct kvm_s390_sie_block {
 #define ICPT_INST      0x04
 #define ICPT_PROGI     0x08
 #define ICPT_INSTPROGI 0x0C
+#define ICPT_EXTREQ    0x10
 #define ICPT_EXTINT    0x14
+#define ICPT_IOREQ     0x18
+#define ICPT_WAIT      0x1c
 #define ICPT_VALIDITY  0x20
 #define ICPT_STOP      0x28
 #define ICPT_OPEREXC   0x2C
index 0a176465515315fc0eb0f20baf1ab3cc7cc34260..e831f4b3e1c1802ff30926dc7fb849ba7c59f8de 100644 (file)
@@ -403,26 +403,26 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
                return -EOPNOTSUPP;
 
        switch (vcpu->arch.sie_block->icptcode) {
-       case 0x10:
-       case 0x18:
+       case ICPT_EXTREQ:
+       case ICPT_IOREQ:
                return handle_noop(vcpu);
-       case 0x04:
+       case ICPT_INST:
                rc = handle_instruction(vcpu);
                break;
-       case 0x08:
+       case ICPT_PROGI:
                return handle_prog(vcpu);
-       case 0x14:
+       case ICPT_EXTINT:
                return handle_external_interrupt(vcpu);
-       case 0x1c:
+       case ICPT_WAIT:
                return kvm_s390_handle_wait(vcpu);
-       case 0x20:
+       case ICPT_VALIDITY:
                return handle_validity(vcpu);
-       case 0x28:
+       case ICPT_STOP:
                return handle_stop(vcpu);
-       case 0x2c:
+       case ICPT_OPEREXC:
                rc = handle_operexc(vcpu);
                break;
-       case 0x38:
+       case ICPT_PARTEXEC:
                rc = handle_partial_execution(vcpu);
                break;
        default: