From nobody Wed Nov 27 15:45:46 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1698279522; cv=none; d=zohomail.com; s=zohoarc; b=L35bNBDZC9D/lDfsWOAlz1x79W1Xl7vJtVKyL2yPS9bg52UyoIPeZ/Kne4N9HjKKuU39F8l18CW12nxc7s36OyrUWrYszEzZ8a3KJ9mvsMUuS8rnZDNprG9Q4oayCR7EIdEyLOFRIFFvf8Dko558UzLja4Ds8wfkjKpR8lwentI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698279522; h=Content-Type: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=+FzEYXMiYUmAnzQhyJLC08QhIql51EYsnrwBv94uD9o=; b=fGnh5AxNDhQUetkSdYjVO+wlLm0qPpBU1dzj/swk6Ke1QGRVv/xPNihIZHm3JvMRHAggJwfXgVgXtA63pHOQV/gtOrvMsN3INUV7j7PEJXEmYSuEsx9wcGPHNeKaxh9ZC77QkVPFwBDrYlmW0ncd91upJ7O5XjlVqoosk4gqlbU= 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 1698279522510170.11625058222978; Wed, 25 Oct 2023 17:18:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvo2n-00072I-DZ; Wed, 25 Oct 2023 20:16:13 -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 1qvo2g-0006zc-Vx for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:16:07 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo2S-0004py-2v for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:16:06 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1ca215cc713so2017035ad.3 for ; Wed, 25 Oct 2023 17:15:51 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id ij23-20020a170902ab5700b001c582de968dsm10038433plb.72.2023.10.25.17.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279350; x=1698884150; 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=+FzEYXMiYUmAnzQhyJLC08QhIql51EYsnrwBv94uD9o=; b=TwyApiMWjqElD1rNs7/DY+fIZlwvakBGmNFSqrv5XY4LuKyYcs+vWuNiT+Ksx19kk1 0/YVUb4FdkZzGj6Gl17xU5Phv9V3eB8QUZ9NeQ7vOTo0OqLeuI5Q38YLG4BjIG7rF3YG TFaIhs4Jiko3vEK88e88inTR+iYEIJWmjQyFfR0AlAGReSbWSq2MAJxK1sopP/xNXuME 5nru8x7r4QH8bzlC5yWX2tfBT0uUHMO/0Bp67DIDcxOiD+VFS4H15hNTl3gTZtcEKNTc odkbeIScK9abROCb8H9V23WRXTGyCup7299jKq38knqywPyjEHBk24S2JcJrpdOugdPz fkGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279350; x=1698884150; 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=+FzEYXMiYUmAnzQhyJLC08QhIql51EYsnrwBv94uD9o=; b=dQHdaqDrmxxo9DwB+4/eBDET+s7WW4sGY3sowQy1oELVAMtNK191E5Js5h/nIbsrMi 4M43SPHj/xszcKIYthGyGMcE4NnpUAPNRRG50nSrd6dTl7GXqhoXqKYkH8EFdLnKaTxg ALvxQIXdapB2I52vA3HtHYrTtFlaniEmDymARZ+IxyuiBkAPMD+HGJzT/lwC8DRl3ige DPuESiJgP6zVmfQHroK7vfLsmOZXw2XakeQbgvq+NS6xHa7eX9bFon/+9WGkXEObP7yC rBb92AG9o/tPTApoU/CQ+rsHeDCK56Yorgo5xXwZV5dOgDyoF7G+58F1VHvdTkOaMm2f p2gg== X-Gm-Message-State: AOJu0YzY7S+rllE6RCwTfDwN8gKCVc8UltA3ORuwGnQJMQUuh+e6B31x a9lRkZ/5Ea1uOHBGg+9sPZcGETkLjIWlm8sKp+c= X-Google-Smtp-Source: AGHT+IEx3c8walI5+UFnhn5ZAaTBPiltDwl1eQiQ5j7HNcUeazHczOs+q380AymLSYxF36W/9/Uo5g== X-Received: by 2002:a17:902:f0c4:b0:1c8:a132:a00f with SMTP id v4-20020a170902f0c400b001c8a132a00fmr12817707pla.12.1698279349998; Wed, 25 Oct 2023 17:15:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 04/94] target/sparc: Set TCG_GUEST_DEFAULT_MO Date: Wed, 25 Oct 2023 17:13:46 -0700 Message-Id: <20231026001542.1141412-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231026001542.1141412-1-richard.henderson@linaro.org> References: <20231026001542.1141412-1-richard.henderson@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=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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: 1698279523698100013 Always use TSO, per the Oracle 2015 manual. This is slightly less restrictive than the TCG_MO_ALL default, and happens to match the i386 model, which will eliminate a few extra barriers on that host. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index b3a98f1d74..9fc5c401d2 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -6,6 +6,29 @@ #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" =20 +/* + * From Oracle SPARC Architecture 2015: + * + * Compatibility notes: The PSO memory model described in SPARC V8 and + * SPARC V9 compatibility architecture specifications was never implemen= ted + * in a SPARC V9 implementation and is not included in the Oracle SPARC + * Architecture specification. + * + * The RMO memory model described in the SPARC V9 specification was + * implemented in some non-Sun SPARC V9 implementations, but is not + * directly supported in Oracle SPARC Architecture 2015 implementations. + * + * Therefore always use TSO in QEMU. + * + * D.5 Specification of Partial Store Order (PSO) + * ... [loads] are followed by an implied MEMBAR #LoadLoad | #LoadStore. + * + * D.6 Specification of Total Store Order (TSO) + * ... PSO with the additional requirement that all [stores] are followed + * by an implied MEMBAR #StoreStore. + */ +#define TCG_GUEST_DEFAULT_MO (TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST) + #if !defined(TARGET_SPARC64) #define TARGET_DPREGS 16 #else --=20 2.34.1