From patchwork Thu Feb 15 15:39:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10221949 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 2B3E5601D7 for ; Thu, 15 Feb 2018 15:42:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B9CE2942B for ; Thu, 15 Feb 2018 15:42:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FA9729438; Thu, 15 Feb 2018 15:42:09 +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 644EE2942B for ; Thu, 15 Feb 2018 15:42:08 +0000 (UTC) Received: from localhost ([::1]:60706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emLfj-0005YU-Ir for patchwork-qemu-devel@patchwork.kernel.org; Thu, 15 Feb 2018 10:42:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emLe8-000427-UF for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:40:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emLe4-0003LH-QF for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:40:28 -0500 Received: from mail-bn3nam01on0077.outbound.protection.outlook.com ([104.47.33.77]:10752 helo=NAM01-BN3-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 1emLe4-0003Kg-8G for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:40:24 -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=E8M4EA3Zd79rH3yPVUBNLvZZkXUQLCK34hsYfK5aj6rocb4+iDyVq+LJIgVSGpzQXUrDmdLeSQx+bRCAQiNShP1xtTAdxb1yuiTErA1WmIINPz3l7BXbEl2/YqT17y1XdQrak3eDMERI3j3LPVogogFkaK9T+3fck7a2Al8rmgc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 15:40:20 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Thu, 15 Feb 2018 09:39:27 -0600 Message-Id: <20180215153955.3253-2-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180215153955.3253-1-brijesh.singh@amd.com> References: <20180215153955.3253-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0044.namprd04.prod.outlook.com (10.172.133.30) To SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 08870fd7-2239-456d-f6e8-08d5748a6c78 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 3:hBZp8PB/IHFpsD9VCejifeWSO+PTPA82nIieFqixdMvNuOay2MkmX1hz8QpFog/xV6ycuWAT5OlcJKECjF9c1xoxLpkGizX8NCYziOeIRy7Sk3aVzhEJl1Eb1B+mK/NmC0xqoBvtH0lzUv/aaz5zawvHFOVVi0bwI1RpJpXSSnA+w/wdSmhBwsMMrFdAd6EeTUYNtYwhTLnjvE6mvI78JlV7v5sDSmtjooYdgDrfZtlRkM3ensLfnrrFfDINDGB2; 25:jCTmrYkQfpBBQZFZSomY0toE5RJGWQnloWLmdE6B7A6rx23ZbiCpE6CZmAo1yUf3YvwFdchUG0jb+S+lQCEZdqlyRkRzCwBstJctpShD75x8v4FFDmjMxWRMwl1KTo5VmaE/XmO0QIWgWx1PCdNelhTzEf48UpgcPMO+Sban9uCODyOkSpLsTmzDuXzmBU+5t39qToWeL/n0+7C5qr97T3VE1SmbKnd4J/69sHIWujVv0mvPyjdQvApbkeXwfKhQWJN9Sn5iKKJxzSrZ9IRAz0b9jNkJYZ6JEChqH2UxqKUVFyP4o8RgJ6y7XBTMwmVOc74tjxL2Y8UDZGTQ6T14VQ==; 31:njoXrdD2n1WFshVEZxMmuYq8yMnLOA3F5dqEXA7n+ebFnpTOSZuBrWAkacH/mGlyuRnPrxke19hFNkicu20y10Cstmrc+Il0gZDBn1q78GdtyJe+rYBn57ANgqSg1zzeHxQ9V+uelaY5wkcPsvusj6bbburoDfHwdavzf0m5ByG84FMX0YJFwHhWYIbputWmg0EK0rzO5BKsiF7WWS0Jf9avtxIp3DIZ24Jln7vcZHA= X-MS-TrafficTypeDiagnostic: SN1PR12MB0157: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:/0cGBxDl0QC3nRQONesCPsC5xC2undPt07+xV7eSnNe6l/Y7WCTTovx2zDKnWk/dd4qiFoNCMfvbZXIt2AVbPfMKmcPOKMoO7Ke048m9KZRcT9uFWJhLQzx8l3Jpv/1Um3SbFoBAZnMXMMNl1nomnJdV3WLzJQbZ57HMOgqsv1/Qa/cfkPY4GO1IsbUMcO2FEeZoPQ2c8HTqax+QdB7mg4srH27IOXG4GO8bFAJf9IMkKuY4eVjQudIg+4NcWYU9f+0WLwf/01zoz8gXEsrRJO1UZRuXY3n8LESTWw8BF97krDtmfrJC9BCW168VzSkzwod/CRFTcMDcBH4ZmglD/3oIzX56pj9WB7KF6gMMk8blGWqL1svWd3KR+N1n7s9jUsUZ0XfOi5EqIRPI04Ufnfu7wl9386U9yptAaYHGP/THdObWAw1lzVnV4MdnXFehuq8UE+NRFHcz6qMJVDmiB0nYZmhNtKbwLS0iEFk7IS9/PdKpuIR7A0S0vmsHJuJK; 4:ob/GurNM1CabEIcfv3K6/qaElBvVDfUF36LF3+lfbFUxMjeKmD5dakuOnD3rtmVyl4RZHKWYsmIK94b1qs1v8Y791tX2IGA4YXtxjNUttNx7oySViiWCd0Rwc599ELswXzSCUqEPkUaRZMkCpW54emxhPK/s1n8EfOsn1poulXJeWEwnlN0UKutP7jT/MAVumsJwCYs2i06sQQJjdI3K8s9eb8i7Yoc2AWtCnrpYl5tigO7PnJk1oFKgJknBRqhSDfraT+QsWfKRaEdyjERzkCLXn/m1S70srJru32/kiH0deYGnhgzQ9RoQNBgq8PjowesSdvnRyDVkY8JpLgibQg== 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)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:SN1PR12MB0157; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0157; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(346002)(396003)(39860400002)(366004)(189003)(199004)(26005)(3846002)(386003)(8936002)(5660300001)(186003)(16526019)(316002)(8666007)(1076002)(54906003)(6116002)(48376002)(50466002)(7416002)(478600001)(59450400001)(8676002)(68736007)(86362001)(16586007)(2906002)(50226002)(39060400002)(2351001)(6916009)(7736002)(106356001)(51416003)(8656006)(52116002)(25786009)(4326008)(97736004)(2950100002)(6486002)(2361001)(36756003)(76176011)(81166006)(53416004)(66066001)(53936002)(81156014)(47776003)(305945005)(105586002)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0157; 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; SN1PR12MB0157; 23:4u4R5ebvYeP5Hh92ahsqwFTjobHV6QQ+BTNO21g78?= =?us-ascii?Q?XMTka1GQpJYE6iMvah2ybHyOiUAYho3Gp/VqBu3Wr7eUZU5Tn6SSlNVjToCY?= =?us-ascii?Q?YmNO8bAL56Nd9dgmMI2ZE++uZ03AMlTM/+3goVktv34NRJaI+Go4wHIFzZ6c?= =?us-ascii?Q?lHpwVaTIggZAHaeQRzF8ls52YFQC5gK1jX98yCkcIeDylVnXR3ACX4Ni2Q9n?= =?us-ascii?Q?HL/Mji0Do0PEh2jBT2lxbOMEJhWDnrNcSX5WIZhheTZNw7flOMI/pFDMFpvK?= =?us-ascii?Q?u9yMfeTToua9hBVaZl0LM6fZ6/CG6Y8mD8/XKGlgxR7zC/AruL7DJbujG51M?= =?us-ascii?Q?/Q765gE87k3ed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J4qcQgeP?= =?us-ascii?Q?5AnbdOfnVUaKS8QwZ9WO6ofNhW5N5xkLymv/8fD?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 6:kaiWjJZSvxwns3cKIlCiFiaYQOBOIgNpoHXSh/FFGqsFMWEoz0NgZVA+FT4qpKSGmdig4H1XD80WYgK6mQx+H1gaCv87Ly/OAVCPauLHc8PXx66lqre8Nq9CsJAD8kjpCrg4OXnD0n6+/VQ7O9POVYT4nnMbpQvo/Wmo5AtfxWvo+eNpI8c/sJWkRsi5wcJCSJkq0/BWR5CRf1t7gWhoF6pZXdKlkgNYW1xQXkUGOes+1ar+c3mq6PztDBMTC1nboAWtI4RSYKaXWMc5ikru9qwru+RuLvngrwCuR2Un2MKnqVYyGv5mL8T492zD56HT9uUnLEvAeU4y0JVuKUdgi/kgCgwHuo1kDaRjBu19XEA=; 5:uGjL4ONQksnML3jkpy67e2sFfyJEim77wwWTpt4kF//EiUSMof1dT5ulDK1tEVw4CtFPu44pWtuX3qFPoCXzT4wkIaMHTmFJvlBC0/yX+H9KbtMKCas4JiYYgLJ38oUPDs0L7DwOVPxlpbSDjU7CcVxiZ133i/OcQaJizXtggW8=; 24:E5Pl+belZ01UoSJMhMyDOlEA03Cj03yEYEuFDDL/xbt0Tv51UYpZ6otF2ZX4YpXoLuK8/MqX+chH+qEs0X93J71XCU10BM2FsujQqjyGf+k=; 7:gJX7jC/yau29UUaCgI18R91DXq+ZdNCXuXRc9I6Kcer+hQteukyGC4rHht9dlMxaCBvOAgk+FdkQzz3LaV2P0JjDjDtzRVK3iZYWxlJgUe1flrlKmw4PjObQ5C2/uY/DHE532yUC/n8ZOVynCqdroW5ZlDI71JV8q85JAoCJySZ549EAJj9qPro6JNmUw49p5jciwRmJfXyFnI+qZ93Ess4My7W15fvRnbzfRWfGkBN+bkaOMo7AeTj89PX2Inh9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:q3VmNLdObw5vwe8rNoGYERbNZOsNYmc8f0LiZY6ObuG7wT9xltBJG8pQFJ+6WIBcM/0qxpi9Uzs+G4E/fOBYmNwFX03yFRcwiikPWvRAWiFytJE1ZRkww+0qb2P4P/tTlNNvIDIUvPPwrkZNfSLFKQpcVjGUCRXAuOtzeL3TsH6JN8oxVUbofHD3rH2e0ogTG5bpumsodYXJcOwJUiXfdy60H6No1OmvQNg/EcJRpSMt7bY+ON+DuglBhs4uWBkg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 15:40:20.1031 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 08870fd7-2239-456d-f6e8-08d5748a6c78 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0157 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.77 Subject: [Qemu-devel] [PATCH v9 01/29] 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,