Message ID | 20221214194056.161492-43-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 1CDBCC4332F for <linux-mm@archiver.kernel.org>; Wed, 14 Dec 2022 19:59:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B43178E0005; Wed, 14 Dec 2022 14:59:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AF3108E0002; Wed, 14 Dec 2022 14:59:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96CFC8E0005; Wed, 14 Dec 2022 14:59:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 85E7A8E0002 for <linux-mm@kvack.org>; Wed, 14 Dec 2022 14:59:48 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 604F6160F38 for <linux-mm@kvack.org>; Wed, 14 Dec 2022 19:59:48 +0000 (UTC) X-FDA: 80241977256.22.0B31E97 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by imf01.hostedemail.com (Postfix) with ESMTP id 885DC40009 for <linux-mm@kvack.org>; Wed, 14 Dec 2022 19:59:45 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=pPBGszfS; spf=pass (imf01.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.236.41 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=1671047985; 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=AIkJ9ONvV/9ix4xqluzIRXKLZEkOKPUvKC22i1Q56YE=; b=Oe/S9fDp81c5CXSWKe+J4/CK6r21k9Bk1S1V2kjnclDhPzVku9fbDJCI1NsF7YQDUDCOsp 56xXRofM9uClXJhun+RLcZiFekM4WDE48zxJu0WCycaJJjRxhtam/v53plBUMG2mFvDJnQ z3XWZA5utd0orx/b2dh5dqyl7b297uE= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=pPBGszfS; spf=pass (imf01.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.236.41 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=1671047985; a=rsa-sha256; cv=pass; b=EOFlOgDvWIgygcXRubaQxXXrCz91/8ugdNtWldt3I0Hkq72HeyfoTYnS7KnIVILoJKElX0 /rntW07wnkmsQaXn23MyEZVeTrytld6WbMa54cHSJibaA7t+mJitiEEgJsbcJnYODLkvTf SZ+5tCu5li8Scd59tVnaCFGXju7Lprw= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NiDCMfWK3Ylu5L+ixmIx1+2Ikpjwz6A+HX2IxCbxq2TMRFTrGYYG1+U3BPdHgJ4Z4jvS6MqIXlR4Xa3yVdkTfnOl/zga8wNuGAIXcd/0XuUpAP7ucCdA4X4CiiPBVqiDnJYrtxKT2WzdiCefIsmIKOQGPfemrz+n33lJflMDKzSLrOzvJhdy2MhW0VHFhHcO9pX6E9wBFLATD5d0gu4wHJ/aYjNcF3Q/B967skH5BAiIkewJ+XzIMU3wkGoT4sx72lOrWQszHDFcvOM+B806OaZWV9wNsL3Y/1uuKIbr3QH9hnbRosOazWDVApNDxzwFzf0zU9wE9+Rq+pq7++/19w== 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=AIkJ9ONvV/9ix4xqluzIRXKLZEkOKPUvKC22i1Q56YE=; b=YpRMT8ew1IzBRsvBHFi3FI9G/tncC/nBo66gJ2cMpmzzmEasChceOY4xIS2aN8QS6pI3pw2/Rg2ixyAHVUuklI3vr9+KxjaNZzoEeejZRk2psK6HcbxnILBEQybu33ywhvQ/1G6JoWHpKdtBLydibne9MHPefxn35CT3z2PFluE6TuTQDY0HCZYLXKtu9eflzgqcWwPj/9jM+bqAnoh0I256I+U6MgZ8rqYoeRV8OoOybGmO8hqFUlRduYBeeBJ2CE13JG778upa2vI+suciQ7Qt9knUKLslaWrAQx1VKOvrzDNef+DGvKsJ+DwTbqgb3E1CRNCWnTrlaoaiYgD0TQ== 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=AIkJ9ONvV/9ix4xqluzIRXKLZEkOKPUvKC22i1Q56YE=; b=pPBGszfS1mUrMvR4o6IwiWOlmeufLnSqk1bQvngvcG7qHCj9b6SOnesrQ8ADx9OlRIxWbxPt3oj5cHPuXFJOl08WOkV9ihN20PHEvGf7UGX26VftPJtiM5TuJS1zwfE50NKB21ADUIXTY+GWbxFYK8LxPCUt+uOyH9L4dwW7Tww= Received: from DS7PR05CA0089.namprd05.prod.outlook.com (2603:10b6:8:56::6) by SJ2PR12MB7919.namprd12.prod.outlook.com (2603:10b6:a03:4cc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Wed, 14 Dec 2022 19:59:41 +0000 Received: from CY4PEPF0000C971.namprd02.prod.outlook.com (2603:10b6:8:56:cafe::c2) by DS7PR05CA0089.outlook.office365.com (2603:10b6:8:56::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.5 via Frontend Transport; Wed, 14 Dec 2022 19:59:41 +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 CY4PEPF0000C971.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5924.10 via Frontend Transport; Wed, 14 Dec 2022 19:59:41 +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; Wed, 14 Dec 2022 13:59:40 -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>, <wanpengli@tencent.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>, <harald@profian.com>, Brijesh Singh <brijesh.singh@amd.com> Subject: [PATCH RFC v7 42/64] KVM: x86: Define RMP page fault error bits for #NPF Date: Wed, 14 Dec 2022 13:40:34 -0600 Message-ID: <20221214194056.161492-43-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221214194056.161492-1-michael.roth@amd.com> References: <20221214194056.161492-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: CY4PEPF0000C971:EE_|SJ2PR12MB7919:EE_ X-MS-Office365-Filtering-Correlation-Id: 2aae1591-435f-454f-afa6-08dade0dbd19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2YJqlKfiI2M6lO95CKZKW6KVBGS0SIHcZEH/cy8JuCeH7/VhGgGfsa1AuhtM3H3ivQ6t+SmQgPhp0ZjfGVFrFuwrr54OGebui+SORxFpH/5CziZ7/E/++26B9Nf3wGyuFFnhevqcbwerPG8tCU1kHlujnWB9VC3UxbK1uzZrugRVYnUZs4aQzdzyzcf60nYNQeTgHj3k4He0VAif+LK6GxCC6SuF9yc22n9peBuCjfhL7447gNmPbatZazsboIvHAWUZT7A0SLH0tT3Sr1GXsUUYS9Ah0TYNeVcJTUyPE/CJpK7KADLMa6rYZNmF5XXYiBoxN4DtRhCF7IFtfy8m9yggqMCFKI7R5wfnfX8OWIxJ4gG96TT0p0GG9LqyJ3tniH4UiiIOtFIjxLlHQlWknzKAF+VZE6CYkfXepLdCDUq4rn+xyut4LdMsBMlWv/CpEeEGj/kduvS8tlcvC8rm9BQ3v35WCsCO1gotC+SKyRmi8Ph7DReJ+9428MzzW5eFTlPFJzXBmBvECkrYt5Cc3NKzv9EwaJu1e4Bj3mm57eAnLvAPBbuoYi4vJdtZw6QLO0j3VOf6sgiwycEvM2wYh+tb3bLwlTmsAuUK+ZaR8KKqfQQtcip4NxbIsGh5i2JYbChwCJMN4i0ESHW+8/hGZq6MD/DD8pP96nqRBkVuJrHonkDe50SfKV4PJ+FSPrQQwK6t6/EyNk71EtSL3zkIrNqnifmgupafbDNk7e9/gyA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:CA;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(396003)(39860400002)(136003)(376002)(346002)(451199015)(46966006)(36840700001)(40470700004)(40480700001)(356005)(8936002)(36860700001)(47076005)(82740400003)(83380400001)(70206006)(8676002)(40460700003)(41300700001)(70586007)(4326008)(86362001)(81166007)(5660300002)(336012)(316002)(7416002)(26005)(2906002)(44832011)(186003)(6666004)(1076003)(6916009)(426003)(7406005)(16526019)(2616005)(54906003)(82310400005)(478600001)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2022 19:59:41.3926 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2aae1591-435f-454f-afa6-08dade0dbd19 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: CY4PEPF0000C971.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7919 X-Rspamd-Queue-Id: 885DC40009 X-Stat-Signature: dfhymmqzfmx84rnqqnsx1nt47mxgubfw X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1671047985-804918 X-HE-Meta: U2FsdGVkX18EV1XlT4SvArja77i7DI+kM2tKuGL6sI69EkuVSyKqOVBI7EUyolQRZbH3XgHE/yiLwBEjpxRimLcnMWuNvsB7N6P1enLzaXyfjInmLCu6YgpDKFMxxLHIOdmrqBATFsVRXQVkr5HNp8dXAOUuQR90letUkIGu7h1zysGv5Ahb8QbGHdWv6H2yh3WKELZYVa+dJUrNdsmSBRiSBEzUkuNeiryCq1xXEZMGKO02QHVeksw2mJ3tRJnLff9zHta2NZWp7qfLYrq3WVTwXHs6DRwtBaQbneh/NpOKdC2Xo1L2TKTxAIVQIyX0NAcGAf94HGwtH/gPXRCuZ1KLUx+9lp5YGW3pgM6uOM8SMrTrpcKQdoLICQUHOC+tk/B0TBxgLK6rNtrkw7Sd/cxp7fXkRa6oWdgEeOO8VcYTjrz+PVVwhBvdsNxRE55V/1YWxydD5C+hpF47qNHyELhGKyLkJL++G7tDbhTkLtqffD/4m/2yXWUt8r19HFe2BPnyfMfxUSSZanmmU4nDkgCxwx6Wc4zstI9mx3gHZpZsLzY6Na5ImFkw2bz3LiaSdrFnfKOmyUkWK8rW9OSWhZAquqhsGdjwfguPXSustJihTlxbPmb68IlrGjikr+X8r690lLlQVZRFNoN6qKHeyT67N4ahxugYjA1W5tqKsuF8wIHyUxJu9QD3Gw0vpsmG8xQadHEIckrV+eFMqohN7SPtfIdHMVrsaV1bBU5ryS0acn2u99ExSzDJquzEXmOJHhZyvrjteTSjrgeJ2g3sK3bQeXEGkWSRgkbQ6NWGvxAzaExjGyF3rwcFBKRExGXzLRcgCfX0nrCJbzwG4pyt18Bs1QSWBlGlJYc0sZmCOz3d6p68Fbu6RvwlOy2qd3dJ4O7NnH7jC3AvQ8pDB67PhlByXocODP06i+MnelBEVWUMsiwQP2AmPFBQKJ/6wuYxrQCabfNuPX5UtON2t5G Hf3X5z1j 5/C/4 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 b126c6ac7ce4..f4bb0821757e 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -257,9 +257,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) @@ -271,6 +275,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 | \