[{"id":1759415,"web_url":"http://patchwork.ozlabs.org/comment/1759415/","msgid":"<6a54b357-4512-d36d-eb01-67471658fbe4@linaro.org>","list_archive_url":null,"date":"2017-08-29T14:53:41","subject":"Re: [Qemu-devel] [RFC v3 PATCH 4/5] mttcg: Implement implicit\n\tordering semantics","submitter":{"id":72104,"url":"http://patchwork.ozlabs.org/api/people/72104/","name":"Richard Henderson","email":"richard.henderson@linaro.org"},"content":"On 08/28/2017 11:33 PM, Pranith Kumar wrote:\n> Currently, we cannot use mttcg for running strong memory model guests\n> on weak memory model hosts due to missing ordering semantics.\n> \n> We implicitly generate fence instructions for stronger guests if an\n> ordering mismatch is detected. We generate fences only for the orders\n> for which fence instructions are necessary, for example a fence is not\n> necessary between a store and a subsequent load on x86 since its\n> absence in the guest binary tells that ordering need not be\n> ensured. Also note that if we find multiple subsequent fence\n> instructions in the generated IR, we combine them in the TCG\n> optimization pass.\n> \n> This patch allows us to boot an x86 guest on ARM64 hosts using mttcg.\n> \n> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>\n> ---\n>  tcg/tcg-op.c | 16 ++++++++++++++++\n>  1 file changed, 16 insertions(+)\n\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\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\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"DXPl8d0Q\"; 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 3xhWqx1GqKz9sR9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 00:54:21 +1000 (AEST)","from localhost ([::1]:45355 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 1dmhuF-0000FF-3B\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 10:54:19 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35907)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dmhtl-0000EK-FE\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:53:50 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dmhth-0003IV-J6\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:53:49 -0400","from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:32842)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1dmhth-0003IM-Ci\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:53:45 -0400","by mail-pg0-x230.google.com with SMTP id t3so11553992pgt.0\n\tfor <qemu-devel@nongnu.org>; Tue, 29 Aug 2017 07:53:45 -0700 (PDT)","from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net.\n\t[97.126.108.236]) by smtp.gmail.com with ESMTPSA id\n\tf17sm5525737pff.90.2017.08.29.07.53.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 07:53:42 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=Gr/rMqqJnZTnf7YCkqOb/GvNqPpvrNRlyOQsiI7dr80=;\n\tb=DXPl8d0QAOFl6dk1IDgh7Xf+xS8S3JuLAhbL4UlqI8hVHeNilPzN62vXUhsx/0ZSrp\n\t230APwaPEfcd6R9JcKeVCzLkQqdlG55CxwFVZEWlJjkDhld9jG01hPvTjM2LXMSxv0eH\n\t7h8+XP6msLstEZw29vrWnZj4Htj96ZFsLt0vY=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=Gr/rMqqJnZTnf7YCkqOb/GvNqPpvrNRlyOQsiI7dr80=;\n\tb=QV6JHQam4CTVM2PADZFp4qF5BXiIAb9wR2/Grjd88LdDRWH8OgoPbwNvDPVs/6CDMN\n\tGJMrAjxoEisRsn2uYFDkIP2/GTXyjdILmlTLkbKNl6/9CjE1vK8QChRb8eQdAnhDgyT0\n\t8W0Fz3L9xAT3a2XBBjeg0vK1PQV/u3QapRno/fg5TUGCZx1Zpf2njKIO4aBV/cB4zqLT\n\tsLFhuX09DJY1/2yzdsATcGN2SmgQRfzbJZ8LYVEugGvW7MEzwQTesJBuzigkUsIC+3Mv\n\tw77kAXFkunSWWMuJRUOp/bVYWruyMPgTUwwVoRu2Zua360HrKHLR7JDO5+aBr2okHAPF\n\tQvYw==","X-Gm-Message-State":"AHYfb5gp0bOMGXSopuczUv6BqcTIAmMtGWrwFoFonjDL836lL+KYngLR\n\thBwCEA1dbG/Sd9zz","X-Received":"by 10.84.217.135 with SMTP id p7mr784756pli.170.1504018423715;\n\tTue, 29 Aug 2017 07:53:43 -0700 (PDT)","To":"Pranith Kumar <bobby.prani@gmail.com>, alex.bennee@linaro.org,\n\t\"open list:All patches CC here\" <qemu-devel@nongnu.org>","References":"<20170829063313.10237-1-bobby.prani@gmail.com>\n\t<20170829063313.10237-4-bobby.prani@gmail.com>","From":"Richard Henderson <richard.henderson@linaro.org>","Message-ID":"<6a54b357-4512-d36d-eb01-67471658fbe4@linaro.org>","Date":"Tue, 29 Aug 2017 07:53:41 -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":"<20170829063313.10237-4-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:400e:c05::230","Subject":"Re: [Qemu-devel] [RFC v3 PATCH 4/5] mttcg: Implement implicit\n\tordering semantics","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":1762058,"web_url":"http://patchwork.ozlabs.org/comment/1762058/","msgid":"<20170902014456.GA29493@flamenco>","list_archive_url":null,"date":"2017-09-02T01:44:56","subject":"Re: [Qemu-devel] [RFC v3 PATCH 4/5] mttcg: Implement implicit\n\tordering semantics","submitter":{"id":65690,"url":"http://patchwork.ozlabs.org/api/people/65690/","name":"Emilio Cota","email":"cota@braap.org"},"content":"On Tue, Aug 29, 2017 at 02:33:12 -0400, Pranith Kumar wrote:\n> Currently, we cannot use mttcg for running strong memory model guests\n> on weak memory model hosts due to missing ordering semantics.\n> \n> We implicitly generate fence instructions for stronger guests if an\n\nThis confused me. By \"We implicitly\" are we still talking about\nthe current state (as per the \"currently\" above?). If not, I'd\nrephrase as:\n\n\"We cannot use [...].\n\nTo fix it, generate fences [...]\"\n\nAlso, I think you meant s/stronger/weaker/ in the last sentence.\n\n> ordering mismatch is detected. We generate fences only for the orders\n> for which fence instructions are necessary, for example a fence is not\n> necessary between a store and a subsequent load on x86 since its\n> absence in the guest binary tells that ordering need not be\n> ensured. Also note that if we find multiple subsequent fence\n> instructions in the generated IR, we combine them in the TCG\n> optimization pass.\n\nA before/after example of -d out_asm would be great to have here.\n> \n> This patch allows us to boot an x86 guest on ARM64 hosts using mttcg.\n\nA test with a simple program that *cannot* work without this patch\nwould be even better.\n\nThanks,\n\n\t\tEmilio","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\" (1024-bit key;\n\tunprotected) header.d=braap.org header.i=@braap.org\n\theader.b=\"tQP2Zn5Y\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"kxf+HP16\"; \n\tdkim-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 3xkf7x702sz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 11:45:32 +1000 (AEST)","from localhost ([::1]:44020 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 1dnxV1-0005Jw-Qs\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 21:45:27 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51329)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cota@braap.org>) id 1dnxUb-0005H4-VQ\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 21:45:06 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cota@braap.org>) id 1dnxUY-0005I0-UF\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 21:45:02 -0400","from out1-smtp.messagingengine.com ([66.111.4.25]:53477)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cota@braap.org>) id 1dnxUY-0005Dt-LP\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 21:44:58 -0400","from compute4.internal (compute4.nyi.internal [10.202.2.44])\n\tby mailout.nyi.internal (Postfix) with ESMTP id BB8C420BBF;\n\tFri,  1 Sep 2017 21:44:56 -0400 (EDT)","from frontend2 ([10.202.2.161])\n\tby compute4.internal (MEProxy); Fri, 01 Sep 2017 21:44:56 -0400","from localhost (flamenco.cs.columbia.edu [128.59.20.216])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 794362418B;\n\tFri,  1 Sep 2017 21:44:56 -0400 (EDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc\n\t:content-type:date:from:in-reply-to:message-id:mime-version\n\t:references:subject:to:x-me-sender:x-me-sender:x-sasl-enc\n\t:x-sasl-enc; s=mesmtp; bh=kxxttSDPwuw1CLClR5chXN2JPQa9u7VTzlTl3d\n\tEfIBk=; b=tQP2Zn5YNShk+SmVh0aIn7l8sjVyjKXNZ2DFm6c4bqbdEeQLWt/xt4\n\tod/s6ybG52DSmdftiFVVOFQrEKoifVFwkDCLtwD/wKnk5MLl7mmUFO6degzZO4NY\n\tUEt2M6MDqURk5hBA402qlX0CAbFt9Q3KWUZKRSBckQFmzihRmU2pE=","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to:x-me-sender\n\t:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=kxxttSDPwuw1CLClR5\n\tchXN2JPQa9u7VTzlTl3dEfIBk=; b=kxf+HP161WyRm8B5lELzeFurmnA6d+F1hA\n\tUTUrIpnnt20fmnvNoAigf+/w7JjJIKllIfqoZEXrYqDS0Spn4vcHESkeb6dUCXJN\n\tY9oKCLkDJk0ITPvBX5ukrMKpQSezUmiyXJsMYfjfbvYobcuDDZDI8oi0o2UVlCsf\n\tQ6NpcJaiaT0BF98XZxMGqot4+EKlziYIVPJz8U1dPN3tUoDErQhgsnsaqJLYys8S\n\t+p9gQB6oV7bDeKHucAzTD9SiOu44Orhor4HKTJnZ/sbH/Th+uDR8As/QyPcSndDe\n\tBgTkZQEr4M1DctV4RRZAwh9XTc1Heu5DC+J/CU4ussF5L/BP8q4g=="],"X-ME-Sender":"<xms:GA2qWV8j730A_ML11jnpy4DMYEkrCOq5CsXytV5hithsW6fNv1yxrA>","X-Sasl-enc":"Bh6PquspSoNmDLdqjGqsLwRVys9KKSlbmkaFggSmNz1w 1504316696","Date":"Fri, 1 Sep 2017 21:44:56 -0400","From":"\"Emilio G. Cota\" <cota@braap.org>","To":"Pranith Kumar <bobby.prani@gmail.com>","Message-ID":"<20170902014456.GA29493@flamenco>","References":"<20170829063313.10237-1-bobby.prani@gmail.com>\n\t<20170829063313.10237-4-bobby.prani@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170829063313.10237-4-bobby.prani@gmail.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"66.111.4.25","Subject":"Re: [Qemu-devel] [RFC v3 PATCH 4/5] mttcg: Implement implicit\n\tordering semantics","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, alex.bennee@linaro.org,\n\t\"open list:All patches CC here\" <qemu-devel@nongnu.org>,\n\tRichard Henderson <rth@twiddle.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>"}}]