Skip to content

Commit 0546c63

Browse files
Longpeng(Mike)bonzini
authored andcommitted
KVM: s390: implements the kvm_arch_vcpu_in_kernel()
This implements kvm_arch_vcpu_in_kernel() for s390. DIAG is a privileged operation, so it cannot be called from problem state (user mode). Signed-off-by: Longpeng(Mike) <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent de63ad4 commit 0546c63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/s390/kvm/diag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
150150
{
151151
VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
152152
vcpu->stat.diagnose_44++;
153-
kvm_vcpu_on_spin(vcpu, false);
153+
kvm_vcpu_on_spin(vcpu, true);
154154
return 0;
155155
}
156156

arch/s390/kvm/kvm-s390.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
24492449

24502450
bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)
24512451
{
2452-
return false;
2452+
return !(vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE);
24532453
}
24542454

24552455
void kvm_s390_vcpu_block(struct kvm_vcpu *vcpu)

0 commit comments

Comments
 (0)