From nobody Mon Feb 9 01:52:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1694721199; cv=none; d=zohomail.com; s=zohoarc; b=f+qGI0CMZYQI3kqIS2dBHlJUuOe+JQO6dYD11IGZLNBtafycxhLbl2THTEpxG1ZBqsJug2vq5zsDMjT3FmOKuPYp+C6xKmBtfVxzPw34/G495Rbg8WiTviyLfXa+zT8jEgCZ4dpNy+4sCIj1jq2nGr10zuz8VitwqNpZFDyCxX8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694721199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rqTzRZqnlvONF3ZM8t6uAZIEh+prXa466EdrDg1ej9c=; b=i7oy/8IIfo8AhZv1H+Kzeo22dFrF4AmASniDXGfTRUyUXKEX07saxV5m9vRsvd4SC00xX7ijyO+pmg1KbC4g1k/Z7ZBF7lpfU+QUgUx2t5kRMR38/zUga+bnZpYXCCIfj2MRpGgAyM9in4Wzk9zm0DYwfcwwr4OIzN/xw2qBP8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694721199632360.58378612467993; Thu, 14 Sep 2023 12:53:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgsOL-0005gi-1H; Thu, 14 Sep 2023 15:52:45 -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 1qgsOK-0005eA-3X for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:44 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgsOI-0006lg-KS for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:43 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-99bdcade7fbso174725866b.1 for ; Thu, 14 Sep 2023 12:52:42 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id uz3-20020a170907118300b0099cc36c4681sm1423925ejb.157.2023.09.14.12.52.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 12:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694721161; x=1695325961; 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=rqTzRZqnlvONF3ZM8t6uAZIEh+prXa466EdrDg1ej9c=; b=kf2+SrpgyHqHM2Gc3hX4ijG3xeBkFSYk4IdA16cFVmon5JM3nu7n0RFhjhuaZF7QDl 0dm1uu1Ju6eATFi+gdSvjPoz19zwdoOxJ7Ss3cIswZS79KjgJiyV+FksPynr8zB0bOQK KEIPIYnGV53K/kWYK7mcdYEAIQ+RE2vbfSeLiz4VShT5+FeWNdhSxWlQGFKFvy0LGB/b eea5X4gzwBXejlSHjk1rbq9Jhb5MkA4Yvi+ryu/I5pESFGxY9YM0R3uPQaaDl6dHAn0j 5ciI5h6GnEhTXBrZU2LqrcUEB6TkTJUsAO6WaPdDOjI7FIA/Su8E+39ASpqX2lknW7Wu AofA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694721161; x=1695325961; 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=rqTzRZqnlvONF3ZM8t6uAZIEh+prXa466EdrDg1ej9c=; b=bxGoZ+yJd6tVqCLTN70eyv3e8EQQnZemincctiW8t6Kh97wmL7NuYuF003KQ2iqST7 NH1wsZ3NqeqWuYbazO5a7lhycYluZrZ+s6NUtZ+e/6QWCYuYdR6CPCAYIEsKxhjYy4jA h2dIbQ93Qvh8NEfbL/ebwss7zpzS0/a1djYtbDn8pzkHuXyBwMwfBmSRiyaT6BhA63Ek fTn3rla9Y7kRSlfCOkWHqzPWioxPg7d2p51JECTime8YD4G3ap7avih4GeQ9H/IYpdID afENUFT4/Cos1Yl1F9zZPkwpfA6nTI/sV794dL7Qmk+V4kjEU68o6HKcY2+PLBXeGe60 AfnA== X-Gm-Message-State: AOJu0YxPe6mFW+bL/nHDZcJsFv4Yzyl6jxN3SL6eLiH13jyKn3t/u7Gg J48nQwgZ822WZyt76cvVuotBVuI4DdSSkfVvvjE= X-Google-Smtp-Source: AGHT+IFD2mXEeKb7LvmLo0tQ3i6MvQ3KLLOC4uDgyJbnHjIDcB6RpNbCfVgqydagutx8sJrj5Wb91w== X-Received: by 2002:a17:906:300c:b0:993:d5bd:a757 with SMTP id 12-20020a170906300c00b00993d5bda757mr5694413ejz.19.1694721160831; Thu, 14 Sep 2023 12:52:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Anton Johansson , Yanan Wang , Richard Henderson , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost , Marcel Apfelbaum , Daniel Henrique Barboza , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [PATCH 1/4] accel/tcg: Remove tlb_set_dirty() stub Date: Thu, 14 Sep 2023 21:52:26 +0200 Message-ID: <20230914195229.78244-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914195229.78244-1-philmd@linaro.org> References: <20230914195229.78244-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1694721201709100007 Since commit 34d49937e4 ("accel/tcg: Handle atomic accesses to notdirty memory correctly") there is only a single call to tlb_set_dirty(), within accel/tcg/cputlb.c itself where the function is defined. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Harsh Prateek Bora --- accel/stubs/tcg-stub.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index a9e7a2d5b4..f088054f34 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu) { } =20 -void tlb_set_dirty(CPUState *cpu, vaddr vaddr) -{ -} - void tcg_flush_jmp_cache(CPUState *cpu) { } --=20 2.41.0 From nobody Mon Feb 9 01:52:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1694721199; cv=none; d=zohomail.com; s=zohoarc; b=bdE7LenBJzpsiSOwwO5RTMIHDnoozkR3Ui4NDVUWnuF+JZYQmtL11nx64vbK8+BlecgEhFhxUQTeAMrQXgsGqGERXxxIaPHMpH4XCPWnOuzVKmdQj0cceE3ga02rJqiQyaKGI9ZZ60/bnL1H6DgzmDQH7mhoa+UmMUE3RQJ6NzU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694721199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=apJ9rfBp2rCZyyq835aOveYeTS1oCQzV0m60yDVlahc=; b=TfTyaCEklb+mnkIZKBrCFaJSgL4hgrT3ociVZOtb6I+bgtfBput9DkNAYJscEn8lSSJMDIAXMeULahK8WTOSnpIhxso7rmJl2NFO3OvDL+2vMbAphSaGG4Dv3wYg9y5xfVSZHaCSbTkPsd0DSqgfunN8To94mzxGs2WlzTh91Ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694721199663706.5271567997464; Thu, 14 Sep 2023 12:53:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgsOS-00066y-5L; Thu, 14 Sep 2023 15:52:52 -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 1qgsOQ-00066i-Ut for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:50 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgsOP-0006mz-DN for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:50 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-502f302b68dso78609e87.2 for ; Thu, 14 Sep 2023 12:52:48 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id z21-20020a170906241500b0099b76c3041csm1439481eja.7.2023.09.14.12.52.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 12:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694721167; x=1695325967; 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=apJ9rfBp2rCZyyq835aOveYeTS1oCQzV0m60yDVlahc=; b=GZZCPpTTYI2SNlPvEXgyhQxb2lDljhAhgdZZzf14Kw1dfoiq9cuEacXRwdZQ4TZKW2 8GEYWIpUKARMV0cWLPdZdE85m3tcf1FOmUhTFZLtkBpiqWwY+LFlu2ViTKmhSKIHSqVR LIDKzDJ9yRziQE3T8dEM2RS44ifh5nDvSMNemBcaHrkwn4Ws5XTVt9zfCvxSfZoAbGq8 d4hV+lTeKMYbru3qRSQQpK3zHbw3GsHCdisgQj8r3Fvn35myuc0FV6bGg/jj8RwLn09L 2HPY5x3FRW1sIrbGvpto0LwYOoS2fax7J0qP1oole6Gmdt8l+KWKbXK/fraOK+BCuWTj Uoag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694721167; x=1695325967; 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=apJ9rfBp2rCZyyq835aOveYeTS1oCQzV0m60yDVlahc=; b=MkpR9kBL0KQvnVvmHnNEkI+KlIFS1nCyJysR+UkDHM7TEYdIT3V05aFoSbD6UwZXFU Y+pdgr/bgRayQMlpSnuta2tlFAtLbuXHGo84zobTdbuaibI+aDUGXiny+Nhyax66aOsx wZGWWz+k31SL8zgzmh+fWybPVApA4M1aFpgJh2+whEMDuqyDtAqWvXBDGzzY52n3LcSg LbebF2RcPHjHDgTTeJY4vn1mzf2edhCTkqmyO0puClSth+7C4E638JGaJObU63npN2ey fGFRovfRGYPyeNjXGm/R1I0WSmqnQYVxmDH2MflbmmUycLHaJZnVqxLCT//jXA0tLFKo fm6Q== X-Gm-Message-State: AOJu0Yx80Tsb/GcPZyaWZI/Y55D7wAnS1F4W9QUFw9/fH/oWZGM3y2Xd gSFAYwkwBNkvcBeUmECP4LRdECbmtFZmNbez1GE= X-Google-Smtp-Source: AGHT+IEzwjo2Yjc1mK1cZMoJLogDgQ1au7Z4NgSs0HdZaeRi5JgJu0mrAZOQ0eESns0v7NAaSMYQYA== X-Received: by 2002:a05:6512:2354:b0:4fb:ca59:42d7 with SMTP id p20-20020a056512235400b004fbca5942d7mr6586346lfu.33.1694721167222; Thu, 14 Sep 2023 12:52:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Anton Johansson , Yanan Wang , Richard Henderson , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost , Marcel Apfelbaum , Daniel Henrique Barboza , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [PATCH 2/4] accel/tcg: Remove unused tcg_flush_jmp_cache() stub Date: Thu, 14 Sep 2023 21:52:27 +0200 Message-ID: <20230914195229.78244-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914195229.78244-1-philmd@linaro.org> References: <20230914195229.78244-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1694721201709100008 Since commit ba7d3d1858 ("cpu_common_reset: wrap TCG specific code in tcg_enabled()") we protect the single call to tcg_flush_jmp_cache() with a check on tcg_enabled(). The stub isn't needed anymore. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/stubs/tcg-stub.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index f088054f34..dd890d6cf6 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu) { } =20 -void tcg_flush_jmp_cache(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) --=20 2.41.0 From nobody Mon Feb 9 01:52:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1694721246; cv=none; d=zohomail.com; s=zohoarc; b=mVB1ERyl4nyWwq1ucBVGM3GtTTCT546ThLcyMgmjNyfPUtQvJCxca/9kJX/3x0VQLNqyv0v5uImY5JPqNXsBRF1XwA4O3oAWC8fQnzHLj8RDaj5AVnYVfIAW2lRs63LLHl/i+K4N7NzilJMxHXZnrNJl1XWRtDNxDAbaNkX03FA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694721246; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lC0eqEcpZkzcebyqzBpj4lWhTpO2Tul/IUzv4m4V3NM=; b=fLnwvV7iuaU+mHOViDNdpmCvZzcp7w4p9g4phuYvyWiuROxDylw6XIx86BDyezfohsgydn8AKoZRtBWJSBtv4y0NoCdJ0rkL++F1UU5MgTPCfXPbD1imQjCsUyEQsG4I2POJJtLbfHFDsxneaXSGLXMtM5GKQtvkSDl/BJZrfe4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694721246035203.84036502010235; Thu, 14 Sep 2023 12:54:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgsOY-0006JQ-IH; Thu, 14 Sep 2023 15:52: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 ) id 1qgsOX-0006IV-DX for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:57 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgsOV-0006oP-OF for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:52:57 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-52eed139ec2so1536781a12.2 for ; Thu, 14 Sep 2023 12:52:55 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id ba30-20020a0564021ade00b00525c01f91b0sm1315928edb.42.2023.09.14.12.52.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 12:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694721174; x=1695325974; 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=lC0eqEcpZkzcebyqzBpj4lWhTpO2Tul/IUzv4m4V3NM=; b=YmEhr+zix4f82ecf50zwAaci9Z9aEsISrk4hb/Wg6AfRobG9MTwq2BCUvZGOOZuoL1 oTdoQWQz4UsVO5HCBgfLgVXl6rhQBSYoCDK/kfGPRECKi8carT26ckLTbhn50Z63kUap XOvLZnR3R71IcIYuKZAFbvykZTsNGUNMged5UWTKqX8fci6FqVxlxhZMCwOJ6hyVrix8 UtgYw+j7gfVvVsIbS4yX+22JLcCHyZJ7mDuQO6rO+syDeruVdKieIHEaoCj+vTfJMpMV scJYsW3I9uQ8zt0OUuHOepDRWyab3epAHQU3xpSCtYlVbHZmet5uU2p5Z1wetkk11yzO pu1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694721174; x=1695325974; 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=lC0eqEcpZkzcebyqzBpj4lWhTpO2Tul/IUzv4m4V3NM=; b=Z3KshpOR9PlYHrBH4bIfsS6+DCagTGAIwzSbyE15LN8eX53fixB8yIV4ckk5TrREmM fT4h7WOkk0GhmRRbvqWWo36mvx48PY1+lcCqDH0kOUPCQs032inq2dMteTm8x4fRywqd fAuT2A7Yb5Dj0twit4kEFkJaa4hJa7D6ga8DeH/6gJ6pnKjmn4+Ebcrf8F8DzD+4eYVi 90xT4/W/k/PQpxWLa4rzzZ/qQl/3JmpmF1PbMKL9NsH7cCLI8MHyBBhwVTqGv+Sf8o4l 8MK1HpIq4a0msc9ku4d7CoGGqJ5W9tokQHibELOPTCm5miAOVO9ZRJBjEfX6E1FI/l8C wg8w== X-Gm-Message-State: AOJu0YxxX1povpVI2GKx+JOwrIQln9mjlOD/7I7Vc593+sqjQci1dC9L sGme4LP20pACcnKwnKffejrXX/5AYk3ZboEcOPI= X-Google-Smtp-Source: AGHT+IFwUZe+V2eUxtg9kGV8Cdl25J+77hOenL8QToVrM88NUMgWw5fkRyY6jaeKNFoxo2YbWRNqow== X-Received: by 2002:a05:6402:1355:b0:522:b929:9f01 with SMTP id y21-20020a056402135500b00522b9299f01mr5472979edw.9.1694721173836; Thu, 14 Sep 2023 12:52:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Anton Johansson , Yanan Wang , Richard Henderson , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost , Marcel Apfelbaum , Daniel Henrique Barboza , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [RFC PATCH 3/4] accel/tcg: Guard tb_flush() with tcg_enabled() and remove the stub Date: Thu, 14 Sep 2023 21:52:28 +0200 Message-ID: <20230914195229.78244-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914195229.78244-1-philmd@linaro.org> References: <20230914195229.78244-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1694721246742100001 The check on tcg_enabled() make it clearer we want this call under TCG. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/stubs/tcg-stub.c | 4 ---- cpu.c | 15 +++++++++------ gdbstub/softmmu.c | 5 ++++- hw/ppc/spapr_hcall.c | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index dd890d6cf6..7d9846f7f2 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -14,10 +14,6 @@ #include "exec/tb-flush.h" #include "exec/exec-all.h" =20 -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) diff --git a/cpu.c b/cpu.c index 0769b0b153..ce3b04f21f 100644 --- a/cpu.c +++ b/cpu.c @@ -57,12 +57,15 @@ static int cpu_common_post_load(void *opaque, int versi= on_id) cpu->interrupt_request &=3D ~0x01; tlb_flush(cpu); =20 - /* loadvm has just updated the content of RAM, bypassing the - * usual mechanisms that ensure we flush TBs for writes to - * memory we've translated code from. So we must flush all TBs, - * which will now be stale. - */ - tb_flush(cpu); + if (tcg_enabled()) { + /* + * loadvm has just updated the content of RAM, bypassing the + * usual mechanisms that ensure we flush TBs for writes to + * memory we've translated code from. So we must flush all TBs, + * which will now be stale. + */ + tb_flush(cpu); + } =20 return 0; } diff --git a/gdbstub/softmmu.c b/gdbstub/softmmu.c index 9f0b8b5497..edd13f047d 100644 --- a/gdbstub/softmmu.c +++ b/gdbstub/softmmu.c @@ -21,6 +21,7 @@ #include "sysemu/cpus.h" #include "sysemu/runstate.h" #include "sysemu/replay.h" +#include "sysemu/tcg.h" #include "hw/core/cpu.h" #include "hw/cpu/cluster.h" #include "hw/boards.h" @@ -170,7 +171,9 @@ static void gdb_vm_state_change(void *opaque, bool runn= ing, RunState state) } else { trace_gdbstub_hit_break(); } - tb_flush(cpu); + if (tcg_enabled()) { + tb_flush(cpu); + } ret =3D GDB_SIGNAL_TRAP; break; case RUN_STATE_PAUSED: diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index b7dc388f2f..306f8fdf55 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -296,7 +296,7 @@ static target_ulong h_page_init(PowerPCCPU *cpu, SpaprM= achineState *spapr, if (flags & (H_ICACHE_SYNCHRONIZE | H_ICACHE_INVALIDATE)) { if (kvm_enabled()) { kvmppc_icbi_range(cpu, pdst, len); - } else { + } else if (tcg_enabled()) { tb_flush(CPU(cpu)); } } --=20 2.41.0 From nobody Mon Feb 9 01:52:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1694721227; cv=none; d=zohomail.com; s=zohoarc; b=GMUUrVtQZSowU5OdQJwmfP70cASWXPlJZi9wgt5zE9XaASAgh/g/jp1trMswR4yAs01beX6D3GvEcC7HIDI495xkb9nPNYn2qAjAZEAYrLL7p5upRQGGI/IDpqn/KRF8DH3XmnyNsMtI5mUDcXgFpTH/NPzPXELC3KoM38MqoJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694721227; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; b=FeWyDN0MeJa6rpGfEaWDO34ED3JFyjA/DoFuys7hnkD2gjhpwcoNAiufZac3GHBQZX102FPUPT2+eboIfpNpgEHEtQsxC7Kcy0xEhgSOulHEyarixKOD4GMFxZN3aXzjF5VffeulJ3MIvUSEThqhjQf9hAynPobNhfbjZw1WhFM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694721227357656.8141310236533; Thu, 14 Sep 2023 12:53:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgsOf-0006N0-6c; Thu, 14 Sep 2023 15:53:05 -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 1qgsOe-0006MZ-Ep for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:53:04 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgsOc-0006pl-1A for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:53:04 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-31f7400cb74so1164441f8f.2 for ; Thu, 14 Sep 2023 12:53:01 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id d14-20020a50fb0e000000b00521953ce6e0sm1281656edq.93.2023.09.14.12.52.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 12:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694721180; x=1695325980; 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=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; b=FezRqLgX83XjU7AY3UAwehBVqyVGKt/1L1XDJsrKu6r84EQ3KQJvW4P6O+2UaoyMyj DeCSzyqYl3LEheCOEi25pBAJ/t0t2fhgTfd0ymRnGSpRtrMIrhU8aYH4DJQgklpliHx/ 52xsdvIEryJChhRMvE6G+kcgwcTyKNJiP4MBHjW3WBImeER0ULmrm0XNNNDbdEI1V7Q8 hprlNFkIXllWZL8fHbMqkcmhBOYmbDaatmz89Ig4DLuFZ7qqJYby6GVEdtAEhTf+3MDl jbxfEcf1vCnZKNrn5j30k8/EXdt26HICL24IejU8Rmx/TJ5iFGJQnCqcTUtyKb3DnEGO 932A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694721180; x=1695325980; 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=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; b=u2YmjiiaIrWrXDnLhJjPAslefmghjTBvUv0eKcoiC03E74ErMddSfrrZ+WhsnN3JZl HivL36QUxk3VK+HIxxnQtSMujKNwEjV8OUG9WziqOu+HoyEvxsr3+n+n+o/1qslJDfq0 8/t46t91T9NnlT04gyxyrBD3VVcD6iKCSUvf5cSpxL5Ifxu1rkHAHeGO4uNIr53X8dP8 TWbNN4W+WbOswzrWzkHMDBs19W55pbFC4/fp4Tjxd0LQPz+FS9kW4hPBmioTV4jPHSI/ qI5TJO0C0hKrN1WqZrxmHhIGa3dfDN7GfgzmrEjeZGktMFbNgJV/og/3IHnFbfcerUpe Js3w== X-Gm-Message-State: AOJu0Yy1jykqEclDIbybfQ0pyP37dTRANH5kEXXOyyEd9vn2wtL0PmtI tliQz7tTIl/6TkycB8sVtjrzNj0gaPeIY2UK1AU= X-Google-Smtp-Source: AGHT+IGj4Ouv5qBvfaJuxneNj2YWgwwDv0agb2peWcvtGj+BdDeDg6oOmuebujutYejycvmI0e+tRw== X-Received: by 2002:adf:ebc8:0:b0:31a:e6c2:770d with SMTP id v8-20020adfebc8000000b0031ae6c2770dmr5628938wrn.36.1694721180203; Thu, 14 Sep 2023 12:53:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Anton Johansson , Yanan Wang , Richard Henderson , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost , Marcel Apfelbaum , Daniel Henrique Barboza , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [RFC PATCH 4/4] accel/tcg: Keep tlb_set_dirty() internal Date: Thu, 14 Sep 2023 21:52:29 +0200 Message-ID: <20230914195229.78244-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914195229.78244-1-philmd@linaro.org> References: <20230914195229.78244-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1694721229290100001 Since commit 34d49937e4 ("accel/tcg: Handle atomic accesses to notdirty memory correctly") tlb_set_dirty() is only used (once) in the very same file it is defined... Make it static. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Harsh Prateek Bora --- include/exec/exec-all.h | 1 - accel/tcg/cputlb.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index b2f5cd4c2a..59efa7bc28 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -695,7 +695,6 @@ static inline void mmap_unlock(void) {} #define WITH_MMAP_LOCK_GUARD() =20 void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); -void tlb_set_dirty(CPUState *cpu, vaddr addr); =20 MemoryRegionSection * address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index c643d66190..fe9d702f3e 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1062,7 +1062,7 @@ static inline void tlb_set_dirty1_locked(CPUTLBEntry = *tlb_entry, =20 /* update the TLB corresponding to virtual page vaddr so that it is no longer dirty */ -void tlb_set_dirty(CPUState *cpu, vaddr addr) +static void tlb_set_dirty(CPUState *cpu, vaddr addr) { CPUArchState *env =3D cpu->env_ptr; int mmu_idx; --=20 2.41.0