Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-08-31 Thread Gonglei (Arei)
> From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, September 01, 2014 2:43 PM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > Importance: High > > Hi, > > > +static bool is_same_fw_dev_path(DeviceState *src, DeviceState *dst) > > +{ > > +bool ret

Re: [Qemu-devel] [PATCH v2] ioh3420: Remove unused ioh3420_init() declaration

2014-08-31 Thread Michael S. Tsirkin
On Mon, Aug 25, 2014 at 08:20:31PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > This patch based on Knut's patch: > > ioh3420: Remove unused ioh3420_init() declaration > > which has been pulled on the fly. > > Signed-off-by: Gonglei > Reviewed-by: Knut Omang Applied. > --- > v

Re: [Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-31 Thread Michael S. Tsirkin
On Mon, Sep 01, 2014 at 10:08:34AM +0800, Chen, Tiejun wrote: > On 2014/8/31 16:48, Michael S. Tsirkin wrote: > >On Fri, Aug 29, 2014 at 09:23:48AM +0800, Chen, Tiejun wrote: > >>On 2014/8/28 9:44, Chen, Tiejun wrote: > >>>On 2014/8/27 21:03, Michael S. Tsirkin wrote: > On Wed, Aug 27, 2014 at

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-08-31 Thread Gerd Hoffmann
Hi, > +static bool is_same_fw_dev_path(DeviceState *src, DeviceState *dst) > +{ > +bool ret = false; > +char *devpath_src = qdev_get_fw_dev_path(src); > +char *devpath_dst = qdev_get_fw_dev_path(dst); > + > +if (!strcmp(devpath_src, devpath_dst)) { > +ret = true; > +}

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread Gonglei (Arei)
> -Original Message- > From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Monday, September 01, 2014 2:08 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Michael S. Tsirkin; > Luone

Re: [Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread Peter Crosthwaite
On Mon, Sep 1, 2014 at 3:50 PM, wrote: > From: Gonglei > > At present, this function doesn't have partial cleanup implemented, > which will cause resource leak in some scenarios. > > Example: > > 1. Assuming that "dc->realize(dev, &local_err)" execute successful >and local_err == NULL; > 2.

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-08-31 Thread Michael S. Tsirkin
On Mon, Sep 01, 2014 at 10:50:37AM +0800, Chen, Tiejun wrote: > On 2014/8/31 16:58, Michael S. Tsirkin wrote: > >On Fri, Aug 29, 2014 at 09:28:50AM +0800, Chen, Tiejun wrote: > >> > >> > >>On 2014/8/28 8:56, Chen, Tiejun wrote: > >+ */ > >+dev = pci_create_simple(bus, PCI_DE

[Qemu-devel] [PATCH v3 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread arei.gonglei
From: Gonglei At present, this function doesn't have partial cleanup implemented, which will cause resource leak in some scenarios. Example: 1. Assuming that "dc->realize(dev, &local_err)" execute successful and local_err == NULL; 2. Executing device hotplug in hotplug_handler_plug(), but fa

[Qemu-devel] [PATCH v3 3/3] pcie: don't assert when hotplug a PCIe device with 'function != 0'

2014-08-31 Thread arei.gonglei
From: Gonglei It's enough to report an error. Assert() is not acceptable because the error is not a fatal error. Signed-off-by: Gonglei --- hw/pci/pcie.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 1babddf..ab7f8a2 100644 --- a/h

[Qemu-devel] [PATCH v3 0/3] Refactor device_set_realized to avoid resource leak.

2014-08-31 Thread arei.gonglei
From: Gonglei after committing [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API If devcie hotplugging failed, will casuse resource leak. This patch series include address resouce leak and two other issuses. v3 -> v2: Thanks for Peter's suggestion: - add cleanup

[Qemu-devel] [PATCH v3 1/3] qdev: using error_abort instead of using local_err

2014-08-31 Thread arei.gonglei
From: Gonglei This error can not happen normally. If it happens indicates something very wrong, we should abort QEMU. moreover, The user can only refer to /machine/peripheral, not /machine/unattached. Meanwhile remove superfluous check about local_err. Signed-off-by: Gonglei Reviewed-by: Peter

[Qemu-devel] [PATCH] block: kill tail whitespace in block.c

2014-08-31 Thread Liu Yuan
Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Liu Yuan --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index e9380f6..c12b8de 100644 --- a/block.c +++ b/block.c @@ -2239,7 +2239,7 @@ int bdrv_commit(BlockDriverState *bs) if (!drv)

[Qemu-devel] [PATCH] cpu: init vmstate for ticks and clock offset

2014-08-31 Thread Pavel Dovgalyuk
Ticks and clock offset used by CPU timers have to be saved in vmstate. But vmstate for these fields registered only in icount mode. Missing registration leads to breaking the continuity when vmstate is loaded. This patch introduces new initialization function which fixes this. Signed-off-by: Pavel

[Qemu-devel] bug (bisected): qemu-system-sh4 serial console, ctrl-C kills emulator

2014-08-31 Thread Rob Landley
If you grab http://landley.net/aboriginal/bin/qemu-system-sh4.tar.bz2 extract it and ./run-emulator.sh (which is a fairly straightforward qemu-system-sh4 invocation on the included kernel image and squashfs root filesystem), older qemu versions would run it just fine, and ctrl-C would pass through

Re: [Qemu-devel] [PATCH v2 2/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-08-31 Thread Gonglei (Arei)
> From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Tuesday, August 26, 2014 10:25 AM > Subject: Re: [Qemu-devel] [PATCH v2 2/3] qdev: add cleanup logic in > device_set_realized() to avoid resource leak > > On Thu, Aug 21, 2014

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-08-31 Thread Chen, Tiejun
On 2014/8/31 16:58, Michael S. Tsirkin wrote: On Fri, Aug 29, 2014 at 09:28:50AM +0800, Chen, Tiejun wrote: On 2014/8/28 8:56, Chen, Tiejun wrote: + */ +dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0), +"xen-igd-passthrough-isa-bridge"); +if (dev) { +

[Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-31 Thread Tiejun Chen
We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in the future. Signed-off-by: Tiejun Chen --- hw/i386/kvm/pci-assign.c| 136 +--- include/hw/pci/pci-assign.h

[Qemu-devel] [PATCH 0/1] qemu:pci-assign: try to pci-assign.c

2014-08-31 Thread Tiejun Chen
v2: * v1 is making so much code inline, so try to move it to an out of line file. * rename pci-assign not pci_assign. A you know I'm working on supporting IGD passthrough. Here we need load VGABIOS to work out IGD case. Obviously something may be duplicated to kvm codes, we should unify some cod

Re: [Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-31 Thread Chen, Tiejun
On 2014/8/31 16:48, Michael S. Tsirkin wrote: On Fri, Aug 29, 2014 at 09:23:48AM +0800, Chen, Tiejun wrote: On 2014/8/28 9:44, Chen, Tiejun wrote: On 2014/8/27 21:03, Michael S. Tsirkin wrote: On Wed, Aug 27, 2014 at 05:13:07PM +0800, Tiejun Chen wrote: We will try to reuse assign_dev_load_op

Re: [Qemu-devel] [PATCH v2] ioh3420: Remove unused ioh3420_init() declaration

2014-08-31 Thread Gonglei (Arei)
Hi, Michael Do you plan to pick up this patch? Thanks. Best regards, -Gonglei > -Original Message- > From: Gonglei (Arei) > Sent: Monday, August 25, 2014 8:21 PM > To: qemu-devel@nongnu.org > Cc: m...@redhat.com; Huangweidong (C); knut.om...@oracle.com; > arm...@redhat.com; Gonglei (Arei

Re: [Qemu-devel] [Qemu-trivial] [RESEND v2 0/3] Fix some memory leaks about query memdev

2014-08-31 Thread chen.fan.f...@cn.fujitsu.com
On Fri, 2014-08-29 at 20:29 +0400, Michael Tokarev wrote: > 18.08.2014 10:46, Chen Fan wrote: > > when using valgrind to test the command "query memdev", I had > > found some memory leaks. the test result: > ... > > Applied all 3 to -trivial. Usually these are not really trivial. > Please note t

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property

2014-08-31 Thread Gonglei (Arei)
> From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Sunday, August 31, 2014 5:58 PM > Subject: Re: [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex > property > > On Sat, Aug 30, 2014 at 06:00:07PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > when we rem

[Qemu-devel] [RFC PATCH v2 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-08-31 Thread Gavin Shan
The PCI device MSIx table is cleaned out in hardware after EEH PE reset. However, we still hold the stale MSIx entries in QEMU, which should be cleared accordingly. Otherwise, we will run into another (recursive) EEH error and the PCI devices contained in the PE have to be offlined exceptionally.

[Qemu-devel] [RFC PATCH v2 0/2] Fix MSIx lost after PE reset

2014-08-31 Thread Gavin Shan
The 2 patches fix MSIx lost after PE reset. Otherwise, the MSIx entries can't be restored successfully after PE reset and the EEH recovery fails on broadcom tg3 adapter (as tested) in guest. Note: The patchset "EEH support for guest" isn't merged yet, those 2 patches are based on Alex Graf's

[Qemu-devel] [RFC PATCH v2 1/2] VFIO: Drop vfio_container_do_ioctl()

2014-08-31 Thread Gavin Shan
The patch drops vfio_container_do_ioctl() and merges its logic to parent function call vfio_container_ioctl() so that the subsequent patches can reused the found VFIO group in vfio_container_ioctl(). Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 33 +++-- 1 file chan

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-31 Thread Benoît Canet
The Sunday 31 Aug 2014 à 13:03:14 (-0700), Andy Grover wrote : > On 08/30/2014 09:02 AM, Richard W.M. Jones wrote: > >On Sat, Aug 30, 2014 at 05:53:43PM +0200, Benoît Canet wrote: > >>If the cloud provider want to be able to boot QCOW2 or QED images on > >>bare metal machines he will need to export

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-31 Thread Andy Grover
On 08/30/2014 09:02 AM, Richard W.M. Jones wrote: On Sat, Aug 30, 2014 at 05:53:43PM +0200, Benoît Canet wrote: If the cloud provider want to be able to boot QCOW2 or QED images on bare metal machines he will need to export QCOW2 or QED images on the network. So far only qemu-nbd allows to do t

Re: [Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Peter Maydell
On 31 August 2014 18:37, Peter Maydell wrote: > On 31 August 2014 13:06, Karl-Philipp Richter wrote: >> qemu-seccomp.c:186:1: error: '__NR_alarm' undeclared here (not in a >> function) >> make: *** [qemu-seccomp.o] Error 1 > > Ccing Eduardo for the seccomp compile issues. Oops, wron

Re: [Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Peter Maydell
On 31 August 2014 13:06, Karl-Philipp Richter wrote:. > `configure`should not succeed for a failing build. Your compile failures are definitely bugs, but it isn't expected that configure will detect all possible kinds of build failure in advance. For what it's worth I always build on ARM as pa

[Qemu-devel] [PATCH] qcow2: add update refcount table realization for update_refcount

2014-08-31 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. Signed-off-by: Jun Li --- block/qcow2-refcount.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-

[Qemu-devel] [PATCH] pl061: implement input interrupt logic

2014-08-31 Thread Colin Leitner
This patch adds the missing input interrupt logic to the pl061 GPIO device. To keep the floating output pins to stay high, the old state variable had to be split into two separate ones for input and output - which brings the vmstate version to 3. Edge level interrupts and I/O were tested under Lin

[Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Karl-Philipp Richter
** Description changed: After `make clean` and `git clean -x -f -d` `git checkout v2.1.0 && configure --prefix=/home/user/prefix-qemu-2.1.0 && make` fails due to missing declarations CCqemu-seccomp.o qemu-seccomp.c:28:1: error: '__NR_select' undeclared here (not in a func

[Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Karl-Philipp Richter
** Attachment added: "config.log.v2.1.0" https://bugs.launchpad.net/qemu/+bug/1363641/+attachment/4191499/+files/config.log.v2.1.0 ** Description changed: After `make clean` and `git clean -x -f -d` `git checkout v2.1.0 && configure --prefix=/home/user/prefix-qemu-2.1.0 && make` fails due

[Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Karl-Philipp Richter
** Attachment added: "config.log.master" https://bugs.launchpad.net/qemu/+bug/1363641/+attachment/4191498/+files/config.log.master -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1363641 Title: B

[Qemu-devel] [Bug 1363641] [NEW] Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-08-31 Thread Karl-Philipp Richter
Public bug reported: After `make clean` and `git clean -x -f -d` `git checkout v2.1.0 && configure --prefix=/home/user/prefix-qemu-2.1.0 && make` fails due to missing declarations CCqemu-seccomp.o qemu-seccomp.c:28:1: error: '__NR_select' undeclared here (not in a function) qemu-

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property

2014-08-31 Thread Michael S. Tsirkin
On Sat, Aug 30, 2014 at 06:00:07PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > when we remove bootindex form qdev.property to qom.property, > we can use those functions set/get bootindex property for all > correlative devices. > > Signed-off-by: Gonglei > --- > include/sysemu/sys

Re: [Qemu-devel] [Qemu-trivial] [PATCH] IDE: MMIO IDE device control should be little endian

2014-08-31 Thread Valentin Manea
On 2014-08-28 14:13, Stefan Hajnoczi wrote: > Hi Valentin, > Please resend the patch to qemu-devel@nongnu.org and CC Kevin Wolf > and Stefan Hajnoczi . > > All patches must go through the mailing list so the community has a > chance to review and comment before a committer applies them. Hi Stefa

[Qemu-devel] [PATCH] IDE: MMIO IDE device control should be little endian

2014-08-31 Thread Valentin Manea
Set the IDE MMIO memory type to little endian. The ATA specs identify words part of the control commands encoded as little endian. While this has no impact on little endian systems, it's required for big endian systems(eg OpenRisc). Signed-off-by: Valentin Manea --- hw/ide/mmio.c | 4 ++-- 1 fi

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-08-31 Thread Michael S. Tsirkin
On Fri, Aug 29, 2014 at 09:28:50AM +0800, Chen, Tiejun wrote: > > > On 2014/8/28 8:56, Chen, Tiejun wrote: > >>>+ */ > >>>+dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0), > >>>+"xen-igd-passthrough-isa-bridge"); > >>>+if (dev) { > >>>+

Re: [Qemu-devel] [PATCH 1/1] hw/pci-assign: split pci-assign.c

2014-08-31 Thread Michael S. Tsirkin
On Fri, Aug 29, 2014 at 09:23:48AM +0800, Chen, Tiejun wrote: > On 2014/8/28 9:44, Chen, Tiejun wrote: > >On 2014/8/27 21:03, Michael S. Tsirkin wrote: > >>On Wed, Aug 27, 2014 at 05:13:07PM +0800, Tiejun Chen wrote: > >>>We will try to reuse assign_dev_load_option_rom in xen side, and > >>>especia