From mboxrd@z Thu Jan 1 00:00:00 1970 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.10223.1634022174551006508 for ; Tue, 12 Oct 2021 00:02:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NIfdW2lz; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634022173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Iyd3J0xiAceyL5XDRsK+xI3qSyXUWG5e3dPqPDce6pQ=; b=NIfdW2lzclTibo5kjLWYLYQCXAWWvnpKsYBsduoeKS8MnQ/CAFdtwHLR1AoyssF0SEaq7S 4Fg9wRv042Oma3wkPV6G7WqPNHRY3w5EkLPMiODeIAwq+t2A6k2Tv1Zj/gv2ipXdMW8Dfa Nau5x4ToHjO7lVqGIij6wp7V3jShbyQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-566-iGmgYuCFNe6C1zVG1PtTaw-1; Tue, 12 Oct 2021 03:02:50 -0400 X-MC-Unique: iGmgYuCFNe6C1zVG1PtTaw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E22A824FB6; Tue, 12 Oct 2021 07:02:49 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE8DE100238C; Tue, 12 Oct 2021 07:02:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 245D31800393; Tue, 12 Oct 2021 09:02:47 +0200 (CEST) Date: Tue, 12 Oct 2021 09:02:47 +0200 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [PATCH V9 2/4] OvmfPkg: Clear WORK_AREA_GUEST_TYPE in Main.asm Message-ID: <20211012070247.bz4txelzgue3woil@sirius.home.kraxel.org> References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Oct 12, 2021 at 10:37:48AM +0800, Min Xu wrote: > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > Previously WORK_AREA_GUEST_TYPE was cleared in SetCr3ForPageTables64. > This is workable for Legacy guest and SEV guest. But it doesn't work > after Intel TDX is introduced. It is because all TDX CPUs (BSP and APs) > start to run from 0xfffffff0, thus WORK_AREA_GUEST_TYPE will be cleared > multi-times if it is TDX guest. So the clearance of WORK_AREA_GUEST_TYPE > is moved to Main16 entry point in Main.asm. > Note: WORK_AREA_GUEST_TYPE is only defined for ARCH_X64. > > For Intel TDX, its corresponding entry point is Main32 (which will be > introduced in next commit in this patch-set). WORK_AREA_GUEST_TYPE will > be cleared there. Acked-by: Gerd Hoffmann take care, Gerd