[Qemu-devel] [PATCH] add declaration for kqemu_cpu_interrupt to block-raw.c

2007-11-11 Thread Carlo Marcelo Arenas Belon
The following patch includes exec-all.h in block-raw.c when QEMU_IMG is not
defined to avoid the following implicit declaration :

  qemu/block-raw.c: In function `aio_signal_handler':
  qemu/block-raw.c:253: warning: implicit declaration of function 
`kqemu_cpu_interrupt'

Carlo
--
Index: block-raw.c
===
RCS file: /sources/qemu/qemu/block-raw.c,v
retrieving revision 1.26
diff -u -r1.26 block-raw.c
--- block-raw.c 11 Nov 2007 02:51:16 -  1.26
+++ block-raw.c 11 Nov 2007 08:10:05 -
@@ -57,11 +57,13 @@
 #include sys/disk.h
 #endif
 
-//#define DEBUG_FLOPPY
+#if !defined(QEMU_IMG)
+#include exec-all.h
+#endif
 
+//#define DEBUG_FLOPPY
 //#define DEBUG_BLOCK
-#if defined(DEBUG_BLOCK)  !defined(QEMU_IMG)
-#include exec-all.h
+#if defined(DEBUG_BLOCK)
 #define DEBUG_BLOCK_PRINT(formatCstr, args...) do { if (loglevel != 0) \
 { fprintf(logfile, formatCstr, ##args); fflush(logfile); } } while (0)
 #else




Re: [Qemu-devel] Splitting vl.h

2007-11-11 Thread Blue Swirl
On 11/11/07, Paul Brook [EMAIL PROTECTED] wrote:
 The attached patch starts splitting vl.h up a bit.
 I've pulled out the i2c, disk and irq code.

 Because I picked some of the easier ones, they can also be built once, rather
 than for every target.

 Obviously there's a lot left to do, but my grand plan is to get rid of vl.h
 altogether.  A few files will probably end up effectively including
 everything, but hopefully most files should disentangle reasonably well. The
 more gets split out, the better things should get. e.g. scsi-disk.c doesn't
 need vl.h because I already split out the block API.

 I want to check this seems a reasonable approach before I go too much further.
 Comments?

I understand Fabrice's concern about small files, but I think this is
the right direction.

In ide.c and esp.c there are TARGET_ and target_ dependencies, how do
you plan to handle those?




[Qemu-devel] [PATCH] 64bit clean cris-softmmu

2007-11-11 Thread Carlo Marcelo Arenas Belon
The following patch makes cris-softmmu compile in a 64bit host without
warnings by defining that the target CPU is 32bit explicitly and casting the
use of pointers into an uint32_t.

Carlo

---
Index: target-cris/cpu.h
===
RCS file: /sources/qemu/qemu/target-cris/cpu.h,v
retrieving revision 1.3
diff -u -r1.3 cpu.h
--- target-cris/cpu.h   10 Nov 2007 15:15:52 -  1.3
+++ target-cris/cpu.h   11 Nov 2007 09:53:49 -
@@ -21,6 +21,7 @@
 #ifndef CPU_CRIS_H
 #define CPU_CRIS_H
 
+#define TARGET_PHYS_ADDR_BITS 32
 #define TARGET_LONG_BITS 32
 
 #include cpu-defs.h
Index: target-cris/op_helper.c
===
RCS file: /sources/qemu/qemu/target-cris/op_helper.c,v
retrieving revision 1.3
diff -u -r1.3 op_helper.c
--- target-cris/op_helper.c 29 Oct 2007 14:39:49 -  1.3
+++ target-cris/op_helper.c 11 Nov 2007 10:05:31 -
@@ -60,7 +60,7 @@
 if (__builtin_expect(ret, 0)) {
 if (retaddr) {
 /* now we have a real cpu fault */
-pc = (target_phys_addr_t)retaddr;
+pc = (target_phys_addr_t)(unsigned long)retaddr;
 tb = tb_find_pc(pc);
 if (tb) {
 /* the PC is inside the translated code. It means that we have




Re: [Qemu-devel] Splitting vl.h

2007-11-11 Thread Paul Brook
On Sunday 11 November 2007, Blue Swirl wrote:
 On 11/11/07, Paul Brook [EMAIL PROTECTED] wrote:
  The attached patch starts splitting vl.h up a bit.

 I understand Fabrice's concern about small files, but I think this is
 the right direction.

Ok, I'll try to keep them to a minimum. e.g. I can combine cdrom.h and 
scsi-disk.h

 In ide.c and esp.c there are TARGET_ and target_ dependencies, how do
 you plan to handle those?

Currently I don't, they will still be build per-target.
Longer term this is something a generic bus architecture should handle.

Paul




[Qemu-devel] qemu block-raw.c

2007-11-11 Thread Paul Brook
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Paul Brook pbrook 07/11/11 11:43:27

Modified files:
.  : block-raw.c 

Log message:
block-raw/kqemu fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/block-raw.c?cvsroot=qemur1=1.26r2=1.27




Re: [Qemu-devel] [PATCH] add declaration for kqemu_cpu_interrupt to block-raw.c

2007-11-11 Thread Paul Brook
On Sunday 11 November 2007, Carlo Marcelo Arenas Belon wrote:
 The following patch includes exec-all.h in block-raw.c when QEMU_IMG is
 not defined to avoid the following implicit declaration :

I applied a slightly different version, thanks.

Paul





[Qemu-devel] qemu/hw mips_r4k.c

2007-11-11 Thread Paul Brook
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Paul Brook pbrook 07/11/11 12:02:33

Modified files:
hw : mips_r4k.c 

Log message:
mips_r4k warning fixes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_r4k.c?cvsroot=qemur1=1.52r2=1.53




[Qemu-devel] qemu target-alpha/op_helper.c target-arm/op_hel...

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 12:35:55

Modified files:
target-alpha   : op_helper.c 
target-arm : op_helper.c 
target-cris: op_helper.c 
target-m68k: op_helper.c 
target-ppc : op_helper.c 

Log message:
fixed invalid type

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-alpha/op_helper.c?cvsroot=qemur1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/op_helper.c?cvsroot=qemur1=1.9r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemu/target-cris/op_helper.c?cvsroot=qemur1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op_helper.c?cvsroot=qemur1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_helper.c?cvsroot=qemur1=1.65r2=1.66




Re: [Qemu-devel] [PATCH/RFC] overflow and register size mismatch in sh4-softmmu

2007-11-11 Thread Paul Brook
On Sunday 11 November 2007, Carlo Marcelo Arenas Belon wrote:
 as shown by the following warning when compiling HEAD :

   qemu/target-sh4/translate.c: In function `cpu_sh4_reset':
   qemu/target-sh4/translate.c:139: warning: overflow in implicit constant
 conversion
...
 the following patch changes the logic to use a helper function
 -env-fp_status.float_rounding_mode = float_round_to_zero;
 +set_float_rounding_mode(float_round_to_zero, env-fp_status);

This is just hiding the bug.

Paul




Re: [Qemu-devel] qemu target-alpha/op_helper.c target-arm/op_hel...

2007-11-11 Thread Carlo Marcelo Arenas Belon
On Sun, Nov 11, 2007 at 12:35:55PM +, Fabrice Bellard wrote:
 Modified files:
   target-alpha   : op_helper.c 
   target-arm : op_helper.c 
   target-cris: op_helper.c 
   target-m68k: op_helper.c 
   target-ppc : op_helper.c 
 
 Log message:
   fixed invalid type

why was target_phys_addr_t and invalid type for the program counter? or you
mean that it is better to cast it to unsigned long so that you can never
overflow the pointer and so using unsigned long was better?

Carlo




Re: [Qemu-devel] qemu target-alpha/op_helper.c target-arm/op_hel...

2007-11-11 Thread andrzej zaborowski
On 11/11/2007, Carlo Marcelo Arenas Belon [EMAIL PROTECTED] wrote:
 On Sun, Nov 11, 2007 at 12:35:55PM +, Fabrice Bellard wrote:
  Modified files:
target-alpha   : op_helper.c
target-arm : op_helper.c
target-cris: op_helper.c
target-m68k: op_helper.c
target-ppc : op_helper.c
 
  Log message:
fixed invalid type

 why was target_phys_addr_t and invalid type for the program counter?

Program counter is normally a virtual address.

Regards




[Qemu-devel] qemu Makefile.target arm-semi.c exec.c m68k-sem...

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 14:26:48

Modified files:
.  : Makefile.target arm-semi.c exec.c m68k-semi.c 
 softmmu-semi.h 
linux-user : elfload.c flatload.c linuxload.c qemu.h 
 signal.c strace.c syscall.c vm86.c 
Added files:
linux-user : uaccess.c 

Log message:
Linux user memory access API change (initial patch by Thayne Harbaugh)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile.target?cvsroot=qemur1=1.222r2=1.223
http://cvs.savannah.gnu.org/viewcvs/qemu/arm-semi.c?cvsroot=qemur1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemu/exec.c?cvsroot=qemur1=1.113r2=1.114
http://cvs.savannah.gnu.org/viewcvs/qemu/m68k-semi.c?cvsroot=qemur1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemu/softmmu-semi.h?cvsroot=qemur1=1.2r2=1.3
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/elfload.c?cvsroot=qemur1=1.55r2=1.56
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/flatload.c?cvsroot=qemur1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/linuxload.c?cvsroot=qemur1=1.7r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/qemu.h?cvsroot=qemur1=1.45r2=1.46
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/signal.c?cvsroot=qemur1=1.49r2=1.50
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/strace.c?cvsroot=qemur1=1.2r2=1.3
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.143r2=1.144
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/vm86.c?cvsroot=qemur1=1.12r2=1.13
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/uaccess.c?cvsroot=qemurev=1.1




[Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Ben Taylor

I'm getting this error compiling hw/sh7750.c

I believe the problem comes from the include in hw/sh_intc.h
with the macro

#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)

in line 587 of hw/7750.c, I see

sh_intc_register_sources(s-intc,
 _INTC_ARRAY(vectors_irlm),
 _INTC_ARRAY(NULL));

So the macro turns the last _INTC_ARRAY(NULL) into

NULL, sizeof(NULL)/sizeof(*NULL)

Since sizeof(*NULL) doesn't make any sense, the compiler barfs
on Solaris 10/x86_64.

gcc -Wall -O2 -g -fno-strict-aliasing -m64 -I. -I.. 
-I/export-1/bent/src/qemu/07/qemu/target-sh4 
-I/export-1/bent/src/qemu/07/qemu -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-I/export-1/bent/src/qemu/07/qemu/fpu -I/usr/gnu/include   
-I/export-1/bent/src/qemu/07/qemu/slirp  -m64  -c -o sh7750.o 
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c: In function `error_access':
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c:184: warning: unsigned int 
format, different type arg (arg 5)
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c: In function `ignore_access':
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c:190: warning: unsigned int 
format, different type arg (arg 5)
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c: In function `sh7750_init':
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c:576: error: invalid type 
argument of `unary *'
/export-1/bent/src/qemu/07/qemu/hw/sh7750.c:589: error: invalid type 
argument of `unary *'
gmake[1]: *** [sh7750.o] Error 1
gmake[1]: Leaving directory `/export-1/bent/src/qemu/07/qemu/sh4-softmmu'
gmake: *** [subdir-sh4-softmmu] Error 2

In this case, I've replaced _INTC_ARRAY(NULL) with NULL, NULL and it
succesfully compiles, but I don't have any sh emulation to do.

Ben




[Qemu-devel] qemu/target-arm translate.c

2007-11-11 Thread Paul Brook
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Paul Brook pbrook 07/11/11 14:36:36

Modified files:
target-arm : translate.c 

Log message:
Fix msr_mask.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/translate.c?cvsroot=qemur1=1.58r2=1.59




[Qemu-devel] qemu/tests test-i386.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 14:43:13

Modified files:
tests  : test-i386.c 

Log message:
compilation fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/tests/test-i386.c?cvsroot=qemur1=1.55r2=1.56




[Qemu-devel] qemu/hw ppc_chrp.c ppc_oldworld.c ppc_prep.c

2007-11-11 Thread Jocelyn Mayer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Jocelyn Mayer j_mayer 07/11/11 14:44:28

Modified files:
hw : ppc_chrp.c ppc_oldworld.c ppc_prep.c 

Log message:
Fix PowerPC boot device selection.
Fix gcc warning in PowerPC PreP machine init routine.
Add second IDE channel to Heathrow Mac machine (still not handled by 
OHW).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ppc_chrp.c?cvsroot=qemur1=1.50r2=1.51
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ppc_oldworld.c?cvsroot=qemur1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ppc_prep.c?cvsroot=qemur1=1.53r2=1.54




[Qemu-devel] qemu/linux-user main.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 14:46:06

Modified files:
linux-user : main.c 

Log message:
-strace option

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/main.c?cvsroot=qemur1=1.145r2=1.146




[Qemu-devel] qemu/linux-user vm86.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 14:50:32

Modified files:
linux-user : vm86.c 

Log message:
fixed error codes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/vm86.c?cvsroot=qemur1=1.13r2=1.14




[Qemu-devel] qemu gdbstub.c

2007-11-11 Thread Paul Brook
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Paul Brook pbrook 07/11/11 14:52:02

Modified files:
.  : gdbstub.c 

Log message:
Fix format mismatch.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/gdbstub.c?cvsroot=qemur1=1.69r2=1.70




[Qemu-devel] qemu/linux-user syscall.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 14:57:14

Modified files:
linux-user : syscall.c 

Log message:
no longer use get_errno for do_modify_ldt()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.144r2=1.145




[Qemu-devel] qemu/linux-user syscall.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 15:11:20

Modified files:
linux-user : syscall.c 

Log message:
move get_errno() inside do_fcntl()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.145r2=1.146




[Qemu-devel] [PATCH] hw/sh7750.c: use TARGET_FMT_plx to printf target_phys_addr_t

2007-11-11 Thread Carlo Marcelo Arenas Belon
The following patch changes the formatting string from %08x to TARGET_FMT_plx
to accommodate for 64bit hosts.

Carlo

---
Index: hw/sh7750.c
===
RCS file: /sources/qemu/qemu/hw/sh7750.c,v
retrieving revision 1.9
diff -u -r1.9 sh7750.c
--- hw/sh7750.c 4 Oct 2007 21:53:54 -   1.9
+++ hw/sh7750.c 11 Nov 2007 15:27:31 -
@@ -180,13 +180,13 @@
 
 static void error_access(const char *kind, target_phys_addr_t addr)
 {
-fprintf(stderr, %s to %s (0x%08x) not supported\n,
+fprintf(stderr, %s to %s (0x TARGET_FMT_plx ) not supported\n,
kind, regname(addr), addr);
 }
 
 static void ignore_access(const char *kind, target_phys_addr_t addr)
 {
-fprintf(stderr, %s to %s (0x%08x) ignored\n,
+fprintf(stderr, %s to %s (0x TARGET_FMT_plx ) ignored\n,
kind, regname(addr), addr);
 }
 




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Carlo Marcelo Arenas Belon
On Sun, Nov 11, 2007 at 09:30:26AM -0500, Ben Taylor wrote:
 So the macro turns the last _INTC_ARRAY(NULL) into
 
 NULL, sizeof(NULL)/sizeof(*NULL)

in my 64bit linux using gcc-4.1.2 it becomes instead :

  ((void *)0), sizeof(((void *)0))/sizeof(*((void *)0))

what version of gcc (gcc -v) are you using in that Solaris 10 box? (HINT: not
all available versions of gcc compile qemu correctly) :

  http://www.opensolaris.org/os/project/qemu/host/gcc-failures/

Carlo




[Qemu-devel] qemu/slirp misc.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 16:05:35

Modified files:
slirp  : misc.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/slirp/misc.c?cvsroot=qemur1=1.12r2=1.13




[Qemu-devel] qemu/linux-user signal.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 16:22:17

Modified files:
linux-user : signal.c 

Log message:
removed warnings - fixed arm stack copy bug

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/signal.c?cvsroot=qemur1=1.50r2=1.51




[Qemu-devel] qemu/hw sun4u.c

2007-11-11 Thread Blue Swirl
CVSROOT:/cvsroot/qemu
Module name:qemu
Changes by: Blue Swirl blueswir1  07/11/11 16:51:04

Modified files:
hw : sun4u.c 

Log message:
 Fix Sun4u compile

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4u.c?cvsroot=qemur1=1.25r2=1.26




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Carlo Marcelo Arenas Belon
On Sun, Nov 11, 2007 at 10:06:34AM -0600, Carlo Marcelo Arenas Belon wrote:
 On Sun, Nov 11, 2007 at 09:30:26AM -0500, Ben Taylor wrote:
  So the macro turns the last _INTC_ARRAY(NULL) into
  
  NULL, sizeof(NULL)/sizeof(*NULL)
 
 in my 64bit linux using gcc-4.1.2 it becomes instead :
 
   ((void *)0), sizeof(((void *)0))/sizeof(*((void *)0))
 
 what version of gcc (gcc -v) are you using in that Solaris 10 box? (HINT: not
 all available versions of gcc compile qemu correctly) :
 
   http://www.opensolaris.org/os/project/qemu/host/gcc-failures/

That didn't sound as clear as it should, so I booted an OpenSolaris Nevada 70b
using the sun provided gcc :

$ uname -a
SunOS dell 5.11 snv_70b i86pc i386 i86pc
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)

and run a test, the problem is in /usr/include/iso/stdio_iso.h that defined
NULL as an int and not a pointer as shown by :

fndef NULL
#if defined(_LP64)
#define NULL0L
#else
#define NULL0
#endif
#endif

contradicting (at least in spirit) the C99 (ISO/IEC 9899:TCS) standard that
says :

  A pointer to void shall have the same representation and alignment 
   requirements as a pointer to a character type

and therefore makes sizeof(*NULL) == 1 solving the problem to compile as it is
done if applying the following patch :

Carlo

---
--- qemu/hw/sh7750.cSun Oct  7 09:31:11 2007
+++ qemu/hw/sh7750.cSun Nov 11 16:13:13 2007
@@ -29,6 +29,9 @@
 #include sh7750_regnames.h
 #include sh_intc.h
 
+#undef NULL
+#define NULL ((void *)0)
+
 #define NB_DEVICES 4
 
 typedef struct SH7750State {




[Qemu-devel] qemu/linux-user main.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:22:48

Modified files:
linux-user : main.c 

Log message:
printf format fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/main.c?cvsroot=qemur1=1.146r2=1.147




[Qemu-devel] qemu/linux-user qemu.h strace.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:23:29

Modified files:
linux-user : qemu.h strace.c 

Log message:
use correct types

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/qemu.h?cvsroot=qemur1=1.46r2=1.47
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/strace.c?cvsroot=qemur1=1.3r2=1.4




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Paul Brook
 +#undef NULL
 +#define NULL ((void *)0)

Absolutely not.

Paul




[Qemu-devel] qemu/linux-user m68k-sim.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:25:52

Modified files:
linux-user : m68k-sim.c 

Log message:
fixed invalid cast

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/m68k-sim.c?cvsroot=qemur1=1.2r2=1.3




[Qemu-devel] qemu/tests Makefile

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:26:22

Modified files:
tests  : Makefile 

Log message:
use -fno-strict-aliasing

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/tests/Makefile?cvsroot=qemur1=1.42r2=1.43




[Qemu-devel] qemu translate-all.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:26:45

Modified files:
.  : translate-all.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/translate-all.c?cvsroot=qemur1=1.20r2=1.21




[Qemu-devel] qemu/linux-user syscall.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:39:19

Modified files:
linux-user : syscall.c 

Log message:
improved cmsg handling - improved shm memory code

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.146r2=1.147




[Qemu-devel] qemu/linux-user syscall_defs.h

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:39:38

Modified files:
linux-user : syscall_defs.h 

Log message:
suppressed invalid TARGET_CMSG_FIRSTHDR macro

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall_defs.h?cvsroot=qemur1=1.44r2=1.45




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED]
Carlo Marcelo Arenas Belon [EMAIL PROTECTED] writes:
: On Sun, Nov 11, 2007 at 10:06:34AM -0600, Carlo Marcelo Arenas Belon wrote:
:  On Sun, Nov 11, 2007 at 09:30:26AM -0500, Ben Taylor wrote:
:   So the macro turns the last _INTC_ARRAY(NULL) into
:   
:   NULL, sizeof(NULL)/sizeof(*NULL)
:  
:  in my 64bit linux using gcc-4.1.2 it becomes instead :
:  
:((void *)0), sizeof(((void *)0))/sizeof(*((void *)0))
:  
:  what version of gcc (gcc -v) are you using in that Solaris 10 box? (HINT: 
not
:  all available versions of gcc compile qemu correctly) :
:  
:http://www.opensolaris.org/os/project/qemu/host/gcc-failures/
: 
: That didn't sound as clear as it should, so I booted an OpenSolaris Nevada 70b
: using the sun provided gcc :
: 
: $ uname -a
: SunOS dell 5.11 snv_70b i86pc i386 i86pc
: $ gcc -v
: Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
: Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
: --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
: --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc
: --enable-shared
: Thread model: posix
: gcc version 3.4.3 (csl-sol210-3_4-20050802)
: 
: and run a test, the problem is in /usr/include/iso/stdio_iso.h that defined
: NULL as an int and not a pointer as shown by :
: 
: fndef NULL
: #if defined(_LP64)
: #define NULL0L
: #else
: #define NULL0
: #endif
: #endif
: 
: contradicting (at least in spirit) the C99 (ISO/IEC 9899:TCS) standard that
: says :
: 
:   A pointer to void shall have the same representation and alignment 
:requirements as a pointer to a character type

NULL isn't a pointer.  It is a integral constant, per section
6.3.2.3.3 of C99.  So *NULL is undefined.  If you want a constant
thats an actual pointer, you need to define one special.

   6.3.2.3  Pointers
...
   [#3] An integer constant expression with  the  value  0,  or
   such  an  expression  cast  to type void *, is called a null
   pointer constant.  If a null pointer constant is assigned
   to or compared for equality to a pointer,  the  constant  is
   converted to a pointer of that type.  Such a pointer, called
   a null pointer,  is  guaranteed  to  compare  unequal  to  a
   pointer to any object or function.

   [#4]  Conversion  of  a null pointer to another pointer type
   yields a null pointer of that type.  Any two  null  pointers
   shall compare equal.

   7.17  Common definitions stddef.h
...
   [#3] The macros are
   NULL
   which  expands  to  an  implementation-defined  null pointer
   constant; and
..

The root cause is of this whole problem is *NULL, an undefined,
unportable construct.  That's what should be fixed, not the definition
of NULL if you want this code to be portable.

Warner




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Andreas Schwab
Carlo Marcelo Arenas Belon [EMAIL PROTECTED] writes:

 and run a test, the problem is in /usr/include/iso/stdio_iso.h that defined
 NULL as an int and not a pointer as shown by :

NULL is not a pointer, it is a null pointer constant, and 0 is a valid
null pointer constant.

 contradicting (at least in spirit) the C99 (ISO/IEC 9899:TCS) standard that
 says :

   A pointer to void shall have the same representation and alignment 
requirements as a pointer to a character type

A null pointer constant is not a pointer.  It can be convert to a
pointer, but that happens only in the right context (through explicit or
implicit conversions).

 and therefore makes sizeof(*NULL) == 1 solving the problem to compile as it is
 done if applying the following patch :

 Carlo

 ---
 --- qemu/hw/sh7750.c  Sun Oct  7 09:31:11 2007
 +++ qemu/hw/sh7750.c  Sun Nov 11 16:13:13 2007
 @@ -29,6 +29,9 @@
  #include sh7750_regnames.h
  #include sh_intc.h
  
 +#undef NULL
 +#define NULL ((void *)0)

This does not make it better, since sizeof(void) is still not allowed in
C.

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.




[Qemu-devel] qemu/hw sh7750.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:51:40

Modified files:
hw : sh7750.c 

Log message:
removed invalid use of _INTC_ARRAY

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sh7750.c?cvsroot=qemur1=1.9r2=1.10




[Qemu-devel] qemu/linux-user strace.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 17:55:50

Modified files:
linux-user : strace.c 

Log message:
hex numbers must have a leading 0x

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/strace.c?cvsroot=qemur1=1.4r2=1.5




[Qemu-devel] qemu qemu-doc.texi vl.c vl.h hw/slavio_misc.c h...

2007-11-11 Thread Blue Swirl
CVSROOT:/cvsroot/qemu
Module name:qemu
Changes by: Blue Swirl blueswir1  07/11/11 17:56:39

Modified files:
.  : qemu-doc.texi vl.c vl.h 
hw : slavio_misc.c sun4m.c 

Log message:
 Add SPARCserver 600MP emulation (original patch by Robert Reif)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu-doc.texi?cvsroot=qemur1=1.165r2=1.166
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemur1=1.359r2=1.360
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.294r2=1.295
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_misc.c?cvsroot=qemur1=1.11r2=1.12
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemur1=1.59r2=1.60




Re: [Qemu-devel] error compiling hw/sh7750.c

2007-11-11 Thread Carlo Marcelo Arenas Belon
On Sun, Nov 11, 2007 at 05:24:06PM +, Paul Brook wrote:
  +#undef NULL
  +#define NULL ((void *)0)
 
 Absolutely not.

this was not meant to be a final solution, or even be committed in qemu, just
a stop gap solution answering Ben so that he can get their build to complete 
and have a somehow equivalent definition of what the code is doing in linux
(where I presume was tested) until it can be fixed in a portable way.

Ben's solution was to replace _INTC_ARRAY(NULL) with NULL, NULL but it
should had been instead NULL, 4 or NULL, 8 depending on what ISA he is
compiling it for, doing the #undef/#define leads to that and, yes I agree
it is awful.

Carlo




[Qemu-devel] qemu thunk.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:31:34

Modified files:
.  : thunk.c 

Log message:
better than nothing 64 bit support - added sign extension for TYPE_LONG

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/thunk.c?cvsroot=qemur1=1.9r2=1.10




[Qemu-devel] qemu/linux-user main.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:32:53

Modified files:
linux-user : main.c 

Log message:
sparc64_[get|set]_context are not meaningful in abi32 mode 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/main.c?cvsroot=qemur1=1.147r2=1.148




[Qemu-devel] qemu/linux-user syscall.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:34:33

Modified files:
linux-user : syscall.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.147r2=1.148




[Qemu-devel] qemu/linux-user signal.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:45:10

Modified files:
linux-user : signal.c 

Log message:
removed warnings - improved sparc32/64 signal frame setup - disabled 
x86 frame setup for x86_64

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/signal.c?cvsroot=qemur1=1.51r2=1.52




[Qemu-devel] qemu/target-i386 exec.h

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:45:49

Modified files:
target-i386: exec.h 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/exec.h?cvsroot=qemur1=1.38r2=1.39




[Qemu-devel] qemu/target-sparc op_helper.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:46:09

Modified files:
target-sparc   : op_helper.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-sparc/op_helper.c?cvsroot=qemur1=1.51r2=1.52




[Qemu-devel] qemu/hw usb-uhci.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:46:37

Modified files:
hw : usb-uhci.c 

Log message:
removed unused code

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-uhci.c?cvsroot=qemur1=1.20r2=1.21




[Qemu-devel] qemu/hw slavio_timer.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:47:02

Modified files:
hw : slavio_timer.c 

Log message:
fixed invalid constant

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemur1=1.18r2=1.19




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

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:47:59

Modified files:
hw : pxa2xx_dma.c pxa.h spitz.c 

Log message:
use correct printf format

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_dma.c?cvsroot=qemur1=1.4r2=1.5
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa.h?cvsroot=qemur1=1.7r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/spitz.c?cvsroot=qemur1=1.13r2=1.14




[Qemu-devel] qemu/hw pxa2xx.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:48:34

Modified files:
hw : pxa2xx.c 

Log message:
removed unused variables

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemur1=1.20r2=1.21




[Qemu-devel] qemu/hw omap.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:48:47

Modified files:
hw : omap.c 

Log message:
fixed cast

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/omap.c?cvsroot=qemur1=1.20r2=1.21




[Qemu-devel] qemu/hw mips_mipssim.c mips_pica61.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:49:08

Modified files:
hw : mips_mipssim.c mips_pica61.c 

Log message:
removed unused variable

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_mipssim.c?cvsroot=qemur1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_pica61.c?cvsroot=qemur1=1.11r2=1.12




[Qemu-devel] qemu/target-sh4 translate.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:49:51

Modified files:
target-sh4 : translate.c 

Log message:
fixed FPU rounding init

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-sh4/translate.c?cvsroot=qemur1=1.19r2=1.20




[Qemu-devel] qemu/hw gt64xxx.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 19:50:22

Modified files:
hw : gt64xxx.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/gt64xxx.c?cvsroot=qemur1=1.21r2=1.22




[Qemu-devel] qemu cpu-exec.c vl.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 20:14:28

Modified files:
.  : cpu-exec.c vl.c 

Log message:
removed warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemur1=1.123r2=1.124
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemur1=1.360r2=1.361




[Qemu-devel] qemu configure

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 20:17:03

Modified files:
.  : configure 

Log message:
options to enable or disable -Werror. Enable -Werror for builds from 
CVS by default

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemur1=1.169r2=1.170




[Qemu-devel] qemu VERSION

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 20:17:14

Modified files:
.  : VERSION 

Log message:
update

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/VERSION?cvsroot=qemur1=1.30r2=1.31




[Qemu-devel] qemu configure

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 20:24:30

Modified files:
.  : configure 

Log message:
better to disable -Werror by default as 64 bit hosts still have warnings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemur1=1.170r2=1.171




Re: [Qemu-devel] qemu configure

2007-11-11 Thread Carlo Marcelo Arenas Belon
 Changes by:   Fabrice Bellard bellard   07/11/11 20:24:30
 
 Log message:
   better to disable -Werror by default as 64 bit hosts still have warnings

amazing work, haven't ever seen a cleaner compilation in 64bit linux before.

thank you

Carlo




Re: [Qemu-devel] [PATCH] Add TPM support

2007-11-11 Thread Thomas Bleher
* Fabrice Bellard [EMAIL PROTECTED] [2007-11-07 18:35]:
 A few more remarks :
 
 - tpm_register() must be called in hw/pc.c.
 
 - you must also handle incomplete write and reads. Use something like
 unix_write() in vl.c and the equivalent for read.
 
 - The code seems to be Unix specific so it must be disabled for win32.

Thank you for the comments. I had hoped to have some time this weekend
to fix these issues, but this wasn't the case. I've put them on my TODO
list and will resubmit once the issues are fixed.

Regards,
Thomas





[Qemu-devel] qemu cpu-exec.c target-i386/cpu.h

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 22:16:57

Modified files:
.  : cpu-exec.c 
target-i386: cpu.h 

Log message:
consistent types for cpu_x86_fsave and cpu_x86_frstor

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemur1=1.124r2=1.125
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/cpu.h?cvsroot=qemur1=1.54r2=1.55




[Qemu-devel] qemu/linux-user vm86.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 22:22:35

Modified files:
linux-user : vm86.c 

Log message:
64 bit compilation fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/vm86.c?cvsroot=qemur1=1.14r2=1.15




[Qemu-devel] qemu/linux-user signal.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 22:23:39

Modified files:
linux-user : signal.c 

Log message:
user access fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/signal.c?cvsroot=qemur1=1.52r2=1.53




[Qemu-devel] qemu/linux-user signal.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 23:03:42

Modified files:
linux-user : signal.c 

Log message:
fixed more invalid pointer usage

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/signal.c?cvsroot=qemur1=1.53r2=1.54




[Qemu-devel] qemu/linux-user syscall.c

2007-11-11 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard bellard   07/11/11 23:11:36

Modified files:
linux-user : syscall.c 

Log message:
64 bit cast for dirent64

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemur1=1.148r2=1.149




[Qemu-devel] qemu/target-ppc helper.c op.c op_helper.c trans...

2007-11-11 Thread Jocelyn Mayer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Jocelyn Mayer j_mayer 07/11/12 00:04:48

Modified files:
target-ppc : helper.c op.c op_helper.c translate.c 

Log message:
Fix usage of the -1 constant in the PowerPC target code:
fix invalid size casts and/or sign-extensions. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/helper.c?cvsroot=qemur1=1.89r2=1.90
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op.c?cvsroot=qemur1=1.64r2=1.65
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_helper.c?cvsroot=qemur1=1.66r2=1.67
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/translate.c?cvsroot=qemur1=1.103r2=1.104




[Qemu-devel] qemu/target-ppc op.c op_mem.h

2007-11-11 Thread Jocelyn Mayer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Jocelyn Mayer j_mayer 07/11/12 00:50:50

Modified files:
target-ppc : op.c op_mem.h 

Log message:
More PowerPC target -1 usage fixes (reservation address).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op.c?cvsroot=qemur1=1.65r2=1.66
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_mem.h?cvsroot=qemur1=1.23r2=1.24




[Qemu-devel] Remote guest VBD

2007-11-11 Thread Kaushik Bhandankar

Hello,

I  am trying to implement remote VBD functionality for HVM guests is 
fully-virtualized Xen 3.0 unstable.


Consider 2 machines: machine 1 and machine 2, booth Intel-VT capable 
machines hosting fully-virtualized Xen 3.0-unstable.


Lets say the HVM guest sitting on machine 1 has its VBD located on 
machine 2 (same/different LAN)


For this, I have established a 9P communication channel (similar to 
socket communication) between the Dom0's of machine 1 and machine 2 with 
the 9P server thread running on machine 2 and 9P client thread running 
on machine 1.


Whenever the HVM guest tries to access its VBD, my 9P client needs 
tointercept this invocation and send it to the 9P server which does the 
necessary stuff with the VBD and sends back the response to the 9P client.


But I am not sure about following details:
1) The code path followed when a guest tries to access its VBD before it 
lands me into tools/ioemu/hw/ide.c:ide_ioport_read() or 
tools/ioemu/hw/ide.c:ide_ioport_write()
2) Where exactly should the 9P client intercept the call by guest to 
access its VBD?
3) When the 9P server sends the response back to the 9P client, how 
should this response be forwarded by the client?


Any help about this will be appreciated.

-Kaushik




[Qemu-devel] qemu configure darwin-user/main.c linux-user/ma...

2007-11-11 Thread Jocelyn Mayer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Jocelyn Mayer j_mayer 07/11/12 01:56:19

Modified files:
.  : configure 
darwin-user: main.c 
linux-user : main.c 
target-ppc : cpu.h helper.c op.c op_helper.c op_helper.h 
 op_mem.h op_template.h translate.c 

Log message:
Allow use of SPE extension by all PowerPC targets,
  adding gprh registers to store GPR MSBs when GPRs are 32 bits.
Remove not-needed-anymore ppcemb-linux-user target.
Keep ppcemb-softmmu target, which provides 1kB pages support
  and 36 bits physical address space.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemur1=1.171r2=1.172
http://cvs.savannah.gnu.org/viewcvs/qemu/darwin-user/main.c?cvsroot=qemur1=1.10r2=1.11
http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/main.c?cvsroot=qemur1=1.148r2=1.149
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/cpu.h?cvsroot=qemur1=1.90r2=1.91
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/helper.c?cvsroot=qemur1=1.90r2=1.91
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op.c?cvsroot=qemur1=1.66r2=1.67
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_helper.c?cvsroot=qemur1=1.67r2=1.68
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_helper.h?cvsroot=qemur1=1.27r2=1.28
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_mem.h?cvsroot=qemur1=1.24r2=1.25
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/op_template.h?cvsroot=qemur1=1.13r2=1.14
http://cvs.savannah.gnu.org/viewcvs/qemu/target-ppc/translate.c?cvsroot=qemur1=1.104r2=1.105




[Qemu-devel] [PATCH] remove duplicated tlb_fill definitions for i386 and cris targets

2007-11-11 Thread Carlo Marcelo Arenas Belon
The following patch removes a duplicated tlb_fill definition from the per
target specific exec.h for i386 and cris in favor of the generic one in 
exec-all.h.

It also rearranges cris' op_helper implement it only in softmmu mode like all
other targets.

Carlo

---
Index: target-cris/exec.h
===
RCS file: /sources/qemu/qemu/target-cris/exec.h,v
retrieving revision 1.2
diff -u -r1.2 exec.h
--- target-cris/exec.h  14 Oct 2007 07:07:06 -  1.2
+++ target-cris/exec.h  12 Nov 2007 04:58:48 -
@@ -46,7 +46,6 @@
 
 int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
   int mmu_idx, int is_softmmu);
-void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr);
 
 #if !defined(CONFIG_USER_ONLY)
 #include softmmu_exec.h
Index: target-cris/op_helper.c
===
RCS file: /sources/qemu/qemu/target-cris/op_helper.c,v
retrieving revision 1.4
diff -u -r1.4 op_helper.c
--- target-cris/op_helper.c 11 Nov 2007 12:35:55 -  1.4
+++ target-cris/op_helper.c 12 Nov 2007 04:58:48 -
@@ -22,6 +22,10 @@
 #include assert.h
 #include exec.h
 
+/*/
+/* Softmmu support */
+#if !defined (CONFIG_USER_ONLY)
+
 #define MMUSUFFIX _mmu
 #ifdef __s390__
 # define GETPC() ((void*)((unsigned long)__builtin_return_address(0)  
0x7fffUL))
@@ -73,6 +77,8 @@
 env = saved_env;
 }
 
+#endif
+
 void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
   int is_asi)
 {
Index: target-i386/exec.h
===
RCS file: /sources/qemu/qemu/target-i386/exec.h,v
retrieving revision 1.39
diff -u -r1.39 exec.h
--- target-i386/exec.h  11 Nov 2007 19:45:49 -  1.39
+++ target-i386/exec.h  12 Nov 2007 04:58:48 -
@@ -164,8 +164,6 @@
 void cpu_x86_flush_tlb(CPUX86State *env, target_ulong addr);
 int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
  int is_write, int mmu_idx, int is_softmmu);
-void tlb_fill(target_ulong addr, int is_write, int mmu_idx,
-  void *retaddr);
 void __hidden cpu_lock(void);
 void __hidden cpu_unlock(void);
 void do_interrupt(int intno, int is_int, int error_code,




[Qemu-devel] [PATCH] tests/runcom.c: use sys/vm86.h definition of vm86 system call

2007-11-11 Thread Carlo Marcelo Arenas Belon
The following patch fixes a compilation/type mismatch issue for runcom by
removing the _syscall2 macro call (deprecated since kernel 2.6.18) and using
the definition from sys/vm86.h for the vm86 system call instead.

Carlo
---
Index: tests/runcom.c
===
RCS file: /sources/qemu/qemu/tests/runcom.c,v
retrieving revision 1.5
diff -u -r1.5 runcom.c
--- tests/runcom.c  17 Sep 2007 08:09:54 -  1.5
+++ tests/runcom.c  12 Nov 2007 07:30:50 -
@@ -12,6 +12,7 @@
 
 #include linux/unistd.h
 #include asm/vm86.h
+#include sys/vm86.h
 
 //#define SIGTEST
 
@@ -21,8 +22,6 @@
return (type) (res); \
 } while (0)
 
-_syscall2(int, vm86, int, func, struct vm86plus_struct *, v86)
-
 #define COM_BASE_ADDR0x10100
 
 void usage(void)