Re: [Qemu-devel] [PATCH 54/66] add a header file for atomic operations

2013-10-21 Thread Paolo Bonzini
Il 20/10/2013 17:20, Peter Maydell ha scritto: CCutil/qemu-thread-posix.o util/qemu-thread-posix.c:351:13: warning: implicit declaration of function '__sync_exchange' is invalid in C99 [-Wimplicit-function-declaration] if (atomic_xchg(ev-value, EV_SET) == EV_BUSY) {

Re: [Qemu-devel] [PATCH 13/13] stubs: do not call monitor_printf()

2013-10-21 Thread Wenchao Xia
于 2013/10/18 17:52, Paolo Bonzini 写道: Il 18/10/2013 03:11, Wenchao Xia ha scritto: stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o so it would not work normal, remove it. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- stubs/pci-drive-hot-add.c |1 - 1

[Qemu-devel] [PATCH v2] net: disallow to specify multicast MAC address

2013-10-21 Thread Dmitry Krivenok
Changes to v1: 1) Resolved names clash in include/net/eth.h 2) Reused is_multicast_ether_addr() from that header for MAC check. Signed-off-by: Dmitry V. Krivenok krivenok.dmi...@gmail.com --- include/net/eth.h | 6 +++--- net/net.c | 6 ++ 2 files changed, 9 insertions(+), 3

[Qemu-devel] [PATCH v2] configure: create fsdev/ directory

2013-10-21 Thread Michael Tokarev
In some cases when building with parallelism (make -jN), build fails because the directory where output files are supposed to be does not exist. In particular, when make decides to build virtfs-proxy-helper.1 before other files in fsdev/, build will fail with the following error: perl -Ww --

Re: [Qemu-devel] [Qemu-trivial] [PATCH] misc: New spelling fixes in comments

2013-10-21 Thread Michael Tokarev
10.10.2013 22:53, Stefan Weil wrote: compatiblity - compatibility continously - continuously existance - existence usefull - useful shoudl - should Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] .gitignore: ignore qmp-commands.txt

2013-10-21 Thread Michael Tokarev
15.10.2013 06:58, Fam Zheng wrote: This file is moved out from QMP/ to BUILD dir, change the ignore file too. Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qapi: fix documentation example

2013-10-21 Thread Michael Tokarev
19.10.2013 20:52, Eric Blake wrote: The QMP wire format uses , not '', around strings. * docs/qapi-code-gen.txt: Fix typo. Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: pass correct parameter to do_shmctl()

2013-10-21 Thread Michael Tokarev
12.10.2013 00:44, Petar Jovanovic wrote: From: Peter Maydell [peter.mayd...@linaro.org] Sent: Friday, October 11, 2013 9:10 PM To: Petar Jovanovic Cc: QEMU Developers; QEMU Trivial; Riku Voipio; Petar Jovanovic; Aurelien Jarno Subject: Re: [Qemu-devel]

Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] misc: Spelling and grammar fixes in comments

2013-10-21 Thread Michael Tokarev
So guys, do we agree to apply this or not, after all? :) Thanks, /mjt 12.10.2013 00:28, Don Koch wrote: On 10/11/2013 04:10 PM, Peter Maydell wrote: On 12 October 2013 05:03, Don Koch dk...@verizon.com wrote: On 10/11/2013 03:34 PM, Stefan Weil wrote: * it's - its * grammar fix in

[Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT

2013-10-21 Thread Wenchao Xia
The define will be moved to qapi-schema.json later, so rename the prefix to match its naming style. Also fixed code style error reported in spice-core.c. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- balloon.c |2 +- block.c |4 +-

[Qemu-devel] [PATCH 1/6] block: use type MonitorEvent directly

2013-10-21 Thread Wenchao Xia
block_int.h included monitor.h, so it knows the typedef. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- block.c |2 +- include/block/block_int.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically

2013-10-21 Thread Wenchao Xia
This series move the event define to qapi code, so later other components could use it easily, it also make monitor code less and easier to decouple with other code. Original patch comes from my series titles as [PATCH 00/13] trivial patches for event, error and monitor To focus more on one item,

[Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent

2013-10-21 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c|2 +- include/block/block_int.h |2 +- include/monitor/monitor.h |6 +++--- monitor.c | 12 ++-- stubs/mon-protocol-event.c |2 +- ui/vnc.c |2

[Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json

2013-10-21 Thread Wenchao Xia
They are defined with capitals for compatibility, see monitor_event_names in monitor.c, which was used to set the event strings. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- include/monitor/monitor.h | 37 - qapi-schema.json | 37

[Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent

2013-10-21 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- qapi-schema.json | 56 ++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index fbc1fab..0f966ab 100644 --- a/qapi-schema.json +++

[Qemu-devel] [PATCH 5/6] qapi: remove var monitor_event_names[]

2013-10-21 Thread Wenchao Xia
Use the generated table in qapi-types.h. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- monitor.c | 36 ++-- 1 files changed, 2 insertions(+), 34 deletions(-) diff --git a/monitor.c b/monitor.c index b2c64de..7b8bd5e 100644 --- a/monitor.c +++

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-10-21 Thread Luke Gorrie
Hi all, Back in May we talked about efficiently connecting a user-space Ethernet switch to QEMU guests. Stefan Hajnoczi sketched the design of a userspace version of vhost that uses a Unix socket for its control interface. His design is in the mail quoted below. I'd like to ask you: if this

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: pass correct parameter to do_shmctl()

2013-10-21 Thread Petar Jovanovic
From: Michael Tokarev [m...@tls.msk.ru] Sent: Monday, October 21, 2013 10:45 AM To: Petar Jovanovic Cc: Peter Maydell; Petar Jovanovic; QEMU Trivial; Riku Voipio; QEMU Developers Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user: pass correct

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-21 Thread Fedorov Sergey
On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not implement .can_receive() then it relies on growing queues (keeping packets buffered in memory).

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-21 Thread Fedorov Sergey
On 10/21/2013 03:44 PM, Fedorov Sergey wrote: On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not implement .can_receive() then it relies on

[Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Stefan Hajnoczi
There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that get_maintainer.pl lists them. Note that commits are still merged through Kevin or Stefan's block tree but the block driver sub-maintainers are

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: pass correct parameter to do_shmctl()

2013-10-21 Thread Peter Maydell
On 21 October 2013 11:49, Petar Jovanovic petar.jovano...@imgtec.com wrote: From: Michael Tokarev [m...@tls.msk.ru] Shouldn't the two patches be applied together and be routed via some other, non-trivial tree instead? This is what I originally did, but Peter suggested to separate it in two

[Qemu-devel] PSCI with mach-virt

2013-10-21 Thread Giridhar Maruthy
Hi, I am using mach-virt in qemu on a kvm enabled host. With 2 cpus, the guest fails to boot the second processor. Following is the message. CPU1: failed to boot: -22(-EINVAL) The PSCI device nodes are anyway passed from virt.c file. Is there anything extra that needs to be done to get 2 cpus

Re: [Qemu-devel] [PATCH 54/66] add a header file for atomic operations

2013-10-21 Thread Peter Maydell
On 21 October 2013 07:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 20/10/2013 17:20, Peter Maydell ha scritto: CCutil/qemu-thread-posix.o util/qemu-thread-posix.c:351:13: warning: implicit declaration of function '__sync_exchange' is invalid in C99

Re: [Qemu-devel] PSCI with mach-virt

2013-10-21 Thread Peter Maydell
On 21 October 2013 14:47, Giridhar Maruthy giridhar.maru...@linaro.org wrote: Hi, I am using mach-virt in qemu on a kvm enabled host. With 2 cpus, the guest fails to boot the second processor. Following is the message. CPU1: failed to boot: -22(-EINVAL) The PSCI device nodes are anyway

[Qemu-devel] [PATCH] block/vpc: fix virtual size for images created with disk2vhd

2013-10-21 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/vpc.c |9 + 1 file changed, 9 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index b5dca39..1acc1d4 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -211,6 +211,15 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Richard W.M. Jones
On Mon, Oct 21, 2013 at 02:26:15PM +0100, Stefan Hajnoczi wrote: There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that get_maintainer.pl lists them. Note that commits are still merged through Kevin

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: pass correct parameter to do_shmctl()

2013-10-21 Thread Petar Jovanovic
From: Peter Maydell [peter.mayd...@linaro.org] Sent: Monday, October 21, 2013 3:26 PM To: Petar Jovanovic Cc: Michael Tokarev; Petar Jovanovic; QEMU Trivial; Riku Voipio; QEMU Developers Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user: pass

Re: [Qemu-devel] BUG: RTC issue when Windows guest is idle

2013-10-21 Thread Alex Bligh
--On 16 October 2013 14:56:12 + Matthew Anderson matth...@base3.com.au wrote: Hi Xiangyouxie, I personally haven't tried to solve the problem as yet but I've been in contact with Anders Fudali who was able to find the issue with the help of one of his developers. See below for his

Re: [Qemu-devel] BUG: RTC issue when Windows guest is idle

2013-10-21 Thread Alex Bligh
--On 21 October 2013 15:56:27 +0100 Alex Bligh a...@alex.org.uk wrote: I'm not sure whether the RTC is meant to be generating some sort of qemu_notify() here, or using a timer, or what, but it should be doing something to break out of the select() loop. Stefan - any idea? To answer my own

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Stefan Weil
Am 21.10.2013 15:26, schrieb Stefan Hajnoczi: There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that get_maintainer.pl lists them. Note that commits are still merged through Kevin or Stefan's block

Re: [Qemu-devel] Build failure with make-4.0

2013-10-21 Thread Ken Moffat
On Sat, Oct 19, 2013 at 10:53:43AM +0100, Ken Moffat wrote: On Sat, Oct 19, 2013 at 10:05:10AM +0100, Peter Maydell wrote: Well, the reason would be that nobody in practice will do that. Make should be setting ARFLAGS correctly (as per its documentation) unless you've somehow managed to

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Josh Durgin
On 10/21/2013 06:26 AM, Stefan Hajnoczi wrote: There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that get_maintainer.pl lists them. Note that commits are still merged through Kevin or Stefan's block

Re: [Qemu-devel] Build failure with make-4.0

2013-10-21 Thread Peter Maydell
On 21 October 2013 19:22, Ken Moffat zarniwh...@ntlworld.com wrote: I took this to bug-make, but now I'm back here. The first thing in rules.mak is # Don't use implicit rules or variables # we have explicit rules for everything MAKEFLAGS += -rR and Paul Smith said - It's a qemu bug,

[Qemu-devel] [PATCH for-1.7] configure: Explicitly set ARFLAGS so we can build with GNU Make 4.0

2013-10-21 Thread Peter Maydell
Our rules.mak adds '-rR' to MAKEFLAGS to indicate that we will be explicitly specifying everything and not relying on any default variables or rules. However we were accidentally relying on the default ARFLAGS (rv). This went unnoticed because of a bug in GNU Make 3.82 and earlier which meant that

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Anthony Liguori
On Mon, Oct 21, 2013 at 2:26 PM, Stefan Hajnoczi stefa...@redhat.com wrote: There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that get_maintainer.pl lists them. Note that commits are still merged

Re: [Qemu-devel] [PATCH v4 1/5] Fix configure script for LTTng 2.x

2013-10-21 Thread Mohamad Gebai
On 13-10-18 10:05 AM, Stefan Hajnoczi wrote: On Fri, Oct 18, 2013 at 02:39:49AM -0400, Mohamad Gebai wrote: Signed-off-by: Mohamad Gebai mohamad.ge...@polymtl.ca --- configure |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configure b/configure index

Re: [Qemu-devel] [PATCH] qcow2: Unset zero_beyond_eof in save_vmstate

2013-10-21 Thread Eric Blake
On 10/20/2013 08:52 PM, Max Reitz wrote: Saving the VM state is done using bdrv_pwrite. This function may perform a read-modify-write, which in this case results in data being read from beyond the end of the virtual disk. Since we are actually trying to access an area which is not a part of

Re: [Qemu-devel] [PATCH] qcow2: Restore total_sectors value in save_vmstate

2013-10-21 Thread Eric Blake
On 10/20/2013 07:28 PM, Max Reitz wrote: Since df2a6f29a5, bdrv_co_do_writev increases the total_sectors value of a growable block devices on writes after the current end. This leads to the virtual disk apparently growing in qcow2_save_vmstate, which in turn affects the disk size captured by

Re: [Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent

2013-10-21 Thread Eric Blake
On 10/21/2013 03:16 AM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c|2 +- include/block/block_int.h |2 +- include/monitor/monitor.h |6 +++--- monitor.c | 12 ++--

Re: [Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT

2013-10-21 Thread Eric Blake
On 10/21/2013 03:16 AM, Wenchao Xia wrote: The define will be moved to qapi-schema.json later, so rename the prefix to match its naming style. Wouldn't it be simpler to fix the code generator to special case QEvent to turn into QEVENT, instead of having to go through this churn? But if we

Re: [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json

2013-10-21 Thread Eric Blake
On 10/21/2013 03:16 AM, Wenchao Xia wrote: They are defined with capitals for compatibility, see monitor_event_names in monitor.c, which was used to set the event strings. Agree; the existing 'query-events' commands returns all-capital strings. Signed-off-by: Wenchao Xia

Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest

2013-10-21 Thread David Weber
We have the exactly same problem on our NUMA systems. The clock of windows 2008 guests sometimes just stops and it becomes slow when you are connected via rdp. After connecting to qemu's vnc server everything runs fine again. The problem seems to occour more often when the host is under pressure.

[Qemu-devel] Fix SMB security configuration on newer samba versions

2013-10-21 Thread Michael Büsch
The following changes fix the samba security configuration on newer samba versions. samba version 4.0.10-Debian throws this warning: WARNING: Ignoring invalid value 'share' for parameter 'security' Which makes it fall back to security=user without guest login. Fix this by selecting 'user'

[Qemu-devel] [Bug 1242765] [NEW] USB passthrough to Windows 7 guest fails with error -110, hangs

2013-10-21 Thread Greg Sheremeta
Public bug reported: Description of problem: Using a Sandisk Cruzer Fit 16GB USB thumb drive. Using virt-manager on Fedora 19 host, and Windows 7 32 bit guest. I set up a USB2 controller on Windows 7 guest in virt-manager. Windows sees the USB drive and can open the file manager and correctly

Re: [Qemu-devel] [PATCH 5/6] qapi: remove var monitor_event_names[]

2013-10-21 Thread Eric Blake
On 10/21/2013 03:16 AM, Wenchao Xia wrote: Use the generated table in qapi-types.h. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- monitor.c | 36 ++-- 1 files changed, 2 insertions(+), 34 deletions(-) Reviewed-by: Eric Blake ebl...@redhat.com

Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent

2013-10-21 Thread Eric Blake
On 10/21/2013 03:16 AM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- qapi-schema.json | 56 ++ 1 files changed, 56 insertions(+), 0 deletions(-) Incomplete. Now that you are actually using the enum (see

Re: [Qemu-devel] [PATCH 16/16] qapi-schema, qemu-options slirp: Adding Qemu options for IPv6 addresses

2013-10-21 Thread Eric Blake
On 10/20/2013 03:56 PM, Samuel Thibault wrote: This patchs adds parameters to manage some new options in the qemu -net command. Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in argument to the qemu command. Defaults parameters are respectively fc00::1, fc00::, /64 and

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Richard W.M. Jones
On Mon, Oct 21, 2013 at 09:19:42PM +0100, Anthony Liguori wrote: On Mon, Oct 21, 2013 at 2:26 PM, Stefan Hajnoczi stefa...@redhat.com wrote: There are a number of contributors who maintain block drivers (image formats and protocols). They should be listed in the MAINTAINERS file so that

[Qemu-devel] [PATCH_v2 2/9] target-openrisc: Remove unnecessary code generated by jump instructions

2013-10-21 Thread Sebastian Macke
The sr_f variable is only used for the l.bf and l.bnf instructions. For clarity the code is also rewritten using a switch statement instead of if chaining. Signed-off-by: Sebastian Macke sebast...@macke.de --- target-openrisc/translate.c | 45 ++--- 1 file

[Qemu-devel] [PATCH_v2 4/9] target-openrisc: Correct wrong epcr register in interrupt handler

2013-10-21 Thread Sebastian Macke
This patch corrects several misbehaviors during an interrupt process. Most of the time the pc is already correct and therefore no special treatment of the exceptions is necessary. Tested by checking crashing programs which otherwise work in or1ksim. Signed-off-by: Sebastian Macke

[Qemu-devel] [PATCH_v2 0/9] target-openrisc: Corrections and speed improvements

2013-10-21 Thread Sebastian Macke
This series is the first part to make the OpenRISC target more reliable and faster. It corrects several severe problems which prevented the OpenRISC emulation for being useful in the past. The patchset was tested with - the tests/tcg/openrisc tests - booting Linux 3.11 - run configure +

[Qemu-devel] [PATCH_v2 1/9] target-openrisc: Speed up move instruction

2013-10-21 Thread Sebastian Macke
The OpenRISC architecture does not have its own move register instruction. Instead it uses either l.addi rd, r0, x or l.ori rd, rs, 0 or l.or rd, rx, r0 The l.ori instruction is automatically optimized but not the l.addi instruction. This patch optimizes for this special case. Signed-off-by:

[Qemu-devel] [PATCH_v2 9/9] target-openrisc: Correct carry flag check of l.addc and l.addic test cases

2013-10-21 Thread Sebastian Macke
The test cases did not correctly test for the carry flag. Signed-off-by: Sebastian Macke sebast...@macke.de --- tests/tcg/openrisc/test_addc.c | 8 +--- tests/tcg/openrisc/test_addic.c | 10 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH_v2 3/9] target-openrisc: Remove executable flag for every page

2013-10-21 Thread Sebastian Macke
Pages should be flagged executable only if the tlb executable flag is set or the mmu is off. Signed-off-by: Sebastian Macke sebast...@macke.de --- target-openrisc/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c index

[Qemu-devel] [PATCH_v2 6/9] target-openrisc: Correct memory bounds checking for the tlb buffers

2013-10-21 Thread Sebastian Macke
The mtspr and mfspr routines didn't check for the correct memory boundaries. This fixes a segmentation fault while booting Linux. Signed-off-by: Sebastian Macke sebast...@macke.de --- target-openrisc/sys_helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PATCH_v2 5/9] openrisc-timer: Reduce overhead, Separate clock update functions

2013-10-21 Thread Sebastian Macke
The clock value is only evaluated when really necessary reducing the overhead of the timer handling. This also solves a problem in the way the Linux kernel handles the timer and the expected accuracy. The old version could lead to inaccurate timings. Signed-off-by: Sebastian Macke

[Qemu-devel] [PATCH_v2 7/9] target-openrisc: Separate branch flag from Supervision register

2013-10-21 Thread Sebastian Macke
The branch flag is very often used. To increase the speed the flag is separated. This patch removes several ands and ors and branches from the generated code. The additional flag btaken is no longer necessary. Signed-off-by: Sebastian Macke sebast...@macke.de --- target-openrisc/cpu.c

[Qemu-devel] [PATCH_v2 8/9] target-openrisc: Complete remove of npc and ppc variables

2013-10-21 Thread Sebastian Macke
According to the specification the registers npc (next pc) and ppc (previous pc) are only meant for external debuggers. They have undefined behavior when you read and especially write to it. Additionally in the current implementation they show different behavior when in singlestep mode. Because

[Qemu-devel] [Bug 1242963] [NEW] QEMU loadvm causes guest OS freeze

2013-10-21 Thread NanothylL
Public bug reported: HOST: ubuntu 13.10 x64 GUEST: winxp sp 3 x86 AFFECT QEMU(tested): v1.5.2, v1.5.3, v1.6.0, v1.6.1 I compile QEMU by myself with ./configure --target-list=i386-softmmu make make install. After installing a winxp sp3 into the qemu-system-i386 with command line:

[Qemu-devel] [Bug 1240669] Re: sd_init() generates SIGSEGV when passed NULL

2013-10-21 Thread Devin Boyer
Fixed with commit 794cbc26eb94ce13c75d105eea9ff0afff56e2c2. ** Changed in: qemu Status: New = Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1240669 Title: sd_init() generates

Re: [Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT

2013-10-21 Thread Wenchao Xia
于 2013/10/22 4:41, Eric Blake 写道: On 10/21/2013 03:16 AM, Wenchao Xia wrote: The define will be moved to qapi-schema.json later, so rename the prefix to match its naming style. Wouldn't it be simpler to fix the code generator to special case QEvent to turn into QEVENT, instead of having to go

Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent

2013-10-21 Thread Wenchao Xia
于 2013/10/22 5:00, Eric Blake 写道: On 10/21/2013 03:16 AM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- qapi-schema.json | 56 ++ 1 files changed, 56 insertions(+), 0 deletions(-) Incomplete. Now that you

[Qemu-devel] [PATCH 0/17 v2] Localhost migration with side channel for ram

2013-10-21 Thread Lei Li
This patch series tries to introduce a mechanism using side channel pipe for RAM via SCM_RIGHTS with unix domain socket protocol migration. This side channel is used for the page flipping by vmsplice, which is the internal mechanism for localhost migration that we are trying to add to QEMU. The

[Qemu-devel] [PATCH 01/17] rename is_active to is_block_active

2013-10-21 Thread Lei Li
is_active is used to identify block migration, rename to is_block_active to make it more clear. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- block-migration.c |2 +- include/migration/vmstate.h |2 +- savevm.c| 16 3 files changed,

[Qemu-devel] [PATCH 03/17] migration: add migrate_unix_page_flipping()

2013-10-21 Thread Lei Li
Add migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/migration/migration.h |3 +++ migration.c |9 + 2 files changed, 12 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE

2013-10-21 Thread Lei Li
Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and add it to runstate_needs_reset(). Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qapi-schema.json | 11 +++ vl.c | 12 +++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qapi-schema.json

[Qemu-devel] [PATCH 02/17] QAPI: introduce magration capability unix_page_flipping

2013-10-21 Thread Lei Li
Introduce unix_page_flipping to MigrationCapability for localhost migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qapi-schema.json |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 60f3fd1..523a5b2 100644 ---

[Qemu-devel] [PATCH 04/17] qmp-command.hx: add missing docs for migration capabilites

2013-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qmp-commands.hx |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index fba15cd..650a3a8 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2898,6 +2898,10 @@

[Qemu-devel] [PATCH 05/17] migration-local: add QEMUFileLocal with socket based QEMUFile

2013-10-21 Thread Lei Li
This patch adds QEMUFileLocal with copy of socket based QEMUFile, will be used as the basis code for Unix socket protocol migration and page flipping migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- Makefile.target |1 + migration-local.c | 121

[Qemu-devel] [PATCH 06/17] migration-local: introduce qemu_fopen_socket_local()

2013-10-21 Thread Lei Li
Add qemu_fopen_socket_local() to open QEMUFileLocal introduced earlier. It will create a pipe in write mode if unix_page_flipping is enabled, adjust qemu_local_close() to close pipe as well. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/migration/qemu-file.h |2 +

[Qemu-devel] [PATCH 09/17] migration-local: override before_ram_iterate to send pipefd

2013-10-21 Thread Lei Li
Override befor_ram_iterate to send pipefd. It will write the RAM_SAVE_FLAG_HOOK flags which will trigger the load hook to receive it. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 08/17] migration-local: add recv_pipefd()

2013-10-21 Thread Lei Li
This patch adds recv_pipefd() to receive the pipe file descriptor that passed by source process. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 64 + 1 files changed, 64 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 07/17] migration-local: add send_pipefd()

2013-10-21 Thread Lei Li
This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 53 + 1 files changed, 53 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 10/17] migration-local: override save_page for page transmit

2013-10-21 Thread Lei Li
This patch implements save_page callback for the outside of page flipping. It will write the address of the page on the Unix socket and flip the page data on pipe by vmsplice(). Every page address would have a header flag RAM_SAVE_FLAG_HOOK. Signed-off-by: Lei Li li...@linux.vnet.ibm.com ---

[Qemu-devel] [PATCH 11/17] savevm: adjust ram_control_save_page for page flipping

2013-10-21 Thread Lei Li
As callback save_page will always be opened by qemu_fopen_socket_local(), and without unix_page_flipping it will return RAM_SAVE_CONTROL_NOT_SUPP, it leads to a wrong qemu_file_set_error() based on the current logic. So this patch adds RAM_SAVE_CONTROL_NOT_SUPP to the check. Signed-off-by: Lei Li

[Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load

2013-10-21 Thread Lei Li
Override hook_ram_load to receive the pipe file descriptor passed by source process and page address which will be extracted to vmsplice the page data from pipe. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 85 + 1

[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local

2013-10-21 Thread Lei Li
Relace qemu_fopen_socket with qemu_fopen_socket_local in Unix protocol migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-unix.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index

[Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping

2013-10-21 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 4ac466b..568b73a 100644 --- a/migration.c +++ b/migration.c @@ -579,10 +579,11 @@ static void *migration_thread(void

[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing

2013-10-21 Thread Lei Li
Add page flipping support on unix outgoing part by stopping VM with the new RunState RUN_STATE_FLIPPING_MIGRATE before invoking migration if unix_page_flipping enabled. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-unix.c | 13 - 1 files changed, 12 insertions(+), 1

[Qemu-devel] [PATCH 17/17] hmp: better format for info migrate_capabilities

2013-10-21 Thread Lei Li
As there might be more capabilities introduced, better to display it in lines. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- hmp.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index 32ee285..dcfa2f9 100644 --- a/hmp.c +++ b/hmp.c @@ -226,13

Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent

2013-10-21 Thread Eric Blake
On 10/22/2013 04:19 AM, Wenchao Xia wrote: +# +# @POWERDOWN: system power down, if it is suppoted s/suppoted/supported/ Events aren't issued if they aren't supported, so that phrase is pointless. Ok, I will skip that phrase. The point here is that, many people are confused about

Re: [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE

2013-10-21 Thread Eric Blake
On 10/22/2013 04:25 AM, Lei Li wrote: Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and add it to runstate_needs_reset(). Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qapi-schema.json | 11 +++ vl.c | 12 +++- 2 files changed, 18 insertions(+), 5

Re: [Qemu-devel] PSCI with mach-virt

2013-10-21 Thread Giridhar Maruthy
Thanks Peter, I will look into it. Giridhar On 21 October 2013 19:26, Peter Maydell peter.mayd...@linaro.org wrote: On 21 October 2013 14:47, Giridhar Maruthy giridhar.maru...@linaro.org wrote: Hi, I am using mach-virt in qemu on a kvm enabled host. With 2 cpus, the guest fails to boot

Re: [Qemu-devel] [PATCH 54/66] add a header file for atomic operations

2013-10-21 Thread Paolo Bonzini
Il 21/10/2013 14:53, Peter Maydell ha scritto: Yes, using __sync_swap seems to work OK. Does clang on linux require the four-argument __atomic_exchange() or can we just make the #ifdef __clang__ come first in the #if ladder? Please do that (change the ladder), it's definitely a good idea.