From nobody Tue Feb 10 20:48:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) client-ip=209.85.218.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1607120802; cv=none; d=zohomail.com; s=zohoarc; b=LnzbkAWjezrDjnFjWwNTnYBz6CIRWKvf27PjEnf9NguUlvBzzvn44N0MLJHAWS7N77Iw1h5pwvuK2XrvcnXw04DxebqFSTkOSYihOqWfJYrU7Wm0oSBskgxLUW4arTc16wcRmdyOS5CKOheXfSowB9LBZrdWzTklVRkZXIzKMW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607120802; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0iMc1U7Wr361oFMAzFxSwxjYvRlBdQYyBbE2x1GpfLY=; b=cSKWJShXeKVg3Diny7nPmKMgGNqvsiPeJUE/8x7NaNKWRiwNPwTeivedPkbng9OOHIk5piFZutyehfr+lP15YJdOEql6WE7zN7uuChCKxnNnbYnslWQVCX+Zk9++7ype/ViY3j+23Avtc4mwsDkb7hmokA91HRt4jk3Hm0Ykd3I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by mx.zohomail.com with SMTPS id 1607120802691137.01615426720775; Fri, 4 Dec 2020 14:26:42 -0800 (PST) Received: by mail-ej1-f65.google.com with SMTP id qw4so10869609ejb.12 for ; Fri, 04 Dec 2020 14:26:42 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (111.red-88-21-205.staticip.rima-tde.net. [88.21.205.111]) by smtp.gmail.com with ESMTPSA id lz17sm3989348ejb.19.2020.12.04.14.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 14:26:40 -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=0iMc1U7Wr361oFMAzFxSwxjYvRlBdQYyBbE2x1GpfLY=; b=cOJh4EpcQddvYd+em79PFhqU0Io2qESFHQBdQ8yxfP/tyRFNzED6DaGwchRPCMxBZi APM0Io94qqn7jnuD2SMX00YiQT/mDUSOv5wK0muE78vi3m9T0R/Rw+RcVOiNrAOzwx19 B3z/SPNsijzb772pvf8CvRHOoOF2QJYtmFBIE5TBAZRDlMegEqm+s+YnP6AVz9ivAPWi 9lr10aKIBFtGXiUTJz30YbaDfTT2/4G4jOUnBjmj9y2/wp9A6L4g826B4fDunHibYX7u SyKzPuD7dB2WqkXRZ8DDCpuBHLfkkytApuuCagNvynQbS/EVAqhilSEUdfT5Pm2H+cUV tgAA== 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=0iMc1U7Wr361oFMAzFxSwxjYvRlBdQYyBbE2x1GpfLY=; b=SEsgaIPPr7H4euIq08jvHWTEi8E3/zx8QfSjXGbTBF7HNduFhKLP33oiwcEMUfzlJq f4tGFVhBTpTezm55grzQNTRH2KEkPRVLYOzOeE/TtE8QK/maqWH1lg+fRDpq37guBaF2 HPADNgqTuVaYheq0lQkZ6dq+pIOEDeGbk+oP4I/2GQE+l5qAb6n3fKVnN6I4Z4a8DDMM uvMtn840sD9gORcwG94vGmRnoJZcEt5pb34Ssrx4jA0xmaKD4gGIGiRo6v5QRZS92+D+ RsKg14ycx8cnmGsl5ESF9in8gOmt9c9sGI17f6f9kHu1Ko+/NLD7ooVhWngcnqYdS8El rK7Q== X-Gm-Message-State: AOAM532OW2+/QigSAvitigDVw4VjNRKa2j/HiJIWGY3IbTgKwiu9UYki lI1s63zDH9ZvYECIOQ+8lnE= X-Google-Smtp-Source: ABdhPJwig11YAraxAu9UTLlVDbDCJv8YRpFzxGkxBy7pWl080A5kCOLDwhymcIaWsk0+sFRmItMK6w== X-Received: by 2002:a17:906:8c7:: with SMTP id o7mr9538671eje.413.1607120800813; Fri, 04 Dec 2020 14:26:40 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Jiaxun Yang , Huacai Chen , qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH 3/5] target/mips: Do not initialize MT registers if MT ASE absent Date: Fri, 4 Dec 2020 23:26:20 +0100 Message-Id: <20201204222622.2743175-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201204222622.2743175-1-f4bug@amsat.org> References: <20201204222622.2743175-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 --- 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