From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id B3F7AD80D5A for ; Mon, 22 Apr 2024 10:47:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GJc9+k3Vok8BdlJbMEK1OhVeiMeHT46u9cHuCIZ9R9M=; 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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1713782859; v=1; b=q/DwOxlhAcOKr96x/unq+b/1e25GVVoLc4TUf/HsIK8b6hUDBGFY2BTCQ/EpzuSI170Ykd9h ux+p6Ns5A2Maw9aivjGukoxA3XRjkdo7f2EJRNRMP5ap0x57NQh1bdhofgM5yVxmqSLx9nfkqZk //aQvBfBfbaSmoCH4x3ZOTguzrPR98ll7MzXNiCjsgirCAYb6iqwf6dKd/X/a82EPwA7P9rDfpw YQqiBYXcgH8yFQnt77xfeNKeRFIa9XQ6NrLyACAJ+k1E/qItwlXEofwmluCIm8a1v67XRSf9xG2 9sQxXgKOSa5NfkiSzdf+RLXQ0J8C7v2lQ5wpAYpD6S+zg== X-Received: by 127.0.0.2 with SMTP id J5lPYY7687511xvrNFbLdX1X; Mon, 22 Apr 2024 03:47:39 -0700 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.web10.15592.1713782858511119510 for ; Mon, 22 Apr 2024 03:47:38 -0700 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-281-x9_Iiex5Mm6PD6sIMDmauQ-1; Mon, 22 Apr 2024 06:47:34 -0400 X-MC-Unique: x9_Iiex5Mm6PD6sIMDmauQ-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 3C423812C39; Mon, 22 Apr 2024 10:47:34 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.150]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D26A2C13FA3; Mon, 22 Apr 2024 10:47:33 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 538631800D65; Mon, 22 Apr 2024 12:47:29 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Konstantin Kostiuk , Oliver Steffen , Jiewen Yao , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH v3 5/5] OvmfPkg/VirtHstiDxe: add README.md Date: Mon, 22 Apr 2024 12:47:29 +0200 Message-ID: <20240422104729.502112-6-kraxel@redhat.com> In-Reply-To: <20240422104729.502112-1-kraxel@redhat.com> References: <20240422104729.502112-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 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 Resent-Date: Mon, 22 Apr 2024 03:47:38 -0700 Resent-From: kraxel@redhat.com Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kes4NIsQpvFKwcQNl7ozA8K5x7686176AA= 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=20240206 header.b="q/DwOxlh"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Konstantin Kostiuk Signed-off-by: Gerd Hoffmann Reviewed-by: Jiewen Yao --- OvmfPkg/VirtHstiDxe/README.md | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 OvmfPkg/VirtHstiDxe/README.md diff --git a/OvmfPkg/VirtHstiDxe/README.md b/OvmfPkg/VirtHstiDxe/README.md new file mode 100644 index 000000000000..c3975b854715 --- /dev/null +++ b/OvmfPkg/VirtHstiDxe/README.md @@ -0,0 +1,48 @@ + +# virtual machine platform hsti driver + +This driver supports three tests. + +## VIRT_HSTI_BYTE0_SMM_SMRAM_LOCK + +Verify the SMM memory is properly locked down. + +Supported platforms: + * Qemu Q35 (SMM_REQUIRE=TRUE builds). + +## VIRT_HSTI_BYTE0_SMM_SECURE_VARS_FLASH + +Verify the variable store is not writable for normal (not SMM) code. + +Supported platforms: + * Qemu Q35 (SMM_REQUIRE=TRUE builds). + +## VIRT_HSTI_BYTE0_READONLY_CODE_FLASH + +Verify the firmware code is not writable for the guest. + +Supported platforms: + * Qemu Q35 + * Qemu PC + +# qemu flash configuration + +With qemu being configured properly flash behavior should be this: + +configuration | OVMF_CODE.fd | OVMF_VARS.fd +-------------------------------|----------------|--------------- +SMM_REQUIRE=TRUE, SMM mode | read-only | writable +SMM_REQUIRE=TRUE, normal mode | read-only (1) | read-only (2) +SMM_REQUIRE=FALSE | read-only (3) | writable + +VIRT_HSTI_BYTE0_READONLY_CODE_FLASH will verify (1) + (3). +VIRT_HSTI_BYTE0_SMM_SECURE_VARS_FLASH will verify (2). + +## qemu command line for SMM_REQUIRE=TRUE builds +``` +qemu-system-x86-64 -M q35,smm=on,pflash0=code,pflash1=vars \ + -blockdev node-name=code,driver=file,filename=OVMF_CODE.fd,read-only=on \ + -blockdev node-name=vars,driver=file,filename=OVMF_VARS.fd \ + -global driver=cfi.pflash01,property=secure,value=on \ + [ ... more options here ... ] +``` -- 2.44.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118086): https://edk2.groups.io/g/devel/message/118086 Mute This Topic: https://groups.io/mt/105667075/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-