diff mbox series

[3/4] KVM: s390: cpu model: Use previously unused constant

Message ID 20231103173008.630217-4-nsg@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series KVM: s390: Fix minor bugs in STFLE shadowing | expand

Commit Message

Nina Schoetterl-Glausch Nov. 3, 2023, 5:30 p.m. UTC
No point in defining a size for the mask if we're not going to use it.

Fixes: 9d8d578605b4 ("KVM: s390: use facilities and cpu_id per KVM")
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
---
 arch/s390/include/asm/kvm_host.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Hildenbrand Nov. 3, 2023, 6:36 p.m. UTC | #1
On 03.11.23 18:30, Nina Schoetterl-Glausch wrote:
> No point in defining a size for the mask if we're not going to use it.

I neither understand the patch description nor what the bug is that is 
being fixed (and how that description relates to the patch 
subject+description).

Please improve the patch description.
David Hildenbrand Nov. 3, 2023, 6:41 p.m. UTC | #2
On 03.11.23 19:36, David Hildenbrand wrote:
> On 03.11.23 18:30, Nina Schoetterl-Glausch wrote:
>> No point in defining a size for the mask if we're not going to use it.
> 
> I neither understand the patch description nor what the bug is that is
> being fixed (and how that description relates to the patch
> subject+description).
> 
> Please improve the patch description.
> 

Should this be

"
KVM: s390: cpu model: use proper define for facility mask size

We're using S390_ARCH_FAC_LIST_SIZE_U64 instead of 
S390_ARCH_FAC_MASK_SIZE_U64 to define the array size of the facility 
mask. Let's properly use S390_ARCH_FAC_MASK_SIZE_U64. Note that both
values are the same and, therefore, this is a pure cleanup.
"

I'm not convinced there is a bug and that this deserves a "Fixes:".
Nina Schoetterl-Glausch Nov. 6, 2023, 11 a.m. UTC | #3
On Fri, 2023-11-03 at 19:41 +0100, David Hildenbrand wrote:
> On 03.11.23 19:36, David Hildenbrand wrote:
> > On 03.11.23 18:30, Nina Schoetterl-Glausch wrote:
> > > No point in defining a size for the mask if we're not going to use it.
> > 
> > I neither understand the patch description nor what the bug is that is
> > being fixed (and how that description relates to the patch
> > subject+description).
> > 
> > Please improve the patch description.
> > 
> 
> Should this be
> 
> "
> KVM: s390: cpu model: use proper define for facility mask size
> 
> We're using S390_ARCH_FAC_LIST_SIZE_U64 instead of 
> S390_ARCH_FAC_MASK_SIZE_U64 to define the array size of the facility 
> mask. Let's properly use S390_ARCH_FAC_MASK_SIZE_U64. Note that both
> values are the same and, therefore, this is a pure cleanup.
> "
> 
> I'm not convinced there is a bug and that this deserves a "Fixes:".

Oh yeah, sorry, purely a cleanup. S390_ARCH_FAC_MASK_SIZE_U64 wasn't
used anywhere. I also considered just getting rid of it and using one
constant for both list and mask.
diff mbox series

Patch

diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index 427f9528a7b6..46fcd2f9dff8 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -811,7 +811,7 @@  struct s390_io_adapter {
 
 struct kvm_s390_cpu_model {
 	/* facility mask supported by kvm & hosting machine */
-	__u64 fac_mask[S390_ARCH_FAC_LIST_SIZE_U64];
+	__u64 fac_mask[S390_ARCH_FAC_MASK_SIZE_U64];
 	struct kvm_s390_vm_cpu_subfunc subfuncs;
 	/* facility list requested by guest (in dma page) */
 	__u64 *fac_list;