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.10482.1681210099338031329 for ; Tue, 11 Apr 2023 03:48:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ErLj74XD; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681210098; 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=Fw1ic/xElvzUHNmGDEWY3nCtilx/qAwEr4M3T2pgrCA=; b=ErLj74XDYuxQZeUWG0hYYvKBvUPI0JA10aelatladMupIMKrahcKX+v9mKcfA2yoPvsmNr 63OepVzP2F53vpWZQOtbWj+O6KHEIrClkeWGzc0TL2rPT8B8Drmn+LiK1PeJc7QT17XWql xwDyoCOOO20bUODYmxV47pzHTcaG7FE= 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-114-_ZwMOAtxNZC8CDdeJD1q9w-1; Tue, 11 Apr 2023 06:48:14 -0400 X-MC-Unique: _ZwMOAtxNZC8CDdeJD1q9w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 141C58001A3; Tue, 11 Apr 2023 10:48:14 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3708C15BB8; Tue, 11 Apr 2023 10:48:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CEF5A1802393; Tue, 11 Apr 2023 12:48:11 +0200 (CEST) Date: Tue, 11 Apr 2023 12:48:11 +0200 From: "Gerd Hoffmann" To: "Ni, Ray" Cc: "devel@edk2.groups.io" , Abdul Lateef Attar , Abdul Lateef Attar , Paul Grimes , Garrett Kirkendall , Abner Chang , "Dong, Eric" , "Kumar, Rahul R" , Ard Biesheuvel , "Yao, Jiewen" , "Justen, Jordan L" Subject: Re: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 11, 2023 at 10:09:59AM +0000, Ni, Ray wrote: > Gerd, > I am asking Abdul to directly call SaveStateLib from CpuSmm driver. > I don't think SmmCpuFeaturesLib should be in the middle of CpuSmm driver and SaveStateLib > regarding the save state access. Yes, sure. The SmmCpuFeatures{Read,Write}SaveStateRegister() functions in OvmfPkg/Library/SmmCpuFeaturesLib can be removed in favor of the AMD version of SmmSmramSaveStateLib. There are a few more places in OvmfPkg/Library/SmmCpuFeaturesLib which access the state, for example the functions handling CPU hutplug. They use QEMU_SMRAM_SAVE_STATE_MAP today, which should be identical to the AMD version, so once we have the AMD version merged into the tree ovmf can just use that instead of its own copy. take care, Gerd