[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 20/20] Revert "spapr: fix memory hot-unplugging"
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 20/20] Revert "spapr: fix memory hot-unplugging" |
Date: |
Fri, 9 Jun 2017 15:26:52 +1000 |
From: Laurent Vivier <address@hidden>
This reverts commit fe6824d12642b005c69123ecf8631f9b13553f8b.
Conflicts hw/ppc/spapr_drc.c, because get_index() has been renamed
spapr_get_index().
This didn't fix the problem. Once the hotplug has been started
some memory is allocated and some structures are allocated.
We don't free it when we ignore the unplug, and we can't because
they can be in use by the kernel.
Signed-off-by: Laurent Vivier <address@hidden>
Tested-by: Daniel Barboza <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_drc.c | 20 +++-----------------
include/hw/ppc/spapr_drc.h | 1 -
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 15ef67d..5cb75bb 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -128,17 +128,6 @@ static uint32_t set_allocation_state(sPAPRDRConnector *drc,
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
- if (drc->awaiting_release && drc->awaiting_allocation) {
- /* kernel is acknowledging a previous hotplug event
- * while we are already removing it.
- * it's safe to ignore awaiting_allocation here since we know the
- * situation is predicated on the guest either already having done
- * so (boot-time hotplug), or never being able to acquire in the
- * first place (hotplug followed by immediate unplug).
- */
- drc->awaiting_allocation_skippable = true;
- return RTAS_OUT_NO_SUCH_INDICATOR;
- }
}
if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI) {
@@ -391,11 +380,9 @@ void spapr_drc_detach(sPAPRDRConnector *drc, DeviceState
*d, Error **errp)
}
if (drc->awaiting_allocation) {
- if (!drc->awaiting_allocation_skippable) {
- drc->awaiting_release = true;
- trace_spapr_drc_awaiting_allocation(spapr_drc_index(drc));
- return;
- }
+ drc->awaiting_release = true;
+ trace_spapr_drc_awaiting_allocation(spapr_drc_index(drc));
+ return;
}
drc->dr_indicator = SPAPR_DR_INDICATOR_INACTIVE;
@@ -418,7 +405,6 @@ void spapr_drc_detach(sPAPRDRConnector *drc, DeviceState
*d, Error **errp)
}
drc->awaiting_release = false;
- drc->awaiting_allocation_skippable = false;
g_free(drc->fdt);
drc->fdt = NULL;
drc->fdt_start_offset = 0;
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index c487123..bc9f988 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -201,7 +201,6 @@ typedef struct sPAPRDRConnector {
bool awaiting_release;
bool signalled;
bool awaiting_allocation;
- bool awaiting_allocation_skippable;
/* device pointer, via link property */
DeviceState *dev;
--
2.9.4
- [Qemu-ppc] [PULL 04/20] pseries: Correct panic behaviour for pseries machine type, (continued)
- [Qemu-ppc] [PULL 04/20] pseries: Correct panic behaviour for pseries machine type, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 07/20] spapr: Clean up RTAS set-indicator, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 19/20] xics: drop ICPStateClass::cpu_setup() handler, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 11/20] spapr: Rework DRC name handling, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 15/20] hw/cpu: core.c can be compiled as common object, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 08/20] spapr: Clean up handling of DR-indicator, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 09/20] spapr: Change DRC attach & detach methods to functions, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 17/20] xics: pass appropriate types to realize() handlers., David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 12/20] pnv_core: drop reference on ICPState object during CPU realization, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 13/20] xics: add reset() handler to ICPStateClass, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 20/20] Revert "spapr: fix memory hot-unplugging",
David Gibson <=
- [Qemu-ppc] [PULL 18/20] xics: setup cpu at realize time, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 05/20] spapr: Clean up DR entity sense handling, David Gibson, 2017/06/09
- [Qemu-ppc] [PULL 16/20] xics: introduce macros for ICP/ICS link properties, David Gibson, 2017/06/09
- Re: [Qemu-ppc] [PULL 00/20] ppc-for-2.10 queue 20170609, Peter Maydell, 2017/06/13