From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqf1-0001fv-5x for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:30:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoqew-00084d-Kr for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:30:22 -0400 Received: from e06smtp07.uk.ibm.com ([195.75.94.103]:59714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqew-000831-BO for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:30:18 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Oct 2015 11:30:17 +0100 From: Cornelia Huck Date: Wed, 21 Oct 2015 12:30:03 +0200 Message-Id: <1445423409-22218-4-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1445423409-22218-1-git-send-email-cornelia.huck@de.ibm.com> References: <1445423409-22218-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL v2 3/9] s390x/kvm: Fix vector validity bit in device machine checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: agraf@suse.de, qemu-stable@nongnu.org, qemu-devel@nongnu.org, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Cornelia Huck 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 --- target-s390x/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 0305ffa..e1acdac 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -2072,6 +2072,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); } -- 2.6.2