Wait I minute, you can’t make standard requests to another driver DURING crash processing. You didn’t mention you’re in the extremely limited context of a crash dump, which has no interrupts, and runs at HIGH_LEVEL, and you can’t called ANY OS function except a tiny limited set. You can’t allocate IRPs during crash processing.
Talking directly to hardware is the only option.
Jan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, November 20, 2012 7:30 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Dropped characters when writing to virtual serial port
@Joe: I have no intention to reinvent the wheel here, and I have no intention whatsoever to write a serial port driver!
… all I wanted, is to notify the host machine when a VM guest system crashes from BugCheckCallback - that’s all.
Since VirtualBox provides a virtual serial port, I figured, it would be the easiest way for the guest to notify the host when it crashes.
My implementation now uses serial.sys to communicate with the serial port, as Jan has suggested, and it works perfectly.
Actually, while searching the net for further information about CheckBugCallbacks, I bumped into these 2 files:
https://forge.univention.org/svn/dev/branches/ucs-3.1/ucs/virtualization/univention-xen-gplpv/win-pvdrivers/xenpci/xenpci_dbgprint.c
http://svn.netlabs.org/repos/vbox/trunk/src/VBox/Additions/WINNT/VBoxGuest/HelperBugCheck.cpp
I don’t know if those are part of VirtualBox and Xen source code, but it seems they use WRITE_PORT_XXX, and inb/outb to write to the serial port, and that was what misled me in the first place to keep investigating the problem I had with writing directly to the port, rather than, using something like serial.sys.
Anyway, I’m using serial.sys now and it works!
P.S. please let me know if there is a better idea than notifying the host over a serial port from within the BugCheckCallback.
Thanks
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer