diff options
author | Avi Kivity <avi@redhat.com> | 2010-08-30 12:18:24 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 10:51:54 +0200 |
commit | 9ed049c3b6230b68985da31f8243d4bec95e0b3a (patch) | |
tree | dd2eda8711ee3ae3ecee5cbb94e635e1fb78297a /arch/x86/kvm/i8259.c | |
parent | 7d9ddaedd8a9d0442fda5b5a90f22a33becbd235 (diff) | |
download | op-kernel-dev-9ed049c3b6230b68985da31f8243d4bec95e0b3a.zip op-kernel-dev-9ed049c3b6230b68985da31f8243d4bec95e0b3a.tar.gz |
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: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8259.c')
-rw-r--r-- | arch/x86/kvm/i8259.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 4b7b73c..6e77471 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -308,13 +308,17 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) addr &= 1; if (addr == 0) { 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->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) printk(KERN_ERR "single mode not supported"); if (val & 0x08) |