Skip to content

Commit

Permalink
KVM: Export PIC reset for kernel device reset
Browse files Browse the repository at this point in the history
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Eddie Dong authored and Avi Kivity committed Jan 30, 2008
1 parent 6039522 commit 2fcceae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/kvm/i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions drivers/kvm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2fcceae

Please sign in to comment.