From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AE06F7803E5 for ; Thu, 25 Jan 2024 08:23:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cOKd1YaaXqJhXOX2cKPql0y+b2KDoiWfl2aBwX8RWck=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706171002; v=1; b=fxdbaBOHHpr1hAwKHLcFTgGzbiwirnMyoKejuRP2n6seR5up580b5RnLy0c79Mrz3giLqBPc /3EVLE0VIXevUD9TP++55Zievuw4tWBjo4LDicaRgqmTuWo4qgoiEglgXt8nHBj4inLSkIXgzb7 DuThMUxrOJp11gYQHxCFwJ7Q= X-Received: by 127.0.0.2 with SMTP id kW61YY7687511xP0652ZVv8W; Thu, 25 Jan 2024 00:23:22 -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.12562.1706171001365132664 for ; Thu, 25 Jan 2024 00:23:21 -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-193-j6CPpaGzOxO_Iyabc46-Qg-1; Thu, 25 Jan 2024 03:23:16 -0500 X-MC-Unique: j6CPpaGzOxO_Iyabc46-Qg-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 983C883B870; Thu, 25 Jan 2024 08:23:15 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32C2C492BC6; Thu, 25 Jan 2024 08:23:15 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BA1051801B04; Thu, 25 Jan 2024 09:23:11 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , Erdem Aktas , Michael Roth , Min Xu , Gerd Hoffmann , Jiewen Yao , Tom Lendacky , Oliver Steffen Subject: [edk2-devel] [PATCH v2 4/4] OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h Date: Thu, 25 Jan 2024 09:23:11 +0100 Message-ID: <20240125082311.310203-5-kraxel@redhat.com> In-Reply-To: <20240125082311.310203-1-kraxel@redhat.com> References: <20240125082311.310203-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MDj1dxDvzdfQ0xCNbZb0A2o0x7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fxdbaBOH; 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 Signed-off-by: Gerd Hoffmann --- OvmfPkg/IntelTdx/Sec/SecMain.c | 2 +- OvmfPkg/Sec/SecMain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c index e8ff0e9081d1..6ad2214293b2 100644 --- a/OvmfPkg/IntelTdx/Sec/SecMain.c +++ b/OvmfPkg/IntelTdx/Sec/SecMain.c @@ -70,7 +70,7 @@ SecMtrrSetup ( } DefType.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE);; - DefType.Bits.Type = 6; /* write back */ + DefType.Bits.Type = MSR_IA32_MTRR_CACHE_WRITE_BACK; DefType.Bits.E = 1; /* enable */ AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64); } diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index a066db34997c..92cf510ea68f 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -766,7 +766,7 @@ SecMtrrSetup ( } DefType.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE);; - DefType.Bits.Type = 6; /* write back */ + DefType.Bits.Type = MSR_IA32_MTRR_CACHE_WRITE_BACK; DefType.Bits.E = 1; /* enable */ AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64); } -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114380): https://edk2.groups.io/g/devel/message/114380 Mute This Topic: https://groups.io/mt/103950482/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/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-