<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><br>     Hi Vincenzo,<br><br> 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.<br>   <br>       - Michal<br><br>----- Original Message -----<br>From: v.maffione@gmail.com<br>To: vbox-dev@virtualbox.org<br>Sent: Thursday, September 22, 2016 2:45:46 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna<br>Subject: [vbox-dev] I/O emulation callbacks: kernel-space or user-space?<br><br><div dir="ltr"><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px">  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.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks.</div><div style="font-size:12.8px"><br></div>-- <br><div class="gmail_signature">Vincenzo Maffione<br></div>
</div>
</div></body></html>