From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 2/2] KVM: selftests: Enable dirty_log_test on s390x References: <20190730100112.18205-1-thuth@redhat.com> <20190730100112.18205-3-thuth@redhat.com> <20190730105721.z4zsul7uxl2igoue@kamzik.brq.redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 31 Jul 2019 14:58:23 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kselftest-owner@vger.kernel.org List-ID: To: Thomas Huth , Andrew Jones Cc: kvm@vger.kernel.org, Christian Borntraeger , Janosch Frank , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, David Hildenbrand , Cornelia Huck , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Shuah Khan , Peter Xu On 31/07/19 10:19, Thomas Huth wrote: >>> @@ -293,6 +341,10 @@ static void run_test(enum vm_guest_mode mode, unsigned long iterations, >>> * case where the size is not aligned to 64 pages. >>> */ >>> guest_num_pages = (1ul << (30 - guest_page_shift)) + 16; >>> +#ifdef __s390x__ >>> + /* Round up to multiple of 1M (segment size) */ >>> + guest_num_pages = (guest_num_pages + 0xff) & ~0xffUL; >> We could maybe do this for all architectures as well. > It's really only needed on s390x, so I think we should keep the #ifdef here. Yes, on non-s390 we should keep covering the case where the size is not a multiple of BITS_PER_LONG. Paolo