aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-04-09 17:36:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-04-09 17:36:01 +0100
commit4b9a21c3442530908b2863b924e7c5ea7496cc57 (patch)
tree04d9620a5c3052c2be557716512153dfbc369ecc /hw
parent8cb2ca3d7479748587313f0b34034a3f8aa08c92 (diff)
parent3e20c81ed87cb15cd04f929b075e244e0758641a (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* fixes for Alpine and SuSE * fix crash when hot-plugging nvdimm on older machine types # gpg: Signature made Tue 09 Apr 2019 17:34:27 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: tests: Make check-block a phony target hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types include/qemu/bswap.h: Use __builtin_memcpy() in accessor functions roms: Allow passing configure options to the EDK2 build tools roms: Rename the EFIROM variable to avoid clashing with iPXE Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/pc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 6077d27361..f2c15bf1f2 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2078,6 +2078,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
const MachineState *ms = MACHINE(hotplug_dev);
const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
const uint64_t legacy_align = TARGET_PAGE_SIZE;
+ Error *local_err = NULL;
/*
* When -no-acpi is used with Q35 machine type, no ACPI is built,
@@ -2090,13 +2091,17 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- hotplug_handler_pre_plug(pcms->acpi_dev, dev, errp);
-
if (is_nvdimm && !ms->nvdimms_state->is_enabled) {
error_setg(errp, "nvdimm is not enabled: missing 'nvdimm' in '-M'");
return;
}
+ hotplug_handler_pre_plug(pcms->acpi_dev, dev, &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ return;
+ }
+
pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev),
pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp);
}