From patchwork Mon Jan 29 23:30:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 767458 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1125621wro; Mon, 29 Jan 2024 15:31:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlGSZ1rFNcT3/7rD/HFXJXKsU1yrlJGzBz2SejmY8pgi0f3kd3nUnLdG8QBOBf6fmW6SSX X-Received: by 2002:ad4:5d6d:0:b0:686:261a:76a0 with SMTP id fn13-20020ad45d6d000000b00686261a76a0mr8249134qvb.52.1706571115258; Mon, 29 Jan 2024 15:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706571115; cv=none; d=google.com; s=arc-20160816; b=R2alPcKgM18bi0h10l/R+ANbjmnAV0pqYFWpdShkSvDxu/5mt/u70K73OX2DFEy50P 3aame9opVGe/VX6T0jhYFyuptSln6ZobqJdhE5SnDrZKQQoZ52wz+TcQm2m6IB3ajcqn DAVODZ8f/p30/ildz7oTeyax1CjSHUMitSNKyc4KNI4FXU8Q13XY4kAbOddylMnEgJeZ 12CRO8OtKnk3I1Jj5LYiBhk8M5JfI6Bfv9Eus31CaYNnbAhVsvveQBZ2LoMaNglrX4UX TaFKJBbOAuHJwbyRoh8atcYz5tCVUGOrdIRfoQYp1QiFW2Haq9rgJxDGpW2OK5sHx4cS tp8Q== 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=bMktE+uuI7KYrw4qy5OMTFd9gSBzokEqXN4YH9Doa28=; fh=d3q967Ss27yOZEBNWb7WV1pwIIYORDjfLhLmomzC17w=; b=wpBSZ4rez9ff1fC+MhD/+B3r6vGn9/AKBlIviNC1vygkLY2ZfwvR8q2qXxu1Pq0Jmo 0RaptsWB8/7t8fQLjvNtPvvC5/Rct3l/vceZ1gEMLZh7RdYIT0Iu4Ro6plhQtih2/ze7 Pda+2vDlN2L3MPxi9si2KVrCDBtozg0w1xEyCPvqLZjU2NLu7JOx3xqQdPS5gyrggsK8 hixyZ5cVQMwPFwrFw/PR2YlvAUWu3V+JVUrwuBRT42yrqQzvaBhNgUbYPFA+qvwPIZwD jOmSvHU51f0KaPljmqQbKX1SHxLw6MUvLd3Q8MBuyc682pzVd1JSVaeUnByOChekMSLu g+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ulsLexn3; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 8-20020a0562140d6800b0068c4d0604aesi3755021qvs.546.2024.01.29.15.31.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2024 15:31:55 -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=ulsLexn3; 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 1rUb5e-0005Qi-OT; Mon, 29 Jan 2024 18:31:05 -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 1rUb5a-0005O1-41 for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:30:54 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUb5Y-0004zm-3f for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:30:53 -0500 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1d7858a469aso17975435ad.2 for ; Mon, 29 Jan 2024 15:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706571050; x=1707175850; 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=bMktE+uuI7KYrw4qy5OMTFd9gSBzokEqXN4YH9Doa28=; b=ulsLexn3B/5d3a8Xp39zbXVqYdQgHD5Tij3M3hEdNGa5oDKQfzpXESKjVcekJsXltE Y0jXw2eMG8qhl047OwZP07HBEsgRDpxcjO/199YPruHkikBkiX9dAiMm4ry2mkFhCJ9W oaAwkVd9sJqCyoQVxkiZ2H4Clqt3NYNw5iQX+n0qMPE+sDkpx58CtXK2yP8VpUE9eX6N J1SdD89Aqt9d46SpKBWFkVZueTOhrPpUyfvw41vtSiCZpi4+F3bD3dPxBZKq/EX1akoz hAM3oJqm61u4crRFuDvJ0XYHS14y2xniDSw2doqGiOg+IqjtG48Ufirbd1EehQZTRmsj Npxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706571050; x=1707175850; 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=bMktE+uuI7KYrw4qy5OMTFd9gSBzokEqXN4YH9Doa28=; b=tdMwufN9NXQdVJjYkrMLBk/q9btK8UjUkvEShNm3Ezdhdf+8xtDQFWgvH9Of8JcK3u /Dlx4QNSNrtxstRAf5vCVDn8HJJgkOWOUR4+T9M18EiJ93+7FpvQ22WfaeeG+5OuMs7V aRFT70ZFl+sgZngMQ0/j06hfRlQ0yxeX04WJffKOM3wsUcBMpJhmAkWgcsQ292t0GuPZ Q24s5c/E7cwZppyji3fy4cgMZcjoqmZ0JWSqdO5TEy4M/ku9qC7/wiH+3Mft7TPCM6hZ IAsToEw8OqNNNkK+aOS77lG5akILWYcv+xA55+gZPh7Xo41iQG5ZCc61manzbEiLc6ph CFag== X-Gm-Message-State: AOJu0Yw2HENhipB11RNIjG865CFrypszYgIiluRg47/xTlxi4eXe5Bad 3PBlXitvfnDuO9Tu07f/f0YeIwe/NoGl1GpmaZCBPinRZJtJi1pbfllkEvCG9q/R5gKfviUmsbC F2I0= X-Received: by 2002:a17:902:7681:b0:1d6:ea58:f593 with SMTP id m1-20020a170902768100b001d6ea58f593mr3157454pll.9.1706571050282; Mon, 29 Jan 2024 15:30:50 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id l6-20020a170902eb0600b001d8dbb867b1sm2710591plb.179.2024.01.29.15.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:30:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, anjo@rev.ng Subject: [PATCH 01/33] include/hw/core: Add mmu_index to CPUClass Date: Tue, 30 Jan 2024 09:30:11 +1000 Message-Id: <20240129233043.34558-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129233043.34558-1-richard.henderson@linaro.org> References: <20240129233043.34558-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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 To be used after all targets have populated the hook. Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 2c284d6397..4385ce54c9 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -103,6 +103,8 @@ struct SysemuCPUOps; * @parse_features: Callback to parse command line arguments. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. * @has_work: Callback for checking if there is work to do. + * @mmu_index: Callback for choosing softmmu mmu index; + * may be used internally by memory_rw_debug without TCG. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. * @query_cpu_fast: @@ -150,6 +152,7 @@ struct CPUClass { void (*parse_features)(const char *typename, char *str, Error **errp); bool (*has_work)(CPUState *cpu); + int (*mmu_index)(CPUState *cpu, bool ifetch); int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, int len, bool is_write); void (*dump_state)(CPUState *cpu, FILE *, int flags);