Message ID | 20230220183847.59159-41-michael.roth@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 C0293C64EC7 for <linux-mm@archiver.kernel.org>; Mon, 20 Feb 2023 18:55:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CA766B0073; Mon, 20 Feb 2023 13:55:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57AA86B0074; Mon, 20 Feb 2023 13:55:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F53E6B007B; Mon, 20 Feb 2023 13:55:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 316896B0073 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 13:55:11 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id F0CE840222 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 18:55:10 +0000 (UTC) X-FDA: 80488572780.03.52ECF2B Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by imf19.hostedemail.com (Postfix) with ESMTP id 03FEE1A001E for <linux-mm@kvack.org>; Mon, 20 Feb 2023 18:55:07 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=hRjW2oR+; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf19.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.236.40 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676919308; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UMuiftp5hLD4XlVZp8/8ZxOwpPrSyoxlNaZIJkx8b7M=; b=qXu1P6ghoBdC+kSsBl6Xw4elKo+kW3+rF5ouKDoyCeB8dJF8T02PaffoMXASmfz/CWWTAB mOecbXf/zSOqujGrvNBM7eQ5B1N3pCcg+SjxXPiteFIvG8lAqeWnyiRR4Z/1UgWdD2dxXQ sOWicRi/r2BvI/sDyKlXmdmXdMCNWqc= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=hRjW2oR+; dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf19.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.236.40 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1676919308; a=rsa-sha256; cv=pass; b=oB69cDNtfdpokM4oRuUOx+TI2kCtBGHxFUqHjua9U4PGCB42CaCsCD5c5YDicLGONP99CT GgsAyisA3GfG0y+5LBVc8OZT/b1R696iHQvBOrOEj8A/0z1VEoU08XpmuoVvTPbCIshFUp ZNnjIwjQKY30oj15cUCXlQtLEEdZUz4= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vqw3cl05T87AbQHDyU17PUrnQ8gByS7Msj8yjTjLfmlnEwfwzYPpdk+hYyyfPANzCkitMYlL84Jwi98E651vJj8hYfubhhjvCpkwuFgz2nIf0O7bd4ucrh8uUvkZRspzZJsqusFRoT5HIKVmXK9FTMckcedU9SIrXS037NnB0/2SUlGyDQIXX+T0wPZuGrO6YsrEYNy+ujq70auXAvq9TDuQ76bZT1g1Sk0z3UsLOHMRynUFlugz2lkEpbZpGXmZmk8JLxhwBSX5JTI0zCn4aaj8MS/kYM3sSQJwN7Mn7RXSNSbQaQsjtLI36HlgyEtndY49Z0k1CICSGQ0I4OX47w== 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=UMuiftp5hLD4XlVZp8/8ZxOwpPrSyoxlNaZIJkx8b7M=; b=kTdcdVIHFG9oZhLcMVhkG39KVVpywKm655eGbJ+BqsNWtNwst0kz+xDf8wSfm4EyFLnNbYsOMNon+C/RWJ30QBHDdBO0XSTpne8Xb4SmAOnHn2jcFc2jWBTggd0rxG3TRUE3QQFgp0HaQ+2x8iRZcT07Xp4L6oxOGSvIFFGb1kpXBtsMoIiVx6DzQLaaUV/ELw94+VFXrX8EFEb9ER8VA32OmF9vTl6TGTiN62wr2PcbkqZcWbGdmcWvLtgnZ2+y5xO8nmBy7/g+vxsuNHIu4j8aXfJbdrYJKYKzLODwmc0eWWS6hG3CECdWyBYEVOfPct3R2dX9N4gTIZLe8a5J2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.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=UMuiftp5hLD4XlVZp8/8ZxOwpPrSyoxlNaZIJkx8b7M=; b=hRjW2oR+acSQFeXz3mjy4950jU8Y0MeCTw47n5OMKVOtYV+FNfEB/c7QwYdTwDB5t7faQf8yyAWX6W2ZGG1fExkWyU+FISJQTPo1M4M+TcoT5pg9rbT6PrRDFpiZJQYHoszxzL1QqyMeK50VjugNJcEBxRf53u86u8baIUppeJw= Received: from DS7PR03CA0107.namprd03.prod.outlook.com (2603:10b6:5:3b7::22) by DM8PR12MB5448.namprd12.prod.outlook.com (2603:10b6:8:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.20; Mon, 20 Feb 2023 18:55:05 +0000 Received: from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b7:cafe::54) by DS7PR03CA0107.outlook.office365.com (2603:10b6:5:3b7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.20 via Frontend Transport; Mon, 20 Feb 2023 18:55:05 +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; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6111.19 via Frontend Transport; Mon, 20 Feb 2023 18:55:05 +0000 Received: from localhost (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.34; Mon, 20 Feb 2023 12:55:04 -0600 From: Michael Roth <michael.roth@amd.com> To: <kvm@vger.kernel.org> CC: <linux-coco@lists.linux.dev>, <linux-mm@kvack.org>, <linux-crypto@vger.kernel.org>, <x86@kernel.org>, <linux-kernel@vger.kernel.org>, <tglx@linutronix.de>, <mingo@redhat.com>, <jroedel@suse.de>, <thomas.lendacky@amd.com>, <hpa@zytor.com>, <ardb@kernel.org>, <pbonzini@redhat.com>, <seanjc@google.com>, <vkuznets@redhat.com>, <jmattson@google.com>, <luto@kernel.org>, <dave.hansen@linux.intel.com>, <slp@redhat.com>, <pgonda@google.com>, <peterz@infradead.org>, <srinivas.pandruvada@linux.intel.com>, <rientjes@google.com>, <dovmurik@linux.ibm.com>, <tobin@ibm.com>, <bp@alien8.de>, <vbabka@suse.cz>, <kirill@shutemov.name>, <ak@linux.intel.com>, <tony.luck@intel.com>, <marcorr@google.com>, <sathyanarayanan.kuppuswamy@linux.intel.com>, <alpergun@google.com>, <dgilbert@redhat.com>, <jarkko@kernel.org>, <ashish.kalra@amd.com>, <nikunj.dadhania@amd.com> Subject: [PATCH RFC v8 40/56] KVM: SVM: Add KVM_EXIT_VMGEXIT Date: Mon, 20 Feb 2023 12:38:31 -0600 Message-ID: <20230220183847.59159-41-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230220183847.59159-1-michael.roth@amd.com> References: <20230220183847.59159-1-michael.roth@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT011:EE_|DM8PR12MB5448:EE_ X-MS-Office365-Filtering-Correlation-Id: 05a551da-a106-4f5f-910a-08db1373faea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VxR3T1TC5MHjMIrUsQ5/xuem8nkUHTZce9t568ha7mvcTv+iX+FmWSheWdcg6fDbcCYxQ5kVHvse5fMsCfryrgyYT28XZmLEgNIhxjFcei2NSke36zqeheCN5j6q5FAFDJUls5UuCeRtxTNfy2f1dFdA5ZoMEYTDVvSruVDWJQ8bdMKUQfRGCZPXEORIkHQF+KEmMhfu+9S5PxmsFHzGt2++T5N0SJw9uvp/+G34e7OUfijvBep/BSYmBDKQE8enJR1JxtF+yhBueEcv6LQgaMMy64mrXiK7Jgpnf8z0Vsv4u5DYV6Yh5KKKta1iAXRLlDxX7bjp4cAb7Gz560BZjzEb87iWEVw6UtJespzCrGy/rReL9sgCLBrU/P+j0mMiceQ7oug6+GhRrengZxx5IqUZe5abBbnc929AItSrTge7VkNKlSCLcZcqaxKmseXhSo0BGgt5acdN4eYb2u02vrbEbVsIdy1CVtwTsn+E4Q4vw2nYE/aagRNG7b/GQk6A5+uUbQea3zpc06mMUNc5BMSniBOcSY9iXdxpuVpSGXpLTZOImdNM7v29zjQ8Jr3F/l1H6eKyEZAQqoAfAFiuz1Dmy995KyGEnMj90L2XtbNonGuOTaGVONSgHXUSaHAxtOdPaLHzfpOOOdHWb/86DG2iVShLfXz+8Lw9c4DUnETaaVlY5eOn4oq4Y5s6tGkYvQ+rhCyMv/Ux6A5/kyTc6ICa5myBPPz2KTJB7kufoPA= 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:(13230025)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199018)(46966006)(36840700001)(40470700004)(7406005)(4744005)(2906002)(44832011)(7416002)(8936002)(36860700001)(5660300002)(47076005)(83380400001)(426003)(36756003)(6666004)(16526019)(1076003)(2616005)(70206006)(186003)(26005)(81166007)(356005)(86362001)(40480700001)(40460700003)(4326008)(82740400003)(6916009)(70586007)(8676002)(41300700001)(316002)(478600001)(336012)(54906003)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2023 18:55:05.4119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05a551da-a106-4f5f-910a-08db1373faea 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: DM6NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5448 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 03FEE1A001E X-Stat-Signature: o6enromsg4wida8s49cap5ttwethi5fw X-HE-Tag: 1676919307-445140 X-HE-Meta: U2FsdGVkX18578KbhjTiPwoIneZJXeD9tOrJ6Fatrke5dHowuw4IKCL4tS2npQbviFv7DWqBpLLt2AIhSKgyLut+zVtxiLK+hHIeeuI1rPvBD2u7tWfMbpGEGaEKSGAgC+plcJs+Pplyrkbj0PUdm0UAOtUtcyrWEdutgb58oBc8rXBUwz37laA/WuwAVgi9QNlJI2KxF9z4mwJTa+p8Rucy+YBUrTJVY3rdvnc7/PWMYyYA98agx+G0k8HzCnIAjIbJscR4Xp/n1T1jtdwFNKomnjEoYeMw2wvBNJlEqm1VSVX49YIYIWuSNDoa7jGk/elHnJBbCOMa8D0NXHGuBqpyCHh67XxzU0KI4IOuo4RfzmiSO/9GBFydvBqrSdsEWjVsSiYuzHQTIiobJoc4LuL4aquK/xNI9NgwCddbXLBtKUmtUeVf1NB8yVFXn6d6/B5AS9ViJ95ROsDcUGm589xOrcZl8m5W3w2o517//sGA4/rz6mmUfxz3KVhn+2fLQgqm3w7UwwOyK2P8kQFw/mgJLMYLAYE55lSDXc0x46ZABWLeMQcM6CwWzLCXgjHPqwa9aITuTcOdvBJN/IezPeJ7IFlbkyyrdbVoOO7hLuL8nWCSDPby6MfooGpMAznTRHU+Xrzmepsh6GjGyrCBbayS7rSnYD0kBVqaQ5ri1qyr/onMQE0SYykgEiXIinJ5HcEg5Mhd3a9NvlJaMJyj4b/uheSADvO0Ykw8zHd3cPH88xQlvZsfzqcPZ8cjyUyk5Kbhy8ktwXS927BkHocA6cuZPn0yGfKqt9C81eUmXoDZ3AaiNnFX3ayuciuSDSKPxZm9ofm31E8AzGCt+Zbnqjn7Gbo6hQO+4JNbXCarAIPc5NeOXnqRHMRorNtPqLfFg9PDNy34NtcifEq/ruSvGe5FjSs5ErJIX8C4hMXa0ZTEfi98cyLWKS8XtGp1R+VcA7uVpeCLjCRotQg/hrk /vbCD2L0 5/RbA6G4yIdPGQalFMgTOGV1mjxPhvS/1jO+cT+hD970GwArN2uyss0w/pJbP7rutAEXH8Ll7IBdqocjtZoRD0OZDG2ZVvCQxvnCXT5b6PmUXUdPlXsVgUJ2onidj0DgOSYsaBtCvmzgl29CeqYvgn0ey4wSMtw43vo63i3aWi3ojSUBUK1KQoO4geHT2iglyChoooMSzvSNJFfHkZYawIYATBSiMLJZNBHUX4/hJ2QZ4qrDzskfJaasppaxUy422IytG+9Wl1dS0Gj6JmYw9IXe1tmB9kASkbVKbPjsl1A6wXT57LXcEJ8Wkk2ky9KS3w1ohZe/AbqiLLTqB/0byvJS2zFn6wYuTCtvSkvaJtqtlq/0/iKtWiuLbTQ== 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) Hypervisor Support
|
expand
|
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 2bab08a5b5d7..6e684bf5f723 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -279,6 +279,7 @@ struct kvm_xen_exit { #define KVM_EXIT_RISCV_CSR 36 #define KVM_EXIT_NOTIFY 37 #define KVM_EXIT_MEMORY_FAULT 38 +#define KVM_EXIT_VMGEXIT 50 /* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */ @@ -527,6 +528,11 @@ struct kvm_run { __u64 gpa; __u64 size; } memory; + /* KVM_EXIT_VMGEXIT */ + struct { + __u64 ghcb_msr; /* GHCB MSR contents */ + __u8 error; /* user -> kernel */ + } vmgexit; /* Fix the size of the union. */ char padding[256]; };
For private memslots, GHCB page state change requests will be forwarded to userspace for processing. Define a new KVM_EXIT_VMGEXIT for exits of this type. Signed-off-by: Michael Roth <michael.roth@amd.com> --- include/uapi/linux/kvm.h | 6 ++++++ 1 file changed, 6 insertions(+)