[Bug 206579] KVM with passthrough generates "BUG: kernel NULL pointer dereference" and crashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=206579

--- Comment #17 from muncrief (rmuncrief@xxxxxxxxxxxxxxx) ---
Created attachment 287597
  --> https://bugzilla.kernel.org/attachment.cgi?id=287597&action=edit
Success! Working dmesg output.

Okay gentlemen, I looked at the other code and it seemed to me that the
condition should be an "or" instead of an "and" so I changed the patch again
and my host system and VM both booted and are running perfectly as far as I can
tell. However I have no idea if avic is actually working or whether what I've
done is correct or not.

In any case, I attached the working dmesg output to this comment, and here's
the final code I ended up with for avic_init_vcpu:

```
static int avic_init_vcpu(struct vcpu_svm *svm)
{
        int ret;
        struct kvm_vcpu *vcpu = &svm->vcpu;

        if (!avic || !irqchip_in_kernel(vcpu->kvm))
                return 0;

        ret = avic_init_backing_page(&svm->vcpu);
        if (ret)
                return ret;

        INIT_LIST_HEAD(&svm->ir_list);
        spin_lock_init(&svm->ir_list_lock);
        svm->dfr_reg = APIC_DFR_FLAT;

        return ret;
}
```

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux