From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlzPT-0008NY-SA for qemu-devel@nongnu.org; Sat, 25 Apr 2015 08:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlzA2-0003O5-Ke for qemu-devel@nongnu.org; Sat, 25 Apr 2015 08:26:25 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:55500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlzA2-0003My-1g for qemu-devel@nongnu.org; Sat, 25 Apr 2015 08:26:18 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 25 Apr 2015 22:26:16 +1000 From: Alexey Kardashevskiy Date: Sat, 25 Apr 2015 22:24:42 +1000 Message-Id: <1429964684-23872-13-git-send-email-aik@ozlabs.ru> In-Reply-To: <1429964684-23872-1-git-send-email-aik@ozlabs.ru> References: <1429964684-23872-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH qemu v7 12/14] spapr: Add pseries-2.4 machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Alex Williamson , qemu-ppc@nongnu.org, Alexander Graf , David Gibson The next patch implements dynamic DMA windows and disables them by default for older pseries machines. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/ppc/spapr.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7febff7..b28209f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1852,12 +1852,15 @@ static const TypeInfo spapr_machine_2_2_info = { static void spapr_machine_2_3_class_init(ObjectClass *oc, void *data) { + static GlobalProperty compat_props[] = { + SPAPR_COMPAT_2_2, + { /* end of list */ } + }; MachineClass *mc = MACHINE_CLASS(oc); mc->name = "pseries-2.3"; mc->desc = "pSeries Logical Partition (PAPR compliant) v2.3"; - mc->alias = "pseries"; - mc->is_default = 1; + mc->compat_props = compat_props; } static const TypeInfo spapr_machine_2_3_info = { @@ -1866,12 +1869,29 @@ static const TypeInfo spapr_machine_2_3_info = { .class_init = spapr_machine_2_3_class_init, }; +static void spapr_machine_2_4_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + + mc->name = "pseries-2.4"; + mc->desc = "pSeries Logical Partition (PAPR compliant) v2.4"; + mc->alias = "pseries"; + mc->is_default = 1; +} + +static const TypeInfo spapr_machine_2_4_info = { + .name = TYPE_SPAPR_MACHINE "2.4", + .parent = TYPE_SPAPR_MACHINE, + .class_init = spapr_machine_2_4_class_init, +}; + static void spapr_machine_register_types(void) { type_register_static(&spapr_machine_info); type_register_static(&spapr_machine_2_1_info); type_register_static(&spapr_machine_2_2_info); type_register_static(&spapr_machine_2_3_info); + type_register_static(&spapr_machine_2_4_info); } type_init(spapr_machine_register_types) -- 2.0.0