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 <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
641c349352
commit
a7e519a8cf
@ -520,11 +520,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];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user