From patchwork Tue Mar 5 16:50:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 159684 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp5190102jad; Tue, 5 Mar 2019 08:58:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxC7/1RmHWnCLZ1zzhKDQjplKi517AFod5qNQlIvozjCKLvvJjvsyTym9EzH52Z7CWR6iHk X-Received: by 2002:a0d:e8c1:: with SMTP id r184mr1824779ywe.368.1551805106581; Tue, 05 Mar 2019 08:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551805106; cv=none; d=google.com; s=arc-20160816; b=I4ob70GKpwry2rNZiussEL3Qq0gY8GNC05fX3VzafHikaNQvsdMSuq9ykVUGwihCda qZs7pk/6ClGKjcB8yp8VuAMA+txb3vRoWHSUguzG3z+eft+bjJ9Upf05ET7mtO80BOm7 NdB901xDzYksBaT5j6LCIYzuyuszGAq1IunphmZjtjv3VxdQZzdAHo09isJjd1HQa3Lb wB6Wdw1tqZQ24/oZ35SU3oLkthfq0C9gsV3JiuuMP7RYQrdBxl9ZceZLCDYyTuEcAa1i jBq+8N4lWaCgqx+2mFXblHcX24ccWQjwi5vmv0jKNyBNYJilc3s4s4glPMwzknuIUqBv dLXA== 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=rRmkZleKI++MqHShCtVmRFNz1qokS1bAI2Uo/wNIcOI=; b=FSNJsvxbecTOuYtyPUaaCMVkAUd7VRnc8LV9n7w+nC32NkxCoMtkMbkh+7/9zaSzLk rnO0MqYwG/L7Avn3x2WlfJSqDAkH4hzC8VVcbk6wxANwuih4wBmL5o3ogdSYFfFUj/l7 EzwrEsH5ffHVKfL8ORZozj5D5Q+NknBhB0wiASWr+nSUKrwAuMuP9NnkYO747m3Nb03P H+2RL/6wn1B8D26fajCumFKCEx0bm+4JLXRcWDMWvv74S+jiuGGMTlCmIhtSHTStRrVy 0Yg5o2zLTC33G0d+IzoYjjn61TV9IdUJ4k8sC8AY8I/qPmswA32HAB8cXnz1r7Ag+UnL XrZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pPReLF1c; 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 p82si1654609ybb.349.2019.03.05.08.58.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 05 Mar 2019 08:58:26 -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=pPReLF1c; 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]:45821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1DOc-0007ZE-3b for patch@linaro.org; Tue, 05 Mar 2019 11:58:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1DHf-0001gv-J1 for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1DHe-00011v-QM for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:15 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:36419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1DHe-0000zo-Ig for qemu-devel@nongnu.org; Tue, 05 Mar 2019 11:51:14 -0500 Received: by mail-wr1-x436.google.com with SMTP id o17so10263426wrw.3 for ; Tue, 05 Mar 2019 08:51:14 -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=rRmkZleKI++MqHShCtVmRFNz1qokS1bAI2Uo/wNIcOI=; b=pPReLF1cX3rPvmewBNBNJjYY5kF4UHtK/nwvDidaanwflaCdGRsT18wMw/pCYGtXIz NLtpMM/ahSjUrQDMo94iEArGoYgn3Jq2nOGVx5kXnkn4ThMyRvt4Z12CIFGF56Qs45My H/5ne+JTTjxwZFJe93plYiqn9UqLpQn3+h5iaJlLuU2X6vKWi2d3TbQ+5nViMSvH2gae MniEUyv7xexWPKRLEsptTFN4r8bmC+wy74aOgNkfV+i7QPndR0dgzlH90eMYD5eDMHc9 23FJfYRgKNHtIwjdPl/doT393drz+6fGrpd2E8jMUv98sgC9frRPr74cT2iJ4l7wRaEs 2BxA== 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=rRmkZleKI++MqHShCtVmRFNz1qokS1bAI2Uo/wNIcOI=; b=jsbh5Xn8C2T7sJbIvVsXP/EIPzZeM2/phBEb1on5ar39WIifGwGZFcg6zM1fJFcdll wBo5DpEDRKg3bpfLVuASp5GlmbqqSnBcYNPXKjtZfE7UfBGNzLnUxWzmTPCKyZNs5ADc uQP1rJxDYto1FZqoDLEWYk3Wf6en1Osu6IdGKW2OblBYuHBG+cVyMLaZ2SyUUE/Rga6A uCG9YM3ewFGimNeSpwix+xIomVkPVUeEaDG0iHeiITYbIfM8y/fA8uifPBhpFyOeQr6H MEWWmHtwKVhEZ9P1ZPNRavJe5xY54kOcrB7rtsv86SJWso3nCzFx2wWht8FszY0Fbfx+ +4Bg== X-Gm-Message-State: APjAAAVQRZV7DqRFoHrizeMehuRjwMQs7qCxxTtfsEWp9CjU0KZ+RURV Uw4XOklVdxXWX6f5Y0KrhEbiXSSl4ak= X-Received: by 2002:adf:f691:: with SMTP id v17mr17600194wrp.66.1551804673401; Tue, 05 Mar 2019 08:51:13 -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.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 08:51:12 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 5 Mar 2019 16:50:46 +0000 Message-Id: <20190305165051.26860-18-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 17/22] vl: Set machine ram_size, maxram_size and ram_slots earlier 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 The machine RAM attributes will need to be analyzed during the configure_accelerator() process. especially kvm_type() arm64 machine callback will use them to know how many IPA/GPA bits are needed to model the whole RAM range. So let's assign those machine state fields before calling configure_accelerator. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell Reviewed-by: Igor Mammedov Message-id: 20190304101339.25970-7-eric.auger@redhat.com Signed-off-by: Peter Maydell --- vl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/vl.c b/vl.c index 502857a1769..fd0d51320d8 100644 --- a/vl.c +++ b/vl.c @@ -4239,6 +4239,9 @@ int main(int argc, char **argv, char **envp) machine_opts = qemu_get_machine_opts(); qemu_opt_foreach(machine_opts, machine_set_property, current_machine, &error_fatal); + current_machine->ram_size = ram_size; + current_machine->maxram_size = maxram_size; + current_machine->ram_slots = ram_slots; configure_accelerator(current_machine, argv[0]); @@ -4434,9 +4437,6 @@ int main(int argc, char **argv, char **envp) replay_checkpoint(CHECKPOINT_INIT); qdev_machine_init(); - current_machine->ram_size = ram_size; - current_machine->maxram_size = maxram_size; - current_machine->ram_slots = ram_slots; current_machine->boot_order = boot_order; /* parse features once if machine provides default cpu_type */