Message ID | 20161010003423.4333-4-haozhong.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index e486128..c9c2a84 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -770,8 +770,11 @@ void nvdimm_init_acpi_state(AcpiNVDIMMState *state, MemoryRegion *io, state->dsm_mem = g_array_new(false, true /* clear */, 1); acpi_data_push(state->dsm_mem, sizeof(NvdimmDsmIn)); - fw_cfg_add_file(fw_cfg, NVDIMM_DSM_MEM_FILE, state->dsm_mem->data, - state->dsm_mem->len); + /* No fw_cfg is used when running on Xen */ + if (fw_cfg) { + fw_cfg_add_file(fw_cfg, NVDIMM_DSM_MEM_FILE, state->dsm_mem->data, + state->dsm_mem->len); + } } #define NVDIMM_COMMON_DSM "NCAL"
No fw_cfg is created when QEMU is used as the device model of Xen. Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> --- Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/nvdimm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)