kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, borntraeger@de.ibm.com,
	frankja@linux.ibm.com, bgardon@google.com, peterx@redhat.com
Subject: [PATCH 02/11] KVM: selftests: Drop pointless vm_create wrapper
Date: Wed,  4 Nov 2020 22:23:48 +0100	[thread overview]
Message-ID: <20201104212357.171559-3-drjones@redhat.com> (raw)
In-Reply-To: <20201104212357.171559-1-drjones@redhat.com>

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 tools/testing/selftests/kvm/demand_paging_test.c | 2 +-
 tools/testing/selftests/kvm/dirty_log_test.c     | 2 +-
 tools/testing/selftests/kvm/include/kvm_util.h   | 1 -
 tools/testing/selftests/kvm/lib/kvm_util.c       | 7 +------
 4 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/tools/testing/selftests/kvm/demand_paging_test.c b/tools/testing/selftests/kvm/demand_paging_test.c
index 360cd3ea4cd6..d1fe6c8e595b 100644
--- a/tools/testing/selftests/kvm/demand_paging_test.c
+++ b/tools/testing/selftests/kvm/demand_paging_test.c
@@ -166,7 +166,7 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, int vcpus,
 
 	pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
 
-	vm = _vm_create(mode, pages, O_RDWR);
+	vm = vm_create(mode, pages, O_RDWR);
 	kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
 #ifdef __x86_64__
 	vm_create_irqchip(vm);
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c
index 752ec158ac59..37445aa4876f 100644
--- a/tools/testing/selftests/kvm/dirty_log_test.c
+++ b/tools/testing/selftests/kvm/dirty_log_test.c
@@ -252,7 +252,7 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid,
 
 	pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
 
-	vm = _vm_create(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
+	vm = vm_create(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
 	kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
 #ifdef __x86_64__
 	vm_create_irqchip(vm);
diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h
index 919e161dd289..ebf7f87d72df 100644
--- a/tools/testing/selftests/kvm/include/kvm_util.h
+++ b/tools/testing/selftests/kvm/include/kvm_util.h
@@ -65,7 +65,6 @@ int kvm_check_cap(long cap);
 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap);
 
 struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm);
-struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm);
 void kvm_vm_free(struct kvm_vm *vmp);
 void kvm_vm_restart(struct kvm_vm *vmp, int perm);
 void kvm_vm_release(struct kvm_vm *vmp);
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
index 3327cebc1095..b9943e935dc7 100644
--- a/tools/testing/selftests/kvm/lib/kvm_util.c
+++ b/tools/testing/selftests/kvm/lib/kvm_util.c
@@ -152,7 +152,7 @@ _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params)
  * descriptor to control the created VM is created with the permissions
  * given by perm (e.g. O_RDWR).
  */
-struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
+struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
 {
 	struct kvm_vm *vm;
 
@@ -243,11 +243,6 @@ struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
 	return vm;
 }
 
-struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
-{
-	return _vm_create(mode, phy_pages, perm);
-}
-
 /*
  * VM Restart
  *
-- 
2.26.2


  parent reply	other threads:[~2020-11-04 21:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 21:23 [PATCH 00/11] KVM: selftests: Cleanups Andrew Jones
2020-11-04 21:23 ` [PATCH 01/11] KVM: selftests: Add x86_64/tsc_msrs_test to .gitignore Andrew Jones
2020-11-04 21:23 ` Andrew Jones [this message]
2020-11-04 21:23 ` [PATCH 03/11] KVM: selftests: Always clear dirty bitmap after iteration Andrew Jones
2020-11-04 21:23 ` [PATCH 04/11] KVM: selftests: Use a single binary for dirty/clear log test Andrew Jones
2020-11-04 21:23 ` [PATCH 05/11] KVM: selftests: Introduce after_vcpu_run hook for dirty " Andrew Jones
2020-11-04 21:23 ` [PATCH 06/11] KVM: selftests: Make the per vcpu memory size global Andrew Jones
2020-11-04 21:23 ` [PATCH 07/11] KVM: selftests: Make the number of vcpus global Andrew Jones
2020-11-04 21:23 ` [PATCH 08/11] KVM: selftests: Factor out guest mode code Andrew Jones
2020-11-04 21:23 ` [PATCH 09/11] KVM: selftests: Make vm_create_default common Andrew Jones
2020-11-04 21:36   ` Andrew Jones
2020-11-05  7:18     ` Christian Borntraeger
2020-11-05  9:59       ` Andrew Jones
2020-11-05 18:45         ` Peter Xu
2020-11-05 18:54           ` Christian Borntraeger
2020-11-04 21:23 ` [PATCH 10/11] KVM: selftests: Introduce vm_create_[default_]vcpus Andrew Jones
2020-11-04 21:23 ` [PATCH 11/11] KVM: selftests: Remove create_vm Andrew Jones
2020-11-05  7:08 ` [PATCH 00/11] KVM: selftests: Cleanups Christian Borntraeger
2020-11-05 18:55 ` Peter Xu
2020-11-05 19:41   ` Ben Gardon
2020-11-06  9:45     ` Andrew Jones
2020-11-06 15:04       ` Peter Xu
2020-11-09 17:11         ` Ben Gardon
2020-11-06 13:01 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104212357.171559-3-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=bgardon@google.com \
    --cc=borntraeger@de.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).