On Fri, 22 Feb 2019 16:53:55 +0800 Wei Yang <richardw.y...@linux.intel.com> wrote:
> On Thu, Feb 21, 2019 at 03:45:51PM +0100, Igor Mammedov wrote: > >On Tue, 19 Feb 2019 16:08:26 +0800 > >Wei Yang <richardw.y...@linux.intel.com> wrote: > > > >> 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.y...@linux.intel.com> > >> CC: Igor Mammedov <imamm...@redhat.com> > >> CC: Eric Blake <ebl...@redhat.com> > >patch refuses to be applied to current master > > > > Could latest upstream compile successfully? > works for me