Message ID | 20230220183847.59159-39-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 3C882C636D6 for <linux-mm@archiver.kernel.org>; Mon, 20 Feb 2023 18:54:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA9F66B0075; Mon, 20 Feb 2023 13:54:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C59646B0078; Mon, 20 Feb 2023 13:54:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD3896B007B; Mon, 20 Feb 2023 13:54:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9ED2F6B0075 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 13:54:31 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 726351C5586 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 18:54:31 +0000 (UTC) X-FDA: 80488571142.08.C428A20 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2078.outbound.protection.outlook.com [40.107.94.78]) by imf30.hostedemail.com (Postfix) with ESMTP id 669A280022 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 18:54:28 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b="HUL/97eO"; spf=pass (imf30.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.78 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676919268; 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=Lm86L9ncTBUZoZWM3MdpTq8/bCwf/O3ttdk7LmSABfU=; b=crSPvJd2WwoyegXTREzM82XQtasEAi0osyXsicnDae5Fdydc9WLBQtgpjeOQGPBRXDzLt7 xRqBaGhxHMyg+iFZ8ADk1L4299vscL/RxNTnJYJUAwVgpB6NklTrvjC2S8xWrtxXbey4K6 EEK44rB8KNfI8snQYFuZAHnrDhWLZbk= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b="HUL/97eO"; spf=pass (imf30.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.78 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1676919268; a=rsa-sha256; cv=pass; b=r9zxh/WSF/egPDCSVfhuvBNIZ3QwCyxQjv4tEzWP3EVsGKOp7sFAEzy/FK0P4Y6fwW0ATv 1z0i6k5Z1Of5TiIXBCeShqXSBOz4OD1XCV9oKNBG7lU5I1AYcsGuScvAGmypMJYr4Txm4h dATl05/meRbDX7lkgbXHqsSgdZdR/28= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ghx3ehWB0js2VmZn44l8QVK0yA9+j02fLt8jafMYm639tJyLQe7aWQkbFkU3XMbB8V34lP1uyatkS55MRhrhaQvrdr//dsTO8jTUjiKjBHbe4dVJjoF7ApILe7BZEs8+BG4T0SJyimuaw/8tVbN/rzRqhrAiJBrN4h7l0BLT+pH8cBKCQC1jkmhR21po7u/q5pr9Z4io9HtO9M4Qsj+8cy8tyEcjuBTz2CYV9E0UG39sDpqntkF+Ryb7RPIu9+wGBksKBeuVNhCUlCmmWHGz7QhrZm0MqTqPe0f2HI05n5liaR9bu30AsQTTLkUmmglzlhas9YAMldI5GvvJlgtMbw== 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=Lm86L9ncTBUZoZWM3MdpTq8/bCwf/O3ttdk7LmSABfU=; b=C8frD0rVUfRPlVOo96bVIMrLQb7XZ4c7D44LbWFeWQ9aOFL6YsXGJspz0C6apMrlsN6ToJBOWHEOPJd2gaqbF2Em1LGIulYbxIcFgz9fkHm5iQaSHMwJnr5P7if5UreMYCY81XAO6/jGjnXSwStWcI4DtEt7G73A58JkDGg9UrdxHkjiskzDdlhsJucZ6vI+knzi+rLJ3hyvZFn1srf4LzIJYXSm/41B0m8p3oSAGUZaLPVJuNVVdrX/3l4CJ8qjaHnXn8L/m6hNV8Owm+rTOph3g75dpXahN+4Z8uXHEEWLlfeWEsAaHZ6dXYknbCVZpX9xRk1oVJnnjT4zVoPmGg== 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=Lm86L9ncTBUZoZWM3MdpTq8/bCwf/O3ttdk7LmSABfU=; b=HUL/97eOJp6I02r5BGkZCQjDAeZilxQ1rv4WAdKboU8ixWcYMnOPmJsXzC8xchSt05UDJHIEa3DbjJFWdhMrmdrW1QmPZ5E7XbgHcmhbx42l1Id/hwPLgPZL36aTggFtZZxpcZ2XpTVKP/qIIjEKPvTp2VQ4wUETHM1ZOPcGpeM= Received: from DM6PR02CA0085.namprd02.prod.outlook.com (2603:10b6:5:1f4::26) by SA1PR12MB8697.namprd12.prod.outlook.com (2603:10b6:806:385::10) 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:54:23 +0000 Received: from DM6NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::36) by DM6PR02CA0085.outlook.office365.com (2603:10b6:5:1f4::26) 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:54:23 +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 DM6NAM11FT077.mail.protection.outlook.com (10.13.173.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6111.21 via Frontend Transport; Mon, 20 Feb 2023 18:54:23 +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:54:22 -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>, Brijesh Singh <brijesh.singh@amd.com> Subject: [PATCH RFC v8 38/56] KVM: x86: Define RMP page fault error bits for #NPF Date: Mon, 20 Feb 2023 12:38:29 -0600 Message-ID: <20230220183847.59159-39-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: DM6NAM11FT077:EE_|SA1PR12MB8697:EE_ X-MS-Office365-Filtering-Correlation-Id: f66167d1-0096-492f-6c1b-08db1373e1c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kM6mydxn8sLFOK4VAscqKWOkdc6mbPhyJKPAuwm+LYGkfwKB9AdYQlnC8ZbXCuc0GkK7RmTUvIJc66QZ6rGj728hO+sKauU0PTd2ruGIBtzhPubxkJ+5iWlhIImvBpw98uIMhrlXrgA7q82QoY/j8C6u7GWeMdR79ABRRwaTlyRezQIfaoZY37LT9l/7At1YFckcNAIFxidCtjLpCzmthbfnEavKDfuJkYfdaZtF99dsOm3HtlMBiOyorx0/GgEYDCGBisJG2gt+Uc/pKO/iZQvJ5HF87Ax1K1k14aLUfHgptSgXVftJ+1NDXDvBusoIBi+oBGb4LWijg/BYFbt9ork2XTo48lklcJgVBxXXym3cjRKfgny7WsUS83bcKzApyFw5VldupU12sc5Ty75d/IH2nuN70w0Us5hV91AfR50QFF0Vf6Umb506RTV8QGXqdCmWUBL/aIIYxIvBHgSwmD7f0rCVSp407vqz+TRGqEOR3Mukn7Ou61Kb6eM6kQhSUg4dr9vDtCTpGRIv2uE2V91vL2FEM7zXynW6Q1lovCuR87vcv9zCb8Psat42BhMl5ypBb1q86YwLVTx2sS/WC9C/gwMqlZGIRBS09dY47LmDTPeircLTKlNqMcA9nFkCExE3FLJonFdDzEfq40XZbOj3nKd5Lwzg1VFtZioKS7RfAy7AjoTMlvpPZL/I99WMqPiJikRhIFXGJJtoArUc8cDmvvrzdJLp8aX9i3X+4Zo= 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)(396003)(376002)(346002)(39860400002)(136003)(451199018)(46966006)(40470700004)(36840700001)(356005)(36860700001)(82740400003)(81166007)(8676002)(36756003)(86362001)(7416002)(5660300002)(7406005)(44832011)(70586007)(4326008)(2906002)(70206006)(8936002)(6916009)(40480700001)(1076003)(82310400005)(40460700003)(186003)(2616005)(26005)(83380400001)(16526019)(47076005)(426003)(336012)(54906003)(316002)(41300700001)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2023 18:54:23.1876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f66167d1-0096-492f-6c1b-08db1373e1c4 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: DM6NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8697 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 669A280022 X-Stat-Signature: cm9auunz71za58n3x6nrpt93pnwpmwxt X-HE-Tag: 1676919268-418150 X-HE-Meta: U2FsdGVkX195YdiVagLRFfW5LvAjfzuJ/mWea1uiq3t/g6XPO+qZyal+xfGdwCp0RBCFA+jLOCMRuMXzgohcFYVS0hnAdnoHzGr8MWXUjcQl3ojI09U5po2PG00jtlHQlxLR2rXWRN+7sQiPulnEkQbfBxdoiPEVN9VjRMX4eq2n6AwNbCUAulTz2a3SJt3CYgCpAsVdvM/fHHlY3ECu3YPiUDoUf5HdVKdIxY5JqG6DRAl/ZkuCzfPSxRDoeKKOO4eKCv/uPMOClH3T8Xv1UTYPkCfrnOtXORonuLmB9iBPkg9rUkLejIzZ8LpxBoUC0aYHwffMZkdA+hiB2izp021sWBI7ZdY/ZaAmxIqYnIfmYWtlRQZVdKlVQ4h6Efuyny34SawAXgn0de8hw7XYE7ZyGozaHvx1wHHIgfTGcTrD1N/1fIAyFBj5+bDwVHIKSszjN0w0/4XnPdakazW8xW29L4XmqtIN47ctciSKB23a9hPUG/7nV8MHmGsEXo4Lp7vVrUT6YOGs+4UcfNSEUs2v/+X286vr1XCQ4pqu4331kGKIbNomIq9x1ultBakGAkg7T2xWu63WIt1sRM5a61fK2BOTZnH+xS/WNuy/CMvrPREDzNwhwBel1KpHmuJGzXZ2TRtQQRxmy64PloSPN885aKyv5BRWpZF7MmDUlS3cL2Yn0DbSe8nl4fkQzHwJU7Yfg5zHbzlNEHA4xb2nRcUeeErLxzTniAGTgPpPJl6lVOGLzmeYuyZrGZzY4hs9OgMT+9w3sG7D1zIQaShEdQqJsgXPajWX9ReEXa2QgPyxGmfQGjDFT7LR4AtuVVQVG68/F3IH4ZGWaNKw/iI8W0jnPj/Hk15GBsts0WduuygzMCeKvwLt3gJacU7DzN7gN4DGTZr1fp3QBEsInyA2gJfgrQE1IDflMaoL8zJIGy41IstX5hrtFtdCx2x0zjT1YDaw9NkQ7qP6RteKi9V ufCeXVeJ sz2CnI1lmUX8EChdDKBxTBTDAKsBeq1SNtgboWVa0U256cWqkMDrGfSIQLnyZgWcl93Spnq8i9YjauM+Uc/f5cvinASX4g2KDDEo8IqG0GC4ftw6xDh11gLjuimscRTGahLjV1rZKwJkc56zxRiOIxDGjw2I8ot+V38opcoLSE/3F4e16OQqCA2l/ulTX2OUQcVO0LCzDtQxt38SH/hYBO51iTPlo7GNfXJusHnJdEDDbcBngKtRdzEpqcmeKdYbFEtj7M46mjZ1D5SmCdgFsRk+Z6NlUDGJD9oBBNF9jS7iJ0Re3tTKuyyqJmfzh62rlL+MgjUd4ArXXpZmXwJsd6EPoaOGVkbOHu2YbHN3JUMsmquc= 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/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 456b42cb167b..d2e1c109dde5 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -253,9 +253,13 @@ enum x86_intercept_stage; #define PFERR_FETCH_BIT 4 #define PFERR_PK_BIT 5 #define PFERR_SGX_BIT 15 +#define PFERR_GUEST_RMP_BIT 31 #define PFERR_GUEST_FINAL_BIT 32 #define PFERR_GUEST_PAGE_BIT 33 #define PFERR_IMPLICIT_ACCESS_BIT 48 +#define PFERR_GUEST_ENC_BIT 34 +#define PFERR_GUEST_SIZEM_BIT 35 +#define PFERR_GUEST_VMPL_BIT 36 #define PFERR_PRESENT_MASK BIT(PFERR_PRESENT_BIT) #define PFERR_WRITE_MASK BIT(PFERR_WRITE_BIT) @@ -267,6 +271,10 @@ enum x86_intercept_stage; #define PFERR_GUEST_FINAL_MASK BIT_ULL(PFERR_GUEST_FINAL_BIT) #define PFERR_GUEST_PAGE_MASK BIT_ULL(PFERR_GUEST_PAGE_BIT) #define PFERR_IMPLICIT_ACCESS BIT_ULL(PFERR_IMPLICIT_ACCESS_BIT) +#define PFERR_GUEST_RMP_MASK BIT_ULL(PFERR_GUEST_RMP_BIT) +#define PFERR_GUEST_ENC_MASK BIT_ULL(PFERR_GUEST_ENC_BIT) +#define PFERR_GUEST_SIZEM_MASK BIT_ULL(PFERR_GUEST_SIZEM_BIT) +#define PFERR_GUEST_VMPL_MASK BIT_ULL(PFERR_GUEST_VMPL_BIT) #define PFERR_NESTED_GUEST_PAGE (PFERR_GUEST_PAGE_MASK | \ PFERR_WRITE_MASK | \