From patchwork Fri Jun 16 09:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 108997 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1203038vqr; Fri, 16 Jun 2023 02:42:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5i6NxDksKLKj7F4fKaByJFpH2WdWCtXZfJPFYqmXUKr0mXarJH7ozOM+XXVrFPT0WGrVI4 X-Received: by 2002:a05:6808:de0:b0:39a:bc50:db96 with SMTP id g32-20020a0568080de000b0039abc50db96mr1442581oic.41.1686908545061; Fri, 16 Jun 2023 02:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686908545; cv=none; d=google.com; s=arc-20160816; b=In1RkA139B9+7JvtllLODbkSJV3wkDAm+z9HxVyWitZz52+SJuD2gA5badOBjvVTzl ronPc2+NPJ7hfa6gRv2sRI2q9H6yH0V22e8UUnnFIW4tKrdk/4QgpNF7mkqfH7IAhEuQ TEDNtZJdB8i6a0fLtu86eDw6AHVoFR4tmqDAbsv4VEikMSvVSvzS1q//lO/X2gGF+Ret 9CvVFx8XHVj+OpkiSUntxWKbNDlTLEMtpG5ToW7KOCrLDgNveXH+DgsWr0PmAWrWeIZd D2uK6tB0dpjrlvLrC7JwMjo9LY7UedKLBKDqKRz7HIA7TifzfBCFMyHhOnxdJ0OdaF6V jmkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=kW1jugq60sJfmx5RfQMRVtnFU9KKTkP8DmbB1EN9IiU=; b=W0nhXqnGAYkN+wcVP3kOfgxUM689KEJZs3IDPm6VsVKHlnmf4BhlLb1ww4AZdJ211N NdIxI1+RQMUIK+ii8CRmLwZ4gH16ifU+DKRUaodsS/opu9p4G6Sz4SAdIYTpViGyjS7O lEpdhQmKSONxuz5BrfXoFKQwSfaWXvkeec2Rk3Et+Lrz0YOysU+6g6er3Owt72elwigs Zp6loyE62pLjNGsAIMl+MiFEWECg0KKtoOIicvXTcY2cEIYs3MEFlmDRE5lnqIoVBb8e z6tSVTiotXmPVijPIc3FTS8V5C4W6ZN7EVDRobOq9/SNWq3pH3AW4ca79+rBOg1Nn65j nYnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=edMt7iXv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ox6jh+jw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz14-20020a17090b0ece00b0025667be94f0si1196224pjb.77.2023.06.16.02.42.10; Fri, 16 Jun 2023 02:42:25 -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=@linutronix.de header.s=2020 header.b=edMt7iXv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ox6jh+jw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344636AbjFPJeo (ORCPT + 99 others); Fri, 16 Jun 2023 05:34:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344315AbjFPJeX (ORCPT ); Fri, 16 Jun 2023 05:34:23 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22D972D62; Fri, 16 Jun 2023 02:33:51 -0700 (PDT) Date: Fri, 16 Jun 2023 09:33:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686907987; h=from:from:sender:sender:reply-to: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; bh=kW1jugq60sJfmx5RfQMRVtnFU9KKTkP8DmbB1EN9IiU=; b=edMt7iXvYdR1moI7O2unZMnhyO+0xZhvW4XonRhiwbxWn+R5U6d15OrQG7x/8van3sR1bY FKGjOtEs6QDgysAAWKlZLSQADMR2dmq0Ft3sAUPhM9Bk6k1fa9zSNaYGuooNWiNWSUG71a 7UZlYUwXwobnfBiazECuiQK+ubIGcTOMxi3IJO4HM6S/GhD0P/xBbkbeRIzbwQ8nRyIkql POkl1L93LycS4WS4m4lc7ywXiJuNcxZP5RFxKFU2Y5LHl6P+wzBOMf2JndAEPWDPZcYprm dhweDRNk/j7fYNUintA9vi8fTLSeXOnXqB38SA0ZniJPjbZRZoAZzK9KuwK1Mw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686907987; h=from:from:sender:sender:reply-to: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; bh=kW1jugq60sJfmx5RfQMRVtnFU9KKTkP8DmbB1EN9IiU=; b=ox6jh+jwcFax4dCRiidd4Go72eTEzdSM8jZG/aCyybTqFH5FtUbyCQ9CtW8RwrFr+LJrj2 6vHLIb9EeCRhbeBQ== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mtrr] x86/xen: Set default memory type for PV guests to WB Cc: Juergen Gross , "Borislav Petkov (AMD)" , Boris Ostrovsky , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230615123959.12298-1-jgross@suse.com> References: <20230615123959.12298-1-jgross@suse.com> MIME-Version: 1.0 Message-ID: <168690798706.404.5612585523577062985.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1768851814700638167?= X-GMAIL-MSGID: =?utf-8?q?1768851814700638167?= The following commit has been merged into the x86/mtrr branch of tip: Commit-ID: 30d65d1b19850c9bc8c17dba8ebe9be5e0c17054 Gitweb: https://git.kernel.org/tip/30d65d1b19850c9bc8c17dba8ebe9be5e0c17054 Author: Juergen Gross AuthorDate: Thu, 15 Jun 2023 14:39:59 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 16 Jun 2023 11:22:33 +02:00 x86/xen: Set default memory type for PV guests to WB When running as an unprivileged PV guest under Xen (not dom0), the default MTRR memory type should be write-back. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20230615123959.12298-1-jgross@suse.com --- arch/x86/xen/enlighten_pv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 8732b85..93b6582 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -187,6 +187,8 @@ static void __init xen_pv_init_platform(void) if (xen_initial_domain()) xen_set_mtrr_data(); + else + mtrr_overwrite_state(NULL, 0, MTRR_TYPE_WRBACK); } static void __init xen_pv_guest_late_init(void)