diff options
author | Eric Farman <farman@linux.ibm.com> | 2021-10-08 22:31:12 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2021-10-25 09:20:39 +0200 |
commit | 67cf68b6a5ccac8bc7dfef0a220b59af4c83fd2c (patch) | |
tree | 9b78ccfee213a0ee65b4e52d20c96c2ad98e5821 /arch/s390/kvm/kvm-s390.h | |
parent | 8eeba194a32e0f50329354a696baaa2e3d9accc5 (diff) | |
download | linux-67cf68b6a5ccac8bc7dfef0a220b59af4c83fd2c.tar.gz linux-67cf68b6a5ccac8bc7dfef0a220b59af4c83fd2c.tar.bz2 linux-67cf68b6a5ccac8bc7dfef0a220b59af4c83fd2c.zip |
KVM: s390: Add a routine for setting userspace CPU state
This capability exists, but we don't record anything when userspace
enables it. Let's refactor that code so that a note can be made in
the debug logs that it was enabled.
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20211008203112.1979843-7-farman@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.h')
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index 52bc8fbaa60a..c07a050d757d 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h @@ -208,6 +208,15 @@ static inline int kvm_s390_user_cpu_state_ctrl(struct kvm *kvm) return kvm->arch.user_cpu_state_ctrl != 0; } +static inline void kvm_s390_set_user_cpu_state_ctrl(struct kvm *kvm) +{ + if (kvm->arch.user_cpu_state_ctrl) + return; + + VM_EVENT(kvm, 3, "%s", "ENABLE: Userspace CPU state control"); + kvm->arch.user_cpu_state_ctrl = 1; +} + /* implemented in pv.c */ int kvm_s390_pv_destroy_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc); int kvm_s390_pv_create_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc); |