]> Git Repo - qemu.git/commitdiff
nvdimm acpi: check revision
authorXiao Guangrong <[email protected]>
Tue, 7 Jun 2016 12:22:05 +0000 (20:22 +0800)
committerMichael S. Tsirkin <[email protected]>
Fri, 24 Jun 2016 02:13:57 +0000 (05:13 +0300)
Currently only revision 1 is supported

Signed-off-by: Xiao Guangrong <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/acpi/nvdimm.c

index 07c95c1f1f4287bdd725fead340b3b7aca164999..8b8928558730f015ee6fb0b3057aaeb051517385 100644 (file)
@@ -485,6 +485,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);
This page took 0.027457 seconds and 4 git commands to generate.