From patchwork Thu Sep 22 12:21:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hoo X-Patchwork-Id: 12985187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0F95C6FA82 for ; Thu, 22 Sep 2022 13:55:03 +0000 (UTC) Received: from localhost ([::1]:39826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obMfO-00082q-Lt for qemu-devel@archiver.kernel.org; Thu, 22 Sep 2022 09:55:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obLDm-0002Bm-RY for qemu-devel@nongnu.org; Thu, 22 Sep 2022 08:22:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:16864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obLDl-0000xF-0S for qemu-devel@nongnu.org; Thu, 22 Sep 2022 08:22:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663849345; x=1695385345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MmZEcM/DX7E2Mrb4q8YJoVFF6Y6AX8QuVLN7woNCJWE=; b=Ia+BpIyOMVuX/RvtgHzBTgUPvf1Anitg+iGwCh8I9EEo0cexCHZUwXH5 B9Jklxko3Vxhmmy5arWOmKzY4ynWegBRfFrsjD5tcju6yXY6/Xn1UUFeq BY0ja6AjYpZtM640+TOnrB9IXU6W0hy/yLBMKiJsSyYVLJZXc5WwzG2re sX82XF0SHwYtcRyl2gvIfwcYf/tuAxmhOjWqCPJfH4gRexDe1g2C4dOyp PB82QWf6kdj14XrCfVMEQrd3ZpcddLr0q/y51+90QzeqGBIgCgg0SAyGI ZYN3A2S8YzO+bYnVHNzJf2vsqbBLwtG2+ipWO+JSBa8aoLlXMd/S4sz4U w==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301128378" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="301128378" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 05:22:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="795063261" Received: from sqa-gate.sh.intel.com (HELO robert-clx2.tsp.org) ([10.239.48.212]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2022 05:22:09 -0700 From: Robert Hoo To: imammedo@redhat.com, mst@redhat.com, xiaoguangrong.eric@gmail.com, ani@anisinha.ca, jingqi.liu@intel.com Cc: qemu-devel@nongnu.org, robert.hu@intel.com, Robert Hoo Subject: [PATCH v4 3/5] acpi/nvdimm: define macro for NVDIMM Device _DSM Date: Thu, 22 Sep 2022 20:21:53 +0800 Message-Id: <20220922122155.1326543-4-robert.hu@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220922122155.1326543-1-robert.hu@linux.intel.com> References: <20220922122155.1326543-1-robert.hu@linux.intel.com> MIME-Version: 1.0 Received-SPF: none client-ip=134.134.136.24; envelope-from=robert.hu@linux.intel.com; helo=mga09.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Since it will be heavily used in next patch, define macro NVDIMM_DEVICE_DSM_UUID for "4309AC30-0D11-11E4-9191-0800200C9A66", which is NVDIMM device specific method uuid defined in NVDIMM _DSM interface spec, Section 3. [1] No functional changes in this patch. [1] https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf Signed-off-by: Robert Hoo Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 201317c611..afff911c1e 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -922,6 +922,7 @@ void nvdimm_init_acpi_state(NVDIMMState *state, MemoryRegion *io, #define NVDIMM_DSM_RFIT_STATUS "RSTA" #define NVDIMM_QEMU_RSVD_UUID "648B9CF2-CDA1-4312-8AD9-49C4AF32BD62" +#define NVDIMM_DEVICE_DSM_UUID "4309AC30-0D11-11E4-9191-0800200C9A66" static void nvdimm_build_common_dsm(Aml *dev, NVDIMMState *nvdimm_state) @@ -1029,8 +1030,7 @@ static void nvdimm_build_common_dsm(Aml *dev, /* UUID for QEMU internal use */), expected_uuid)); aml_append(elsectx, ifctx); elsectx2 = aml_else(); - aml_append(elsectx2, aml_store( - aml_touuid("4309AC30-0D11-11E4-9191-0800200C9A66") + aml_append(elsectx2, aml_store(aml_touuid(NVDIMM_DEVICE_DSM_UUID) /* UUID for NVDIMM Devices */, expected_uuid)); aml_append(elsectx, elsectx2); aml_append(method, elsectx);