[PATCH 3.2 011/152] KVM: s390: flush CPU on load control

From: Ben Hutchings
Date: Mon Feb 16 2015 - 20:51:08 EST


3.2.67-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Christian Borntraeger <borntraeger@xxxxxxxxxx>

commit 2dca485f8740208604543c3960be31a5dd3ea603 upstream.

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 <borntraeger@xxxxxxxxxx>
Acked-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
Reviewed-by: David Hildenbrand <dahi@xxxxxxxxxxxxxxxxxx>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
arch/s390/kvm/intercept.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -58,6 +58,7 @@ static int handle_lctlg(struct kvm_vcpu
break;
reg = (reg + 1) % 16;
} while (1);
+ kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
return 0;
}

@@ -97,6 +98,7 @@ static int handle_lctl(struct kvm_vcpu *
break;
reg = (reg + 1) % 16;
} while (1);
+ kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
return 0;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/