From patchwork Fri Feb 2 05:49:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769141 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp753781wrc; Thu, 1 Feb 2024 21:52:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAgZWnFnMpxJyKiPo1UfZKULVmDPCppE5qxFQTjlXufkxLfaqNtAcxaHiBh+9uDyhN1rgw X-Received: by 2002:a05:620a:88e:b0:783:e15d:6203 with SMTP id b14-20020a05620a088e00b00783e15d6203mr4476692qka.78.1706853168850; Thu, 01 Feb 2024 21:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853168; cv=none; d=google.com; s=arc-20160816; b=BUJoN0QEykuBJPtJSbMp7rRmxXro+gI/o8jazTc/fHiZgLdpW54PsPyqcHEhZC6GDW AC2PhaeCAlz64/CMHZtQbyX4VSs/Nrs4guGSva7eTh/cJn1YSOjoekv2lxVRQkrG3FKt Zipc565+QYOXApPKno4fgKLjgdsweUtzUzHBAfnbHJCOpQcETnUG77oz4rWL2aaUSjGb Ybo4bWjKHYKM5U7VhkMO2mdIxiFz9uguQDnVHXE8QZVgN1AXf/f3oZn7/LOryM7p2SOT gdYQuDCTykHmK1bk6RRX1EXHPhr0FnvJBPXnWU6D00DwUNVkSoRl+BOLFIqUT+mvzgla ONqw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WpvGm1ZOSIrRSWyUglC1Pj/o+FPeCdOCNoH6m6RTCKg=; fh=ZY+tPPLd89hyOEYS9EvghMnubKh5pPNAAanWaHlfrIo=; b=bw6jDlu9CW4R8XD6WBevIDVfnnHWLXSzQXQcL3uUh5Ia8d7jGapnCElkfWAA5Ci3YX fHClvUMtFJi3ixWC0yO5ks3GQjTfVz3xBuqaacgTMxj+V728r+Qz25FlP+9pxzVvIvny zNdfbyWjSif3BdkOTYN8d2U1CrQUDqSzjzdY/6Ji3jwGaUDCoGue76him4cuS+7/nZnV a3yyGF92KXg2IKxvfY9MkIF2crCDMK9d4fHRPxxGIj61CkrbHpDf/snJ6Qn6UUODyS/k MuwiQGPfwhHO4/ONYISu3wMaKnr1VIF2YkAym4+AOgk2lujl30I7nGekpHsx8N2QbHGE hsww==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fCBi/Tm4"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=0; AJvYcCWvZunz8A+5Qe1xCDm1KYJV/G6R6RMHKVtu/8dWMOCDm5m4Ubr/wnIuMHPd8U/6w+CvaWahCR5uGcRq8COQcvLC Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r9-20020a05620a298900b00785559a18besi712753qkp.26.2024.02.01.21.52.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:52:48 -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=pass header.i=@linaro.org header.s=google header.b="fCBi/Tm4"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmSf-0001O0-UK; Fri, 02 Feb 2024 00:51:38 -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 1rVmSQ-0001Fp-01 for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:22 -0500 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmSN-0001nN-5A for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:20 -0500 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3bbbc6b4ed1so1213673b6e.2 for ; Thu, 01 Feb 2024 21:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853078; x=1707457878; 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=WpvGm1ZOSIrRSWyUglC1Pj/o+FPeCdOCNoH6m6RTCKg=; b=fCBi/Tm4Sv9Tdp44IbojyCcYZDBxh30cQhQ4YcotWfDeR6y5yolyFnmY8aCbQCnXe3 Z7e1L8KSUWjnpLsvxhV509uwm/7rxCyxUoQS6SPxzp1TEW69SEMzhBSjydFkNhUqrCY/ kDzwQtysn4FD6Pt5tEtY29BfHzWgsG8/JBhueQzPjKpmcu3ZzLn/DvbhDWPs9cxr4IMh /tbA7O7AL1gh1PNstcbR61BCxHJCdpLvXMImK5AydJebSORvkNpPMVPm41NhPFzsQ3fh m+uhUe24hEN9fVvZ0GdAi4RDS3WeBm44elHoX/OSWxD2TphiZsk2uFPkA/JnGfOAiqoJ dfQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853078; x=1707457878; 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=WpvGm1ZOSIrRSWyUglC1Pj/o+FPeCdOCNoH6m6RTCKg=; b=KH1EXYIaKFeFIubmECuI6a+ZHK5WCi5/8WoP1HQIZ3Bjawh/9BUus3EGFiFu+qUebN a+fbDi/Nfhqq7SD6/G2DGAfFOj0jnoE3iJ95LvjizbzxM1iXhseudd76iYqLVOhst7Dq lkEam9bTMLxQEu2T3u4u6L/3iI5goHssUn0rwZs90uiUGeJJ23HmxwGAeqzmf9FWcLbj qnhNk+mxhaL1f3Ms6L9fM2mDqufudfjHaLGGDqqEMYQbuvR5PUTkLYIXRyX1t2YIbISN b+8tgmLetq37tBOd2LSyemc14wrPYB04qicbTjq6xyPkH0H6ThBmd0wlLNmaJjJBN1mC P5vw== X-Gm-Message-State: AOJu0Yw2O4tJyqarqJrvGpRAd5VDN3Htatm53JeTRQbvLoQAMz3jM2LO oBz07bd9DvkqvzmT4W/WbrXEqv52+byiSLWa/ef1zPvRMinmQIf0yYBhkJjmToDLRjZ2qmYizVP Z+fA= X-Received: by 2002:a05:6808:13d3:b0:3bf:78b4:8c66 with SMTP id d19-20020a05680813d300b003bf78b48c66mr4822462oiw.40.1706853078104; Thu, 01 Feb 2024 21:51:18 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:51:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 17/57] target/mips: Populate CPUClass.mmu_index Date: Fri, 2 Feb 2024 15:49:56 +1000 Message-Id: <20240202055036.684176-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x231.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=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index df544ab39b..d644adbc77 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -182,6 +182,11 @@ static bool mips_cpu_has_work(CPUState *cs) return has_work; } +static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) +{ + return mips_env_mmu_index(cpu_env(cs)); +} + #include "cpu-defs.c.inc" static void mips_cpu_reset_hold(Object *obj) @@ -579,6 +584,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) cc->class_by_name = mips_cpu_class_by_name; cc->has_work = mips_cpu_has_work; + cc->mmu_index = mips_cpu_mmu_index; cc->dump_state = mips_cpu_dump_state; cc->set_pc = mips_cpu_set_pc; cc->get_pc = mips_cpu_get_pc;