Message ID | 20230118092133.320003-2-gshan@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: selftests: Remove duplicate VM in memslot_perf_test | expand |
On 18.01.2023 10:21, Gavin Shan wrote: > There are two VMs created in prepare_vm(), which isn't necessary. > To remove the second created and unnecessary VM. > > Signed-off-by: Gavin Shan <gshan@redhat.com> It's weird that we ended with two __vm_create_with_one_vcpu() calls, it looks like the second one was accidentally (re-)introduced during 'kvmarm-6.2' merge, so maybe?: Fixes: eb5618911af0 ("Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") Anyway, thanks for spotting this: Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Thanks, Maciej
Hi Maciej, On 1/24/23 10:56 AM, Maciej S. Szmigiero wrote: > On 18.01.2023 10:21, Gavin Shan wrote: >> There are two VMs created in prepare_vm(), which isn't necessary. >> To remove the second created and unnecessary VM. >> >> Signed-off-by: Gavin Shan <gshan@redhat.com> > > It's weird that we ended with two __vm_create_with_one_vcpu() calls, > it looks like the second one was accidentally (re-)introduced during > 'kvmarm-6.2' merge, so maybe?: > Fixes: eb5618911af0 ("Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") > > Anyway, thanks for spotting this: > Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> > Thanks for your review. Right, it'd better to have the fix tag as your suggested. I think I probably needn't respin. I guess Paolo, Marc or Oliver may help to add the fix tag when it's merged. Thanks, Gavin
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c b/tools/testing/selftests/kvm/memslot_perf_test.c index e6587e193490..adbbcca3e354 100644 --- a/tools/testing/selftests/kvm/memslot_perf_test.c +++ b/tools/testing/selftests/kvm/memslot_perf_test.c @@ -308,8 +308,6 @@ static bool prepare_vm(struct vm_data *data, int nslots, uint64_t *maxslots, data->hva_slots = malloc(sizeof(*data->hva_slots) * data->nslots); TEST_ASSERT(data->hva_slots, "malloc() fail"); - data->vm = __vm_create_with_one_vcpu(&data->vcpu, mempages, guest_code); - pr_info_v("Adding slots 1..%i, each slot with %"PRIu64" pages + %"PRIu64" extra pages last\n", data->nslots, data->pages_per_slot, rempages);
There are two VMs created in prepare_vm(), which isn't necessary. To remove the second created and unnecessary VM. Signed-off-by: Gavin Shan <gshan@redhat.com> --- tools/testing/selftests/kvm/memslot_perf_test.c | 2 -- 1 file changed, 2 deletions(-)