my purpose is to take control the network communication of the windowsxp. let the VMM to control a NIC, after it receives data, delivery it to windowsxp.
I do not provide a emulation of a NIC in windows. so, in WDK's sample, there's a virtual driver netvmini, it seems right for me. but the virtual dirver have a key problem, since it is virtual ,i can not install any ISR by any API.
so , i think the if it possible install a isr directly to windowsxp's IDT. i get the idt's base address, found a null entry which vector is 0x20.then initialize the entry as interrupt gate, and store my isr's address into that gate.
the next thing for me is injection a interrupt to windowsxp.when there's a external interrupt, the VMExit happened, VMM start to work. If the VMM found there's data in NIC, it injection a interrupt which vector is 0x20 to windowxp.
at this time , my proble came out. the ISR i installed in IDT seems not working properly-windowsxp crash.
my isr is like this:
Code: Select all
void _declspec(naked) interrupt_handler()
{
_asm pushad;
//there's nothing here, i just want to see if the interrupt injection work correctly.
_asm{
popad
iretd
}
}