[vbox-dev] I/O emulation callbacks: kernel-space or user-space?

Michal Necasek michal.necasek at oracle.com
Thu Sep 22 18:29:25 GMT 2016

Hi Vincenzo, 

Answer b) is correct. The short story is that all device emulation handlers are runnable in user space, and some (many) are also implemented in kernel space. Exactly which hardware accesses are handled where depends on the particular device emulation, since some operations must be done from user space and some just aren't performance sensitive. 

- Michal 

----- Original Message ----- 
From: v.maffione at gmail.com 
To: vbox-dev at virtualbox.org 
Sent: Thursday, September 22, 2016 2:45:46 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna 
Subject: [vbox-dev] I/O emulation callbacks: kernel-space or user-space? 

Assuming VBox is running an x86_64 guest on a x86_64 Linux machine, with Intel VTx or AMD-V extension enabled, I would like to know whether VBox I/O devices emulation code gets executed completely in user-space (as it happens with QEMU or bhyve), or some parts are executed in kernel space. 

To make the question more clear with an example, let's say the guest "e1000" NIC driver writes to the TDT device register, in order to trigger packets transmission. The associated register write callback function (i.e. e1kRegWriteTDT in DevE1000.cpp) gets executed by VBox right after the register write traps into VBoX (i.e. by means of a VM-EXIT). In this scenario, is e1kRegWriteTDT() executed in kernel-space or in user-space? 



Vincenzo Maffione 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20160922/c20d6cbc/attachment.html>

More information about the vbox-dev mailing list