From nobody Sun Apr 12 13:37:25 2026 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1714568750; cv=none; d=zohomail.com; s=zohoarc; b=cELe4mWI45FwO22QJzMs4ZNG8dicuq0rA6urAX+/OgYoYFh3JqPqIWmGl1tjhZEE9fdDwSgSwqibHaIW9V/2f/d0LdXNFCA2NhrLj7io+Y3iOj+UPfnAm5FCotAM7bgKuOC5U+bQoSDjhNsrvcdOqJg8mk3cWvT8veOE0OzghTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714568750; 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=il55LV8Hp8PUPNxofA7dxyk3K7ZSDa0WSvCi9I55JJg=; b=KrgNunQCaSh/6usvI55+qrxO/q6bjd9z/HwP2cSFobMGGXkchnXemVj8TKmSXQFO3WO3VmH6bdpufmCGlHXrPpUTee9CpsignTcJuf9OrUyzA4pp6iAdihxzbhwDTZllpRYhQpTDt2jKq3hjsSEjqdVekx2Up8ZoYxplzaRNq5o= 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+importer2=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 1714568750320106.78181208609499; Wed, 1 May 2024 06:05:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s29dp-0001zH-NY; Wed, 01 May 2024 09:04:57 -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 1s29dm-0001xm-H6; Wed, 01 May 2024 09:04:54 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s29dl-0005tB-1X; Wed, 01 May 2024 09:04:54 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1eab16c8d83so54549425ad.3; Wed, 01 May 2024 06:04:52 -0700 (PDT) Received: from wheely.local0.net ([1.146.40.196]) by smtp.gmail.com with ESMTPSA id j12-20020a17090276cc00b001e41f1dda43sm24064471plt.75.2024.05.01.06.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714568691; x=1715173491; 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=il55LV8Hp8PUPNxofA7dxyk3K7ZSDa0WSvCi9I55JJg=; b=eM1Qwx2Z9rEDYOADhHSdsHmP9Pjq6ESFuNH1zlt4lOJngVi7QTttuSF+P0+vdgrY4d xVvjY3Pu6Xv6bt89vEeL2m8OaI5cdkbCAPyxYmknRyrfQwriJsO6QpES2xiDtRVSQo1P fSlZR7SW6f1Wu7GpLN5QGphM7syQBII+5GSZnH4xzb55HID2L63HTGXJmLUPeKwMRNUV yUBmUCnEyYSgIaKP0IRU+7MmtpzfxKYzdF56hPobmpPvt9PU3fiu3PDjwuo1fTwOCVUg hre52uvRDCCkMNAvvwQ9E7xxQyq3URIvihHkzWwjjdLrM8HgNqVCfOUzTSxpVa7LQXuX Jw5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568691; x=1715173491; 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=il55LV8Hp8PUPNxofA7dxyk3K7ZSDa0WSvCi9I55JJg=; b=HFJ7ZTXQArrRV506P+KJM2DxOJNbOE9cejgz/val4ZzmHis9R0inEc11u3S99OkUjE ginc9fBB21JKMUid7s3g2MLCEaKtVY6Oyomo+NCn4+HaoIPaSws3AeJWWjFgO+xhHksz X0YtccXUSnAxkDRSmHjRFWcZm6fp1lS2Qp+Nl7WTYjatLk51KMdujXNNRnk+F0y3vpST Ynfij3JebehHvYZsYI3u+6Ab/kg9oX4CO8Nav1Wc6ecB2bntpdYN2+T3NxdZzUH/fie5 Vcnn1SBjB0Iv+3rl2rrbbM04zfRBrBqWOPmf1c9XY5wx6Qdny0Uyb3D7N7KgtjnXgd7k g4/w== X-Forwarded-Encrypted: i=1; AJvYcCXpg17aWNYliBEnSxmm9u02EY3jj2slMpCvA9Rebln9pbx6uQJaKRVso5mNVILnXYc9be+W+wgrjBp066aFExG0m0wMhcw= X-Gm-Message-State: AOJu0Yxi0SpuZERdlfI01TEF8ipZolJpDb7C90mPdNc+tXXdRYf4318E RU87SpWiofSjjrduiRSiZTrdpgfuu1TklRzcoGJEk5DU4H1sSYjMOCaDMg== X-Google-Smtp-Source: AGHT+IFGbt/gTCTCxwnSR5bDblRKEmv7SW9LuMR8xShym0BC79u8jSRynRpFAIBwr+r6eUutxCviWQ== X-Received: by 2002:a17:902:c3c1:b0:1e2:6b5d:5b18 with SMTP id j1-20020a170902c3c100b001e26b5d5b18mr2203254plj.51.1714568690984; Wed, 01 May 2024 06:04:50 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , qemu-devel@nongnu.org, Daniel Henrique Barboza , "Chinmay Rath" Subject: [PATCH 2/3] target/ppc: Fix embedded memory barriers Date: Wed, 1 May 2024 23:04:33 +1000 Message-ID: <20240501130435.941189-3-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501130435.941189-1-npiggin@gmail.com> References: <20240501130435.941189-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=npiggin@gmail.com; helo=mail-pl1-x631.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1714568751529100003 Content-Type: text/plain; charset="utf-8" Memory barriers are supposed to do something on BookE systems, these were probably just missed during MTTCG enablement, maybe no targets support SMP. Either way, add proper BookE implementations. Signed-off-by: Nicholas Piggin Reviewed-by: Chinmay Rath --- target/ppc/translate/misc-impl.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate/misc-impl.c.inc b/target/ppc/translate/mi= sc-impl.c.inc index f58bf8b848..9226467f81 100644 --- a/target/ppc/translate/misc-impl.c.inc +++ b/target/ppc/translate/misc-impl.c.inc @@ -34,8 +34,7 @@ static bool trans_SYNC(DisasContext *ctx, arg_X_sync *a) */ if (!(ctx->insns_flags & PPC_MEM_SYNC)) { if (ctx->insns_flags & PPC_BOOKE) { - /* msync replaces sync on 440, interpreted as nop */ - /* XXX: this also catches e200 */ + tcg_gen_mb(bar | TCG_BAR_SC); return true; } =20 @@ -80,6 +79,7 @@ static bool trans_EIEIO(DisasContext *ctx, arg_EIEIO *a) if (!(ctx->insns_flags & PPC_MEM_EIEIO)) { if ((ctx->insns_flags & PPC_BOOKE) || (ctx->insns_flags2 & PPC2_BOOKE206)) { + tcg_gen_mb(bar | TCG_BAR_SC); return true; } return false; --=20 2.43.0