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 0C392740054 for ; Tue, 30 Jan 2024 13:04:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BQu9bywRosauUnYa74OjxUeP6dwUX7+EtHK8tqg5WWA=; 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=1706619892; v=1; b=kvx2KH3Z9QZBCPgskX4t0ru4voMQuank2eYIypu26oFIsrCndmO59IOWG9fjemFSHwC5dFcc pqL2Evomdk9RfqrXitmHGc02taV/OBVqG3/MVGldq9VL3aSIahJc4K7P7Y233c/LZ810J6PimEF Kr1icMvTDnZzlL+ADWs7GS80= X-Received: by 127.0.0.2 with SMTP id 2zTfYY7687511xEQhwubXj7s; Tue, 30 Jan 2024 05:04:52 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.17789.1706619892113201381 for ; Tue, 30 Jan 2024 05:04:52 -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-386-QN2m8dmsOPmPANaJhwkKig-1; Tue, 30 Jan 2024 08:04:47 -0500 X-MC-Unique: QN2m8dmsOPmPANaJhwkKig-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 C5BBB185A781; Tue, 30 Jan 2024 13:04:46 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F7BE2026D66; Tue, 30 Jan 2024 13:04:46 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 114681800D6A; Tue, 30 Jan 2024 14:04:42 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Michael Roth , Oliver Steffen , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Laszlo Ersek , Min Xu , Ard Biesheuvel , Erdem Aktas Subject: [edk2-devel] [PATCH v3 4/4] OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h Date: Tue, 30 Jan 2024 14:04:41 +0100 Message-ID: <20240130130441.772484-5-kraxel@redhat.com> In-Reply-To: <20240130130441.772484-1-kraxel@redhat.com> References: <20240130130441.772484-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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: NaFpMlrmVfmNRKpGH1u1zyPFx7686176AA= 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=kvx2KH3Z; 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 a218ca17a01a..9006c7e6a1b3 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 46c54f2984ff..4be371eff330 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 (#114784): https://edk2.groups.io/g/devel/message/114784 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/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-