[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 05/13] pseries: Clear TCE and signal state when resett
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 05/13] pseries: Clear TCE and signal state when resetting PAPR VIO devices |
Date: |
Thu, 13 Sep 2012 12:57:13 +1000 |
When we reset the system, the reset method for VIO bus devices resets
the state of their request queue (if present) as it should. However
it was not resetting the state of their TCE table (DMA translation) if
present. It was also not resetting the state of the per-device signal
mask set with H_VIO_SIGNAL. This patch corrects both bugs, and also
removes some small code duplication in the reset paths.
Signed-off-by: David Gibson <address@hidden>
---
hw/spapr_vio.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c
index 7ca4452..752836e 100644
--- a/hw/spapr_vio.c
+++ b/hw/spapr_vio.c
@@ -324,9 +324,7 @@ static void spapr_vio_quiesce_one(VIOsPAPRDevice *dev)
}
dev->dma = spapr_tce_new_dma_context(liobn, pc->rtce_window_size);
- dev->crq.qladdr = 0;
- dev->crq.qsize = 0;
- dev->crq.qnext = 0;
+ free_crq(dev);
}
static void rtas_set_tce_bypass(sPAPREnvironment *spapr, uint32_t token,
@@ -409,9 +407,10 @@ static void spapr_vio_busdev_reset(DeviceState *qdev)
VIOsPAPRDevice *dev = DO_UPCAST(VIOsPAPRDevice, qdev, qdev);
VIOsPAPRDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev);
- if (dev->crq.qsize) {
- free_crq(dev);
- }
+ /* Shut down the request queue and TCEs if necessary */
+ spapr_vio_quiesce_one(dev);
+
+ dev->signal_state = 0;
if (pc->reset) {
pc->reset(dev);
--
1.7.10.4
- [Qemu-ppc] [0/13] pseries patch queue, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 09/13] pseries: Remove C bitfields from xics code, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 02/13] pseries: Fix and cleanup CPU initialization and reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 10/13] pseries: Remove XICS irq type enum type, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 07/13] pseries: Fix XICS reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 03/13] pseries: Use new method to correct reset sequence, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 06/13] pseries: Reset emulated PCI TCE tables on system reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 05/13] pseries: Clear TCE and signal state when resetting PAPR VIO devices,
David Gibson <=
- [Qemu-ppc] [PATCH 11/13] pseries: Remove never used flags field from spapr vio devices, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 08/13] pseries: Small cleanup to H_CEDE implementation, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 01/13] ppc: Make kvm_arch_put_registers() put *all* the registers, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 12/13] pseries: Rework implementation of TCE bypass, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 04/13] pseries: Add support for new KVM hash table control call, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 13/13] pseries: Fix semantics of RTAS int-on, int-off and set-xive functions, David Gibson, 2012/09/12
- Re: [Qemu-ppc] [0/13] pseries patch queue, Alexander Graf, 2012/09/19