Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: s390: Use defines for intercept code

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>

authored by

Farhan Ali and committed by
Christian Borntraeger
947b8972 0c9d8683

+13 -10
+3
arch/s390/include/asm/kvm_host.h
··· 175 175 #define ICPT_INST 0x04 176 176 #define ICPT_PROGI 0x08 177 177 #define ICPT_INSTPROGI 0x0C 178 + #define ICPT_EXTREQ 0x10 178 179 #define ICPT_EXTINT 0x14 180 + #define ICPT_IOREQ 0x18 181 + #define ICPT_WAIT 0x1c 179 182 #define ICPT_VALIDITY 0x20 180 183 #define ICPT_STOP 0x28 181 184 #define ICPT_OPEREXC 0x2C
+10 -10
arch/s390/kvm/intercept.c
··· 403 403 return -EOPNOTSUPP; 404 404 405 405 switch (vcpu->arch.sie_block->icptcode) { 406 - case 0x10: 407 - case 0x18: 406 + case ICPT_EXTREQ: 407 + case ICPT_IOREQ: 408 408 return handle_noop(vcpu); 409 - case 0x04: 409 + case ICPT_INST: 410 410 rc = handle_instruction(vcpu); 411 411 break; 412 - case 0x08: 412 + case ICPT_PROGI: 413 413 return handle_prog(vcpu); 414 - case 0x14: 414 + case ICPT_EXTINT: 415 415 return handle_external_interrupt(vcpu); 416 - case 0x1c: 416 + case ICPT_WAIT: 417 417 return kvm_s390_handle_wait(vcpu); 418 - case 0x20: 418 + case ICPT_VALIDITY: 419 419 return handle_validity(vcpu); 420 - case 0x28: 420 + case ICPT_STOP: 421 421 return handle_stop(vcpu); 422 - case 0x2c: 422 + case ICPT_OPEREXC: 423 423 rc = handle_operexc(vcpu); 424 424 break; 425 - case 0x38: 425 + case ICPT_PARTEXEC: 426 426 rc = handle_partial_execution(vcpu); 427 427 break; 428 428 default: