[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 3/9] xics: Disable flags reset on xics reset
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH v3 3/9] xics: Disable flags reset on xics reset |
Date: |
Fri, 30 May 2014 19:34:14 +1000 |
Since islsi[] array has been merged into the ICSState struct,
we must not reset flags as they tell if the interrupt is in use.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/intc/xics.c | 7 +++++++
hw/intc/xics_kvm.c | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 84eb4fe..9edfbba 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -521,11 +521,18 @@ static void ics_reset(DeviceState *dev)
{
ICSState *ics = ICS(dev);
int i;
+ uint8_t flags[ics->nr_irqs];
+
+ for (i = 0; i < ics->nr_irqs; i++) {
+ flags[i] = ics->irqs[i].flags;
+ }
memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
+
for (i = 0; i < ics->nr_irqs; i++) {
ics->irqs[i].priority = 0xff;
ics->irqs[i].saved_priority = 0xff;
+ ics->irqs[i].flags = flags[i];
}
}
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 8719a88..6fa2412 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -271,11 +271,18 @@ static void ics_kvm_reset(DeviceState *dev)
{
ICSState *ics = ICS(dev);
int i;
+ uint8_t flags[ics->nr_irqs];
+
+ for (i = 0; i < ics->nr_irqs; i++) {
+ flags[i] = ics->irqs[i].flags;
+ }
memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
+
for (i = 0; i < ics->nr_irqs; i++) {
ics->irqs[i].priority = 0xff;
ics->irqs[i].saved_priority = 0xff;
+ ics->irqs[i].flags = flags[i];
}
ics_set_kvm_state(ics, 1);
--
2.0.0
- [Qemu-ppc] [PATCH v3 8/9] vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag), (continued)
- [Qemu-ppc] [PATCH v3 8/9] vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag), Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 2/9] xics: Add xics_find_source(), Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 1/9] xics: Add flags for interrupts, Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 6/9] spapr: Remove @next_irq, Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 7/9] xics: Implement xics_ics_free(), Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 5/9] xics: Remove obsolete xics_set_irq_type(), Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB, Alexey Kardashevskiy, 2014/05/30
- [Qemu-ppc] [PATCH v3 3/9] xics: Disable flags reset on xics reset,
Alexey Kardashevskiy <=