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 writes: > >> On 09/20/2012 04:14 PM, Markus Armbruster wrote: >>> Orit Wasserman writes: >>> 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 >>>

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

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 a

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, Ok, so your using host redirection here, see the device usb-hos

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 wrote: @@ -1837,6 +1838,10 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async) } q->qh = qh; +q->transact_ctr = get_field(q->qh.epcap, QH_EPCAP_MULT); +

[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 95df51a4a02a853af88

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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 /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil The old code leaks variable 'peer'. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- qemu-sockets.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 361d890..037775b 100644 --- a/qemu-sockets.c +++ b/qe

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

2012-09-23 Thread Stefan Hajnoczi
From: Paolo Bonzini ptimer_head is an invariant pointer to clock->active_timers. Remove it, and just reference clock->active_timers directly. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- qemu-timer.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --gi

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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 clarifies the nature of the analyser

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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 Signed-off-by: Stefan Hajno

[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 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 Reviewed-by: Peter Maydell Signed-off-by: Stefan

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil Report from smatch: hw/ioh3420.c:128 ioh3420_initfn(35) info: ignoring unreachable code. Signed-off-by: Stefan Weil Reviewed-by: Juan Quintela Signed-off-by: Stefan Hajnoczi --- hw/ioh3420.c |1 - 1 file changed, 1 deletion(-) diff --git a/hw/ioh3420.c b/hw/ioh3420.c i

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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 statements in the

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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__. This works becau

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

2012-09-23 Thread Stefan Hajnoczi
From: Stefan Weil 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 Signed-off-by: Stefan Hajnoczi --- hw/cadence_uart.c |2 +- 1 file changed

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

2012-09-23 Thread Stefan Hajnoczi
From: Laszlo Ersek Signed-off-by: Laszlo Ersek Reviewed-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- console.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/console.c b/console.c index a8bcc42..3f3d254 100644 --- a/console.c +++ b/console.c @@ -938,

[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 The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira Signed-off-by: Don Slutz Signed-off-by: Stefan Hajnoczi --- target-i386/cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

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

2012-09-23 Thread Stefan Hajnoczi
From: Alon Levy Signed-off-by: Alon Levy Signed-off-by: Stefan Hajnoczi --- scripts/tracetool/backend/dtrace.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py index 9cab75c..6be7047 100644 --- a/

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

2012-09-23 Thread Stefan Hajnoczi
From: Hitoshi Mitake 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() can check that qemu i

[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" refactor address resolution code to fix nonblocking connect remove getnameinfo call Signed-off-by: Michael S. Tsirkin Signed-off-by: Amos Kong Signed-off-by: Orit Wasserman --- qemu-sockets.c | 148 1 files

[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 --- migration-tcp.c |2 +- nbd.c |2 +- qemu-char.c |2 +- qemu-sockets.c | 31 ++

[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 di

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

2012-09-23 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- 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 *s) { int ret

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 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 them. Newer ve

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 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 currently test

Re: [Qemu-devel] directory hierarchy

2012-09-23 Thread Blue Swirl
On Sun, Sep 23, 2012 at 8:25 AM, Avi Kivity 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. >> > >> >

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 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 them. N

[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 wrote: >> On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil 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

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 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 them. Newer ve

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

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, > > > > spicec is deprecated you really should be using remote-viewer instead. > > That > > will give you an option to select devices. > The author of spice-gt

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, > > > > > > spicec is deprecated you really should be using remote-viewer instead. > > > That >

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 > 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 new "nvram" machine

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 wrote: > > > > > > On 22.09.2012, at 15:31, Blue Swirl wrote: > > > >> On Fri, Sep 21, 2012 at 3:08 AM, David Gibson > >> wrote: > >>> Below is a patch which implements the (PAPR mandate

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

2012-09-23 Thread Dunrong Huang
2012/9/24 xuanmao_001 : > 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 get_tmp_filename(ch

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).

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

2012-09-23 Thread Gerd Hoffmann
Hi, >> >> Missing braces, please use checkpatch.pl. >> > > Oops, Gerd since this is already in your tree, can you fix this, or do you > want a new fixed version ? I've already fixed it. You can wire checkpatch.pl into the git commit hook to avoid those slip through unnoticed. cheers, Gerd

[Qemu-devel] [Bug 1055090] [NEW] esp error: NetBSD/sparc on qemu-system-sparc

2012-09-23 Thread Ryo ONODERA
Public bug reported: On qemu-1.2.0's qemu-system-sparc, NetBSD/sparc (32bit) 5.1.2 and 6.0_RC2 generates the following NetBSD's errors. esp0: !TC on DATA XFER [intr 18, stat 82, step 4] prevphase 2, resid 0 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0 On qemu-0.15.1's q

[Qemu-devel] [Bug 1054831] [NEW] qemu-user-static for sparc32plus : bash: fork: Invalid argument

2012-09-23 Thread Erik de Castro Lopo
Public bug reported: On Debian x86-64 host system I setup a sparc chroot using: host $ mkdir sparc host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static

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

2012-09-23 Thread xuanmao_001
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. xuanmao_001 From: Dunrong Huang Date: 2012-09-06 18:00 To: xuanmao_001 CC: qemu-discuss; Jakob Bohm Subject: Re:

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-23 Thread Wen Congyang
At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: > fd_write_vmcore() will indefinitely spin for a non-blocking > file-descriptor that would block. However, if the fd is non-blocking, > how does it make sense to spin? > > Change this behavior to return an error instead. > > Note that this can only h

Re: [Qemu-devel] [RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows

2012-09-23 Thread Wen Congyang
At 09/21/2012 07:20 PM, Vasilis Liaskovitis Wrote: > Initialize the 32-bit and 64-bit pci starting offsets from values passed in by > the qemu paravirt interface QEMU_CFG_PCI_WINDOW. Qemu calculates the starting > offsets based on initial memory and hotplug-able dimms. This patch can't be applied

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-23 Thread liu ping fan
On Wed, Sep 19, 2012 at 5:50 PM, Avi Kivity wrote: > On 09/19/2012 12:34 PM, Jan Kiszka wrote: >> >> What about the following: >> >> What we really need to support in practice is MMIO access triggers RAM >> access of device model. Scenarios where a device access triggers another >> MMIO access cou

Re: [Qemu-devel] [RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries

2012-09-23 Thread Wen Congyang
At 09/21/2012 07:17 PM, Vasilis Liaskovitis Wrote: > pcimem_start and pcimem64_start are adjusted from srat entries. For this > reason, > paravirt info (NUMA SRAT entries and number of cpus) need to be read before > pci_setup. > Imho, this is an ugly code change since SRAT bios tables and number