From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bounce+27952+114821+7686176+12367111@groups.io>
Received: from mail02.groups.io (mail02.groups.io [66.175.222.108])
	by spool.mail.gandi.net (Postfix) with ESMTPS id 9B636AC1824
	for <rebecca@openfw.io>; Tue, 30 Jan 2024 19:25:28 +0000 (UTC)
DKIM-Signature: a=rsa-sha256; bh=scQrZ4w5PLlZG2L+FApBuqcoRRvyvjm3ZFcNLu5qgiY=;
 c=relaxed/simple; d=groups.io;
 h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding;
 s=20140610; t=1706642727; v=1;
 b=HfXChP2i/ayHpSH+jVok7vbpkBjdyNBA7RLxvnQQNIMGvoKKtbb0IPulec42tvHW67mlmAj3
 yeUXDUHqibTXfvf2hvTD4MDCZHdye5Xfj4f1vw/kWTYqcrQ7P8YIR+i35K2MkN1TDSW1ChYn6x5
 cpubY2hQzHSg7u0KacBZ1yXA=
X-Received: by 127.0.0.2 with SMTP id 8VvWYY7687511xj4h2RWfgWr; Tue, 30 Jan 2024 11:25:27 -0800
X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
 by mx.groups.io with SMTP id smtpd.web11.5581.1706642726569619683
 for <devel@edk2.groups.io>;
 Tue, 30 Jan 2024 11:25:26 -0800
X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com
 [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-127-8SsFr-bGMBGVFL_zE6hf9g-1; Tue, 30 Jan 2024 14:25:22 -0500
X-MC-Unique: 8SsFr-bGMBGVFL_zE6hf9g-1
X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D98AB8B0D67;
	Tue, 30 Jan 2024 19:25:21 +0000 (UTC)
X-Received: from [10.39.192.28] (unknown [10.39.192.28])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id 96E651C060B2;
	Tue, 30 Jan 2024 19:25:20 +0000 (UTC)
Message-ID: <8bc76a4b-40d8-56fc-d31b-46232c8db23c@redhat.com>
Date: Tue, 30 Jan 2024 20:25:19 +0100
MIME-Version: 1.0
Subject: Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Michael Roth <michael.roth@amd.com>, Oliver Steffen
 <osteffen@redhat.com>, Jiewen Yao <jiewen.yao@intel.com>,
 Tom Lendacky <thomas.lendacky@amd.com>, Min Xu <min.m.xu@intel.com>,
 Ard Biesheuvel <ardb+tianocore@kernel.org>,
 Erdem Aktas <erdemaktas@google.com>
References: <20240130130441.772484-1-kraxel@redhat.com>
 <20240130130441.772484-5-kraxel@redhat.com>
From: "Laszlo Ersek" <lersek@redhat.com>
In-Reply-To: <20240130130441.772484-5-kraxel@redhat.com>
X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Precedence: Bulk
List-Subscribe: <mailto:devel+subscribe@edk2.groups.io>
List-Help: <mailto:devel+help@edk2.groups.io>
Sender: devel@edk2.groups.io
List-Id: <devel.edk2.groups.io>
Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io
Reply-To: devel@edk2.groups.io,lersek@redhat.com
List-Unsubscribe-Post: List-Unsubscribe=One-Click
List-Unsubscribe: <https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/plugh>
X-Gm-Message-State: W1s2RYcImg8vNgeU7UV9s8eNx7686176AA=
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-GND-Status: LEGIT
Authentication-Results: spool.mail.gandi.net;
	dkim=pass header.d=groups.io header.s=20140610 header.b=HfXChP2i;
	dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none);
	spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io

On 1/30/24 14:04, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  OvmfPkg/IntelTdx/Sec/SecMain.c | 2 +-
>  OvmfPkg/Sec/SecMain.c          | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMai=
n.c
> index a218ca17a01a..9006c7e6a1b3 100644
> --- a/OvmfPkg/IntelTdx/Sec/SecMain.c
> +++ b/OvmfPkg/IntelTdx/Sec/SecMain.c
> @@ -70,7 +70,7 @@ SecMtrrSetup (
>    }
> =20
>    DefType.Uint64    =3D AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE);
> -  DefType.Bits.Type =3D 6; /* write back */
> +  DefType.Bits.Type =3D MSR_IA32_MTRR_CACHE_WRITE_BACK;
>    DefType.Bits.E    =3D 1; /* enable */
>    AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64);
>  }
> diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c
> index 46c54f2984ff..4be371eff330 100644
> --- a/OvmfPkg/Sec/SecMain.c
> +++ b/OvmfPkg/Sec/SecMain.c
> @@ -766,7 +766,7 @@ SecMtrrSetup (
>    }
> =20
>    DefType.Uint64    =3D AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE);
> -  DefType.Bits.Type =3D 6; /* write back */
> +  DefType.Bits.Type =3D MSR_IA32_MTRR_CACHE_WRITE_BACK;
>    DefType.Bits.E    =3D 1; /* enable */
>    AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64);
>  }

Reviewed-by: Laszlo Ersek <lersek@redhat.com>



-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114821): https://edk2.groups.io/g/devel/message/114821
Mute This Topic: https://groups.io/mt/104052593/7686176
Mute #defines:https://edk2.groups.io/g/devel/mutehashtag/defines
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562=
12/xyzzy [rebecca@openfw.io]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-