Dong, Eddie wrote:
Sukanto Ghosh wrote:
Hi all,

Why has the IO device emulation part been kept in
userspace ? IO attempts cause VM-exits to the KVM (running in
kernel-mode) it then forwards these requests to the
userspace (mode-switch). After completion of IO in
userspace, another mode switch is done to KVM before
resuming the guests. What would be the problems had the device emulation parts
been moved totally to kernelspace ?

The simple reason is that people don't want to pull a lot of code into
kernel whose failure may crash the whole system, of course there are
many other reasons such as maintaining synchronization with Qemu
upstream, coding style, maintanence effort etc.
Eddie
Nevertheless there is work in progress to integrate virtio network with the kernel's tap. This will eventually lead to zero copy networking (with some dma ioat magic).

For block devices, there is no activity for kernel side, mainly because qcow2 format is complex and better be userspace, and the performance is relatively good.
Dor
--
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

Reply via email to