KVM: x86: disallow multiple KVM_CREATE_IRQCHIP
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 29 Oct 2009 15:44:15 +0000 (13:44 -0200)
committerAvi Kivity <avi@redhat.com>
Thu, 3 Dec 2009 07:32:23 +0000 (09:32 +0200)
commit3ddea128ad75bd33e88780fe44f44c3717369b98
treedbf54798bda23cb8c105c6fc3926d30bae3c6321
parent92c0d900159a4fa582e1c8ebcc1c4a8020defff5
KVM: x86: disallow multiple KVM_CREATE_IRQCHIP

Otherwise kvm will leak memory on multiple KVM_CREATE_IRQCHIP.
Also serialize multiple accesses with kvm->lock.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/irq.h
arch/x86/kvm/x86.c