[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1198667160-22953-5-git-send-email-avi@qumranet.com>
Date: Wed, 26 Dec 2007 13:05:09 +0200
From: Avi Kivity <avi@...ranet.com>
To: linux-kernel@...r.kernel.org, kvm-devel@...ts.sourceforge.net
Cc: Eddie Dong <eddie.dong@...el.com>
Subject: [PATCH 04/55] KVM: Export PIC reset for kernel device reset
From: Eddie Dong <eddie.dong@...el.com>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@...el.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
---
drivers/kvm/i8259.c | 6 ++----
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 a679157..f0dc2ee 100644
--- a/drivers/kvm/i8259.c
+++ b/drivers/kvm/i8259.c
@@ -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
*/
diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h
index 508280e..e08ae10 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);
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);
--
1.5.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists