From patchwork Sun Dec 9 19:37:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10720189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B1BC112E for ; Sun, 9 Dec 2018 19:42:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E1AD2A14D for ; Sun, 9 Dec 2018 19:42:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 428742A153; Sun, 9 Dec 2018 19:42:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA8BE2A14D for ; Sun, 9 Dec 2018 19:42:47 +0000 (UTC) Received: from localhost ([::1]:56415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW4yV-0004uF-4P for patchwork-qemu-devel@patchwork.kernel.org; Sun, 09 Dec 2018 14:42:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW4u1-0000Qs-0p for qemu-devel@nongnu.org; Sun, 09 Dec 2018 14:38:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW4tw-0004zO-Ue for qemu-devel@nongnu.org; Sun, 09 Dec 2018 14:38:08 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:43571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gW4tw-0004wi-MA for qemu-devel@nongnu.org; Sun, 09 Dec 2018 14:38:04 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 62C05F3B; Sun, 9 Dec 2018 14:38:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 09 Dec 2018 14:38:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=kHBCSMB+JxKer1zmrcUHgDnNC+U51vF2n01vbQXnCIs=; b=gzznQ JZeuaAWZZ6NN62xuxPBrDp94h6sATDRNpTxLlzaeYLIw4DqeiNUWAj08r1+rn7Kt Y+UWkZeMP4N2OKk/0janNobGWQ7D1WIvliZ8X+hvvjYpKAiiFuM1JRJRj8MKD4QU ivdSFxlzf8IGn+76D0FkWjS2U5LMt5jU4OMBqY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=kHBCSMB+JxKer1zmrcUHgDnNC+U51 vF2n01vbQXnCIs=; b=asKhRYq1+go6ku84BquOVXEfODlXUhQJ5gbn6pwQGb2z/ QRzrAywL1Zue0qwYEySkWJhcveFnh5MASKZ7VLLve3AwLWS2kMlS8WKdmjn7WWoL axo/NpN8sMauhpqDELiGIWk0gmsTtIvLSJV0SYlWpevExdCXlh5b1vG5qOLNlPBj eMbnG4vxCKCmx3Sx/dYW9GcD1AmFZULd7F1mvuCNqYttmKGwP1L2r8H/f23YegKS 4cUH5eOMXyZtxypofNDBzyE7rLSyqY210/QPPoT6DdDEFMXwgmFG0kzDmAG29VQa wPyw7JH0hAx3z4gOks6h8lY2uYTPQwj5t6vKNb8KQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudegfedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkf fojghfsedttdertdertddtnecuhfhrohhmpedfgfhmihhlihhoucfirdcuvehothgrfdcu oegtohhtrgessghrrggrphdrohhrgheqnecuffhomhgrihhnpehhohhsthgruggurhdrmh honecukfhppeduvdekrdehledrvddtrddvudeinecurfgrrhgrmhepmhgrihhlfhhrohhm pegtohhtrgessghrrggrphdrohhrghenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id A9AE2102E4; Sun, 9 Dec 2018 14:38:02 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sun, 9 Dec 2018 14:37:23 -0500 Message-Id: <20181209193749.12277-13-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181209193749.12277-1-cota@braap.org> References: <20181209193749.12277-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.123.25 Subject: [Qemu-devel] [RFC v2 12/38] tcg: add MO_HADDR to TCGMemOp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Pavel Dovgalyuk Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP We will use this from plugins to mark mem accesses so that we can later obtain their host address. Signed-off-by: Emilio G. Cota --- tcg/tcg.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 6fd525023b..a376f83ab6 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -359,6 +359,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,