Message ID | 20250402210328.52897-5-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp2960745wrs; Wed, 2 Apr 2025 14:05:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVwliUUSjSrlrbltncb/A7yzIv5WxsctiizDY4S0XdItM38iD5pHSVA+igbOT7upJaWcTvZnA==@linaro.org X-Google-Smtp-Source: AGHT+IEUvP7cjDbO/FPKONmIJRnxxFWFoT7jAWHei/Gju/b1MLFtKt3qFCTSt9IzxUvSYOiCf2ad X-Received: by 2002:a05:620a:17a0:b0:7c5:5cc4:ca63 with SMTP id af79cd13be357-7c690875486mr2686778985a.38.1743627948842; Wed, 02 Apr 2025 14:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743627948; cv=none; d=google.com; s=arc-20240605; b=UBf7J1Ax6SmLZJ+hZK+E23nnd20LonwagOXTtt9uSqOWqQG/WYQTzz9AQHJV653bhk 1cqYBGnENYJT3xdqH9YlbNgcyYqWpJu7Zy7NTwTnZOzu149aw0qa0MN+Gm24VuvVmOJO 9tDf7DXo+LGIn3ZCTBwZvGkZLA7/2lTDVYhan4lOtzemBWPqa1El8CduyRTWPZ5HHQR7 spnMTQK6M6Lmoy2D/6/bkn57kSY1dreBZ1FhCYSLXuH6YognzhZUdLkd0uKkliCCDfIG uUD1PfC8AhrSnLzJuqkhmUlA9rlSgd8JlOjsd9gjnLVtPzpaL7lNkJHIus4ngOJtY4gT lzCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=sxbMVhD3bEvS83tquXFpF0OjRyJof4LX4BkOe9da+FA=; fh=iFgLPkOo2znapBZMPxUhWTeP9GutQ5FWLu/oxpPIkpw=; b=QJr1s0/0XsIk8NFoCo4VvdUCFByvRBkBwbESwi4ymlYSHvoBXixAp8e+C58q8OtmR0 nq8Umgot6Py80pHZZeDYBOyHw3o4H3j8dF84ofqprJ3R7ZJoJDgEHPxFaDRNdgQeufgy MXUfwc/BTTVBkXxZd3JQqA5tQgQrfjCGLmjsH9h7UfJycKxOTIIiye0HLC6idy4yEsOM lCH5mcOX7Z+3gXA9Iu2Nh0O2pw6Rit4+MCHmjaJJ9AK1ip0AtYFIPmHBz6jMNkRgo1qr dTJLqRtk1TAOcXLR9f1Z4c55kY07UbdiMai2YkRWWC+iEsvBBj8Lka974y6LPigQqWic 7ukQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1MkhKGD; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-871a33f4993si3145877241.155.2025.04.02.14.05.48 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Apr 2025 14:05:48 -0700 (PDT) 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=f1MkhKGD; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1u05Fe-0004Jk-Jo; Wed, 02 Apr 2025 17:03:58 -0400 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 <philmd@linaro.org>) id 1u05Fb-0004I5-Vu for qemu-devel@nongnu.org; Wed, 02 Apr 2025 17:03:56 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1u05FY-00066f-LE for qemu-devel@nongnu.org; Wed, 02 Apr 2025 17:03:54 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43cf034d4abso1768485e9.3 for <qemu-devel@nongnu.org>; Wed, 02 Apr 2025 14:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743627829; x=1744232629; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sxbMVhD3bEvS83tquXFpF0OjRyJof4LX4BkOe9da+FA=; b=f1MkhKGD6UxmvSzQEBd8JH42lua/ExFFv4Du8tJ2VHPKhylNgLQ49vvvFzl8irbaIo 4NnQ+afYcS3aKlzoo52GX1migPjS4pE6uLzwSx9L4kOxrYM4h2A6CYXNUPIw+NWOx6GJ A1C0h4uMzvYLnytHTyabbKnxsNp64a28811OLnvCsQOggbDPKyaZGiRrthMPAsShE/tk sTeoLZ4ovPjusB+L1RU5GwYool5vPlX/Bfm+UKg4mmcSZEJXKpjhYxlBRrXg56sckS+a 8SXC67T89I3qYsMm+h9pFBA3+/P/XpJJ0uZxaz1Rg46/0stNyk6ixYXIxRn+fNUhMxbO 0OuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743627829; x=1744232629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sxbMVhD3bEvS83tquXFpF0OjRyJof4LX4BkOe9da+FA=; b=hxMCfvgE84ECbP//Xx68iJ4uyrfI1scsRbMJrkx9almTUs3M4oWmf2RyRRER0qiiat C0CQmzdoqQSZ6Duj63qMz9H/wc/tzJF2uh0TiVHEt4z1Ce6MW1q9kqq6nIu2Hu4xpL+A ucBw/G2y2iDmb+bvgZZHZkInQ0Me/wQvmfqHPSlT9obGQ3x+Aixp86sdng2Xb8O0ba2k 3kSIRz46ROpTpXPxrf6MWxzDbHG8M0MiBWYyDW14Q1MaWFOgNAPuajFIvo1VYWmNjt+H 1RSrKZN3kMlOd/xNOtB6jzYEUe9mdePHtav93nF2fIMzwST8pYwJvmKwvSgdoC17mTKS ysHg== X-Forwarded-Encrypted: i=1; AJvYcCUPTf8iSZB8zCyggRH9UsHuPoPU66FvpxOcFeEAOo0BoG2D39WnraXlUswVYqicwgKTELNhHkgnYTb+@nongnu.org X-Gm-Message-State: AOJu0Yyz/h8NTqqD8IgdhafofTsNEgchZljbibcB0+qM1Unaflbp1Ru1 r0ArNRiCNEO6CAL7Z6I93IU2ht4FRbiu6Vw1we8lsHIUuHgQdnvNGxQZ5TNF+jNFNuNaCXFeaoB t X-Gm-Gg: ASbGncvHhmWp0DREI4hZ53cSX83c7bFtaH+Ll6V18kP5u716/UNxD9iEaUYEOYKSuaR sIOiH1GH/LuZYl8LH+hZDsklsRFoPAzOCMB5+2Vh0/kQRCCWH2f3lzOJgI6rDdPpnOWWHmcQPR0 3sWBbqg6HRRnweZT7kxWKgejqr7OaOyP3NoZbgdJh7VTfPqnotNjNgTtsQllsiKLDPOxvlr9vvm hZP1pSrmLLb3LzATIrhgemQnViu8/UfH+tR8TDrnyjoCEuO8BgE6Y9sEn9BpViGA+/yehtt6RDJ wgQyV4zOPzSR8a2XvIPLXF29UmbMAFvaPr3hI1sWVOIjiTAe073lmsj5PbJ/69Xp/q773kIato+ nqjmIkT8iINpERcC9JOY= X-Received: by 2002:a05:600c:198b:b0:43c:ec28:d310 with SMTP id 5b1f17b1804b1-43eb5c20f9cmr39794575e9.10.1743627829448; Wed, 02 Apr 2025 14:03:49 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6656afsm17751785f8f.40.2025.04.02.14.03.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Apr 2025 14:03:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org Subject: [PATCH-for-10.1 04/43] accel/tcg: Introduce TCGCPUOps::mmu_index() callback Date: Wed, 2 Apr 2025 23:02:49 +0200 Message-ID: <20250402210328.52897-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250402210328.52897-1-philmd@linaro.org> References: <20250402210328.52897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
tcg: philmd's queue
|
expand
|
diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index f60e5303f21..106a0688da8 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -67,6 +67,9 @@ struct TCGCPUOps { /** @debug_excp_handler: Callback for handling debug exceptions */ void (*debug_excp_handler)(CPUState *cpu); + /** @mmu_index: Callback for choosing softmmu mmu index */ + int (*mmu_index)(CPUState *cpu, bool ifetch); + #ifdef CONFIG_USER_ONLY /** * @fake_user_interrupt: Callback for 'fake exception' handling. diff --git a/include/exec/cpu-mmu-index.h b/include/exec/cpu-mmu-index.h index cfc13d46bea..651526e9f97 100644 --- a/include/exec/cpu-mmu-index.h +++ b/include/exec/cpu-mmu-index.h @@ -10,6 +10,7 @@ #define EXEC_CPU_MMU_INDEX_H #include "hw/core/cpu.h" +#include "accel/tcg/cpu-ops.h" #include "tcg/debug-assert.h" #ifdef COMPILING_PER_TARGET #include "cpu.h" @@ -31,7 +32,9 @@ static inline int cpu_mmu_index(CPUState *cs, bool ifetch) # endif #endif - int ret = cs->cc->mmu_index(cs, ifetch); + const TCGCPUOps *tcg_ops = cs->cc->tcg_ops; + int ret = tcg_ops->mmu_index ? tcg_ops->mmu_index(cs, ifetch) + : cs->cc->mmu_index(cs, ifetch); tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); return ret; }