Re: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-11 Thread Ben Gardon
On Thu, Feb 11, 2021 at 7:58 AM Sean Christopherson wrote: > > On Thu, Feb 11, 2021, Paolo Bonzini wrote: > > 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->ho

Re: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-11 Thread Sean Christopherson
On Thu, Feb 11, 2021, Paolo Bonzini wrote: > 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 cas

Re: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-11 Thread Paolo Bonzini
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 ||

Re: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-10 Thread Sean Christopherson
On Wed, Feb 10, 2021, Ben Gardon wrote: > > diff --git a/tools/testing/selftests/kvm/lib/perf_test_util.c > > b/tools/testing/selftests/kvm/lib/perf_test_util.c > > index f22ce1836547..03f125236021 100644 > > --- a/tools/testing/selftests/kvm/lib/perf_test_util.c > > +++ b/tools/testing/selftests/

Re: [PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-10 Thread Ben Gardon
On Wed, Feb 10, 2021 at 3:06 PM Sean Christopherson wrote: > > Move the per-VM GPA into perf_test_args instead of storing it as a > separate global variable. It's not obvious that guest_test_phys_mem > holds a GPA, nor that it's connected/coupled with per_vcpu->gpa. > > No functional change inten

[PATCH 09/15] KVM: selftests: Move per-VM GPA into perf_test_args

2021-02-10 Thread Sean Christopherson
Move the per-VM GPA into perf_test_args instead of storing it as a separate global variable. It's not obvious that guest_test_phys_mem holds a GPA, nor that it's connected/coupled with per_vcpu->gpa. No functional change intended. Signed-off-by: Sean Christopherson --- .../selftests/kvm/includ