From a7e519a8cf12c9f08a28339743b648dde38cd9d3 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Fri, 30 May 2014 19:34:14 +1000 Subject: xics: Disable flags reset on xics reset 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 Signed-off-by: Alexander Graf --- hw/intc/xics_kvm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/intc/xics_kvm.c') diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 5461454b30..20b19e9d4f 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -267,11 +267,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); -- cgit v1.2.3