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.129.124]) by mx.groups.io with SMTP id smtpd.web11.74264.1669985951315798557 for ; Fri, 02 Dec 2022 04:59:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZcRigQUf; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669985950; 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=Qfp1CdQj0mdIsmYXUMA5t2OP6dHqYEDZHJ+ktsyX+1o=; b=ZcRigQUf50t4Zd9PyQyvUpXlV474fUU1/QlH1XQtCIfP+WG6VnW4NDeroqL7f2yhxBB64a tJqFRGdar0bUkfYrvyADtZhIsTWtA4mz9OV4gMSBPRyCIVQX5a0UE/mA9H+mpaWpdtgHpw deoXFraIxjo5NdlZtTsWbSu6vz+oLhQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-367-4hfoQc2FNI2sYRvCHglXww-1; Fri, 02 Dec 2022 07:59:07 -0500 X-MC-Unique: 4hfoQc2FNI2sYRvCHglXww-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 967B63C10686; Fri, 2 Dec 2022 12:59:06 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46FF263A57; Fri, 2 Dec 2022 12:59:06 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A418180127A; Fri, 2 Dec 2022 13:59:03 +0100 (CET) Date: Fri, 2 Dec 2022 13:59:03 +0100 From: "Gerd Hoffmann" To: Alexey Kardashevskiy Cc: Tom Lendacky , devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Min Xu Subject: Re: Subject: [PATCH ovmf 2/5] MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr Message-ID: <20221202125903.vr735qkmvk7gs2wp@sirius.home.kraxel.org> References: <20221201023521.10028-1-aik@amd.com> <20221201023521.10028-3-aik@amd.com> <964b4684-3c73-6258-619f-775a953b8498@amd.com> MIME-Version: 1.0 In-Reply-To: <964b4684-3c73-6258-619f-775a953b8498@amd.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Dec 02, 2022 at 11:26:56PM +1100, Alexey Kardashevskiy wrote: > > > On 2/12/22 01:47, Tom Lendacky wrote: > > Added the subject as somehow it didn't get set. > > > > On 11/30/22 20:35, Alexey Kardashevskiy wrote: > > > Date: Tue, 22 Nov 2022 16:12:55 +1100 > > > Subject: [PATCH ovmf 2/5] MdePkg: Add AMD SEV features to > > >   PcdConfidentialComputingGuestAttr > > > > > > PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit > > > but there are more other features which do not translate to levels > > > such as DebugSwap or SecureTsc. > > > > > > This adds the features mask and the DebugSwap feature bit to a PCD. > > > > > > Signed-off-by: Alexey Kardashevskiy > > > --- > > >   MdePkg/Include/ConfidentialComputingGuestAttr.h | 5 ++++- > > >   1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h > > > b/MdePkg/Include/ConfidentialComputingGuestAttr.h > > > index 44e6df800207..1fd09a51ea52 100644 > > > --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h > > > +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h > > > @@ -26,12 +26,15 @@ typedef enum { > > >     CCAttrAmdSev    = 0x100, > > >     CCAttrAmdSevEs  = 0x101, > > >     CCAttrAmdSevSnp = 0x102, > > > +  CCAttrAmdSevFeatureMask      = 0xffff0000, > > > > The PCD for this is 64-bits, should this be 0xffffffffffff0000? > > True but does not that really depend on how greedy I am? :) For now I like > 16bits and leave the rest for everyone else. If we want add feature bits to that PCD it should IMHO not be AmdSev-specific, i.e. we should have something along the lines of: CCAttrTypeMask 0x000000000000ffff CCAttrFeatureMask 0xffffffffffff0000 Alternatively use another pcd for the feature bits. take care, Gerd