public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] KVM: s390: vsie: fix the length of APCB bitmap
@ 2023-05-11  9:47 Pierre Morel
  2023-05-11  9:47 ` [PATCH 1/1] " Pierre Morel
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Morel @ 2023-05-11  9:47 UTC (permalink / raw)
  To: david
  Cc: kvm, linux-s390, linux-kernel, borntraeger, frankja, cohuck,
	thuth, imbrenda, hca, gor, svens

bit_and() uses the count of bits as the woking length.
Fix the previous implementation and effectively use
the right bitmap size.

VSIE With AP has been after the patching succesfuly tested in
VSIE with Harald's AP test zcryptping.

Fixes: 19fd83a64718 ("KVM: s390: vsie: allow CRYCB FORMAT-1")
Fixes: 56019f9aca22 ("KVM: s390: vsie: Allow CRYCB FORMAT-2")


Pierre Morel (1):
  KVM: s390: vsie: fix the length of APCB bitmap

 arch/s390/kvm/vsie.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] KVM: s390: vsie: fix the length of APCB bitmap
  2023-05-11  9:47 [PATCH 0/1] KVM: s390: vsie: fix the length of APCB bitmap Pierre Morel
@ 2023-05-11  9:47 ` Pierre Morel
  2023-05-12  7:17   ` Janosch Frank
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Morel @ 2023-05-11  9:47 UTC (permalink / raw)
  To: david
  Cc: kvm, linux-s390, linux-kernel, borntraeger, frankja, cohuck,
	thuth, imbrenda, hca, gor, svens

bit_and() uses the count of bits as the woking length.
Fix the previous implementation and effectively use
the right bitmap size.

Fixes: 19fd83a64718 ("KVM: s390: vsie: allow CRYCB FORMAT-1")
Fixes: 56019f9aca22 ("KVM: s390: vsie: Allow CRYCB FORMAT-2")

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 8d6b765abf29..0333ee482eb8 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -177,7 +177,8 @@ static int setup_apcb00(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
 			    sizeof(struct kvm_s390_apcb0)))
 		return -EFAULT;
 
-	bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb0));
+	bitmap_and(apcb_s, apcb_s, apcb_h,
+		   BITS_PER_BYTE * sizeof(struct kvm_s390_apcb0));
 
 	return 0;
 }
@@ -203,7 +204,8 @@ static int setup_apcb11(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
 			    sizeof(struct kvm_s390_apcb1)))
 		return -EFAULT;
 
-	bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb1));
+	bitmap_and(apcb_s, apcb_s, apcb_h,
+		   BITS_PER_BYTE * sizeof(struct kvm_s390_apcb1));
 
 	return 0;
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] KVM: s390: vsie: fix the length of APCB bitmap
  2023-05-11  9:47 ` [PATCH 1/1] " Pierre Morel
@ 2023-05-12  7:17   ` Janosch Frank
  0 siblings, 0 replies; 3+ messages in thread
From: Janosch Frank @ 2023-05-12  7:17 UTC (permalink / raw)
  To: Pierre Morel, david
  Cc: kvm, linux-s390, linux-kernel, borntraeger, cohuck, thuth,
	imbrenda, hca, gor, svens

On 5/11/23 11:47, Pierre Morel wrote:
> bit_and() uses the count of bits as the woking length.
> Fix the previous implementation and effectively use
> the right bitmap size.
> 
> Fixes: 19fd83a64718 ("KVM: s390: vsie: allow CRYCB FORMAT-1")
> Fixes: 56019f9aca22 ("KVM: s390: vsie: Allow CRYCB FORMAT-2")
> 
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>

Please push this to devel

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-12  7:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  9:47 [PATCH 0/1] KVM: s390: vsie: fix the length of APCB bitmap Pierre Morel
2023-05-11  9:47 ` [PATCH 1/1] " Pierre Morel
2023-05-12  7:17   ` Janosch Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox