From patchwork Wed Mar 7 16:50:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10264433 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 05ED4602BD for ; Wed, 7 Mar 2018 16:52:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E77E4296AC for ; Wed, 7 Mar 2018 16:52:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB2F9296A9; Wed, 7 Mar 2018 16:52:40 +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=unavailable 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 D8DB9296A9 for ; Wed, 7 Mar 2018 16:52:37 +0000 (UTC) Received: from localhost ([::1]:34341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etcIu-0005vu-EP for patchwork-qemu-devel@patchwork.kernel.org; Wed, 07 Mar 2018 11:52:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etcHW-0004aT-EJ for qemu-devel@nongnu.org; Wed, 07 Mar 2018 11:51:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etcHR-0008AL-Ug for qemu-devel@nongnu.org; Wed, 07 Mar 2018 11:51:10 -0500 Received: from mail-bl2nam02on0081.outbound.protection.outlook.com ([104.47.38.81]:60768 helo=NAM02-BL2-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 1etcHR-00089n-P9 for qemu-devel@nongnu.org; Wed, 07 Mar 2018 11:51:05 -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=5wh5sKoS1Kacg2awiZ/kpoN2AfQkpAPFPoXLNyQ12p0=; b=aPnC2jn4iMBMV0TgabNhjGdIZqyXQOYiEVIJvtqlQEvFs6zSfnlaUS3+suZ4Q21BLyqS4Wh2aE4UCAthjRu3E3B7knIxPY0amM1/89hSUj7CoyiNd2FGqn+LqVoTFISI7HsAva9c8suf7pqSsRcJwJMR3VxqYhEDfRYWPzchBbU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by SN1PR12MB0158.namprd12.prod.outlook.com (2a01:111:e400:5144::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 7 Mar 2018 16:51:01 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Wed, 7 Mar 2018 10:50:11 -0600 Message-Id: <20180307165038.88640-2-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180307165038.88640-1-brijesh.singh@amd.com> References: <20180307165038.88640-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0501CA0095.namprd05.prod.outlook.com (2603:10b6:803:22::33) To SN1PR12MB0158.namprd12.prod.outlook.com (2a01:111:e400:5144::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 99f4048e-1feb-42e6-7d50-08d5844b9c09 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:SDUZsNh9TYD+SWEpZAa1Si6QRyIz8+tLdiOWgIQ1Lkz9xpI7i+zDkQQhxmHDCe4wmWv10VBHfQ9PXopZTwkAPok0PQd3U2vHHM4UchhSAZR6845tHbUvChoR93yUc34IHm+LFtmuAu6jPZGXreZJXpcU+30dm8LzKwx+Knd3d8LjVqaIESWkS1scydaTpPNnmXv7g0hF7VGh5jEiv+anpGqpHstRsEx4wldKqgBF36kq27hvdroPYzrRjEkyb8pV; 25:INa+FH8eM/Ms2CUvs40AZk2cm4+/kJRdC7O54q1EbrKf15hb9rfNGicRESEkT1Ykd/MarIrWbyEVo7S7ozYX5/V0sod8llRGa82IjZn+0dnXdtt/M89bfGZd3phhcTe2xXFoozKeb/GtAwG9FnqZfIvIOMjui/IzjMgpHtbVKqyjfsU2Tz9OZvqpSLJBlki5ECKQ/gJFrXLz95E/DpqFMQe0xGhgEoiE9TIptX+zjqkP8hL7lc23/Ghak5t8F4w3S42OHgv9cyJn5FHjQSWI7P/74X18sVCi7wnUaBz3VGov9ldfRqywfuMcfyt10gIDufFhmwWRBCm+eJ/kEfqKtA==; 31:TfqPWkAL89Pbnbmkl9c99+c5qFFUXdW7DunQYOTaD+UnKBD9zENaWnh4LbXAsG7zojnLjy5VOxaidbW0EANdnoFlMFKa5TgOzuBeyTx1yPGNFSCJcuj3awS/bltPSNyL+8dGHYFsz88+k4fouwxGPYWNR/9PjZDQya/Je2GTvB8DSeFqLT/MZlrsoqjrehO8zZ/fqYHPPBHVjtV+uZzH7QH6Zo3lQSCK9tRG86N+b/Y= X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:dPDFV/9av+gjQToaWfWN68vX5uCxiSrreHX3bHRvzX4nhGqzeC62w2HoosvPb4tRGxkoDp0lUMt2rruQW9TGttQJ0DxfINcMaSUIsj17B88nrpWhvZWXwaja3R5TYhlAXUMyLL16KHoswpI6fmOfnNEI8Z+dWVfyAQrsgn5K5C8awLTlVzbzHs3DF06oVApO4y/VwMOIz6l/LldF1ZHo65k71Yhf2qFoHrr3Xzm1+h9JOiR3o1rQiwt05tRr/Iw3CJwjoEpA4v5EFo5ueMBRY/noXgTjebiZO5MY01jeQPoHLi3wdiBVwMARIdGJa7aohpP9mKKWiQnDTHy/nBtEZ3OoRjUB9kfzMcAvccysyhaxZIQ/L0EOZrCqs9aKl6T6reD3VLQ8hw3pQmCobYSOkir+4qGPzTWTs2AM9rLa9u88eI4sl1KthivrtUP5zvdO5JQwSDdo2nsgo7QJTNpQDS9jm6R0MarHvgBbXWRTlTt0NJkLyys+KlvOGz/IIfo7; 4:0B84104bEZSenpkM7ZiYxWd3hB+yC8eU3LuRdPo2Zm6rNwC0fS4FTngpSKxexZhxA231Y5UKxJUq/ENkRxEGmcx67ghrYBp6pMQ0BI+3v01N5m9isqoDEgXzpvefcXflcLvSQy3/Gf1/S+it2CqvuDEnfFqmJJVpeBtypIXmIw8aTnSozRcn47UMt7WGK9LTkBe2hxk45fbYaVuJU7mmeN1ObXrg8lSjh4RgUnMMfqRBRRj/8LITNksv8QhcoV8HfIEzy168U4fLR0inSMYMyafBQhx/U1CsTM8m9yRNutUd1cox7/6NKiSyxixeVppKr2D+oKg0yfIbfd4iwaJpr7Gx0om/JIzhVcEHiH6nNpw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(3002001)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0158; X-Forefront-PRVS: 0604AFA86B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(376002)(346002)(396003)(366004)(189003)(199004)(53936002)(8666007)(2950100002)(6486002)(6666003)(6916009)(53416004)(3846002)(1076002)(6116002)(4326008)(54906003)(8656006)(2906002)(25786009)(59450400001)(386003)(68736007)(478600001)(48376002)(50466002)(105586002)(2361001)(2351001)(86362001)(66066001)(106356001)(47776003)(186003)(16526019)(51416003)(76176011)(52116002)(7696005)(26005)(16586007)(316002)(50226002)(8936002)(8676002)(81156014)(81166006)(36756003)(7416002)(97736004)(305945005)(7736002)(39060400002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:wsp141597wss.amd.com; 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-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 23:eKhruLNaJm1/aEvvBpvPlLPp4q8R2e2mWZUqvCFCh?= =?us-ascii?Q?vBE0FXO9u42nH/ulWWXwqNXv/BelGDceqTwFsw3sutVUypo3jVioG5KHbIf6?= =?us-ascii?Q?9cmv38VqwIMrlkbvwL99QjayYhX1bcvUo/MCR3zLw//8w/cHBzGGe0AJ7M7b?= =?us-ascii?Q?8dJhjKWmKHQhrJtl+5jd8FLxPjCplE3m+4QByN0DrGm+3tymULUdipxdytU/?= =?us-ascii?Q?x/114ebsu8awEx4ovGqTTKZYwbdEQqL3Wn2Up7TQRsjfoWyN3gHmDpw4XsmV?= =?us-ascii?Q?06zH0o+VCGwOsZLoMWEbnq2t1fc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lkjg=; 7:GZtqwSyhoD72powY9RgHkwda0Ki04K4Qllv9S0buKGR8eVEMp04LBN2sNcwTKCpRgrolPnG7nvHZZofFEHySh4O3wyfx5pKAxZbqsnXpfx4/HGE6vJkU+izjhxoZaScyledepeDHUv9manpmYS5K+/hJG4DrUC3pJ/0p15ZiY/ZdfCQpdBsALWhpqOitym+5doeagUz6teP5nMZmCE4UIdAkV3BflP7vQMWw80Qq5hs4FkA5dfF6K0mRFgbwetok SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:fS3kX5JTmqXccMHsu3M2tlXSzLswMf7T6NHJcfOFIksc72RAci+iHjik1XEjgPAf6P9Je2uoRwcmnEmWhIefXom+TfWgyqf9/qU0BQ84T5HsGS06DzZ1Us3EaQ2Zlwy6rE/2l7FnS6K64oft/Hy0Z6eKtPa9keTy9pqaCNvVbOTnY5bk8b+ftcZbt2zKgvlwZviOiBzaP72bk3l9rvMv6/WqIc62V9VT5qyw+BnMbPtXiv0qFTXUTD7uLzY+L2Oe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2018 16:51:01.2605 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99f4048e-1feb-42e6-7d50-08d5844b9c09 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.38.81 Subject: [Qemu-devel] [PATCH v11 01/28] 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: Peter Maydell , Brijesh Singh , kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , Alexander Graf , "Edgar E. Iglesias" , Markus Armbruster , Bruce Rogers , Christian Borntraeger , Marcel Apfelbaum , Borislav Petkov , Thomas Lendacky , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Alistair Francis , Cornelia Huck , Peter Crosthwaite , 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 Reviewed-by: "Edgar E. Iglesias" Signed-off-by: Brijesh Singh --- 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,