From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agTMv-0006UQ-O5 for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agTMq-0001Yj-9S for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:33:21 -0400 Received: from mga14.intel.com ([192.55.52.115]:49128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agTMq-0001Sg-4R for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:33:16 -0400 From: Xiao Guangrong Date: Thu, 17 Mar 2016 16:32:57 +0800 Message-Id: <1458203581-59143-12-git-send-email-guangrong.xiao@linux.intel.com> In-Reply-To: <1458203581-59143-1-git-send-email-guangrong.xiao@linux.intel.com> References: <1458203581-59143-1-git-send-email-guangrong.xiao@linux.intel.com> Subject: [Qemu-devel] [PATCH 11/15] nvdimm acpi: check revision List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pbonzini@redhat.com, imammedo@redhat.com Cc: Xiao Guangrong , ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, dan.j.williams@intel.com, rth@twiddle.net Cuurently only revision 1 is supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 071f66f..83d80f5 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -481,6 +481,13 @@ nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) nvdimm_debug("Revision %#x Handler %#x Function %#x.\n", in->revision, in->handle, in->function); + if (in->revision != 0x1 /* Currently we only support DSM Spec Rev1. */) { + nvdimm_debug("Revision %#x is not supported, expect %#x.\n", + in->revision, 0x1); + nvdimm_dsm_no_payload(1 /* Not Supported */, dsm_mem_addr); + goto exit; + } + /* Handle 0 is reserved for NVDIMM Root Device. */ if (!in->handle) { nvdimm_dsm_root(in, dsm_mem_addr); -- 1.8.3.1