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.web09.33844.1661491643637205947 for ; Thu, 25 Aug 2022 22:27:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hth1Ee6U; 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=1661491642; 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=HQ43l6a9heIyvasfsZMzc85rrxWBVp4zm8HjankB77E=; b=hth1Ee6UZ1Lf6qsmWf1MmetPYmkfoYo2cDmzOK0tFGQ4AbprAkLiiQSTrjwqzrLgBHfpyT WV7ANlXpq6mWASAZrpn+4T6qYRwPaGAVmpD98Ry1h6/O8rvmhZhVXqHbkGR07mogacy6cX NorgqEv3gea7XerGtO7i/6w00oIdEU0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-S9pu5N32NQC5VrJikUMyMQ-1; Fri, 26 Aug 2022 01:27:19 -0400 X-MC-Unique: S9pu5N32NQC5VrJikUMyMQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30F0F101A54E; Fri, 26 Aug 2022 05:27:19 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8793C15BBA; Fri, 26 Aug 2022 05:27:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9CD8418003AB; Fri, 26 Aug 2022 07:27:17 +0200 (CEST) Date: Fri, 26 Aug 2022 07:27:17 +0200 From: "Gerd Hoffmann" To: "Lee, Chun-Yi" Cc: devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Min Xu , Brijesh Singh , Erdem Aktas , James Bottomley , "Lee, Chun-Yi" Subject: Re: [PATCH] OvmfPkg/IncompatiblePciDeviceSupportDxe: Ignore OptionRom in Sev guest Message-ID: <20220826052717.gqbympdx7a367vqo@sirius.home.kraxel.org> References: <20220825133925.6410-1-jlee@suse.com> MIME-Version: 1.0 In-Reply-To: <20220825133925.6410-1-jlee@suse.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > - if (TdIsEnabled ()) { > + if (TdIsEnabled () || MemEncryptSevIsEnabled()) { I think you can just use CcProbeLib and CcProbe() function to cover both tdx and sev. take care, Gerd