diff mbox

[RFC,QEMU,v3,09/10] nvdimm acpi: do not build _FIT method on Xen

Message ID 20170911044157.15403-10-haozhong.zhang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Haozhong Zhang Sept. 11, 2017, 4:41 a.m. UTC
Xen currently does not support vNVDIMM hotplug and always sets QEMU
option "maxmem" to be just enough for RAM and vNVDIMM, so it's not
necessary to build _FIT method when QEMU is used as Xen device model.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
---
 hw/acpi/nvdimm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index bf887512ad..61789c3966 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1245,7 +1245,14 @@  static void nvdimm_build_ssdt_device(Aml *dev, uint32_t ram_slots)
 
     /* 0 is reserved for root device. */
     nvdimm_build_device_dsm(dev, 0);
-    nvdimm_build_fit(dev);
+    /*
+     * Xen does not support vNVDIMM hotplug, and always sets the QEMU
+     * option "maxmem" to be just enough for RAM and static plugged
+     * vNVDIMM, so it's unnecessary to build _FIT method on Xen.
+     */
+    if (!xen_enabled()) {
+        nvdimm_build_fit(dev);
+    }
 
     nvdimm_build_nvdimm_devices(dev, ram_slots);
 }