From patchwork Fri Feb 2 05:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769155 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp754584wrc; Thu, 1 Feb 2024 21:55:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6uHgwHEJHz7S3kSXIFBX1utYFy/+/ChW5floCi6YN10ggKOHbJgjMRqILIIt6Tu1q9hEK X-Received: by 2002:ac8:5854:0:b0:42b:fc96:b92a with SMTP id h20-20020ac85854000000b0042bfc96b92amr3632767qth.62.1706853354009; Thu, 01 Feb 2024 21:55:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853353; cv=none; d=google.com; s=arc-20160816; b=sH7EfnoujAG3QV5cXl36MeGbDEFpMIQ2K4y4//Wtw2JYYbb37vWfp2ojYNFuGU+Hmy YljVa1ky3IfWGvDViXIAn+8P5vCFw/F/FDw/u5evjOdlRJBNGbymEgTedMXTcIO/LQad qGH1B4vTK9JMnYVf+pokkk/njreaag9GIzRm19TMo5Qa1vl0GK375Hn/Dxu2gUNkL03h P1m4ct/3KsdhpFEa6eMj3Bhbu+g9SPAUrQQMiFSS/U1EbzhryvjIvPoqdIO6otQVLy7q oZEBxEPbW9yYJaWzgE/e5BPB7Kc5U2NiNJAGHLiYuwvEu32a///YVnBmGtA2HBB43vVx KGbw== 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=+PC40RdxCsq43L7ljbEAmMpAkaTqLbVzOzu0xDoUXTU=; fh=L25enTXrA+t0Ddp77qwvglaH6u9lMNubnmGmGm4fl0o=; b=g5XuPN5CRWFViRizIL9Zlr0FySkRRxpcNkq+CobhQFvNKMk7BpMtJqV3GnBEf4tfIk DmQS4Q7YQu4MDR6X0NysYJP3hUCM0JXyjS7ibVNRmpqgMz6e2+MAxn9/DQOTBPkHCgwt uGey/657I2aEkZIAvs8NjW9FL8Y8Peuaj4Sw9NHM3ycqCQrj2qq5qJVKJAI+CLR54zxb vO7gLzyAMNdmCw0QnrS6jMaSFtU3+OuuvbcpgnuYqmRFMGC/Ik2PplL9LVtkqzNKIC9J yepj88RqYDG2t58XvvtoTRQx341jWA/4bqTePnc6x/3tTaUfymeaynfWa7WUkfNkG6Xs HUrA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YLODSh54; 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; AJvYcCVjR4fi/NrEqVOMganTBy1rVaQfUI1c6KFwJ4bThh7XEDReyAvf0SRpxdP6DhD0OSQc4HkwaILJsTBI9y5ghLF3 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c1-20020a05622a024100b0042bf960c136si1315417qtx.41.2024.02.01.21.55.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:55:53 -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=YLODSh54; 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 1rVmSv-0001w9-AA; Fri, 02 Feb 2024 00:51:53 -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 1rVmSt-0001kj-1C for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:51 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmSr-00023x-De for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:50 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6de287449f1so1222022b3a.2 for ; Thu, 01 Feb 2024 21:51:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853108; x=1707457908; 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=+PC40RdxCsq43L7ljbEAmMpAkaTqLbVzOzu0xDoUXTU=; b=YLODSh54pKB41W2nSWh/1dk/2+Ehqt5d/h/YpDE0kv576QqSftb4hj7QudlK55drfV 0msek67w6QDVuDEvnNyNmS/L0x+267Qla0nyORXFxSzcY6P9d7Z+ktu/StBQwwE9bqRV wemLRFkNImxrtIef/Puaar9I9j+1wko3rT1jxuIia0D1NNxGZZZBxMRkQAtzrj+BuNeO amBMisSoOUdqMbi149lHXxeD0F8Wdu6hfoXk9IBret00/RProiNID79ulCL4Amk0RRLe Rpkwc5iGhjlj2tgwhBQ14yWK1/GZx2S8P3MYXbkcvWKthnNnnNdXjgEXkCDQZh7m4diD xSCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853108; x=1707457908; 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=+PC40RdxCsq43L7ljbEAmMpAkaTqLbVzOzu0xDoUXTU=; b=OOlzeSf+Xm+JOOSqF7b9WlmtrtHnun/tWPJ9auduwcnAbqXRmnGNXdtcdW8a+wmDo8 DfxH54cMumDScVysNsaryvFvR7cwm9mu2lZo46cJFcfZOLNUQsgBAdSTbNZ6KjYklBro Rkg/MWPA4fqvFAOdV/jODdMmvvf1yPBX1cAEUOgCh5YmG/A5G29bZgt2epucB4SwCEC6 7DBmkVWCtXer6U+mdt6HZFKOOyWUFD0StK09kPO3eYEGQ5tGeOUCDWdAGMRe2STgJ/DE ChwOTOBrU2TqZiLCjeHTiIFCc546J+B4AlnezInlLZc73o5fGRB6HuxtliVVSvwMqsJB nwhg== X-Gm-Message-State: AOJu0YzcWhjkyu6jbrsgoWZrl9r1sWIWJrO3ZyIViC2mUSbQeVyOjbT8 HKp9T3MKekxxdeeywM1Kaa6M471KYcsEJargWAmxH/MTZUTxIbLaQ4nuGdDMep81gRBLB5A0bM6 If0Q= X-Received: by 2002:aa7:844d:0:b0:6db:8b3a:ec0d with SMTP id r13-20020aa7844d000000b006db8b3aec0dmr7285194pfn.9.1706853108043; Thu, 01 Feb 2024 21:51:48 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:51:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 31/57] target/xtensa: Populate CPUClass.mmu_index Date: Fri, 2 Feb 2024 15:50:10 +1000 Message-Id: <20240202055036.684176-33-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::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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/xtensa/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 62020b1f33..79f91819df 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -74,6 +74,11 @@ static bool xtensa_cpu_has_work(CPUState *cs) #endif } +static int xtensa_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return xtensa_get_cring(cpu_env(cs)); +} + #ifdef CONFIG_USER_ONLY static bool abi_call0; @@ -252,6 +257,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = xtensa_cpu_class_by_name; cc->has_work = xtensa_cpu_has_work; + cc->mmu_index = xtensa_cpu_mmu_index; cc->dump_state = xtensa_cpu_dump_state; cc->set_pc = xtensa_cpu_set_pc; cc->get_pc = xtensa_cpu_get_pc;