From patchwork Mon Jan 29 17:41:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10190217 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 52B8B6020C for ; Mon, 29 Jan 2018 17:43:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F5FE2866C for ; Mon, 29 Jan 2018 17:43:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4412228776; Mon, 29 Jan 2018 17:43:34 +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=BAD_ENC_HEADER,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 A96DB2866C for ; Mon, 29 Jan 2018 17:43:33 +0000 (UTC) Received: from localhost ([::1]:53642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDSu-0006pt-OQ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 29 Jan 2018 12:43:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDRJ-0005VL-U7 for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:41:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egDRG-0003Dx-0D for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:41:53 -0500 Received: from mail-dm3nam03on0615.outbound.protection.outlook.com ([2a01:111:f400:fe49::615]:51935 helo=NAM03-DM3-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 1egDRF-0003CJ-Qn for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:41:49 -0500 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=kdWO/mtApKHXW47zfk1e22t7/GIj+0zSwHMc9pE8lzw=; b=5ZmwjeHiIUwRVJaqhCzbkrZUt3zZ8EHsKHxnOFMjgx+8fda/O5a2q8VoRCaBaiQ51KoPX/eu3ym4cZ3C9/sSsubSNm5KCurK5Bzzd+cYyhtu5sOSWF7kzTi4txH4VF/aPSk1YK9yCcimsfnsznAZK1ciVEcV2uUlGCuMfQ0K6Ek= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 17:41:46 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 11:41:10 -0600 Message-Id: <20180129174132.108925-2-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180129174132.108925-1-brijesh.singh@amd.com> References: <20180129174132.108925-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR17CA0018.namprd17.prod.outlook.com (2603:10b6:404:65::28) To DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1350bb8b-e28d-45f0-a61e-08d5673f922b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0154; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 3:sSnMKlZpk4z8mQfwAzzM4XZ/aKm9ERSUChAW/MHAkS++DKgoXidbkK7s72gG3S6Xn2I6/XHxy9TwXU59w4pt2ACtbYd0xIkdM926JEzVTj4uV4d3MTsVUdNSKN/dRrsrqvIGAM9YvYOyM/MhDmUVHUvBHD1zRzdt48Gz/SV6O0zmOTOi0Nc8TKazlkuz5uBEKU6NTpIQgE9KmDMdv3inCZvIPpzzaXJkUTKC4f1plThp6+Q4BKml/YNyfpoQvbxt; 25:HSllL0uIRcoGxRB5OR03R5NdvxwS7MZJwkZ3reHUCTvo5xcV5rKcQxSUnAKM7wUniI2Bt9mzb3x5vauKeN3Lg+iHjkWEI0Ic6pM2aPvL4dazBLSctRfMWQ4E6Xm6KvyDrpPSU+Y7g5UG4Bpow4AUwi7+luyMH81nAX1IDjuRlGRd4uZ3fPCyRcDtIq9PSHMw2ZL4gmCWZwLNO61kYfQzVB9Degl27yl/kRIC2Ep1WH+dbPG9te8W9ntK1jiz59DW3R2QjbhW0GHHtVzsTJd1ulPCJBGchkCGluZOjWyurpBAgMwinhI2SYb8+CPlvvNmqy8jGSCFYKS6Cldrwq7eUw==; 31:MsFWntahSEb4kqFpbExOM7oHFShpEJ2dOGvFrXxRV3Jfex62uW0on+j/7eVGN2Swk6qFTvZ4iKwf4pWjNuNK9AOIkyGgm8741u/AcQpYEB/zkzaPPytstu6Kxw4DpFgOEpicJAaJWten1hEKWEi1NgLT3CMIxeeYj9YY1A5mYEA3r8ag6+K6HlR7nXHO5kBF0GTLYLE/2oUHfom5bmFNk35+fPCx53iZ1Uj+JWQd12w= X-MS-TrafficTypeDiagnostic: DM2PR12MB0154: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:IasQxKXD+GqeuaEzYXXf6yTPHTSZs7ZKYACidjCLCVGKKxUYTbUZmGoI+k1f3uF8iZCeo15NZp7J3MAj8cOHS5Lu89wUw8+7zogisIKX/+6wxvFM9tz38l1XdFesHOE16jkbZxOXhixSv/j5TK3aakG636RzVi7Frx4TT1t2piyzZiS8HUNxJUcsaXm8BJ8AhKqDFvuSWBne2BwQ1RksYg9dHm0KDnpY+Iz3e1VaZTxqTNwLBE+Er+asLzlXoDOy0BeX1PiNdw03iKs/C7MgU14MUwyCpUz4aN8056vhMJVRwFgG/H8zfO2lfCOGO2hJcm+4tfbI5ocXiSNLIHH0cWY74GO1NJuIPPveRfI6lnpdQAETrgIDLT94wOrkXGMKeo7qsVPzLHnx2tf4/SRrKjxs3605xT+u72qD2eC+fQHbHIUA/nkQU+28I9utBQJGHLlMM7wPpJr+QdUP5IWx8D6mFnLnsGSSgZFCfkO3FvCwM+xZBqeR3P2Z/iV+qNrC; 4:VWH9Rhl8VblgAelRWZVnF741iyoIDCVpxhfqmj86vNJf2pje34Xc0yy+pH5BjVDNwu0U8bEjTCOOUGLVy5xhAtf+pyFXD6KsH1HK7TdTPgZ16NCrcq5SUulKvLDb4nc6exU8PKlAyDpW6xAt6BQkDwRiCOseVlHsVeDdtwK8gRWWMWzlw8fX33KVYfVYth/NDjdzlVAJGZpsIqgrCpiCvDm0k6wkmLsyQy5hPT2CjEtLka9SqooSgc+NkfIpt9lsNHMc9QqLjHKc+KqyYrZfdeGh/5JWGpAHE9DN2mfNRs3w9ocsNAARWWIoGlWRl0Yh49QWzw37fRc8OH3jokiPMQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:DM2PR12MB0154; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0154; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(39380400002)(396003)(366004)(346002)(199004)(189003)(48376002)(8656006)(39060400002)(4326008)(6486002)(68736007)(36756003)(478600001)(26005)(97736004)(16526019)(53936002)(386003)(50466002)(86362001)(25786009)(8666007)(16586007)(54906003)(186003)(47776003)(59450400001)(316002)(7416002)(305945005)(7696005)(105586002)(106356001)(76176011)(51416003)(2906002)(81156014)(66066001)(81166006)(8676002)(2361001)(53416004)(3846002)(50226002)(52116002)(6116002)(2351001)(1076002)(8936002)(7736002)(6666003)(6916009)(5660300001)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0154; H:wsp141597wss.amd.com; 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: =?us-ascii?Q?1; DM2PR12MB0154; 23:JAt0UbsPr6JsyOizkyK1qHcch9rFBn6kIF+OtnD3e?= =?us-ascii?Q?O68K6FlOa90ta1V8MWRAFEQeoshYauPl3vsXpbaHFuhNm0W1HWBVxjQ0HPN8?= =?us-ascii?Q?9ShiqvqJuiBLb06Z2e9HLXqrlyL3ujJhoIqiFbffz6JwlXbWtG8PoXflkNS9?= =?us-ascii?Q?P5eMKskdM5j/EF0GTQBmVcZDdjcb76MKEJpCB5Zbd9naLh0uacvnKTXqhDlN?= =?us-ascii?Q?9aJshHauRrn49xPm9KXuq8wyUhKY7hiJ0rJJ8cHRNXkCe8CF4Eu/gvKXG6qX?= =?us-ascii?Q?wDJz44SJ1O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mJmRVMRkn1fu517Y7Cb5kJfpYKpk8NMRmIsZXPDC87MKspLK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:GSZxhXpqf3RiP2+CfntM59kHePM2pAaMByLfUSeU20tFDeLhVqdhv4BQ4uvOM+mtYz9momOt4OIIMpt+s8nsSyDa3VPAZAGAc8ffV/Zw8UBfDMZ+lDXbBSGrI3uCXJdGaE/bSrKBZPC1GpBnsCBv8ebdSlHCmdbjUwH669fdy5bBXeipQRBi6hH0ELGdS5P0+/lydeuLzzhmvwlsrubJgvFjkgmJztXFt85tHP4rOJs0zxEsGL34iDILAOFGMXvn X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 17:41:46.1352 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1350bb8b-e28d-45f0-a61e-08d5673f922b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0154 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe49::615 Subject: [Qemu-devel] [PATCH v6 01/23] memattrs: add debug attribute 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: "Edgar E. Iglesias" , Peter Maydell , Eduardo Habkost , kvm@vger.kernel.org, Tom Lendacky , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson , "Dr. David Alan Gilbert" , Alistair Francis , Brijesh Singh , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Extend the MemTxAttrs to include 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger. Later in the patch series we set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This patch is prerequisite to support debugging the encrypted guest. If we see request with debug=1 then we will need to use encryption APIs to access the guest memory. Cc: Alistair Francis Cc: Peter Maydell Cc: Edgar E. Iglesias" Cc: Richard Henderson Cc: Paolo Bonzini Signed-off-by: Brijesh Singh Reviewed-by: Edgar E. Iglesias --- include/exec/memattrs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index d4a16420984b..08099e4f7e72 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 request from the debugger */ + unsigned int debug:1; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this,