<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV id=yiv1888725648>
<TABLE class=yiv1888725648 id=yiv1888725648bodyDrftID cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD id=yiv1888725648drftMsgContent style="FONT-SIZE: 10pt; FONT-FAMILY: arial">
<DIV>I wonder if anyone can provide some detailed info as how guest i/o comes to the host emulation layer (user space). For example, how does "outb port_num, val" instruction travel from guest kernel to host user space on AMD64 with VT-x/AMD-V?</DIV>
<DIV> </DIV>
<DIV>The reason I aksed is that I was wondering if performance would be further improved if moving some emulation layer from host user space to host kernel layer? that should at least saves two context switches.</DIV>
<DIV> </DIV>
<DIV>KVM provides some callbacks, any similar api exists for VBox?</DIV>
<DIV> </DIV>
<DIV>kvm_context_t  kvm_init(struct kvm_callbacks   callbacks,  void  *opaque);<BR></DIV>
<DIV>static struct kvm_callbacks my_callbacks = {<BR>    .inb                 = my_inb,<BR>    .inw                 = my_inw,<BR>    .inl                 = my_inl,<BR>    .outb                = my_outb,<BR>    .outw                = my_outw,<BR>    .outl                = my_outl,<BR>    .mmio_read           = my_mmio_read,<BR>   
 .mmio_write          = my_mmio_write,<BR>    .debug               = my_debug,<BR>    .halt                = my_halt,<BR>    .io_window           = my_io_window,<BR>    .try_push_interrupts = my_try_push_interrupts,<BR>    .try_push_nmi        = my_try_push_nmi, </DIV>
<DIV>    .post_kvm_run        = my_post_kvm_run,<BR>    .pre_kvm_run         = my_pre_kvm_run,<BR>    .tpr_access          = my_tpr_access<BR>};<BR></DIV></TD></TR></TBODY></TABLE></DIV></td></tr></table>