Commit 1eb87257dae084166f0a007a9bfa8052e1784108

Authored by bellard
1 parent 32ce6337

update


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@97 c046a42c-6fe2-441c-8c8c-71466251a162
Changelog
1 version 0.1.6: 1 version 0.1.6:
2 2
  3 + - automatic library search system. QEMU can now work with unpatched
  4 + ELF dynamic loader and libc (Rusty Russell).
3 - ISO C warning fixes (Alistair Strachan) 5 - ISO C warning fixes (Alistair Strachan)
4 - - first self-virtualizable version (works only as long as the icache  
5 - is not flushed) 6 + - first self-virtualizable version (works only as long as the
  7 + translation cache is not flushed)
  8 + - RH9 fixes
6 9
7 version 0.1.5: 10 version 0.1.5:
8 11
Makefile
@@ -45,7 +45,7 @@ LDFLAGS+=-p @@ -45,7 +45,7 @@ LDFLAGS+=-p
45 main.o: CFLAGS+=-p 45 main.o: CFLAGS+=-p
46 endif 46 endif
47 47
48 -OBJS= elfload.o main.o syscall.o signal.o 48 +OBJS= elfload.o main.o syscall.o signal.o path.o
49 SRCS:= $(OBJS:.o=.c) 49 SRCS:= $(OBJS:.o=.c)
50 OBJS+= libqemu.a 50 OBJS+= libqemu.a
51 51
@@ -110,13 +110,14 @@ elfload.c main.c signal.c thunk.h\ @@ -110,13 +110,14 @@ elfload.c main.c signal.c thunk.h\
110 cpu-i386.h qemu.h op-i386.c opc-i386.h syscall-i386.h translate-i386.c\ 110 cpu-i386.h qemu.h op-i386.c opc-i386.h syscall-i386.h translate-i386.c\
111 dis-asm.h gen-i386.h syscall.c\ 111 dis-asm.h gen-i386.h syscall.c\
112 dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\ 112 dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\
113 -ppc.ld s390.ld exec-i386.h exec-i386.c configure \ 113 +ppc.ld s390.ld exec-i386.h exec-i386.c path.c configure \
114 tests/Makefile\ 114 tests/Makefile\
115 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\ 115 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
116 tests/test-i386-muldiv.h tests/test-i386-code16.S\ 116 tests/test-i386-muldiv.h tests/test-i386-code16.S\
117 tests/hello.c tests/hello tests/sha1.c \ 117 tests/hello.c tests/hello tests/sha1.c \
118 tests/testsig.c tests/testclone.c tests/testthread.c \ 118 tests/testsig.c tests/testclone.c tests/testthread.c \
119 tests/runcom.c tests/pi_10.com \ 119 tests/runcom.c tests/pi_10.com \
  120 +tests/test_path.c \
120 qemu-doc.texi qemu-doc.html 121 qemu-doc.texi qemu-doc.html
121 122
122 FILE=qemu-$(VERSION) 123 FILE=qemu-$(VERSION)
@@ -132,10 +133,10 @@ tar: @@ -132,10 +133,10 @@ tar:
132 BINPATH=/usr/local/qemu-i386 133 BINPATH=/usr/local/qemu-i386
133 134
134 tarbin: 135 tarbin:
135 - tar zcvf /tmp/qemu-i386-glibc21.tar.gz \  
136 - $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin  
137 - tar zcvf /tmp/qemu-i386-wine.tar.gz \  
138 - $(BINPATH)/X11R6 $(BINPATH)/wine 136 + tar zcvf /tmp/qemu-$(VERSION)-i386-glibc21.tar.gz \
  137 + $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin $(BINPATH)/usr
  138 + tar zcvf /tmp/qemu-$(VERSION)-i386-wine.tar.gz \
  139 + $(BINPATH)/wine
139 140
140 ifneq ($(wildcard .depend),) 141 ifneq ($(wildcard .depend),)
141 include .depend 142 include .depend
@@ -6,7 +6,7 @@ INSTALLATION @@ -6,7 +6,7 @@ INSTALLATION
6 6
7 Type 7 Type
8 8
9 - ./configure 9 + ./configure --interp-prefix=/usr/local/qemu-i386
10 make 10 make
11 11
12 to build qemu and libqemu.a. 12 to build qemu and libqemu.a.
@@ -23,7 +23,7 @@ libraries installed on your PC. For example: @@ -23,7 +23,7 @@ libraries installed on your PC. For example:
23 ./qemu -L / /bin/ls 23 ./qemu -L / /bin/ls
24 24
25 * On non x86 CPUs, you need first to download at least an x86 glibc 25 * On non x86 CPUs, you need first to download at least an x86 glibc
26 -(qemu-i386-glibc21.tar.gz on the qemu web page). Ensure that 26 +(qemu-XXX-i386-glibc21.tar.gz on the qemu web page). Ensure that
27 LD_LIBRARY_PATH is not set: 27 LD_LIBRARY_PATH is not set:
28 28
29 unset LD_LIBRARY_PATH 29 unset LD_LIBRARY_PATH
1 -0.1.5  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +0.1.6
3 \ No newline at end of file 3 \ No newline at end of file
configure
@@ -271,4 +271,4 @@ else @@ -271,4 +271,4 @@ else
271 echo "config.h is unchanged" 271 echo "config.h is unchanged"
272 fi 272 fi
273 273
274 -rm -f $TMPH 274 +rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
qemu-doc.texi
@@ -36,6 +36,8 @@ User space LDT and GDT are emulated. VM86 mode is also supported @@ -36,6 +36,8 @@ User space LDT and GDT are emulated. VM86 mode is also supported
36 36
37 @item Accurate signal handling by remapping host signals to virtual x86 signals. 37 @item Accurate signal handling by remapping host signals to virtual x86 signals.
38 38
  39 +@item QEMU can emulate itself on x86 (experimental).
  40 +
39 @item The virtual x86 CPU is a library (@code{libqemu}) which can be used 41 @item The virtual x86 CPU is a library (@code{libqemu}) which can be used
40 in other projects. 42 in other projects.
41 43
@@ -50,9 +52,7 @@ Current QEMU Limitations: @@ -50,9 +52,7 @@ Current QEMU Limitations:
50 52
51 @item Not all x86 exceptions are precise (yet). [Very few programs need that]. 53 @item Not all x86 exceptions are precise (yet). [Very few programs need that].
52 54
53 -@item Not self virtualizable (yet). [You cannot launch qemu with qemu on the same CPU].  
54 -  
55 -@item No support for self modifying code (yet). [Very few programs need that, a notable exception is QEMU itself !]. 55 +@item No support for self-modifying code (yet). [Very few programs need that, a notable exception is QEMU itself !].
56 56
57 @item No SSE/MMX support (yet). 57 @item No SSE/MMX support (yet).
58 58
@@ -88,9 +88,14 @@ qemu -L / /bin/ls @@ -88,9 +88,14 @@ qemu -L / /bin/ls
88 @code{-L /} tells that the x86 dynamic linker must be searched with a 88 @code{-L /} tells that the x86 dynamic linker must be searched with a
89 @file{/} prefix. 89 @file{/} prefix.
90 90
  91 +@item Since QEMU is also a linux process, you can launch qemu with qemu:
  92 +
  93 +@example
  94 +qemu -L / qemu -L / /bin/ls
  95 +@end example
91 96
92 @item On non x86 CPUs, you need first to download at least an x86 glibc 97 @item On non x86 CPUs, you need first to download at least an x86 glibc
93 -(@file{qemu-i386-glibc21.tar.gz} on the QEMU web page). Ensure that 98 +(@file{qemu-XXX-i386-glibc21.tar.gz} on the QEMU web page). Ensure that
94 @code{LD_LIBRARY_PATH} is not set: 99 @code{LD_LIBRARY_PATH} is not set:
95 100
96 @example 101 @example
@@ -107,6 +112,11 @@ QEMU is automatically launched by the Linux kernel when you try to @@ -107,6 +112,11 @@ QEMU is automatically launched by the Linux kernel when you try to
107 launch x86 executables. It requires the @code{binfmt_misc} module in the 112 launch x86 executables. It requires the @code{binfmt_misc} module in the
108 Linux kernel. 113 Linux kernel.
109 114
  115 +@item The x86 version of QEMU is also included. You can try weird things such as:
  116 +@example
  117 +qemu /usr/local/qemu-i386/bin/qemu-i386 /usr/local/qemu-i386/bin/ls-i386
  118 +@end example
  119 +
110 @end itemize 120 @end itemize
111 121
112 @section Wine launch (Currently only tested when emulating x86 on x86) 122 @section Wine launch (Currently only tested when emulating x86 on x86)
@@ -122,7 +132,7 @@ qemu /usr/local/qemu-i386/bin/ls-i386 @@ -122,7 +132,7 @@ qemu /usr/local/qemu-i386/bin/ls-i386
122 @end example 132 @end example
123 133
124 @item Download the binary x86 Wine install 134 @item Download the binary x86 Wine install
125 -(@file{qemu-i386-wine.tar.gz} on the QEMU web page). 135 +(@file{qemu-XXX-i386-wine.tar.gz} on the QEMU web page).
126 136
127 @item Configure Wine on your account. Look at the provided script 137 @item Configure Wine on your account. Look at the provided script
128 @file{/usr/local/qemu-i386/bin/wine-conf.sh}. Your previous 138 @file{/usr/local/qemu-i386/bin/wine-conf.sh}. Your previous
@@ -302,6 +312,21 @@ thread. @@ -302,6 +312,21 @@ thread.
302 The virtual x86 CPU atomic operations are emulated with a global lock so 312 The virtual x86 CPU atomic operations are emulated with a global lock so
303 that their semantic is preserved. 313 that their semantic is preserved.
304 314
  315 +@section Self-virtualization
  316 +
  317 +QEMU was conceived so that ultimately it can emulate itself. Althought
  318 +it is not very useful, it is an important test to show the power of the
  319 +emulator.
  320 +
  321 +Achieving self-virtualization is not easy because there may be address
  322 +space conflicts. QEMU solves this problem by being an ELF shared object
  323 +as the ld-linux.so ELF interpreter. That way, it can be relocated at
  324 +load time.
  325 +
  326 +Since self-modifying code is not supported yet, QEMU cannot self
  327 +virtualize itself in case of translation cache flush. This limitation
  328 +will be suppressed soon.
  329 +
305 @section Bibliography 330 @section Bibliography
306 331
307 @table @asis 332 @table @asis