Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect

2012-09-23 Thread Orit Wasserman
On 09/20/2012 06:16 PM, Amos Kong wrote: - Original Message - On 09/19/2012 11:31 AM, Amos Kong wrote: On 14/09/12 02:58, Orit Wasserman wrote: getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to the next one.

Re: [Qemu-devel] [PATCH] linux-user: Remove redundant null check and replace free by g_free

2012-09-23 Thread Stefan Hajnoczi
On Tue, Sep 04, 2012 at 10:14:19PM +0200, Stefan Weil wrote: Report from smatch: linux-user/syscall.c:3632 do_ioctl_dm(220) info: redundant null check on big_buf calling free() 'big_buf' was allocated by g_malloc0, therefore free was also replaced by g_free. Signed-off-by: Stefan Weil

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-23 Thread Stefan Hajnoczi
On Sat, Sep 22, 2012 at 09:13:28PM +0200, Stefan Weil wrote: Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast which is needed for MinGW: net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness

Re: [Qemu-devel] [PATCH] w32: Always use standard instead of native format strings

2012-09-23 Thread Stefan Hajnoczi
On Wed, Aug 22, 2012 at 09:42:32PM +0200, Stefan Weil wrote: GLib 2.0 include files use __printf__ for the format attribute which resolves to native format strings on w32 hosts. QEMU wants standard format strings instead of native format strings, so we simply change any declaration with

[Qemu-devel] [PATCH] hw: Disable code after return statement

2012-09-23 Thread Stefan Weil
Report from smatch: microdrive.c:212 md_common_read(34) info: ignoring unreachable code. microdrive.c:273 md_common_write(33) info: ignoring unreachable code. sd.c:343 sd_req_crc_validate(9) info: ignoring unreachable code. Signed-off-by: Stefan Weil s...@weilnetz.de --- hw/ide/microdrive.c |

[Qemu-devel] [PATCH] hw: Fix return value check for bdrv_read, bdrv_write

2012-09-23 Thread Stefan Weil
Those functions return -errno in case of an error. The old code would typically only detect EPERM (1) errors. Signed-off-by: Stefan Weil s...@weilnetz.de --- hw/nand.c| 34 ++ hw/onenand.c |2 +- hw/sd.c | 16 +--- 3 files changed, 32

Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect

2012-09-23 Thread Orit Wasserman
On 09/21/2012 11:03 AM, Markus Armbruster wrote: Orit Wasserman owass...@redhat.com writes: On 09/20/2012 04:14 PM, Markus Armbruster wrote: Orit Wasserman owass...@redhat.com writes: getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we

Re: [Qemu-devel] directory hierarchy

2012-09-23 Thread Avi Kivity
On 09/22/2012 04:15 PM, Blue Swirl wrote: This could have nice cleanup effects though and for example enable generic 'info vmtree' to discover VA-PA mappings for any target instead of current MMU table walkers. How? That's in a hardware defined format that's completely invisible to

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-23 Thread Avi Kivity
On 09/21/2012 09:20 PM, Eric Blake wrote: On 09/21/2012 12:18 PM, Eric Blake wrote: Any better ideas? Maybe s/hex/number/, as in: JSON: 'number':0x20 C code: keylist-value-number = number; that is, you are passing the value either as a keycode name, or as a number. Or even

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-23 Thread Hans de Goede
Hi, On 09/21/2012 08:46 PM, Shawn Starr wrote: On Friday, September 21, 2012 07:35:42 PM Hans de Goede wrote: Hi, On 09/21/2012 05:39 PM, Shawn Starr wrote: On Friday, September 21, 2012 02:19:08 PM Hans de Goede wrote: Hi, snip Ok, so your using host redirection here, see the device

Re: [Qemu-devel] [PATCH] ehci: Fix interrupt packet MULT handling

2012-09-23 Thread Hans de Goede
Hi, Sorry. On 09/22/2012 03:16 PM, Blue Swirl wrote: On Thu, Sep 20, 2012 at 3:38 PM, Hans de Goede hdego...@redhat.com wrote: snip @@ -1837,6 +1838,10 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async) } q-qh = qh; +q-transact_ctr = get_field(q-qh.epcap,

[Qemu-devel] [PULL 00/14] Trivial patches for 15 to 23 September 2012

2012-09-23 Thread Stefan Hajnoczi
The following changes since commit 93b6599734f81328ee3d608f57667742cafeea72: audio: Fix warning from static code analysis (2012-09-23 01:34:16 +0400) are available in the git repository at: git://github.com/stefanha/qemu.git trivial-patches for you to fetch changes up to

[Qemu-devel] [PATCH 13/14] net/socket: Fix compiler warning (regression for MinGW)

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast which is needed for MinGW: net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness

[Qemu-devel] [PATCH 03/14] qemu-sockets: Fix potential memory leak

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de The old code leaks variable 'peer'. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- qemu-sockets.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index

[Qemu-devel] [PATCH 11/14] qemu-timer: simplify qemu_run_timers

2012-09-23 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com ptimer_head is an invariant pointer to clock-active_timers. Remove it, and just reference clock-active_timers directly. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- qemu-timer.c |7 +++ 1

[Qemu-devel] [PATCH 05/14] lm4549: Fix buffer overflow

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: lm4549.c:234 lm4549_write_samples(14) error: buffer overflow 's-buffer' 1024 = 1024 There must be enough space to add two entries starting with index s-buffer_level, therefore the old check was wrong. [Peter Maydell

[Qemu-devel] [PATCH 02/14] qemu-ga: Remove unreachable code after g_error

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: qemu-ga.c:117 register_signal_handlers(11) info: ignoring unreachable code. qemu-ga.c:122 register_signal_handlers(16) info: ignoring unreachable code. g_error calls abort which terminates the program. Signed-off-by: Stefan Weil

[Qemu-devel] [PATCH 12/14] linux-user: Remove redundant null check and replace free by g_free

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: linux-user/syscall.c:3632 do_ioctl_dm(220) info: redundant null check on big_buf calling free() 'big_buf' was allocated by g_malloc0, therefore free was also replaced by g_free. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by:

[Qemu-devel] [PATCH 06/14] ioh3420: Remove unreachable code

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: hw/ioh3420.c:128 ioh3420_initfn(35) info: ignoring unreachable code. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: Juan Quintela quint...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- hw/ioh3420.c |1 - 1

[Qemu-devel] [PATCH 07/14] pflash_cfi01: Fix warning caused by unreachable code

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: hw/pflash_cfi01.c:431 pflash_write(180) info: ignoring unreachable code. Instead of removing the return statement after the switch statement, the patch replaces the return statements in the switch statement by break statements. Other switch

[Qemu-devel] [PATCH 14/14] w32: Always use standard instead of native format strings

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de GLib 2.0 include files use __printf__ for the format attribute which resolves to native format strings on w32 hosts. QEMU wants standard format strings instead of native format strings, so we simply change any declaration with __printf__ to use __gnu_printf__.

[Qemu-devel] [PATCH 04/14] cadence_uart: Fix buffer overflow

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Report from smatch: hw/cadence_uart.c:413 uart_read(13) error: buffer overflow 's-r' 18 = 18 This fixes read access to s-r[R_MAX] which is behind the limits of s-r. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@gmail.com

[Qemu-devel] [PATCH 10/14] TextConsole: saturate escape parameter in TTY_STATE_CSI

2012-09-23 Thread Stefan Hajnoczi
From: Laszlo Ersek ler...@redhat.com Signed-off-by: Laszlo Ersek ler...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- console.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/console.c b/console.c

[Qemu-devel] [PATCH 01/14] target-i386: Allow tsc-frequency to be larger then 2.147G

2012-09-23 Thread Stefan Hajnoczi
From: Don Slutz d...@cloudswitch.com The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira folive...@cloudswitch.com Signed-off-by: Don Slutz d...@cloudswitch.com Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- target-i386/cpu.c |2 +- 1 file

[Qemu-devel] [PATCH 08/14] dtrace backend: add function to reserved words

2012-09-23 Thread Stefan Hajnoczi
From: Alon Levy al...@redhat.com Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@gmail.com --- scripts/tracetool/backend/dtrace.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetool/backend/dtrace.py

[Qemu-devel] [PATCH 09/14] curses: don't initialize curses when qemu is daemonized

2012-09-23 Thread Stefan Hajnoczi
From: Hitoshi Mitake h.mit...@gmail.com Current qemu initializes curses even if -daemonize option is passed. This cause problem because shell prompt appears without calling endwin(). This patch adds new function, is_daemonized(), to OS dependent code. With this function, curses_display_init()

[Qemu-devel] [PATCH v4 0/4] nonblocking connect address handling cleanup

2012-09-23 Thread Orit Wasserman
Changes from v3: - add missing parenthesis QEMU_SOCKET_RC_INPROGRESS macro - remove block from dummy_opts - remove in_progress from external API (inet_connect_opts and inet_nonblocking_connect) - Allocate ConnectState inside inet_connect_opts, this make

[Qemu-devel] [PATCH v4 1/4] Refactor inet_connect_opts function

2012-09-23 Thread Orit Wasserman
From: Michael S. Tsirkin m...@redhat.com refactor address resolution code to fix nonblocking connect remove getnameinfo call Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com Signed-off-by: Orit Wasserman owass...@redhat.com --- qemu-sockets.c | 148

[Qemu-devel] [PATCH v4 2/4] Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect

2012-09-23 Thread Orit Wasserman
No need to add non blocking parameters to the blocking inet_connect add block parameter for inet_connect_opts instead of using QemuOpt block. Signed-off-by: Orit Wasserman owass...@redhat.com --- migration-tcp.c |2 +- nbd.c |2 +- qemu-char.c |2 +- qemu-sockets.c |

[Qemu-devel] [PATCH v4 3/4] Fix address handling in inet_nonblocking_connect

2012-09-23 Thread Orit Wasserman
getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to the next one. This is common on desktop setups that often have ipv6 configured but not actually working. To fix this make inet_connect_nonblocking retry connection with a

[Qemu-devel] [PATCH v4 4/4] Clear handler only for valid fd

2012-09-23 Thread Orit Wasserman
Signed-off-by: Orit Wasserman owass...@redhat.com --- migration.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 1edeec5..c20a2fe 100644 --- a/migration.c +++ b/migration.c @@ -240,8 +240,6 @@ static int migrate_fd_cleanup(MigrationState

Re: [Qemu-devel] [PATCH v4 0/4] nonblocking connect address handling cleanup

2012-09-23 Thread Michael S. Tsirkin
On Sun, Sep 23, 2012 at 04:49:03PM +0200, Orit Wasserman wrote: Changes from v3: - add missing parenthesis QEMU_SOCKET_RC_INPROGRESS macro - remove block from dummy_opts - remove in_progress from external API (inet_connect_opts and inet_nonblocking_connect) -

Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r

2012-09-23 Thread Blue Swirl
On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil s...@weilnetz.de wrote: Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy (they return a pointer to a static variable), therefore we don't want

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-23 Thread Blue Swirl
On Sat, Sep 22, 2012 at 11:23 PM, Erik de Castro Lopo mle+to...@mega-nerd.com wrote: Blue Swirl wrote: This is not correct. The structure needs to be converted field by field to host native format, especially endianness. I'm working in a similar syscall implementation (POSIX timers) and I'm

Re: [Qemu-devel] directory hierarchy

2012-09-23 Thread Blue Swirl
On Sun, Sep 23, 2012 at 8:25 AM, Avi Kivity a...@redhat.com wrote: On 09/22/2012 04:15 PM, Blue Swirl wrote: This could have nice cleanup effects though and for example enable generic 'info vmtree' to discover VA-PA mappings for any target instead of current MMU table walkers. How?

Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r

2012-09-23 Thread Stefan Weil
On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil s...@weilnetz.de wrote: Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy (they return a pointer to a static variable), therefore we don't want

[Qemu-devel] [PATCH] gic: avoid a warning from clang

2012-09-23 Thread Blue Swirl
Avoid this warning: CCarm-softmmu/hw/arm/../arm_gic.o /src/qemu/hw/arm/../arm_gic.c:432:17: error: implicit truncation from 'unsigned int' to bitfield changes value from 4294967040 to 0 [-Werror,-Wconstant-conversion] GIC_CLEAR_PENDING(irq + i, ALL_CPU_MASK);

Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r

2012-09-23 Thread Blue Swirl
On Sun, Sep 23, 2012 at 4:27 PM, Stefan Weil s...@weilnetz.de wrote: On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil s...@weilnetz.de wrote: Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy

Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r

2012-09-23 Thread Blue Swirl
On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil s...@weilnetz.de wrote: Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy (they return a pointer to a static variable), therefore we don't want

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-23 Thread Shawn Starr
On Sunday, September 23, 2012 12:03:28 PM Hans de Goede wrote: Hi, On 09/21/2012 08:46 PM, Shawn Starr wrote: On Friday, September 21, 2012 07:35:42 PM Hans de Goede wrote: Hi, On 09/21/2012 05:39 PM, Shawn Starr wrote: On Friday, September 21, 2012 02:19:08 PM Hans de Goede wrote:

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-23 Thread Shawn Starr
On Sunday, September 23, 2012 02:00:10 PM Shawn Starr wrote: On Sunday, September 23, 2012 12:03:28 PM Hans de Goede wrote: Hi, snip spicec is deprecated you really should be using remote-viewer instead. That will give you an option to select devices. snip this out The author of

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-23 Thread Shawn Starr
On Sunday, September 23, 2012 02:20:09 PM Shawn Starr wrote: On Sunday, September 23, 2012 02:00:10 PM Shawn Starr wrote: On Sunday, September 23, 2012 12:03:28 PM Hans de Goede wrote: Hi, snip spicec is deprecated you really should be using remote-viewer instead. That will

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-23 Thread David Gibson
On Sat, Sep 22, 2012 at 01:31:08PM +, Blue Swirl wrote: On Fri, Sep 21, 2012 at 3:08 AM, David Gibson da...@gibson.dropbear.id.au wrote: Below is a patch which implements the (PAPR mandated) NVRAM for the pseries machine. It raises a couple of generic questions. First, this adds a

Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine

2012-09-23 Thread David Gibson
On Sat, Sep 22, 2012 at 02:26:43PM +, Blue Swirl wrote: On Sat, Sep 22, 2012 at 2:16 PM, Alexander Graf ag...@suse.de wrote: On 22.09.2012, at 15:31, Blue Swirl blauwir...@gmail.com wrote: On Fri, Sep 21, 2012 at 3:08 AM, David Gibson da...@gibson.dropbear.id.au wrote: Below is

Re: [Qemu-devel] [Qemu-discuss] Qemu snapshot mode

2012-09-23 Thread Dunrong Huang
2012/9/24 xuanmao_001 xuanmao_...@163.com: Hi, all I want to change the path of temporary snapshot file. Can you gei me some ideas, or tell me which file will write the temporary snapshot file in qemu source code. thanks. Hi, You should take a quick look at block.c:get_tmp_filename(), int

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-23 Thread Wen Congyang
At 09/21/2012 07:17 PM, Vasilis Liaskovitis Wrote: Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached to a new bus called DimmBus. This bus is introduced so that we no longer depend on hotplug-capability of main system bus (the main bus does not allow hotplugging). The