Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/4] spice-qemu-char: fix check for in-parameter

2014-11-01 Thread Michael Tokarev
01.11.2014 04:50, zhanghailiang wrote: > For qemu_chr_open_spice_vmc and qemu_chr_open_spice_port, the in-parameter > never to be NULL, because the checks in qemu_chr_parse_spice_vmc > and qemu_chr_parse_spice_port have ensured this. > > So we should check the length of the in-parameter. The same

Re: [Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread Gonglei
On 2014/11/2 13:39, Michael Tokarev wrote: > 02.11.2014 08:37, arei.gong...@huawei.com wrote: >> >> In hotplugging scenario, taking those true branch, the file >> handler do not be closed. Let's close them before return. > > This looks much better now, and is shorter too :) > Applied to -trivial,

Re: [Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread Michael Tokarev
02.11.2014 08:37, arei.gong...@huawei.com wrote: > > In hotplugging scenario, taking those true branch, the file > handler do not be closed. Let's close them before return. This looks much better now, and is shorter too :) Applied to -trivial, thank you! /mjt

[Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread arei.gonglei
From: Gonglei In hotplugging scenario, taking those true branch, the file handler do not be closed. Let's close them before return. Signed-off-by: Gonglei --- v1: [PATCH 2/2] tap: fix possible fd leak v2: add explicit close(fd) and change subject. (Thanks to /mjt) --- net/tap.c | 3 +++ 1 fi

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] tap: fix possible fd leak

2014-11-01 Thread Michael Tokarev
02.11.2014 08:21, Gonglei wrote: [] > Agree. v2 will do. Thanks! Also, I think it's good idea to add " in net_init_tap" to subject. (And please don't resend both patches, as I already applied first :) Thanks, /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] tap: fix possible fd leak

2014-11-01 Thread Gonglei
On 2014/11/2 13:11, Michael Tokarev wrote: > 31.10.2014 09:11, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> In hotplugging scenario, taking those true branch, the file >> handler do not be closed. Adding cleanup logic for them. >> >> Signed-off-by: Gonglei >> --- >> net/tap.c | 12

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/4] qemu-char: fix parameter check for qemu_chr_open_pipe

2014-11-01 Thread Michael Tokarev
01.11.2014 04:50, zhanghailiang wrote: > The filename parameter never to be NULL, because in qemu_chr_parse_pipe > it is return value of g_strdup(device), where device will not be > NULL. > > We should check its length. > After this patch, when run command: > qemu-system-x86_64 -chardev pipe,id=p

Re: [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef

2014-11-01 Thread Michael Tokarev
31.10.2014 11:02, SeokYeon Hwang wrote: > Wrapped uuid_unparse() in #ifdef to avoid "-Wunused-function" on clang 3.4 or > later. Applied to -trivial, after adding a newline into the commit message :) Thanks, /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/2] tap: remove close(fd)

2014-11-01 Thread Gonglei
On 2014/11/2 13:06, Michael Tokarev wrote: > 31.10.2014 09:11, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> commit 5193e5fb (tap: factor out common tap initialization) >> introduce net_init_tap_one(). But it's inapposite that close >> fd in net_init_tap_one(), we should lay it in the cal

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] tap: fix possible fd leak

2014-11-01 Thread Michael Tokarev
31.10.2014 09:11, arei.gong...@huawei.com wrote: > From: Gonglei > > In hotplugging scenario, taking those true branch, the file > handler do not be closed. Adding cleanup logic for them. > > Signed-off-by: Gonglei > --- > net/tap.c | 12 +--- > 1 file changed, 9 insertions(+), 3 delet

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/2] tap: remove close(fd)

2014-11-01 Thread Michael Tokarev
31.10.2014 09:11, arei.gong...@huawei.com wrote: > From: Gonglei > > commit 5193e5fb (tap: factor out common tap initialization) > introduce net_init_tap_one(). But it's inapposite that close > fd in net_init_tap_one(), we should lay it in the caller, > becuase some caller needn't to close it if

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tap_int.h: remove repeating macroinstruction

2014-11-01 Thread Gonglei
On 2014/11/2 12:56, Michael Tokarev wrote: > 31.10.2014 05:53, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT >> have been defined in net/net.h included in >> tap.c, which is the only C file that using those two macro. >> Let's remove

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-i386: Remove unused model_features_t struct

2014-11-01 Thread Michael Tokarev
30.10.2014 22:12, Eduardo Habkost wrote: > The struct is not used anymore and can be removed. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tap_int.h: remove repeating macroinstruction

2014-11-01 Thread Michael Tokarev
31.10.2014 05:53, arei.gong...@huawei.com wrote: > From: Gonglei > > DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT > have been defined in net/net.h included in > tap.c, which is the only C file that using those two macro. > Let's remove the repeating macroinstruction. Applied (as I note

[Qemu-devel] Help needed - LGPL Violation and Legal Threats

2014-11-01 Thread Tom Cain
G'day QEMU wizards, I've recently been made aware of an organization that seems to be pretty actively sending out nastygrams to people who redistribute their software which is a QEMU derivative. It was my understanding that current versions of QEMU full system emulation are GPL, and older versio

Re: [Qemu-devel] [PATCH v3 08/15] target-mips: add BadInstr and BadInstrP support

2014-11-01 Thread Leon Alrae
Hi Yongbok, On 29/10/14 13:55, Yongbok Kim wrote: > On 24/10/2014 13:42, Leon Alrae wrote: >> case EXCP_TLBRI: >> cause = 19; >> +update_badinstr = 1; >> goto set_EPC; >> case EXCP_TLBXI: >> cause = 20; > > TLBXI requires updating the register. T

[Qemu-devel] [Bug 921208] Re: win7/x64 installer hangs on startup with 0x0000005d.

2014-11-01 Thread Michael Tokarev
I'm not sure I follow. I tried to answer to the last inquiry in this bugreport, Eduardo asked if someone can confirm that +nx solves this problem (it doesn't). Now you say with certainity that it is a bug in TCG (if it is a bug, why only uncertain guesses are present in this bugreport?), mentions

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tap_int.h: remove repeating macroinstruction

2014-11-01 Thread Michael Tokarev
31.10.2014 05:53, arei.gong...@huawei.com пишет: > From: Gonglei > > DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT > have been defined in net/net.h included in > tap.c, which is the only C file that using those two macro. > Let's remove the repeating macroinstruction. > > Signed-off-by:

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tap_int.h: remove repeating macroinstruction

2014-11-01 Thread Michael Tokarev
31.10.2014 05:53, arei.gong...@huawei.com wrote: > From: Gonglei > > DEFAULT_NETWORK_SCRIPT and DEFAULT_NETWORK_DOWN_SCRIPT > have been defined in net/net.h included in > tap.c, which is the only C file that using those two macro. > Let's remove the repeating macroinstruction. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 3/3] qdev: Use qdev_device_add_get_class() for -device , help

2014-11-01 Thread Eduardo Habkost
On Sat, Nov 01, 2014 at 05:48:19PM +0100, Andreas Färber wrote: > Am 01.11.2014 um 17:45 schrieb Eduardo Habkost: > > On Sat, Nov 01, 2014 at 05:40:20PM +0100, Andreas Färber wrote: > >> Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: > >>> Make sure we try to list properties from classes that can

[Qemu-devel] [PATCH v2 4/5] libqos: Add malloc generic

2014-11-01 Thread Marc Marí
This malloc is a basic interface implementation that works for any platform. It should be replaced in the future for a real malloc implementation for each of the platforms. Signed-off-by: Marc Marí --- tests/libqos/malloc-generic.c | 50 + tests/libqos/m

[Qemu-devel] [PATCH v2 2/5] tests: Prepare virtio-blk-test for multi-arch implementation

2014-11-01 Thread Marc Marí
Modularize functions in virtio-blk-test and add PCI suffix for PCI specific components. Signed-off-by: Marc Marí --- tests/virtio-blk-test.c | 57 +++ 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/tests/virtio-blk-test.c b/tests/vir

[Qemu-devel] [PATCH v2 1/5] libqos: Change use of pointers to uint64_t in virtio

2014-11-01 Thread Marc Marí
Convert use of pointers in functions of virtio to uint64_t in order to make it platform-independent. Add casting from pointers (in PCI functions) to uint64_t and vice versa through uintptr_t. Signed-off-by: Marc Marí --- tests/libqos/virtio-pci.c | 20 +++- tests/libqos/virtio

[Qemu-devel] [PATCH v2 3/5] libqos: Remove PCI assumptions in constants of virtio driver

2014-11-01 Thread Marc Marí
Convert PCI-specific constants names of libqos virtio driver. Signed-off-by: Marc Marí --- tests/libqos/virtio-pci.c | 30 +++--- tests/libqos/virtio-pci.h | 24 tests/virtio-blk-test.c | 10 +- 3 files changed, 32 insertions(+), 3

[Qemu-devel] [PATCH v2 5/5] libqos: Add virtio MMIO support

2014-11-01 Thread Marc Marí
Add virtio MMIO support. Add virtio-blk-test MMIO test case. Signed-off-by: Marc Marí --- tests/Makefile |4 +- tests/libqos/virtio-mmio.c | 190 tests/libqos/virtio-mmio.h | 46 +++ tests/virtio-blk-test.c| 143 +++

[Qemu-devel] [PATCH v2 0/5] libqos: Virtio MMIO driver

2014-11-01 Thread Marc Marí
Add virtio-mmio support to libqos and test case for virtio-blk. This series depends on patch "libqos: Convert malloc-pc allocator to a generic allocator" Marc Marí (5): libqos: Change use of pointers to uint64_t in virtio tests: Prepare virtio-blk-test for multi-arch implementation libqos:

Re: [Qemu-devel] [PATCH 1/3] qdev: Create qdev_get_device_class() function

2014-11-01 Thread Eduardo Habkost
On Sat, Nov 01, 2014 at 05:46:14PM +0100, Andreas Färber wrote: > Hi, > > Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: > > Extract the DeviceClass lookup from qdev_device_add() to a separate > > function. > > > > Signed-off-by: Eduardo Habkost > > --- > > qdev-monitor.c | 70 > > +++

Re: [Qemu-devel] [PATCH 3/3] qdev: Use qdev_device_add_get_class() for -device , help

2014-11-01 Thread Andreas Färber
Am 01.11.2014 um 17:45 schrieb Eduardo Habkost: > On Sat, Nov 01, 2014 at 05:40:20PM +0100, Andreas Färber wrote: >> Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: >>> Make sure we try to list properties from classes that can be safely used >>> with >>> "-device". >>> >>> Fixes the following cras

Re: [Qemu-devel] [PATCH 1/3] qdev: Create qdev_get_device_class() function

2014-11-01 Thread Andreas Färber
Hi, Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: > Extract the DeviceClass lookup from qdev_device_add() to a separate > function. > > Signed-off-by: Eduardo Habkost > --- > qdev-monitor.c | 70 > +++--- > 1 file changed, 42 insertions(+),

Re: [Qemu-devel] [PATCH 3/3] qdev: Use qdev_device_add_get_class() for -device , help

2014-11-01 Thread Eduardo Habkost
On Sat, Nov 01, 2014 at 05:40:20PM +0100, Andreas Färber wrote: > Hi Eduardo, > > Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: > > Make sure we try to list properties from classes that can be safely used > > with > > "-device". > > > > Fixes the following crashes: > > > > $ qemu-system-x86

Re: [Qemu-devel] [PATCH 3/3] qdev: Use qdev_device_add_get_class() for -device , help

2014-11-01 Thread Andreas Färber
Hi Eduardo, Am 01.11.2014 um 16:56 schrieb Eduardo Habkost: > Make sure we try to list properties from classes that can be safely used with > "-device". > > Fixes the following crashes: > > $ qemu-system-x86_64 -device x86_64-cpu,help > ** > ERROR:qom/object.c:336:object_initialize_with_ty

[Qemu-devel] [PATCH 3/3] qdev: Use qdev_device_add_get_class() for -device , help

2014-11-01 Thread Eduardo Habkost
Make sure we try to list properties from classes that can be safely used with "-device". Fixes the following crashes: $ qemu-system-x86_64 -device x86_64-cpu,help ** ERROR:qom/object.c:336:object_initialize_with_type: assertion failed: (type->abstract == false) Aborted (core dumped) $

[Qemu-devel] [PATCH 1/3] qdev: Create qdev_get_device_class() function

2014-11-01 Thread Eduardo Habkost
Extract the DeviceClass lookup from qdev_device_add() to a separate function. Signed-off-by: Eduardo Habkost --- qdev-monitor.c | 70 +++--- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index f

[Qemu-devel] [PATCH 2/3] qdev: Move error printing to the end of qdev_device_help()

2014-11-01 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- qdev-monitor.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index 982f3f4..a9702d8 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -245,9 +245,7 @@ int qdev_device_help(QemuOpts *opts) pr

[Qemu-devel] [PATCH 0/3] qdev: Validate class name for -device , help

2014-11-01 Thread Eduardo Habkost
This fixes the following crashes: $ qemu-system-x86_64 -device x86_64-cpu,help ** ERROR:qom/object.c:336:object_initialize_with_type: assertion failed: (type->abstract == false) Aborted (core dumped) $ qemu-system-x86_64 -device host-x86_64-cpu,help qemu-system-x86_64: /home/eha

[Qemu-devel] QEMU Advent Calendar website skeleton

2014-11-01 Thread Stefan Hajnoczi
Hi, I recently announced the QEMU Advent Calendar 2014 project, where we feature a disk image each day in December until Christmas day. The idea is to put together some interesting and fun disk images that QEMU fans can enjoy. The skeleton website is now ready - but it needs help with the CSS and

Re: [Qemu-devel] [PATCH 3/4] qemu-char: convert some open functions to use Error API

2014-11-01 Thread Eric Blake
On 10/31/2014 07:50 PM, zhanghailiang wrote: > Convert several Character backend open functions to use the Error API. > > Signed-off-by: zhanghailiang > --- > qemu-char.c | 52 +++- > 1 file changed, 27 insertions(+), 25 deletions(-) > @@ -2337,12

[Qemu-devel] vhost-user:Bad ram offset

2014-11-01 Thread Linhaifeng
Hi,all VM use vhost-user backend cannot startup when memory bigger than 3.5G.The log print "Bad ram offset 1" .Is this a bug? log: [2014-11-01T08:39:07.245324Z] virtio_set_status:524 virtio-net device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.247225Z] virtio_set_status:524

Re: [Qemu-devel] [PATCH 00/17] RFC: userfault v2

2014-11-01 Thread zhanghailiang
On 2014/11/1 3:39, Peter Feiner wrote: On Fri, Oct 31, 2014 at 11:29:49AM +0800, zhanghailiang wrote: Agreed, but for doing live memory snapshot (VM is running when do snapsphot), we have to do this (block the write action), because we have to save the page before it is dirtied by writing actio