From patchwork Fri Feb 2 05:49:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769140 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp753779wrc; Thu, 1 Feb 2024 21:52:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqgjCR1Qrjtlo6EQKx9uoQxDtqmTAnImKukmQKDAlvI1EO93RqIWvFUwl2DVWKt66iUFe3 X-Received: by 2002:ac8:5c47:0:b0:42c:514:7dcf with SMTP id j7-20020ac85c47000000b0042c05147dcfmr466469qtj.20.1706853168561; 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=vMmf0/Y3o5ZGc89+NpqgVetVKw+2Xa+Os+l0vj93C+c8kN3OjQAM2nsxXYv6Dfzxza a/ENVRSoYdQ5RblVY7fpIFo+jKP8Dx0IljdB+/lfChFlrXDKD5wWvbB1Rm6Pgmu002my Ytdy2SaY3ubqUOPtsW43Xtc/WQaLLb+RjrTAUffcHWKkPXzraWlnYgDCNcA1LxFaisDS RVvNlATTCi2zw5vcXCUtm5HmF+Mf668b5rMNJCChJNex0mzhTzPOoOdQwDsCa2/48u82 YkI0XCd5hcU4e+/iwMM6VuAmQBPoT/EhEObpco96BcZ0QJ06cFl+PueptgmlcD1LlG2j dyHw== 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=PumilLrArPZLdXkeLrIHmsOcHqv6B2J+77pEclyDIK0=; fh=kEv85UWq73edIQGfaB+mLb5BRrDb1qOO2oVYmd4u5OI=; b=nqyq2tB2TYKp5uWlHfuDBREcNQy9Et/6BHA/Lpg/AbaOfAE2NBhEFE+BD9OwkZRRjr MLPqV2CykXy2r61JCVu8DNnd3mZdyLccxQ2d7ZdayeMkQKVaCpBDqVXzcrUPIx/orNYZ BKzmG3v+aYfnpCkdOumqLryyD9rxV7FyqBoTUfJ6Uza2U4M/AM30RTSb3mp3c3fL2Fyb VAd//0oxyXGM0DuHZUwa784aVDvZ75ppWvOs+Ii3xA9iI41XY1g7dlrTzKO64vNH8ybM /pt2ji91aMHr1iAnm99bYJOTI8f/D3PP7l5sRGWpzM960rAZqqE7p83UL1oh+k7HM2Yw g1Ng==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mHeK0vW7; 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; AJvYcCVAAy16aaSULn7BMfPqUFzfi7KYlz8axgTgmD+iE2U6prqssingycBRVJ/yxjnw3pY7Kld8t1UEdsXru1TJyPaT Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n3-20020a05622a11c300b0042aa67b8051si1283824qtk.466.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=mHeK0vW7; 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 1rVmRr-000124-Op; Fri, 02 Feb 2024 00:50:47 -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 1rVmRp-00011l-Nr for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:45 -0500 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmRo-0001aA-5t for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:45 -0500 Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3be6ff4f660so1016763b6e.3 for ; Thu, 01 Feb 2024 21:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853043; x=1707457843; 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=PumilLrArPZLdXkeLrIHmsOcHqv6B2J+77pEclyDIK0=; b=mHeK0vW7SeG8bGL4TCIaLkRjZpA1J6cqgtRKNOCopJ8UsPmpe1y4bSlXG3ONzYhfVX 99M8yeuzulnov4Xv4s7OoIOrQofevMLO3dg7/4iiyFf4uwrTmjQH4HCzT/VJA0BY8h2A g/iJaXQVXcVGnsALy0V/PIVcO8F5Zh9rO91E5+XjNx9euAm/sci1M08F97TP/ggOWJS5 HkPQydM0rA400wO2AxRi6e+JZ2tMNmYzwrPbhJcU/yAfHqIqWbMsk8gL2f9N2puj0BDn 38GXkNHGAzOnelTpZBmCZubhfFqCxxCbUhEjHUuZBHmnW3DBaTRE5Ep4iC7gzhZzTigt kLWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853043; x=1707457843; 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=PumilLrArPZLdXkeLrIHmsOcHqv6B2J+77pEclyDIK0=; b=KIz6OXBUw0D7n4h+AzPGoGhOZuFZ5CKU8nOhiZhJGbG4P4IMgqB45qilZ+AEwtl4Ia 1MPrZPlPVAYeTzey1VMVOqirK7mqdFUqsIiJgq9fB1nd6Z4wtpCPg9jADKZPcGjiaSCw 6m6dyq7WvmPAwbqD8wYHnxuhvCOl11f3T3cs8wpzdNje4P3MuNy+4jbZzQtW9L2oo1XS JKdwzcokcKKLkY64pKng5W/3t+xqNPtuWQBKZ2GwEd0bruQMQtSXwjeGsivojl8c3a/n iKWrOW977CWiUadxoTXuADm2mCukkmYoXdEOCi5HU6O16x5tszXIciHeMOKC1toQUHe2 wxdg== X-Gm-Message-State: AOJu0Yw2aAXgN1400DUNCh1lWFy9+tQ2aqCqfruBaHsvwqHoYCG8tbZS rQu1vMDTLqA3R8Mw+MUCOx2D9AelezTJBAQMGkewLzW170GRssgQqyAOj2Z6IkPAvT1go9kzfpj /KRU= X-Received: by 2002:a05:6808:4493:b0:3bd:e392:fab9 with SMTP id eq19-20020a056808449300b003bde392fab9mr1737515oib.38.1706853042852; Thu, 01 Feb 2024 21:50:42 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:50:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 01/57] include/hw/core: Add mmu_index to CPUClass Date: Fri, 2 Feb 2024 15:49:39 +1000 Message-Id: <20240202055036.684176-2-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::234; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x234.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. Reviewed-by: Philippe Mathieu-Daudé 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);