lkml.org 
[lkml]   [2021]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args
From
Date
On 11/02/21 02:56, Sean Christopherson wrote:
>>> + pta->gpa = (vm_get_max_gfn(vm) - guest_num_pages) * pta->guest_page_size;
>>> + pta->gpa &= ~(pta->host_page_size - 1);
>> Also not related to this patch, but another case for align.
>>
>>> if (backing_src == VM_MEM_SRC_ANONYMOUS_THP ||
>>> backing_src == VM_MEM_SRC_ANONYMOUS_HUGETLB)
>>> - guest_test_phys_mem &= ~(KVM_UTIL_HUGEPAGE_ALIGNMENT - 1);
>>> -
>>> + pta->gpa &= ~(KVM_UTIL_HUGEPAGE_ALIGNMENT - 1);
>> also align
>>
>>> #ifdef __s390x__
>>> /* Align to 1M (segment size) */
>>> - guest_test_phys_mem &= ~((1 << 20) - 1);
>>> + pta->gpa &= ~((1 << 20) - 1);
>> And here again (oof)
>
> Yep, I'll fix all these and the align() comment in v2.

This is not exactly align in fact; it is x & ~y rather than (x + y) &
~y. Are you going to introduce a round-down macro or is it a bug? (I
am lazy...).

Paolo

\
 
 \ /
  Last update: 2021-02-11 14:39    [W:0.135 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site