diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-10-25 10:10:51 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-10-25 10:10:21 -0400 |
commit | 14375bc4eb8dd0fb0e765390650564c35bb31068 (patch) | |
tree | 27200620658245c582ee9497fc969a082b304cab /arch/s390/kvm | |
parent | eca577ef5989d25dedc6b0fae3c4622ceaee8005 (diff) |
[S390] cleanup facility list handling
Store the facility list once at system startup with stfl/stfle and
reuse the result for all facility tests.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/priv.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 76482b65ba3e..985d825494f1 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -740,7 +740,7 @@ static int __init kvm_s390_init(void) | |||
740 | kvm_exit(); | 740 | kvm_exit(); |
741 | return -ENOMEM; | 741 | return -ENOMEM; |
742 | } | 742 | } |
743 | stfle(facilities, 1); | 743 | memcpy(facilities, S390_lowcore.stfle_fac_list, 16); |
744 | facilities[0] &= 0xff00fff3f47c0000ULL; | 744 | facilities[0] &= 0xff00fff3f47c0000ULL; |
745 | return 0; | 745 | return 0; |
746 | } | 746 | } |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 44205507717c..9194a4b52b22 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -154,12 +154,12 @@ static int handle_chsc(struct kvm_vcpu *vcpu) | |||
154 | 154 | ||
155 | static int handle_stfl(struct kvm_vcpu *vcpu) | 155 | static int handle_stfl(struct kvm_vcpu *vcpu) |
156 | { | 156 | { |
157 | unsigned int facility_list = stfl(); | 157 | unsigned int facility_list; |
158 | int rc; | 158 | int rc; |
159 | 159 | ||
160 | vcpu->stat.instruction_stfl++; | 160 | vcpu->stat.instruction_stfl++; |
161 | /* only pass the facility bits, which we can handle */ | 161 | /* only pass the facility bits, which we can handle */ |
162 | facility_list &= 0xff00fff3; | 162 | facility_list = S390_lowcore.stfl_fac_list & 0xff00fff3; |
163 | 163 | ||
164 | rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list), | 164 | rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list), |
165 | &facility_list, sizeof(facility_list)); | 165 | &facility_list, sizeof(facility_list)); |