Re: [PATCH] kvm tools: Make virt_queue__available return false if queue is not initialized.

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

 



On Sun, Apr 10, 2011 at 8:01 AM, Asias He <asias.hejun@xxxxxxxxx> wrote:
> Also add a check in virt_queue__get_iov to make sure queue is initialized.
>
> virtio_console__inject_interrupt tries to use virt queues before guest
> tell us to initialize them.

So I think we need to fix this in virtio_console__inject_interrupt()
and *not* in virt_queue__get_iov() which is very low-level. Isn't it
as simple as adding a ->initialized boolean flag to struct
console_device for now?

Alternative, cleaner implementation is to lazily register the device
to some list upon initialization. virtio_console__inject_interrupt()
could the use that list for injecting interrupts instead of touching
hard-coded struct console_device all the time.

But I'd personally go for the flag now.

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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