Re: [RFC PATCH 1/4] KVM: selftests: Add support for creating non-default type VMs

From: Erdem Aktas
Date: Wed Aug 04 2021 - 16:30:12 EST


Thank you all for all that great feedback! I will include them in my v2.

On Wed, Aug 4, 2021 at 7:46 AM Maxim Levitsky <mlevitsk@xxxxxxxxxx> wrote:
>
> > > > Can we pass KVM_X86_LEGACY_VM (whatever name when it's upstreamed)
> > > > instead of 0?
> > >
I was originally thinking of doing this but Sean has suggested that we
should use 0 to make it arch-agnostic for creating default VMs.
+Sean Christopherson : What do you think?

>
> KVM_X86_NORMAL_VM is a very good name IMHO as well.
> Thanks!

Sounds good to me.

> For example:
>
> struct vm_options {
> enum vm_guest_mode mode;
> uint64_t phy_pages;
> int perm;
> int type;
> };
>
> struct kvm_vm *vm_create(const struct vm_options *options)
> {
> ...
> }
>

I liked this idea, I will see if I can include it in my v2.

Thank you so much again.
-Erdem