From: Christian Borntraeger Date: Wed, 7 Oct 2015 08:29:42 +0000 (+0200) Subject: s390x/kvm: Fix vector validity bit in device machine checks X-Git-Tag: v2.4.1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c22dcdeb85dc8b1eb5f923e4c075d3046750513;p=thirdparty%2Fqemu.git s390x/kvm: Fix vector validity bit in device machine checks 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 --- diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index ae3a0affec9..6d1f284da0d 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); }