mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Vitaly Kuznetsov" <vkuznets@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH v2 1/4] KVM: selftests: Move vm type into _vm_create() internally
Date: Thu, 29 Aug 2019 18:44:32 +0200	[thread overview]
Message-ID: <20190829164432.e5kxt4e2f5ncxwlc@kamzik.brq.redhat.com> (raw)
In-Reply-To: <20190829022117.10191-2-peterx@redhat.com>

On Thu, Aug 29, 2019 at 10:21:14AM +0800, Peter Xu wrote:
> Rather than passing the vm type from the top level to the end of vm
> creation, let's simply keep that as an internal of kvm_vm struct and
> decide the type in _vm_create().  Several reasons for doing this:
> 
> - The vm type is only decided by physical address width and currently
>   only used in aarch64, so we've got enough information as long as
>   we're passing vm_guest_mode into _vm_create(),
> 
> - This removes a loop dependency between the vm->type and creation of
>   vms.  That's why now we need to parse vm_guest_mode twice sometimes,
>   once in run_test() and then again in _vm_create().  The follow up
>   patches will move on to clean up that as well so we can have a
>   single place to decide guest machine types and so.
> 
> Note that this patch will slightly change the behavior of aarch64
> tests in that previously most vm_create() callers will directly pass
> in type==0 into _vm_create() but now the type will depend on
> vm_guest_mode, however it shouldn't affect any user because all
> vm_create() users of aarch64 will be using VM_MODE_DEFAULT guest
> mode (which is VM_MODE_P40V48_4K) so at last type will still be zero.
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  tools/testing/selftests/kvm/dirty_log_test.c  | 13 +++---------
>  .../testing/selftests/kvm/include/kvm_util.h  |  3 +--
>  tools/testing/selftests/kvm/lib/kvm_util.c    | 21 ++++++++++++-------
>  3 files changed, 17 insertions(+), 20 deletions(-)
>

Reviewed-by: Andrew Jones <drjones@redhat.com>

  reply	other threads:[~2019-08-29 16:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  2:21 [PATCH v2 0/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K Peter Xu
2019-08-29  2:21 ` [PATCH v2 1/4] KVM: selftests: Move vm type into _vm_create() internally Peter Xu
2019-08-29 16:44   ` Andrew Jones [this message]
2019-08-29  2:21 ` [PATCH v2 2/4] KVM: selftests: Create VM earlier for dirty log test Peter Xu
2019-08-29  2:21 ` [PATCH v2 3/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K Peter Xu
2019-08-29  9:45   ` Andrew Jones
2019-08-29 10:03     ` Peter Xu
2019-08-29 10:37       ` Andrew Jones
2019-08-29  2:21 ` [PATCH v2 4/4] KVM: selftests: Remove duplicate guest mode handling Peter Xu
2019-08-29 16:46 ` [PATCH v2 0/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K Andrew Jones
2019-08-30  1:32   ` Peter Xu

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=20190829164432.e5kxt4e2f5ncxwlc@kamzik.brq.redhat.com \
    --to=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    --cc=vkuznets@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

all inboxes | Powered by JetHome®