From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxbO-0005uk-Nu for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoxbK-0006eu-B5 for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:06 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:43564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxbJ-0006ea-TC for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:02 -0400 Received: from localhost by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Oct 2015 11:55:01 -0600 From: Michael Roth Date: Wed, 21 Oct 2015 12:52:07 -0500 Message-Id: <1445449930-23525-38-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1445449930-23525-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1445449930-23525-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , Christian Borntraeger , qemu-stable@nongnu.org, Michael Roth From: Christian Borntraeger Device hotplugs trigger a crw machine check. All machine checks have validity bits for certain register types. With vector support we also have to claim that vector registers are valid. This is a band-aid suitable for stable. Long term we should create the full mcic value dynamically depending on the active features in the kernel interrupt handler. Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck Cc: qemu-stable@nongnu.org Signed-off-by: Cornelia Huck (cherry picked from commit 2ab75df38e34fe9bc271b5115ab52114e6e63a89) Signed-off-by: Michael Roth --- target-s390x/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index ae3a0af..6d1f284 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -2079,6 +2079,9 @@ void kvm_s390_crw_mchk(void) .u.mchk.cr14 = 1 << 28, .u.mchk.mcic = 0x00400f1d40330000ULL, }; + if (kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) { + irq.u.mchk.mcic |= 0x0000004000000000ULL; + } kvm_s390_floating_interrupt(&irq); } -- 1.9.1