From patchwork Tue Jun 30 08:13:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 279074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26813C433DF for ; Tue, 30 Jun 2020 08:15:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E089820759 for ; Tue, 30 Jun 2020 08:15:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IWTNvzae" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E089820759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqBQo-0004tc-5N for qemu-devel@archiver.kernel.org; Tue, 30 Jun 2020 04:15:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqBOW-0001N8-2y for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:32 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:40992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqBOU-0003BR-ET for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:31 -0400 Received: by mail-ed1-x544.google.com with SMTP id e22so15293430edq.8 for ; Tue, 30 Jun 2020 01:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OSSf9Gph0a3stYSRY1wq7h1jREXKNcDTLzkc58dT+HY=; b=IWTNvzaeyoV6j/pIaU0mv+Bl2VjjDxQpM6ICioJ3/uMWAKNFTBi82Ykn6nWbmOB6eo wWydP3GhoTtTSWv92frGuWg9HdP+bgCjjY+YFmOngANqzmr9JEVgtD4IRaaq83TOsRKV Z6BRZppbOXlys7sM7jax1eCvRUbdcYiywu/JuWXCcUnia4SxKNQ6X9D+ICNIkmjJUBeq EzuUUF81JaBWCTmEjluLMyO4RrWR2w4A/p0yUCAHmbvC0jakzrssqd9sxMEVqjS7cx1F GfJ6ao8RxF4ISQ4QJVIuqfO8vjDZ6XUn4guu+x0LBawhwuQFx+qMbiKtr1/tDyzy0hBt YDIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OSSf9Gph0a3stYSRY1wq7h1jREXKNcDTLzkc58dT+HY=; b=ADxkh8yK3qbkPeF5cXJFsP4b3LoK+O/eqmfXZg8GI3QVleNwKhOpnhWbL2ieBWUZe7 07CxIF8H6CaatYulH4e8k4uHQYbTp1IBC6q7Rj3KWfthM6l5omhW3h7hIQ7gWKJqqRFL rjtBNpcATmhyaBBTu96NSJeHlxzrgHZsHXCFiXNSeEzt2xaS2MZQ1RsmHjNa+gBLzG1I u1Nnm4JQjVgUtYPBJXM5KmSZx7+149xk8pkg71qsH+go4X09qm5zOkj0Q9UE/UsL8TtO 5Nd7dVx7HRkTWGYoWprssu4Misl9IMZ9rNBZNdqE2eYS6Y5bnUTKeJjWC+ZMTk1XdLAf bBrQ== X-Gm-Message-State: AOAM5302BJLLTnc8FUqHeb6i/OyjVZTSsLdT5BSUAHtQ39M1qPF1xFMm vm6XTxrqHftH8VqJ1pcMWeE= X-Google-Smtp-Source: ABdhPJw7LsmEKggCoZZx9Chvkg6R1A46LnxwDTlsUlHFIAD7RV+WMm+mcziJqlLMFlTEJ1qp/yPxrA== X-Received: by 2002:a50:9e2e:: with SMTP id z43mr22171996ede.385.1593504808362; Tue, 30 Jun 2020 01:13:28 -0700 (PDT) Received: from x1w.redhat.com (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id z1sm1425948ejb.41.2020.06.30.01.13.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 01:13:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Yunqiang Su , Aurelien Jarno , qemu-devel@nongnu.org Subject: [PATCH 3/7] hw/mips/malta: Rename 'malta' machine as 'malta-virt' Date: Tue, 30 Jun 2020 10:13:18 +0200 Message-Id: <20200630081322.19146-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200630081322.19146-1-f4bug@amsat.org> References: <20200630081322.19146-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Igor Mammedov , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We want to model the real physical Malta board. The current model does not have the physical restrictions real hardware have. Rename the current machine as 'malta-virt'. To not disrupt command line users, keep the 'malta' machine name as an alias. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 66172f0c82..f8fc567532 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1439,8 +1439,16 @@ static void malta_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); - mc->desc = "MIPS Malta Core LV"; mc->init = mips_malta_init; + mc->default_ram_id = "mips_malta.ram"; +} + +static void malta_machine_virt_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + + mc->desc = "MIPS Malta Core LV (no physical limitations)"; + mc->alias = "malta"; mc->block_default_type = IF_IDE; mc->max_cpus = 16; mc->is_default = true; @@ -1449,13 +1457,13 @@ static void malta_machine_class_init(ObjectClass *oc, void *data) #else mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf"); #endif - mc->default_ram_id = "mips_malta.ram"; } static const TypeInfo malta_machine_types[] = { { - .name = MACHINE_TYPE_NAME("malta"), + .name = MACHINE_TYPE_NAME("malta-virt"), .parent = TYPE_MALTA_MACHINE, + .class_init = malta_machine_virt_class_init, }, { .name = TYPE_MALTA_MACHINE, .parent = TYPE_MACHINE, From patchwork Tue Jun 30 08:13:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 279073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1FE9C433DF for ; Tue, 30 Jun 2020 08:16:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A731E20759 for ; Tue, 30 Jun 2020 08:16:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E7sGX8hY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A731E20759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqBR8-0005Jz-Oy for qemu-devel@archiver.kernel.org; Tue, 30 Jun 2020 04:16:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqBOW-0001OT-Vd for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:32 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:44345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqBOV-0003Ba-B3 for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:32 -0400 Received: by mail-ed1-x544.google.com with SMTP id by13so5435958edb.11 for ; Tue, 30 Jun 2020 01:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ezmv4JiTpP7X7OxAfnbPCLJGrwpvkIrxmTp8C42vD8c=; b=E7sGX8hYaQWGWAbiiJHIameMhsNpWt4kQo4fWH9YLKfqwzat64USe8HUGabBeeKI0o TGpJuX6da+FVHYOrGoSUXlm81/0q1/EkhwXc2EhmIWGizoyVc4a3JqDh7tT5ckZ7eUZM hgTYNhwcR/EB4HCuLFpFn/oscKzlCWm0LKHJ3Yc+CWHIQIVUh0akyRrIW6PWlx5UdXmn B0ac6DTSKStrj40Fee6GNnn16XVfUV30SAf3GOkNl/SJWUwse/i1PtZKdKOP8l50khd7 bTeoYyFUtP034TbAHMBruhW349Fl/Vob9JFNyek9G5nfc99snVZksQ2abDsUbqbsQnPq kCSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ezmv4JiTpP7X7OxAfnbPCLJGrwpvkIrxmTp8C42vD8c=; b=BTqhUEgWd3Spfid1siWLmMVN7yhnQdxK+U0VAMP704mWzicKJbdCwxJqFEkDVnH4L/ ml3adPH1RveISiaF1E86PkptE/LKH4R9t6O7xvpvdWCBAEBaP1yeMi+10UMhLq0z3KVl VjL2NrrypGMncANODQU7mpNUrzConDjoCwgdUUi3Fr44gdKtwW5u/OVl5mVS4j5tozqz UJqlTjlgEFCnyFTSWnPeT9ByH8LBnw1xExxbJNPxPNKWuf1beP5+T1CyR0qIPg657f6A jfIrXgr6ecGPQtRXk+nKdu1MYgpHiGoH8wkjEFFSnLCc7AIbzo63EiVgj5WNxl9h9Ew1 4McA== X-Gm-Message-State: AOAM531BAiRNErlLwePiD70qOK741IkqMyLnV6b5FqJsn4VRHn1J/5Gw Bhf9x4N0+nCignvlBASYiZc= X-Google-Smtp-Source: ABdhPJyHW9qIoDvNlErfWDN4rFRmEyLXCvyHQ8SFGSPUdARbnJwgyXjNRaiI7VHvMVCxpAtNE8y2ag== X-Received: by 2002:a05:6402:3138:: with SMTP id dd24mr22094497edb.118.1593504809516; Tue, 30 Jun 2020 01:13:29 -0700 (PDT) Received: from x1w.redhat.com (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id z1sm1425948ejb.41.2020.06.30.01.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 01:13:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Yunqiang Su , Aurelien Jarno , qemu-devel@nongnu.org Subject: [PATCH 4/7] hw/mips/malta: Introduce MaltaMachineClass::max_ramsize Date: Tue, 30 Jun 2020 10:13:19 +0200 Message-Id: <20200630081322.19146-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200630081322.19146-1-f4bug@amsat.org> References: <20200630081322.19146-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Igor Mammedov , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The maximum RAM size is tied to the machine. First add the MaltaMachineClass, and add 'max_ramsize' to it. Set it to the current value of 2 GB, and adapt the code checking for the requested RAM is usable by the machine. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index f8fc567532..1ca41b44db 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -56,6 +56,7 @@ #include "sysemu/kvm.h" #include "hw/semihosting/semihost.h" #include "hw/mips/cps.h" +#include "qemu/cutils.h" #define ENVP_ADDR 0x80002000l #define ENVP_NB_ENTRIES 16 @@ -71,6 +72,17 @@ #define MAX_IDE_BUS 2 #define TYPE_MALTA_MACHINE MACHINE_TYPE_NAME("malta") +#define MALTA_MACHINE_CLASS(klass) \ + OBJECT_CLASS_CHECK(MaltaMachineClass, (klass), TYPE_MALTA_MACHINE) +#define MALTA_MACHINE_GET_CLASS(obj) \ + OBJECT_GET_CLASS(MaltaMachineClass, (obj), TYPE_MALTA_MACHINE) + +typedef struct MaltaMachineClass { + /* Private */ + MachineClass parent_obj; + /* Public */ + ram_addr_t max_ramsize; +} MaltaMachineClass; typedef struct { MemoryRegion iomem; @@ -1232,7 +1244,7 @@ void mips_malta_init(MachineState *machine) DriveInfo *dinfo; int fl_idx = 0; int be; - + MaltaMachineClass *mmc = MALTA_MACHINE_GET_CLASS(machine); DeviceState *dev = qdev_new(TYPE_MIPS_MALTA); MaltaState *s = MIPS_MALTA(dev); @@ -1248,10 +1260,16 @@ void mips_malta_init(MachineState *machine) /* create CPU */ mips_create_cpu(machine, s, &cbus_irq, &i8259_irq); - /* allocate RAM */ - if (ram_size > 2 * GiB) { - error_report("Too much memory for this machine: %" PRId64 "MB," - " maximum 2048MB", ram_size / MiB); + /* + * The GT-64120A north bridge accepts at most 256 MiB per SCS for + * address decoding, so we have a maximum of 1 GiB. We deliberately + * ignore this physical limitation. + */ + if (ram_size > mmc->max_ramsize) { + char *maxsize_str = size_to_str(mmc->max_ramsize); + error_report("Too much memory for this machine: %" PRId64 " MiB," + " maximum %s", ram_size / MiB, maxsize_str); + g_free(maxsize_str); exit(1); } @@ -1446,6 +1464,7 @@ static void malta_machine_class_init(ObjectClass *oc, void *data) static void malta_machine_virt_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); + MaltaMachineClass *mmc = MALTA_MACHINE_CLASS(oc); mc->desc = "MIPS Malta Core LV (no physical limitations)"; mc->alias = "malta"; @@ -1457,6 +1476,7 @@ static void malta_machine_virt_class_init(ObjectClass *oc, void *data) #else mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf"); #endif + mmc->max_ramsize = 2 * GiB; } static const TypeInfo malta_machine_types[] = { @@ -1467,6 +1487,7 @@ static const TypeInfo malta_machine_types[] = { }, { .name = TYPE_MALTA_MACHINE, .parent = TYPE_MACHINE, + .class_size = sizeof(MaltaMachineClass), .class_init = malta_machine_class_init, .abstract = true, } From patchwork Tue Jun 30 08:13:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 279072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A581BC433E0 for ; Tue, 30 Jun 2020 08:19:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E61C20759 for ; Tue, 30 Jun 2020 08:19:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IejZtuCP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E61C20759 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqBTy-0001OP-Mj for qemu-devel@archiver.kernel.org; Tue, 30 Jun 2020 04:19:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqBOa-0001WG-Gf for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:36 -0400 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:33008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqBOZ-0003Ce-4y for qemu-devel@nongnu.org; Tue, 30 Jun 2020 04:13:36 -0400 Received: by mail-ed1-x543.google.com with SMTP id h28so15330989edz.0 for ; Tue, 30 Jun 2020 01:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SGZ0w3GX0Fw/UVCGFTciL1Am4/K0WbWSFkFzf/a5Yeg=; b=IejZtuCP8CBNQ7wNJEVzMD8vn1uEh1LCzfmTf9kxt02JkzXHnUaxxrm+Pw6bIys1pF 4YB9Fk7Nl5++TiyQDzXJcG/xHADMf3+t2bvROAxnNlRQDO638q9nZrB7R1h5jH9R5u/J vm7OhiwD+LPQfG7kKw5t0IfAnefG/aBceTyzHfjGnCj83cNAOLedfWclIHjUuaoL54Qc 2Au6HwrOePFkFSXwyDKGznRbwFDttKvhidQUC2iqbhbwbF6PZSUylSH8LBCpjX2IdgCn Y6M0j9MiBbDNS9/eq1RvEGlerIj/wwZSfO+lOR62bz51cMpPUUeMAvFlBIJ/McXDYX+8 gUHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SGZ0w3GX0Fw/UVCGFTciL1Am4/K0WbWSFkFzf/a5Yeg=; b=fURXUFgEenwbNDQVHl/yBhqjSY7yejRVK3L9pkiHBSUNqIsNu3gMs3RqvKHe5CxpyP bQGd3CeWSUdIH22y1qHSZ9b8CZjhfx4kpKKhkCMkGEz8lEXY3EGSd7LPU/iC+8zt2UNs zSiilw7SgZCiUCft/SkZjIxw9MR3bfh05mbLjMQ0I0GHIGxB1T1lyWrAxUDXbGJsW227 eAgFR0A3DowlHeiawoAAUts/Q40mwMIvJRgiGYbAso8Myj5u/o2y+FMVM14wWrqp8tmk 8mnLY2J8AY58AmIFTn0RADWwqEPhs/zC411ME7/SoQTMWXIpA7xDO1ZF+D9CD6wAtHkc F0dQ== X-Gm-Message-State: AOAM530mI4iTIJX1L0kLwPUjL+oZcgXDFb2uYD7HsFfW4qvvXMjkVPC+ iXau96KCJFLB27zszjWRf7U= X-Google-Smtp-Source: ABdhPJwFqCJKU5niLQVN0c7TBAtNOKfShqVHK68LWoGS0k6IOSwRVGQBfd/K8pFvZfsIt+P9eRhFYw== X-Received: by 2002:a05:6402:17f6:: with SMTP id t22mr22447564edy.141.1593504813883; Tue, 30 Jun 2020 01:13:33 -0700 (PDT) Received: from x1w.redhat.com (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id z1sm1425948ejb.41.2020.06.30.01.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 01:13:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Yunqiang Su , Aurelien Jarno , qemu-devel@nongnu.org Subject: [PATCH 7/7] hw/mips/malta: Allow more than 2GB on 64-bit malta-virt Date: Tue, 30 Jun 2020 10:13:22 +0200 Message-Id: <20200630081322.19146-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200630081322.19146-1-f4bug@amsat.org> References: <20200630081322.19146-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Igor Mammedov , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Since we don't respect the hardware restrictions, there is no good reason to limit the maximum amount of RAM to 2GB. Suggested-by: Yunqiang Su Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 5768b88183..277cbc0303 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1482,10 +1482,11 @@ static void malta_machine_virt_class_init(ObjectClass *oc, void *data) mc->is_default = true; #ifdef TARGET_MIPS64 mc->default_cpu_type = MIPS_CPU_TYPE_NAME("20Kc"); + mmc->max_ramsize = 3 * GiB; #else mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf"); -#endif mmc->max_ramsize = 2 * GiB; +#endif } static void malta_machine_phys_class_init(ObjectClass *oc, void *data)