All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine
@ 2014-06-25  4:08 Alexey Kardashevskiy
  2014-06-25 11:05 ` Alexander Graf
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kardashevskiy @ 2014-06-25  4:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This adds a v2.1 machine to support backward compatibility
for newer macines in the case if they ever be implemented.

This adds a "pseries-2.1" machine as a child of the "pseries"
machine and only changes visible machine name.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* removed .instance_size from the new class, the parent's .instance_size
will be used in this case

---
 hw/ppc/spapr.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index f4d464a..f572461 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1672,9 +1672,25 @@ static const TypeInfo spapr_machine_info = {
     },
 };
 
+static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->name = "pseries-2.1";
+    mc->desc = "pSeries Logical Partition (PAPR compliant) v2.1";
+    mc->is_default = 0;
+}
+
+static const TypeInfo spapr_machine_2_1_info = {
+    .name          = TYPE_SPAPR_MACHINE "2.1",
+    .parent        = TYPE_SPAPR_MACHINE,
+    .class_init    = spapr_machine_2_1_class_init,
+};
+
 static void spapr_machine_register_types(void)
 {
     type_register_static(&spapr_machine_info);
+    type_register_static(&spapr_machine_2_1_info);
 }
 
 type_init(spapr_machine_register_types)
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine
  2014-06-25  4:08 [Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine Alexey Kardashevskiy
@ 2014-06-25 11:05 ` Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2014-06-25 11:05 UTC (permalink / raw)
  To: Alexey Kardashevskiy, qemu-devel; +Cc: qemu-ppc


On 25.06.14 06:08, Alexey Kardashevskiy wrote:
> This adds a v2.1 machine to support backward compatibility
> for newer macines in the case if they ever be implemented.
>
> This adds a "pseries-2.1" machine as a child of the "pseries"
> machine and only changes visible machine name.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Thanks, applied to ppc-next.


Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-25 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25  4:08 [Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine Alexey Kardashevskiy
2014-06-25 11:05 ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.