From patchwork Tue Mar 5 16:50:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 159696 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp5205827jad; Tue, 5 Mar 2019 09:11:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxXyWctzBSCY7mXxOWhIAzQIXo0ZFoibuWeVJX9w5gzVo2mN8JObMfiX2z86Mtjw7BYWzNS X-Received: by 2002:a0d:f787:: with SMTP id h129mr1798719ywf.423.1551805909646; Tue, 05 Mar 2019 09:11:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551805909; cv=none; d=google.com; s=arc-20160816; b=TD9pX16iAYXP8Yz6qw6BZcgsmD6/u+EL6IxQDI7UquA1GF/Y7H/pbIqmnfEfX5cOxV mCPvDpDrSrwp06y+pzkAF0kKOYZeURAsIe9gAnxiVrpOfkeBPmmAutyqaFtoyHdE0bxN 4GKExWETDwtyB7d2i1N+laVfKgwT5fGMW5Ihuglw41KOW+Is/TLRL/MeWMM8LvCyRh2i X7IpF/donSeE9yT+UzhASeyOY8Y9sKTQY9GNV+xPg2rheIOeV6Wa1caBIgc+RFJyEJkc iqW5u99uzcbe5nRmktfZSOc3k4jh3HCU4zyHYxGZAtdixLuuvJ9ySSPobrmDwH8noaqO nxvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=fgrlSrnCDWbUi+fwU0OUKVRl93viFKwQS+TNszyVvoM=; b=fEQMAnNkVYe3hj+POFDN88KIXMRAKN4YBxFRuYcGTeMAb74m6Qc41hhvRXA9wwxYgH 6ne9SHlYBZBGQjO6DWDUCuz04ltZdtGE48D4KRJsoVeSgJCBQsp4BaxglwM783aPuPWl WHTqV+iDTwmUVNJ4aPYiQuXoHLpaKICUMF1jYun1JtnYRCkbIDdVLzvk6PxlPkcZheXW i+8DW+R0GphxabuLK8kQhCRokFMIlI5nOi6s+LPXreh8ODaJNcdc8dMBv3aYilrTMXJK osh42m1T8W6eOknOUch8UtWq4K3PIDMDyiyb+4JnenCve/YZ6NxnV5UnPBXNn/9WLYIC Uw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=z8WhhIV3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 8si5386479ybf.253.2019.03.05.09.11.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 05 Mar 2019 09:11:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=z8WhhIV3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:46103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1DbZ-0002EK-1s for patch@linaro.org; Tue, 05 Mar 2019 12:11:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1DHj-0001jI-W6 for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1DHj-00018R-6J for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:19 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:46817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1DHi-00017P-VV for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:19 -0500 Received: by mail-wr1-x436.google.com with SMTP id i16so10228799wrs.13 for ; Tue, 05 Mar 2019 08:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=fgrlSrnCDWbUi+fwU0OUKVRl93viFKwQS+TNszyVvoM=; b=z8WhhIV3iDHU57ajzgJ83PKj9GuXS/DxRL3jDU87gWYU1GIDtMYox4PaUNjjV3BAzo PIreWqfWliHvpBwBKuEN1Ql+r8aLNnaUB/L5ykug+T6D/rgh2VRQQ93sbBgbPMjWHrFY i+ruNcBTqWDFDreRry5fpCbb4T9oAY+4frs6IfInnPCisS1WdaAmqcYPxj7JzCROkaRV DDabC0YTFJP9S4Ci44nSUL2q9ngHZmkvAaefJb8ssNp077H8AMsYa3m14pVn6ucUxKZP FXaxj1PxDC0HrEK2J6/0GHwXZqnUUy1qFJR2gsvSUvIP0zhutECCv1jCQopppT8SFjn5 zoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fgrlSrnCDWbUi+fwU0OUKVRl93viFKwQS+TNszyVvoM=; b=J3Eg24PGh7Q7qFdXKvPz0X4F78ZIVrlfa3T79Jfl4YT6aKt+QfABmzBZV4V+stOLE/ grqlEWiwhQpXiBftcXM2eBy2vBGv6BK/ddjJsE+65+U6RSiIefoAd4EZmpGzE0LGdc4b 62urQ3zP0j9jootO7lIH5CzvgTgdS0fBb5GSf16bkbAhvh5vHQg8OGQT6ttdIhKAvI8r 3GYe8lXBNV1EWUqdZsPBVxDfk6HsaZx5LP7d3A5Jp7J+UwCiLh9jyslvDj3kMFEADIsg wdIt4FIoqlVwsfE2JBwxPrTOUkIvUFgdhU26IRKlPkE13v/u/i7YVfNn2+FJMHR4Vm1v F7fA== X-Gm-Message-State: APjAAAUC2dV+no6kQNxPNLBd2XyAbWQWXEguhd11S30KKjQZV6tBPCXP xVpYuwXeL4lj1il1Tf+g9aZNDxfwtuY= X-Received: by 2002:adf:f4d0:: with SMTP id h16mr17674262wrp.103.1551804677774; Tue, 05 Mar 2019 08:51:17 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 2sm10071495wrg.89.2019.03.05.08.51.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 08:51:16 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 5 Mar 2019 16:50:50 +0000 Message-Id: <20190305165051.26860-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305165051.26860-1-peter.maydell@linaro.org> References: <20190305165051.26860-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 Subject: [Qemu-devel] [PULL 21/22] hw/arm/virt: Bump the 255GB initial RAM limit 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Eric Auger Now we have the extended memory map (high IO regions beyond the scalable RAM) and dynamic IPA range support at KVM/ARM level we can bump the legacy 255GB initial RAM limit. The actual maximum RAM size now depends on the physical CPU and host kernel, in accelerated mode. In TCG mode, it depends on the VCPU AA64MMFR0.PARANGE. Signed-off-by: Eric Auger Reviewed-by: Igor Mammedov Message-id: 20190304101339.25970-11-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/virt.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) -- 2.20.1 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d725daefdf8..c7fb5348ae7 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -95,20 +95,7 @@ #define PLATFORM_BUS_NUM_IRQS 64 -/* RAM limit in GB. Since VIRT_MEM starts at the 1GB mark, this means - * RAM can go up to the 256GB mark, leaving 256GB of the physical - * address space unallocated and free for future use between 256G and 512G. - * If we need to provide more RAM to VMs in the future then we need to: - * * allocate a second bank of RAM starting at 2TB and working up - * * fix the DT and ACPI table generation code in QEMU to correctly - * report two split lumps of RAM to the guest - * * fix KVM in the host kernel to allow guests with >40 bit address spaces - * (We don't want to fill all the way up to 512GB with RAM because - * we might want it for non-RAM purposes later. Conversely it seems - * reasonable to assume that anybody configuring a VM with a quarter - * of a terabyte of RAM will be doing it on a host with more than a - * terabyte of physical address space.) - */ +/* Legacy RAM limit in GB (< version 4.0) */ #define LEGACY_RAMLIMIT_GB 255 #define LEGACY_RAMLIMIT_BYTES (LEGACY_RAMLIMIT_GB * GiB) @@ -1516,12 +1503,6 @@ static void machvirt_init(MachineState *machine) vms->smp_cpus = smp_cpus; - if (machine->ram_size > vms->memmap[VIRT_MEM].size) { - error_report("mach-virt: cannot model more than %dGB RAM", - LEGACY_RAMLIMIT_GB); - exit(1); - } - if (vms->virt && kvm_enabled()) { error_report("mach-virt: KVM does not support providing " "Virtualization extensions to the guest CPU");