[{"id":1758817,"web_url":"http://patchwork.ozlabs.org/comment/1758817/","msgid":"<03c05a60-d697-500b-c2fc-d99b24f3f64c@twiddle.net>","list_archive_url":null,"date":"2017-08-28T17:57:25","subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","submitter":{"id":2222,"url":"http://patchwork.ozlabs.org/api/people/2222/","name":"Richard Henderson","email":"rth@twiddle.net"},"content":"On 08/27/2017 08:53 PM, Pranith Kumar wrote:\n> diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h\n> index 55a46ac825..b41a248bee 100644\n> --- a/tcg/aarch64/tcg-target.h\n> +++ b/tcg/aarch64/tcg-target.h\n> @@ -117,4 +117,6 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n>      __builtin___clear_cache((char *)start, (char *)stop);\n>  }\n>  \n> +#define TCG_TARGET_DEFAULT_MO (0)\n> +\n>  #endif /* AARCH64_TCG_TARGET_H */\n\nPlease add all of these in one patch, separate from the tcg-op.c changes.\nWe should also just make this mandatory and remove any related #ifdefs.\n\n> +void tcg_gen_req_mo(TCGBar type)\n\nstatic, until we find that we need it somewhere else.\n\n> +#if defined(TCG_GUEST_DEFAULT_MO) && defined(TCG_TARGET_DEFAULT_MO)\n> +    TCGBar order_mismatch = type & (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO);\n> +    if (order_mismatch) {\n> +        tcg_gen_mb(order_mismatch | TCG_BAR_SC);\n> +    }\n> +#else\n> +    tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);\n> +#endif\n\nHmm.  How about\n\nstatic void tcg_gen_reg_mo(TCGBar type)\n{\n#ifdef TCG_GUEST_DEFAULT_MO\n    type &= TCG_GUEST_DEFAULT_MO;\n#endif\n#ifdef TCG_TARGET_DEFAULT_MO\n    type &= ~TCG_TARGET_DEFAULT_MO;\n#endif\n    if (type) {\n        tcg_gen_mb(type | TCG_BAR_SC);\n    }\n}\n\nJust because one of those is undefined doesn't mean we can't infer tighter\nbarriers from the others, including the initial value of TYPE.\n\n>  void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)\n>  {\n> +    tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_LD_ST);\n>      memop = tcg_canonicalize_memop(memop, 0, 0);\n\nYou're putting the barrier before the load, so that should be\n\n  TCG_MO_LD_LD | TCG_MO_ST_LD\n\ni.e.  TCG_MO_<any>_<current op>\n\nIf you were putting the barrier afterward (an equally reasonable option), you'd\nreverse that and use what you have above.\n\n\nr~","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Mfzj584A\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xh2hr57KTz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 06:01:30 +1000 (AEST)","from localhost ([::1]:41287 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmQDt-0005IN-CM\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 16:01:25 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35866)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dmOI6-0006f8-HE\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 13:57:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dmOI1-00077c-Jn\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 13:57:38 -0400","from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]:33591)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <rth7680@gmail.com>)\n\tid 1dmOI1-00076j-Eo; Mon, 28 Aug 2017 13:57:33 -0400","by mail-io0-x244.google.com with SMTP id s101so887165ioe.0;\n\tMon, 28 Aug 2017 10:57:32 -0700 (PDT)","from bigtime.twiddle.net ([172.56.42.6])\n\tby smtp.googlemail.com with ESMTPSA id\n\tg20sm243312itb.21.2017.08.28.10.57.27\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 28 Aug 2017 10:57:29 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=qfUUuZ85ZNgir7XkdARO4NCsxrdRBfR315bqf96jk8A=;\n\tb=Mfzj584AeJ9+xxw2St/xQs+LRmxfAEUQzmBIVRkoi+/WwLA0Ur0O619/cjmyIwfOhz\n\toRXIRHq5dOtM37WbP8WOlYlHFeOmnpq29nIAh2zAcKKz3juh8CtZfUY2F9TyCSZjlFAl\n\twvURsxD2/p5etQ7xt+MT1qOfo8fZkutcqvxpN/2pbqoQf7mX6HS/IZ0LVCXqmWVyRv6G\n\tYUMy9jc/n+qrfkb58sihYqrih9kDiK5FHO0GHUyEYOX1uDnitU8xRrlVcd9i7FAi4OQ6\n\tUkVbbR2qr+z09yuk90ALO9nff0D0he104CE0JD0wuhXPf+wtuUX6WFtSdx3wpm7Dl86U\n\tU2jw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=qfUUuZ85ZNgir7XkdARO4NCsxrdRBfR315bqf96jk8A=;\n\tb=mA6Az1OxLW6RpKqUhgNG1OLOiikVtvYpwv9Eg2TL8whLLOLUPBYiiNtRhJrX0v1kKk\n\tiwQEeQYkEiFF7WjIQAVR+dd/HCypnQQKUZVXvoHA64aF8cLJaJc95BeG+fvKEDP+0vi6\n\t0bhRF56dzPFil8RmYNIQ4UH0KsfA6cZhrBsX5R+ZNuXfSDCuGIr0oFeHEiBpm+bg1oMy\n\tmf+QqLShuy9CI7XUTmZOoAm5H0ub1uUFGxakTZtPz5sMLjlA0vnC2q0JhHSnyVID5vtZ\n\tLHI12Qy5enMBzP+zX6xSlrUj5RHPzg6qNP5mklq0GtMMqNV/evAAojyH/+bm7Gr0JuMZ\n\tgg5Q==","X-Gm-Message-State":"AHYfb5i+iWWhhyQFE58HMIzZY3YeIoChJmXPVu+PMKxeNBjdJhHoP9S/\n\tgwP/uYezE9NX6w==","X-Received":"by 10.36.51.72 with SMTP id k69mr1434146itk.145.1503943051291;\n\tMon, 28 Aug 2017 10:57:31 -0700 (PDT)","To":"Pranith Kumar <bobby.prani@gmail.com>, alex.bennee@linaro.org,\n\tClaudio Fontana <claudio.fontana@huawei.com>,\n\tAndrzej Zaborowski <balrogg@gmail.com>, Aurelien Jarno\n\t<aurelien@aurel32.net>,\n\t\"open list:AArch64 target\" <qemu-arm@nongnu.org>, \n\t\"open list:All patches CC here\" <qemu-devel@nongnu.org>","References":"<20170828035327.17146-1-bobby.prani@gmail.com>\n\t<20170828035327.17146-3-bobby.prani@gmail.com>","From":"Richard Henderson <rth@twiddle.net>","Message-ID":"<03c05a60-d697-500b-c2fc-d99b24f3f64c@twiddle.net>","Date":"Mon, 28 Aug 2017 10:57:25 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170828035327.17146-3-bobby.prani@gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c06::244","X-Mailman-Approved-At":"Mon, 28 Aug 2017 16:00:48 -0400","Subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"pbonzini@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1758851,"web_url":"http://patchwork.ozlabs.org/comment/1758851/","msgid":"<CAJhHMCC4Y0Zos+g4M6Rms+vO8cdZ+AOupciRFWTfnbFgpRs9jw@mail.gmail.com>","list_archive_url":null,"date":"2017-08-28T21:41:29","subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","submitter":{"id":64653,"url":"http://patchwork.ozlabs.org/api/people/64653/","name":"Pranith Kumar","email":"bobby.prani@gmail.com"},"content":"On Mon, Aug 28, 2017 at 1:57 PM, Richard Henderson <rth@twiddle.net> wrote:\n> On 08/27/2017 08:53 PM, Pranith Kumar wrote:\n>> diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h\n>> index 55a46ac825..b41a248bee 100644\n>> --- a/tcg/aarch64/tcg-target.h\n>> +++ b/tcg/aarch64/tcg-target.h\n>> @@ -117,4 +117,6 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n>>      __builtin___clear_cache((char *)start, (char *)stop);\n>>  }\n>>\n>> +#define TCG_TARGET_DEFAULT_MO (0)\n>> +\n>>  #endif /* AARCH64_TCG_TARGET_H */\n>\n> Please add all of these in one patch, separate from the tcg-op.c changes.\n> We should also just make this mandatory and remove any related #ifdefs.\n\nI tried looking up ordering semantics for architectures like ia64 and\ns390. It is not really clear. I think every arch but for x86 can be\ndefined as weak, even though archs like sparc can also be configured\nas TSO. Is this right?\n\n>\n>> +void tcg_gen_req_mo(TCGBar type)\n>\n> static, until we find that we need it somewhere else.\n>\n\nWill fix.\n\n>> +#if defined(TCG_GUEST_DEFAULT_MO) && defined(TCG_TARGET_DEFAULT_MO)\n>> +    TCGBar order_mismatch = type & (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO);\n>> +    if (order_mismatch) {\n>> +        tcg_gen_mb(order_mismatch | TCG_BAR_SC);\n>> +    }\n>> +#else\n>> +    tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);\n>> +#endif\n>\n> Hmm.  How about\n>\n> static void tcg_gen_reg_mo(TCGBar type)\n> {\n> #ifdef TCG_GUEST_DEFAULT_MO\n>     type &= TCG_GUEST_DEFAULT_MO;\n> #endif\n> #ifdef TCG_TARGET_DEFAULT_MO\n>     type &= ~TCG_TARGET_DEFAULT_MO;\n> #endif\n>     if (type) {\n>         tcg_gen_mb(type | TCG_BAR_SC);\n>     }\n> }\n\nYes, this looks better and until we can get all the possible\ndefinitions of TCG_GUEST_DEFAULT_MO and TCG_TARGET_DEFAULT_MO figured\nout I would like to keep the #ifdefs.\n\n>\n> Just because one of those is undefined doesn't mean we can't infer tighter\n> barriers from the others, including the initial value of TYPE.\n>\n>>  void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)\n>>  {\n>> +    tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_LD_ST);\n>>      memop = tcg_canonicalize_memop(memop, 0, 0);\n>\n> You're putting the barrier before the load, so that should be\n>\n>   TCG_MO_LD_LD | TCG_MO_ST_LD\n>\n> i.e.  TCG_MO_<any>_<current op>\n>\n> If you were putting the barrier afterward (an equally reasonable option), you'd\n> reverse that and use what you have above.\n\nOK, will fix this. Thanks for the review.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"OkA07d68\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xh4yN53gLz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 07:43:13 +1000 (AEST)","from localhost ([::1]:41531 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmRns-00070K-Jp\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 17:42:40 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:50920)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <bobby.prani@gmail.com>) id 1dmRnI-0006rK-M8\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 17:42:05 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <bobby.prani@gmail.com>) id 1dmRnH-0003Os-Nw\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 17:42:04 -0400","from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:32866)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <bobby.prani@gmail.com>)\n\tid 1dmRnF-0003Kt-Bz; Mon, 28 Aug 2017 17:42:01 -0400","by mail-io0-x243.google.com with SMTP id s101so1556059ioe.0;\n\tMon, 28 Aug 2017 14:42:01 -0700 (PDT)","by 10.79.166.2 with HTTP; Mon, 28 Aug 2017 14:41:29 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=KpqDEs4yddDa+0pSUfedxZ0ZC3zqn+E22PLNFI1qOcs=;\n\tb=OkA07d68CyfvvibofnL0zR0ZbarLoK6NPRfLwOQMqEc+5wLPCt5GO5vYK/p/JlNXgJ\n\tm6xR1vu0tSP1y9joSxLWZSxqvB+a4WRfZXderifkYeNX2C7nLUWpq4OLZYCyUoVTIRA4\n\tGuwojR6DqwW5pHznX8I4Il9clZj7vbpJMCH0qBkm3vhPa3XP39Y1OJs0lcdcDRFcw3XT\n\tOgV5J59TOsiV3vlYhs18NBQtVus/attVWJF2WOvwOBS54RUuGgaUI6PpzDgfhu248Aiy\n\tEQLX6M9xknM7ULGiq5+MYmUVpS2w+4dZ7EUg32rTzO8Ij6KP3las01sHDpQgu9o5L2y+\n\tWwJw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=KpqDEs4yddDa+0pSUfedxZ0ZC3zqn+E22PLNFI1qOcs=;\n\tb=cjMMDOjg3Z0xUxvWpbQ0AKnpw5K25IvGmkXt3xFga8LLw+Hss1E3xvuUuiA05FL2vP\n\tgV3G7xIZsGwoVub9nDE/9YwvihZwY2vXsJh5CuCMT5t4xwIW89evGl4xyMyVYjm8yg7C\n\tg3VJW37VPiKlQuFpmP6gkPVTpOTsv6FonrxJu344fsg0jR2F4K8jEqanpMjkjb2GwI/Y\n\tEM0/aZiPzPSP/z2WzqtXoMW06/6Zn0cKa5Gp4pTgHIV0BM+Mcn9Z6iMx5DjZwplHXNZI\n\tZukA4nyV8ZMs0fkVIc8KsoRBuyUWpeU2eh8ktRQIBZWgBUoo6MCBUIc8gesE64THmtfI\n\tbDAA==","X-Gm-Message-State":"AHYfb5hr4TE20WVN8U1JkSZy3LgXmeH125lFx8KceNSobXSSX7EkqRch\n\tRhdzDu8oZzHDVFuXJr8KYE24ZfMboQ==","X-Received":"by 10.107.205.194 with SMTP id d185mr2015929iog.8.1503956520172; \n\tMon, 28 Aug 2017 14:42:00 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<03c05a60-d697-500b-c2fc-d99b24f3f64c@twiddle.net>","References":"<20170828035327.17146-1-bobby.prani@gmail.com>\n\t<20170828035327.17146-3-bobby.prani@gmail.com>\n\t<03c05a60-d697-500b-c2fc-d99b24f3f64c@twiddle.net>","From":"Pranith Kumar <bobby.prani@gmail.com>","Date":"Mon, 28 Aug 2017 17:41:29 -0400","Message-ID":"<CAJhHMCC4Y0Zos+g4M6Rms+vO8cdZ+AOupciRFWTfnbFgpRs9jw@mail.gmail.com>","To":"Richard Henderson <rth@twiddle.net>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c06::243","Subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n\t\"open list:All patches CC here\" <qemu-devel@nongnu.org>, \n\t\"open list:AArch64 target\" <qemu-arm@nongnu.org>, \n\tPaolo Bonzini <pbonzini@redhat.com>,\n\tAurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1758906,"web_url":"http://patchwork.ozlabs.org/comment/1758906/","msgid":"<45959c2a-94c3-7899-eaba-bf13ca85d052@twiddle.net>","list_archive_url":null,"date":"2017-08-28T22:39:31","subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","submitter":{"id":2222,"url":"http://patchwork.ozlabs.org/api/people/2222/","name":"Richard Henderson","email":"rth@twiddle.net"},"content":"On 08/28/2017 02:41 PM, Pranith Kumar wrote:\n> On Mon, Aug 28, 2017 at 1:57 PM, Richard Henderson <rth@twiddle.net> wrote:\n>> On 08/27/2017 08:53 PM, Pranith Kumar wrote:\n>>> diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h\n>>> index 55a46ac825..b41a248bee 100644\n>>> --- a/tcg/aarch64/tcg-target.h\n>>> +++ b/tcg/aarch64/tcg-target.h\n>>> @@ -117,4 +117,6 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n>>>      __builtin___clear_cache((char *)start, (char *)stop);\n>>>  }\n>>>\n>>> +#define TCG_TARGET_DEFAULT_MO (0)\n>>> +\n>>>  #endif /* AARCH64_TCG_TARGET_H */\n>>\n>> Please add all of these in one patch, separate from the tcg-op.c changes.\n>> We should also just make this mandatory and remove any related #ifdefs.\n> \n> I tried looking up ordering semantics for architectures like ia64 and\n> s390. It is not really clear. I think every arch but for x86 can be\n> defined as weak, even though archs like sparc can also be configured\n> as TSO. Is this right?\n\ns390 has the same memory ordering as i386.\n\nBut you're right that the risc chips should generally be 0.\n\nI'll try and figure out when sparc can use PSO (loosest for sparc < 8, and\nmodern niagara), but leave it 0 for now.\n\n\nr~","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fMrtAJl3\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xh6Ct0KNzz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 08:40:08 +1000 (AEST)","from localhost ([::1]:41682 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmShS-0002LB-6M\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 18:40:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59409)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dmSh2-0002Ks-0h\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 18:39:40 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dmSgy-0004eS-0t\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 18:39:40 -0400","from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:37562)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <rth7680@gmail.com>)\n\tid 1dmSgx-0004eA-Q3; Mon, 28 Aug 2017 18:39:35 -0400","by mail-pg0-x242.google.com with SMTP id t193so1318516pgc.4;\n\tMon, 28 Aug 2017 15:39:35 -0700 (PDT)","from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net.\n\t[97.126.108.236]) by smtp.googlemail.com with ESMTPSA id\n\ti72sm2210205pfi.124.2017.08.28.15.39.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 28 Aug 2017 15:39:33 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=XLzMEP7Fz7DiRz+FpBx2maCBGvrQGrkE2p3b6IvgSoQ=;\n\tb=fMrtAJl3MC3+lxrqyC4AwZjfEFZh3mjDR4Dzf6bY0nMmdxsEOQuN/DkWj004ylT3Nx\n\tSJflr6Pbm31aJWzMufCnhrO8RusE8epVsT/wiTwJPNE70iyxMH8QGsSeeTNUQPMZkMx6\n\tJV2ZYO8BQvbsA+cvXpP2ZJNQiXOLaedd2S6WHt5xpx6TXC5k4JKLpwDaHwIAlq8nzigC\n\tlgWJbJ+lEKcBhNxsnF4M2+JNOIyDWNcod+E3LcySVgYQIhicFYCsFz5eu2JYqyQwXJJN\n\t7jnizGG35jGBBnANpSrBpOGSLvC7mg5/cR4uhf3vY1jIA3CbtBrB2VvYMAnL2dO3GQrz\n\tb0rA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=XLzMEP7Fz7DiRz+FpBx2maCBGvrQGrkE2p3b6IvgSoQ=;\n\tb=hk/oA/DJPdXwx9JaWtLD5vA67IjW6NSGyQauQMB8XfrF0lXO7HLM4lH0kLq25NyDKm\n\tUgFc4Xvo6VC5gxJmsQjsbBQMebwG+LfAOaZzynDchsAuwuKpL7GAHCfz+jl5QoHcdegq\n\tXzpDejDsFxxz9AM9cBZLVx8sAPioie6VAM+aciceDEhe2gJ8FujeMz7dqVco0Y2SJ7Qp\n\tsTPoKYyiGxlV74HJ490E3SqpYLgSng8twCyGfmvMOYeGZjSRbPxEw9QEZKpABQcULPMA\n\tXdgqkLFVnrqLJnsuogrITQ+DbJOdlVpNVs1TlKd7ah28HtJf6BtU5qPJtXg5v0TvNnwc\n\tGsyA==","X-Gm-Message-State":"AHYfb5jMmfJ0KbmI22fAVshi9kvqbYFMiRtU19RkuqYsR/BQBbinLTn2\n\tKweEIpl5IfrDtw==","X-Received":"by 10.84.132.14 with SMTP id 14mr2572393ple.150.1503959974686;\n\tMon, 28 Aug 2017 15:39:34 -0700 (PDT)","To":"Pranith Kumar <bobby.prani@gmail.com>","References":"<20170828035327.17146-1-bobby.prani@gmail.com>\n\t<20170828035327.17146-3-bobby.prani@gmail.com>\n\t<03c05a60-d697-500b-c2fc-d99b24f3f64c@twiddle.net>\n\t<CAJhHMCC4Y0Zos+g4M6Rms+vO8cdZ+AOupciRFWTfnbFgpRs9jw@mail.gmail.com>","From":"Richard Henderson <rth@twiddle.net>","Message-ID":"<45959c2a-94c3-7899-eaba-bf13ca85d052@twiddle.net>","Date":"Mon, 28 Aug 2017 15:39:31 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<CAJhHMCC4Y0Zos+g4M6Rms+vO8cdZ+AOupciRFWTfnbFgpRs9jw@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c05::242","Subject":"Re: [Qemu-devel] [RFC PATCH 3/3] mttcg: Implement implicit ordering\n\tsemantics","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n\t\"open list:All patches CC here\" <qemu-devel@nongnu.org>, \n\t\"open list:AArch64 target\" <qemu-arm@nongnu.org>, \n\tPaolo Bonzini <pbonzini@redhat.com>,\n\tAurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]