KVM: i8259: initialize isr_ack [Linux 2.6.37]

This Linux kernel change "KVM: i8259: initialize isr_ack" is included in the Linux 2.6.37 release. This change is authored by Avi Kivity <avi [at] redhat.com> on Fri Dec 31 10:52:15 2010 +0200. The commit for this change in Linux stable tree is d0dfc6b (patch).

KVM: i8259: initialize isr_ack

isr_ack is never initialized.  So, until the first PIC reset, interrupts
may fail to be injected.  This can cause Windows XP to fail to boot, as
reported in the fallout from the fix to

Reported-and-tested-by: Nicolas Prochazka <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/x86/kvm/i8259.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index f628234..3cece05 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -575,6 +575,8 @@ struct kvm_pic *kvm_create_pic(struct kvm *kvm)
    s->pics[1].elcr_mask = 0xde;
    s->pics[0].pics_state = s;
    s->pics[1].pics_state = s;
+   s->pics[0].isr_ack = 0xff;
+   s->pics[1].isr_ack = 0xff;

     * Initialize PIO device

Leave a Reply

Your email address will not be published. Required fields are marked *