diff mbox

[qemu-kvm,tests,v2,2/3] qemu-kvm tests cleanup: adapt stringio test to kernel-mode run

Message ID 1272373065-3162-3-git-send-email-nsprei@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Naphtali Sprei April 27, 2010, 12:57 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak
index 960741e..d312681 100644
--- a/kvm/user/config-x86-common.mak
+++ b/kvm/user/config-x86-common.mak
@@ -54,7 +54,7 @@  $(TEST_DIR)/realmode.flat: $(TEST_DIR)/realmode.o
 
 $(TEST_DIR)/realmode.o: bits = 32
 
-$(TEST_DIR)/stringio.flat: $(TEST_DIR)/stringio.o
+$(TEST_DIR)/stringio.flat: $(cstart.o) $(TEST_DIR)/stringio.o
 
 $(TEST_DIR)/msr.flat: $(cstart.o) $(TEST_DIR)/msr.o
 
diff --git a/kvm/user/test/x86/stringio.S b/kvm/user/test/x86/stringio.S
index 31ddc47..461621c 100644
--- a/kvm/user/test/x86/stringio.S
+++ b/kvm/user/test/x86/stringio.S
@@ -8,24 +8,29 @@ 
 1:	
 .endm	
 
+TESTDEV_PORT = 0xf1
+
 	str "forward", "forward"
 	str "backward", "backward"
 		
 .text
 
-
+.global main
+main:
 	cld
 	movl forward, %ecx
 	lea  4+forward, %rsi
-	movw $1, %dx
+	movw $TESTDEV_PORT, %dx
 	rep outsb
 
 	std
 	movl backward, %ecx
 	lea 4+backward-1(%rcx), %rsi
-	movw $2, %dx
+	movw $TESTDEV_PORT, %dx
 	rep outsb
 	
-	hlt
+	mov $0, %rsi
+	call exit
+