[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmFVo8gR8UQ9uu2e@yury-laptop>
Date: Thu, 21 Apr 2022 06:01:23 -0700
From: Yury Norov <yury.norov@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sven Schnelle <svens@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, linux-s390@...r.kernel.org,
kvm@...r.kernel.org
Subject: Re: [PATCH 3/4] KVM: s390: replace bitmap_copy with
bitmap_{from,to}_arr64 where appropriate
On Thu, Apr 21, 2022 at 09:24:20AM +0200, David Hildenbrand wrote:
> On 21.04.22 00:25, Yury Norov wrote:
> > Copying bitmaps from/to 64-bit arrays with bitmap_copy is not safe
> > in general case. Use designated functions instead.
> >
>
> Just so I understand correctly: there is no BUG, it's just cleaner to do
> it that way, correct?
Yes. there's no bug, but the pattern is considered bad.
https://lore.kernel.org/all/YiCWNdWd+AsLbDkp@smile.fi.intel.com/T/#m9080cbb8a8235d7d4b7e38292cee8e4903f9afe4q
> IIUC, bitmap_to_arr64() translates to bitmap_copy_clear_tail() on s390x.
Yes.
> As the passed length is always 1024 (KVM_S390_VM_CPU_FEAT_NR_BITS), we
> essentially end up with bitmap_copy() again.
>
>
> Looks cleaner to me
Thanks.
> Reviewed-by: David Hildenbrand <david@...hat.com>
>
>
> --
> Thanks,
>
> David / dhildenb
Powered by blists - more mailing lists