[Qemu-devel] [PATCH] Serial: DOS Plus regression

2010-02-28 Thread Roy Tam
The commit in r1049 (serial interrupt fix (Hampa Hug)) prevents booting Digital Research DOSPlus. Following patch partially reverts that commit and makes DOSPlus booting in QEMU again. Sign-off-by: Roy Tam roy...@gmail.com -- diff --git a/hw/serial.c b/hw/serial.c index df67383..cf23aad 100644

Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset

2010-02-28 Thread Stefan Hajnoczi
On Wed, Feb 24, 2010 at 7:10 PM, Anthony Liguori aligu...@us.ibm.com wrote: This patch addresses this issue by using madvise() during reset.  It only resets RAM areas which means it has to be done in the machine.  I've only done this for the x86 target because I'm fairly confident that this is

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 01:59:27AM +, Paul Brook wrote: I'm pretty sure a guest can cause those to change and I'm not 100% sure, but I think it's a potential source of exploits if you assume a mapping. In the very least, a guest can trick vhost into writing to ram that it

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Paul Brook
There certainly exist machines that can change physical RAM mapping. I am talking about mapping between phy RAM offset and qemu virt address. When can it change without RAM in question going away? RAM offset or guest physical address? The two are very different. Some machines have chip

Re: [Qemu-devel] [Bug] qemu-system-ppc: invalid/unsupported opcode during debug session

2010-02-28 Thread Aurelien Jarno
On Tue, Dec 29, 2009 at 04:09:17PM +0100, Stefan Weil wrote: Test environment: * ppc-softmmu/qemu-system-ppc running on x86_64 host * emulated ppc is running debian lenny While debugging on the emulated ppc (each time when a shared library is loaded after r command?), qemu-system-ppc

Re: [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat

2010-02-28 Thread Aurelien Jarno
On Mon, Jan 18, 2010 at 12:15:01PM +0100, Jan Kiszka wrote: Gerd Hoffmann wrote: On 01/18/10 11:21, Jan Kiszka wrote: Gerd Hoffmann wrote: On 01/15/10 21:07, Jan Kiszka wrote: The missing '@' broke 'udp::port@:port' parsing. if (sscanf(p, %64[^:]:%32[^@,]%n, host, port,pos)

Re: [Qemu-devel] [Bug] qemu-system-ppc: invalid/unsupported opcode during debug session

2010-02-28 Thread Paul Brook
invalid/unsupported opcode: 00 - 00 - 00 () 4800fa44 1 I have fixed that in HEAD by stopping the translation just after a trap, as the instructions might never be executed. It is not a full fix, as the OS can actually use any instruction that always generate a trap (even a memory

Re: [Qemu-devel] [PATCH 2/7] Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid.

2010-02-28 Thread Paul Brook
/* All direct uses of g2h and h2g need to go away for usermode softmmu. */ #define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE)) + +#if HOST_LONG_BITS == TARGET_VIRT_ADDR_SPACE_BITS Shouldn't this be = ? 1ul T_V_A_S_B is undefined for 64-bit guests on 32-bit hosts. +#define

[Qemu-devel] [PATCH] Fix curses return key when using -k

2010-02-28 Thread Samuel Thibault
Hello, There is a small incoherency in curses_keys.h, which makes it fail to emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157 into \n, but name2keysym binds \r with Return, not \n. The patch below fixes that. Samuel diff --git a/curses_keys.h b/curses_keys.h index

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 12:45:07PM +, Paul Brook wrote: There certainly exist machines that can change physical RAM mapping. I am talking about mapping between phy RAM offset and qemu virt address. When can it change without RAM in question going away? RAM offset or guest

[Qemu-devel] spelling typo (paramters) in audio/alsaaudio.c

2010-02-28 Thread Vagrant Cascadian
here's a trivial patch to fix the spelling of parameters: diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 7698d10..6a9b87a 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -665,7 +665,7 @@ static int alsa_open (int in, struct alsa_params_req *req, (obt-fmt != req-fmt ||

Re: [Qemu-devel] [Bug] qemu-system-ppc: invalid/unsupported opcode during debug session

2010-02-28 Thread Aurelien Jarno
On Sun, Feb 28, 2010 at 02:02:33PM +, Paul Brook wrote: invalid/unsupported opcode: 00 - 00 - 00 () 4800fa44 1 I have fixed that in HEAD by stopping the translation just after a trap, as the instructions might never be executed. It is not a full fix, as the OS can

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Paul Brook
So guest can cause vhost to write to a wrong place in RAM, but it can just pass a wrong address directly. That's not the point. Obviously any DMA capable device can be used to compromise a system. However if a device writes to address B after being told to write to address A, then you have

Re: [Qemu-devel] [Bug] qemu-system-ppc: invalid/unsupported opcode during debug session

2010-02-28 Thread Jamie Lokier
Aurelien Jarno wrote: It is not a full fix, as the OS can actually use any instruction that always generate a trap (even a memory access) as an instruction barrier to make sure the following instructions are never executed. This actually affects all targets, but is unlikely to happen. I'm

Re: [Qemu-devel] [Bug] qemu-system-ppc: invalid/unsupported opcode during debug session

2010-02-28 Thread Aurelien Jarno
On Sun, Feb 28, 2010 at 03:25:42PM +, Jamie Lokier wrote: Aurelien Jarno wrote: It is not a full fix, as the OS can actually use any instruction that always generate a trap (even a memory access) as an instruction barrier to make sure the following instructions are never executed. This

Re: [Qemu-devel] spelling typo (paramters) in audio/alsaaudio.c

2010-02-28 Thread malc
On Fri, 26 Feb 2010, Vagrant Cascadian wrote: here's a trivial patch to fix the spelling of parameters: Thanks, applied with cosmetic fixes in the commit message/subject department. -- mailto:av1...@comtv.ru

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 03:23:06PM +, Paul Brook wrote: So guest can cause vhost to write to a wrong place in RAM, but it can just pass a wrong address directly. That's not the point. Obviously any DMA capable device can be used to compromise a system. However if a device writes to

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Anthony Liguori
On 02/27/2010 01:38 PM, Michael S. Tsirkin wrote: On Fri, Feb 26, 2010 at 09:18:03AM -0600, Anthony Liguori wrote: On 02/26/2010 08:49 AM, Michael S. Tsirkin wrote: KVM code needs all kind of work-arounds for KVM specific issues. It also assumes that KVM is registered at startup, so

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Anthony Liguori
On 02/27/2010 01:44 PM, Michael S. Tsirkin wrote: and it doesn't support all of the features of userspace virtio. Since it's in upstream Linux without supporting all of the virtio-net features, it's something we're going to have to deal with for a long time. Speaking of vlan filtering

Re: [Qemu-devel] [PATCH 0/6] target-alpha: fpu qualifiers, round 2

2010-02-28 Thread Aurelien Jarno
On Wed, Feb 24, 2010 at 12:24:55PM +0100, Richard Henderson wrote: On 02/23/2010 02:58 PM, Aurelien Jarno wrote: I have totally rewritten the patch to be more along the line that Laurent was suggesting, in that the rounding mode and other qualifiers are totally parsed within the translator. I

[Qemu-devel] Re: [PATCH] Fix curses return key when using -k

2010-02-28 Thread Samuel Thibault
Samuel Thibault, le Sun 28 Feb 2010 15:35:19 +0100, a écrit : There is a small incoherency in curses_keys.h, which makes it fail to emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157 into \n, but name2keysym binds \r with Return, not \n. The patch below fixes that.

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 10:08:26AM -0600, Anthony Liguori wrote: On 02/27/2010 01:44 PM, Michael S. Tsirkin wrote: and it doesn't support all of the features of userspace virtio. Since it's in upstream Linux without supporting all of the virtio-net features, it's something we're going to

[Qemu-devel] [PATCH] (curses) Use more descriptive values

2010-02-28 Thread Samuel Thibault
Hello, curses_keys.h is using obscure constant values while the curses.h header provides fine defines, let's use the latter. To be applied on top of my previous patch. Samuel Signed-off-by: Samuel Thibault samuel.thiba...@ens-lyon.org diff --git a/curses_keys.h b/curses_keys.h index

Re: [Qemu-devel] [PATCH] alpha-linux-user: Implement signals.

2010-02-28 Thread Aurelien Jarno
On Wed, Feb 10, 2010 at 09:35:12AM -0800, Richard Henderson wrote: On 02/10/2010 04:04 AM, Riku Voipio wrote: On Tue, Feb 09, 2010 at 10:46:32AM -0800, Richard Henderson wrote: Ping? The linux-user side of the patch seems fine, but the target-alpha code doesn't apply. Either something has

Re: [Qemu-devel] [FOR 0.12 RESEND PATCH] fdc: fix drive property handling.

2010-02-28 Thread Aurelien Jarno
On Wed, Jan 06, 2010 at 03:23:10PM +0100, Gerd Hoffmann wrote: Fix the floppy controller init wrappers to set the drive properties only in case the DriveInfo pointers passed in are non NULL. This allows to set the properties using -global. This patch looks good except for minor coding style

Re: [Qemu-devel] Use of LONG_LONG_MAX breaks build on OSX ?

2010-02-28 Thread Aurelien Jarno
On Fri, Jan 08, 2010 at 12:20:54AM +0100, Emmanuel Kasper wrote: Hello Qemu does not build on my platform ( OSX / 10.5 / PowerPC ) because of the use of LONG_LONG_MAX in raw-posix.c Replacing LONG_LONG_MAX with LLONG_MAX fixes the build and is more standard IMHO ( LONG_LONG_MAX is GNU libc,

Re: [Qemu-devel] [PATCH 1/1] target-i386: fix crash on x86 32bit linux host with hw breakpoint exceptions

2010-02-28 Thread Aurelien Jarno
On Tue, Jan 26, 2010 at 04:29:50PM -0600, Jason Wessel wrote: If you make use of hw breakpoints on a 32bit x86 linux host, qemu will segmentation fault when processing the exception. The problem is that the value of env is stored in $ebp in the op_helper raise_exception() function, and it

Re: [Qemu-devel] [PATCH 1/4] target-arm: neon - fix VRADDHN/VRSUBHN vs VADDHN/VSUBHN

2010-02-28 Thread Aurelien Jarno
On Fri, Feb 05, 2010 at 03:52:28PM +, Riku Voipio wrote: From: Riku Voipio riku.voi...@nokia.com The rounding/truncating options were inverted. truncating was done when rounding was meant and vice verse. Thanks, applied. Signed-off-by: Riku Voipio riku.voi...@nokia.com ---

Re: [Qemu-devel] [PATCH 2/4] target-arm: neon vshll instruction fix

2010-02-28 Thread Aurelien Jarno
On Fri, Feb 05, 2010 at 03:52:29PM +, Riku Voipio wrote: From: Juha Riihimäki juha.riihim...@nokia.com implementation only widened the 32bit source vector elements into a 64bit destination vector but forgot to perform the actual shifting operation. Signed-off-by: Juha Riihimäki

Re: [Qemu-devel] [PATCH] * Fixed problem with IT AL.

2010-02-28 Thread Aurelien Jarno
The patch looks ok. Can you please resend it with a Signed-of-by: line, and maybe a better subject mentioning ARM? On Tue, Feb 09, 2010 at 04:43:47PM +0100, Johan Bengtsson wrote: --- target-arm/translate.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [Qemu-devel] [RFC] Documentation: Create qemu-doc.html with makeinfo instead of html2texi

2010-02-28 Thread Aurelien Jarno
On Fri, Feb 12, 2010 at 11:43:28AM +0100, Stefan Weil wrote: Hello, today, html documentation is created using texi2html. makeinfo can also create html output which looks different. I think it looks better, but try it yourself: texi2html (old):

Re: [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel

2010-02-28 Thread Kevin O'Connor
On Sun, Feb 21, 2010 at 04:18:38PM -0700, Brandon Bennett wrote: On Sat, Feb 20, 2010 at 9:05 PM, Kevin O'Connor ke...@koconnor.net wrote: Should a kernel fail during boot, I'd suspect it doesn't like one of the apm/pcibios callbacks, or it doesn't like one of the smbios/mptable/acpi

Re: [Qemu-devel] SeaBIOS error with Nextstep bootloader

2010-02-28 Thread Kevin O'Connor
that can be freely downloaded? It would help if you can extract some SeaBIOS debugging info. I've uploaded a SeaBIOS image with the debug level set to 8 and serial debugging enabled. It is at: http://linuxtogo.org/~kevin/SeaBIOS/test/bios.bin-0.5.1-debug-20100228 Can you use this image with qemu

[Qemu-devel] binfmt_misc fails to work on sh4

2010-02-28 Thread Raúl Porcel
Hello everyone, I've tried qemu suing binfmt_misc for sh4, but doesn't work fine. It spits some really weird errors. Here are the steps to reproduce: ~ # wget http://mirror.switch.ch/ftp/mirror/gentoo/releases/sh/autobuilds/20090404/stage3-sh4-20090404.tar.bz2 ~ # mkdir chroot ~ # tar xjfp

[Qemu-devel] Re: [PATCHv2 03/12] notifier: event notifier implementation

2010-02-28 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 01:22:04PM -0600, Anthony Liguori wrote: On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a

[Qemu-devel] [PATCH] Fix curses interaction with keymaps

2010-02-28 Thread Samuel Thibault
Hello, The combination of keymap support (-k option) and curses is currently very broken. The patch below fixes it by first extending keymap support to interpret the shift, ctrl, altgr and addupper keywords in keymaps, and to fix curses into properly using keymaps. Samuel Signed-off-by: Samuel

[Qemu-devel] Re: [PATCHv2 08/12] virtio-pci: fill in notifier support

2010-02-28 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 01:30:40PM -0600, Anthony Liguori wrote: On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: Support host/guest notifiers in virtio-pci. The last one only with kvm, that's okay because vhost relies on kvm anyway. Note on kvm usage: kvm ioeventfd API is implemented on

[Qemu-devel] Re: [PATCH] Fix curses interaction with keymaps

2010-02-28 Thread Samuel Thibault
Samuel Thibault, le Sun 28 Feb 2010 21:03:00 +0100, a écrit : The combination of keymap support (-k option) and curses is currently very broken. The patch below fixes it by first extending keymap support to interpret the shift, ctrl, altgr and addupper keywords in keymaps, and to fix curses

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Anthony Liguori
On 02/28/2010 11:19 AM, Michael S. Tsirkin wrote: Both have security implications so I think it's important that they be addressed. Otherwise, I'm pretty happy with how things are. Care suggesting some solutions? The obvious thing to do would be to use the memory notifier in

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 02:57:56PM -0600, Anthony Liguori wrote: On 02/28/2010 11:19 AM, Michael S. Tsirkin wrote: Both have security implications so I think it's important that they be addressed. Otherwise, I'm pretty happy with how things are. Care suggesting some solutions?

Re: [Qemu-devel] qemu-ppc can't run static uClibc binaries.

2010-02-28 Thread Aurelien Jarno
On Tue, Feb 16, 2010 at 08:21:45AM +, Stuart Brady wrote: On Mon, Feb 15, 2010 at 12:19:24PM +0100, Alexander Graf wrote: So what you really want is something like #ifdef CONFIG_LINUX_USER /* exec return value is always 0 */ env-gpr[3] = 0; #endif just after the #endif in

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Anthony Liguori
On 02/28/2010 03:01 PM, Michael S. Tsirkin wrote: On Sun, Feb 28, 2010 at 02:57:56PM -0600, Anthony Liguori wrote: On 02/28/2010 11:19 AM, Michael S. Tsirkin wrote: Both have security implications so I think it's important that they be addressed. Otherwise, I'm pretty happy with

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-28 Thread Paul Brook
I'm sympathetic to your arguments though. As qemu is today, the above is definitely the right thing to do. But ram is always ram and ram always has a fixed (albeit non-linear) mapping within a guest. I think this assumption is unsafe. There are machines where RAM mappings can change. It's

Re: [Qemu-devel] [PATCH 0/6] Multi-level page tables and userland mapping fixes.

2010-02-28 Thread Paul Brook
Which brings us to the problem of exec.c and the address spaces therein. First, there was the fact that TARGET_PHYS_ADDR_SPACE_BITS was constrained to be no larger than 32 (with a partial hack for Alpha to extend this to 42 bits). Second, that this physical address space value was applied to

Re: [Qemu-devel] SeaBIOS error with Nextstep bootloader

2010-02-28 Thread Natalia Portillo
debugging enabled. It is at: http://linuxtogo.org/~kevin/SeaBIOS/test/bios.bin-0.5.1-debug-20100228 Can you use this image with qemu, add -serial file:mylog to qemu's command line, and forward the resulting mylog file back? Also, please include the full qemu command line that you used. Thanks

Re: [Qemu-devel] [PATCH 0/15][RFC] New PCI interfaces

2010-02-28 Thread Paul Brook
Since virtio devices can live on two busses (sysbus with Syborg or PCI), we need to introduce a set of virtio specific functions. ... Inside the VirtIODevice, there would be corresponding function pointers, and depending on whether it was a PCI device or a Syborg device, it would call