From patchwork Fri Nov 4 07:26:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 15405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp228336wru; Fri, 4 Nov 2022 00:30:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5StZs2IyQlI+D8V3mg4ku7QIkr4od1YiqAuxmL3Mr+INPuc990UgC4Jj19dEFq+gQEX5m5 X-Received: by 2002:a17:90a:590a:b0:20a:e93e:2022 with SMTP id k10-20020a17090a590a00b0020ae93e2022mr34437093pji.141.1667547057594; Fri, 04 Nov 2022 00:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667547057; cv=none; d=google.com; s=arc-20160816; b=CefsRCkKHRsY9HZADqVozg2PkBAXuRQy7I/FaR9T2O8U7xZWVmqASFeCBUg1A0HoGi 1EhjVc4FkdgMKITGb7PewhFsWCpT3l4jckps62SdqzQ8JaOPksGrcBQD1NjyZPW/IVlW Ztpl0r41HrrmEr4wMdrYeDzVoqVGlz28N7L3MCardsHoNzXaTeNtft496JJp9TRKf7e3 1Xl5JgZSJMkDocB52nyaL5pYkGGLlj/ibby9ogqdwtk3uta46y9arbXTYbKf9xwJBL8k VU5nyz3G32GbMfD87QEmOYmgGFQUw3qGBgBee+KD/PtasX5yPd+kLoEiLtVED1SnVVhF 1vyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7CU5Zv+MxpH9Viqrq9cuAJbtGqlqKE19LW/YuoUb07c=; b=bL5CkDzTiEaNdzE55InsYji5fdt9jlxnbHRIUk/nlwccqnsCsxQ4ZltFtIYLVN0lOZ VSfNXt3X5oiqdbA97oupUBdAIve6FIEBpSADvhUFat4UUkS292Feld7qpyw/DE5GW6Fh BncFH1WmF+CLisy24PPfPvmDW9o+eDlePmd7gVDejsa/QWU/TG7Q/omCQBBJE3AGh2JD KIdt9QI9dNA8lErjnw53/YUntoG2oAY+PUakH7hZ//DAmYUkZ9PxFrFBF2an4YQ/Opny t45agYcL1jFat9ZJLyx1PsOrHgtmK4z/hN8ZRMGdjFygwKi7hT57qCz/hTCt/Bp81fKH D1iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qYkY9pxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi4-20020a17090b4b4400b0020a84ae69b1si3002997pjb.71.2022.11.04.00.30.44; Fri, 04 Nov 2022 00:30:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qYkY9pxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbiKDH11 (ORCPT + 99 others); Fri, 4 Nov 2022 03:27:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231682AbiKDH1Q (ORCPT ); Fri, 4 Nov 2022 03:27:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5715029C90 for ; Fri, 4 Nov 2022 00:27:10 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A291E1F45F; Fri, 4 Nov 2022 07:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667546829; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7CU5Zv+MxpH9Viqrq9cuAJbtGqlqKE19LW/YuoUb07c=; b=qYkY9pxgxg6T+WYDFEQiekn/4osT4g0p35HAaGDSfQwQrKhhNctHZb1BWOBAeTR+dlMt8T uKHXbdN891CkVW7s6SwPTrRIkHL4g9nbqHnCI6yuFWgngtrdQ67iYXEVUVmSIZgxOSkMC/ 1Wx0uzPfLiRHT8WEvQZQaBGGfnNcpZQ= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 617DD1346F; Fri, 4 Nov 2022 07:27:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6mJuFs2+ZGPoQAAAMHmgww (envelope-from ); Fri, 04 Nov 2022 07:27:09 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v2 1/5] x86: add X86_FEATURE_XENPV to disabled-features.h Date: Fri, 4 Nov 2022 08:26:57 +0100 Message-Id: <20221104072701.20283-2-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221104072701.20283-1-jgross@suse.com> References: <20221104072701.20283-1-jgross@suse.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748549823525116114?= X-GMAIL-MSGID: =?utf-8?q?1748549823525116114?= Add X86_FEATURE_XENPV to the features handled specially in disabled-features.h. Signed-off-by: Juergen Gross Acked-by: Dave Hansen --- arch/x86/include/asm/disabled-features.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h index 33d2cd04d254..c862552d7d6d 100644 --- a/arch/x86/include/asm/disabled-features.h +++ b/arch/x86/include/asm/disabled-features.h @@ -81,6 +81,12 @@ # define DISABLE_SGX (1 << (X86_FEATURE_SGX & 31)) #endif +#ifdef CONFIG_XEN_PV +# define DISABLE_XENPV 0 +#else +# define DISABLE_XENPV (1 << (X86_FEATURE_XENPV & 31)) +#endif + #ifdef CONFIG_INTEL_TDX_GUEST # define DISABLE_TDX_GUEST 0 #else @@ -98,7 +104,7 @@ #define DISABLED_MASK5 0 #define DISABLED_MASK6 0 #define DISABLED_MASK7 (DISABLE_PTI) -#define DISABLED_MASK8 (DISABLE_TDX_GUEST) +#define DISABLED_MASK8 (DISABLE_XENPV|DISABLE_TDX_GUEST) #define DISABLED_MASK9 (DISABLE_SGX) #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET)