On Wed, Oct 23, 2019 at 06:18:35PM -0700, Junaid Shahid wrote: > [Plain-text resend] > > On 10/23/19 5:05 PM, Sean Christopherson wrote: > > > > Side topic, the loops to free the buses and memslots belong higher up, > > the arrays aren't initialized until after hardware_enable(). Probably > > doesn't harm anything but it's a waste of cycles. I'll send a patch. > > > > Aren't the x86_set_memory_region() calls inside kvm_arch_destroy_vm() going > to be problematic if hardware_enable_all() fails? Perhaps we should move the > memslots allocation before kvm_arch_init_vm(), or check for NULL memslots in > kvm_arch_destroy_vm(). Oof, that does appear to be the case. Initializing memslots and buses before calling into arch code seems like the way to go.