KVM: s390: flush CPU on load control
authorChristian Borntraeger <[email protected]>
Fri, 31 Oct 2014 08:24:20 +0000 (09:24 +0100)
committerChristian Borntraeger <[email protected]>
Fri, 7 Nov 2014 10:10:52 +0000 (11:10 +0100)
some control register changes will flush some aspects of the CPU, e.g.
POP explicitely mentions that for CR9-CR11 "TLBs may be cleared".
Instead of trying to be clever and only flush on specific CRs, let
play safe and flush on all lctl(g) as future machines might define
new bits in CRs. Load control intercept should not happen that often.

Signed-off-by: Christian Borntraeger <[email protected]>
Acked-by: Cornelia Huck <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Cc: [email protected]
arch/s390/kvm/priv.c

index 72bb2dd8b9cd50cf53ba0a9376a3c158375f659f..9c565b6b4ccb78652654f89517a06410eb360104 100644 (file)
@@ -791,7 +791,7 @@ int kvm_s390_handle_lctl(struct kvm_vcpu *vcpu)
                        break;
                reg = (reg + 1) % 16;
        } while (1);
-
+       kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
        return 0;
 }
 
@@ -863,7 +863,7 @@ static int handle_lctlg(struct kvm_vcpu *vcpu)
                        break;
                reg = (reg + 1) % 16;
        } while (1);
-
+       kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
        return 0;
 }