KVM: s390: set the prefix initially properly
authorJulius Niedworok <jniedwor@linux.vnet.ibm.com>
Wed, 3 Aug 2016 14:39:54 +0000 (16:39 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 12 Aug 2016 07:10:17 +0000 (09:10 +0200)
When KVM_RUN is triggered on a VCPU without an initial reset, a
validity intercept occurs.
Setting the prefix will set the KVM_REQ_MMU_RELOAD bit initially,
thus preventing the bug.

Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Julius Niedworok <jniedwor@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c

index 3f3ae4865d579e8a9420cc22c6c2b39f37e70a9f..e63f6ed0a936faadcc3f626343ed18bb69defeeb 100644 (file)
@@ -1672,6 +1672,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
                                    KVM_SYNC_CRS |
                                    KVM_SYNC_ARCH0 |
                                    KVM_SYNC_PFAULT;
+       kvm_s390_set_prefix(vcpu, 0);
        if (test_kvm_facility(vcpu->kvm, 64))
                vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB;
        /* fprs can be synchronized via vrs, even if the guest has no vx. With