diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-07-07 14:39:35 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-06-21 03:43:46 -0400 |
commit | b917ae573f5b3f7fee8cfb0d42d74bd8641f6401 (patch) | |
tree | f582eb7dc28567929d6a54185a53fac1036341bf /arch/s390/kvm/vsie.c | |
parent | 94a15de8fb2667791d66c49610676ea2add90034 (diff) |
KVM: s390: vsie: speed up VCPU external calls
Whenever a SIGP external call is injected via the SIGP external call
interpretation facility, the VCPU is not kicked. When a VCPU is currently
in the VSIE, the external call might not be processed immediately.
Therefore we have to provoke partial execution exceptions, which leads to a
kick of the VCPU and therefore also kick out of VSIE. This is done by
simulating the WAIT state. This bit has no other side effects.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/vsie.c')
-rw-r--r-- | arch/s390/kvm/vsie.c | 6 |
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 | */ |
852 | static void unregister_shadow_scb(struct kvm_vcpu *vcpu) | 857 | static 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 | ||