[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v5 13/22] hw/i386: check if nvdimm is enabled before
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v5 13/22] hw/i386: check if nvdimm is enabled before plugging |
Date: |
Tue, 31 Jan 2017 22:19:34 +0200 |
From: Haozhong Zhang <address@hidden>
The missing of 'nvdimm' in the machine type option '-M' means NVDIMM
is disabled. QEMU should refuse to plug any NVDIMM device in this case
and report the misconfiguration.
The behavior of NVDIMM on unsupported platform (HW/FW) is vendor
specific. For some vendors, it's undefined and the platform may do
anything. Thus, I think QEMU is free to choose the implementation.
Aborting QEMU (i.e. refusing to boot) is the easiest one.
Reported-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Haozhong Zhang <address@hidden>
Message-Id: address@hidden
Message-Id: address@hidden
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Xiao Guangrong <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
hw/i386/pc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 706e233..e3fcd51 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1708,6 +1708,11 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev,
}
if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
+ if (!pcms->acpi_nvdimm_state.is_enabled) {
+ error_setg(&local_err,
+ "nvdimm is not enabled: missing 'nvdimm' in '-M'");
+ goto out;
+ }
nvdimm_plug(&pcms->acpi_nvdimm_state);
}
--
MST
- [Qemu-devel] [PULL v5 03/22] ppc: switch to constants within BUILD_BUG_ON, (continued)
- [Qemu-devel] [PULL v5 03/22] ppc: switch to constants within BUILD_BUG_ON, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 04/22] QEMU_BUILD_BUG_ON: use __COUNTER__, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 05/22] compiler: rework BUG_ON using a struct, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 06/22] compiler: expression version of QEMU_BUILD_BUG_ON, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 08/22] pci: mark ROMs read-only, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 09/22] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc(), Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 07/22] ARRAY_SIZE: check that argument is an array, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 11/22] hw/ioh3420: derive from PCI Express Root Port base class, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 10/22] hw/pcie: Introduce a base class for PCI Express Root Ports, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 12/22] hw/pcie: Introduce Generic PCI Express Root Port, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 13/22] hw/i386: check if nvdimm is enabled before plugging,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v5 14/22] msix: Follow CODING_STYLE, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 15/22] hcd-xhci: check & correct param before using it, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 17/22] virtio: make virtio_should_notify static, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 16/22] pci: Convert msix_init() to Error and fix callers, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 19/22] vhost-user: delete chardev on cleanup, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 18/22] vhost: skip ROM sections, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 20/22] hw/pci: disable pci-bridge's shpc by default, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 21/22] arm: better stub version for MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 22/22] arm: add trailing ; after MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31