From patchwork Tue Nov 1 15:51:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9407545 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CF4360585 for ; Tue, 1 Nov 2016 15:52:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F65829A1A for ; Tue, 1 Nov 2016 15:52:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23E7329A36; Tue, 1 Nov 2016 15:52:47 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 3B34D29A1A for ; Tue, 1 Nov 2016 15:52:45 +0000 (UTC) Received: from localhost ([::1]:48833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bMi-0004PA-G4 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Nov 2016 11:52:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bM8-0004MO-BH for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1bM5-0003VM-7i for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:52:08 -0400 Received: from mail-by2nam01on0066.outbound.protection.outlook.com ([104.47.34.66]:16000 helo=NAM01-BY2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1bM4-0003V4-Ur for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fhlnKHSX5gLgLlv0RI59PNlatB/yNsCaNLOQawdS1tA=; b=VuQHJoXp1wribHUtWA6KkXm734iSZiG2o+ndkvG3QOFZ5C2jz+sqFmvoPP4l7mHDeONoTFf57yNYFVwf/FBUAHCWDVBYjYP058G8oEdNmJpiLWPlf6sLAxenRtePUGVOv+3IvXcJK9CY99by0wK51i9BmfXu2k9Q9pz7WgJbG3g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by CY1PR12MB0667.namprd12.prod.outlook.com (10.163.238.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Tue, 1 Nov 2016 15:52:02 +0000 From: Brijesh Singh To: , , , , , , , , , Date: Tue, 1 Nov 2016 11:51:59 -0400 Message-ID: <147801551919.18237.5576973583407737765.stgit@brijesh-build-machine> In-Reply-To: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> References: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR13CA0010.namprd13.prod.outlook.com (10.168.161.148) To CY1PR12MB0667.namprd12.prod.outlook.com (10.163.238.152) X-MS-Office365-Filtering-Correlation-Id: 2573d547-2dcf-4972-abfe-08d4026f05c4 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0667; 2:tSS5KENtEbdpQbph0l4vQQeICP6HZeEM6rZo9hh0WODona5pQMGy6JK3XikyR+fQnKQa0R7/Q6FaOs/ecKEOElaD6hB0216IXxzaeOBPfbVSfAqymJomje4pFte/F0qtj90O35QeBFZDwjn0CgG94XZFANPMs3IcLGs7IUxpMQQvjQM7itq8j8iQ29jyPF3yYfUjhmFkKOm19gw3wsw9Og==; 3:lW/auNpsszR8ZNEXoCpYNc929XfT5RCFdIdDQeK+IspBF2OX3wnFGhJ8yjxMTHYnwxRKRwUOl8vWZKRJbp+iW5ASIiRNcF9pKmmijck+f/SXLAAYhTj5GzWa960P1SmVnABHC0hYbakxhgE6Q9xiFw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0667; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0667; 25:MJp4mc93QeZUS9o1hkMmNEsys4d0kxxPChrtR4McbCUwz+jqkL7WMlnhADiEoJkF8vk5bv+4nZotITxtjp6WE5AbVfFgQiJKu4sj+MazHWj/gQWVUz8EYikpg1jsI6DpEyeATXC6hnLgppYZLrArXXzC6xhLRlQM91r6s4D7MPgGOVLd8ujxM7fRFIEX0qawmFmnqVShJmfQK1LcFh5vxdHMcjlT8f3Y0sPtsQBJresGLEf75aeXJb/qc++/gk5nVEQ4C10KZXPCZSlitgFpJMAU2J5ZIdFT/oiYHTizwCW7cDyIRVcGg5fmELTM58RGB4APAUaEjoEUe+DIVJiGbIDkW8rjyZSKkT3tVmIaYmpk6/F+A0AaHv9irEo9wIAkyqdO75AEZNFsx5AI98FwrY2/y7I+qY9dwIHPLHpdFIWdb0qMDnjvyJ4ZLsvWmy2oON6MpsvZqL4Aqtu77LuOBp3C9CTpCOTarGXrXjHI5RsmyfISrPwi14xra+A3FMUHGUlA1e0glmcC7h7ceqIQH8GQZMe/27emHkAvDOtR7PIrRvSjvBJwIj7ExDeYh3eyPiIHaq5GcKhUfhcNXql27VrQ1damvDxWLGQbzJDrisQQo0oZ7c1VuDSczc6/cbE5M21FmntWWMA54BOaw6J4qWp3C3/KcymYVyDvqqqUTj60k0qhETDs8Cv0w+HydoNspHNlKrFVJ1gT02VtDNkTTw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0667; 31:H1G+Xl1G0WwL6YKLKRcHlhn20cGFxFOspu9+j6Lc7AYWeI/jVp4w6gmKz9pgqyDrPzwfbrVN7mXX3VGZVz9+ExTG5B7edX6huUkUCnMIPNTwrqM/DwtCd/iL/nQ4XdzHRZ8hDj84QyvhhIqHLghJZ21f6vxSFMGT4fVmH9wwxpRklHXZQl1jftdTQiIUTmlIefGiTbGK+oaDbYUkkkDIpHcV57MEHebELgmOqDY3Xa4P8Cwv2q4Idt0H57nQXfqBXMZdBGjh7GkuNW4gY88LQA==; 20:Fgk1Kbz6J1xmfuUcUpxjevOQDUtBHPswGYgRBhtWCP2JfNwK9KdHdyGXRpIq70GIgCTUTDsvNcqYE6OusGJhkdd9WQ/r1bd5kRzLKMArXeEgFw4GTgN0VwPt5bfoI3FC1F9xnbsDAAw+O8gjojwXjU1eWcweUh//4Hgo2paWkz2cmkHiNrgwAzEA1B9FruGhMSOEuE+XL/15mUW/M6fRqjyrJzSfg5P298HkvRljcAaXgKFxdnWLLl2U8vJP3Qx0GpQRbZRZ1T//uXLFrO8+wp7kFjMBmN8zq66Kkp+a5lsiVx2g27rFTB4adjEuf2AQkR16/ErNU45hUEXsNsWzSqPRGYh6ZPBMZ06G25NbkbHgVmCnnT7qGJ7S1GrOOBWOhooHKtKX2eFPk5HlUFYEBXz2soZNkHlg+TONfmpyX4Qx6TqTAqoTsX2I/gPke14evmQC7ls0rEvEBPnjEM0Mqjo0pfe5dEv0ck2MMj7KM/fSaPccymdN1y/Ai+i7tmKE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:CY1PR12MB0667; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0667; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0667; 4:muPib9xhOo4wdPnfBZO6lPttO+CzndKLlPkM8ulevI1ymiNYXo3FdRaTh/Y5sU4OgYr8XvGuj3m9K0f+29dDllBdnUhMV32qHL8cVl9Jm3RhhTF+AUYiwpIuxctPz1aQXv21mnyMnonTB/O8hoMeLjKN2J3/t4/LMY54PYcN081/kV+CHDAsgEskfPOGg7Wb6YgpnFqarX09VKDVG9xf4c0spIDzXaJkIuNIq5plL04LEOm4uETYLROa+CyZ8gzzYnlm9J5LD8bjukRq6cet+6Cl5SkPNQigzlez9gLNkOnvyVqYlbFJDAgxgKpR4pDm084uPeDB+9m2yOgv1k1n6QvlnXnicOSasMT6p72roEejrtFxMBsVX2R//Nktzuzm5n6SUpNJndV2pPOTV8OKJ7TAz5gJCZDPHiDUCr4vwQfiZZMLqgxZGcTfCByMeQ2GVS+Ni8ANQblAE978/gmOUQ== X-Forefront-PRVS: 01136D2D90 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(189002)(199003)(2950100002)(229853001)(19580395003)(42186005)(7416002)(7846002)(101416001)(7736002)(106356001)(2906002)(103116003)(305945005)(4326007)(5660300001)(230700001)(105586002)(19580405001)(47776003)(33716001)(83506001)(9686002)(23676002)(189998001)(86362001)(5001770100001)(97736004)(4001350100001)(77096005)(586003)(6116002)(50466002)(81156014)(68736007)(2201001)(6666003)(66066001)(92566002)(3846002)(81166006)(8676002)(50986999)(76176999)(54356999)(33646002)(921003)(217873001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0667; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X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wB4p1/snHrbRVyKbKXs+UAqG9z79MNG/veztNes6mksJzhqDjDE4NqQ/O+As=; 20:JmreGAHGbHYSKaYxBkt5dTubNN5WNJG/u7up25AqQ2vsw1sIV2ueHb4UxSxkzKueM1ao/m0QziGLjmFFUAL8nDwLSWIAZwYOWDFpqtx8DpTF8gNRnaA9HLg1jKEYzyJ9mlhD2rtoac1uBcjsV6OdwEN+su2ouyhsFJh0YQ3Pv0iG0wHKMeoN2+vksLmRJYfMN83BXBfvp1hwM793D+HK5TN/E+Ya+XR6yZHbEscQroQRIXaFkgitBWud0DT0fa9M X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2016 15:52:02.3369 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0667 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.66 Subject: [Qemu-devel] [RFC PATCH v3 01/18] memattrs: add debug attrs 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: brijesh.ksingh@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add a new memory debug attribute, this attribute should be set when memory read or write access is performed for debugging purposes. Signed-off-by: Brijesh Singh --- include/exec/memattrs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index e601061..b802073 100644 --- a/include/exec/memattrs.h +++ b/include/exec/memattrs.h @@ -37,6 +37,8 @@ typedef struct MemTxAttrs { unsigned int user:1; /* Requester ID (for MSI for example) */ unsigned int requester_id:16; + /* Memory access for debug purposes */ + unsigned int debug:1; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this, @@ -46,4 +48,6 @@ typedef struct MemTxAttrs { */ #define MEMTXATTRS_UNSPECIFIED ((MemTxAttrs) { .unspecified = 1 }) +/* Access the guest memory for debug purposes */ +#define MEMTXATTRS_DEBUG ((MemTxAttrs) { .debug = 1 }) #endif