aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorDominik Dingel <dingel@linux.vnet.ibm.com>2013-12-09 12:30:01 -0500
committerCornelia Huck <cornelia.huck@de.ibm.com>2013-12-11 13:05:41 -0500
commitff1f3cb4b3ac5d039f02679f34cb1498d110d241 (patch)
tree35dcfbab1107a734ebd58ffd1ff5000e7c804965 /arch/s390
parent58bc33b2b700f8524772f3fc20272da2187060c8 (diff)
KVM: s390: ioeventfd: ignore leftmost bits
The diagnose 500 subcode 3 contains the 32 bit subchannel id in bits 32-63 (counting from the left). As for other I/O instructions, bits 0-31 should be ignored and thus not be passed to kvm_io_bus_write_cookie(). This fixes a bug where the guest passed non-zero bits 0-31 which the host tried to interpret, leading to ioeventfd notification failures. Cc: stable@vger.kernel.org Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
index 5ff29be7d87a..8216c0e0b2e2 100644
--- a/arch/s390/kvm/diag.c
+++ b/arch/s390/kvm/diag.c
@@ -121,7 +121,7 @@ static int __diag_virtio_hypercall(struct kvm_vcpu *vcpu)
121 * - gpr 4 contains the index on the bus (optionally) 121 * - gpr 4 contains the index on the bus (optionally)
122 */ 122 */
123 ret = kvm_io_bus_write_cookie(vcpu->kvm, KVM_VIRTIO_CCW_NOTIFY_BUS, 123 ret = kvm_io_bus_write_cookie(vcpu->kvm, KVM_VIRTIO_CCW_NOTIFY_BUS,
124 vcpu->run->s.regs.gprs[2], 124 vcpu->run->s.regs.gprs[2] & 0xffffffff,
125 8, &vcpu->run->s.regs.gprs[3], 125 8, &vcpu->run->s.regs.gprs[3],
126 vcpu->run->s.regs.gprs[4]); 126 vcpu->run->s.regs.gprs[4]);
127 127