On Tue, Apr 27, 2010 at 03:57:44PM +0300, Naphtali Sprei wrote: > Also use testdev for output, call exit to quit. > Currently, test reboots endlessly because of a triple-fault. > Need to run test with -no-reboot till issue fixed (in kvm ??) > Rewriting this in C would be nice. May be adding this as additional test into emulator.c > Signed-off-by: Naphtali Sprei <nsprei@xxxxxxxxxx> > --- > kvm/user/config-x86-common.mak | 2 +- > kvm/user/test/x86/stringio.S | 13 +++++++++---- > 2 files changed, 10 insertions(+), 5 deletions(-) > > 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 > + > > > -- > 1.6.3.3 > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html