aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kvm/vsie.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index c8c8763e7822..90781ba52803 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -844,6 +844,11 @@ static void register_shadow_scb(struct kvm_vcpu *vcpu,
844 struct vsie_page *vsie_page) 844 struct vsie_page *vsie_page)
845{ 845{
846 WRITE_ONCE(vcpu->arch.vsie_block, &vsie_page->scb_s); 846 WRITE_ONCE(vcpu->arch.vsie_block, &vsie_page->scb_s);
847 /*
848 * External calls have to lead to a kick of the vcpu and
849 * therefore the vsie -> Simulate Wait state.
850 */
851 atomic_or(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
847} 852}
848 853
849/* 854/*
@@ -851,6 +856,7 @@ static void register_shadow_scb(struct kvm_vcpu *vcpu,
851 */ 856 */
852static void unregister_shadow_scb(struct kvm_vcpu *vcpu) 857static void unregister_shadow_scb(struct kvm_vcpu *vcpu)
853{ 858{
859 atomic_andnot(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
854 WRITE_ONCE(vcpu->arch.vsie_block, NULL); 860 WRITE_ONCE(vcpu->arch.vsie_block, NULL);
855} 861}
856 862