KVM: s390: ioeventfd: ignore leftmost bits
authorDominik Dingel <dingel@linux.vnet.ibm.com>
Mon, 9 Dec 2013 17:30:01 +0000 (18:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 19:34:01 +0000 (11:34 -0800)
commita94656765648f13577cb520761c957998506e409
tree3b00cd6bd4ec79caa7441c7b13085a180d226e26
parentaeb4c5fcb16509724e8975b7c902d2fc946d62cb
KVM: s390: ioeventfd: ignore leftmost bits

commit ff1f3cb4b3ac5d039f02679f34cb1498d110d241 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/diag.c