diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-10-10 06:14:25 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:55 -0500 |
commit | 2fcceae145645ec6a4fab0a806bb674d7484d97b (patch) | |
tree | 1b17bb063940bcef205a7d21dbb820ffca7adc38 /drivers | |
parent | 60395224d94945544f1f9dce5566981844bf0e77 (diff) |
KVM: Export PIC reset for kernel device reset
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/i8259.c | 6 | ||||
-rw-r--r-- | drivers/kvm/irq.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/kvm/i8259.c b/drivers/kvm/i8259.c index a679157bc59..f0dc2eeadf0 100644 --- a/drivers/kvm/i8259.c +++ b/drivers/kvm/i8259.c | |||
@@ -181,10 +181,8 @@ int kvm_pic_read_irq(struct kvm_pic *s) | |||
181 | return intno; | 181 | return intno; |
182 | } | 182 | } |
183 | 183 | ||
184 | static void pic_reset(void *opaque) | 184 | void kvm_pic_reset(struct kvm_kpic_state *s) |
185 | { | 185 | { |
186 | struct kvm_kpic_state *s = opaque; | ||
187 | |||
188 | s->last_irr = 0; | 186 | s->last_irr = 0; |
189 | s->irr = 0; | 187 | s->irr = 0; |
190 | s->imr = 0; | 188 | s->imr = 0; |
@@ -209,7 +207,7 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) | |||
209 | addr &= 1; | 207 | addr &= 1; |
210 | if (addr == 0) { | 208 | if (addr == 0) { |
211 | if (val & 0x10) { | 209 | if (val & 0x10) { |
212 | pic_reset(s); /* init */ | 210 | kvm_pic_reset(s); /* init */ |
213 | /* | 211 | /* |
214 | * deassert a pending interrupt | 212 | * deassert a pending interrupt |
215 | */ | 213 | */ |
diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 508280ea6fc..e08ae1002bd 100644 --- a/drivers/kvm/irq.h +++ b/drivers/kvm/irq.h | |||
@@ -139,6 +139,7 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu); | |||
139 | int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu); | 139 | int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu); |
140 | int kvm_create_lapic(struct kvm_vcpu *vcpu); | 140 | int kvm_create_lapic(struct kvm_vcpu *vcpu); |
141 | void kvm_lapic_reset(struct kvm_vcpu *vcpu); | 141 | void kvm_lapic_reset(struct kvm_vcpu *vcpu); |
142 | void kvm_pic_reset(struct kvm_kpic_state *s); | ||
142 | void kvm_free_lapic(struct kvm_vcpu *vcpu); | 143 | void kvm_free_lapic(struct kvm_vcpu *vcpu); |
143 | u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu); | 144 | u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu); |
144 | void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8); | 145 | void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8); |