diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-01-24 15:06:05 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 14:57:30 +0200 |
commit | 242ec97c358256ad6e62dab869f63a03cd244122 (patch) | |
tree | 58dd14b9972084f95a31ea3a2fa51e226b8bef7d /arch/x86/kvm | |
parent | d2a1b483a4a3f4bbb5fec1877f716c15ac7fa405 (diff) |
KVM: x86: reset edge sense circuit of i8259 on init
The spec says that during initialization "The edge sense circuit is
reset which means that following initialization an interrupt request
(IR) input must make a low-to-high transition to generate an interrupt",
but currently if edge triggered interrupt is in IRR it is delivered
after i8259 initialization.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/i8259.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index b6a73537e1ef..81cf4fa4a2be 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -307,6 +307,7 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) if (val & 0x10) { s->init4 = val & 1; s->last_irr = 0; + s->irr &= s->elcr; s->imr = 0; s->priority_add = 0; s->special_mask = 0; |