From: Auger Eric <eric.auger@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: eric.auger.pro@gmail.com, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, peter.maydell@linaro.org, wei@redhat.com,
suzuki.poulose@arm.com, dgilbert@redhat.com, agraf@suse.de,
david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [RFC 5/6] hw/arm/virt: support kvm_type property
Date: Tue, 3 Jul 2018 14:31:02 +0200 [thread overview]
Message-ID: <31c24e33-8fe8-a3c0-0430-d2f503f10932@redhat.com> (raw)
In-Reply-To: <20180703115507.nqmyo7c5q5lrevgt@kamzik.brq.redhat.com>
Hi Drew,
On 07/03/2018 01:55 PM, Andrew Jones wrote:
> On Wed, Jun 20, 2018 at 03:07:32PM +0200, Eric Auger wrote:
>> The kvm-type property currently is used to pass
>> a user parameter to KVM_CREATE_VM. This matches
>> the way KVM/ARM expects to pass the max_vm_phys_shift
>> parameter.
>>
>> This patch adds the support or the kvm-type property in
>> machvirt and also implements the machine class kvm_type()
>> callback so that it either returns the kvm-type value
>> provided by the user or returns the max_vm_phys_shift
>> exposed by KVM.
>>
>> for instance, the usespace can use the following option to
>> instantiate a 42b IPA guest: -machine kvm-type=42
>
> 'kvm-type' is a very generic name. It looks like you're creating a KVM
> VM of type 42 (which I assume is the ultimate KVM VM that answers the
> meaning to Life, the Universe, and Everything), but it's not obvious
> how it relates to physical address bits. Why not call this property
> something like 'min_vm_phys_shift'? Notice the 'min' in the name,
> because this is where the user is stating what the minimum number of
> physical address bits required for the VM is. IIUC, if KVM supports
> more, then it shouldn't be a problem.
Well I agree with you that using kvm-type=42 is not very nice.
On the other hand the current kernel API to pass the VM GPA address size
is though the KVM_CREATE_VM kvm_type argument.
in accel/kvm/kvm-all.c there is all the infrastructure to fetch the
generic machine kvm-type machine option and decode it into type, which
is passed to KVM_CREATE_VM.
"
kvm_type = qemu_opt_get(qemu_get_machine_opts(), "kvm-type");
if (mc->kvm_type) {
type = mc->kvm_type(ms, kvm_type);
} else if (kvm_type) {
ret = -EINVAL;
fprintf(stderr, "Invalid argument kvm-type=%s\n", kvm_type);
goto err;
}
do {
ret = kvm_ioctl(s, KVM_CREATE_VM, type);
} while (ret == -EINTR);
"
This infrastructure already is used in hw/ppc/spapr.c
Whould it be better if we would pass something like kvm-type=48bGPA?
Otherwise I can decode another virt machine option (min_vm_phys_shift)
in kvm_type callback.
Thanks
Eric
>
> Thanks,
> drew
>
next prev parent reply other threads:[~2018-07-03 12:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 13:07 [Qemu-devel] [RFC 0/6] KVM/ARM: Dynamic and larger GPA size Eric Auger
2018-06-20 13:07 ` [Qemu-devel] [RFC 1/6] linux-headers: Partial update for KVM/ARM KVM_ARM_GET_MAX_VM_PHYS_SHIFT Eric Auger
2018-06-20 13:07 ` [Qemu-devel] [RFC 2/6] hw/boards: Add a MachineState parameter to kvm_type callback Eric Auger
2018-06-21 0:36 ` David Gibson
2018-06-20 13:07 ` [Qemu-devel] [RFC 3/6] kvm: add kvm_get_max_vm_phys_shift Eric Auger
2018-06-21 0:37 ` David Gibson
2018-06-21 11:23 ` Auger Eric
2018-06-20 13:07 ` [Qemu-devel] [RFC 4/6] hw/arm/virt: Add virt-3.0 machine type Eric Auger
2018-06-20 13:07 ` [Qemu-devel] [RFC 5/6] hw/arm/virt: support kvm_type property Eric Auger
2018-06-20 17:15 ` Dr. David Alan Gilbert
2018-06-21 10:05 ` Auger Eric
2018-06-27 12:01 ` Dr. David Alan Gilbert
2018-07-03 11:55 ` Andrew Jones
2018-07-03 12:31 ` Auger Eric [this message]
2018-07-03 12:47 ` Andrew Jones
2018-07-03 13:20 ` Suzuki K Poulose
2018-07-09 17:26 ` Thomas Huth
2018-07-10 10:07 ` Auger Eric
2018-06-20 13:07 ` [Qemu-devel] [RFC 6/6] hw/arm/virt: handle max_vm_phys_shift conflicts on migration Eric Auger
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=31c24e33-8fe8-a3c0-0430-d2f503f10932@redhat.com \
--to=eric.auger@redhat.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=suzuki.poulose@arm.com \
--cc=wei@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).