summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2014-12-21 02:36:07 +0100
committerMichael Brown2014-12-21 12:21:23 +0100
commit0166a68351139672e40267e12f7d881b6c05001c (patch)
tree9840ed2a6db47ea0a41f03e3f9199aa929a931ed /src/include/ipxe
parent[hyperv] Tidy up debug output (diff)
downloadipxe-0166a68351139672e40267e12f7d881b6c05001c.tar.gz
ipxe-0166a68351139672e40267e12f7d881b6c05001c.tar.xz
ipxe-0166a68351139672e40267e12f7d881b6c05001c.zip
[hyperv] Require support for VMBus version 3.0 or newer
We require the ability to disconnect from and reconnect to VMBus; if we don't have this then there is no (viable) way for a loaded operating system to continue to use any VMBus devices. (There is also a small but non-zero risk that the host will continue to write to our interrupt and monitor pages, since the VMBUS_UNLOAD message in earlier versions is essentially a no-op.) This requires us to ensure that the host supports protocol version 3.0 (VMBUS_VERSION_WIN8_1). However, we can't actually _use_ protocol version 3.0, since doing so causes an iSCSI-booted Windows Server 2012 R2 VM to crash due to a NULL pointer dereference in vmbus.sys. To work around this problem, we first ensure that we can connect using protocol v3.0, then disconnect and reconnect using the oldest known protocol. This deliberately prevents the use of the iPXE native Hyper-V drivers on older versions of Hyper-V, where we could use our drivers but in so doing would break the loaded operating system. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/vmbus.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/include/ipxe/vmbus.h b/src/include/ipxe/vmbus.h
index 1ea65edfd..8725ee6af 100644
--- a/src/include/ipxe/vmbus.h
+++ b/src/include/ipxe/vmbus.h
@@ -42,8 +42,17 @@ union vmbus_version {
};
} __attribute__ (( packed ));
-/** Oldest known VMBus protocol version (Windows Server 2008) */
-#define VMBUS_VERSION_WS2008 ( ( 0 << 16 ) | ( 13 << 0 ) )
+/** Known VMBus protocol versions */
+enum vmbus_raw_version {
+ /** Windows Server 2008 */
+ VMBUS_VERSION_WS2008 = ( ( 0 << 16 ) | ( 13 << 0 ) ),
+ /** Windows 7 */
+ VMBUS_VERSION_WIN7 = ( ( 1 << 16 ) | ( 1 << 0 ) ),
+ /** Windows 8 */
+ VMBUS_VERSION_WIN8 = ( ( 2 << 16 ) | ( 4 << 0 ) ),
+ /** Windows 8.1 */
+ VMBUS_VERSION_WIN8_1 = ( ( 3 << 16 ) | ( 0 << 0 ) ),
+};
/** Guest physical address range descriptor */
struct vmbus_gpa_range {
@@ -82,6 +91,7 @@ enum vmbus_message_type {
VMBUS_INITIATE_CONTACT = 14,
VMBUS_VERSION_RESPONSE = 15,
VMBUS_UNLOAD = 16,
+ VMBUS_UNLOAD_RESPONSE = 17,
};
/** VMBus "offer channel" message */