提交 9ed049c3 编写于 作者: A Avi Kivity

KVM: i8259: Make ICW1 conform to spec

ICW is not a full reset, instead it resets a limited number of registers
in the PIC.  Change ICW1 emulation to only reset those registers.
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 7d9ddaed
...@@ -308,13 +308,17 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) ...@@ -308,13 +308,17 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
addr &= 1; addr &= 1;
if (addr == 0) { if (addr == 0) {
if (val & 0x10) { if (val & 0x10) {
kvm_pic_reset(s); /* init */
/*
* deassert a pending interrupt
*/
pic_irq_request(s->pics_state->kvm, 0);
s->init_state = 1;
s->init4 = val & 1; s->init4 = val & 1;
s->last_irr = 0;
s->imr = 0;
s->priority_add = 0;
s->special_mask = 0;
s->read_reg_select = 0;
if (!s->init4) {
s->special_fully_nested_mode = 0;
s->auto_eoi = 0;
}
s->init_state = 1;
if (val & 0x02) if (val & 0x02)
printk(KERN_ERR "single mode not supported"); printk(KERN_ERR "single mode not supported");
if (val & 0x08) if (val & 0x08)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册