From nobody Tue May 21 20:45:59 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1711603963; cv=none; d=zohomail.com; s=zohoarc; b=j4SKyCA438dkorTaTSpDgpBZjSCoB6p007qsbHYgJTAYDSqD7B0Hv3ziKpoMue1WtWnuZRAXl09P4y3uKxVGcUeEGL+jEIHTcnmEXUxmPwJ9ptaQGinbsITGxBsmsC7uMRGX8tY3Ya5fxjdClJxInXlzSYUwgcXh2Dz7xGS7g+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711603963; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T0C6uoCntyN/0GokSPADPgOAyPjNhHghNpUBgAoFP4U=; b=RKGvgimbnChc5x6JyehQUxFR1f9WjYMshASVjwEviK+2kMIfo5Rfj6czYrZJp6upc+u5UKn8ArL3r1b+GXvLhN7IfrMCIpUnzC/hyyU1MAnFnfl58fdzNte7txUYSQLLEqhBqVF7onykQJE+Biu9VfTa6d9H9jUVjhHezQ0I9Pc= 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 1711603963779848.80789776786; Wed, 27 Mar 2024 22:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpiMd-0000qc-J5; Thu, 28 Mar 2024 01:31:47 -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 1rpiMb-0000pq-IZ; Thu, 28 Mar 2024 01:31:45 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpiMa-0008S3-1p; Thu, 28 Mar 2024 01:31:45 -0400 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso366256a12.3; Wed, 27 Mar 2024 22:31:43 -0700 (PDT) Received: from wheely.local0.net ([118.210.97.62]) by smtp.gmail.com with ESMTPSA id d13-20020a170902654d00b001e211a290efsm535018pln.132.2024.03.27.22.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 22:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711603902; x=1712208702; 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=T0C6uoCntyN/0GokSPADPgOAyPjNhHghNpUBgAoFP4U=; b=bQ+y+lyN0RuwuANq17zvhbj5eV42Zu51bnQuW8RYwPmImt+ibkwYvq7HkkMA/MwS+U BJm1xwfcAYBqQdyy7oCJwyi8s2UAPPC7h0sOGVGfDVMOTxGRVUAILvKheYNpHZ0XOLLU 9vpKcL0CaodqTe1nBvrXMbO34f8bIUwqJTQP7U+H2pcriq5TUvGexjNfCtrG7tPaRwDy hZboxuSfvcsXVTLES5JHXfRQ5h9EbrXm26LuPic9psYJsyKlKm/JPqA4/Juukob0VvIi rZm9aquWwEW7PHYN4DntHz4E+FU4aovHHSQhJTYUceB9xHEyEsNfh4iU1Rf7NEIKyLRv 4JhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711603902; x=1712208702; 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=T0C6uoCntyN/0GokSPADPgOAyPjNhHghNpUBgAoFP4U=; b=ITzEKMhSxYYKb7eztouXvuDTKzEf2SWtxt2Z7siEqMT3N37az2Wn4fVSD0JGvwWEuX 7JWJ4NH1H2dvhYxGrhSuvizWazll+WlkUioENLe3aTh9a+hWbN0atn+IxCuUaTuSdPTU 1EOEFl9gN28P2YCzvuDb1BKvjI6PzI7V+Tig5Yn2zJkDXySYW48BIJjXCzXEdfx6SmzN 6sZhgXfwyMSCYgKmy+07qNWw6euBbzeZFfoO0z02S5jtvyNCHqhrE/PYOTcGgoFSy4AB 98L30cdvRZLro8pe/LGc2ZkAD/AjwKQqXf9MAx0DWgh0DWqa4dvr+q8360CtInHzQs9a SPjQ== X-Forwarded-Encrypted: i=1; AJvYcCVsMbIEH6PZewuItUWP5Z0jsMGR5jgi1P3tSr074epoPA9wjbv1cWMbaXhLETjYrAK/HZ7369NjB1421GXgcO9Q91cYU+A= X-Gm-Message-State: AOJu0YyiMgNwmltTyaQCQkQ6eKDIFJq76j2tu+cfp0gUwnTgfRRTkLfU Jj9CMVBK/ZRQajO0BKdRMtkCM51qpOux86n5BVqpCR9poYuTjscojyI5eXenKfM= X-Google-Smtp-Source: AGHT+IFZV6dYx36Jc/qGdv0whH7h/uJ2rH08JcyqgQzfaLOlXKIL1xk0en7E0dpiUK3djCKSLgJkUw== X-Received: by 2002:a17:902:6807:b0:1e0:2f59:524c with SMTP id h7-20020a170902680700b001e02f59524cmr1663244plk.37.1711603901926; Wed, 27 Mar 2024 22:31:41 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 1/3] target/ppc: Fix broadcast tlbie synchronisation Date: Thu, 28 Mar 2024 15:31:29 +1000 Message-ID: <20240328053131.2604454-2-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240328053131.2604454-1-npiggin@gmail.com> References: <20240328053131.2604454-1-npiggin@gmail.com> MIME-Version: 1.0 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=2607:f8b0:4864:20::529; envelope-from=npiggin@gmail.com; helo=mail-pg1-x529.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1711603965500100015 Content-Type: text/plain; charset="utf-8" With mttcg, broadcast tlbie instructions do not wait until other vCPUs have been kicked out of TCG execution before they complete (including necessary subsequent tlbsync, etc., instructions). This is contrary to the ISA, and it permits other vCPUs to use translations after the TLB flush. For example: CPU0 // *memP is initially 0, memV maps to memP with *pte *pte =3D 0; ptesync ; tlbie ; eieio ; tlbsync ; ptesync *memP =3D 1; CPU1 assert(*memV =3D=3D 0); It is possible for the assertion to fail because CPU1 translates memV using the TLB after CPU0 has stored 1 to the underlying memory. This race was observed with a careful test case where CPU1 checks run in a very large expensive TB so it can run for the entire CPU0 period between clearing the pte and storing the memory. It's normally very difficult to hit, but preemption of host vCPU threads could trigger the race anywhere. Signed-off-by: Nicholas Piggin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/ppc/helper_regs.c | 2 +- target/ppc/mmu_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c index 25258986e3..9094ae5004 100644 --- a/target/ppc/helper_regs.c +++ b/target/ppc/helper_regs.c @@ -334,7 +334,7 @@ void check_tlb_flush(CPUPPCState *env, bool global) if (global && (env->tlb_need_flush & TLB_NEED_GLOBAL_FLUSH)) { env->tlb_need_flush &=3D ~TLB_NEED_GLOBAL_FLUSH; env->tlb_need_flush &=3D ~TLB_NEED_LOCAL_FLUSH; - tlb_flush_all_cpus(cs); + tlb_flush_all_cpus_synced(cs); return; } =20 diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index c071b4d5e2..aaa5bfc62a 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -533,7 +533,7 @@ void helper_tlbie_isa300(CPUPPCState *env, target_ulong= rb, target_ulong rs, if (local) { tlb_flush_page(env_cpu(env), addr); } else { - tlb_flush_page_all_cpus(env_cpu(env), addr); + tlb_flush_page_all_cpus_synced(env_cpu(env), addr); } return; =20 --=20 2.42.0 From nobody Tue May 21 20:45:59 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1711603963; cv=none; d=zohomail.com; s=zohoarc; b=gfJILkvDRodroSnfdYjwGyj7jqfAvCy4x5xRPQeBFXOH7mdgXDPqEkXD1wznAfaxnBRFWZoY0g+x9HOxo2y8/77Lt5LL3O+pd8wtKlW8Zh/fG2QyCPsHGrL42zSbrza86Pg4Oz1Kv1hcGh/OA/kf/MBRJD5COkSxmI2EpU9NlUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711603963; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZLe7MoYc/51z8mNQf8kAXAmjjbRb31oNJF+RZzZQ1zM=; b=liNd+Kna4rIX2ofCJ/1Bc9KKfGqvoalv8Mp491hSCTMPctteoPBGFKpNGD/zNWeANowd9vwjLHUONMngTYDSHuGq70ErBzO1FwNTyS+aSUoMPdcmyeSN+ZN14dn6eDcWdYSJyfcQGDKdw6Nio3fTJpAS1K9UDeuZNMKaz1xSS4Y= 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 1711603963152951.8016846147457; Wed, 27 Mar 2024 22:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpiMi-0000rj-DX; Thu, 28 Mar 2024 01:31: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 1rpiMf-0000rC-MG; Thu, 28 Mar 2024 01:31:49 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpiMd-0008U6-6g; Thu, 28 Mar 2024 01:31:49 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso341872a12.2; Wed, 27 Mar 2024 22:31:46 -0700 (PDT) Received: from wheely.local0.net ([118.210.97.62]) by smtp.gmail.com with ESMTPSA id d13-20020a170902654d00b001e211a290efsm535018pln.132.2024.03.27.22.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 22:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711603905; x=1712208705; 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=ZLe7MoYc/51z8mNQf8kAXAmjjbRb31oNJF+RZzZQ1zM=; b=WQdriyA7bAiN+qpWKJ9TkQmZXm2Y5ak2DDWJiYkxWdpvBmiU41goI7sZXDOilYb+5s 8Ttdn/31cpodHEcwJk8UFFFfEZtP9QZDdqhhB2z2oTNoJo+iorE9zKWRRyxmfmcsBVw0 W/Y1dQly86n50gvI7Q3a1HW3Qsehf7LXujwUkRiuE1QeVwcOo05x9uGk/DGvn3n3Iz8C k8MBI7FZkqtUy0flNNgPbXuj1vR30/AQc0b1zF9RcFg3z0DYffs3t2ET2o+tZWXCd1M5 mbIeh53pR6JXUXxYVUBQdlMSg8LTcxhoR5uQPHJdOB0VOsX6Gzn9HQhnvmI31+3pGDCa nPGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711603905; x=1712208705; 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=ZLe7MoYc/51z8mNQf8kAXAmjjbRb31oNJF+RZzZQ1zM=; b=cCX8AcvRTVim3z8Lboe2CtfWWQXmRdCRiCUI2t+Vp7IxsVoRkiCtkSui+nedbls3cZ AEJoYaV5UjyCu5t7YavtVdgP6r5HmFWnS8o2FRa8cU9sbl+XytLGsktQzi3ireVczxO5 ZbOnuqTPs96Y8qBrf6aqWAPfF0/V9o6muX75Jx3Vb5mFf8KSw8NTXHMDhyDC/vcuuIsX R8BCt414XZyJSm8zFViLZyqSnCmXB1QLfCKrxT2bOBgdiK5C79kNssfI1ILHhek2FnBK cfRWO+suGd+EE0vBOE2aD/fPIW3PCD83ybasutYfR+UNCkneAE0ceOZD9Ljm2jLTQzbM XIJA== X-Forwarded-Encrypted: i=1; AJvYcCV+KIGtV+S67+X0REcq3qTKcl8Mqad7v2Bxws8FBmXw5yoAY6RmW1pgU3J1NHpxLcKjWHwjgofP6+LiI+DJpGZpZmA0Ymg= X-Gm-Message-State: AOJu0Yyew9Ynkq3AippBkSGYCtMxFOEpZ73VRskBsEe6syM65XvqMGSe SVjU4PMczwTGv9MitIwT3yS3ij8MXkX2IPYSsQ9j14anOfH1EJzkB9mSVJ39G3U= X-Google-Smtp-Source: AGHT+IGABe57sLDM47Kk6bBspIS9HKK3Pr3gbAtTj8hqghXshy5wiDcy/f+YlLQzxMkHSaOSwOmksg== X-Received: by 2002:a17:902:ea09:b0:1db:8fd6:915e with SMTP id s9-20020a170902ea0900b001db8fd6915emr1979836plg.33.1711603905170; Wed, 27 Mar 2024 22:31:45 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 2/3] tcg/cputlb: Remove non-synced variants of global TLB flushes Date: Thu, 28 Mar 2024 15:31:30 +1000 Message-ID: <20240328053131.2604454-3-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240328053131.2604454-1-npiggin@gmail.com> References: <20240328053131.2604454-1-npiggin@gmail.com> MIME-Version: 1.0 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=2607:f8b0:4864:20::530; envelope-from=npiggin@gmail.com; helo=mail-pg1-x530.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1711603963963100005 Content-Type: text/plain; charset="utf-8" These are no longer used. Signed-off-by: Nicholas Piggin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/devel/multi-thread-tcg.rst | 13 ++-- include/exec/exec-all.h | 97 +++++------------------------- accel/tcg/cputlb.c | 103 -------------------------------- 3 files changed, 19 insertions(+), 194 deletions(-) diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.= rst index 1420789fff..d706c27ea7 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -205,15 +205,10 @@ DESIGN REQUIREMENTS: =20 (Current solution) =20 -We have updated cputlb.c to defer operations when a cross-vCPU -operation with async_run_on_cpu() which ensures each vCPU sees a -coherent state when it next runs its work (in a few instructions -time). - -A new set up operations (tlb_flush_*_all_cpus) take an additional flag -which when set will force synchronisation by setting the source vCPUs -work as "safe work" and exiting the cpu run loop. This ensure by the -time execution restarts all flush operations have completed. +A new set of tlb flush operations (tlb_flush_*_all_cpus_synced) force +synchronisation by setting the source vCPUs work as "safe work" and +exiting the cpu run loop. This ensures that by the time execution +restarts all flush operations have completed. =20 TLB flag updates are all done atomically and are also protected by the corresponding page lock. diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 3e53501691..7cf9faa63f 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -66,24 +66,15 @@ void tlb_destroy(CPUState *cpu); */ void tlb_flush_page(CPUState *cpu, vaddr addr); /** - * tlb_flush_page_all_cpus: + * tlb_flush_page_all_cpus_synced: * @cpu: src CPU of the flush * @addr: virtual address of page to be flushed * - * Flush one page from the TLB of the specified CPU, for all + * Flush one page from the TLB of all CPUs, for all * MMU indexes. - */ -void tlb_flush_page_all_cpus(CPUState *src, vaddr addr); -/** - * tlb_flush_page_all_cpus_synced: - * @cpu: src CPU of the flush - * @addr: virtual address of page to be flushed * - * Flush one page from the TLB of the specified CPU, for all MMU - * indexes like tlb_flush_page_all_cpus except the source vCPUs work - * is scheduled as safe work meaning all flushes will be complete once - * the source vCPUs safe work is complete. This will depend on when - * the guests translation ends the TB. + * When this function returns, no CPUs will subsequently perform + * translations using the flushed TLBs. */ void tlb_flush_page_all_cpus_synced(CPUState *src, vaddr addr); /** @@ -96,19 +87,14 @@ void tlb_flush_page_all_cpus_synced(CPUState *src, vadd= r addr); * use one of the other functions for efficiency. */ void tlb_flush(CPUState *cpu); -/** - * tlb_flush_all_cpus: - * @cpu: src CPU of the flush - */ -void tlb_flush_all_cpus(CPUState *src_cpu); /** * tlb_flush_all_cpus_synced: * @cpu: src CPU of the flush * - * Like tlb_flush_all_cpus except this except the source vCPUs work is - * scheduled as safe work meaning all flushes will be complete once - * the source vCPUs safe work is complete. This will depend on when - * the guests translation ends the TB. + * Flush the entire TLB for all CPUs, for all MMU indexes. + * + * When this function returns, no CPUs will subsequently perform + * translations using the flushed TLBs. */ void tlb_flush_all_cpus_synced(CPUState *src_cpu); /** @@ -123,27 +109,16 @@ void tlb_flush_all_cpus_synced(CPUState *src_cpu); void tlb_flush_page_by_mmuidx(CPUState *cpu, vaddr addr, uint16_t idxmap); /** - * tlb_flush_page_by_mmuidx_all_cpus: + * tlb_flush_page_by_mmuidx_all_cpus_synced: * @cpu: Originating CPU of the flush * @addr: virtual address of page to be flushed * @idxmap: bitmap of MMU indexes to flush * * Flush one page from the TLB of all CPUs, for the specified * MMU indexes. - */ -void tlb_flush_page_by_mmuidx_all_cpus(CPUState *cpu, vaddr addr, - uint16_t idxmap); -/** - * tlb_flush_page_by_mmuidx_all_cpus_synced: - * @cpu: Originating CPU of the flush - * @addr: virtual address of page to be flushed - * @idxmap: bitmap of MMU indexes to flush * - * Flush one page from the TLB of all CPUs, for the specified MMU - * indexes like tlb_flush_page_by_mmuidx_all_cpus except the source - * vCPUs work is scheduled as safe work meaning all flushes will be - * complete once the source vCPUs safe work is complete. This will - * depend on when the guests translation ends the TB. + * When this function returns, no CPUs will subsequently perform + * translations using the flushed TLBs. */ void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, uint16_t idxmap); @@ -158,24 +133,15 @@ void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUStat= e *cpu, vaddr addr, */ void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap); /** - * tlb_flush_by_mmuidx_all_cpus: + * tlb_flush_by_mmuidx_all_cpus_synced: * @cpu: Originating CPU of the flush * @idxmap: bitmap of MMU indexes to flush * - * Flush all entries from all TLBs of all CPUs, for the specified + * Flush all entries from the TLB of all CPUs, for the specified * MMU indexes. - */ -void tlb_flush_by_mmuidx_all_cpus(CPUState *cpu, uint16_t idxmap); -/** - * tlb_flush_by_mmuidx_all_cpus_synced: - * @cpu: Originating CPU of the flush - * @idxmap: bitmap of MMU indexes to flush * - * Flush all entries from all TLBs of all CPUs, for the specified - * MMU indexes like tlb_flush_by_mmuidx_all_cpus except except the source - * vCPUs work is scheduled as safe work meaning all flushes will be - * complete once the source vCPUs safe work is complete. This will - * depend on when the guests translation ends the TB. + * When this function returns, no CPUs will subsequently perform + * translations using the flushed TLBs. */ void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *cpu, uint16_t idxmap); =20 @@ -192,8 +158,6 @@ void tlb_flush_page_bits_by_mmuidx(CPUState *cpu, vaddr= addr, uint16_t idxmap, unsigned bits); =20 /* Similarly, with broadcast and syncing. */ -void tlb_flush_page_bits_by_mmuidx_all_cpus(CPUState *cpu, vaddr addr, - uint16_t idxmap, unsigned bits= ); void tlb_flush_page_bits_by_mmuidx_all_cpus_synced (CPUState *cpu, vaddr addr, uint16_t idxmap, unsigned bits); =20 @@ -213,9 +177,6 @@ void tlb_flush_range_by_mmuidx(CPUState *cpu, vaddr add= r, unsigned bits); =20 /* Similarly, with broadcast and syncing. */ -void tlb_flush_range_by_mmuidx_all_cpus(CPUState *cpu, vaddr addr, - vaddr len, uint16_t idxmap, - unsigned bits); void tlb_flush_range_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, vaddr len, @@ -288,18 +249,12 @@ static inline void tlb_destroy(CPUState *cpu) static inline void tlb_flush_page(CPUState *cpu, vaddr addr) { } -static inline void tlb_flush_page_all_cpus(CPUState *src, vaddr addr) -{ -} static inline void tlb_flush_page_all_cpus_synced(CPUState *src, vaddr add= r) { } static inline void tlb_flush(CPUState *cpu) { } -static inline void tlb_flush_all_cpus(CPUState *src_cpu) -{ -} static inline void tlb_flush_all_cpus_synced(CPUState *src_cpu) { } @@ -311,20 +266,11 @@ static inline void tlb_flush_page_by_mmuidx(CPUState = *cpu, static inline void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap) { } -static inline void tlb_flush_page_by_mmuidx_all_cpus(CPUState *cpu, - vaddr addr, - uint16_t idxmap) -{ -} static inline void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, uint16_t idxma= p) { } -static inline void tlb_flush_by_mmuidx_all_cpus(CPUState *cpu, uint16_t id= xmap) -{ -} - static inline void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *cpu, uint16_t idxmap) { @@ -335,12 +281,6 @@ static inline void tlb_flush_page_bits_by_mmuidx(CPUSt= ate *cpu, unsigned bits) { } -static inline void tlb_flush_page_bits_by_mmuidx_all_cpus(CPUState *cpu, - vaddr addr, - uint16_t idxmap, - unsigned bits) -{ -} static inline void tlb_flush_page_bits_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, uint16_t idxmap, unsigned bi= ts) @@ -351,13 +291,6 @@ static inline void tlb_flush_range_by_mmuidx(CPUState = *cpu, vaddr addr, unsigned bits) { } -static inline void tlb_flush_range_by_mmuidx_all_cpus(CPUState *cpu, - vaddr addr, - vaddr len, - uint16_t idxmap, - unsigned bits) -{ -} static inline void tlb_flush_range_by_mmuidx_all_cpus_synced(CPUState *cpu, vaddr addr, vaddr len, diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 93b1ca810b..8ff3aa5e50 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -379,21 +379,6 @@ void tlb_flush(CPUState *cpu) tlb_flush_by_mmuidx(cpu, ALL_MMUIDX_BITS); } =20 -void tlb_flush_by_mmuidx_all_cpus(CPUState *src_cpu, uint16_t idxmap) -{ - const run_on_cpu_func fn =3D tlb_flush_by_mmuidx_async_work; - - tlb_debug("mmu_idx: 0x%"PRIx16"\n", idxmap); - - flush_all_helper(src_cpu, fn, RUN_ON_CPU_HOST_INT(idxmap)); - fn(src_cpu, RUN_ON_CPU_HOST_INT(idxmap)); -} - -void tlb_flush_all_cpus(CPUState *src_cpu) -{ - tlb_flush_by_mmuidx_all_cpus(src_cpu, ALL_MMUIDX_BITS); -} - void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *src_cpu, uint16_t idxma= p) { const run_on_cpu_func fn =3D tlb_flush_by_mmuidx_async_work; @@ -604,46 +589,6 @@ void tlb_flush_page(CPUState *cpu, vaddr addr) tlb_flush_page_by_mmuidx(cpu, addr, ALL_MMUIDX_BITS); } =20 -void tlb_flush_page_by_mmuidx_all_cpus(CPUState *src_cpu, vaddr addr, - uint16_t idxmap) -{ - tlb_debug("addr: %016" VADDR_PRIx " mmu_idx:%"PRIx16"\n", addr, idxmap= ); - - /* This should already be page aligned */ - addr &=3D TARGET_PAGE_MASK; - - /* - * Allocate memory to hold addr+idxmap only when needed. - * See tlb_flush_page_by_mmuidx for details. - */ - if (idxmap < TARGET_PAGE_SIZE) { - flush_all_helper(src_cpu, tlb_flush_page_by_mmuidx_async_1, - RUN_ON_CPU_TARGET_PTR(addr | idxmap)); - } else { - CPUState *dst_cpu; - - /* Allocate a separate data block for each destination cpu. */ - CPU_FOREACH(dst_cpu) { - if (dst_cpu !=3D src_cpu) { - TLBFlushPageByMMUIdxData *d - =3D g_new(TLBFlushPageByMMUIdxData, 1); - - d->addr =3D addr; - d->idxmap =3D idxmap; - async_run_on_cpu(dst_cpu, tlb_flush_page_by_mmuidx_async_2, - RUN_ON_CPU_HOST_PTR(d)); - } - } - } - - tlb_flush_page_by_mmuidx_async_0(src_cpu, addr, idxmap); -} - -void tlb_flush_page_all_cpus(CPUState *src, vaddr addr) -{ - tlb_flush_page_by_mmuidx_all_cpus(src, addr, ALL_MMUIDX_BITS); -} - void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *src_cpu, vaddr addr, uint16_t idxmap) @@ -835,54 +780,6 @@ void tlb_flush_page_bits_by_mmuidx(CPUState *cpu, vadd= r addr, tlb_flush_range_by_mmuidx(cpu, addr, TARGET_PAGE_SIZE, idxmap, bits); } =20 -void tlb_flush_range_by_mmuidx_all_cpus(CPUState *src_cpu, - vaddr addr, vaddr len, - uint16_t idxmap, unsigned bits) -{ - TLBFlushRangeData d; - CPUState *dst_cpu; - - /* - * If all bits are significant, and len is small, - * this devolves to tlb_flush_page. - */ - if (bits >=3D TARGET_LONG_BITS && len <=3D TARGET_PAGE_SIZE) { - tlb_flush_page_by_mmuidx_all_cpus(src_cpu, addr, idxmap); - return; - } - /* If no page bits are significant, this devolves to tlb_flush. */ - if (bits < TARGET_PAGE_BITS) { - tlb_flush_by_mmuidx_all_cpus(src_cpu, idxmap); - return; - } - - /* This should already be page aligned */ - d.addr =3D addr & TARGET_PAGE_MASK; - d.len =3D len; - d.idxmap =3D idxmap; - d.bits =3D bits; - - /* Allocate a separate data block for each destination cpu. */ - CPU_FOREACH(dst_cpu) { - if (dst_cpu !=3D src_cpu) { - TLBFlushRangeData *p =3D g_memdup(&d, sizeof(d)); - async_run_on_cpu(dst_cpu, - tlb_flush_range_by_mmuidx_async_1, - RUN_ON_CPU_HOST_PTR(p)); - } - } - - tlb_flush_range_by_mmuidx_async_0(src_cpu, d); -} - -void tlb_flush_page_bits_by_mmuidx_all_cpus(CPUState *src_cpu, - vaddr addr, uint16_t idxmap, - unsigned bits) -{ - tlb_flush_range_by_mmuidx_all_cpus(src_cpu, addr, TARGET_PAGE_SIZE, - idxmap, bits); -} - void tlb_flush_range_by_mmuidx_all_cpus_synced(CPUState *src_cpu, vaddr addr, vaddr len, --=20 2.42.0 From nobody Tue May 21 20:45:59 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1711603963; cv=none; d=zohomail.com; s=zohoarc; b=efXbsbBrF08/vhXdNITBLbesGrDhhu32NBGfVGVSGBGWYNOjiZ+g6CQuwuuYMglrCxOf4dgj3j1mBXAa/pu2nTh3CBtxcEOn4Bs9TlPH+04NUaaRNPWnpSB5jXifpOT2NbWwtFt7DEK5xY+z9N+OpKCM/dLv3woHrIzpPAwwXqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711603963; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uLSWb/szZO14hNBwYoBx42bH9NiuYRFQa5Hxq4e8oD4=; b=MmmV3yt0t7WNVC1wTBREZdaJ72RrWOfvmqhIo9oLB8Wl7LiWCwKxCdGPsSsb78ORnkeG4gGxw0dzyXJhgU4hipzJOfpcIqVYa18EZo7VZpyq46PMh5Y7L4G9SG7Tl/BHZoEeWroU76bZz/esUgtGWTzmog0bjKzGwKOXAL/RjMw= 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 1711603963085756.1726233600274; Wed, 27 Mar 2024 22:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpiMk-0000sk-V3; Thu, 28 Mar 2024 01:31:54 -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 1rpiMi-0000ru-IN; Thu, 28 Mar 2024 01:31:52 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0: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 1rpiMg-0008VQ-9i; Thu, 28 Mar 2024 01:31:52 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1def89f0cfdso13283105ad.0; Wed, 27 Mar 2024 22:31:49 -0700 (PDT) Received: from wheely.local0.net ([118.210.97.62]) by smtp.gmail.com with ESMTPSA id d13-20020a170902654d00b001e211a290efsm535018pln.132.2024.03.27.22.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 22:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711603908; x=1712208708; 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=uLSWb/szZO14hNBwYoBx42bH9NiuYRFQa5Hxq4e8oD4=; b=WUFiubUO4lt7xB4Wi5M+iIUJmTUTTkked/WNNfDP4FhKCKFSD7+NQlz7O9FQbQaV31 TdG7T+IJcuZ15/DFlmqeu0KctqekqbFn7LlGlJvmnZ4KLP2NPDa3/SW4x3lXF+bFOXa4 N0oiaFh/BqeRfBrk9lUoqeW27FYFpknXAJuTaaoNEK7rf8DtjmNHvoMZpeuZUi0ujta2 7TNaPztKS8KfFiDCvIhK9OgwS4FM04G5y16dcG6gzwhuPOYV6j1aDIVbP6hRWdxGoVXm KqgR16qergsJsfUj2UxUV4JgTlXReQL5mXCXEvHTUV5A9bU8t0n1Jar/UyEMuCRNnu/m qeig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711603908; x=1712208708; 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=uLSWb/szZO14hNBwYoBx42bH9NiuYRFQa5Hxq4e8oD4=; b=lXrAJheRJiIVS/yR4DfmFJQo3ziU0KIwD2hfH1k3Tpm9cAMJP/pV2QEoLW8aeX3HRi KQvAp+0l4Wq/imdRknlRf4Y4hZ8h9qgAoD5u1GF/Y3N9o/dy69/tLG+9PjbGkUkxWSSM ds77wuN5Gv9L3OFoZ4pbhoagfhgisC07E74fjCjgRKrLwO/SRvFuc9gVx/Ym9tUQesEz lutKIrXSjGEM6oHyOqJecAeaYyBBtHhgAZEe7vI1rbphSMTjCCfZmseZNH7uR2AeEczp lBDAXN8atHYJvcqsLIurjLYiImluk/MBqA1lszff78ywn9GJvD/vnutVz1FQL63Pr1aS 18Qw== X-Forwarded-Encrypted: i=1; AJvYcCVxoWuhuyHZIcbGXRC2mPcXYJq/UJScsSVnEWx/KE9KU+KdbHK90MB6Pb+BVfdGqbtvjS99kAXlnb4tkNxMge56ebp8ayw= X-Gm-Message-State: AOJu0Yyl2N5nCaBToP44o3ZfN9uwi5m0u6r4L0wlpxhH5A3Rg01WDUTN iqfHK/4v9CqaLGqo272GyFiQZL7o/4MH5AecFrrM1Tr38JhUW00ocfoJLc6eiPc= X-Google-Smtp-Source: AGHT+IGafdWMaGmL0SPjbl4VrdLio07q9TGTKSzybTEYvmIYMP+TlL4kQF35w9Y687ZKYjN2f+Ovtw== X-Received: by 2002:a17:902:d511:b0:1dd:8ed:997d with SMTP id b17-20020a170902d51100b001dd08ed997dmr1849716plg.3.1711603908216; Wed, 27 Mar 2024 22:31:48 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 3/3] tcg/cputlb: remove other-cpu capability from TLB flushing Date: Thu, 28 Mar 2024 15:31:31 +1000 Message-ID: <20240328053131.2604454-4-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240328053131.2604454-1-npiggin@gmail.com> References: <20240328053131.2604454-1-npiggin@gmail.com> MIME-Version: 1.0 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=2607:f8b0:4864:20::62e; envelope-from=npiggin@gmail.com; helo=mail-pl1-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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1711603963922100002 Content-Type: text/plain; charset="utf-8" Some TLB flush operations can flush other CPUs. The problem with this is they used non-synced variants of flushes (i.e., that return before the destination has completed theflush). Since all TLB flush users need the synced variants and the last user of the non-synced flush was buggy, this is a footgun waiting to go off. There do not seem to be any callers that flush other CPUs, so remove the capability. Signed-off-by: Nicholas Piggin --- accel/tcg/cputlb.c | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 8ff3aa5e50..1fe6def280 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -366,12 +366,9 @@ void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxma= p) { tlb_debug("mmu_idx: 0x%" PRIx16 "\n", idxmap); =20 - if (cpu->created && !qemu_cpu_is_self(cpu)) { - async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work, - RUN_ON_CPU_HOST_INT(idxmap)); - } else { - tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap)); - } + assert_cpu_is_self(cpu); + + tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap)); } =20 void tlb_flush(CPUState *cpu) @@ -560,28 +557,12 @@ void tlb_flush_page_by_mmuidx(CPUState *cpu, vaddr ad= dr, uint16_t idxmap) { tlb_debug("addr: %016" VADDR_PRIx " mmu_idx:%" PRIx16 "\n", addr, idxm= ap); =20 + assert_cpu_is_self(cpu); + /* This should already be page aligned */ addr &=3D TARGET_PAGE_MASK; =20 - if (qemu_cpu_is_self(cpu)) { - tlb_flush_page_by_mmuidx_async_0(cpu, addr, idxmap); - } else if (idxmap < TARGET_PAGE_SIZE) { - /* - * Most targets have only a few mmu_idx. In the case where - * we can stuff idxmap into the low TARGET_PAGE_BITS, avoid - * allocating memory for this operation. - */ - async_run_on_cpu(cpu, tlb_flush_page_by_mmuidx_async_1, - RUN_ON_CPU_TARGET_PTR(addr | idxmap)); - } else { - TLBFlushPageByMMUIdxData *d =3D g_new(TLBFlushPageByMMUIdxData, 1); - - /* Otherwise allocate a structure, freed by the worker. */ - d->addr =3D addr; - d->idxmap =3D idxmap; - async_run_on_cpu(cpu, tlb_flush_page_by_mmuidx_async_2, - RUN_ON_CPU_HOST_PTR(d)); - } + tlb_flush_page_by_mmuidx_async_0(cpu, addr, idxmap); } =20 void tlb_flush_page(CPUState *cpu, vaddr addr) @@ -744,6 +725,8 @@ void tlb_flush_range_by_mmuidx(CPUState *cpu, vaddr add= r, { TLBFlushRangeData d; =20 + assert_cpu_is_self(cpu); + /* * If all bits are significant, and len is small, * this devolves to tlb_flush_page. @@ -764,14 +747,7 @@ void tlb_flush_range_by_mmuidx(CPUState *cpu, vaddr ad= dr, d.idxmap =3D idxmap; d.bits =3D bits; =20 - if (qemu_cpu_is_self(cpu)) { - tlb_flush_range_by_mmuidx_async_0(cpu, d); - } else { - /* Otherwise allocate a structure, freed by the worker. */ - TLBFlushRangeData *p =3D g_memdup(&d, sizeof(d)); - async_run_on_cpu(cpu, tlb_flush_range_by_mmuidx_async_1, - RUN_ON_CPU_HOST_PTR(p)); - } + tlb_flush_range_by_mmuidx_async_0(cpu, d); } =20 void tlb_flush_page_bits_by_mmuidx(CPUState *cpu, vaddr addr, --=20 2.42.0