Re: QEMU PIC indirection patch for in-kernel APIC work

Ingo Molnar
2007-04-04T20:07:12Z

* Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:

> > Keeping the apic in the kernel simplifies this with the cost of
> > maintaining an apic/pic implementation.
>
> Hrm, this is definitely starting to sound like a PITA to deal with.
> Maybe in-kernel platform devices are unavoidable :-/

yes, very much so. Not only are they unavoidable, they largely simplify
many aspects of KVM. Did anyone here ever have unreliable keyboard
emulation in qemu because /dev/rtc didnt allow 1024 Hz? Such basic
issues are just not present when timer emulation is done by the kernel.
The kernel abstracts away the actual hardware, and Qemu then uses this
abstract interfaces to create something that is specific. By moving
platform device emulation into KVM, much of that (unnecessary)
indirection goes away. Furthermore, scheduling and guest-interrupt
handling is something that is most naturally done in the host kernel -
any indirection is unnecessary fat that distracts from the core purpose
of building a first-class hypervisor subsystem.

Ingo