qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/acpi: Do not create memory hotplug method when handler is not defined

With Hardware-reduced ACPI, the GED device will manage ACPI
hotplug entirely. As a consequence, make the memory specific
events AML generation optional. The code will only be added
when the method name is not NULL.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190918130633.4872-3-shameerali.kolothum.thodi@huawei.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Samuel Ortiz and committed by
Michael S. Tsirkin
22338fea 091c466e

+6 -4
+6 -4
hw/acpi/memory_hotplug.c
··· 712 712 } 713 713 aml_append(table, dev_container); 714 714 715 - method = aml_method(event_handler_method, 0, AML_NOTSERIALIZED); 716 - aml_append(method, 717 - aml_call0(MEMORY_DEVICES_CONTAINER "." MEMORY_SLOT_SCAN_METHOD)); 718 - aml_append(table, method); 715 + if (event_handler_method) { 716 + method = aml_method(event_handler_method, 0, AML_NOTSERIALIZED); 717 + aml_append(method, aml_call0(MEMORY_DEVICES_CONTAINER "." 718 + MEMORY_SLOT_SCAN_METHOD)); 719 + aml_append(table, method); 720 + } 719 721 720 722 g_free(mhp_res_path); 721 723 }