KVM: Add kvm_free_lapic() to pair with kvm_create_lapic()
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Oct 2007 00:48:30 +0000 (10:48 +1000)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:50 +0000 (17:52 +0200)
commitd589444e924bc72e42fa94853f9096589d69374d
tree4150b8e1274288911687fe6f4b2dff7f7d052d2b
parent82ce2c96831f049a37118733ced5c8f7c8848102
KVM: Add kvm_free_lapic() to pair with kvm_create_lapic()

Instead of the asymetry of kvm_free_apic, implement kvm_free_lapic().
And guess what?  I found a minor bug: we don't need to hrtimer_cancel()
from kvm_main.c, because we do that in kvm_free_apic().

Also:
1) kvm_vcpu_uninit should be the reverse order from kvm_vcpu_init.
2) Don't set apic->regs_page to zero before freeing apic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/irq.h
drivers/kvm/kvm_main.c
drivers/kvm/lapic.c