From patchwork Wed Nov 4 09:03:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 7548451 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 662DBBEEA4 for ; Wed, 4 Nov 2015 09:04:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9883E2052A for ; Wed, 4 Nov 2015 09:04:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A90E520525 for ; Wed, 4 Nov 2015 09:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932447AbbKDJD6 (ORCPT ); Wed, 4 Nov 2015 04:03:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932435AbbKDJDy (ORCPT ); Wed, 4 Nov 2015 04:03:54 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C884F8E235; Wed, 4 Nov 2015 09:03:53 +0000 (UTC) Received: from thh440s.redhat.com (vpn1-6-240.ams2.redhat.com [10.36.6.240]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA493mhl023308; Wed, 4 Nov 2015 04:03:52 -0500 From: Thomas Huth To: kvm-ppc@vger.kernel.org, Paul Mackerras Cc: kvm@vger.kernel.org, scottwood@freescale.com, Alexander Graf , nikunj@linux.vnet.ibm.com Subject: [PATCH 1/1] KVM: PPC: Increase memslots to 320 Date: Wed, 4 Nov 2015 10:03:48 +0100 Message-Id: <1446627828-3347-2-git-send-email-thuth@redhat.com> In-Reply-To: <1446627828-3347-1-git-send-email-thuth@redhat.com> References: <1446627828-3347-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Only using 32 memslots for KVM on powerpc is way too low, you can nowadays hit this limit quite fast by adding a couple of PCI devices and/or pluggable memory DIMMs to the guest. x86 already increased the limit to 512 in total, to satisfy 256 pluggable DIMM slots, 3 private slots and 253 slots for other things like PCI devices. On powerpc, we only have 32 pluggable DIMMs in QEMU, not 256, so we likely do not as much slots as on x86. Thus setting the slot limit to 320 sounds like a good value for the time being (until we have some code in the future to resize the memslot array dynamically). And while we're at it, also remove the KVM_MEM_SLOTS_NUM definition from the powerpc-specific header since this gets defined in the generic kvm_host.h header anyway. Signed-off-by: Thomas Huth --- arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 887c259..89d387a 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -38,8 +38,7 @@ #define KVM_MAX_VCPUS NR_CPUS #define KVM_MAX_VCORES NR_CPUS -#define KVM_USER_MEM_SLOTS 32 -#define KVM_MEM_SLOTS_NUM KVM_USER_MEM_SLOTS +#define KVM_USER_MEM_SLOTS 320 #ifdef CONFIG_KVM_MMIO #define KVM_COALESCED_MMIO_PAGE_OFFSET 1