]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Export PIC reset for kernel device reset
authorEddie Dong <eddie.dong@intel.com>
Wed, 10 Oct 2007 10:14:25 +0000 (12:14 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:55 +0000 (17:52 +0200)
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/i8259.c
drivers/kvm/irq.h

index a679157bc599ae0a54979ca9e75f9a4e6ff610dc..f0dc2eeadf0be8f8996e65dc43fb335856661dea 100644 (file)
@@ -181,10 +181,8 @@ int kvm_pic_read_irq(struct kvm_pic *s)
        return intno;
 }
 
-static void pic_reset(void *opaque)
+void kvm_pic_reset(struct kvm_kpic_state *s)
 {
-       struct kvm_kpic_state *s = opaque;
-
        s->last_irr = 0;
        s->irr = 0;
        s->imr = 0;
@@ -209,7 +207,7 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
        addr &= 1;
        if (addr == 0) {
                if (val & 0x10) {
-                       pic_reset(s);   /* init */
+                       kvm_pic_reset(s);       /* init */
                        /*
                         * deassert a pending interrupt
                         */
index 508280ea6fcfe91f904604543335a40aa7403513..e08ae1002bd8589b009768b5b385d9226e346d25 100644 (file)
@@ -139,6 +139,7 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu);
 int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu);
 int kvm_create_lapic(struct kvm_vcpu *vcpu);
 void kvm_lapic_reset(struct kvm_vcpu *vcpu);
+void kvm_pic_reset(struct kvm_kpic_state *s);
 void kvm_free_lapic(struct kvm_vcpu *vcpu);
 u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu);
 void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8);