Searched hist:"9040 e6dfa8c3fed87695a3de555d2c775727bb51" (Results 1 – 5 of 5) sorted by relevance
/qemu/include/hw/acpi/ |
H A D | ich9.h | 9040e6dfa8c3fed87695a3de555d2c775727bb51 Fri Mar 01 03:35:48 UTC 2019 Wei Yang <richardw.yang@linux.intel.com> i386, acpi: check acpi_memory_hotplug capacity in pre_plug
Currently we do device realization like below:
hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug()
Before we do device realization and plug, we should allocate necessary resources and check if memory-hotplug-support property is enabled.
At the piix4 and ich9, the memory-hotplug-support property is checked at plug stage. This means that device has been realized and mapped into guest address space 'pc_dimm_plug()' by the time acpi plug handler is called, where it might fail and crash QEMU due to reaching g_assert_not_reached() (piix4) or error_abort (ich9).
Fix it by checking if memory hotplug is enabled at pre_plug stage where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> CC: Igor Mammedov <imammedo@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190301033548.6691-1-richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
/qemu/hw/acpi/ |
H A D | ich9.c | 9040e6dfa8c3fed87695a3de555d2c775727bb51 Fri Mar 01 03:35:48 UTC 2019 Wei Yang <richardw.yang@linux.intel.com> i386, acpi: check acpi_memory_hotplug capacity in pre_plug
Currently we do device realization like below:
hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug()
Before we do device realization and plug, we should allocate necessary resources and check if memory-hotplug-support property is enabled.
At the piix4 and ich9, the memory-hotplug-support property is checked at plug stage. This means that device has been realized and mapped into guest address space 'pc_dimm_plug()' by the time acpi plug handler is called, where it might fail and crash QEMU due to reaching g_assert_not_reached() (piix4) or error_abort (ich9).
Fix it by checking if memory hotplug is enabled at pre_plug stage where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> CC: Igor Mammedov <imammedo@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190301033548.6691-1-richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
H A D | piix4.c | 9040e6dfa8c3fed87695a3de555d2c775727bb51 Fri Mar 01 03:35:48 UTC 2019 Wei Yang <richardw.yang@linux.intel.com> i386, acpi: check acpi_memory_hotplug capacity in pre_plug
Currently we do device realization like below:
hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug()
Before we do device realization and plug, we should allocate necessary resources and check if memory-hotplug-support property is enabled.
At the piix4 and ich9, the memory-hotplug-support property is checked at plug stage. This means that device has been realized and mapped into guest address space 'pc_dimm_plug()' by the time acpi plug handler is called, where it might fail and crash QEMU due to reaching g_assert_not_reached() (piix4) or error_abort (ich9).
Fix it by checking if memory hotplug is enabled at pre_plug stage where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> CC: Igor Mammedov <imammedo@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190301033548.6691-1-richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
/qemu/hw/isa/ |
H A D | lpc_ich9.c | 9040e6dfa8c3fed87695a3de555d2c775727bb51 Fri Mar 01 03:35:48 UTC 2019 Wei Yang <richardw.yang@linux.intel.com> i386, acpi: check acpi_memory_hotplug capacity in pre_plug
Currently we do device realization like below:
hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug()
Before we do device realization and plug, we should allocate necessary resources and check if memory-hotplug-support property is enabled.
At the piix4 and ich9, the memory-hotplug-support property is checked at plug stage. This means that device has been realized and mapped into guest address space 'pc_dimm_plug()' by the time acpi plug handler is called, where it might fail and crash QEMU due to reaching g_assert_not_reached() (piix4) or error_abort (ich9).
Fix it by checking if memory hotplug is enabled at pre_plug stage where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> CC: Igor Mammedov <imammedo@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190301033548.6691-1-richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
/qemu/hw/i386/ |
H A D | pc.c | ae909496e9d33f8c074f1063597298ba1d183133 Sun Apr 07 09:23:14 UTC 2019 Thomas Huth <thuth@redhat.com> hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types
QEMU currently crashes when you try to hot-plug an "nvdimm" device on older machine types:
$ qemu-system-x86_64 -monitor stdio -M pc-1.1 QEMU 3.1.92 monitor - type 'help' for more information (qemu) device_add nvdimm,id=nvdimmn1 qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv: Assertion `*errp == ((void *)0)' failed. Aborted (core dumped)
The call to hotplug_handler_pre_plug() in pc_memory_pre_plug() has been added recently before the check whether nvdimm is enabled. It should be done after the check. And while we're at it, also check the errp after the hotplug_handler_pre_plug(), otherwise errors are silently ignored here.
Fixes: 9040e6dfa8c3fed87695a3de555d2c775727bb51 Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190407092314.11066-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> 9040e6dfa8c3fed87695a3de555d2c775727bb51 Fri Mar 01 03:35:48 UTC 2019 Wei Yang <richardw.yang@linux.intel.com> i386, acpi: check acpi_memory_hotplug capacity in pre_plug
Currently we do device realization like below:
hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug()
Before we do device realization and plug, we should allocate necessary resources and check if memory-hotplug-support property is enabled.
At the piix4 and ich9, the memory-hotplug-support property is checked at plug stage. This means that device has been realized and mapped into guest address space 'pc_dimm_plug()' by the time acpi plug handler is called, where it might fail and crash QEMU due to reaching g_assert_not_reached() (piix4) or error_abort (ich9).
Fix it by checking if memory hotplug is enabled at pre_plug stage where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> CC: Igor Mammedov <imammedo@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190301033548.6691-1-richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|