diff options
author | Michael Mueller <mimu@linux.vnet.ibm.com> | 2017-06-29 12:39:27 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-01-26 03:49:09 -0500 |
commit | c7901a6ebee4b624971361bbd93f21ab0b359786 (patch) | |
tree | 8247eb88130353574f5f2fa35452059ac7c7dd40 /arch/s390/include | |
parent | 8d5fb0dc4ec069ea02395593e9b6b2b39a92457e (diff) |
KVM: s390: reverse bit ordering of irqs in pending mask
This patch prepares a simplification of bit operations between the irq
pending mask for emulated interrupts and the Interruption Pending Mask
(IPM) which is part of the Guest Interruption State Area (GISA), a feature
that allows interrupt delivery to guests by means of the SIE instruction.
Without that change, a bit-wise *or* operation on parts of these two masks
would either require a look-up table of size 256 bytes to map the IPM
to the emulated irq pending mask bit orientation (all bits mirrored at half
byte) or a sequence of up to 8 condidional branches to perform tests of
single bit positions. Both options are to be rejected either by performance
or space utilization reasons.
Beyond that this change will be transparent.
Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 029e8144c6ec..d2351d63afa3 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -422,35 +422,35 @@ struct kvm_vcpu_stat { | |||
422 | #define PGM_PER 0x80 | 422 | #define PGM_PER 0x80 |
423 | #define PGM_CRYPTO_OPERATION 0x119 | 423 | #define PGM_CRYPTO_OPERATION 0x119 |
424 | 424 | ||
425 | /* irq types in order of priority */ | 425 | /* irq types in ascend order of priorities */ |
426 | enum irq_types { | 426 | enum irq_types { |
427 | IRQ_PEND_MCHK_EX = 0, | 427 | IRQ_PEND_SET_PREFIX = 0, |
428 | IRQ_PEND_SVC, | ||
429 | IRQ_PEND_PROG, | ||
430 | IRQ_PEND_MCHK_REP, | ||
431 | IRQ_PEND_EXT_IRQ_KEY, | ||
432 | IRQ_PEND_EXT_MALFUNC, | ||
433 | IRQ_PEND_EXT_EMERGENCY, | ||
434 | IRQ_PEND_EXT_EXTERNAL, | ||
435 | IRQ_PEND_EXT_CLOCK_COMP, | ||
436 | IRQ_PEND_EXT_CPU_TIMER, | ||
437 | IRQ_PEND_EXT_TIMING, | ||
438 | IRQ_PEND_EXT_SERVICE, | ||
439 | IRQ_PEND_EXT_HOST, | ||
440 | IRQ_PEND_PFAULT_INIT, | ||
441 | IRQ_PEND_PFAULT_DONE, | ||
442 | IRQ_PEND_VIRTIO, | ||
443 | IRQ_PEND_IO_ISC_0, | ||
444 | IRQ_PEND_IO_ISC_1, | ||
445 | IRQ_PEND_IO_ISC_2, | ||
446 | IRQ_PEND_IO_ISC_3, | ||
447 | IRQ_PEND_IO_ISC_4, | ||
448 | IRQ_PEND_IO_ISC_5, | ||
449 | IRQ_PEND_IO_ISC_6, | ||
450 | IRQ_PEND_IO_ISC_7, | ||
451 | IRQ_PEND_SIGP_STOP, | ||
452 | IRQ_PEND_RESTART, | 428 | IRQ_PEND_RESTART, |
453 | IRQ_PEND_SET_PREFIX, | 429 | IRQ_PEND_SIGP_STOP, |
430 | IRQ_PEND_IO_ISC_7, | ||
431 | IRQ_PEND_IO_ISC_6, | ||
432 | IRQ_PEND_IO_ISC_5, | ||
433 | IRQ_PEND_IO_ISC_4, | ||
434 | IRQ_PEND_IO_ISC_3, | ||
435 | IRQ_PEND_IO_ISC_2, | ||
436 | IRQ_PEND_IO_ISC_1, | ||
437 | IRQ_PEND_IO_ISC_0, | ||
438 | IRQ_PEND_VIRTIO, | ||
439 | IRQ_PEND_PFAULT_DONE, | ||
440 | IRQ_PEND_PFAULT_INIT, | ||
441 | IRQ_PEND_EXT_HOST, | ||
442 | IRQ_PEND_EXT_SERVICE, | ||
443 | IRQ_PEND_EXT_TIMING, | ||
444 | IRQ_PEND_EXT_CPU_TIMER, | ||
445 | IRQ_PEND_EXT_CLOCK_COMP, | ||
446 | IRQ_PEND_EXT_EXTERNAL, | ||
447 | IRQ_PEND_EXT_EMERGENCY, | ||
448 | IRQ_PEND_EXT_MALFUNC, | ||
449 | IRQ_PEND_EXT_IRQ_KEY, | ||
450 | IRQ_PEND_MCHK_REP, | ||
451 | IRQ_PEND_PROG, | ||
452 | IRQ_PEND_SVC, | ||
453 | IRQ_PEND_MCHK_EX, | ||
454 | IRQ_PEND_COUNT | 454 | IRQ_PEND_COUNT |
455 | }; | 455 | }; |
456 | 456 | ||