[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC PATCH v3 01/18] spapr: Make machine naming conventions c
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [RFC PATCH v3 01/18] spapr: Make machine naming conventions closer to those for PC |
Date: |
Fri, 29 Aug 2014 20:12:05 +1000 |
From: David Gibson <address@hidden>
As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to
represent the machine type as it appeared to the guest in different qemu
versions. This allows for safe migration of guests between current and
future qemu versions.
In PC, however, the default plain "pc" machine type is just an alias for
the most recent versioned machine type. In sPAPR at the moment, it names
the base machine class from which the versioned types are derived.
The PC approach is preferable; it makes it clearer which explicit version
is the current one. Additionally updating the "current" machine as the
base class makes it even more likely than otherwise to incorrectly alter
the versioned machines' behaviour when updating the current machine.
Therefore this patch changes sPAPR to the PC approach - the base class
becomes abstract, and plain "pseries" becomes an alias for the most
recent versioned machine class.
Signed-off-by: David Gibson <address@hidden>
[aik: removed "pseries" name from the parent class]
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/ppc/spapr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 647c383..d2d3c27 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1643,9 +1643,6 @@ static void spapr_machine_class_init(ObjectClass *oc,
void *data)
MachineClass *mc = MACHINE_CLASS(oc);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc);
- mc->name = "pseries";
- mc->desc = "pSeries Logical Partition (PAPR compliant)";
- mc->is_default = 1;
mc->init = ppc_spapr_init;
mc->reset = ppc_spapr_reset;
mc->block_default_type = IF_SCSI;
@@ -1660,6 +1657,7 @@ static void spapr_machine_class_init(ObjectClass *oc,
void *data)
static const TypeInfo spapr_machine_info = {
.name = TYPE_SPAPR_MACHINE,
.parent = TYPE_MACHINE,
+ .abstract = true,
.instance_size = sizeof(sPAPRMachineState),
.instance_init = spapr_machine_initfn,
.class_init = spapr_machine_class_init,
@@ -1675,7 +1673,8 @@ static void spapr_machine_2_1_class_init(ObjectClass *oc,
void *data)
mc->name = "pseries-2.1";
mc->desc = "pSeries Logical Partition (PAPR compliant) v2.1";
- mc->is_default = 0;
+ mc->alias = "pseries";
+ mc->is_default = 1;
}
static const TypeInfo spapr_machine_2_1_info = {
--
2.0.0
- [Qemu-ppc] [RFC PATCH v3 00/18] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 05/18] spapr_vio: Introduce a liobn number generating macros, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 03/18] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 07/18] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 01/18] spapr: Make machine naming conventions closer to those for PC,
Alexey Kardashevskiy <=
- [Qemu-ppc] [RFC PATCH v3 11/18] spapr_pci: Add windows counter, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 17/18] vfio: Enable DDW ioctls to VFIO IOMMU driver, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 04/18] spapr_pci: Introduce a liobn number generating macros, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 09/18] spapr_rtas: Reserve DDW RTAS token numbers, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 08/18] spapr_iommu: Implement free_table() helper, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 06/18] spapr_pci: Make find_phb()/find_dev() public, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 02/18] qom: Make object_child_foreach safe for objects removal, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 14/18] spapr_pci_vfio: Call spapr_pci::reset on reset, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 10/18] spapr_pci: Define DDW callbacks, Alexey Kardashevskiy, 2014/08/29
- [Qemu-ppc] [RFC PATCH v3 18/18] spapr: Add pseries-2.2 machine, Alexey Kardashevskiy, 2014/08/29