Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name

2015-06-07 Thread Amos Kong
On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake wrote: > > Commit e2462113 allowed the ability to fire an event if a BDS > node exceeds a threshold during a write, but limited the option > to only work on node names. For convenience, expand this to > allow a device name as a way to set the threshold o

[Qemu-devel] about [SeaBIOS PATCH] Try to hard-reboot on rerun of post even on emulators.

2015-04-20 Thread Amos Kong
Hi Kevin, When I use old seabios in some stable linux release, some bootable devices (2 ide disks) would be lost when I try to restart guest by Ctrl+Alt+Delete during boot stage. Releated Red Hat BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1129549 I found an upstream commit [1] fixed this bu

Re: [Qemu-devel] [PATCH v4] vhost: fix log base address

2015-04-19 Thread Amos Kong
t64_t)(unsigned long) to (uintptr_t). > Untested. > Wen Congyang, can you pls test and confirm. > > hw/virtio/vhost.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) All mentioned issues were addressed. Reviewed-by: Amos Kong > diff --git a/hw/virtio/vhost.c b/

Re: [Qemu-devel] [PATCH 2/2] e1000: unconditionally enable bus mastering

2015-02-10 Thread Amos Kong
On Fri, Feb 06, 2015 at 01:46:36PM +, Stefan Hajnoczi wrote: > On Wed, Jan 07, 2015 at 04:08:29PM +, Stefan Hajnoczi wrote: > > On Thu, Dec 18, 2014 at 05:22:19PM +0800, Amos Kong wrote: > > > After enabled network debug of e1000 in Win2012-64r2 guest, > > > Bus

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Amos Kong
On Mon, Dec 22, 2014 at 11:48:29AM +0800, Jason Wang wrote: > > On 12/19/2014 09:25 PM, Amos Kong wrote: > > Passing some invalid fds in QEMU commandline, the fds don't exist. > > QEMU will get error "TUNGETIFF ioctl() failed: Bad file descriptor", > > and c

[Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-19 Thread Amos Kong
;s effected for both netdev fds and vhost_net fds. Signed-off-by: Amos Kong --- net/tap.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net/tap.c b/net/tap.c index bde6b58..039280a 100644 --- a/net/tap.c +++ b/net/tap.c @@ -688,7 +688,7 @@ in

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Amos Kong
On Thu, Dec 18, 2014 at 10:13:07AM +0008, Jason Wang wrote: > > > On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong wrote: > >Win2012-64r2 guest doesn't set bus mastering correctly, > >it caused guest network down, this patch ignored it for > >e1000 nic for workaroundi

Re: [Qemu-devel] [PATCH 2/2] e1000: unconditionally enable bus mastering

2014-12-18 Thread Amos Kong
On Thu, Dec 18, 2014 at 09:57:29AM +0008, Jason Wang wrote: > > > On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong wrote: > >After enabled network debug of e1000 in Win2012-64r2 guest, > >Bus mastering of e1000 can't be enabled by e1000 driver. It > >c

[Qemu-devel] [PATCH 1/2] e1000: defer packets until BM enabled

2014-12-18 Thread Amos Kong
when BM is enabled. Tested-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin Signed-off-by: Amos Kong --- hw/net/e1000.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index e33a4da..ec9224b 100644 --- a/hw/net/e10

[Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Amos Kong
ed in latest version. Amos Kong (1): e1000: unconditionally enable bus mastering Michael S. Tsirkin (1): e1000: defer packets until BM enabled hw/net/e1000.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) -- 2.1.0

[Qemu-devel] [PATCH 2/2] e1000: unconditionally enable bus mastering

2014-12-18 Thread Amos Kong
st used to pass the setup, not really use it) If we disable debug function, e1000 driver can enable bus mastering bit successfully, guest network is fine. This patch changed e1000 backend to enalbe bus mastering unconditionally as a workaround. Signed-off-by: Amos Kong --- hw/n

Re: [Qemu-devel] [PATCH 1/1] virtio-rng: fix check for period_ms validity

2014-12-11 Thread Amos Kong
; --- a/hw/virtio/virtio-rng.c > +++ b/hw/virtio/virtio-rng.c > @@ -149,7 +149,7 @@ static void virtio_rng_device_realize(DeviceState *dev, > Error **errp) > VirtIORNG *vrng = VIRTIO_RNG(dev); > Error *local_err = NULL; > > -if (!vrng->conf.period_ms > 0)

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-12-08 Thread Amos Kong
g to reduce the > chance this kind of bug recurs. > > Note: these are already (tentatively-pending review) > queued in my tree, so only review/ack > is necessary. > > Michael S. Tsirkin (4): Reviewed-by: Amos Kong > migration: fix parameter validation on ram load >

Re: [Qemu-devel] [PATCH] block/rbd: fix memory leak

2014-12-03 Thread Amos Kong
gt;name); > +error_setg(errp, "error reading header from %s", s->name); > goto failed_open; > } 'local_err' was defined for collecting error insider qemu_opts_absorb_qdict(). We should set error to 'errp', then the error can be passed to caller, and free the memory in future. Reviewed-by: Amos Kong -- Amos. signature.asc Description: Digital signature

Re: [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"

2014-12-03 Thread Amos Kong
mp;1; then > +if has $c; then we use self defined has function to check command in all other place in configure. LGTM. Reviewed-by: Amos Kong > shacmd="$c" > break > fi > -- > 1.9.3 > -- Amos. signature.asc Description: Digital signature

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Amos Kong
On Tue, Nov 25, 2014 at 09:35:26AM -0700, Eric Blake wrote: > On 11/25/2014 04:58 AM, Markus Armbruster wrote: > > Amos Kong writes: > > > >> On Tue, Nov 25, 2014 at 09:06:34AM +0100, Markus Armbruster wrote: > >>> Gerd Hoffmann writes: > >>> &

Re: [Qemu-devel] [PATCH v2 for-2.2] input: move input-send-event into experimental namespace

2014-11-25 Thread Amos Kong
is running out, I'm respinning his > patch with my and Amos's review comments worked in. Hope that's okay. > > We should also pick Amos's "[PATCH] qmp: fix typo in input-send-event > examples". Reviewed-by: Amos Kong > qapi-schema.json | 6 -

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Amos Kong
On Tue, Nov 25, 2014 at 09:06:34AM +0100, Markus Armbruster wrote: > Gerd Hoffmann writes: > > > Ongoing discussions on how we are going to specify the console, > > so tag the command as experiemntal so we can refine things in > > the 2.3 development cycle. > > > > Signed-off-by: Gerd Hoffmann >

[Qemu-devel] [PATCH] qmp: fix typo in input-send-event examples

2014-11-25 Thread Amos Kong
Lack of two closed bracket in json commands. Signed-off-by: Amos Kong --- qmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 8812401..bb2e380 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3818,13 +3818,13

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-24 Thread Amos Kong
On Tue, Nov 25, 2014 at 08:18:54AM +0100, Gerd Hoffmann wrote: > Ongoing discussions on how we are going to specify the console, > so tag the command as experiemntal so we can refine things in > the 2.3 development cycle. %s/experiemntal/experimental/ Reviewed-by: Amos Kong > S

[Qemu-devel] [PATCH for-2.2] qmp: document input-send-event detail

2014-11-24 Thread Amos Kong
This patch documents what exactly input-send-event is supposed to do. Signed-off-by: Amos Kong --- qapi-schema.json | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index d0926d9..9aa19bc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-09 Thread Amos Kong
On Mon, Nov 10, 2014 at 02:54:49PM +0900, SeokYeon Hwang wrote: > Added 'assert(os_errno > 0)' in 'error_set_errno()'. > Fixed errno since it passes wrong value to 'error_set_errno()'. > > Signed-off-by: SeokYeon Hwang Reviewed-by: Amos Kong >

Re: [Qemu-devel] [PATCH v2] error: passing a negative value to an os_errno is wrong

2014-11-06 Thread Amos Kong
On Fri, Nov 07, 2014 at 11:24:55AM +0900, SeokYeon Hwang wrote: > Added 'assert(os_errno > 0)' in 'error_set_errno()'. > Fixed errno since it passes wrong value to 'error_set_errno()'. > > Signed-off-by: SeokYeon Hwang > --- > hw/pci/pcie.c | 2 +- > util/error.c | 1 + > 2 files changed, 2 ins

[Qemu-devel] [PATCH for-2.2 2/2] QMP/input-send-event: make console parameter optional

2014-11-06 Thread Amos Kong
lity(mask) to process events, and we don't want to use the first one. Cc: Gerd Hoffmann Cc: Markus Armbruster Cc: Marcelo Tosatti Signed-off-by: Amos Kong --- qapi-schema.json | 4 ++-- qmp-commands.hx | 4 ++-- ui/input.c | 15 +-- 3 files changed, 13 insertions(+)

[Qemu-devel] [PATCH for-2.2 1/2] QMP/input-send-event: update document of union InputEvent

2014-11-06 Thread Amos Kong
Signed-off-by: Amos Kong --- qapi-schema.json | 5 + 1 file changed, 5 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 24379ab..a1573d8 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3231,6 +3231,11 @@ # # Input event union. # +# @key: Input event of

Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler

2014-11-06 Thread Amos Kong
On Thu, Nov 06, 2014 at 11:01:11PM +0800, Amos Kong wrote: > On Thu, Nov 06, 2014 at 02:37:54PM +0800, Amos Kong wrote: > > On Wed, Nov 05, 2014 at 09:47:47AM +0100, Gerd Hoffmann wrote: > > > On Mi, 2014-11-05 at 00:49 +0800, Amos Kong wrote: > > > > qemu_input_fi

Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler

2014-11-06 Thread Amos Kong
On Thu, Nov 06, 2014 at 02:37:54PM +0800, Amos Kong wrote: > On Wed, Nov 05, 2014 at 09:47:47AM +0100, Gerd Hoffmann wrote: > > On Mi, 2014-11-05 at 00:49 +0800, Amos Kong wrote: > > > qemu_input_find_handler() prefers a handler associated with con. > > > But if none

Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler

2014-11-05 Thread Amos Kong
On Wed, Nov 05, 2014 at 09:47:47AM +0100, Gerd Hoffmann wrote: > On Mi, 2014-11-05 at 00:49 +0800, Amos Kong wrote: > > qemu_input_find_handler() prefers a handler associated with con. > > But if none exists, it takes any. This patch added a parameter > > to strictly check con

Re: [Qemu-devel] [PATCH] hw/pci: fix crash on shpc error flow

2014-11-05 Thread Amos Kong
hpc.c > @@ -662,6 +662,7 @@ void shpc_cleanup(PCIDevice *d, MemoryRegion *bar) > SHPCDevice *shpc = d->shpc; > d->cap_present &= ~QEMU_PCI_CAP_SHPC; > memory_region_del_subregion(bar, &shpc->mmio); > +object_unparent(OBJECT(&shpc->mmio)); > /* TODO:

Re: [Qemu-devel] [PATCHv2] virtio-serial: avoid crash when port has no name

2014-11-05 Thread Amos Kong
@ static void virtser_port_device_realize(DeviceState *dev, > Error **errp) > return; > } > > -if (find_port_by_name(port->name)) { > +if (port->name != NULL && find_port_by_name(port->name)) { > error_setg(errp, "virtio-serial-

Re: [Qemu-devel] QEMU trunk now in hardfreeze

2014-11-05 Thread Amos Kong
On Thu, Nov 06, 2014 at 12:51:23PM +0800, Gonglei wrote: > On 2014/11/5 23:32, Peter Maydell wrote: > > > Hi; I've just tagged v2.2.0-rc0 in master, so we're now officially > > in hardfreeze, and only accepting bug fixes from here onward. > > Mike Roth should have the rc0 tarballs out sometime lat

Re: [Qemu-devel] [PATCH] error: fixed error_set_errno() to deal with a negative type of os_error.

2014-11-05 Thread Amos Kong
On Wed, Nov 05, 2014 at 12:19:34PM +0100, Eric Blake wrote: > On 11/05/2014 12:11 PM, Max Reitz wrote: > > +err->msg = g_strdup_printf("%s: %s", msg1, > strerror(abs(os_errno))); > > >> I don't, we really should fix the callers. > > > > Of course I understand, but this patch do

[Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler

2014-11-04 Thread Amos Kong
ble strict checking in finding handler. Signed-off-by: Amos Kong --- ui/input.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/input.c b/ui/input.c index 002831e..61b26a0 100644 --- a/ui/input.c +++ b/ui/input.c @@ -98,7 +98,7 @@ void qemu_input_ha

Re: [Qemu-devel] [PATCH v2] ui/input: fix event emitting of repeated combined keys

2014-10-29 Thread Amos Kong
On Mon, Sep 29, 2014 at 11:09:56AM +0200, Gerd Hoffmann wrote: > Hi, > > > It doesn't matter, so users might release the modifier key or not. > > we should make both works > > > > 1) > > sendkey Ctrl-Scroll > > sendkey Ctrl-Scroll > > Good to know this works. > > > 2) > > sendkey Ctrl-Scroll-

Re: [Qemu-devel] [PATCH v2] ui/input: fix event emitting of repeated combined keys

2014-09-26 Thread Amos Kong
On Fri, Sep 26, 2014 at 01:24:05PM +0200, Gerd Hoffmann wrote: > On Fr, 2014-09-26 at 18:53 +0800, Amos Kong wrote: > > On Fri, Sep 26, 2014 at 12:36:50PM +0200, Gerd Hoffmann wrote: > > > On Fr, 2014-09-26 at 18:23 +0800, Amos Kong wrote: > > > > Currently we emit

Re: [Qemu-devel] [PATCH] input: fix send-key monitor command release event ordering

2014-09-26 Thread Amos Kong
> the old last-pressed first-released behavior. > > Cc: Amos Kong > Signed-off-by: Gerd Hoffmann Acked-by: Amos Kong Tested-by: Amos Kong I will rebase my second patch [1] on your patch. [1] [Qemu-devel] [PATCH] ui/input: fix event emitting of repeated combined keys >

Re: [Qemu-devel] [PATCH v2] ui/input: fix event emitting of repeated combined keys

2014-09-26 Thread Amos Kong
On Fri, Sep 26, 2014 at 12:36:50PM +0200, Gerd Hoffmann wrote: > On Fr, 2014-09-26 at 18:23 +0800, Amos Kong wrote: > > Currently we emit press events of combined keys first, then emit > > release events by reverse order. But it doesn't match with physical > > ke

[Qemu-devel] [PATCH v2] ui/input: fix event emitting of repeated combined keys

2014-09-26 Thread Amos Kong
nt order if keys contain continued & repeated keys. his patch based on: http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05150.html Cc: Gerd Hoffmann Signed-off-by: Amos Kong --- V2: rebase this patch on Gerd's better fix of release order --- ui/input-legacy.c | 14 +++--- 1

[Qemu-devel] [PATCH] ui/input: fix event emitting of repeated combined keys

2014-09-26 Thread Amos Kong
nt order if keys contain continued & repeated keys. This patch based on another sendkey fix: http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05149.html Signed-off-by: Amos Kong --- ui/input-legacy.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ui/in

[Qemu-devel] [PATCH] ui/input: correct the release order of combined keys

2014-09-26 Thread Amos Kong
Commit 2e377f17 wrongly overturned the release order of combined keys, it caused some Windows guests can't be paniced by "virsh send-key KEY_RIGHTCTRL KEY_SCROLLLOCK KEY_SCROLLLOCK" The press event order should be different with release order. Signed-off-by: Amos Kong --- ui

Re: [Qemu-devel] [PULL 2/7] input: use kbd delays for send_key monitor command

2014-09-25 Thread Amos Kong
On Wed, Jun 04, 2014 at 09:44:06AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > ui/input-legacy.c | 45 ++--- > 1 file changed, 6 insertions(+), 39 deletions(-) > > diff --git a/ui/input-legacy.c b/ui/input-legacy.c > index 2a53860..3

[Qemu-devel] [PATCH] qom: suppress conscan warning of returning null point

2014-09-19 Thread Amos Kong
e from "g_malloc0(gsize)". qemu-kvm/qom/object.c:249: dereference: Dereferencing a null pointer "ti->class". But if the passed size parameter is >= 1, then we can always get an effective pointer, the warning disappears. Signed-off-by: Amos Kong --- qom/object.c | 2 ++

Re: [Qemu-devel] [PATCH v5] virtio-pci: enable bus master for old guests

2014-09-15 Thread Amos Kong
On Mon, Sep 15, 2014 at 12:59:44PM +0300, Michael S. Tsirkin wrote: > On Mon, Sep 15, 2014 at 05:48:17PM +0800, Jason Wang wrote: > > On 09/12/2014 02:20 AM, Michael S. Tsirkin wrote: > > > commit cc943c36faa192cd4b32af8fe5edb31894017d35 > > > pci: Use bus master address space for delivering MS

Re: [Qemu-devel] [PATCH] hmp: Add info machines

2014-08-27 Thread Amos Kong
On Thu, Aug 28, 2014 at 9:44 AM, zhanghailiang < zhang.zhanghaili...@huawei.com> wrote: > On 2014/8/27 18:00, Paolo Bonzini wrote: > >> Il 27/08/2014 11:24, zhanghailiang ha scritto: >> >>> This is the hmp counterpart of qmp query_machines >>> >>> Signed-off-by: zhanghailiang >>> --- >>> hmp-com

Re: [Qemu-devel] [PATCH] Revert "virtio_rng: replace custom backend API with UserCreatable.complete() callback"

2014-08-25 Thread Amos Kong
On Tue, Aug 19, 2014 at 03:47:20PM +0100, Stefan Hajnoczi wrote: > On Sat, Aug 16, 2014 at 12:23:52AM +0800, Amos Kong wrote: > > This reverts commit 57d3e1b3f52d07d215ed96df946ee01f8d9f9526. > > > > The commit introduced a regression bug, the initialization order of >

Re: [Qemu-devel] [PATCH RESEND 1/2] rng-egd: Free old chr_name value before setting new one

2014-08-25 Thread Amos Kong
On Thu, Aug 07, 2014 at 12:18:47PM +0200, Paolo Bonzini wrote: > Il 07/08/2014 04:24, Amos Kong ha scritto: > > Eduardo, a similar patch had been applied. > > > > commit 5e490b6a504912225dff0e520e1c6af68295d238 > > Author: Amos Kong > > Date: Thu Nov 21 16:42:5

Re: [Qemu-devel] [PATCH v6 0/4] test virtio-blk hotplug

2014-08-22 Thread Amos Kong
On Sun, Jul 06, 2014 at 08:14:46PM +0800, Amos Kong wrote: > On Wed, Jun 25, 2014 at 09:15:12AM +0800, Amos Kong wrote: > > It's worth to add a hotplug test to qtest, but without > > cooperation of guest OS, new devices can't be initialized > > by gue

[Qemu-devel] [PATCH] Revert "virtio_rng: replace custom backend API with UserCreatable.complete() callback"

2014-08-15 Thread Amos Kong
-egd,chardev=chr0,id=rng0 qemu-system-x86_64: -object rng-egd,chardev=chr0,id=rng0: Device 'chr0' not found Chardev 'chr0' isn't initialized when we try to open rng backend, Signed-off-by: Amos Kong Conflicts: hw/virtio/virtio-rng.c --- backends/rng.c

Re: [Qemu-devel] [PATCH v1 4/4] virtio_rng: replace custom backend API with UserCreatable.complete() callback

2014-08-08 Thread Amos Kong
On Thu, Jan 16, 2014 at 05:34:39PM +0100, Igor Mammedov wrote: > in addition fix default backend leak by releasing it if its > initialization failed. > > Signed-off-by: Igor Mammedov Hi Igor, This patch introduced a regression. x86_64-softmmu/qemu-system-x86_64 -monitor stdio -vnc :0 \ -cha

Re: [Qemu-devel] [PATCH RESEND 2/2] hw/machine: Free old values of string properties

2014-08-06 Thread Amos Kong
On Wed, Aug 06, 2014 at 03:18:21PM -0300, Eduardo Habkost wrote: > Reviewed-by: Markus Armbruster > Reviewed-by: Marcel Apfelbaum > Signed-off-by: Eduardo Habkost Reviewed-by: Amos Kong > --- > hw/core/machine.c | 8 > 1 file changed, 8 insertions(+) > &

Re: [Qemu-devel] [PATCH RESEND 1/2] rng-egd: Free old chr_name value before setting new one

2014-08-06 Thread Amos Kong
g_free(s->chr_name); > s->chr_name = g_strdup(value); > } > } Eduardo, a similar patch had been applied. commit 5e490b6a504912225dff0e520e1c6af68295d238 Author: Amos Kong Date: Thu Nov 21 16:42:50 2013 +0800 rng-egd: remove redundant free We didn&

Re: [Qemu-devel] [PATCH 1/3] rng-random: NULL check not needed before g_free()

2014-08-06 Thread Amos Kong
On Mon, Jun 02, 2014 at 01:38:52PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > g_free() is NULL-safe. > > > > Signed-off-by: Eduardo Habkost > > --- > > Cc: Anthony Liguori > > Cc: Luiz Capitulino > > --- > > backends/rng-random.c | 5 + > > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH v2 1/1] virtio-rng: add some trace events

2014-08-04 Thread Amos Kong
On Mon, Aug 04, 2014 at 04:22:44PM +0530, Amit Shah wrote: > Add some trace events to virtio-rng for easier debugging > > Signed-off-by: Amit Shah > > --- > v2: > - requested_size trace event now shows proper values Reviewed-by: Amos Kong > --- > hw/virtio/virti

Re: [Qemu-devel] [PATCH] vhost_net: cleanup start/stop condition

2014-08-04 Thread Amos Kong
r in virtio net uses its own flag, > vhost_started, to ensure vhost is started/stopped > as appropriate. Reasonable, we already checked n->vhost_started flag in virtio-net.c when vhost_net_start() is called. Reviewed-by: Amos Kong > Signed-off-by: Michael S. Tsirkin >

Re: [Qemu-devel] [PATCH v2] po: Add Chinese translation

2014-07-31 Thread Amos Kong
mode 100644 po/zh_CN.po Reviewed-by: Amos Kong > diff --git a/po/zh_CN.po b/po/zh_CN.po > new file mode 100644 > index 000..7ffba30 > --- /dev/null > +++ b/po/zh_CN.po > @@ -0,0 +1,86 @@ > +# Chinese translation for QEMU. > +# This file is put in the public domain. &g

Re: [Qemu-devel] [PATCH v3 for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Amos Kong
; Device 'virtserialport' could not be initialized > (qemu) quit > > Reported-by: dengmin > Signed-off-by: Amit Shah Reviewed-by: Amos Kong > --- > v2: > - move calculation of 'i' inside if stmt too (Paolo) > - re-word comment > > v3: >

Re: [Qemu-devel] [RFC PATCH 1/5] bootindex: add *_boot_device_path function

2014-07-08 Thread Amos Kong
On Tue, Jul 08, 2014 at 01:22:53PM +, Gonglei (Arei) wrote: > > -Original Message- > > From: chenliang (T) > > Sent: Tuesday, July 08, 2014 7:03 PM > > To: Amos Kong > > Cc: Gonglei (Arei); qemu-devel@nongnu.org; afaer...@suse.de; > > ag...@suse.de;

Re: [Qemu-devel] [RFC PATCH 1/5] bootindex: add *_boot_device_path function

2014-07-08 Thread Amos Kong
On Mon, Jul 07, 2014 at 05:10:57PM +0800, arei.gong...@huawei.com wrote: > From: Chenliang > > Add del_boot_device_path and modify_boot_device_path. Device should > be removed from boot device list by del_boot_device_path when device > hotplug. modify_boot_device_path is used to modify deviceboo

Re: [Qemu-devel] [PATCH v6 0/4] test virtio-blk hotplug

2014-07-06 Thread Amos Kong
On Wed, Jun 25, 2014 at 09:15:12AM +0800, Amos Kong wrote: > It's worth to add a hotplug test to qtest, but without > cooperation of guest OS, new devices can't be initialized > by guest, and hot-unplug doesn't work. > > However, the new test can cover some pa

Re: [Qemu-devel] [PATCH v4 0/4] tests: add usb host adapter qtest cases

2014-06-25 Thread Amos Kong
2014-06/msg00746.html Looks good to me. Reviewed-by: Amos Kong > Changes since v3: > - rebase on latest qemu master > > Changes since v2: > - add 'const' qualifier argument in usb_hcd_hotplug > function for building errors reported by Gerd > > Changes

Re: [Qemu-devel] [PATCH v4 4/4] tests: add usb hcds hotplugging qtest

2014-06-25 Thread Amos Kong
On Mon, Jun 23, 2014 at 07:53:54PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Because of we now support usb hcds hotplugging, and > collect all hcds hotplugging tests into one file > for code sharing. > > Signed-off-by: Gonglei > --- > tests/Makefile | 2 + > test

[Qemu-devel] [PATCH v6 4/4] virtio-blk-test: add hotplug subtest

2014-06-24 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 68 + 1

[Qemu-devel] [PATCH v6 3/4] virtio-blk-test: change pci_nop() to virtblk_init()

2014-06-24 Thread Amos Kong
I want to add a new subtest in virtio-blk-test, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c | 13 ++--- 1

[Qemu-devel] [PATCH v6 0/4] test virtio-blk hotplug

2014-06-24 Thread Amos Kong
ticle.gmane.org/gmane.comp.emulators.qemu/279835) directly use QMP cmd to add/del device and blockdev cleanup as suggested by Andreas V6: hot-unplug devices of one slot once escaping string fix in 1st patch depends on (https://lists.nongnu.org/archive/html/qemu-devel/2014-06/msg03024.html

[Qemu-devel] [PATCH v6 1/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-24 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 23 +++ tests/libqtest.h | 9 + 2 files changed, 32 insertions(+) diff --git a

[Qemu-devel] [PATCH v6 2/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-24 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi Reviewed-by: Andreas Färber --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-24 Thread Amos Kong
in tests is that strings have to be > formatted as %s, not '%s' or \"%s\". Luckily this usage of > parameterized QMP commands is not that frequent. > > The leak is in socket_sendf. Since we are extracting the send > loop to a new function, fix it now. > >

Re: [Qemu-devel] [PATCH v5 3/4] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-06-18 Thread Amos Kong
On Wed, Jun 18, 2014 at 06:43:49PM +0200, Andreas Färber wrote: > Am 18.06.2014 18:24, schrieb Amos Kong: > > I want to add a new subtest in virtio-blk-test.c, it will start > > guest without network. The original pci_init() did nothing, but > > it's good to reserve a

Re: [Qemu-devel] [PATCH v5 4/4] virtio-blk-test.c: add hotplug subtest

2014-06-18 Thread Amos Kong
On Thu, Jun 19, 2014 at 04:03:28AM +, Gonglei (Arei) wrote: > Hi, > > > -Original Message- > > From: Amos Kong [mailto:ak...@redhat.com] > > Sent: Thursday, June 19, 2014 11:58 AM > > To: Stefan Hajnoczi > > Cc: qemu-devel@nongnu.org; Gonglei

Re: [Qemu-devel] [PATCH v5 4/4] virtio-blk-test.c: add hotplug subtest

2014-06-18 Thread Amos Kong
On Thu, Jun 19, 2014 at 11:49:08AM +0800, Stefan Hajnoczi wrote: > On Thu, Jun 19, 2014 at 12:24:13AM +0800, Amos Kong wrote: > > +for (i = MIN_PCI_SLOT; i <= MAX_PCI_SLOT; i++) { > > +for (j = MAX_PCI_FUNC; j >= 0; j--) { > > +

[Qemu-devel] [PATCH v5 2/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-18 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi Reviewed-by: Andreas Färber --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests

[Qemu-devel] [PATCH v5 0/4] test virtio-blk hotplug

2014-06-18 Thread Amos Kong
ticle.gmane.org/gmane.comp.emulators.qemu/279835) directly use QMP cmd to add/del device and blockdev cleanup as suggested by Andreas Amos Kong (4): qtest: introduce qmp_exec_hmp_cmd() qtest: use qmp_exec_hmp_cmd() in blockdev-test virtio-blk-test.c: change pci_nop() to virtblk_init() virtio-

[Qemu-devel] [PATCH v5 3/4] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-06-18 Thread Amos Kong
I want to add a new subtest in virtio-blk-test.c, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c | 13 ++-

[Qemu-devel] [PATCH v5 1/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-18 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 23 +++ tests/libqtest.h | 9 + 2 files changed, 32 insertions(+) diff --git a

[Qemu-devel] [PATCH v5 4/4] virtio-blk-test.c: add hotplug subtest

2014-06-18 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 68 + 1

Re: [Qemu-devel] [PATCH v6 2/3] qapi: add const prefix to 'char *' insider c_type()

2014-06-18 Thread Amos Kong
On Tue, Jun 17, 2014 at 09:51:21PM -0600, Eric Blake wrote: > On 06/10/2014 05:25 AM, Amos Kong wrote: > > It's ugly to add const prefix for parameter type by an if statement > > outside c_type(). This patch adds a parameter to do it. > > > > Signed-off-by: Amo

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-18 Thread Amos Kong
- Fixed Andreas's mail address On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only

Re: [Qemu-devel] [PATCH v4 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-17 Thread Amos Kong
On Tue, Jun 17, 2014 at 03:25:34PM +0200, Andreas Färber wrote: > Am 06.06.2014 16:33, schrieb Amos Kong: > > This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk > > devices to guest, and try to hot-unplug them. > > > > Note: the hot-unplug can't w

Re: [Qemu-devel] [PATCH v4 2/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-17 Thread Amos Kong
On Tue, Jun 17, 2014 at 07:37:06PM +0200, Paolo Bonzini wrote: > Il 06/06/2014 16:33, Amos Kong ha scritto: > >+va_end(ap); > >+ > >+escaped_cmd = g_strescape(cmd, NULL); > >+response = qmp("{\"execute\": \"human-monitor-c

Re: [Qemu-devel] [PATCH] json-lexer: fix escaped backslash in single-quoted string

2014-06-17 Thread Amos Kong
On Fri, Jun 13, 2014 at 10:13:02AM +0200, Paolo Bonzini wrote: > This made the lexer wait for a closing *double* quote. > > Signed-off-by: Paolo Bonzini Reviewed-by: Amos Kong > --- > qobject/json-lexer.c | 4 ++-- > tests/check-qjson.c | 7 +++ > 2 files change

Re: [Qemu-devel] [PATCH v4 0/4] test virtio-blk hotplug

2014-06-17 Thread Amos Kong
On Wed, Jun 18, 2014 at 10:58:52AM +0800, Amos Kong wrote: > On Tue, Jun 17, 2014 at 03:37:08PM +0200, Andreas Färber wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Hi Amos, > > > > Am 17.06.2014 14:54, schrieb Amos Kong: > &g

Re: [Qemu-devel] [PATCH v4 0/4] test virtio-blk hotplug

2014-06-17 Thread Amos Kong
On Tue, Jun 17, 2014 at 03:37:08PM +0200, Andreas Färber wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Amos, > > Am 17.06.2014 14:54, schrieb Amos Kong: > > On Mon, Jun 09, 2014 at 03:22:51PM +0200, Stefan Hajnoczi wrote: > >> On Fri, Jun 06, 20

Re: [Qemu-devel] [PATCH v4 0/4] test virtio-blk hotplug

2014-06-17 Thread Amos Kong
On Mon, Jun 09, 2014 at 03:22:51PM +0200, Stefan Hajnoczi wrote: > On Fri, Jun 06, 2014 at 10:33:49PM +0800, Amos Kong wrote: > > It's worth to add a hotplug test to qtest, but without > > cooperation of guest OS, new devices can't be initialized > > by gue

[Qemu-devel] [PATCH v6 0/3] qapi: fix coding style in generated code

2014-06-10 Thread Amos Kong
eanup special string (Paolo) V5: fix string checking bug (Luiz), update commitlog (Eric) add comments for c_type() function V6: add is_c_ptr() and fix lost endswith (Markus) Amos Kong (3): qapi: fix coding style in parameters list qapi: add const prefix to 'char *' insider

[Qemu-devel] [PATCH v6 3/3] qapi: Suppress unwanted space between type and identifier

2014-06-10 Thread Amos Kong
We always generate a space between type and identifier in parameter and variable declarations, even when idiomatic C style doesn't have a space there. Suppress it. Signed-off-by: Amos Kong --- scripts/qapi-commands.py | 4 ++-- scripts/qapi.py | 23 +-- 2

[Qemu-devel] [PATCH v6 2/3] qapi: add const prefix to 'char *' insider c_type()

2014-06-10 Thread Amos Kong
It's ugly to add const prefix for parameter type by an if statement outside c_type(). This patch adds a parameter to do it. Signed-off-by: Amos Kong Suggested-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Reviewed-by: Markus Armbruster --- scripts/qapi-comman

[Qemu-devel] [PATCH v6 1/3] qapi: fix coding style in parameters list

2014-06-10 Thread Amos Kong
A space after * when declaring a pointer type is redundant. Signed-off-by: Amos Kong Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Reviewed-by: Markus Armbruster --- scripts/qapi-visit.py | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts

Re: [Qemu-devel] [PATCH v5 3/3] qapi: Suppress unwanted space between type and identifier

2014-06-09 Thread Amos Kong
On Mon, Jun 02, 2014 at 05:43:58PM +0200, Markus Armbruster wrote: > Amos Kong writes: > > > We always generate a space between type and identifier in parameter > > and variable declarations, even when idiomatic C style doesn't have > > a space there. Suppress it

Re: [Qemu-devel] [PATCH 2/2] virtio-blk-test.c: add hotplug subtest

2014-06-09 Thread Amos Kong
On Sun, Jun 08, 2014 at 05:57:11PM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 05, 2014 at 01:12:46PM +0800, Amos Kong wrote: > > On Wed, Jun 04, 2014 at 05:35:06PM +0200, Stefan Hajnoczi wrote: > > > On Tue, May 27, 2014 at 03:14:41PM +0800, Amos Kong wrote: > > &

[Qemu-devel] [PATCH v4 1/4] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-06-06 Thread Amos Kong
I want to add a new subtest in virtio-blk-test.c, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c | 13 ++-

[Qemu-devel] [PATCH v4 0/4] test virtio-blk hotplug

2014-06-06 Thread Amos Kong
port. V2: move qmp_exec_hmp_cmd() to libqtest.c excape hmp cmd (stefanha) use qmp_exec_hmp_cmd() in blockdev-test V3: use vp_list to format string, free escaped string V4: free escaped string by g_free() Amos Kong (4): virtio-blk-test.c: change pci_nop() to virtblk_init() q

[Qemu-devel] [PATCH v4 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-06 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c

[Qemu-devel] [PATCH v4 2/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-06 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 26 ++ tests/libqtest.h | 9 + 2 files changed, 35 insertions(+) diff --git

[Qemu-devel] [PATCH v4 4/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-06 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests/blockdev-test.c +++ b/tests

Re: [Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-06 Thread Amos Kong
On Fri, Jun 06, 2014 at 09:31:57AM +, Gonglei (Arei) wrote: > > -Original Message- > > From: Amos Kong [mailto:ak...@redhat.com] > > Sent: Friday, June 06, 2014 4:24 PM > > To: Gonglei (Arei) > > Cc: qemu-devel@nongnu.org; stefa...@gmail.com; afaer...@suse

Re: [Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-06 Thread Amos Kong
On Fri, Jun 06, 2014 at 08:05:15AM +, Gonglei (Arei) wrote: > > -Original Message- > > From: Amos Kong [mailto:ak...@redhat.com] > > Sent: Friday, June 06, 2014 1:29 PM > > To: Gonglei (Arei) > > Cc: qemu-devel@nongnu.org; stefa...@gmail.com; afaer...@suse

Re: [Qemu-devel] active block commit bug?

2014-06-05 Thread Amos Kong
On Thu, Jun 05, 2014 at 09:06:42AM +0200, Markus Armbruster wrote: > Eric Blake writes: > > > On 06/04/2014 08:09 PM, Fam Zheng wrote: > > > >>> Sounds like we have an off-by-one condition if empty files behave > >>> differently from other files. We ought to fix that bug (not that your > >>> nor

Re: [Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-05 Thread Amos Kong
On Fri, Jun 06, 2014 at 01:28:59AM +, Gonglei (Arei) wrote: > Hi, Amos > > > -Original Message- > > From: Amos Kong [mailto:ak...@redhat.com] > > Sent: Friday, June 06, 2014 9:12 AM > > To: qemu-devel@nongnu.org > > Cc: stefa...@gmail.com; afaer...

[Qemu-devel] [PATCH v3 2/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-05 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 26 ++ tests/libqtest.h | 9 + 2 files changed, 35 insertions(+) diff --git

[Qemu-devel] [PATCH v3 4/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-05 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests/blockdev-test.c +++ b/tests

  1   2   3   4   5   6   7   8   9   >