Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-26 Thread Chen, Tiejun
On 2015/3/27 9:31, Marcelo Tosatti wrote: On Wed, Mar 25, 2015 at 05:09:13PM +, Marc Zyngier wrote: On 23/03/15 15:58, Andre Przywara wrote: In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, especially before calling kvm_arch_destroy_vm(). To avoid unregistering devices from th

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-26 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 05:09:13PM +, Marc Zyngier wrote: > On 23/03/15 15:58, Andre Przywara wrote: > > In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, > > especially before calling kvm_arch_destroy_vm(). To avoid > > unregistering devices from the already destroyed bus, let's m

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-26 Thread Andre Przywara
Hi Marcelo, On 25/03/15 21:59, Marcelo Tosatti wrote: > On Wed, Mar 25, 2015 at 05:09:13PM +, Marc Zyngier wrote: >> On 23/03/15 15:58, Andre Przywara wrote: >>> In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, >>> especially before calling kvm_arch_destroy_vm(). To avoid >>> unr

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 05:09:13PM +, Marc Zyngier wrote: > On 23/03/15 15:58, Andre Przywara wrote: > > In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, > > especially before calling kvm_arch_destroy_vm(). To avoid > > unregistering devices from the already destroyed bus, let's m

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, > especially before calling kvm_arch_destroy_vm(). To avoid > unregistering devices from the already destroyed bus, let's mark > the bus with NULL to let other users know it has been destroyed

[PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-23 Thread Andre Przywara
In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, especially before calling kvm_arch_destroy_vm(). To avoid unregistering devices from the already destroyed bus, let's mark the bus with NULL to let other users know it has been destroyed already. This avoids a crash on a VM shutdown wit