Re: [Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN

2012-05-27 Thread Paolo Bonzini
Il 27/05/2012 19:02, Andreas Färber ha scritto: > MAX_TCPOPTLEN is being defined as 32. Darwin has it as 40, causing a > warning. The value is only used to declare an array, into which currently > 4 bytes are written at most. It should therefore be acceptable to adopt > the host's definition. > >

Re: [Qemu-devel] [PATCH for-1.1] arch_init: Fix AltiVec build on Darwin/ppc

2012-05-27 Thread Paolo Bonzini
Il 27/05/2012 17:37, Andreas Färber ha scritto: > GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool, > leading to type mismatches. altivec.h recommends to #undef for C++ > compatibility, but doing so on C leads to bool remaining undefined. Reviewed-by: Paolo Bonzini Paolo

Re: [Qemu-devel] [PATCH 4/4] ISCSI: If the device we open is a SMC device, then force the use of sg. We dont have any medium changer emulation so only passthrough via real sg or scsi-generic via iscsi

2012-05-27 Thread Paolo Bonzini
Il 27/05/2012 15:12, Andreas Färber ha scritto: >> > Modified to also do the same for tapes, applied to scsi-next branch for >> > 1.2. > Paolo, it seems you haven't pushed scsi-next since then. Yeah, I have a pending push request for scsi-next, so I'm waiting till Anthony applies it before pushin

Re: [Qemu-devel] [PATCH qom-next] qom: Introduce object_property_is_{child, link}()

2012-05-27 Thread Paolo Bonzini
Il 27/05/2012 01:19, Andreas Färber ha scritto: > Avoids hardcoding partial string comparisons. > > Signed-off-by: Alexander Barabash > Signed-off-by: Andreas Färber > --- > qom/object.c | 22 -- > 1 files changed, 16 insertions(+), 6 deletions(-) > > diff --git a/qom/obj

Re: [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-27 Thread Paolo Bonzini
Il 26/05/2012 11:18, ronnie sahlberg ha scritto: > I have compiled your branch and run through some tests. > > It all looks good as long as you apply the patch to #include "hw/scsi-defs.h" Thanks, I updated the scsi-next branch. Paolo

Re: [Qemu-devel] [PATCH 1.1] es1370: Fix debug code

2012-05-27 Thread Stefan Weil
Am 28.05.2012 06:11, schrieb Peter Maydell: On 23 May 2012 22:26, Stefan Weil wrote: When DEBUG_ES1370 is defined, the compiler shows these warnings: hw/es1370.c: In function ‘es1370_update_voices’: hw/es1370.c:414: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’ Th

Re: [Qemu-devel] [PATCH qemu 5/6] implement -no-user-config command-line option (v3)

2012-05-27 Thread Paolo Bonzini
Il 27/05/2012 16:02, Andreas Färber ha scritto: > Any suggestion how to fix? Does it work to "typedef _Bool __bool" before including altivec.h (and in the same #ifdef)? Paolo

Re: [Qemu-devel] [PATCH 1.1] es1370: Fix debug code

2012-05-27 Thread Peter Maydell
On 23 May 2012 22:26, Stefan Weil wrote: > When DEBUG_ES1370 is defined, the compiler shows these warnings: > > hw/es1370.c: In function ‘es1370_update_voices’: > hw/es1370.c:414: warning: format ‘%d’ expects type ‘int’, but argument 3 has > type ‘size_t’ The unicode quotes in this commit messag

Re: [Qemu-devel] [BUG] qemu-ga: failed to fsfreeze-thaw on RHEL 5.8 Guest

2012-05-27 Thread Michael Roth
On Mon, May 28, 2012 at 08:12:12AM +0900, MATSUDA, Daiki wrote: > I researched the source of the bug. > > qemu-ga calls guest_fsfreeze_build_mount_list from > qemp_guest_fsreeze_thaw in qga/commands-posix.c. And it tries to read > /etc/mtab (= MOUNTED) to get mounted filesystems. But when they are

[Qemu-devel] [PATCH 1.1] target-xtensa: fix CCOUNT for conditional branches

2012-05-27 Thread Max Filippov
Taken conditional branches fail to update CCOUNT register because accumulated ccount_delta is reset during translation of non-taken branch. To fix it only update CCOUNT once per conditional branch instruction translation. This fixes guest linux freeze on LTP waitpid06 test. Signed-off-by: Max Fil

Re: [Qemu-devel] [BUG] qemu-ga: failed to fsfreeze-thaw on RHEL 5.8 Guest

2012-05-27 Thread MATSUDA, Daiki
I researched the source of the bug. qemu-ga calls guest_fsfreeze_build_mount_list from qemp_guest_fsreeze_thaw in qga/commands-posix.c. And it tries to read /etc/mtab (= MOUNTED) to get mounted filesystems. But when they are frozen, getmntent(fp) is not finished in the situation /etc/mtab in froze

[Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len

2012-05-27 Thread Andreas Färber
accept() expects address_len to point to the length of the sockaddr on input. Initialize it accordingly. Resolves an assertion due to EFAULT on illumos. Signed-off-by: Andreas Färber --- tests/libqtest.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/libqtest.c b

Re: [Qemu-devel] [PATCH for-1.1? v2] slirp: Avoid statements without effect on Big Endian host

2012-05-27 Thread Peter Maydell
On 27 May 2012 17:42, Andreas Färber wrote: > +# if defined(__APPLE__) > +#  undef NTOHL > +#  undef NTOHS > +#  undef HTONL > +#  undef HTONS > +#  define NTOHL(d) do { } while (0) > +#  define NTOHS(d) do { } while (0) > +#  define HTONL(d) do { } while (0) > +#  define HTONS(d) do { } while (0)

Re: [Qemu-devel] [PATCH for-1.1 v2] tcg/ppc: Handle _CALL_DARWIN being undefined on Darwin

2012-05-27 Thread malc
On Sun, 27 May 2012, Andreas F?rber wrote: > powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) > does not define _CALL_DARWIN, leading to unexpected behavior w.r.t. > register clobbering and stack frame layout. > > Since _CALL_DARWIN is a reserved identifier, define a custom > T

[Qemu-devel] [PATCH for-1.1 v2] tcg/ppc: Handle _CALL_DARWIN being undefined on Darwin

2012-05-27 Thread Andreas Färber
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) does not define _CALL_DARWIN, leading to unexpected behavior w.r.t. register clobbering and stack frame layout. Since _CALL_DARWIN is a reserved identifier, define a custom TCG_TARGET_CALL_DARWIN based on either _CALL_DARWIN or __

Re: [Qemu-devel] [PATCH for-1.1] slirp: Untangle TCPOLEN_* from TCPOPT_*

2012-05-27 Thread Andreas Färber
Am 28.04.2012 00:29, schrieb Andreas Färber: > From: Andreas Färber > > Commit b72210568ef0c0fb141a01cffb71a09c4efa0364 (slirp: clean up > conflicts with system headers) enclosed TCPOLEN_MAXSEG with an #ifdef > TCPOPT_EOL. This broke the build on illumos, which has TCPOPT_* > but not TCPOLEN_*. >

[Qemu-devel] [PATCH for-1.1?] slirp: Avoid redefining MAX_TCPOPTLEN

2012-05-27 Thread Andreas Färber
MAX_TCPOPTLEN is being defined as 32. Darwin has it as 40, causing a warning. The value is only used to declare an array, into which currently 4 bytes are written at most. It should therefore be acceptable to adopt the host's definition. Therefore only define MAX_TCPOPTLEN if not already defined.

[Qemu-devel] [PATCH for-1.1? v2] slirp: Avoid statements without effect on Big Endian host

2012-05-27 Thread Andreas Färber
Darwin has HTON*/NTOH* macros that on BE simply return the argument. This is incompatible with SLIRP's use of these macros as a statement. Special-case Darwin in the HOST_WORDS_BIGENDIAN code path to redefine these macros as no-op statement to avoid tons of compiler warnings. Also adapt the fallb

Re: [Qemu-devel] [PATCH for-1.1?] slirp: Avoid statements without effect on Big Endian host

2012-05-27 Thread Andreas Färber
Am 27.05.2012 18:32, schrieb Andreas Färber: > Darwin has HTON*/NTOH* macros that on BE simply return the argument. > This is incompatible with SLIRP's use of these macros as a statement. > > Special-case Darwin in the HOST_WORDS_BIGENDIAN code path to redefine > these macros as no-op statement to

[Qemu-devel] [PATCH for-1.1?] slirp: Avoid statements without effect on Big Endian host

2012-05-27 Thread Andreas Färber
Darwin has HTON*/NTOH* macros that on BE simply return the argument. This is incompatible with SLIRP's use of these macros as a statement. Special-case Darwin in the HOST_WORDS_BIGENDIAN code path to redefine these macros as no-op statement to avoid tons of compiler warnings. Signed-off-by: Andre

[Qemu-devel] [PATCH 1.1] exec: fix TB invalidation after breakpoint insertion/deletion

2012-05-27 Thread Max Filippov
tb_invalidate_phys_addr has to be called with the exact physical address of the breakpoint we add/remove, not just the page's base address. Otherwise we easily fail to flush the right TB. This breakage was introduced by the commit f3705d5329 "memory: make phys_page_find() return an unadjusted". T

Re: [Qemu-devel] [PATCH for-1.1] arch_init: Fix AltiVec build on Darwin/ppc

2012-05-27 Thread Andreas Färber
Am 27.05.2012 17:37, schrieb Andreas Färber: > Commit f29a56147b66845914d0a645bf9b4c5bb9a6af57 (implement > -no-user-config command-line option (v3)) introduced uses of bool > in arch_init.c. Shortly before that usage is support code for > AltiVec (conditional to __ALTIVEC__). > > GCC's altivec.h

[Qemu-devel] [PATCH for-1.1] arch_init: Fix AltiVec build on Darwin/ppc

2012-05-27 Thread Andreas Färber
Commit f29a56147b66845914d0a645bf9b4c5bb9a6af57 (implement -no-user-config command-line option (v3)) introduced uses of bool in arch_init.c. Shortly before that usage is support code for AltiVec (conditional to __ALTIVEC__). GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool, lead

Re: [Qemu-devel] [PULL 1.1 0/6] target-xtensa MMU fixes

2012-05-27 Thread Max Filippov
On Sun, May 27, 2012 at 6:54 PM, Andreas Färber wrote: > Am 27.05.2012 16:34, schrieb Max Filippov: >> Hello. >> >> This series fixes subtle bugs in the xtensa hardware pagewalking >> implementation >> and adds more MMU test cases. >> >> The following changes since commit aeb29b6459cb9496b38c820f

[Qemu-devel] [PATCH 1.1 5/6] target-xtensa: control page table lookup explicitly

2012-05-27 Thread Max Filippov
Hardware pagetable walking may not be nested. Stop guessing and pass explicit flag to the get_physical_addr_mmu function that controls page table lookup. Signed-off-by: Max Filippov --- target-xtensa/helper.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/targe

Re: [Qemu-devel] [PATCH for-1.1] virtio-blk: Fix unused variables in virtio_blk_handle_scsi()

2012-05-27 Thread Andreas Färber
Am 27.05.2012 16:41, schrieb Andreas Färber: > Commit f34e73cd69bdbdb9b1d56b288c5e14d6fff58165 (virtio-blk: report > non-zero status when failing SG_IO requests) exposed the function > to non-Linux guests. Move all Linux-only variable declarations into "hosts", obviously. Please fix when applying.

Re: [Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin

2012-05-27 Thread Andreas Färber
Am 27.05.2012 17:02, schrieb Andreas Färber: > Use _NSGetEnviron() helper to access the environment. > > Signed-off-by: Andreas Färber > Cc: Charlie Somerville > --- > Michael, can you please append this to your qemu-ga PULL? > > qga/commands-posix.c |5 + > 1 files changed, 5 insert

[Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin

2012-05-27 Thread Andreas Färber
Use _NSGetEnviron() helper to access the environment. Signed-off-by: Andreas Färber Cc: Charlie Somerville --- Michael, can you please append this to your qemu-ga PULL? qga/commands-posix.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/qga/commands-posix.c b/qg

[Qemu-devel] [PATCH 1.1 4/6] target-xtensa: update autorefill TLB entries conditionally

2012-05-27 Thread Max Filippov
This is to avoid interference of internal QEMU helpers (cpu_get_phys_page_debug, tb_invalidate_virtual_addr) with guest-visible TLB state. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |2 +- target-xtensa/helper.c| 56 +--- target-xt

Re: [Qemu-devel] [PULL 1.1 0/6] target-xtensa MMU fixes

2012-05-27 Thread Andreas Färber
Am 27.05.2012 16:34, schrieb Max Filippov: > Hello. > > This series fixes subtle bugs in the xtensa hardware pagewalking > implementation > and adds more MMU test cases. > > The following changes since commit aeb29b6459cb9496b38c820f3faff64cf2369d0d: > > audio: Always call fini on exit (2012-

[Qemu-devel] [PATCH 1.1 6/6] target-xtensa: add MMU pagewalking tests

2012-05-27 Thread Max Filippov
Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_mmu.S | 221 --- 1 files changed, 207 insertions(+), 14 deletions(-) diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S index 52d5774..5d87fbb 100644 --- a/tests/tcg/xtensa/test_mmu

[Qemu-devel] [PATCH 1.1 2/6] target-xtensa: update EXCVADDR in case of page table lookup

2012-05-27 Thread Max Filippov
According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, even if the miss is handled entirely by processor hardware. Signed-off-by: Max Filippov --- target-xtensa/helper.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/helper.c b/target-xtensa/h

[Qemu-devel] [PATCH for-1.1] virtio-blk: Fix unused variables in virtio_blk_handle_scsi()

2012-05-27 Thread Andreas Färber
Commit f34e73cd69bdbdb9b1d56b288c5e14d6fff58165 (virtio-blk: report non-zero status when failing SG_IO requests) exposed the function to non-Linux guests. Move all Linux-only variable declarations into an #ifdef in the variable declaration block. Signed-off-by: Andreas Färber Cc: Paolo Bonzini -

[Qemu-devel] [PATCH 1.1 3/6] target-xtensa: extract TLB entry setting method

2012-05-27 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/cpu.h |3 +++ target-xtensa/op_helper.c | 15 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/target-xtensa/cpu.h b/target-xtensa/cpu.h index 6d0ea7c..6c590fe 100644 --- a/target-xtensa/cpu.h +++ b/target-xt

[Qemu-devel] [PATCH 1.1 1/6] target-xtensa: flush TLB page for new MMU mapping

2012-05-27 Thread Max Filippov
Both old and new mappings need flushing because their VPN may be different in MMU case. Signed-off-by: Max Filippov --- target-xtensa/op_helper.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index 364dc19..ce61157

[Qemu-devel] [PULL 1.1 0/6] target-xtensa MMU fixes

2012-05-27 Thread Max Filippov
Hello. This series fixes subtle bugs in the xtensa hardware pagewalking implementation and adds more MMU test cases. The following changes since commit aeb29b6459cb9496b38c820f3faff64cf2369d0d: audio: Always call fini on exit (2012-05-24 19:35:27 +0400) are available in the git repository at:

Re: [Qemu-devel] [PATCH qemu 5/6] implement -no-user-config command-line option (v3)

2012-05-27 Thread Andreas Färber
Am 02.05.2012 18:07, schrieb Eduardo Habkost: > Changes v2 -> v3: > - Rebase against latest qemu.git > > Changes v1 -> v2: > - Change 'userconfig' field/variables to bool instead of int > - Coding style change > > Signed-off-by: Eduardo Habkost > --- > arch_init.c | 11 --- > q

Re: [Qemu-devel] [PATCH 4/4] ISCSI: If the device we open is a SMC device, then force the use of sg. We dont have any medium changer emulation so only passthrough via real sg or scsi-generic via iscsi

2012-05-27 Thread Andreas Färber
Am 26.05.2012 09:36, schrieb Paolo Bonzini: > Il 26/05/2012 06:56, Ronnie Sahlberg ha scritto: >> Forcing sg also makes qemu skip trying to read from the device to guess the >> image format by reading from the device (find_image_format()). >> SMC devices do not implement READ6/10/12/16 so it is n

Re: [Qemu-devel] Build fails on OS X Lion

2012-05-27 Thread Andreas Färber
Am 27.05.2012 07:58, schrieb dunrong huang: > 2012/5/27 Charlie Somerville : >> Hi qemu-devel, >> >> I tried to build the 1.1.0-rc3 on Mac OS X Lion, and I get this compile >> error: >> >> qga/commands-posix.c: In function ‘qmp_guest_shutdown’: >> qga/commands-posix.c:65: error: ‘environ’ undeclare

Re: [Qemu-devel] [PATCH v2 01/17] Openrisc: add target stubs

2012-05-27 Thread Andreas Färber
Am 27.05.2012 07:32, schrieb Jia Liu: > add openrisc target stubs. > > Signed-off-by: Jia Liu Minor nitpick: I'd recommend to stick to the typographic conventions outlined here: https://live.gnome.org/Git/CommitMessages In particular please start the sentence with a capital A. GNOME recommend a