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.38348.1660798714211637288 for ; Wed, 17 Aug 2022 21:58:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V1a9Ua3d; 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=1660798713; 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=7oLa67cJIkGIBpCm7jbRsf2XakZcU1BSX5DUvR232fA=; b=V1a9Ua3dvqG0w7fZSm6bdfIAv8RsADmvGps69IMjgopTUZ8+cEBHVkzuZtzbn9NbLxQTuU GXfUr/azWfHR2F4ACiutzjH83bA2xI+MNvh/bTHNNgRMwenelNtsvpiX3nS5EzqrY/u387 upe0QxrFioG0snQPNTFps7VnttMvX6E= 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-423-oU9g76tVOrqa1Ei4t5MchA-1; Thu, 18 Aug 2022 00:58:29 -0400 X-MC-Unique: oU9g76tVOrqa1Ei4t5MchA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B83A3C0E22D; Thu, 18 Aug 2022 04:58:29 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F26681121315; Thu, 18 Aug 2022 04:58:28 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9F72D1800083; Thu, 18 Aug 2022 06:58:27 +0200 (CEST) Date: Thu, 18 Aug 2022 06:58:27 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" Subject: Re: [edk2-devel] CcProbeLib not working for runtime calls Message-ID: <20220818045827.7gxm3lizix5e6xbt@sirius.home.kraxel.org> References: <20220817110457.2gvr4yxoxlve5ncz@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 18, 2022 at 01:47:37AM +0000, Xu, Min M wrote: > On August 17, 2022 7:05 PM, Gerd Hoffmann wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=2114858 > > > > I think the call chain is: > > > > -> linux does efi runtime call > > -> some debug message printed > > -> OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c > > -> MdePkg/Library/BaseIoLibIntrinsic (IoWriteFifo8) > > -> OvmfPkg/Library/CcProbeLib (CcProbe) > > -> page fault when trying to access WorkArea > > > > I think this bug shares the same root cause. https://bugzilla.tianocore.org/show_bug.cgi?id=3974 Yes, highly likely this is the same. > And there is a fix awaiting for review. https://edk2.groups.io/g/devel/message/91132 Hmm. When the tdx/sev code actually works properly in runtime mode we should be able to reserve the workarea, mark it as runtime memory (SetMemorySpaceAttributes) and access it from runtime code, so we don't need two different ways to figure what CC mode we are running in. take care, Gerd