diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2020-10-22 06:31:35 -0400 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2020-10-22 15:47:27 +0200 |
commit | 3ded270a2697852a71961b45291519ae044f25e3 (patch) | |
tree | a3fa320f41c02da90174be609c375bc98e19cc01 /target/s390x/cpu_features.h | |
parent | 3df4843d0e612a3c838e8d94c3e9c24520f2e680 (diff) |
s390x: pv: Fix diag318 PV fencing
Diag318 fencing needs to be determined on the current VM PV state and
not on the state that the VM has when we create the CPU model.
Fixes: fabdada935 ("s390: guest support for diagnose 0x318")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Message-Id: <20201022103135.126033-3-frankja@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu_features.h')
-rw-r--r-- | target/s390x/cpu_features.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h index ef52ffce83..87463f064d 100644 --- a/target/s390x/cpu_features.h +++ b/target/s390x/cpu_features.h @@ -81,6 +81,10 @@ const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group); #define BE_BIT_NR(BIT) (BIT ^ (BITS_PER_LONG - 1)) +static inline void clear_be_bit(unsigned int bit_nr, uint8_t *array) +{ + array[bit_nr / 8] &= ~(0x80 >> (bit_nr % 8)); +} static inline void set_be_bit(unsigned int bit_nr, uint8_t *array) { array[bit_nr / 8] |= 0x80 >> (bit_nr % 8); |