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 BB378740054 for ; Tue, 7 Nov 2023 09:12:57 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IDM+487rKRfZ5MnBQ/vjuQtJURlpyI6VaEJmWC3ETmM=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1699348376; v=1; b=kwC57iiUOvZbib8R4DN92EB4Eo6PpDNln3aNxDqF+jErlt9lgpbZKtoHJw+e4mYNO1+Z9vff xu5VNThcT1gwI9Pfu4B13bzAUf1bx+K21W5D3ZGNthMzswzW85TL5czsN+JlEppTPGkLs3hD/ZE EC9GvUTg2D/McxfIo9v04OuE= X-Received: by 127.0.0.2 with SMTP id juyjYY7687511x4gujmHI1sL; Tue, 07 Nov 2023 01:12:56 -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.web11.6347.1699348375741240962 for ; Tue, 07 Nov 2023 01:12:55 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-324-VJ24hAVfPoGx5F_yHNA3Eg-1; Tue, 07 Nov 2023 04:12:53 -0500 X-MC-Unique: VJ24hAVfPoGx5F_yHNA3Eg-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 922311C07830; Tue, 7 Nov 2023 09:12:52 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.119]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56FAB2026D66; Tue, 7 Nov 2023 09:12:50 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 034101800DDB; Tue, 7 Nov 2023 10:12:48 +0100 (CET) Date: Tue, 7 Nov 2023 10:12:48 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, cepingx.sun@intel.com Cc: Liming Gao , Michael D Kinney , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Tom Lendacky , Michael Roth Subject: Re: [edk2-devel] [PATCH V2 0/2] OvmfPkg: Update TdVmCall to handle the retry for MapGPA Message-ID: References: <20231102090957.2076-1-cepingx.sun@intel.com> MIME-Version: 1.0 In-Reply-To: <20231102090957.2076-1-cepingx.sun@intel.com> 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: HlgeF1yT95tXxpHJqJPIwxxxx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=kwC57iiU; 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 Thu, Nov 02, 2023 at 05:09:55PM +0800, sunceping wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572 > > According to section 3.2 of the [GHCI] spec, if the result is > "TDG.VP.VMCALL_RETRY" for TDG.VP.VMCALL.MapGPA, TD must retry the > mapping for the pages in the region starting at the GPA specified in r11. > > Currently, TDVF does not properly handle the retry results of MapGPA. > For this, TDVF should update the TdVmCall to return the value in R11 > and must retry the mapping for the pages by the value. > > How to verify the retry for MapGPA in TDVF: > Note: Since the range size of MapGPA in QEMU is limited to 64MB and > TDVF always maps 1.5GB( 2GB~3.5GB) MMIO to shared-memory for TD guest, > the retry action is triggered always. > Pre-Config: > QEMU: > https://github.com/intel/qemu-tdx/tree/tdx-qemu-upstream | tag: tdx-qemu-upstream-2023.10.20-v8.1.0 > KERNEL: > https://github.com/intel/tdx/tree/kvm-upstream-2023.10.16-v6.6-rc2 > > Step: > Boot with TD guest and check the log with TdVmcall(MAPGPA), as below: > TdxDxe:SetMemorySharedOrPrivate: Cr3Base=0x0 Physical=0x80000000 Length=0x60000000 Mode=Shared > SetOrClearSharedBit: TdVmcall(MAPGPA) Retry PhysicalAddress is 8000080000000, MapGpaRetryaddr is 8000084000000 > > Reference: > [GHCI]: TDX Guest-Host-Communication Interface v1.0 > https://cdrdv2.intel.com/v1/dl/getContent/726790 > > v2 changes: > - Update the code based on the comments of v1 reviewer > - Update TdVmcall to instead of the extra API file Series: Acked-by: Gerd Hoffmann -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110825): https://edk2.groups.io/g/devel/message/110825 Mute This Topic: https://groups.io/mt/102337973/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-