Re: [Qemu-devel] [PATCH] configure

2007-05-08 Thread Ben Taylor

 Jeff Chua <[EMAIL PROTECTED]> wrote: 
> For those who does minimal install. In this case,  texi2html would not
> be available on the system. I've seen quite a few systems without
> texi2html.
> 
> Again, the patch is not a MUST, but it's nice not to see unnecessary warning.

I suppose you could do a -n  "`texi2html -verbose 2>&1 | head -1 |grep 'This is 
texi2html'`"
which would be more representative if you have texi2html or not.

Ben




Re: [Qemu-devel] [PATCH] configure

2007-05-08 Thread Jeff Chua

On 5/9/07, Thiemo Seufer <[EMAIL PROTECTED]> wrote:


I don't see a warning for e.g. "which foo" on my system. Could you
describe your system and paste the output the which command produces
there?


# which foo
which: no foo in
(/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/games:/usr/local/samba/sbin:/usr/local/samba/bin:/etc/rc.d:/root/scripts2:/root/cc2:/usr/local/apache2/bin:/usr/local/squid/sbin:/opt/java/bin:/usr/local/netpbm/bin:/usr/local/ssh/bin:/usr/local/ssl/bin:/usr/lib/yp:.:/usr/vbin:/usr/local/python/bin:/usr/local/tcl/bin:/usr/local/kvm/bin:/usr/local/perl/bin:/db/oracle/db1/bin:/root/oracle2:/usr/local/git/bin:/opt/sybase/bin)
# echo $?
1
# which vi
/usr/bin/vi
# echo $?
0


Thanks,
Jeff.




Re: [Qemu-devel] bug: qemu-0.9.0 emulating mipsel (32-bit R3000) on amd64

2007-05-08 Thread Thiemo Seufer
John Reiser wrote:
> >>qemu-0.9.0 ...
> >>emulating Debian 2.6.18-4-qemu mipsel ...
> >>errs when gdb 6.4.90-debian (running on the emulated mipsel)
> >>single-steps the user-mode instruction ...
> 
> > This looks like another instance of "Qemu/MIPS doesn't handle
> > self-modifying code correctly" (the break instructions inserted
> > by gdb are exactly this).
> 
> No, the usage by gdb does *not* qualify as "self-modifying code."

In the context of Qemu system emulation it does...

> gdb uses the system call ptrace(PTRACE_POKETEXT, pid, addr, data)
> to have the emulated operating system kernel itself modify the memory
> of the child process.

... since "child processes" etc. run by the guest kernel are just a
foreign thing to Qemu.

> Nobody has to guess or to "snoop" the memory
> bus in order to discover that the instruction stream is being modified.
> Instead, there is direct notification of what is happening.

The Linux kernel happily does cache flushes, and Qemu happily ignores
them, since it doesn't implement a cache model. (A cache model is not
the answer. It would be slow, it would only paper over the problem,
it wouldn't help for uncached accesses or cacheless systems).

> If nothing
> else, then under CONFIG_QEMU the implementation of sys_ptrace()
> must notify the emulator to flush the appropriate translations.

Hacking special facilities in the guest kernel just to work around
a Qemu bug is IMHO the wrong approach.


Thiemo




Re: [Qemu-devel] [PATCH] configure

2007-05-08 Thread Thiemo Seufer
Jeff Chua wrote:
> For those who does minimal install. In this case,  texi2html would not
> be available on the system. I've seen quite a few systems without
> texi2html.
> 
> Again, the patch is not a MUST, but it's nice not to see unnecessary 
> warning.

I don't see a warning for e.g. "which foo" on my system. Could you
describe your system and paste the output the which command produces
there?

> Thanks,
> Jeff.
> 
> 
> On 5/9/07, Thiemo Seufer <[EMAIL PROTECTED]> wrote:
> >Jeff Chua wrote:
> >[snip]
> >> @@ -567,7 +567,8 @@
> >>fi
> >>
> >># Check if tools are available to build documentation.
> >> -if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
> >> +if [ -x "`which texi2html 2>/dev/null`" \
> >> + -a -x "`which pod2man 2>/dev/null`" ]; then
> >
> >Under which circumstances does "which" complain about unavailable
> >executables?
> >
> >
> >Thiemo
> >




Re: [Qemu-devel] [PATCH] configure

2007-05-08 Thread Jeff Chua

For those who does minimal install. In this case,  texi2html would not
be available on the system. I've seen quite a few systems without
texi2html.

Again, the patch is not a MUST, but it's nice not to see unnecessary warning.

Thanks,
Jeff.


On 5/9/07, Thiemo Seufer <[EMAIL PROTECTED]> wrote:

Jeff Chua wrote:
[snip]
> @@ -567,7 +567,8 @@
>fi
>
># Check if tools are available to build documentation.
> -if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
> +if [ -x "`which texi2html 2>/dev/null`" \
> + -a -x "`which pod2man 2>/dev/null`" ]; then

Under which circumstances does "which" complain about unavailable
executables?


Thiemo






Re: [Qemu-devel] [PATCH] qemu Makefile.target cpu-all.h cpu-exec.c dynge...

2007-05-08 Thread Thiemo Seufer
Stefan Weil wrote:
> Hello Thiemo,
> 
> here is a (partially crude) patch which mixes your code with
> my own MIPS host extension and code parts from a MIPS host
> made by Johannes E. Schindelin 2 years ago.
> 
> Using this new code I was able to start a Linux kernel
> using qemu-system-mipsel running in an emulated MALTA machine.

I fails to build for me (on a Broadcom SWARM running Debian unstable):

[...]
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing  -fno-reorder-blocks  -fno-gcse
-fno-optimize-sibling-calls  -fno-crossjumping  -fno-align-labels  
-fno-align-jumps  -fno-align-functions -mabi=32 -G0 -fno-PIC -mno-abicalls 
-fomit-frame-pointer -fno-delayed-branch -Wa,-O0   -I. -I.. 
-I/srv/ths/qemu/qemu-upstream/target-mips -I/srv/ths/qemu/qemu-upstream 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-I/srv/ths/qemu/qemu-upstream/fpu -DHAS_AUDIO 
-I/srv/ths/qemu/qemu-upstream/slirp -c -o op.o 
/srv/ths/qemu/qemu-upstream/target-mips/op.c
../dyngen -o op.h op.o
dyngen: empty code for op_store_T0_gpr_gpr1
make[1]: *** [op.h] Error 1
make[1]: Leaving directory `/srv/ths/qemu/qemu-upstream/mips-softmmu'
make: *** [subdir-mips-softmmu] Error 2


Thiemo




Re: [Qemu-devel] [PATCH] qemu Makefile.target cpu-all.h cpu-exec.c dynge...

2007-05-08 Thread Thiemo Seufer
Stefan Weil wrote:
[snip]

I cherrypicked the easy bits, and will look at the rest when I have
more time.

> When I started to write MIPS host, I found it difficult to
> get all locations which needed new code. To make it easier for
> new ports, I changed sequences of #if ... #endif, #if ... #endif
> into #if ... #elif ... #elif ... #else #error #endif.

Some of those folded unrelated things together, I committed a different
patch based on yours.

> Other changes include some smaller spelling corrections.

Also committed.

> Most important was Johannes code for testandset and PARAMn.

AFAICS that testandset implementation is broken, and I think
mine is correct, maybe except for the +R vs. +m bit in the asm
constraints.

Did my implementation fail for you?

> The patch still includes your relocation code, but it is disabled
> and uses my own code. I had no time to check or try the differences.

Then I gather there's no particular reason why my _PC16 reloc code
is deleted in the patch.


Thiemo




Re: [Qemu-devel] bug: qemu-0.9.0 emulating mipsel (32-bit R3000) on amd64

2007-05-08 Thread John Reiser
>>qemu-0.9.0 ...
>>emulating Debian 2.6.18-4-qemu mipsel ...
>>errs when gdb 6.4.90-debian (running on the emulated mipsel)
>>single-steps the user-mode instruction ...

> This looks like another instance of "Qemu/MIPS doesn't handle
> self-modifying code correctly" (the break instructions inserted
> by gdb are exactly this).

No, the usage by gdb does *not* qualify as "self-modifying code."
gdb uses the system call ptrace(PTRACE_POKETEXT, pid, addr, data)
to have the emulated operating system kernel itself modify the memory
of the child process.  Nobody has to guess or to "snoop" the memory
bus in order to discover that the instruction stream is being modified.
Instead, there is direct notification of what is happening.  If nothing
else, then under CONFIG_QEMU the implementation of sys_ptrace()
must notify the emulator to flush the appropriate translations.

-- 
John Reiser, [EMAIL PROTECTED]




[Qemu-devel] qemu exec-all.h

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 23:40:45

Modified files:
.  : exec-all.h 

Log message:
Another #elif'ication.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/exec-all.h?cvsroot=qemu&r1=1.52&r2=1.53




[Qemu-devel] qemu dyngen-exec.h dyngen.h

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 23:30:44

Modified files:
.  : dyngen-exec.h dyngen.h 

Log message:
Make detection of unsupported hosts easier, inspired by a patch from
Stefan Weil.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/dyngen-exec.h?cvsroot=qemu&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/qemu/dyngen.h?cvsroot=qemu&r1=1.13&r2=1.14




[Qemu-devel] qemu cpu-all.h dyngen.c

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 22:51:41

Modified files:
.  : cpu-all.h dyngen.c 

Log message:
Spelling fixes, by Stefan Weil.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-all.h?cvsroot=qemu&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/qemu/dyngen.c?cvsroot=qemu&r1=1.51&r2=1.52




[Qemu-devel] qemu/hw pxa2xx.c pxa2xx_timer.c

2007-05-08 Thread Andrzej Zaborowski
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Andrzej Zaborowski  07/05/08 22:51:01

Modified files:
hw : pxa2xx.c pxa2xx_timer.c 

Log message:
Correct the number of PXA255 GPIO lines.  Reuse the PXA timers struct 
for PXA27x additional timers.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemu&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_timer.c?cvsroot=qemu&r1=1.2&r2=1.3




[Qemu-devel] [PATCH][MIPS] Preliminary 64-bit MMU implementation

2007-05-08 Thread Aurelien Jarno
Hi all,

The patch below change the get_physical_address() function to support 
64-bit addresses in the MMU. Other parts of the MMU implementation probably
have to be fixed to get a full 64-bit support. For example the refill
vector should be XTLB instead of TLB for a 64-bit address.

With this patch I have been able to get a 64-bit kernel to print a few 
things (see below), this is already a good start.

Also note that the patch fixes the mapping of the useg segment when
ERL = 1. It should be unmapped only from kernel (kuseg) mode, not from
supervisor (suseg) or user mode (useg).

Cheers,
Aurelien

(qemu) Linux version 2.6.21.1 ([EMAIL PROTECTED]) (gcc version 4.1.1 ()) #1 Sun 
May 6 21:43:32 CEST 2007

LINUX started...
CPU revision is: 0400
FPU revision is: 00730400
registering PCI controller with io_map_base unset
Determined physical RAM map:
 memory: 1000 @  (reserved)
 memory: 000ef000 @ 1000 (ROM data)
 memory: 00464000 @ 000f (reserved)
 memory: 07aab000 @ 00554000 (usable)
Wasting 76384 bytes for tracking 1364 unused pages


Index: target-mips/helper.c
===
RCS file: /sources/qemu/qemu/target-mips/helper.c,v
retrieving revision 1.36
diff -u -d -p -r1.36 helper.c
--- target-mips/helper.c7 May 2007 13:55:33 -   1.36
+++ target-mips/helper.c8 May 2007 21:50:52 -
@@ -77,8 +77,13 @@ static int get_physical_address (CPUStat
 int *prot, target_ulong address,
 int rw, int access_type)
 {
-/* User mode can only access useg */
+/* User mode can only access useg/xuseg */
 int user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;
+#ifdef TARGET_MIPS64
+int UX = (env->CP0_Status & (1 << CP0St_UX)) != 0;
+int SX = (env->CP0_Status & (1 << CP0St_SX)) != 0;
+int KX = (env->CP0_Status & (1 << CP0St_KX)) != 0;
+#endif
 int ret = TLBRET_MATCH;
 
 #if 0
@@ -87,10 +92,18 @@ static int get_physical_address (CPUStat
 user_mode, env->hflags);
 }
 #endif
+
+#ifdef TARGET_MIPS64
+if (user_mode && address > 0x3FFFULL)
+return TLBRET_BADADDR;
+#else
 if (user_mode && address > 0x7FFFUL)
 return TLBRET_BADADDR;
-if (address < (int32_t)0x8000UL) {
-if (!(env->CP0_Status & (1 << CP0St_ERL))) {
+#endif
+
+if (address <= (int32_t)0x7FFFUL) {
+/* useg */
+if (!(env->CP0_Status & (1 << CP0St_ERL) && user_mode)) {
 #ifdef MIPS_USES_R4K_TLB
 ret = map_address(env, physical, prot, address, rw, access_type);
 #else
@@ -101,6 +114,45 @@ static int get_physical_address (CPUStat
 *physical = address;
 *prot = PAGE_READ | PAGE_WRITE;
 }
+#ifdef TARGET_MIPS64
+/* 
+   XXX: Assuming :
+   - PABITS = 36 (correct for MIPS64R1)
+   - SEGBITS = 40
+*/
+} else if (address < 0x3FFFULL) {
+/* xuseg */
+   if (UX && address < 0x00FFULL) {
+ret = map_address(env, physical, prot, address, rw, access_type);
+   } else {
+   ret = TLBRET_BADADDR;
+}
+} else if (address < 0x7FFFULL) {
+/* xsseg */
+   if (SX && address < 0x40FFULL) {
+ret = map_address(env, physical, prot, address, rw, access_type);
+   } else {
+   ret = TLBRET_BADADDR;
+}
+} else if (address < 0xBFFFULL) {
+/* xkphys */
+/* XXX: check supervisor mode */
+if (KX && (address & 0x03FFULL) < 0X000FULL)
+   {
+*physical = address & 0X00FFULL;
+*prot = PAGE_READ | PAGE_WRITE;
+   } else {
+   ret = TLBRET_BADADDR;
+   }
+} else if (address < 0x7FFFULL) {
+/* xkseg */
+/* XXX: check supervisor mode */
+   if (KX && address < 0xC0FF7FFFULL) {
+ret = map_address(env, physical, prot, address, rw, access_type);
+   } else {
+   ret = TLBRET_BADADDR;
+   }
+#endif
 } else if (address < (int32_t)0xA000UL) {
 /* kseg0 */
 /* XXX: check supervisor mode */
@@ -116,7 +168,7 @@ static int get_physical_address (CPUStat
 #ifdef MIPS_USES_R4K_TLB
 ret = map_address(env, physical, prot, address, rw, access_type);
 #else
-*physical = address;
+*physical = address & 0x;
 *prot = PAGE_READ | PAGE_WRITE;
 #endif
 } else {
@@ -126,7 +178,7 @@ static int get_physical_address (CPUStat
 #ifdef MIPS_USES_R4K_TLB
 ret = map_address(env, physical, prot, address, rw, access_type);
 #else
-*physical = address;
+*physical = address & 0x;
 *prot = PAGE_READ | PAGE_WRITE;
 #endif
 }

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer

[Qemu-devel] [PATCH][MIPS] Fix 64-bit address computation from base + offset

2007-05-08 Thread Aurelien Jarno
Hi all,

While trying to get a 64-bit kernel booting on the emulated Malta board,
I have noticed that load/store addresses are not correctly computed on a
64-bit target. Using gen_op_add() to compute the effective base + offset
address strip it to 32-bit.

The patch below fixes that by defining a new gen_op_addr_add() that
don't cast the result to 32-bit, except in user mode with Status_UX = 0.
In that case the MIPS64 PRA manual explicitely says that it should be
casted to 32-bit and signed extended to 64-bit.

Bye,
Aurelien


Index: target-mips/op.c
===
RCS file: /sources/qemu/qemu/target-mips/op.c,v
retrieving revision 1.45
diff -u -d -p -r1.45 op.c
--- target-mips/op.c7 May 2007 13:55:33 -   1.45
+++ target-mips/op.c8 May 2007 21:50:52 -
@@ -289,6 +289,22 @@ void op_store_LO (void)
 #undef MEMSUFFIX
 #endif
 
+/* Addresses computation */
+void op_addr_add (void)
+{
+/* For compatibility with 32-bit code, data reference in user mode
+   with Status_UX = 0 should be casted to 32-bit and sign extended. 
+   See the MIPS64 PRA manual, section 4.10. */
+#ifdef TARGET_MIPS64
+if ((env->CP0_Status & (1 << CP0St_UM)) && 
+! (env->CP0_Status & (1 << CP0St_UX)))
+T0 = (int64_t)(int32_t)(T0 + T1);
+else
+#endif
+T0 += T1;
+RETURN();
+}
+
 /* Arithmetic */
 void op_add (void)
 {
Index: target-mips/translate.c
===
RCS file: /sources/qemu/qemu/target-mips/translate.c,v
retrieving revision 1.69
diff -u -d -p -r1.69 translate.c
--- target-mips/translate.c 7 May 2007 13:55:33 -   1.69
+++ target-mips/translate.c 8 May 2007 21:50:53 -
@@ -719,7 +719,7 @@ static void gen_ldst (DisasContext *ctx,
 } else {
 gen_op_load_gpr_T0(base);
 gen_op_set_T1(offset);
-gen_op_add();
+gen_op_addr_add();
 }
 /* Don't do NOP if destination is zero: we must perform the actual
  * memory access
@@ -868,7 +868,7 @@ static void gen_flt_ldst (DisasContext *
 } else {
 gen_op_load_gpr_T0(base);
 gen_op_set_T1(offset);
-gen_op_add();
+gen_op_addr_add();
 }
 /* Don't do NOP if destination is zero: we must perform the actual
  * memory access

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net




[Qemu-devel] qemu Makefile.target cpu-exec.c dyngen.c

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 21:05:55

Modified files:
.  : Makefile.target cpu-exec.c dyngen.c 

Log message:
Another bunch of mips host support.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile.target?cvsroot=qemu&r1=1.168&r2=1.169
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemu&r1=1.102&r2=1.103
http://cvs.savannah.gnu.org/viewcvs/qemu/dyngen.c?cvsroot=qemu&r1=1.50&r2=1.51




Re: [Qemu-devel] [PATCH] configure

2007-05-08 Thread Thiemo Seufer
Jeff Chua wrote:
[snip]
> @@ -567,7 +567,8 @@
>fi
> 
># Check if tools are available to build documentation.
> -if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
> +if [ -x "`which texi2html 2>/dev/null`" \
> + -a -x "`which pod2man 2>/dev/null`" ]; then

Under which circumstances does "which" complain about unavailable
executables?


Thiemo




[Qemu-devel] qemu configure

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 20:57:53

Modified files:
.  : configure 

Log message:
Silence sdl-config stderr output, by Jeff Chua.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemu&r1=1.139&r2=1.140




[Qemu-devel] qemu/target-mips op.c

2007-05-08 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/05/08 20:51:26

Modified files:
target-mips: op.c 

Log message:
Work around gcc's mips define, spotted by Stefan Weil.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op.c?cvsroot=qemu&r1=1.45&r2=1.46




[Qemu-devel] qemu/hw pxa2xx.c pxa2xx_timer.c

2007-05-08 Thread Andrzej Zaborowski
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Andrzej Zaborowski  07/05/08 19:20:04

Modified files:
hw : pxa2xx.c pxa2xx_timer.c 

Log message:
Set OOK when OON is set in OSCC register (thanks to BobOfDoom).  
Correct a fatal typo in timer code.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemu&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_timer.c?cvsroot=qemu&r1=1.1&r2=1.2




Re: [Qemu-devel] qcow2 images going corrupt

2007-05-08 Thread Thiemo Seufer
Csaba Henk wrote:
> Hi,
> 
> I'm running qemu 0.9.0 on a Linux host.
> 
> I'm using a qcow2 image. I run qemu in daemon mode. When I'm to finish my
> session with the guest, I go to the monitor, do a "savevm whatever",
> "commit all", "q".
> 
> What I see that the image becomes corrupt very often (qemu-img sees it
> as a raw image). (I do the "commit all" only because I suffer and I don't
> have any better idea in mind -- I guess it shouldn't have an effect on
> the correctness of disk handling).
> 
> Any idea what's wrong? Or a fault-proof way of leaving qemu?

There was a bug in the qcow2 support which is fixed in CVS. You can use
qcow instead, or upgrade to a recent-ish CVS version of qemu.


Thiemo




[Qemu-devel] qemu/hw pxa.h pxa2xx.c pxa2xx_lcd.c spitz.c

2007-05-08 Thread Andrzej Zaborowski
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Andrzej Zaborowski  07/05/08 19:03:12

Modified files:
hw : pxa.h pxa2xx.c pxa2xx_lcd.c spitz.c 

Log message:
Switch to qemu_ram_alloc() for memory allocation in PXA255/270.
Pass correct RAM size to arm_load_kernel (currently unused) - thanks to 
BobOfDoom.
Register the Xscale Internal Memory Storage.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa.h?cvsroot=qemu&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemu&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_lcd.c?cvsroot=qemu&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/spitz.c?cvsroot=qemu&r1=1.3&r2=1.4




[Qemu-devel] qcow2 images going corrupt

2007-05-08 Thread Csaba Henk
Hi,

I'm running qemu 0.9.0 on a Linux host.

I'm using a qcow2 image. I run qemu in daemon mode. When I'm to finish my
session with the guest, I go to the monitor, do a "savevm whatever",
"commit all", "q".

What I see that the image becomes corrupt very often (qemu-img sees it
as a raw image). (I do the "commit all" only because I suffer and I don't
have any better idea in mind -- I guess it shouldn't have an effect on
the correctness of disk handling).

Any idea what's wrong? Or a fault-proof way of leaving qemu?

I can upload an example corrupt image if someone would like to analyze
it. 1.6G gzipped.

Csaba





Re: [Qemu-devel] bug: qemu-0.9.0 emulating mipsel (32-bit R3000) on amd64

2007-05-08 Thread Stefan Weil
This won't help for the problems with MIPS FPU emulation, will it?

Both breakpoints and the FPU emulation in the Linux kernel use
self-modifying code, so there should be a general solution for
both (and more related) problems.

As long as this general solution is missing, the published code
patches help.

Stefan


Daniel Jacobowitz schrieb:
> On Sun, May 06, 2007 at 09:04:52PM +0100, Thiemo Seufer wrote:
>> This looks like another instance of "Qemu/MIPS doesn't handle
>> self-modifying code correctly" (the break instructions inserted
>> by gdb are exactly this).
>>
>> A gross workaround is
>> http://lists.nongnu.org/archive/html/qemu-devel/2007-05/msg00037.html
>
> Someone might want to try:
> http://lists.nongnu.org/archive/html/qemu-devel/2007-04/msg00514.html




Re: [Qemu-devel] Triple-fault causes abort(), which doesn't end pointer grabs

2007-05-08 Thread Philip Boulain
On Tue, 2007-05-08 at 18:38 +0200, Andreas Schwab wrote:
> Samuel Bronson <[EMAIL PROTECTED]> writes:
> > So, if the guest system has a triple-fault, and I had had my mouse grabbed, 
> > it
> > stays grabbed, so that X has to be restarted (as far as I know).
> Not if you have XF86_Ungrab bound to a key.

That's a workaround, not a fix.

Phil






Re: [Qemu-devel] Triple-fault causes abort(), which doesn't end pointer grabs

2007-05-08 Thread Andreas Schwab
Samuel Bronson <[EMAIL PROTECTED]> writes:

> So, if the guest system has a triple-fault, and I had had my mouse grabbed, it
> stays grabbed, so that X has to be restarted (as far as I know).

Not if you have XF86_Ungrab bound to a key.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Re: [Qemu-devel] Triple-fault causes abort(), which doesn't end pointer grabs

2007-05-08 Thread Paul Brook
On Monday 07 May 2007, Samuel Bronson wrote:
> So, if the guest system has a triple-fault, and I had had my mouse grabbed,
> it stays grabbed, so that X has to be restarted (as far as I know).
>
> This happens because abort() doesn't run functions registered with
> atexit(). Suggest use of exit() instead.

Sounds like an X server bug to me.

Paul




[Qemu-devel] Triple-fault causes abort(), which doesn't end pointer grabs

2007-05-08 Thread Samuel Bronson
So, if the guest system has a triple-fault, and I had had my mouse grabbed, it
stays grabbed, so that X has to be restarted (as far as I know).

This happens because abort() doesn't run functions registered with atexit().
Suggest use of exit() instead.





[Qemu-devel] [PATCH] configure

2007-05-08 Thread Jeff Chua



Avi had suggest I post this patch here so that it can be included in qemu 
instead of kvm.



Here's a little patch to silent ...
- sdl-config when SDK is compiled without static library
- texi2html when not found

Thanks,
Jeff


--- kvm/qemu/configure.org  2007-05-07 20:36:59 +0800
+++ kvm/qemu/configure  2007-05-07 20:40:58 +0800
@@ -523,8 +523,8 @@
   # static link with sdl ?
   if test "$sdl" = "yes" ; then
   aa="no"
-`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
-sdl_static_libs=`$sdl_config --static-libs`
+`$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
+sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
   if [ "$aa" = "yes" ] ; then
 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
   fi
@@ -567,7 +567,8 @@
   fi

   # Check if tools are available to build documentation.
-if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
+if [ -x "`which texi2html 2>/dev/null`" \
+   -a -x "`which pod2man 2>/dev/null`" ]; then
 build_docs="yes"
   fi