[Qemu-devel] [PATCH v2 2/4] monitor: fix access freed memory

2014-08-05 Thread zhanghailiang
The function monitor_fdset_dup_fd_find_remove() references member of 'mon_fdset' which may be freed in function monitor_fdset_cleanup() Signed-off-by: zhanghailiang --- monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 5bc70a6..41e46a6 1

[Qemu-devel] [PATCH v2 1/4] l2cap: fix access freed memory

2014-08-05 Thread zhanghailiang
Pointer 'ch' will be used in function 'l2cap_channel_open_req_msg' after it was previously freed in 'l2cap_channel_open'. Assigned it to NULL after it is freed. Reviewed-by: Alex Bennée Signed-off-by: zhanghailiang --- hw/bt/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Qemu-devel] [PATCH v2 4/4] ivshmem: check the value returned by fstat()

2014-08-05 Thread zhanghailiang
The function fstat() may fail, so check its return value. Signed-off-by: zhanghailiang --- hw/misc/ivshmem.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 768e528..5d939d2 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.

Re: [Qemu-devel] qemu live migration error from 2.0 to 2.1

2014-08-05 Thread Markus Armbruster
William Dauchy writes: > On Tue, Aug 5, 2014 at 8:57 PM, Dr. David Alan Gilbert > wrote: >> Can you confirm this is on the final 2.1 release (there was a fix that >> went in just around rc5). > > for the receiver, I'm using 2.1 > # qemu-system-x86_64 --version > QEMU emulator version 2.1.0, Copy

[Qemu-devel] [PATCH v2 3/4] virtio-blk: fix reference a pointer which might be freed

2014-08-05 Thread zhanghailiang
In function virtio_blk_handle_request, it may freed memory pointed by req, So do not access member of req after calling this function. Reviewed-by: Stefan Hajnoczi Signed-off-by: zhanghailiang --- hw/block/virtio-blk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [v3][PATCH 2/4] hw:i386:pc_piix: split pc_init1()

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:32PM +0800, Tiejun Chen wrote: We'd like to split pc_init1 and then we can share something with other stuff. Signed-off-by: Tiejun Chen With patch 1 in place, this should not be necessary - just propage the correct ty

[Qemu-devel] [PATCH v2 0/4] fix several bugs about use-after-free and an api abuse

2014-08-05 Thread zhanghailiang
v1 -> v2: -ivshmem: modified the log message according to reviewing suggestion of Michael zhanghailiang (4): l2cap: fix access freed memory monitor: fix access freed memory virtio-blk: fix reference a pointer which might be freed ivshmem: check the value returned by fstat() hw/block/virt

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Markus Armbruster
"Zhang Haoyu" writes: >> The output is on qemu's stderr. You are in control of what that > stderr is. > > I don't get why we can configure > -D /path/to/unique/file/name.log > > but we also have to redirect stderr (I didn't checked if the daemonize > option was cl

Re: [Qemu-devel] [v3][PATCH 1/4] i440fx: make types configurable at run-time

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:31PM +0800, Tiejun Chen wrote: Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen You should have a

Re: [Qemu-devel] [v3][PATCH 3/4] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:50, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:33PM +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen -

Re: [Qemu-devel] [v3][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:51, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:30PM +0800, Tiejun Chen wrote: v3: * Drop patch #4 * Add one patch #1 from Michael * Rebase You added my patch but don't use it, so most of my comment weren't addressed. I guess I should cover those comments and post

[Qemu-devel] [Bug 1353149] [NEW] qemu 2.1.0 fails to start if number of cores is greater than 1.

2014-08-05 Thread asavah
Public bug reported: qemu (kvm) 2.1.0 (built from sources) fails to start if number of cores is greater than 1. relevant part of commandline arguments: /usr/bin/qemu-system-x86_64 -name test3 -S -machine pc- i440fx-2.1,accel=kvm,usb=off -cpu Westmere -m 4096 -realtime mlock=off -smp 1,maxcpus=4,

Re: [Qemu-devel] about -enable-kvm options

2014-08-05 Thread Gareth
Thanks Richard :) On Sat, Aug 2, 2014 at 4:47 AM, Richard W.M. Jones wrote: > On Fri, Aug 01, 2014 at 11:15:29AM +0800, Gareth wrote: > > Hi all > > > > What does '-enable-kvm' option mean? I have heard two versions of > answers: > > It's a shortcut for: > > $qemu -machine accel=kvm > > > a)

[Qemu-devel] [v4][PATCH 1/5] i440fx: make types configurable at run-time

2014-08-05 Thread Tiejun Chen
From: "Michael S. Tsirkin" Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - include/hw/i386/pc.h | 6 +++

[Qemu-devel] [v4][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
v4: * Rebase on latest tree * Drop patch #2 * Regenerate patches after Michael introduce patch #1 * We need to use this pci_type as a index to reuse I440FX_PCI_DEVICE() * Test: boot with a preinstalled winxp ./i386-softmmu/qemu-system-i386 -hda winxp-32.img -m 2560 -boot c -machine pc v3: * Dr

[Qemu-devel] [v4][PATCH 5/5] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
Now we can introduce a new machine, xenigd, specific to IGD passthrough. This can avoid involving other common codes. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 43 +++ 1 file changed, 43 insertions(+) v4: * Rebase v3: * Rebase v2: * Unify pr

[Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types

2014-08-05 Thread Tiejun Chen
Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) v4: * New patch to work for patch #1 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bf26550..2bf8046 100644 --- a/hw/i386/pc_

[Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index

2014-08-05 Thread Tiejun Chen
We need to use this index to reuse this macro later Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) v4: * New patch to extend I440FX_PCI_DEVICE diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 0cd82b8..4330599 100644

[Qemu-devel] [v4][PATCH 4/5] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 39 +++ include/hw/i386/pc.h | 2 ++ 2 files

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Michael S. Tsirkin
On Wed, Aug 06, 2014 at 08:05:46AM +0200, Markus Armbruster wrote: > "Gonglei (Arei)" writes: > > > Hi, > > > >> > > >> > $WHATEVER: don't use 'Yoda conditions' > >> > > >> > 'Yoda conditions' are not part of idiomatic QEMU coding > >> > style, so rewrite them in the more usual order. > >> > >>

<    1   2   3