[Qemu-devel] [BUG][PATCH] check socklen_t values in linux-user

2007-12-17 Thread Thayne Harbaugh
Qemu doesn't check socklen_t values before using them. If a value is provided that is large (say -1) then qemu will merrily use it in alloca() (which will blow the stack). The kernel checks all socklen_t values for < 0 or > MAX_SOCK_ADDR. This patch mimics the kernel behavior - which prevents SE

[Qemu-devel] Bug report

2007-12-17 Thread Bas Wijnen
Hi, While writing a kernel and testing it with qemu, I found some bugs in qemu (and many in my kernel ;-) ). Here's a list of them. They are all about x86 emulation on x86. Some are a bit old, and since my kernel is now fixed I can't easily test if they still aren't fixed, though. - When a pro

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

2007-12-17 Thread Thiemo Seufer
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/12/18 02:41:04 Modified files: linux-user : syscall.c Log message: Correct errno return for setsockopt(), by Thayne Harbaugh. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/linux-

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

2007-12-17 Thread Thiemo Seufer
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/12/18 02:39:59 Modified files: linux-user : syscall.c Log message: Correct errno return for getsockopt(), by Thayne Harbaugh. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/linux-

Re: [Qemu-devel] Re: [PATCH 2/3] virtio network device

2007-12-17 Thread Rusty Russell
On Wednesday 12 December 2007 12:40:43 Anthony Liguori wrote: > Rusty Russell wrote: > > On Sunday 09 December 2007 09:02:48 Anthony Liguori wrote: > >> If QEMU ever got true SMP support, then virtio would not work as it > >> requires 16-bit atomic writes which AFAIK is not possible on a number of

[Qemu-devel] [PATCH] sparc32: fix count calculation when limit = 0

2007-12-17 Thread Robert Reif
Fix count calculation when counter limit set to 0. diff -p -u -r1.23 slavio_timer.c --- hw/slavio_timer.c 17 Dec 2007 18:21:57 - 1.23 +++ hw/slavio_timer.c 18 Dec 2007 02:23:37 - @@ -97,9 +97,14 @@ static int slavio_timer_is_user(SLAVIO_T // Convert from ptimer countdown units s

[Qemu-devel] qemu host-utils.h

2007-12-17 Thread Thiemo Seufer
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/12/18 01:58:05 Modified files: . : host-utils.h Log message: Code formatting. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/host-utils.h?cvsroot=qemu&r1=1.4&r2=1.5

[Qemu-devel] Re: [kvm-devel] [PATCH][UPDATE] kvm-userspace: sync icache for morearchitectures

2007-12-17 Thread Hollis Blanchard
On Fri, 2007-12-14 at 10:07 +0100, Christian Ehrhardt wrote: > > Hollis Blanchard wrote: > > A comment to explain why the icache needs flushing only in the KVM > case > > would be useful. Other than that I'm fine with it. > > > > Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> > AFAIK Plain q

[Qemu-devel] qemu/linux-user/m68k target_signal.h

2007-12-17 Thread Thiemo Seufer
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/12/18 01:46:39 Modified files: linux-user/m68k: target_signal.h Log message: m68k missing get_sp_from_cpustate(), by Thayne Harbaugh. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/li

Re: [Qemu-devel] New Qemu Crash found with evidence of memory corruption

2007-12-17 Thread andrzej zaborowski
On 16/12/2007, Andreas Schwab <[EMAIL PROTECTED]> wrote: > "Alexey Eremenko" <[EMAIL PROTECTED]> writes: > > > == > > The error seems to be in Qemu's readline.c: > > > > if (idx == TERM_MAX_CMDS) { > > /* Need to get one free slot */ > > free(term

Re: [Qemu-devel] floppy disk

2007-12-17 Thread Benjamin David Lunt
- Original Message - From: "J. Mayer" <[EMAIL PROTECTED]> To: Sent: Monday, December 17, 2007 7:40 AM Subject: Re: [Qemu-devel] floppy disk On Mon, 2007-12-17 at 03:28 +, Thiemo Seufer wrote: Benjamin David Lunt wrote: > Hi everyone, > > I only recently have started to use QEm

Re: [Qemu-devel] qemu vl.c

2007-12-17 Thread andrzej zaborowski
On 18/12/2007, Anders <[EMAIL PROTECTED]> wrote: > > > Redundant timer rearm optimisation by Anders Melchiorsen. > > > I'm merging qemu-cvs into the kvm repository now, and with this commit > > in, kvm will hang after about a minute. Attaching to it with gdb or > > strace will cause it to re

Re: [Qemu-devel] [PATCH 2/2 v2][UPDATED] Direct IDE I/O

2007-12-17 Thread Paul Brook
On Monday 17 December 2007, Fabrice Bellard wrote: > Laurent Vivier wrote: > > This patch enhances the "-drive ,cache=off" mode with IDE drive emulation > > by removing the buffer used in the IDE emulation. > > --- > > block.c | 10 +++ > > block.h |2 > > block_int.h |1 > > cpu

Re: [Qemu-devel] qemu vl.c

2007-12-17 Thread Anders
> Redundant timer rearm optimisation by Anders Melchiorsen. > I'm merging qemu-cvs into the kvm repository now, and with this commit > in, kvm will hang after about a minute. Attaching to it with gdb or > strace will cause it to resume, so this is very likely a missing signal > problem. T

Re: [Qemu-devel] [PATCH 1/2 v2][UPDATE] Add "cache" parameter to "-drive"

2007-12-17 Thread Fabrice Bellard
Laurent Vivier wrote: > This patch adds a new parameter to "-drive" > > Using "cache=off" with "-drive" will open the disk image file using > "O_DIRECT". > > By default, "cache" is set to "on" to keep original behavior of qemu. > > example: > > "-drive file=my_disk.qcow2,cache=off" > --- > blo

Re: [Qemu-devel] [PATCH 2/2 v2][UPDATED] Direct IDE I/O

2007-12-17 Thread Fabrice Bellard
Laurent Vivier wrote: > This patch enhances the "-drive ,cache=off" mode with IDE drive emulation > by removing the buffer used in the IDE emulation. > --- > block.c | 10 +++ > block.h |2 > block_int.h |1 > cpu-all.h |1 > exec.c | 19 ++ > hw/ide.c| 1

[Qemu-devel] [PATCH 2/2 v2][UPDATED] Direct IDE I/O

2007-12-17 Thread Laurent Vivier
This patch enhances the "-drive ,cache=off" mode with IDE drive emulation by removing the buffer used in the IDE emulation. --- block.c | 10 +++ block.h |2 block_int.h |1 cpu-all.h |1 exec.c | 19 ++ hw/ide.c| 176

[Qemu-devel] [PATCH 1/2 v2][UPDATE] Add "cache" parameter to "-drive"

2007-12-17 Thread Laurent Vivier
This patch adds a new parameter to "-drive" Using "cache=off" with "-drive" will open the disk image file using "O_DIRECT". By default, "cache" is set to "on" to keep original behavior of qemu. example: "-drive file=my_disk.qcow2,cache=off" --- block-raw-posix.c |8 block-raw-win

[Qemu-devel] [PATCH 0/2 v2][UPDATED] Open disk images with O_DIRECT

2007-12-17 Thread Laurent Vivier
These patches allow to open file using O_DIRECT and bypass the host I/O cache. The v2 is a new version including comments from Anthony Liguori ("directio" has been renamed "cache"), from Balazs Attila-Mihaly (for Win32 support, not tested) and Samuel Thibault (for the generic function qemu_mema

Re: [Qemu-devel] qemu vl.c

2007-12-17 Thread Avi Kivity
Paul Brook wrote: On Sunday 16 December 2007, Anders wrote: Paul Brook wrote: Redundant timer rearm optimisation by Anders Melchiorsen. I think this is incorrect. When a timer is modified, we need to rearm the host timer immediately. We can not wait for the old timer

[Qemu-devel] qemu readline.c

2007-12-17 Thread Thiemo Seufer
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/12/17 20:31:43 Modified files: . : readline.c Log message: Handle history additions properly, by Andreas Schwab. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/readline.c

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Laurent Vivier
Le lundi 17 décembre 2007 à 09:40 -1000, Armin a écrit : > Laurent Vivier wrote: > > Hi, > > > > if you just want to configure which bank to use with pflash, perhaps you > > can do something like: > > > > qemu -drive if=pflash,unit=0 > > > > to use the first bank, and > > > > qemu -drive if=pflash,

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Armin
Laurent Vivier wrote: Hi, if you just want to configure which bank to use with pflash, perhaps you can do something like: qemu -drive if=pflash,unit=0 to use the first bank, and qemu -drive if=pflash,unit=1 to use the second bank. Yes, that might work for the flash case but does not addre

Re: [Qemu-devel] xen / qemu convergence ?

2007-12-17 Thread Paul Brook
> I don't really understand why the vga is handled in this way in qemu > but then I'm not an expert on PC graphics hardware. Is it necessary > or desirable for the VGA RAM to take up virtual address space in this > way, or is there some other reason why VGA RAM in the ordinary vga > driver is rega

Re: [Qemu-devel] xen / qemu convergence ?

2007-12-17 Thread andrzej zaborowski
On 17/12/2007, Ian Jackson <[EMAIL PROTECTED]> wrote: > Paul Brook writes ("Re: [Qemu-devel] [PATCH] ioemu/qemu vga: save and > > restore vram buffer (revised)"): If you look closer, you'll find > > that s->vram_ptr actually points to an offset from phys_ram_base. So > > the VGA framebuffer is alre

Re: [Qemu-devel] xen / qemu convergence ?

2007-12-17 Thread Ian Jackson
Paul Brook writes ("Re: [Qemu-devel] [PATCH] ioemu/qemu vga: save and > restore vram buffer (revised)"): If you look closer, you'll find > that s->vram_ptr actually points to an offset from phys_ram_base. So > the VGA framebuffer is already saved by ram_save. Oh yes. That's not the case in the Xe

Re: [Qemu-devel] [PATCH] sparc32: fix setting counter limit to 0

2007-12-17 Thread Blue Swirl
On 12/17/07, Robert Reif <[EMAIL PROTECTED]> wrote: > Set the proper limit when set to 0. Thanks, applied.

Re: [Qemu-devel] [PATCH] sparc32: make number of per CPU timers match number of CPUs

2007-12-17 Thread Blue Swirl
On 12/17/07, Robert Reif <[EMAIL PROTECTED]> wrote: > Robert Reif wrote: > > > Only create as many per CPU timers as there are CPUs. Thanks, applied. I changed the timer setup a bit so that it doesn't break my SMP tests.

[Qemu-devel] qemu/hw slavio_timer.c

2007-12-17 Thread Blue Swirl
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl 07/12/17 18:21:57 Modified files: hw : slavio_timer.c Log message: Fix setting counter limit to 0 (Robert Reif) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cv

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Laurent Vivier
Hi, if you just want to configure which bank to use with pflash, perhaps you can do something like: qemu -drive if=pflash,unit=0 to use the first bank, and qemu -drive if=pflash,unit=1 to use the second bank. Laurent Le lundi 17 décembre 2007 à 07:29 -1000, Armin a écrit : > Johannes Schinde

[Qemu-devel] qemu/hw slavio_timer.c sun4m.c sun4m.h

2007-12-17 Thread Blue Swirl
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl 07/12/17 18:17:17 Modified files: hw : slavio_timer.c sun4m.c sun4m.h Log message: Only create as many per CPU timers as there are CPUs. (Robert Reif) CVSWeb URLs: http://cvs.savannah.gn

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Johannes Schindelin
Hi, On Mon, 17 Dec 2007, Armin wrote: > Johannes Schindelin wrote: > > > All other settings are command line switches and/or monitor settings, > > and there is no good reason why switches and jumpers should not be > > handled that way. > > Do you mean something like -sw or -jp? More like "-swi

Re: [Qemu-devel] [PPC] FPIMM macro and mtfsfi instruction

2007-12-17 Thread Jocelyn Mayer
On Mon, 2007-12-17 at 15:52 +0100, claude vittoria wrote: > Hi everybody, > > I think that I get a wrong result with mtfsfi instruction. > > I think to get a solution, see below. > Could you confirm my opinion ? Seems there have been (once again) a confusion between IBM bit notation (0 is MSB..

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Armin
Johannes Schindelin wrote: Hi, On Sun, 16 Dec 2007, Armin wrote: This may be one way to simulate switch or jumper settings one may change on a board before booting. It uses a simple text file for input. The file name is pointed to by -config on the command line. example: config file: [s

Re: [Qemu-devel] [PATCH] ioemu/qemu vga: save and restore vram buffer (revised)

2007-12-17 Thread Paul Brook
> In any case, vl.c's saving arrangements do save the buffer in > phys_ram_base - but that isn't what the guest sees in the VGA memory It doesn't matter what the guest physical mappings (if any) are. > area. The guest sees the vga memory-mapped IO registers (whose > meaning _is_ generally saved

[Qemu-devel] [PPC] FPIMM macro and mtfsfi instruction

2007-12-17 Thread claude vittoria
Hi everybody, I think that I get a wrong result with mtfsfi instruction. I think to get a solution, see below. Could you confirm my opinion ? Thanks, Claude translate.c l344:EXTRACT_HELPER(crbD, 21, 5); ... l375:EXTRACT_HELPER(FPIMM, 20, 4); <==FPIMM must be (FPIMM, 12, 4) or crbB >> 1 fo

Re: [Qemu-devel] floppy disk

2007-12-17 Thread J. Mayer
On Mon, 2007-12-17 at 03:28 +, Thiemo Seufer wrote: > Benjamin David Lunt wrote: > > Hi everyone, > > > > I only recently have started to use QEmu due to a request > > on the alt.os.development usenet group. My OS was not working > > on QEmu due to it would not recognize the (emulated) floppy

Re: [Qemu-devel] [PATCH] ioemu/qemu vga: save and restore vram buffer (revised)

2007-12-17 Thread Ian Jackson
andrzej zaborowski writes ("Re: [Qemu-devel] [PATCH] ioemu/qemu vga: save and restore vram buffer (revised)"): > On a second look there's something else I don't understand. The vram > window is in RAM in stdvga, it's inside phys_ram_base, and the entire > chunk pointed to by phys_ram_base is saved

Re: [Qemu-devel] [Patch 1/2] switch support v2

2007-12-17 Thread Johannes Schindelin
Hi, On Sun, 16 Dec 2007, Armin wrote: > This may be one way to simulate switch or jumper settings one may change > on a board before booting. It uses a simple text file for input. The > file name is pointed to by -config on the command line. > > example: > config file: > [switches] > 7:on > [

RE: [Qemu-devel] New Qemu Crash found with evidence of memorycorruption

2007-12-17 Thread Alexey Eremenko
-Original Message- From: [EMAIL PROTECTED] on behalf of Andreas Schwab Sent: Sun 12/16/2007 9:24 AM To: qemu-devel@nongnu.org Cc: Yaniv Kaul Subject: Re: [Qemu-devel] New Qemu Crash found with evidence of memorycorruption Please try this: --- readline.c 09 Dez 2007 19:27:48 +0100