Message ID | 20220209181039.1262882-2-brijesh.singh@amd.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF00BC433EF for <linux-mm@archiver.kernel.org>; Wed, 9 Feb 2022 18:11:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B5F516B0075; Wed, 9 Feb 2022 13:11:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AE64F6B0078; Wed, 9 Feb 2022 13:11:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9395A6B007B; Wed, 9 Feb 2022 13:11:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 84E376B0075 for <linux-mm@kvack.org>; Wed, 9 Feb 2022 13:11:33 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 4BBA8613D6 for <linux-mm@kvack.org>; Wed, 9 Feb 2022 18:11:33 +0000 (UTC) X-FDA: 79124034066.03.CD546BD Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2048.outbound.protection.outlook.com [40.107.101.48]) by imf03.hostedemail.com (Postfix) with ESMTP id A361420003 for <linux-mm@kvack.org>; Wed, 9 Feb 2022 18:11:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6JSAct7IUZpFy/1fjp6ttU8AqNG2IHIRG6Be6t5/Fyv5OVZsciYaO1NbiclNHbKJWkHgOSmOildeifnmJ/eAoSy5hWHPNjwNA2eS1PZkCoYXewqwKFrD7FAxUyYFaU+fn/DIDLiS5HkaE1DZYuc+nV7264oynsAkzRp1Vi9aiYPbCpCmQegmd7+bjhHoclP6+LbAHp7nZ1+ltttuLz3tgYi14TnOJ1z16TCMeGDfo2RCL2RMJflaNFPh5FWIE+CvnpBcZk6A4QIfskhQHsC4owiM62b+EipZN9Hx6/cIJZh6aOxv+zRgVBANnmubf8Wa/OfCBezkFrzvvvPVamF9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vqnwVrEtHATvzrrd42KATgZiqqkEKwU59Ww2A88lbjA=; b=E5o4kcYf7/I1j0mMYfjg+UOIbltymy0eyS8+1nBSAEUxmuTUNdu6uEWk2dZL61FUw5rFbDttrewLXlu5+HbBvgloIwBRNfGtp7YFqxPNauy6dNAJ9SVD6NYR8WnEJYF1bt7kw0AGaa2f1zYNf8G1henY/U5dG2ERb5Xc2uOuvF9hLYtdSPJWazvZ4KhM6qKNooC/+OqGa3eBXaLthIotZSEcim8y4gN4ys49n5LWe6Lbs4PAXBajoM3LdLtGbDMkZdLu1iY41KYTDQuymTg+AnqUZQi9KbCT0kVRiInD//rQSj6j9jXH8D7nfH4SKRQg7GsXH5p3aw1kG+8dAbsggg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vqnwVrEtHATvzrrd42KATgZiqqkEKwU59Ww2A88lbjA=; b=iGidzl4Y+EcgJlqlNcy5JJNEBpA5tC1JwQ8YgSloOFMo0qZeFt5lz+Q7q8GWN3F7g934a/0/tw131phwAFwEabRA2VKEd5obeTAPbhRPUEOY/WYV4dZOV0OFsDzQ3E34RGsj3xDknCreECMWNqhAEVSiu0nbQVqmavQPhmLXpI0= Received: from BN8PR03CA0025.namprd03.prod.outlook.com (2603:10b6:408:94::38) by BN7PR12MB2802.namprd12.prod.outlook.com (2603:10b6:408:25::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 9 Feb 2022 18:11:28 +0000 Received: from BN8NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:408:94:cafe::c6) by BN8PR03CA0025.outlook.office365.com (2603:10b6:408:94::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Wed, 9 Feb 2022 18:11:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT005.mail.protection.outlook.com (10.13.176.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 18:11:27 +0000 Received: from sbrijesh-desktop.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Wed, 9 Feb 2022 12:11:25 -0600 From: Brijesh Singh <brijesh.singh@amd.com> To: <x86@kernel.org>, <linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>, <linux-efi@vger.kernel.org>, <platform-driver-x86@vger.kernel.org>, <linux-coco@lists.linux.dev>, <linux-mm@kvack.org> CC: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Joerg Roedel <jroedel@suse.de>, Tom Lendacky <thomas.lendacky@amd.com>, "H. Peter Anvin" <hpa@zytor.com>, Ard Biesheuvel <ardb@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <seanjc@google.com>, "Vitaly Kuznetsov" <vkuznets@redhat.com>, Jim Mattson <jmattson@google.com>, "Andy Lutomirski" <luto@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>, Sergio Lopez <slp@redhat.com>, Peter Gonda <pgonda@google.com>, "Peter Zijlstra" <peterz@infradead.org>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, David Rientjes <rientjes@google.com>, Dov Murik <dovmurik@linux.ibm.com>, Tobin Feldman-Fitzthum <tobin@ibm.com>, Borislav Petkov <bp@alien8.de>, Michael Roth <michael.roth@amd.com>, Vlastimil Babka <vbabka@suse.cz>, "Kirill A . Shutemov" <kirill@shutemov.name>, Andi Kleen <ak@linux.intel.com>, "Dr . David Alan Gilbert" <dgilbert@redhat.com>, <brijesh.ksingh@gmail.com>, <tony.luck@intel.com>, <marcorr@google.com>, <sathyanarayanan.kuppuswamy@linux.intel.com>, Brijesh Singh <brijesh.singh@amd.com>, Venu Busireddy <venu.busireddy@oracle.com> Subject: [PATCH v10 01/45] KVM: SVM: Define sev_features and vmpl field in the VMSA Date: Wed, 9 Feb 2022 12:09:55 -0600 Message-ID: <20220209181039.1262882-2-brijesh.singh@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220209181039.1262882-1-brijesh.singh@amd.com> References: <20220209181039.1262882-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8af501bd-bd88-4466-5803-08d9ebf79775 X-MS-TrafficTypeDiagnostic: BN7PR12MB2802:EE_ X-Microsoft-Antispam-PRVS: <BN7PR12MB2802082A81A6C0C0F18C9E6BE52E9@BN7PR12MB2802.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VCQNjFtMYF8x3rhGEioKcJn9ZQ+ZIndycKxgiLT0A6nIiNdedqoJd6XsYEoTl3alH8WGSK2fR5GNPLnAOOs76Z0k4dvpY/nl2+wpQLy0F7OL2jLzumm1mIwcgqN4/9H9XVJjZSA1daozW9zhPoGO6epyae48accDyzhIJROk6S6SBowxoPqw21Syjs8p+xOqqroZ0ey6vVOH0YwF1xjT2GHIkRV7Cj80ws3TCRoWlwev2901YSdgx4HYVOiJH1AhFhFE0U2D0zMjgEcfvDLu2P02PN76Q+khk9YLqw4RLhTwf3PpClXCt+lEUKJEbm2qNZXkfLpZpbm2JiTd/nXOKB6ZPTCtOlHWYiorH6A4f64au3cA0uXd+oGlXz2aVdYtHGb6RgbM3U3r8Xsqbli/Xkc2Qw0HD7E/LMbBf8RtBoWfzTmrXOXbwWI3gI5WNibZKIaOvSBOafYSfGQO/y+f8Lo5xP9BnKErpz9z5SXmoYWxTq25bZs/Nu9WDkd4MHTrj0bmKZTv3opFuaoxBit6tU0+LTTxax1vz6pfGmVdmDgjWasqy1dmXo6IOeBF5wxwCJhsLTOXnBnrdFVms9z+3TcblpFEy3ydLwezuie4XGJkWiNNnd0GTJ1wf/8doTcFVkmPn/Hgtx/H8h1D3lLhePE+ezw6zgypZPxo829G3a1L7y3csCvJWumpgZ+izE8G35OsoMQpUbwWWQR5AUdv4NLjqnggfKabIpurxcNy7mg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(47076005)(4326008)(5660300002)(7416002)(8676002)(7406005)(40460700003)(83380400001)(81166007)(356005)(2906002)(36756003)(82310400004)(8936002)(508600001)(44832011)(54906003)(6666004)(2616005)(16526019)(336012)(186003)(426003)(1076003)(316002)(36860700001)(110136005)(7696005)(86362001)(26005)(70206006)(70586007)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 18:11:27.9353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8af501bd-bd88-4466-5803-08d9ebf79775 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2802 X-Rspamd-Server: rspam11 X-Rspam-User: X-Stat-Signature: 9httmt9tod88yk198bjawfxodzdothru Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=iGidzl4Y; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf03.hostedemail.com: domain of brijesh.singh@amd.com designates 40.107.101.48 as permitted sender) smtp.mailfrom=brijesh.singh@amd.com X-Rspamd-Queue-Id: A361420003 X-HE-Tag: 1644430292-997862 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Add AMD Secure Nested Paging (SEV-SNP) Guest Support
|
expand
|
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index b00dbc5fac2b..7c9cf4f3c164 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -238,7 +238,8 @@ struct vmcb_save_area { struct vmcb_seg ldtr; struct vmcb_seg idtr; struct vmcb_seg tr; - u8 reserved_1[43]; + u8 reserved_1[42]; + u8 vmpl; u8 cpl; u8 reserved_2[4]; u64 efer; @@ -303,7 +304,8 @@ struct vmcb_save_area { u64 sw_exit_info_1; u64 sw_exit_info_2; u64 sw_scratch; - u8 reserved_11[56]; + u64 sev_features; + u8 reserved_11[48]; u64 xcr0; u8 valid_bitmap[16]; u64 x87_state_gpa; diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index a290efb272ad..cb447eecb9ac 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3095,8 +3095,8 @@ static void dump_vmcb(struct kvm_vcpu *vcpu) "tr:", save01->tr.selector, save01->tr.attrib, save01->tr.limit, save01->tr.base); - pr_err("cpl: %d efer: %016llx\n", - save->cpl, save->efer); + pr_err("vmpl: %d cpl: %d efer: %016llx\n", + save->vmpl, save->cpl, save->efer); pr_err("%-15s %016llx %-13s %016llx\n", "cr0:", save->cr0, "cr2:", save->cr2); pr_err("%-15s %016llx %-13s %016llx\n",