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.web09.29114.1661240286265423263 for ; Tue, 23 Aug 2022 00:38:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hh4oirZU; 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=1661240284; 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=2lmECyFeQ9E6yFKBnLQR0Ad3PooiRsReuKrjkOef048=; b=hh4oirZU48X0E5xyO4pRGN9HKUgBlHxVLLQYMhZNPou5MnORWxVHITC6dvEpd16zFIi5OV /85USUR8G6jajjKjrTFdbGs79CXL5LDDu+GBk8KTijMikj0gh5lJ6RxHbNm/qw8P4qOJBB IwQVy8G+L7mf6cu4sCN0lz69lxKNMSM= 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-287-v4AWge9-PuaobiWYi1rIzw-1; Tue, 23 Aug 2022 03:38:01 -0400 X-MC-Unique: v4AWge9-PuaobiWYi1rIzw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 292B4185A79C; Tue, 23 Aug 2022 07:38:01 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E786B2166B26; Tue, 23 Aug 2022 07:38:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6E0FC180039C; Tue, 23 Aug 2022 09:37:59 +0200 (CEST) Date: Tue, 23 Aug 2022 09:37:59 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA Message-ID: <20220823073759.qwcbpaohiqjnzrrh@sirius.home.kraxel.org> References: <20220822022301.1454-1-min.m.xu@intel.com> <20220822085130.sdmuz3schsia4fxw@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > Ah, I forget to reserve the work-area as RT_Data in below code: > BuildMemoryAllocationHob ( > (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase), > (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize), > PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiRuntimeServicesData <-- ACPI_NVS is not accessible either in OS-Runtime. > ); > https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformInitLib/MemDetect.c#L1022-L1026 With that changed to use EfiRuntimeServicesData unconditionally the page fault is gone. > Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when S3 is supported? Hmm, not fully sure how the various memory types are handled when the VM is suspended. take care, Gerd