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.web11.11851.1620905165993358783 for ; Thu, 13 May 2021 04:26:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Nd3MG2rD; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620905165; 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=FPWGE/dlhQ48VoVBxnBbKaDsQY0ZAVoN/7SSwvG1DGw=; b=Nd3MG2rD8k5L2PxKk1zPN89i+Zq9k6iJ95McFaVkmknu/hAhCqBpFVr3fIVRL0En7AJvaq EG/0H00AmLOa8BdcBDDZNZNC9SXu4VLFVjaM4T9n0rJPYSMPsKs4tHKi5JjV5aCzzC5e8y deQtt1YUCN7EATvC+bhtPUR6DiAnUUY= 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-320-3dYV1gt4M0O8mgrjUb9oRA-1; Thu, 13 May 2021 07:26:01 -0400 X-MC-Unique: 3dYV1gt4M0O8mgrjUb9oRA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 387291966322; Thu, 13 May 2021 11:26:00 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-183.ams2.redhat.com [10.36.112.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 467DE19C95; Thu, 13 May 2021 11:25:58 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 13/13] OvmfPkg/BaseMemEncryptSevLib: remove Flush parameter To: Brijesh Singh , devel@edk2.groups.io Cc: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas References: <20210507203838.23706-1-brijesh.singh@amd.com> <20210507203838.23706-14-brijesh.singh@amd.com> <3c85698e-0b5e-38b0-f752-30204cb78cad@redhat.com> <41c63c63-554d-1f7d-5d27-bd649261e897@amd.com> <2833c64b-3782-dcc2-5c09-aeeb6bb061f5@amd.com> From: "Laszlo Ersek" Message-ID: <02f36769-dd81-34bd-9929-49a7f6c90370@redhat.com> Date: Thu, 13 May 2021 13:25:57 +0200 MIME-Version: 1.0 In-Reply-To: <2833c64b-3782-dcc2-5c09-aeeb6bb061f5@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/12/21 18:35, Brijesh Singh wrote: > > On 5/11/21 12:45 PM, Brijesh Singh wrote: >> 1) Drop the cache flush param from high level >> MemEncryptSev{Set,Clear}PageEncMask and don't touch anything in the >> SetMemoryEncDec() >> >> 2) Rename the Flush parameter to Mmio in the SetMemoryEncDec() >> >> Does it makes sense to you ? > > I am going to drop the Mmio hunk from this patch to make it sane. I was > thinking ahead for the SEV-SNP support; For SEV and ES support, the > SetMemoryEncDec() does not need to know whether its called for Mmio or > RAM address. In SNP, the SetMemoryEncDec() will need to know this > information so that it can skip the page state change. Yes, that's fine -- basically implement (2) as proposed above, just delay it to a later series. Thanks Laszlo