From: Janosch Frank <frankja@linux.ibm.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, david@redhat.com,
borntraeger@linux.ibm.com, linux-s390@vger.kernel.org,
imbrenda@linux.ibm.com, nrb@linux.ibm.com, pmorel@linux.ibm.com
Subject: [GIT PULL 03/11] KVM: s390: vsie: fix the length of APCB bitmap
Date: Wed, 21 Jun 2023 17:29:09 +0200 [thread overview]
Message-ID: <20230621153227.57250-4-frankja@linux.ibm.com> (raw)
In-Reply-To: <20230621153227.57250-1-frankja@linux.ibm.com>
From: Pierre Morel <pmorel@linux.ibm.com>
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>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/kvm/20230511094719.9691-1-pmorel@linux.ibm.com/
Signed-off-by: Janosch Frank <frankja@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.41.0
next prev parent reply other threads:[~2023-06-21 15:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 15:29 [GIT PULL 00/11] kvm: s390: Changes for 6.5 Janosch Frank
2023-06-21 15:29 ` [GIT PULL 01/11] KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes Janosch Frank
2023-06-21 15:29 ` [GIT PULL 02/11] KVM: s390: selftests: add selftest for CMMA migration Janosch Frank
2023-06-21 15:29 ` Janosch Frank [this message]
2023-06-21 15:29 ` [GIT PULL 04/11] KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler Janosch Frank
2023-06-21 15:29 ` [GIT PULL 05/11] s390/uv: Always export uv_info Janosch Frank
2023-06-21 15:29 ` [GIT PULL 06/11] s390/uvdevice: Add info IOCTL Janosch Frank
2023-06-21 15:29 ` [GIT PULL 07/11] s390/uvdevice: Add 'Add Secret' UVC Janosch Frank
2023-06-21 15:29 ` [GIT PULL 08/11] s390/uvdevice: Add 'List Secrets' UVC Janosch Frank
2023-06-21 15:29 ` [GIT PULL 09/11] s390/uvdevice: Add 'Lock Secret Store' UVC Janosch Frank
2023-06-21 15:29 ` [GIT PULL 10/11] s390/uv: replace scnprintf with sysfs_emit Janosch Frank
2023-06-21 15:29 ` [GIT PULL 11/11] s390/uv: Update query for secret-UVCs Janosch Frank
2023-07-01 11:01 ` [GIT PULL 00/11] kvm: s390: Changes for 6.5 Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230621153227.57250-4-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pmorel@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox