diff options
Diffstat (limited to 'arch/x86/kvm/i8259.c')
-rw-r--r-- | arch/x86/kvm/i8259.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index d5753a75d58c..a3711f9e580f 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c | |||
@@ -543,3 +543,14 @@ struct kvm_pic *kvm_create_pic(struct kvm *kvm) | |||
543 | 543 | ||
544 | return s; | 544 | return s; |
545 | } | 545 | } |
546 | |||
547 | void kvm_destroy_pic(struct kvm *kvm) | ||
548 | { | ||
549 | struct kvm_pic *vpic = kvm->arch.vpic; | ||
550 | |||
551 | if (vpic) { | ||
552 | kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &vpic->dev); | ||
553 | kvm->arch.vpic = NULL; | ||
554 | kfree(vpic); | ||
555 | } | ||
556 | } | ||