From patchwork Wed Feb 28 21:10:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10249813 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 9F5D360212 for ; Wed, 28 Feb 2018 21:13:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A89E286F1 for ; Wed, 28 Feb 2018 21:13:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CB9128DB3; Wed, 28 Feb 2018 21:13:32 +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 F08EF286F1 for ; Wed, 28 Feb 2018 21:13:31 +0000 (UTC) Received: from localhost ([::1]:46955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er92Y-0003P3-Te for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Feb 2018 16:13:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er906-00016g-D3 for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:10:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er902-0005O0-GZ for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:10:58 -0500 Received: from mail-dm3nam03on0063.outbound.protection.outlook.com ([104.47.41.63]:8633 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 1er902-0005LV-9e for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:10:54 -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=WpvgXMHqQGKrfk4fW+lE3i85rGNxpxthqr5lXpsz0eqx8Y47cjqMGAO2ZUoIb84CY4s5RRtBk0+v2/DGB0hO/xjZ5HwFdCgOFNCIc+fEYHZ1B6cLcbT239xWZPuQ0cnoAnUUZLOD3GVb/5jjOrDNqKGzcW+Gmh0EEGPO+TkR1Pg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Wed, 28 Feb 2018 21:10:51 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 15:10:01 -0600 Message-Id: <20180228211028.83970-2-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228211028.83970-1-brijesh.singh@amd.com> References: <20180228211028.83970-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR10CA0008.namprd10.prod.outlook.com (2603:10b6:4:2::18) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7eeab639-5189-41b1-537e-08d57eefbfcf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:aFSV8HZ8Zepc+7a6G94Mpkbr00QID5Mg7GDUs390ybgUHtf3XyJ2r47mYh0JdX9KNQEMnKUnUXlXp9jhwTh3y0OzZ5jRvEbFTB8N5exonZ7vJ5a3L6Bgvcrpmowf9UA+u8/3nCwerGYybBMSZlGL6oSToKwdnuZB3bJ3WQTaxjRpC78s1NMUaUK8lVeo13NAfZgCElJ7bOiFMuhFyBLjZyOA+SZcLrW3PCx1gwJLjrJyb5n47u8uJyiC3HUYim6C; 25:byiALyXxAnRMaCENqKFNMo2k4rk2sj2GS1fjaVz7dDQVY/1ViVez86RbmzmQ6kk0VdOJbdayZzUWcoWoO4w4nfbJZEdNEwsRhE598kzVw95e6BZJuna9gGLus9uAi8yHa6zZC5Q9y8HRJJ3sgmbcgOftUCh7Co7SDMmSurovVtA9+ppceewb3bDnsIC1AnxvjhwwQXc/z/PQbEYg/fNBZL37aC3C3LctZv17BB67rL7e/EirwDx+TfW5XZsqS85YXbcxkM2ZB5qo6L5imMG19fXdwKglA+rhI44OP4pySt6eOIIr+1TegW9qSiT2W1A3NC+rb8sR5UZ8nan9b1gG+Q==; 31:ACQK9osMkSY4NSx289i39b2QAtl2TcswBfiZ2kfHU/0VI928hXlnVHMEd25poRpuTRaKlQUsLZiyPDJhyT+uNaiywhc+RDvVjvb0vFh2r4/xWErAeWej3OaJai3QCQ4sX2W/wsznPfwe53yOh2GwdFpcliEgKuQRo8HJkwFZiHAfGj4tPqf3vyW3FYjEjYg24H96euFXNgeQmQKIAoJeNot2cbSjwEAMixmKYuXLic4= X-MS-TrafficTypeDiagnostic: DM2PR12MB0155: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:XSI2Lz8avHOAFpDQ9IBVkQETQRj+Svf+qKnymXJpkaTTG174BVUVm/0pXCFHhyxVxNkrevDtbR9T/lYQSbN8iIANA3PrGHq6d/BuOxSc6inzPe1fpMCVJi49m5KYH9PG/0ZYf6gvnkCuwKgdah57MJRG/7kVyNwnQdXjL38iRtL7hBxrzd3wSvF4Qtiy+62YHQFXCgHw/wmXxyEpk4VhhHxe+mjV6vhGni8+TEcwWNcHWqJqLoZKx8AHpia2OzzsSIHRSQAfroU/5xBmlUcHPdIiSQU8p4a0H3FzQ5mHdtvkdwHikSYoo+4HspGyGmOCF4KwdhtQXOxO3FT4OU5Lw/fxpBtZh7FAx5mmohFZ0GCoVKss76feN+9/1nck5NUl+MHt9f45EUVFv3tnnRZOZ00T7jjbNF64S0GKlcQYtf878tXdbTOKh+edpctMUpM43Nm+c251m984sWV0z3LMah2IRcS/+LWedJuIm54Mj5PCATVtLQEdLP6o8yZNt1Wf; 4:NvosVHomJZOmlMdYhzJobLT2ENyclasy/FW/kIQie67s9IS6CHVZUPy3+fDZVtft/7ovTdoYGg3boayyJCp2l7irMLd4APqocrQ3caLd2aere0Y3aH5Izcyq/YSMRnJuF4yepBC6LTelkxvvbJ6VSWP7A0oePugyp2x8CXOnAe4qPZGIsIqpkmgpz9NP1+hc/ZyJMDSSPTVy5WThYVU7ojrBoZ4wPky+MF19KBgx6KOsQMy7ehdbuQWViXqH79Se2yXfuiCTmLM8HpYr9OY9qv40tosLADfUH4NBysmBLbufa3KHum/Ez8vjmix1Kk7RhQpkpHtF/AOE2jMR7KOGow== 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)(8121501046)(5005006)(3231220)(944501219)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0155; X-Forefront-PRVS: 0597911EE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(39380400002)(396003)(346002)(366004)(376002)(189003)(199004)(6486002)(6116002)(1076002)(2351001)(36756003)(16526019)(16586007)(54906003)(53416004)(26005)(53936002)(66066001)(186003)(47776003)(59450400001)(2361001)(478600001)(8666007)(316002)(81166006)(50226002)(8676002)(8936002)(386003)(106356001)(97736004)(5660300001)(2950100002)(6666003)(305945005)(4326008)(76176011)(7736002)(39060400002)(8656006)(105586002)(68736007)(50466002)(7696005)(51416003)(25786009)(48376002)(52116002)(3846002)(2906002)(86362001)(81156014)(7416002)(6916009)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; 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; DM2PR12MB0155; 23:OyMUdvJN31VO8KvfxPlkYpP2g0siCYErDq2+QILnx?= =?us-ascii?Q?+sLUE882TnYYiLgwDhuvd1wPpinlgTWSFlroACYAgGcRBB/LoRvSo6g1qqrI?= =?us-ascii?Q?Cre4u4DEA8t0tvspyXHQcADTuOjlLNtHm9ULF50DyzgHyzItwG7UththtWP9?= =?us-ascii?Q?GVMwyZ4n1+Y3Et6t98E1IM2ynxVdvpeiN4m0l8lHcCPgQwpilKH5OR3DQM7x?= =?us-ascii?Q?0Ccpb5huoHKNaCjjFrFRO3+95zCTcwgRVEt/Gt/wIv2Pp/AdSsCH0xycKhez?= =?us-ascii?Q?h6/vKWfviSMiotlacZsZnYxfakbN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2ge4j6ZNTSQ5ACkh1n/mf4jEZmJpEbj6hl2e3wjOFD390UXAfalLBnIyAVCi+dBFDxDSfwfg1oRkIukkk1MRST769tvHOj0l9PtVzOlrVgetvuk4g SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:S77jmph8/lA48Z6u3WlvQsf0y9ucAuQ8lfhxyI2IwX/Fc6sHOtB+taE28htcMGiVX9dTichw8EJuFR73TS1ULf20dRh8hwZHx/GaBMZi9zn+J8zTxlgVAZCIPy74s+FD6rgf6gwMwUzaVk13jb+irxMkGDXn6S1Rqtkxnkce/mc7mi26Iw5PeDBuKGUNS1LOBvUqmpsUynJWCUFaEXpn1JtHxCcUVPxwYiI8ikkqQvD5C7sxNlhIAznd4zhctXLO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2018 21:10:51.6549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7eeab639-5189-41b1-537e-08d57eefbfcf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.63 Subject: [Qemu-devel] [PATCH v10 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,