diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-06-07 03:37:17 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-06-10 06:07:26 -0400 |
commit | dcc98ea6146e4da27eee2f3e9983500e9618cc23 (patch) | |
tree | b9c75dc913c7c6f8176013d804e87d2a3f8def40 /arch/s390/kvm | |
parent | 1bb78d161feae5b613c80eb822059eec60d2a538 (diff) |
KVM: s390: fixup I/O interrupt traces
We currently have two issues with the I/O interrupt injection logging:
1. All QEMU versions up to 2.6 have a wrong encoding of device numbers
etc for the I/O interrupt type, so the inject VM_EVENT will have wrong
data. Let's fix this by using the interrupt parameters and not the
interrupt type number.
2. We only log in kvm_s390_inject_vm, but not when coming from
kvm_s390_reinject_io_int or from flic. Let's move the logging to the
common __inject_io function.
We also enhance the logging for delivery to match the data.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 5a80af740d3e..d72c4a877622 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -28,9 +28,6 @@ | |||
28 | #include "gaccess.h" | 28 | #include "gaccess.h" |
29 | #include "trace-s390.h" | 29 | #include "trace-s390.h" |
30 | 30 | ||
31 | #define IOINT_SCHID_MASK 0x0000ffff | ||
32 | #define IOINT_SSID_MASK 0x00030000 | ||
33 | #define IOINT_CSSID_MASK 0x03fc0000 | ||
34 | #define PFAULT_INIT 0x0600 | 31 | #define PFAULT_INIT 0x0600 |
35 | #define PFAULT_DONE 0x0680 | 32 | #define PFAULT_DONE 0x0680 |
36 | #define VIRTIO_PARAM 0x0d00 | 33 | #define VIRTIO_PARAM 0x0d00 |
@@ -821,7 +818,14 @@ static int __must_check __deliver_io(struct kvm_vcpu *vcpu, | |||
821 | struct kvm_s390_interrupt_info, | 818 | struct kvm_s390_interrupt_info, |
822 | list); | 819 | list); |
823 | if (inti) { | 820 | if (inti) { |
824 | VCPU_EVENT(vcpu, 4, "deliver: I/O 0x%llx", inti->type); | 821 | if (inti->type & KVM_S390_INT_IO_AI_MASK) |
822 | VCPU_EVENT(vcpu, 4, "%s", "deliver: I/O (AI)"); | ||
823 | else | ||
824 | VCPU_EVENT(vcpu, 4, "deliver: I/O %x ss %x schid %04x", | ||
825 | inti->io.subchannel_id >> 8, | ||
826 | inti->io.subchannel_id >> 1 & 0x3, | ||
827 | inti->io.subchannel_nr); | ||
828 | |||
825 | vcpu->stat.deliver_io_int++; | 829 | vcpu->stat.deliver_io_int++; |
826 | trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, | 830 | trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, |
827 | inti->type, | 831 | inti->type, |
@@ -1415,6 +1419,13 @@ static int __inject_io(struct kvm *kvm, struct kvm_s390_interrupt_info *inti) | |||
1415 | } | 1419 | } |
1416 | fi->counters[FIRQ_CNTR_IO] += 1; | 1420 | fi->counters[FIRQ_CNTR_IO] += 1; |
1417 | 1421 | ||
1422 | if (inti->type & KVM_S390_INT_IO_AI_MASK) | ||
1423 | VM_EVENT(kvm, 4, "%s", "inject: I/O (AI)"); | ||
1424 | else | ||
1425 | VM_EVENT(kvm, 4, "inject: I/O %x ss %x schid %04x", | ||
1426 | inti->io.subchannel_id >> 8, | ||
1427 | inti->io.subchannel_id >> 1 & 0x3, | ||
1428 | inti->io.subchannel_nr); | ||
1418 | isc = int_word_to_isc(inti->io.io_int_word); | 1429 | isc = int_word_to_isc(inti->io.io_int_word); |
1419 | list = &fi->lists[FIRQ_LIST_IO_ISC_0 + isc]; | 1430 | list = &fi->lists[FIRQ_LIST_IO_ISC_0 + isc]; |
1420 | list_add_tail(&inti->list, list); | 1431 | list_add_tail(&inti->list, list); |
@@ -1531,13 +1542,6 @@ int kvm_s390_inject_vm(struct kvm *kvm, | |||
1531 | inti->mchk.mcic = s390int->parm64; | 1542 | inti->mchk.mcic = s390int->parm64; |
1532 | break; | 1543 | break; |
1533 | case KVM_S390_INT_IO_MIN...KVM_S390_INT_IO_MAX: | 1544 | case KVM_S390_INT_IO_MIN...KVM_S390_INT_IO_MAX: |
1534 | if (inti->type & KVM_S390_INT_IO_AI_MASK) | ||
1535 | VM_EVENT(kvm, 5, "%s", "inject: I/O (AI)"); | ||
1536 | else | ||
1537 | VM_EVENT(kvm, 5, "inject: I/O css %x ss %x schid %04x", | ||
1538 | s390int->type & IOINT_CSSID_MASK, | ||
1539 | s390int->type & IOINT_SSID_MASK, | ||
1540 | s390int->type & IOINT_SCHID_MASK); | ||
1541 | inti->io.subchannel_id = s390int->parm >> 16; | 1545 | inti->io.subchannel_id = s390int->parm >> 16; |
1542 | inti->io.subchannel_nr = s390int->parm & 0x0000ffffu; | 1546 | inti->io.subchannel_nr = s390int->parm & 0x0000ffffu; |
1543 | inti->io.io_int_parm = s390int->parm64 >> 32; | 1547 | inti->io.io_int_parm = s390int->parm64 >> 32; |