On Sun, Apr 10, 2011 at 8:01 AM, Asias He <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html