[Qemu-devel] Re: [PATCH 5/9] Move qemu_gettimeofday() to OS specific files

2010-10-16 Thread Blue Swirl
On Sat, Oct 16, 2010 at 4:04 PM, wrote: > From: Jes Sorensen > > In addition add sysemu.h includes to file requiring a prototype for > ffs() There are probably a lot more files which would need that: /src/qemu/hw/sd.c: In function 'sd_normal_command': /src/qemu/hw/sd.c:738:13: error: implicit d

[Qemu-devel] Re: [PATCH 8/9] Consolidate oom_check() functions

2010-10-16 Thread Blue Swirl
On Sat, Oct 16, 2010 at 4:04 PM, wrote: > From: Jes Sorensen > > This consolidates the duplicated oom_check() functions, as well as > splitting them into OS dependant versions to avoid the #ifdef > grossness that was present in the old osdep.c version. This would break user emulators: LINK i

[Qemu-devel] [PATCH] Silence compiler warning in json test case

2010-10-16 Thread Jan Kiszka
Am 16.10.2010 18:28, Blue Swirl wrote: > On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini wrote: >> On 10/15/2010 07:41 PM, Blue Swirl wrote: >>> >>> Which functions are optimized away and which aren't? >> >> It's builtins only that are optimized away or otherwise inlined (printf, >> sprintf, etc.)

Re: [Qemu-devel] [Bug 661696] Re: Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Blue Swirl
On Sat, Oct 16, 2010 at 3:24 PM, Paolo Bonzini wrote: > linux-user testcase: > > extern void *x; > > int main() > { >        int a; >        asm volatile ("x: fldz\n\ >             push %%edx\n\ >             .byte 0xd9,0x74,0x24,0xf4\n\ >             pop %%edx\n" : "=d" (a) : : "memory"); >      

Re: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-16 Thread Blue Swirl
On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini wrote: > On 10/15/2010 07:41 PM, Blue Swirl wrote: >> >> Which functions are optimized away and which aren't? > > It's builtins only that are optimized away or otherwise inlined (printf, > sprintf, etc.).  Other calls stay, together with side effects

Re: [Qemu-devel] Re: QEMU host support

2010-10-16 Thread Jes Sorensen
On 10/16/10 11:44, Andreas Färber wrote: > Am 16.10.2010 um 02:37 schrieb Paolo Bonzini: > >> On 10/15/2010 06:51 PM, Jes Sorensen wrote: >>> Looking through some code in qemu-char.c I was wondering if we support >>> any other QEMU host target than Win32 which isn't covered by these >>> defines: >

[Qemu-devel] [PATCH 6/9] Do not redefine reserved key-words TRUE/FALSE

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen TRUE/FALSE are generally reserved keywords and shouldn't be defined in a driver like this. Rename the macros to SDP_TRUE and SDP_FALSE respectively. Signed-off-by: Jes Sorensen --- hw/bt-sdp.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) d

[Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen This consolidates the duplicated oom_check() functions, as well as splitting them into OS dependant versions to avoid the #ifdef grossness that was present in the old osdep.c version. Signed-off-by: Jes Sorensen --- oslib-posix.c |8 +++- oslib-win32.c |6 +++---

[Qemu-devel] [PATCH 9/9] Remove unncessary includes

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen No need to include stdlib.h for BSD as it is included by qemu-common.h, windows.h is handled by sysemu.h and osdep.c no longer needs malloc.h Signed-off-by: Jes Sorensen --- osdep.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/osdep.c b/osd

[Qemu-devel] [PATCH 3/9] qemu_pipe() is used only by POSIX code, so move to oslib-posix.c

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen Signed-off-by: Jes Sorensen --- osdep.c | 22 -- oslib-posix.c | 22 ++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/osdep.c b/osdep.c index 902fce9..926c8ad 100644 --- a/osdep.c +++ b/osdep.c @@ -235,28 +2

[Qemu-devel] [PATCH 7/9] Separate qemu_pidfile() into OS specific versions

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen Signed-off-by: Jes Sorensen --- os-posix.c | 21 + os-win32.c | 24 osdep.c| 38 -- 3 files changed, 45 insertions(+), 38 deletions(-) diff --git a/os-posix.c b/os-posix.c index 612b64

[Qemu-devel] [PATCH 5/9] Move qemu_gettimeofday() to OS specific files

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen In addition add sysemu.h includes to file requiring a prototype for ffs() Signed-off-by: Jes Sorensen --- hw/bt-sdp.c|1 + osdep.c| 31 --- osdep.h| 15 --- oslib-win32.c | 27

[Qemu-devel] [PATCH 4/9] We only support eventfd under POSIX, move qemu_eventfd() to os-posix.c

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen Signed-off-by: Jes Sorensen --- os-posix.c | 32 osdep.c| 34 -- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/os-posix.c b/os-posix.c index 6321e99..612b641 100644 --- a/os-posix.c ++

[Qemu-devel] [PATCH 1/9] Move QEMU OS dependant library functions to OS specific files

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen This moves library functions used by both QEMU and the QEMU tools, such as qemu-img, qemu-nbd etc. from osdep.c to oslib-{posix,win32}.c In addition it introduces oslib-obj.y to the Makefile set to be included by the various targets, instead of relying on these library functio

[Qemu-devel] [PATCH v2 0/9] Re-factor osdep code + macro and brace fixes

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen Hi, Here is another set of patches which tries to split up osdep.c further into posix and win32 versions. It introduces oslib-{posix,win32}.c files which are used for functions that are OS specific core library functionality, like gettimeofday(), and which is used by both QEMU

[Qemu-devel] [PATCH 2/9] Move osdep socket code to oslib-{posix, win32}.c

2010-10-16 Thread Jes . Sorensen
From: Jes Sorensen Signed-off-by: Jes Sorensen --- osdep.c | 38 -- oslib-posix.c | 15 +++ oslib-win32.c | 21 + 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/osdep.c b/osdep.c index 581768a..902

[Qemu-devel] [Bug 661696] Re: Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Paolo Bonzini
linux-user testcase: extern void *x; int main() { int a; asm volatile ("x: fldz\n\ push %%edx\n\ .byte 0xd9,0x74,0x24,0xf4\n\ pop %%edx\n" : "=d" (a) : : "memory"); printf ("%x %x\n", a, &x); } yakj:~ pbonzini$ ./a.out 80483d9 80483

[Qemu-devel] Re: [PATCH 5/9] Move qemu_gettimeofday() to OS specific files

2010-10-16 Thread Jes Sorensen
On 10/15/10 18:39, Paolo Bonzini wrote: > On 10/15/2010 04:05 PM, jes.soren...@redhat.com wrote: >> +typedef struct timeval qemu_timeval; >> +#define qemu_gettimeofday(tp) gettimeofday(tp, NULL); > > Argh, trailing semicolon. Please remove it or use an inline function. Good point, it is present

[Qemu-devel] Re: QEMU host support

2010-10-16 Thread Jes Sorensen
On 10/16/10 02:37, Paolo Bonzini wrote: > On 10/15/2010 06:51 PM, Jes Sorensen wrote: >> Hi, >> >> Looking through some code in qemu-char.c I was wondering if we support >> any other QEMU host target than Win32 which isn't covered by these >> defines: >> >> #if defined(__linux__) || defined(__sun__

[Qemu-devel] [Bug 661696] Re: Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Chalkerx
** Attachment added: "36.png" https://bugs.launchpad.net/qemu/+bug/661696/+attachment/1696341/+files/36.png ** Tags added: fpu windows -- Ollydbg under Windows in qemu does not work as it does under native Windows. https://bugs.launchpad.net/bugs/661696 You received this bug notification bec

[Qemu-devel] [Bug 661696] Re: Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Chalkerx
** Attachment added: "The test file." https://bugs.launchpad.net/bugs/661696/+attachment/1696332/+files/cmd_exec_notepad.shikata_ga_nai.exe -- Ollydbg under Windows in qemu does not work as it does under native Windows. https://bugs.launchpad.net/bugs/661696 You received this bug notificatio

[Qemu-devel] [Bug 661696] Re: Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Chalkerx
http://imagebin.ca/view/zue0YNZ.html - This is VMware screenshot just before executing that command. Looks like something is wrong with EDX register in OllyDbg under QEMU. That register was popped as a result of FSTENV command. -- Ollydbg under Windows in qemu does not work as it does under nati

[Qemu-devel] [Bug 661696] [NEW] Ollydbg under Windows in qemu does not work as it does under native Windows.

2010-10-16 Thread Chalkerx
Public bug reported: Steps to reproduce: 1) Install Windows (tried XP and 7) in qemu (tried qemu without kvm and qemu-kvm). 2) Get OllyDbg ( http://ollydbg.de/odbg200.zip ). 3) Use some Metasploit-encoded file, example included. It is not a virus! File was generated with Metasploit, command (

Re: [Qemu-devel] Re: QEMU host support

2010-10-16 Thread Andreas Färber
Am 16.10.2010 um 02:37 schrieb Paolo Bonzini: On 10/15/2010 06:51 PM, Jes Sorensen wrote: Looking through some code in qemu-char.c I was wondering if we support any other QEMU host target than Win32 which isn't covered by these defines: #if defined(__linux__) || defined(__sun__) || defined

Re: [Qemu-devel] QEMU host support

2010-10-16 Thread Andreas Färber
Am 16.10.2010 um 09:46 schrieb Stefan Hajnoczi: On Fri, Oct 15, 2010 at 5:51 PM, Jes Sorensen wrote: Looking through some code in qemu-char.c I was wondering if we support any other QEMU host target than Win32 which isn't covered by these defines: #if defined(__linux__) || defined(__sun_

[Qemu-devel] Re: QEMU host support

2010-10-16 Thread Paolo Bonzini
On 10/15/2010 06:51 PM, Jes Sorensen wrote: Hi, Looking through some code in qemu-char.c I was wondering if we support any other QEMU host target than Win32 which isn't covered by these defines: #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) ||

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-16 Thread Paolo Bonzini
On 10/15/2010 07:41 PM, Blue Swirl wrote: Which functions are optimized away and which aren't? It's builtins only that are optimized away or otherwise inlined (printf, sprintf, etc.). Other calls stay, together with side effects and clock cycles. Paolo

Re: [Qemu-devel] [PATCH v2 0/7] qed: Add QEMU Enhanced Disk format

2010-10-16 Thread Stefan Hajnoczi
Thanks for the review comments and discussions. I will send v3 when I finish making the changes from your comments. Stefan

Re: [Qemu-devel] QEMU host support

2010-10-16 Thread Stefan Hajnoczi
On Fri, Oct 15, 2010 at 5:51 PM, Jes Sorensen wrote: > Looking through some code in qemu-char.c I was wondering if we support > any other QEMU host target than Win32 which isn't covered by these defines: > > #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ >    || defined(__Net