From patchwork Mon Oct 17 02:43:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 9378409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43499607FD for ; Mon, 17 Oct 2016 02:52:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F5EB28C49 for ; Mon, 17 Oct 2016 02:52:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2252D28D2D; Mon, 17 Oct 2016 02:52:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B75828C49 for ; Mon, 17 Oct 2016 02:52:03 +0000 (UTC) Received: from localhost ([::1]:58634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvy1x-0001Dt-MO for patchwork-qemu-devel@patchwork.kernel.org; Sun, 16 Oct 2016 22:52:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvxuC-0003pB-01 for qemu-devel@nongnu.org; Sun, 16 Oct 2016 22:44:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvxu8-0000Nq-Sp for qemu-devel@nongnu.org; Sun, 16 Oct 2016 22:44:00 -0400 Received: from ozlabs.org ([103.22.144.67]:35029) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvxu7-0000Ic-TA; Sun, 16 Oct 2016 22:43:56 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3sy2Zn504Sz9s9c; Mon, 17 Oct 2016 13:43:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1476672225; bh=lpfQy5aXFLrBkckZXqIo14UbgjxLejyR6V3NWEUCGko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yy2352e14ejilXtH6piUKwnTcwLRS291d+bn+3/unwhOMYg+/qC4IJvwMeYXwyYPr GeuHUZg0Pb0cL9KXNcK/oKbmcH8n5zEZGK4GGY1UgRVRVXCe7lPkZaDoIIDwF+vW4u BIpJ9xtMkCXBtNpuZFxZTDvIbV0lW4kaUEQVJ6IM= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 17 Oct 2016 13:43:30 +1100 Message-Id: <1476672219-8836-8-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476672219-8836-1-git-send-email-david@gibson.dropbear.id.au> References: <1476672219-8836-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 07/16] spapr: fix inheritance chain for default machine options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, Michael Roth , agraf@suse.de, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Michael Roth Rather than machine instances having backward-compatible option defaults that need to be repeatedly re-enabled for every new machine type we introduce, we set the defaults appropriate for newer machine types, then add code to explicitly disable instance options as needed to maintain compatibility with older machine types. Currently pseries-2.5 does not inherit from pseries-2.6 in this fashion, which is okay at the moment since we do not have any instance compatibility options for pseries-2.6+ currently. We will make use of this in future patches though, so fix it here. Signed-off-by: Michael Roth [dwg: Extended to make 2.7 inherit from 2.8 as well] Signed-off-by: David Gibson --- hw/ppc/spapr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 03e3803..fc4c3c9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2475,6 +2475,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", true); static void spapr_machine_2_7_instance_options(MachineState *machine) { + spapr_machine_2_8_instance_options(machine); } static void spapr_machine_2_7_class_options(MachineClass *mc) @@ -2501,6 +2502,7 @@ DEFINE_SPAPR_MACHINE(2_7, "2.7", false); static void spapr_machine_2_6_instance_options(MachineState *machine) { + spapr_machine_2_7_instance_options(machine); } static void spapr_machine_2_6_class_options(MachineClass *mc) @@ -2525,6 +2527,7 @@ DEFINE_SPAPR_MACHINE(2_6, "2.6", false); static void spapr_machine_2_5_instance_options(MachineState *machine) { + spapr_machine_2_6_instance_options(machine); } static void spapr_machine_2_5_class_options(MachineClass *mc)