There are three different contexts in which device code can be run:
- ring 3; host VM process context
- ring 0; host kernel context (vt-x/amd-v only)
- raw mode context; guest hypervisor context (software virtualization only)
The last two are optimizations to prevent an expensive switch to the VM
host process to
handle e.g. very simple port I/O.
If you want to start writing a virtual device, I suggest you focus on
the ring 3 context only for now.
The other two contexts have restrictions to which operations you're
allowed to perform.
Sander
On 14-9-2010 17:22, Jaka Bac wrote:
Hello
I was looking at the code for the virtualbox's virtual devices and
there is something that I don't exacly understand.
I saw noticed that the one device implementation file actually
includes different handlers for device i/o (memory or port i/o), and
these are apparently compiled in more passes with different #define-s.
Could someone please explain what the IN_RING3 define specifies, and
what is the relationship with the handlers in the different contexts.
Thank you in advance and Best Regards,
Jaka Bac
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev