From patchwork Fri Dec 9 02:23:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 704290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3tZblQ2yF4z9vDZ for ; Fri, 9 Dec 2016 13:29:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="breWImU2"; dkim-atps=neutral Received: from localhost ([::1]:44280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFAvo-0001Zz-As for incoming@patchwork.ozlabs.org; Thu, 08 Dec 2016 21:29:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFAqu-0002Qv-0X for qemu-devel@nongnu.org; Thu, 08 Dec 2016 21:24:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFAqt-0008E5-3v for qemu-devel@nongnu.org; Thu, 08 Dec 2016 21:23:59 -0500 Received: from ozlabs.org ([103.22.144.67]:47591) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFAqs-0008DS-P5; Thu, 08 Dec 2016 21:23:59 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3tZbck72hDz9vFD; Fri, 9 Dec 2016 13:23:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1481250198; bh=vuuX+uV+zyN7oS//lBQUC+uL2q2qZEr4jcYTQVoufEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=breWImU2tzQXTvDW+XyN3FDP3eQSTwXtgnR1kS1JGC3R9lNgPBrtKqcLxfknQ2GkU mZLmx+nS0SpMDHkxOOzG8nSDTiDr8sNtT+qZBR8wj8n57yJICJ1Qf5BP4pKPmYRVdG qPIMgqI7YbU6i5RnpvILwc83hlwUylt4EWLRVgCs= From: David Gibson To: paulus@samba.org, sjitindarsingh@gmail.com Date: Fri, 9 Dec 2016 13:23:13 +1100 Message-Id: <20161209022314.14399-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161209022314.14399-1-david@gibson.dropbear.id.au> References: <20161209022314.14399-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [for-2.9 4/5] pseries: Enable HPT resizing for 2.9 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: lvivier@redhat.com, thuth@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We've now implemented a PAPR extensions which allows PAPR guests (i.e. "pseries" machine type) to resize their hash page table during runtime. However, that extension is only enabled if explicitly chosen on the command line. This patch enables it by default for spapr-2.9, but leaves it disabled (by default) for older machine types. Signed-off-by: David Gibson Reviewed-by: Laurent Vivier --- hw/ppc/spapr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f3b74dc..25468f6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2770,7 +2770,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) smc->dr_lmb_enabled = true; smc->tcg_default_cpu = "POWER8"; - smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED; + smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED; mc->query_hotpluggable_cpus = spapr_query_hotpluggable_cpus; fwc->get_dev_path = spapr_get_fw_dev_path; nc->nmi_monitor_handler = spapr_nmi; @@ -2851,8 +2851,11 @@ static void spapr_machine_2_8_instance_options(MachineState *machine) static void spapr_machine_2_8_class_options(MachineClass *mc) { + sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc); + spapr_machine_2_9_class_options(mc); SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_8); + smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED; } DEFINE_SPAPR_MACHINE(2_8, "2.8", false);