Message ID | 20190614171200.21078-16-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2394520ilk; Fri, 14 Jun 2019 11:36:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIcD/MRd3iiOTz7oHlLtzgRX/m4rnj5ITWKCgx5E6Xy1H8Ydprd0iLiKHCGeZlvRr306SI X-Received: by 2002:ac8:68e:: with SMTP id f14mr2953194qth.366.1560537416647; Fri, 14 Jun 2019 11:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560537416; cv=none; d=google.com; s=arc-20160816; b=QT8BGBUM40u10/K/AnCscn7fqcIjWpfq+qEYaPKWL/3uIo37sNjNKkC5ude0fYb8Lr APTomYOZ+BKc6nCwIvQ+1a8oM5GN/hECyA4IFpbc4FTbHish7qK3zqPA3pEnyeJZvOQj aGaJQt3jVEyfpSfGgfYoFabqfRwtGOUNBS7BRazUCa64q5Ba30Jgr2n9otwRUxqBUITs M+j4fUySZES2MDYGrcCMijoimwhQDA/SwEeB4Xzo6ATdNmHYVUKo6U202O9tqSizG6ie wMyGuHrgkIaAUAWpv3tRDo0ArZ9MD8UNQPPgs+EpB4MtECgYzWoLNiDeRR+bhHsupml6 BCYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=aDs2dqXGIEF28FBqcTkP/2L64OJ8gLbRaNrMScFtO/w=; b=0nTABBLu+270InlKY3anXJYi/ByQujvgIKfFLf/hFaVoK4QZivIHTmXWs5rWrDVLJr bVxPySzj74A3DAyBrIebW1DEVmKMQZwX4QQPdGN0ChtnWV0I34tXiBgrQ7TtWmq95pTw mRvZfy577QJqZR9pCOao3ZtIorL5AxS5jXEsaknECWZGn0s0aLhUi/npR4QOD2UUt3zO c/del4SIDuoikYmvtYwW1esdlyYdPa+uwOHQo+WqACfYrX1+t2q7zj7TIDBTcuQ1FI1G Qs5Y+Oxysw3qJW1I2j3VvMqcWp7Xna6/I4zRZgsPuVk9R3QAiE2KpcQB1h5Pz9i2oaKk zn9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZPtRlsp/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j68si2236999qkd.228.2019.06.14.11.36.56 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jun 2019 11:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZPtRlsp/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hbr4J-0003ch-Sd for patch@linaro.org; Fri, 14 Jun 2019 14:36:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34207) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <alex.bennee@linaro.org>) id 1hbq0T-0007A8-MP for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:28:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1hbq0P-0004CT-DQ for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:28:51 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:33061) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1hbq0N-0003lJ-C9 for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:28:48 -0400 Received: by mail-wr1-x441.google.com with SMTP id n9so3385901wru.0 for <qemu-devel@nongnu.org>; Fri, 14 Jun 2019 10:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aDs2dqXGIEF28FBqcTkP/2L64OJ8gLbRaNrMScFtO/w=; b=ZPtRlsp/dKt9phzGVfveJ4SI5hzBAoqTmaMYqWk3nCJ3rRIlHomccMJmVbcQc2N1Mk znKQOikQGwZdRcH50kRT5CVggCPB58o7e+G5veruU+mXkkqazfhjteS3LoLpmPaztuTB rvwyzR9apG09I8prKRts/e7DjwCFEREXcgamlPwqAShujI5jsrW7oSiv7voNyVYCyny/ bX0gyzPdAceDYOuTS3jT7pMc1X9unVJXUOZFXmKaYgi/57qq1Or5fVmwYcIF2KdHmRGr VAus7RaRr8BbGLVIc40QNgm08sy9oTRAHrCHpzCaHexzPaTx5gGRqP7NiGwQwlunJ9CK dZow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aDs2dqXGIEF28FBqcTkP/2L64OJ8gLbRaNrMScFtO/w=; b=HFIrl5vOIVNTDXB8OT1C24rJFW1XQoC9RboDWjB9hRYhV+thnSBmJW/TAggcQMPeo0 KhfQEBgrVSqbjY9o6cuKtFGrJxkDkNljhXmg+ipLs/VmOoQbBsddDQzLqTN/uJRatryP nukeDPr15YR/aOr8pemlEixJJZkdugZFhs1zo/aWsnOcaOMu3EC9Q0VCIa14nGuhqMr/ D1Led6zRuiWCn8NxjKK5C0FWlTa7sVO9EHu57NjvXSsL+n+1VBnODaYPaCcGAIJxbVs4 FHae8NnmCxfaokI3U+Pwc/N7TCwx4X3c+M3apcxrVESufUCo9oxv9yVTzId3MThKcqur lhlg== X-Gm-Message-State: APjAAAVEFmSFqCZv1qHXZbluPrqU10ElQ7MsWTajWYs7OR0Tm9eqSzLQ beSZOQmBMkawWHGaLLsOkW9Rxw== X-Received: by 2002:adf:e301:: with SMTP id b1mr14118389wrj.304.1560533310627; Fri, 14 Jun 2019 10:28:30 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l8sm9147281wrg.40.2019.06.14.10.28.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 10:28:27 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D52821FF9E; Fri, 14 Jun 2019 18:12:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 18:11:25 +0100 Message-Id: <20190614171200.21078-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614171200.21078-1-alex.bennee@linaro.org> References: <20190614171200.21078-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v3 15/50] tcg: add MO_HADDR to TCGMemOp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://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>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: "Emilio G. Cota" <cota@braap.org>, Richard Henderson <rth@twiddle.net> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg plugin support
|
expand
|
On 6/14/19 10:11 AM, Alex Bennée wrote: > + /* > + * SoftMMU-only: if set, the TCG backend puts the corresponding host address > + * in CPUArchState.hostaddr. > + */ > + MO_HSHIFT = MO_ASHIFT + 3, > + MO_HADDR = 1 << MO_HSHIFT, FYI, Alex and I talked about recomputing the host address within the helper. For at least a few of the hosts, we currently never compute the full host address into a single register -- we use reg+reg addressing when possible. It's only a couple of instructions to re-compute, given that we know that the tlb lookup succeeded, and importantly they are all out of line and not bloating the inline code further. r~
diff --git a/tcg/tcg.h b/tcg/tcg.h index 2385e758e5..966e89104d 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -367,6 +367,13 @@ typedef enum TCGMemOp { MO_ALIGN_32 = 5 << MO_ASHIFT, MO_ALIGN_64 = 6 << MO_ASHIFT, + /* + * SoftMMU-only: if set, the TCG backend puts the corresponding host address + * in CPUArchState.hostaddr. + */ + MO_HSHIFT = MO_ASHIFT + 3, + MO_HADDR = 1 << MO_HSHIFT, + /* Combinations of the above, for ease of use. */ MO_UB = MO_8, MO_UW = MO_16,