summaryrefslogtreecommitdiff
path: root/target-s390x
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2015-10-07 10:29:42 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-10-20 16:21:00 +0200
commit2ab75df38e34fe9bc271b5115ab52114e6e63a89 (patch)
tree940934d53073989d9a3061d4c1e9fb8fd78a5ee6 /target-s390x
parent085b0b055b189e8846ca3108e6774e3b9e60c1ce (diff)
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 <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: qemu-stable@nongnu.org Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x')
-rw-r--r--target-s390x/kvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 0305ffa9d3..e1acdac114 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);
}