Skip to contentSkip to conversation

Add Network Testing Support for Xm-test with VMX Enabled

PATCH New Daniel Stekloff 1 participant 1 message Jan 27, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Add Network Testing Support for Xm-test with VMX Enabled

# HG changeset patch
# User [email protected] # Node ID 6f9ab9f4c148607d709539e19d27616b4a1cd3c0 # Parent 6687e156d6e7c3ca68f5b94e84055c383423027c

Adding network testing support for xm-test with hvm.
1) Added capability for create_disk_image script to copy pcnet32 driver to disk.img. Added new cmdline option so can specify driver directory.
2) Added configuration --with-driver-dir=DVRDIR option so can specify where driver is at configure time. "builtin" keyword lets specify that driver is built into kernel.
3) Updated Makefile.am to build with new options.
4) Updated README to reflect changes.

tools/xm-test/README +18 -0
diff -r 6687e156d6e7 -r 6f9ab9f4c148 tools/xm-test/README
@@ -54,6 +54,10 @@
 you should not attempt to use a ramdisk from a previous minor version
 of xm-test (i.e., don't use a ramdisk from 0.4.0 with 0.5.0.  0.5.0
 should work for 0.5.3 though)
+
+
+BUILDING with HVM Support
+=========================
 
 If you'd like to build and run this with hardware virtual machine assist
 (HVM) support to test fully virtualized disk images on VMX hardware, 
@@ -81,6 +85,20 @@
 Otherwise, you can always rerun the create script using the -k option
 to use a specific kernel. 
 
+The disk.img created for HVM testing must contain a pcnet32 driver for
+network tests. The ramdisk/bin/create_disk_image script will, by default,
+look in the /lib/modules directory associated with the kernel being
+used. If you'd like to specify a different location for the driver or
+want to tell the script that the driver is built into the kernel, please
+use the "--with-driver-dir=DRVDIR" configure option. If built into
+the kernel, please use the key word "builtin" with the option:
+
+# ./autogen
+# ./configure --enable-vmx-support --with-driver-dir=builtin
+- or -
+# ./configure --enable-vmx-support --with-driver-dir=/driver/directory
+# make
+
 Xm-test will look for disk.img in the ramdisk directory when run by 
 default.
 
tools/xm-test/configure.ac +8 -0
diff -r 6687e156d6e7 -r 6f9ab9f4c148 tools/xm-test/configure.ac
@@ -46,6 +46,14 @@
 dnl substitute @VMXKERNEL@ in all Makefiles
 AC_SUBST(VMXKERNEL)
 
+AC_ARG_WITH(driver-dir,
+	[[  --with-driver-dir=drvdir       Look in this directory for the pcnet32 driver for the vmx disk.img. drvdir can equal key word "builtin" if driver is built into the kernel]],
+	DRVDIR=$withval,
+	DRVDIR="no")
+
+dnl substitute @DRVDIR@ in all Makefiles
+AC_SUBST(DRVDIR)
+
 AC_SUBST(TENV)
 AC_SUBST(PACKAGE_VERSION)
 
tools/xm-test/ramdisk/Makefile.am +8 -3
diff -r 6687e156d6e7 -r 6f9ab9f4c148 tools/xm-test/ramdisk/Makefile.am
@@ -45,10 +45,15 @@
 
 disk.img: $(XMTEST_VER_IMG)
 	chmod a+x $(VMX_SCRIPT)
-	@if test "$(VMXKERNEL)" = "no" ; then \
+	@if test ! "$(VMXKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
+		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -k $(VMXKERNEL) \
+			-d $(DRVDIR); \
+	elif test "$(VMXKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
+		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -d $(DRVDIR); \
+	elif test ! "$(VMXKERNEL)" = "no" -a "$(DRVDIR)" = "no"; then \
+		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -k $(VMXKERNEL); \
+	else \
 		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG); \
-	else \
-		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -k $(VMXKERNEL); \
 	fi
 
 existing:
tools/xm-test/ramdisk/bin/create_disk_image +53 -0

92 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel