From nobody Mon Feb 9 01:36:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) client-ip=209.85.128.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607890880; cv=none; d=zohomail.com; s=zohoarc; b=S0RBDFdZC1ozsHBcNSTpxv/SEzCS1edYvD+ZBodW2TrK4l1AalQEz3dxLvdP04dK4vpQx+tkc4CI2OzSWjBSoScrxH5yQpw53r6KfbZwKzGTr9lJrOlt7O34PBv5C0RQTz6IxnHanz63sDrovGrjf8471t1oYzIGddUsWepNpR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607890880; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7Yr9a6Psm/oyHKmjhGMfMuU1IeIspGuWtps3QIVvufw=; b=PyyzFrpGNEkc1KFRUqJ7VM5GfRFU21FcDVRB81NnikK8ANA2TJL7mW4KEoSbI6MX0+dxSs8iaDBiuPzEiNuTeD+/pfD5FLqcrr5rTmagnZIZhxWMkL10yQYbqF6QMRvbgAGt8UyQ9t56UoAtbb8H7eezuGTIJINDBNShFiufqh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.zohomail.com with SMTPS id 1607890880368518.1436252498831; Sun, 13 Dec 2020 12:21:20 -0800 (PST) Received: by mail-wm1-f41.google.com with SMTP id e25so13418889wme.0 for ; Sun, 13 Dec 2020 12:21:19 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id y7sm28088689wmb.37.2020.12.13.12.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Dec 2020 12:21:17 -0800 (PST) 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=7Yr9a6Psm/oyHKmjhGMfMuU1IeIspGuWtps3QIVvufw=; b=Vn2q1Ow1BONmjF96cTF1iuZedFmZh8/Kfc3IyYU8GUDXnVkpse/tCYcuwZtedQiIuE bjkdIDpBrP1LcSAEuX82fBqYt73JXehS6eaUypgRP9CPPkUXiC6xA9aYBUlAA/FTup/z oZ1eiAZSZ/pl6LzxvDQZpSHatnOIAGUUQ9p11vZZ+KI7OHKfUYkGdMGqlPPUFdidgj9V UFFTaw659ZLAyICXt5Pzn1pl1QbZUmMDglxXYfzhBhP0u15wgDoZFJrmNTF4QEWaVWVE VV+VR3vZC4CKms5TJh60iwujuyC/XEIQH5zmEnlmhIMb2U/4M90u5G9fEPju4pAdEHax csyQ== 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=7Yr9a6Psm/oyHKmjhGMfMuU1IeIspGuWtps3QIVvufw=; b=WkJGabHdfECoQIUcrBX2wrxcne6gR3gwavhycNkjWMl5PbNEOHVCTt6eBMgr8gzHbT norvYaUKrcoaEo4AoEGpkTlGClvnt01fq21Ak8M2CWT4bOD+nGrnPR4Ef2clkJAEp8w8 S+fhK5sRoiLXkn2y5ZOhM5EtO/GBxl8YqnRpnog/Wxk9qqTfR4PXk3EIOXH7WrUaTOvU WvS1NiWd/GiZ3poLz7OSn0c71RjxIE/XDuS0KymoKnY9pa3MwTljHTYLJyXfjv06BhJx gxAAuKECEfbLaEa2g2QPTTg4DVuY81ep+GUJ5CTzW54fJZhsLt4rPHLTZT42X3tr5eEc cTvA== X-Gm-Message-State: AOAM532NBofQ1dApohpbhov6AYP36NZs7nQu+ZOnu/aFqhuctR08SCJV KhitOWsQSHAPjJ/37XWp8yY= X-Google-Smtp-Source: ABdhPJzZI3n5VAnjAGiUXhbEjHscCsJk++wli2kENHVGP8fh2ufslHZhGmxtSJPM+1FKajpsttoGSw== X-Received: by 2002:a1c:98cc:: with SMTP id a195mr24641019wme.150.1607890878540; Sun, 13 Dec 2020 12:21:18 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Aurelien Jarno , Aleksandar Rikalo , kvm@vger.kernel.org, Jiaxun Yang , Huacai Chen , Paul Burton , Richard Henderson Subject: [PULL 18/26] target/mips: Do not initialize MT registers if MT ASE absent Date: Sun, 13 Dec 2020 21:19:38 +0100 Message-Id: <20201213201946.236123-19-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201213201946.236123-1-f4bug@amsat.org> References: <20201213201946.236123-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Do not initialize MT-related config registers if the MT ASE is not present. As some functions access the 'mvp' structure, we still zero-allocate it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20201204222622.2743175-4-f4bug@amsat.org> --- target/mips/translate_init.c.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/mips/translate_init.c.inc b/target/mips/translate_init.= c.inc index 5a926bc6df3..f72fee3b40a 100644 --- a/target/mips/translate_init.c.inc +++ b/target/mips/translate_init.c.inc @@ -993,6 +993,10 @@ static void mvp_init(CPUMIPSState *env) { env->mvp =3D g_malloc0(sizeof(CPUMIPSMVPContext)); =20 + if (!ase_mt_available(env)) { + return; + } + /* MVPConf1 implemented, TLB sharable, no gating storage support, programmable cache partitioning implemented, number of allocatable and shareable TLB entries, MVP has allocatable TCs, 2 VPEs --=20 2.26.2