From patchwork Tue Sep 13 14:47:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9329385 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 14A1D6077F for ; Tue, 13 Sep 2016 16:01:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 058D829528 for ; Tue, 13 Sep 2016 16:01:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEB3B2952D; Tue, 13 Sep 2016 16:01:36 +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 7901C2952A for ; Tue, 13 Sep 2016 16:01:32 +0000 (UTC) Received: from localhost ([::1]:49820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjq9L-0003Vn-Iu for patchwork-qemu-devel@patchwork.kernel.org; Tue, 13 Sep 2016 12:01:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjpX8-00049P-F3 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjpX2-0001KR-67 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:22:01 -0400 Received: from mail-co1nam03on0042.outbound.protection.outlook.com ([104.47.40.42]:58912 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjpX1-0001Id-S1 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:21:56 -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=Tb1E8Lk43NGjhHgbudp4j3LHfjABkUqd99NFmLPdvtg=; b=ZtcvKcT51Q/tKcCyloFK+wIX+uRVC1A2mm9gyL4w7763vlVzqJ0Sfs8Sp8Zhxz55Z/ElIT16ZmF5UXyYsR6hBnk0JQhjvqchrFuyb0TU6rps5XNCy/XA1feVfP4LIsyN88+1pQvR4JQy9Qpt65kREtjgo0fOw7EHGlmnqHiiN+o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Tue, 13 Sep 2016 14:47:28 +0000 From: Brijesh Singh To: , , , , , , , , Date: Tue, 13 Sep 2016 10:47:23 -0400 Message-ID: <147377804367.11859.17420890454321327137.stgit@brijesh-build-machine> In-Reply-To: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> References: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0062.namprd03.prod.outlook.com (10.173.137.24) To CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) X-MS-Office365-Filtering-Correlation-Id: cd78dc4d-e5d2-41b2-5b39-08d3dbe4e2a8 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 2:QBXh0XxGLl5CPG8AsUwpH9Jg1bYenv+jK1+ZIJTTnUFt7RL8s4OMJD664spBMlgOUCuwfCPfpMlN6b/iy+Lm07JvSHjggDp4KrpuH75fUfK1AUGsK6yvZG/g6zOjXx/u4bBKDUATDNhg46mCDon5nVUX7p8dduzzRgjyVGkk5mVkTlLC2A4GQA1GiOxLg0Q3; 3:7XSJaAIAkXIZbbIXK5NTssqrLu80YtKMgHQPtS5GmjHEdmr+47LeG0pG62Dcl3zdJqrg4fbNU7RtpNLru4d0OXyD2M29GThXaH/Wx0TVEam/qY/jicttQvg+hiRwuzOs; 25:YU85HxJGi0NaTHX103dsjqNxWktk7spNjStEXhzknwuOAYE53b9fHIlY/FW8R5DNgNoy7rcIDWw1KQPEZg+p+TNIQjzHCodNDbf6nGw/1xo+Vt29kzdk5L1+1Ln684TVcTps2UwSeF27maUOlIj75Yxv5zO9m2DBPZTOVMDGzD61yqNJjD70+JPa0KIh1WI6oPZV6IL/+behwUTtNw12nPz6YOUd/y8YDNiML9pGRH/pV9NkOBy5Aj4WC6A42boIFm5eyJOFWLkreYvLlmpZEvRLnZAX0e5td+d2nQqlrZdCwfHkdXoizNtmdmAIWQgeOvb73YRoeKTUZ+SCIrRo0E3M9bGK9hvBfIIlWxx4NfzD/EoTUmAqiOA8+u/vHF4pdVqk0JVNdGIK50+aUX2qGrswoowkSAg7sNMNHrdwZOc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0665; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 31:De6KpxnAUt0KK97ROV6JNNwFij0qofIGGzL3tOFGoE/wtrPTvHIgTJzYQCUlCZKt61H09aoeL6DcMGBvNHIlvJSJz/ev+LIQhwLTmAwDs9uuNztIsb9jfWiTx01qrBo1pa8OVUz4CJZ4bSpPFUjax+mYEg687GRiB4kXQsJHrnkM3MkHHvF895XnRfQJGP3GIP23KJMQFdyqYb3QIEoCN6AJwqUEMCUq7cqS+XUZsJY=; 20:21D1jX1WNfUHo7PTUWtSxGHLxlmTPYOpmde5g9ft0gCVeQ3z398yVxMVkngR/feIG/LlrEX8z4IdSC5Ts3I1lvLZZ2p7+Ne6oJmyzsREBFF1496UlCPec4R2/Kv93I6MKdoukNTzuWBdoNGu09Jg0LV8EN9eN1B7Hkdlt3ZtyLBYiRWfVrKJR0pGSNRXe0bm+wE6p0uebYrM19urTZMVNu9sMBXPUmzkLSj7GVf43T5zG6iI5by7+w6EM2D6JUclSuGOkJNFAHNQYljIZef72M43HRQkRjgYrIqnqdmiGNciEQrNQlstnNT7RdI2G+Pb8FqLoSHRikAMJmtmCHUR/0jGd0HGsBTpj+/xy+QhhTbJxaWzaS0G8BzkKpF/9FIsw0ri7mRVF86DQ18j49d8hvXO9VwEZGze4BV0ymh8fHLU5GQ/rxvNVXf1uOGrnB29xJsR7UBT8wtpnvTfrl6wKAZ7UyCXpAentpw4rvCoxzpCihUCSWWlI0LBd2u4lK3L 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)(10201501046)(3002001)(6055026); SRVR:CY1PR12MB0665; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0665; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 4:qVgKLUVt31cLynVAi9gqE4kMH2rkZEfVxQdl/ir4MJbCrfBv92mfAwYpyX9YIyzV2w7B51V31r2eAmd2r9yPdn7iQWCePMHnmtaiv3qRmnO4LPZQcR6fVoq//EVJfwoR4aSIj+sCiUL9fnp4NRi8g3uCuj3sDPH6D+bOPbmmTHg8r6tARoWab5BoK42fudtnTivXYMq3Ga1YhMFrLZKl3RKrHSHpbi9VeALkPUc7IP/TeJiteMN/Y01naeoBmu+CJs5YhUak4P5tKyNwXCzl0zQxSCqcpI6FJFDt49L8lbpnbmGAnARNSxEdfBKLvgF2xgi3CSXy23mJIgYLNS8QT0f1eg6XGhpCtEKE7xY0hOdIjdaiy9WsiP3mjFD4f1OT5VhdLm9AaDQ2F6KTIg38XCoLRxP7IexdJZuTAB2vyfLtThRPFh0tsWbdTfMwTJMW X-Forefront-PRVS: 0064B3273C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(199003)(189002)(33716001)(2201001)(86362001)(2950100001)(83506001)(42186005)(81166006)(92566002)(81156014)(5660300001)(189998001)(305945005)(7846002)(103116003)(19580395003)(7736002)(229853001)(107886002)(50466002)(230700001)(33646002)(4001350100001)(76176999)(106356001)(105586002)(19580405001)(66066001)(8676002)(68736007)(23676002)(2906002)(97736004)(54356999)(6116002)(3846002)(5001770100001)(50986999)(47776003)(9686002)(77096005)(101416001)(586003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0665; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwNjY1OzIzOmVHM21nOWRLMDZuMWphekd1RXFlYWRpSk5h?= =?utf-8?B?Q1JNK3FQUUFnWjNqR0cvOEZ5WnpEUWQvREZtbC9qNHpsSWhxSGlxOEhRVzBy?= =?utf-8?B?UmsyLzNCZzZ2OC9kU2d1S0M5SzJtUmJCYmhCZHA3VExQMDA1RG5PdzJ0OFNx?= =?utf-8?B?OTU5QmZMVE9sNDBxcDFRWVEzcDhEMlJyaUEyT3ljUGRzcG5VNnUySmpQTTdN?= =?utf-8?B?RGRRenRvbm1zSFBRbUpLMVhXTVIyUDlTZnZQaTEyRWFjVjNTeTMxV3FoeEYv?= =?utf-8?B?bFFOMzFqNFJlWTJOeGpvR0xIM285elVhZDNoYllJcWNiNUhsS3I3ZmsrL1FV?= =?utf-8?B?NW1rN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In+AqH38sbGFK8zeJpRXZxGzpGDofm9/lTKdXyREOljMVhT6uz1EMASc+xSlu597/hasE=; 7:8l2NS8CyJj+EqbQG+TNqNNl/ZQXyavk1JGBjcQ0hvXfWKhl9R9Jz4AmuqQJw4SL5YxhSecZA5yVHpLxwqp8Tm0evIDt4grC2Cm0+HByqPOAaEgi7sonz/uwTiufOF5PQxC6fWbsqnj+eXe4bdgSKdCHnKQdnBjuA05+QpUphOTBvU5MZ5Q/XGTh06Zpz/uPohEW1Lw7ONnvEi5wDj6MgBQjZpWvqTZQwc2Wmp9Jfm7M7H9PXesCDvBcGEWrZ1m8W SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 20:nRqFnGXaRaeDGWy+GDZIHMQ/znmQH0atpDrQC+lV3d86VL2CPJt+FX0NMLbaH0lEs8Gz0HZhDsDrYrUVL4uWlV8yVc26I9vm3Jnaffukg0zP4LEC8FLx5rXtzpoww2d8xj0/+sd0osjnWqNn+sbpMlztERMyh5bJa14akZz13gdaGVJ3pxYMy9E8pgU6XdjDAWHS2aiYoxq3p/nBt3ZNAPsRkoxB1TuDSSrVYk7rGIqdqZPLvLWsqpyl7yBJSull X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2016 14:47:28.0413 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0665 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.42 X-Mailman-Approved-At: Tue, 13 Sep 2016 11:45:47 -0400 Subject: [Qemu-devel] [RFC PATCH v1 04/22] memattrs: add SEV 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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The patch adds sev_debug_mode attribute in MemTxAttrs. This attribute will be set when debug version of memory read/write API's are used in SEV-enabled guest. 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..5aa22b5 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 sev_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_SEV_DEBUG ((MemTxAttrs) { .sev_debug = 1 }) #endif