diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2014-07-29 08:22:33 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-08-25 14:35:30 +0200 |
commit | fbfa304963fa8bf990dac1d05a77800d1e123b66 (patch) | |
tree | 70483cab3789e1e85a048a60e748a5cd95617f9b | |
parent | d8482c0d87708114a10e232768723626bf1099ba (diff) | |
download | op-kernel-dev-fbfa304963fa8bf990dac1d05a77800d1e123b66.zip op-kernel-dev-fbfa304963fa8bf990dac1d05a77800d1e123b66.tar.gz |
KVM: s390: clear kvm_dirty_regs when dropping to user space
We should make sure that all kvm_dirty_regs bits are cleared before dropping
to user space. Until now, some would remain pending.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 81b0e11..f00d0b0 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1319,15 +1319,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; - if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { - kvm_run->kvm_dirty_regs &= ~KVM_SYNC_PREFIX; + if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) kvm_s390_set_prefix(vcpu, kvm_run->s.regs.prefix); - } if (kvm_run->kvm_dirty_regs & KVM_SYNC_CRS) { - kvm_run->kvm_dirty_regs &= ~KVM_SYNC_CRS; memcpy(&vcpu->arch.sie_block->gcr, &kvm_run->s.regs.crs, 128); kvm_s390_set_prefix(vcpu, kvm_run->s.regs.prefix); } + kvm_run->kvm_dirty_regs = 0; might_fault(); rc = __vcpu_run(vcpu); |