Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2167055rwb; Fri, 2 Dec 2022 06:25:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf57KZM73TI8D5Hcnx2PTKfqZtSj0zKXw9YNBr1W/1zYP3pNwMd1GgXY0xVViF0E6pIQC5Ci X-Received: by 2002:a63:e114:0:b0:478:7743:901e with SMTP id z20-20020a63e114000000b004787743901emr5962991pgh.375.1669991109582; Fri, 02 Dec 2022 06:25:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669991109; cv=none; d=google.com; s=arc-20160816; b=HnVEEtVypb1zOjBYU0p8uEGt1e3LzWjTqcor6XyGMWDHvSb0CaFFgX+kErPmbZuuSt CYQOreCW3Sz2gc2BC7K7ml1xTgvISU6YbLGJOLDIu5VFkklHfFYzGKYnDuoVzosQHYVf SpkKSR/W5bfioJc+KO8YDF427rmWtZ6kAVrEUNf0JuVH5qL/DOJLi2U1cNR7L1FP6ZDM Rnr/fYkqQhAT+26qDc0K9cnxh5PGJhfA0iv1y+MMUlD0TToer7geaJNs7iSU6fWofNtX Hss5bYDst4tb+S1pqaTAKmDLw+kX+CwCpOIxJ330NWg8XGvST91SOC5i7wbs5DfA7i0u +1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TjKFn4vwGx5Waf76qIyOWDxn+nMaDMY+/Aq7LR5D9WE=; b=Y8XAnQlKE89QYv4Xi0ZAwzXJlNyo+hXsmxBduhjs8oQHm+9KLERDE2+Bnqb7x9qqiv t8X6IHzI6vj++qMm1bozP7KmA5s5dCCN9ZbMfzfQz59CbUQOtGOjtgu2tR6TbVHbA8nd IuviUBKquyhpRZzgmPqIZnhcarxJXXq1kpHDpFyH+/9mFjpxwV5k6Y7Rj2nNKEyl0QEP DvIDKdwP+q7pJV8/MoHUiUfPLmbcN5yK0+KJR1esDyUDhT1DXxQzeDGVCc6n7n4Gw1fM ktSvECepkuCXRi1XvCHmb+ZBaTNuPnZzvKXTTsfJRDqIN7PrE+9TEjz5mccXyd0RBs9U HElA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=k6UCYIKQ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r15-20020a63ec4f000000b00478599980f4si6989910pgj.93.2022.12.02.06.24.58; Fri, 02 Dec 2022 06:25:09 -0800 (PST) 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=@alien8.de header.s=dkim header.b=k6UCYIKQ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233542AbiLBNzT (ORCPT + 82 others); Fri, 2 Dec 2022 08:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbiLBNzO (ORCPT ); Fri, 2 Dec 2022 08:55:14 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C0E4B0A36 for ; Fri, 2 Dec 2022 05:55:13 -0800 (PST) Received: from zn.tnic (p200300ea9733e73a329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e73a:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D4DA31EC0832; Fri, 2 Dec 2022 14:55:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669989311; h=from:from: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:in-reply-to:in-reply-to: references:references; bh=TjKFn4vwGx5Waf76qIyOWDxn+nMaDMY+/Aq7LR5D9WE=; b=k6UCYIKQDF9aWWSgN7l3/xuYux+IkwgwpMn28NP/CG3B7KiesyDEKGkE1NVX/lXrrRIfX1 C1YGNzes4DxOCry0IFXZrX38QjVO3nouS/4bkjfzY/Ucd7NSzXTBVEbZjW3KymvUzZCWtr Jo4zb5GzENBe4W3L8GFdlVS0X9X6fgQ= Date: Fri, 2 Dec 2022 14:55:08 +0100 From: Borislav Petkov To: Juergen Gross Cc: "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra Subject: Re: [PATCH v5 13/16] x86: decouple PAT and MTRR handling Message-ID: References: <20221102074713.21493-1-jgross@suse.com> <20221102074713.21493-14-jgross@suse.com> <20221201162639.omlr5ff55go7uhlf@box.shutemov.name> <6d642051-31d8-81d5-f379-568360c5cb60@suse.com> <20221201235753.ybfc7gkgj7hlfkru@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Fri, Dec 02, 2022 at 06:56:47AM +0100, Juergen Gross wrote: > Instead of X86_FEATURE_XENPV we could introduce something like > X86_FEATURE_PAT_READONLY, which could be set for Xen PV guests and for > TDX guests. Until a third type comes which wants its pony to be pink and to dance. :-\ Nah, we already have X86_FEATURE_TDX_GUEST - let's use that in pat_bp_init() and exit there early and be done with it. This way it is also self-documenting who can and cannot deal with that code. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette