On 23/01/2017 17:09, David Hildenbrand wrote: >> @@ -1382,6 +1383,9 @@ static void avic_vm_destroy(struct kvm *kvm) >> unsigned long flags; >> struct kvm_arch *vm_data = &kvm->arch; >> >> + if (!avic) >> + return 0; >> + >> avic_free_vm_id(vm_data->avic_vm_id); >> >> if (vm_data->avic_logical_id_table_page) >> >> >> Unfortunately I don't remember how I managed to trigger this warning >> because I don't have any SVM-capable hardware... >> But I remember that I did not do anything special besides just >> enabling spinlock checks and then doing something trivial. >> Could somebody try to use SVM with the spinlock checks enabled? I >> don't feel comfortable sending a non-trivial patch without testing >> it... >> > Or stick to your initial patch and simply remove the previous > initialization (sounds clean to me). But we'd better double check if > that additional check in avic_vm_destroy() is also reasonable (maybe > something else is touched that shouldn't be). Yes, that second patch is the right one. David, if you wish to submit a patch to simplify the initialization, I'll apply that too. Thanks, Paolo