From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web09.600.1580334273656485248 for ; Wed, 29 Jan 2020 13:44:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fOC4biHc; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580334272; 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=ypewx25rgunbWeLeXlJewjD3AF6Um20U7NvUALVz2p8=; b=fOC4biHc/DbPdeLZ8TqFHFsH2fq1e4q9GzvKEtQ55oOi/Cr8IDa41Vg1E2mqCBddMPK7v0 8HFUOPcblw6XpQJjsddmTuXve+gjKD3jTgQwcVkfPe4bjLTNBLaM1YMqjPxa7Sm7/L97cV e/3Vr467z0co+p8nwKR25b3UGhMsWaQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-3ulWbvtKPpCgYUu3Z6aL9Q-1; Wed, 29 Jan 2020 16:44:28 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 99361801E67; Wed, 29 Jan 2020 21:44:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id A30795DA75; Wed, 29 Jan 2020 21:44:26 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen Subject: [PATCH v2 08/11] OvmfPkg/SEV: don't manage the lifecycle of the SMRAM at the default SMBASE Date: Wed, 29 Jan 2020 22:44:09 +0100 Message-Id: <20200129214412.2361-9-lersek@redhat.com> In-Reply-To: <20200129214412.2361-1-lersek@redhat.com> References: <20200129214412.2361-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 3ulWbvtKPpCgYUu3Z6aL9Q-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: base64 V2hlbiBPVk1GIHJ1bnMgaW4gYSBTRVYgZ3Vlc3QsIHRoZSBpbml0aWFsIFNNTSBTYXZlIFN0YXRl IE1hcCBpcwoKKDEpIGFsbG9jYXRlZCBhcyBFZmlCb290U2VydmljZXNEYXRhIHR5cGUgbWVtb3J5 IGluIE92bWZQa2cvUGxhdGZvcm1QZWksCiAgICBmdW5jdGlvbiBBbWRTZXZJbml0aWFsaXplKCks IGZvciBwcmV2ZW50aW5nIHVuaW50ZW5kZWQgaW5mb3JtYXRpb24KICAgIHNoYXJpbmcgd2l0aCB0 aGUgaHlwZXJ2aXNvcjsKCigyKSBkZWNyeXB0ZWQgaW4gQW1kU2V2RHhlOwoKKDMpIHJlLWVuY3J5 cHRlZCBpbiBPdm1mUGtnL0xpYnJhcnkvU21tQ3B1RmVhdHVyZXNMaWIsIGZ1bmN0aW9uCiAgICBT bW1DcHVGZWF0dXJlc1NtbVJlbG9jYXRpb25Db21wbGV0ZSgpLCB3aGljaCBpcyBjYWxsZWQgYnkK ICAgIFBpU21tQ3B1RHhlU21tIHJpZ2h0IGFmdGVyIGluaXRpYWwgU01CQVNFIHJlbG9jYXRpb247 CgooNCkgcmVsZWFzZWQgdG8gRFhFIGF0IHRoZSBzYW1lIGxvY2F0aW9uLgoKVGhlIFNNUkFNIGF0 IHRoZSBkZWZhdWx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