Received: from eggs.gnu.org ([2001:4830:134:3::10]:59756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIEVR-0001Jt-Fa for qemu-devel@nongnu.org; Fri, 15 Aug 2014 06:13:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIEVA-0001DB-1b for qemu-devel@nongnu.org; Fri, 15 Aug 2014 06:13:09 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:44601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIEV9-0001BZ-9q for qemu-devel@nongnu.org; Fri, 15 Aug 2014 06:12:51 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Aug 2014 20:12:49 +1000 From: Alexey Kardashevskiy Date: Fri, 15 Aug 2014 20:12:35 +1000 Message-Id: <1408097555-28126-14-git-send-email-aik@ozlabs.ru> In-Reply-To: <1408097555-28126-1-git-send-email-aik@ozlabs.ru> References: <1408097555-28126-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [RFC PATCH v2 13/13] spapr: Add pseries-2.2 machine with default "ddw" option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Alexander Graf , Gavin Shan , Alex Williamson , qemu-ppc@nongnu.org, David Gibson This defines new "pseries" machine version which is capable of DDW (dynamic DMA windows) by default. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 5c92707..507fd8a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1685,10 +1685,39 @@ static const TypeInfo spapr_machine_2_1_info = { .class_init = spapr_machine_2_1_class_init, }; +static void spapr_machine_2_2_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + static GlobalProperty compat_props[] = { + { + .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, + .property = "ddw", + .value = stringify(on), + }, + { + .driver = TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE, + .property = "ddw", + .value = stringify(on), + } + }; + + mc->name = "pseries-2.2"; + mc->desc = "pSeries Logical Partition (PAPR compliant) v2.2"; + mc->is_default = 0; + mc->compat_props = compat_props; +} + +static const TypeInfo spapr_machine_2_2_info = { + .name = TYPE_SPAPR_MACHINE "2.2", + .parent = TYPE_SPAPR_MACHINE, + .class_init = spapr_machine_2_2_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_init(spapr_machine_register_types) -- 2.0.0