提交 aa24822b 编写于 作者: J Jan Kiszka 提交者: Anthony Liguori

i8259: Do not clear level-triggered lines in IRR on init

When an input line is handled as level-triggered, it will immediately
raise an IRQ on the output of a PIC again that goes through an init
reset. So only clear the edge-triggered inputs from IRR in that
scenario.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 4aa5d285
......@@ -231,8 +231,8 @@ static void pic_reset(DeviceState *dev)
{
PICCommonState *s = DO_UPCAST(PICCommonState, dev.qdev, dev);
pic_init_reset(s);
s->elcr = 0;
pic_init_reset(s);
}
static void pic_ioport_write(void *opaque, target_phys_addr_t addr64,
......
......@@ -28,7 +28,7 @@
void pic_reset_common(PICCommonState *s)
{
s->last_irr = 0;
s->irr = 0;
s->irr &= s->elcr;
s->imr = 0;
s->isr = 0;
s->priority_add = 0;
......
......@@ -84,8 +84,8 @@ static void kvm_pic_reset(DeviceState *dev)
{
PICCommonState *s = DO_UPCAST(PICCommonState, dev.qdev, dev);
pic_reset_common(s);
s->elcr = 0;
pic_reset_common(s);
kvm_pic_put(s);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册