aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/i8259.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-30 05:18:24 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:51:54 -0400
commit9ed049c3b6230b68985da31f8243d4bec95e0b3a (patch)
treedd2eda8711ee3ae3ecee5cbb94e635e1fb78297a /arch/x86/kvm/i8259.c
parent7d9ddaedd8a9d0442fda5b5a90f22a33becbd235 (diff)
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.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 4b7b73ce2098..6e77471951e8 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)
308 addr &= 1; 308 addr &= 1;
309 if (addr == 0) { 309 if (addr == 0) {
310 if (val & 0x10) { 310 if (val & 0x10) {
311 kvm_pic_reset(s); /* init */
312 /*
313 * deassert a pending interrupt
314 */
315 pic_irq_request(s->pics_state->kvm, 0);
316 s->init_state = 1;
317 s->init4 = val & 1; 311 s->init4 = val & 1;
312 s->last_irr = 0;
313 s->imr = 0;
314 s->priority_add = 0;
315 s->special_mask = 0;
316 s->read_reg_select = 0;
317 if (!s->init4) {
318 s->special_fully_nested_mode = 0;
319 s->auto_eoi = 0;
320 }
321 s->init_state = 1;
318 if (val & 0x02) 322 if (val & 0x02)
319 printk(KERN_ERR "single mode not supported"); 323 printk(KERN_ERR "single mode not supported");
320 if (val & 0x08) 324 if (val & 0x08)