* [Qemu-devel] [PATCH] arm: define version-based machine type for ARM
@ 2015-01-15 17:50 Wei Huang
2015-01-15 18:10 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Wei Huang @ 2015-01-15 17:50 UTC (permalink / raw)
To: qemu-devel; +Cc: wei, peter.maydell
ARM virt machine type (machvirt) had been stable for a while. But recently
new devices have been added to support extra features. Considerring the
support of long-term compatibility, it is time to create a version-based
machine types.
This patch defines a qemu 2.2 specific machine type (machvirt-2.2) and
points the default machvirt to it. In the future new machine types can
follow a similar naming scheme (e.g. machvirt-3.0, ...). Note that this
patch doesn't change the semantic of existing QEMU command line.
With this patch, machine type querry (-M ?) will print the following:
virt ARM Virtual Machine v2.2 (alias of machvirt-2.2)
machvirt-2.2 ARM Virtual Machine v2.2 (default)
Signed-off-by: Wei Huang <wei@redhat.com>
---
hw/arm/virt.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 2353440..6174abd 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -701,15 +701,37 @@ static void virt_class_init(ObjectClass *oc, void *data)
static const TypeInfo machvirt_info = {
.name = TYPE_VIRT_MACHINE,
.parent = TYPE_MACHINE,
+ .abstract = true,
.instance_size = sizeof(VirtMachineState),
.instance_init = virt_instance_init,
.class_size = sizeof(VirtMachineClass),
.class_init = virt_class_init,
};
+static void machvirt_2_2_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ static GlobalProperty compat_props[] = {
+ { /* end of list */ }
+ };
+
+ mc->name = "machvirt-2.2";
+ mc->desc = "ARM Virtual Machine v2.2";
+ mc->alias = "virt";
+ mc->is_default = 1;
+ mc->compat_props = compat_props;
+}
+
+static const TypeInfo machvirt_2_2_info = {
+ .name = TYPE_VIRT_MACHINE "-2.2",
+ .parent = TYPE_VIRT_MACHINE,
+ .class_init = machvirt_2_2_class_init,
+};
+
static void machvirt_machine_init(void)
{
type_register_static(&machvirt_info);
+ type_register_static(&machvirt_2_2_info);
}
machine_init(machvirt_machine_init);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm: define version-based machine type for ARM
2015-01-15 17:50 [Qemu-devel] [PATCH] arm: define version-based machine type for ARM Wei Huang
@ 2015-01-15 18:10 ` Peter Maydell
2015-01-15 18:52 ` Wei Huang
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-01-15 18:10 UTC (permalink / raw)
To: Wei Huang; +Cc: QEMU Developers
On 15 January 2015 at 17:50, Wei Huang <wei@redhat.com> wrote:
> ARM virt machine type (machvirt) had been stable for a while. But recently
> new devices have been added to support extra features. Considerring the
> support of long-term compatibility, it is time to create a version-based
> machine types.
>
> This patch defines a qemu 2.2 specific machine type (machvirt-2.2) and
> points the default machvirt to it. In the future new machine types can
> follow a similar naming scheme (e.g. machvirt-3.0, ...). Note that this
> patch doesn't change the semantic of existing QEMU command line.
I don't think we're anywhere ready yet to support between
version migration compatibility. We will want this *eventually*
but we are a long long way away from needing it...(maybe a
year?)
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm: define version-based machine type for ARM
2015-01-15 18:10 ` Peter Maydell
@ 2015-01-15 18:52 ` Wei Huang
2015-01-15 19:04 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Wei Huang @ 2015-01-15 18:52 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
On 01/15/2015 12:10 PM, Peter Maydell wrote:
> On 15 January 2015 at 17:50, Wei Huang <wei@redhat.com> wrote:
>> ARM virt machine type (machvirt) had been stable for a while. But recently
>> new devices have been added to support extra features. Considerring the
>> support of long-term compatibility, it is time to create a version-based
>> machine types.
>>
>> This patch defines a qemu 2.2 specific machine type (machvirt-2.2) and
>> points the default machvirt to it. In the future new machine types can
>> follow a similar naming scheme (e.g. machvirt-3.0, ...). Note that this
>> patch doesn't change the semantic of existing QEMU command line.
>
> I don't think we're anywhere ready yet to support between
> version migration compatibility. We will want this *eventually*
> but we are a long long way away from needing it...(maybe a
> year?)
Thanks, Peter. I think migration support is getting closer than one
year. It might not create problems at the beginning. So I understand
your point.
-Wei
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm: define version-based machine type for ARM
2015-01-15 18:52 ` Wei Huang
@ 2015-01-15 19:04 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-01-15 19:04 UTC (permalink / raw)
To: Wei Huang; +Cc: QEMU Developers
On 15 January 2015 at 18:52, Wei Huang <wei@redhat.com> wrote:
> On 01/15/2015 12:10 PM, Peter Maydell wrote:
>> I don't think we're anywhere ready yet to support between
>> version migration compatibility. We will want this *eventually*
>> but we are a long long way away from needing it...(maybe a
>> year?)
> Thanks, Peter. I think migration support is getting closer than one
> year. It might not create problems at the beginning. So I understand
> your point.
Well, at the moment in mainline migration doesn't work at all!
So we need to spend a period of time stabilising it, and
making sure that the 'virt' machine has all the capabilities
we need and that we've made any further breaking changes which
we need to do. Then we need to have somebody who's willing
to do the extensive between-version migration testing that
you need in order for the feature to actually work in practice.
It's only when we are sure that we can actually support
cross-version migration and we have the necessary demand
from users (ie: distros, I think), that we should start
creating per-version machines and backwards-compatibility
property settings and so on.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-15 19:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 17:50 [Qemu-devel] [PATCH] arm: define version-based machine type for ARM Wei Huang
2015-01-15 18:10 ` Peter Maydell
2015-01-15 18:52 ` Wei Huang
2015-01-15 19:04 ` Peter Maydell
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).