From patchwork Tue Jul 23 20:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 813976 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2489221wro; Tue, 23 Jul 2024 13:41:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOg55+YsnwiO1wfTYPXJtOQYNTNatYmnt0+mjU0JtGb5eyLol7EN0tatE2nnsViSXiglfN35toPD6VreMongiK X-Google-Smtp-Source: AGHT+IFx8YNStGB4TCyQ/jespg24psCfiAgKfMLLh/BTRxmWrSqQtbRNoSsTrBDTwLMR8IjF8er7 X-Received: by 2002:a05:6214:40e:b0:6b7:9b14:626e with SMTP id 6a1803df08f44-6b9907feb96mr362686d6.57.1721767270922; Tue, 23 Jul 2024 13:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721767270; cv=none; d=google.com; s=arc-20160816; b=XqfsFxPbTAB0hKmHJ64fKIlVGGzno9OWlHdgKBEo/5N3x7cYaUGxHbWYRnzmJyzEtE 5JCvYk7nW0ERPul0Mk5njPjUVMtRLpOSFBikRGoptyCVnCubKvP0Ba4m+COsEFOK1dy9 PwTprSR2IO+f1v5vnpivr4GtUKBvZtHic54KKF+s2QCARr1HD4qJy5cMZH3vWoNbpO8k Yajs4Hg8ELVlhm+1P3VfjbQw/gcpP6MkwEPdStCqdVqDn1VFhXQ04+SrXjX8o1S8GJKt Rw6J9IX5owL7k5+4+aSuuEppiZbhhePuawMnWitQfaY/xg+PX8V45fxiP71bMTVRY3V9 NIew== 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=sVpySpyrjhMtcWBGxVtjyNF2MUS6wyprjn1PN1O1F+w=; fh=qtn8prgQtzf5IzCNvLChUZDElvNECP6ej9YfjQeBz3I=; b=vsLuFFPJAh58cOAP5217OEqA1aH2IbnAvgAUpw8NALnxItzVINSRoj8aQ3ejHyhm8R 6yq0douZi2FsfAa+nsKOnNMLRNURRneERSizfg9ori3XpKUkT66OUUsi5y+9PTtMfuQ9 D5MpzQSTXPzKyjXXvXp3LEBsx6xUCVtkgy6D98AVG3adFb7VSYu1jsyK9eh889nMUPhG mNpxIAum78sAcV5ivElqn9tfiA7E+Ha3aLbIuHPFZsz6Km6uwda27vzLe64UA4pzcxOV +uyAc4JvmnES5KApQX7yZldRC2TdT50MSDvqQ4KyPlB29JUO9wvdXhRnGQSKWXuBtE3P uxHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aT+LAzlu; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7ac7a2f66si112000126d6.23.2024.07.23.13.41.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2024 13:41:10 -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=aT+LAzlu; 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 ) id 1sWMHv-0003IU-3A; Tue, 23 Jul 2024 16:39:11 -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 ) id 1sWMHr-0003HS-V6 for qemu-devel@nongnu.org; Tue, 23 Jul 2024 16:39:08 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWMHq-0003un-9s for qemu-devel@nongnu.org; Tue, 23 Jul 2024 16:39:07 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4277a5ed48bso44882085e9.2 for ; Tue, 23 Jul 2024 13:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721767144; x=1722371944; 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=sVpySpyrjhMtcWBGxVtjyNF2MUS6wyprjn1PN1O1F+w=; b=aT+LAzluqB7+nCIMVw4o7j9fOk36aFCuzlxdVIbf+DA+y11sEAl8/7GFQrgSNj6eDF 8I6vUEHxE2v3YpzIo5xD9vu56ernbBJ93AkA0UU9qNwe3cTYVyLhxY+OdGb/66Ar+3vj pasLf1iK8fVUsIZj9WOHNRKrfbkEyYECzO0y3AaFPslLzgX6MVvr1goPrg9iOuG2tRpp kJk3zS9gY9GGIYOzpBYOc2RSJriJzpc2BwUKhXzHwRYbaVwxUrJRVUjy/ERTlXxBADCz qOWcI1LjRFwKtLSJzV64zeVnXfUaqNLYFLqJ5kYPEcq5Q/Th3jR5IFKiCeJ/9qAbNSf4 Y3RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721767144; x=1722371944; 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=sVpySpyrjhMtcWBGxVtjyNF2MUS6wyprjn1PN1O1F+w=; b=lI5e8sRHtgWEPOx9lfndxRm42GsSAsauatGN1opavkJQlquFTmL8EoZ9AgS9d9R3tQ g0umCQLwzbJPtHnAfPYYK4wCVYF37HCnVt3oGtEpofhop+TY4xMm7cr+MrHPVOgJMcGb t4xCNboE6R91VA/ksxFmXVwGBxeChmEIMDqP3yWUAjTGQLkgRqzukCY37Z/c/tWsaSO+ RqSt1nPDmaaKJ1FgOzC+bhPdUsmphLY8xcNOv3o2WJcbNzNhJ+sGIgHJY88+jFTVVdHL SOltvnCfgO2Hyr6U33PdKPdQN1y9cPIMEEdBK8uZ7KiKQ7A3i+fy1ySkpe0hBC4IIed+ 6Qdg== X-Gm-Message-State: AOJu0Yyc9+73fXocfIgw7mq9WRgNcKu/LczNbxbkCDLXwCZhXwg+5TrB leiZx20ut28gv2g/FiRoFAKeH/qx8ftUaWOiEEXFrMqL7FewwM3MkcosE5099+S43+/MobO67gs mjhs= X-Received: by 2002:a05:600c:4ecc:b0:426:6921:e3e5 with SMTP id 5b1f17b1804b1-427f95af393mr5855e9.24.1721767144522; Tue, 23 Jul 2024 13:39:04 -0700 (PDT) Received: from localhost.localdomain (vbo91-h01-176-184-50-4.dsl.sta.abo.bbox.fr. [176.184.50.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427f9399b13sm458445e9.27.2024.07.23.13.39.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Jul 2024 13:39:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 01/28] accel: Restrict probe_access*() functions to TCG Date: Tue, 23 Jul 2024 22:38:28 +0200 Message-ID: <20240723203855.65033-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240723203855.65033-1-philmd@linaro.org> References: <20240723203855.65033-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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: 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 This API is specific to TCG (already handled by hardware accelerators), so restrict it with #ifdef'ry. Remove unnecessary stubs. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240529155918.6221-1-philmd@linaro.org> --- include/exec/exec-all.h | 7 ++++++- accel/stubs/tcg-stub.c | 14 -------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index b6b46ad13c7..72240ef4263 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -301,6 +301,9 @@ static inline void tlb_flush_range_by_mmuidx_all_cpus_synced(CPUState *cpu, { } #endif + +#if defined(CONFIG_TCG) + /** * probe_access: * @env: CPUArchState @@ -357,6 +360,7 @@ int probe_access_flags(CPUArchState *env, vaddr addr, int size, bool nonfault, void **phost, uintptr_t retaddr); #ifndef CONFIG_USER_ONLY + /** * probe_access_full: * Like probe_access_flags, except also return into @pfull. @@ -392,7 +396,8 @@ int probe_access_full_mmu(CPUArchState *env, vaddr addr, int size, MMUAccessType access_type, int mmu_idx, void **phost, CPUTLBEntryFull **pfull); -#endif +#endif /* !CONFIG_USER_ONLY */ +#endif /* CONFIG_TCG */ static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) { diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index dd890d6cf69..7f4208fddf2 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -18,20 +18,6 @@ void tb_flush(CPUState *cpu) { } -int probe_access_flags(CPUArchState *env, vaddr addr, int size, - MMUAccessType access_type, int mmu_idx, - bool nonfault, void **phost, uintptr_t retaddr) -{ - g_assert_not_reached(); -} - -void *probe_access(CPUArchState *env, vaddr addr, int size, - MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) -{ - /* Handled by hardware accelerator. */ - g_assert_not_reached(); -} - G_NORETURN void cpu_loop_exit(CPUState *cpu) { g_assert_not_reached();