From nobody Fri Nov 1 07:24:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1708036875; cv=none; d=zohomail.com; s=zohoarc; b=O2aGzj059QvW/uAUeDWtSrW7KO1k/s7BUSY9X5PsKMl95DuNYalLDYIlre5x45XeCjArE+i2f1m556vOMyxjUB1YBoAxoLW4/okapFIc1XCpnuFLVWYbmgjpc5rhtKOL3S8qbWSW5zNyv/VvP3uDjD+ovietjrvrgA/0uAnt038= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708036875; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=R2nCob8e/9MrOFcmg40CV49q7uI9/BynfYgCCukIYUA=; b=mYa47aB/ccvIy72UT7w0MllvnGRSr+NwUGCGld3PqU/axxgI+SvR7i3p2bQ4TBwMdFO/czNmtIebUo6vePbem8o0ViYRVHua2THqDH6O/pevDNMBqY+RjMgjpwvooOf76cRQNGU9sUGzhFDgYgT2KDGWQo+X6AmMj5pAaEsfaoc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708036875756304.014148046865; Thu, 15 Feb 2024 14:41:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rakPB-0005gp-UG; Thu, 15 Feb 2024 17:40:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rakPB-0005gd-0P for qemu-devel@nongnu.org; Thu, 15 Feb 2024 17:40:33 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rakP9-00065D-A7 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 17:40:32 -0500 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1d8ef977f1eso12362925ad.0 for ; Thu, 15 Feb 2024 14:40:30 -0800 (PST) Received: from grind.. ([177.94.15.159]) by smtp.gmail.com with ESMTPSA id j2-20020a170902758200b001db40866e25sm1733679pll.308.2024.02.15.14.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1708036829; x=1708641629; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R2nCob8e/9MrOFcmg40CV49q7uI9/BynfYgCCukIYUA=; b=Kim9+sthSJR06vc3zSoVq98sqmdVg0VVXXsJPeVqoaStr5tuP3Zr2Xdxqq+xgy1EwF LiI5szZEB6aagcLJvfmoW7/dgTWUpg4rWX9d/CtumOd+4AgOde4p6H3NIkjSyIdXhOY9 UBx2DAVD8j7nui+RodocJzBoL4lQHj2B8oVptXxsAm3a05OAb+eqFCYWSZwiVHto1+1A Jlg4g6u/RDTa2nC2+wLBGTRtMCvR1VvMOZhU4e5/xxydC+6DqWZwqSroGZip4aMBxJbZ BrdNZYKDKnj5x8O1ZJP9/rVT6Wuj91i1M4enxEJRmTN0fbCyMGpNGcyuLD4uAAtboCmM pn+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708036829; x=1708641629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R2nCob8e/9MrOFcmg40CV49q7uI9/BynfYgCCukIYUA=; b=wSgaXbNIPVueLDA3U+ir4sKlwQ3cp+MDO1IbKEmWRnhscHqPo7L7gRj467ZOR+GEpZ JGw73DVX+pvHA0/ovCG23kBeIVeDJtRQ9hWZpcvE44KFSO1nlnZeQ23A6qWQ1hmVkw21 oSHJVstHKVkVDpaEU3Q3ZvoxXjt6MCdVSDJ50cH6QXrTtgEtcPCGg9DokEdmlPskD9sw BIZHh4lkGEBZM37OmpGwse98rb3YgRNamVSLjGhBx4DcHq2LOlDj9bhH18flVHB4wew9 jUiC6dx3oPF8W97RSDls8MaXr5YhXYdrW9UcdIMZr9zsOnwgTg7pbEZ4n+EdM29rv5VW /d9g== X-Gm-Message-State: AOJu0Ywc/bDNJ1UdEi6j6WA3m3kFvexWPQkoafsl9+9MrX6agHjgSD81 Ew1chq6RuwxVjsA1s6BMLgUrlUOt+RCMSeM5QsCLUcEuioPYfuOG3DsG1e4jqvkFZGedKw6zCJk t X-Google-Smtp-Source: AGHT+IEnCYazQ8KlkmqqjJQ3FCbFoiCNy17z4ZTbct4hW7Boeopm8BdXKvTrxdbhWKTClDAhJU4ZHw== X-Received: by 2002:a17:902:7ed0:b0:1d9:a4bb:29f2 with SMTP id p16-20020a1709027ed000b001d9a4bb29f2mr2462100plb.46.1708036829017; Thu, 15 Feb 2024 14:40:29 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, Daniel Henrique Barboza Subject: [PATCH v4 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile() Date: Thu, 15 Feb 2024 19:39:50 -0300 Message-ID: <20240215223955.969568-2-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240215223955.969568-1-dbarboza@ventanamicro.com> References: <20240215223955.969568-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=dbarboza@ventanamicro.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1708036876615100003 Content-Type: text/plain; charset="utf-8" Recent changes in options handling removed the 'mmu' default the bare CPUs had, meaning that we must enable 'mmu' by hand when using the rva22s64 profile CPU. Given that this profile is setting a satp mode, it already implies that we need a 'mmu'. Enable the 'mmu' in this case. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/tcg/tcg-cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index dd5228c288..ee4c349972 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -1075,6 +1075,7 @@ static void cpu_set_profile(Object *obj, Visitor *v, = const char *name, =20 #ifndef CONFIG_USER_ONLY if (profile->satp_mode !=3D RISCV_PROFILE_ATTR_UNUSED) { + object_property_set_bool(obj, "mmu", true, NULL); const char *satp_prop =3D satp_mode_str(profile->satp_mode, riscv_cpu_is_32bit(cpu)); object_property_set_bool(obj, satp_prop, profile->enabled, NULL); --=20 2.43.0