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.14614.1655358685793630193 for ; Wed, 15 Jun 2022 22:51:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MDyJBN+J; 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=1655358684; 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=zPaPg0EayThAONPCHXDKQvgXn8WNUwKVf5e3VYP8SMo=; b=MDyJBN+JOVOD0hGawnaipxGgYn+IFtlojlkSOSCNlLt/Vp1AsvaQt/NTV9HkU2bADU3evj y9A3gzYa3Eee5QQ2FahNLgVDFFhW8DtdUURtzYuZa3rcqE9uzQx2Zmh1q3SBBwUucpBq4t trSBovZ5cGkBjN6yTDeqWDwQAVWf02A= 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-393-KMlxLiJZOseHDqwstD1fCw-1; Thu, 16 Jun 2022 01:51:19 -0400 X-MC-Unique: KMlxLiJZOseHDqwstD1fCw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A95683C0CD4E; Thu, 16 Jun 2022 05:51:18 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 751D91410DD8; Thu, 16 Jun 2022 05:51:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0F0DB1800381; Thu, 16 Jun 2022 07:51:17 +0200 (CEST) Date: Thu, 16 Jun 2022 07:51:17 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , "dionnaglaze@google.com" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [edk2-devel] [PATCH 07/14] OvmfPkg: Add PCD and DEFINEs for Lazy Accept page. Message-ID: <20220616055117.vrlynishfc5afbld@sirius.home.kraxel.org> References: <20220607104550.hz6c7etgxtksylwu@sirius.home.kraxel.org> <20220608061805.vvsjiqt55rqnl3fw@sirius.home.kraxel.org> <20220615080508.oqjojsevfxc4pw3f@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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 Hi, > > Tom Lendacky's suggestion for SEV-SNP is to pre-accept all memory under > > 4GB to make all that complexity go away. Only this approach worked in my > > own testing. With the MMIO hole it's just validating 3GB of memory. > Accepting all memory under 4GB will make the things much simpler. In this way I think the accept-on-demand maybe not needed. > A question: is there some performance impact when accepting all memory under 4GB? That would certainly be easiest when it is acceptable from a performance point of view. Will also simplify the code because you don't have to split the low memory block into accepted/unaccepted parts. It'll be 3G (-machine pc) or 2G (-machine q35) of memory. Is it possible to accept gigabyte pages btw? And, yes, this might be enough that accept-on-demand is not needed any more. take care, Gerd