diff options
author | David Hildenbrand <david@redhat.com> | 2018-01-23 20:05:31 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-01-24 19:46:42 +0300 |
commit | 8d5fb0dc4ec069ea02395593e9b6b2b39a92457e (patch) | |
tree | 4ac7480336b33dfdb2475c28e176736e97000dc4 /arch/s390/kvm/priv.c | |
parent | 9daecfc66015530ee5d2d84cce5d341f0fffd0ab (diff) | |
download | linux-8d5fb0dc4ec069ea02395593e9b6b2b39a92457e.tar.xz |
KVM: s390: introduce and use kvm_s390_test_cpuflags()
Use it just like kvm_s390_set_cpuflags() and kvm_s390_clear_cpuflags().
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180123170531.13687-5-david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r-- | arch/s390/kvm/priv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 8205223f7332..125a7ff98e2a 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -209,13 +209,13 @@ int kvm_s390_skey_check_enable(struct kvm_vcpu *vcpu) trace_kvm_s390_skey_related_inst(vcpu); if (!(sie_block->ictl & (ICTL_ISKE | ICTL_SSKE | ICTL_RRBE)) && - !(atomic_read(&sie_block->cpuflags) & CPUSTAT_KSS)) + !kvm_s390_test_cpuflags(vcpu, CPUSTAT_KSS)) return rc; rc = s390_enable_skey(); VCPU_EVENT(vcpu, 3, "enabling storage keys for guest: %d", rc); if (!rc) { - if (atomic_read(&sie_block->cpuflags) & CPUSTAT_KSS) + if (kvm_s390_test_cpuflags(vcpu, CPUSTAT_KSS)) kvm_s390_clear_cpuflags(vcpu, CPUSTAT_KSS); else sie_block->ictl &= ~(ICTL_ISKE | ICTL_SSKE | |