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.web08.9487.1635409505162612174 for ; Thu, 28 Oct 2021 01:25:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dRYMazSz; 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=1635409504; 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: in-reply-to:in-reply-to:references:references; bh=Ptjxb/NZ8P5/UcvjjNefq9SKSXL2Gtni4rAUkAO7CBI=; b=dRYMazSznEEWXoosBVrkyRKjHt16vTFkO05D6BWcWDtW6hm8W8jIWXhdN61a/oGyvBugUt GscpBaWPiVplyfsJmI09IQouwJIKgXAOo1Oew0+rP0LJ+qbPrTcCeAPW2Fw3q820WeUkyb x5mEZMijIgl9VkAODkk5fbRchr9Aqjo= 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-326-8AXm8MRUPCyFSKSMjaTZKg-1; Thu, 28 Oct 2021 04:24:59 -0400 X-MC-Unique: 8AXm8MRUPCyFSKSMjaTZKg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD45A8042E1; Thu, 28 Oct 2021 08:24:57 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-241.phx2.redhat.com [10.3.112.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7155A607A1; Thu, 28 Oct 2021 08:24:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6ED881801AB5; Thu, 28 Oct 2021 10:24:54 +0200 (CEST) Date: Thu, 28 Oct 2021 10:24:54 +0200 From: "Gerd Hoffmann" To: "Yao, Jiewen" Cc: "devel@edk2.groups.io" , "Xu, Min M" , Brijesh Singh , Erdem Aktas , James Bottomley , Tom Lendacky , "Dong, Eric" , "Ni, Ray" , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH V2 12/28] UefiCpuPkg/CpuExceptionHandler: Add base support for the #VE exception Message-ID: <20211028082454.zvgzybame4glw5ye@sirius.home.kraxel.org> References: <24d3a351f21bff1a4b20490313d039e403b1453c.1633401643.git.min.m.xu@intel.com> <20211012102716.wr6bao42f5hviz5z@sirius.home.kraxel.org> <20211026061148.omqerrswnpgs3jin@sirius.home.kraxel.org> <20211026102458.pvzp5nxyegq7ftuu@sirius.home.kraxel.org> <20211027071935.a4l3aiiu6uaaqdvl@sirius.home.kraxel.org> <16B20F4407499229.28171@groups.io> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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=us-ascii Content-Disposition: inline On Thu, Oct 28, 2021 at 02:07:58AM +0000, Yao, Jiewen wrote: > Besides VmgExitLib - > https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Include/Library/VmgExitLib.h > > We have another potential issue - MemEncryptSevLib - > https://github.com/tianocore/edk2/blob/master/OvmfPkg/Include/Library/MemEncryptSevLib.h > We might need rename it to MemEncryptionTeeLib. > > I think we need setup direction on how to hand those cases in a consistent way. > > Option 1: Keep using current name: SEV and TDX as two class name. Add two instances. > > Option 2: Define a new architecture neutral class name such as TEE. Add one instance to cover both SEV and TDX. (2) looks better to me (for libraries, drivers is a different story). Would also have the advantage that we can probably move (some of) the dispatcher code (if sev call this, if tdx call that, else do nothing) into the library too. take care, Gerd