[Qemu-devel] [PATCH] hw/ide: fix a writing to null pointer exception

2016-08-02 Thread chaojianhu
From: chaojianhu Date: Tue, 2 Aug 2016 17:39:16 +0800 Subject: [PATCH] hw/ide: fix a writing to null pointer exception In qemu less than v2.1.3, ide_flush_cache calls ide_flush_cb with s->bs == NULL, and ide_flush_cb calls bdrv_acct_done without checking s->bs neither. Finally, bdrv_acct_done wr

[Qemu-devel] [Patch v1 27/29] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion"

2016-08-02 Thread David Hildenbrand
In order to expand CPU models, we create temporary cpus that handle the feature/group parsing. When converting the data structure back, we always fall back to the static base CPU model, which is by definition migration-safe. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s

[Qemu-devel] [Patch v1 06/29] s390x/cpumodel: generate CPU feature group lists

2016-08-02 Thread David Hildenbrand
Feature groups will be very helpful to reduce the amount of features typically available in sane configurations. E.g. the MSA facilities introduced loads of subfunctions, which could - in theory - go away in the future, but we want to avoid reporting hundrets of features to the user if usually all

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Jan Kiszka
On 2016-08-02 13:58, David Kiarie wrote: > > > On Tue, Aug 2, 2016 at 1:28 PM, Peter Xu > wrote: > > On Tue, Aug 02, 2016 at 10:46:13AM +0200, Jan Kiszka wrote: > > On 2016-08-02 10:36, Peter Xu wrote: > > > On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kis

[Qemu-devel] [Patch v1 26/29] qmp: add QMP interface "query-cpu-model-baseline"

2016-08-02 Thread David Hildenbrand
Let's provide a standardized interface to baseline two CPU models, to create a third, compatible one. The returned CPU model is a static CPU model, so it will never change between QEMU machines. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- include/sysemu/arch_init.h

[Qemu-devel] [PATCH v2 0/2] xen: bug fixes in Xen backend handling

2016-08-02 Thread Juergen Gross
When testing qemu based pvusb backend two bugs have been discovered: - detaching of a usb controller leads to memory clobbering in qemu - detaching of a usb device with active I/O requests could result in crash of qemu V2: remove checkpatch warnings for patch 2 as requested by Gerd Hoffmann Jue

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread David Kiarie
On Tue, Aug 2, 2016 at 3:12 PM, Peter Xu wrote: > On Tue, Aug 02, 2016 at 02:58:55PM +0300, David Kiarie wrote: > > > Sure. David, so do you like to do it or I cook this patch? :) > > > > If there are no objections I will look at this employing Jan's approach: > > associating a write with an addr

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Peter Xu
On Tue, Aug 02, 2016 at 02:58:55PM +0300, David Kiarie wrote: > > Sure. David, so do you like to do it or I cook this patch? :) > > If there are no objections I will look at this employing Jan's approach: > associating a write with an address space. Do you mean to translate current stl_le_phys()

[Qemu-devel] [PATCH] hw/ide: fix a writing to null pointer exception

2016-08-02 Thread chaojianhu
From: chaojianhu Date: Tue, 2 Aug 2016 17:39:16 +0800 Subject: [PATCH] hw/ide: fix a writing to null pointer exception In qemu less than v2.1.3, ide_flush_cache calls ide_flush_cb with s->bs == NULL, and ide_flush_cb calls bdrv_acct_done without checking s->bs neither. Finally, bdrv_acct_done wr

Re: [Qemu-devel] [PULL 0/1] MAINTAINERS: Add Host Memory Backends section

2016-08-02 Thread Peter Maydell
On 2 August 2016 at 12:25, Eduardo Habkost wrote: > The following changes since commit cc0100f464c94bf80ad36cd432f4a1ed58126b60: > > MAINTAINERS: Update the Xilinx maintainers (2016-08-01 15:31:32 +0100) > > are available in the git repository at: > > git://github.com/ehabkost/qemu.git tags/nu

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread David Kiarie
On Tue, Aug 2, 2016 at 3:16 PM, Jan Kiszka wrote: > On 2016-08-02 13:58, David Kiarie wrote: > > > > > > On Tue, Aug 2, 2016 at 1:28 PM, Peter Xu > > wrote: > > > > On Tue, Aug 02, 2016 at 10:46:13AM +0200, Jan Kiszka wrote: > > > On 2016-08-02 10:36, Peter Xu w

Re: [Qemu-devel] [RFC PATCH 1/3] hw/arm/virt: add hotplug memory support

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 08:59:46 +0100 Peter Maydell wrote: > On 1 August 2016 at 10:14, Igor Mammedov wrote: > > On Mon, 1 Aug 2016 09:13:34 +0100 > > Peter Maydell wrote: > >> On 1 August 2016 at 08:46, Igor Mammedov wrote: > >> > Base alignment comes from max supported hugepage size, > >>

Re: [Qemu-devel] [RFC PATCH 03/11] qemu-clk: allow to bound two clocks together

2016-08-02 Thread KONRAD Frederic
Le 29/07/2016 à 15:39, Peter Maydell a écrit : On 13 June 2016 at 17:27, wrote: From: KONRAD Frederic This introduces the clock binding and the update part. When the qemu_clk_rate_update(qemu_clk, int) function is called: * The clock callback is called on the qemu_clk so it can change t

Re: [Qemu-devel] [RFC PATCH 09/11] zynqmp_crf: add the clock mechanism

2016-08-02 Thread KONRAD Frederic
Le 02/07/2016 à 01:23, Alistair Francis a écrit : On Mon, Jun 13, 2016 at 9:27 AM, wrote: From: KONRAD Frederic This adds the pll to the zynqmp_crf and the dp_video clock output. Signed-off-by: KONRAD Frederic --- hw/misc/xilinx_zynqmp_crf.c | 440 ++

Re: [Qemu-devel] [RFC PATCH 08/11] zynqmp_crf: fix against AF_EX32 changes

2016-08-02 Thread KONRAD Frederic
Le 29/07/2016 à 15:48, Peter Maydell a écrit : On 13 June 2016 at 17:27, wrote: From: KONRAD Frederic This seems to be due to a difference between the AF_EX32 define. Signed-off-by: KONRAD Frederic --- hw/misc/xilinx_zynqmp_crf.c | 354 ++-- 1 fi

Re: [Qemu-devel] [Patch v1 15/29] s390x/sclp: indicate sclp features

2016-08-02 Thread Thomas Huth
On 02.08.2016 13:59, David Hildenbrand wrote: > We have three different blocks in the SCLP read-SCP information response > that indicate sclp features. Let's prepare propagation. > > Acked-by: Cornelia Huck > Signed-off-by: David Hildenbrand > --- > hw/s390x/sclp.c | 9 + > t

[Qemu-devel] [PATCH v2 1/2] virtio-blk: Release s->rq queue at system_reset

2016-08-02 Thread Fam Zheng
At system_reset, there is no point in retrying the queued request, because the driver that issued the request won't be around any more. Analyzed-by: Laszlo Ersek Reported-by: Laszlo Ersek Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [Qemu-devel] [RFC PATCH 10/11] zynqmp: add the zynqmp_crf to the platform

2016-08-02 Thread KONRAD Frederic
Le 02/07/2016 à 01:11, Alistair Francis a écrit : On Mon, Jun 13, 2016 at 9:27 AM, wrote: From: KONRAD Frederic This adds the zynqmp_crf to the zynqmp platform. Signed-off-by: KONRAD Frederic --- hw/arm/xlnx-zynqmp.c | 7 +++ include/hw/arm/xlnx-zynqmp.h | 1 + 2 files ch

Re: [Qemu-devel] [PATCH] RFC: pci-bus: add property ownership on bsel

2016-08-02 Thread Igor Mammedov
On Thu, 28 Jul 2016 15:13:57 +0400 marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The property should own the allocated and unreferenced pointer. In case > of error, it should also be freed. acpi_setup() -> acpi_set_pci_info() -> acpi_set_bsel() is called only once at machine

Re: [Qemu-devel] [Patch v1 15/29] s390x/sclp: indicate sclp features

2016-08-02 Thread David Hildenbrand
> > +void s390_get_feat_block(S390FeatType type, uint8_t *data) > > +{ > > +static S390CPU *cpu; > > + > > +if (!cpu) { > > +cpu = S390_CPU(qemu_get_cpu(0)); > > +} > > + > > +if (!cpu || !cpu->model) { > > +return; > > +} > > +return s390_fill_feat_block(cp

Re: [Qemu-devel] [PATCH] MAINTAINERS: Update PPC maintainer to Richard

2016-08-02 Thread Peter Maydell
On 15 July 2016 at 07:32, Thomas Huth wrote: > On 14.07.2016 23:52, Pranith Kumar wrote: >> Richard agreed to look after PPC[1]. Make this change. >> >> [1] https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00657.html >> >> CC: Richard Henderson >> Signed-off-by: Pranith Kumar >> --- >> MA

[Qemu-devel] [PATCH v2 2/2] virtio-blk: Remove stale comment about draining

2016-08-02 Thread Fam Zheng
This is stale after commit 6e40b3bf (virtio-blk: Use blk_drain() to drain IO requests), remove it. Suggested-by: Laszlo Ersek Signed-off-by: Fam Zheng Reviewed-by: Laszlo Ersek --- hw/block/virtio-blk.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/vir

[Qemu-devel] [PATCH v2 0/2] Two virtio-blk fixes

2016-08-02 Thread Fam Zheng
v2: Patch 1: address Paolo's comment to move the dropping code to below blk_drain(). Patch 2: add Laszlo's r-b. Fam Zheng (2): virtio-blk: Release s->rq queue at system_reset virtio-blk: Remove stale comment about draining hw/block/virtio-blk.c | 10 ++ 1 file changed, 6 inse

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Paolo Bonzini
On 02/08/2016 09:55, Igor Mammedov wrote: > On Tue, 2 Aug 2016 11:41:41 +0800 > Fam Zheng wrote: > >> Since 69382d8b (qdev: Fix object reference leak in case device.realize() >> fails), object_property_set_bool could release the object. The error >> path wants the type name, so hold an referen

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 01:58:47PM +0200, David Hildenbrand wrote: > It might be of interest for tooling whether a CPU definition can be safely > used when migrating, or if e.g. CPU features might get lost during > migration when migrationg from/to a different QEMU version or host, even if > the sa

Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM

2016-08-02 Thread Benjamin Herrenschmidt
On Tue, 2016-08-02 at 12:53 +0200, Gerd Hoffmann wrote: > > I did notice that having Makefiles in the roms directory make > > git submodule barf ... I had to remove them for it to be able > > to clone the submodules. > > I mean roms/Makefile, not roms/$submodule/Makefile I see, ok well, we'll see

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread David Hildenbrand
> > # @name: the name of the CPU definition > > # > > +# @migration-safe: #optional whether a CPU definition can be safely used > > for > > +# migration in combination with a QEMU compatibility > > machine > > +# when migrating between different QMU versions a

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 15:05:28 +0200 Paolo Bonzini wrote: > On 02/08/2016 09:55, Igor Mammedov wrote: > > On Tue, 2 Aug 2016 11:41:41 +0800 > > Fam Zheng wrote: > > > >> Since 69382d8b (qdev: Fix object reference leak in case device.realize() > >> fails), object_property_set_bool could release

Re: [Qemu-devel] [PATCH v2 1/2] virtio-blk: Release s->rq queue at system_reset

2016-08-02 Thread Laszlo Ersek
On 08/02/16 15:00, Fam Zheng wrote: > At system_reset, there is no point in retrying the queued request, > because the driver that issued the request won't be around any more. > > Analyzed-by: Laszlo Ersek > Reported-by: Laszlo Ersek > Signed-off-by: Fam Zheng > --- > hw/block/virtio-blk.c | 6

Re: [Qemu-devel] [V15 4/4] hw/i386: AMD IOMMU IVRS table

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 11:39:07 +0300 David Kiarie wrote: > Add IVRS table for AMD IOMMU. Generate IVRS or DMAR > depending on emulated IOMMU. > > Signed-off-by: David Kiarie > --- > hw/acpi/aml-build.c | 2 +- > hw/i386/acpi-build.c| 76 > +++

[Qemu-devel] [Bug 1608802] Re: READ_DMA (0xC8) command does not work correctly

2016-08-02 Thread Kevin Wolf
Okay, I think there are two parts to this, and both the test case and qemu are buggy, though perhaps the test case more seriously than qemu. The ATA spec describes DMA commands as having two phases, preparation and transfer. During the first phase, BSY=1,DRQ=0 is required. In the second phase, the

Re: [Qemu-devel] [Bug 1608802] [NEW] READ_DMA (0xC8) command does not work correctly

2016-08-02 Thread Kevin Wolf
Am 02.08.2016 um 08:52 hat Stefan Weil geschrieben: > Am 02.08.2016 um 08:11 schrieb Stefan Weil: > > Public bug reported: > > > > The QEMU PC emulation of DMA does not behave like real hardware or other > > virtualization software. > > > > >From the original bug report (Benjamin David Lunt): > > >

Re: [Qemu-devel] [Patch v1 24/29] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 01:59:10PM +0200, David Hildenbrand wrote: > Let's provide a standardized interface to expand CPU models, like the > host model. This interface can be used by tooling to get details about a > specific CPU model, e.g. the "host" model. > > To take care of all architectures,

[Qemu-devel] [PATCH] target-i386: add more Intel AVX-512 instructions support

2016-08-02 Thread Luwei Kang
Add more AVX512 feature bits, include AVX512DQ, AVX512IFMA, AVX512BW, AVX512VL, AVX512VBMI. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf Signed-off-by: Luwei Kang --- target-i386/cpu.c | 14 +- target-i386/cpu.h | 5 + 2 f

[Qemu-devel] [PATCH] hw/ide: fix a writing to null pointer exception

2016-08-02 Thread 忽朝俭
From b5e5c01b025e83500ca46628add7f63f42f9b2ab Mon Sep 17 00:00:00 2001 From: fikshu Date: Tue, 2 Aug 2016 17:39:16 +0800 Subject: [PATCH] hw/ide: fix a writing to null pointer exception In qemu less than v2.1.3, ide_flush_cache calls ide_flush_cb with s->bs == NULL, and ide_flush_cb calls bdrv_ac

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 03:23:30PM +0200, David Hildenbrand wrote: [...] > > > +# > > > +# @static: #optional whether a CPU definition is static and will not > > > change > > > +# between QEMU versions / QEMU machines. A static model is > > > always > > > +# migration-safe. If n

[Qemu-devel] [PATCH v6 2/4] blockdev: Add dynamic generation of module_block.h

2016-08-02 Thread Colin Lord
From: Marc Mari To simplify the addition of new block modules, add a script that generates module_block.h automatically from the modules' source code. This script assumes that the QEMU coding style rules are followed. Signed-off-by: Marc Marí Signed-off-by: Colin Lord --- Makefile

[Qemu-devel] [PATCH v6 3/4] blockdev: Add dynamic module loading for block drivers

2016-08-02 Thread Colin Lord
Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. In addition, only the protocol drivers are being mo

[Qemu-devel] [PATCH v6 4/4] blockdev: Modularize nfs block driver

2016-08-02 Thread Colin Lord
Modularizes the nfs block driver so that it gets dynamically loaded. --- block/Makefile.objs | 1 + configure | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs index 595f366..fa4d8b8 100644 --- a/block/Makefile.objs +++ b/b

Re: [Qemu-devel] [PATCH v6 0/4] Dynamic module loading for block drivers

2016-08-02 Thread Colin Lord
On 08/02/2016 10:12 AM, Colin Lord wrote: > I'm sending one more version of this series. v5 didn't seem to need any > huge makeovers, but I found a small bug in it so I'm hoping it hasn't > been committed yet. In v5, if a user explicitly specified the driver to > use, eg driver=gluster, and the dri

[Qemu-devel] [PATCH v6 1/4] blockdev: prepare iSCSI block driver for dynamic loading

2016-08-02 Thread Colin Lord
This commit moves the initialization of the QemuOptsList qemu_iscsi_opts struct out of block/iscsi.c in order to allow the iscsi module to be dynamically loaded. Signed-off-by: Colin Lord Reviewed-by: Fam Zheng --- block/iscsi.c | 36 vl.c | 38

Re: [Qemu-devel] [PATCH] resize qcow2 with snapshot

2016-08-02 Thread zhangzhiming
ping zhangzhiming zhangzhimin...@meituan.com > On Jun 24, 2016, at 7:10 PM, zhangzhiming wrote: > > qcow2 can’t be resized while there is a snapshot in qcow2 image but in > version 3 image of qcow2, > each disk size of snapshot is stored in the image, so we can resize image > even through t

[Qemu-devel] [PATCH v6 0/4] Dynamic module loading for block drivers

2016-08-02 Thread Colin Lord
I'm sending one more version of this series. v5 didn't seem to need any huge makeovers, but I found a small bug in it so I'm hoping it hasn't been committed yet. In v5, if a user explicitly specified the driver to use, eg driver=gluster, and the driver was modularized, it was not correctly detected

Re: [Qemu-devel] [PATCH] hw/ide: fix a writing to null pointer exception

2016-08-02 Thread Peter Maydell
On 2 August 2016 at 11:22, fikshu(忽朝俭) wrote: > From b5e5c01b025e83500ca46628add7f63f42f9b2ab Mon Sep 17 00:00:00 2001 > From: fikshu > Date: Tue, 2 Aug 2016 17:39:16 +0800 > Subject: [PATCH] hw/ide: fix a writing to null pointer exception > > In qemu less than v2.1.3, ide_flush_cache calls ide_f

Re: [Qemu-devel] [Patch v1 27/29] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion"

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 01:59:13PM +0200, David Hildenbrand wrote: [...] > +CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionType > type, > + CpuModelInfo *model, > + Err

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread David Hildenbrand
> On Tue, Aug 02, 2016 at 03:23:30PM +0200, David Hildenbrand wrote: > [...] > > > > +# > > > > +# @static: #optional whether a CPU definition is static and will not > > > > change > > > > +# between QEMU versions / QEMU machines. A static model is > > > > always > > > > +# migr

Re: [Qemu-devel] [PATCH] RFC: pci-bus: add property ownership on bsel

2016-08-02 Thread Marc-André Lureau
Hi - Original Message - > On Thu, 28 Jul 2016 15:13:57 +0400 > marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > The property should own the allocated and unreferenced pointer. In case > > of error, it should also be freed. > > acpi_setup() -> acpi_set_pci_info()

Re: [Qemu-devel] [Patch v1 27/29] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion"

2016-08-02 Thread David Hildenbrand
> On Tue, Aug 02, 2016 at 01:59:13PM +0200, David Hildenbrand wrote: > [...] > > +CpuModelExpansionInfo > > *arch_query_cpu_model_expansion(CpuModelExpansionType type, > > + CpuModelInfo *model, > > +

Re: [Qemu-devel] [Patch v1 25/29] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 01:59:11PM +0200, David Hildenbrand wrote: > Let's provide a standardized interface to compare two CPU models. > > query-cpu-model-compare takes two models and returns what it knows about > their compability under a certain QEMU machine QEMU has been started with. > > If m

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 04:27:55PM +0200, David Hildenbrand wrote: [...] > > > > > > > > I believe in this case we don't need to make it optional: just > > > > make the field always present and set it to "false" by default. > > > > > > That is true for x86, do you know about the other architect

[Qemu-devel] [PATCH] MAINTAINERS: Update PPC status and maintainer

2016-08-02 Thread Pranith Kumar
Richard agreed to make odd fixes to PPC tcg parts[1]. This patch makes the change. [1] https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00657.html CC: Richard Henderson Signed-off-by: Pranith Kumar --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MA

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread David Hildenbrand
> On Tue, Aug 02, 2016 at 04:27:55PM +0200, David Hildenbrand wrote: > [...] > > > > > > > > > > I believe in this case we don't need to make it optional: just > > > > > make the field always present and set it to "false" by default. > > > > > > > > That is true for x86, do you know about the

[Qemu-devel] [PATCH 0/2] Modularize GTK Display

2016-08-02 Thread Colin Lord
This series modularizes the GTK display. The first patch is from Fam's series, which is necessary so that the module's libraries don't get linked to the main binary. The second patch is responsible for modularizing GTK. This series is based off of my other series 'Dynamic module loading for block

[Qemu-devel] [PATCH 2/2] gtk: Modularize GTK display

2016-08-02 Thread Colin Lord
Allows GTK to be compiled as a module and loaded at runtime. If GTK is not the display being used, the module will not be loaded. In the case that the GTK module is not present, if GTK was specified explicitly by the user, qemu will exit with an error, otherwise it will default to display type None

Re: [Qemu-devel] [Patch v1 24/29] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-02 Thread David Hildenbrand
> > +# A CPU model consists of the name of a CPU definition, to which > > +# delta changes are applied (e.g. features added/removed). Most magic > > values > > +# that an architecture might require should be hidden behind the name. > > +# However, if required, architectures can expose relevant pr

[Qemu-devel] [PATCH 1/2] rules.mak: Don't extract libs from .mo-libs in link command

2016-08-02 Thread Colin Lord
From: Fam Zheng For module build, .mo objects are passed to LINK and consumed in process-archive-undefs. The reason behind that is documented in the comment above process-archive-undefs. Similarly, extract-libs should be called with .mo filtered out too. Otherwise, the .mo-libs are added to the

Re: [Qemu-devel] [PATCH v2 2/2] xen: drain submit queue in xen-usb before removing device

2016-08-02 Thread Anthony PERARD
On Tue, Aug 02, 2016 at 02:14:04PM +0200, Juergen Gross wrote: > When unplugging a device in the Xen pvusb backend drain the submit > queue before deallocation of the control structures. Otherwise there > will be bogus memory accesses when I/O contracts are finished. > > Correlated to this issue i

[Qemu-devel] [PATCH] trace: add syslog tracing backend

2016-08-02 Thread Paul Durrant
This patch adds a tracing backend which sends output using syslog(). The syslog backend is limited to POSIX compliant systems. openlog() is called with facility set to LOG_DAEMON, with the LOG_PID option. Trace events are logged at level LOG_INFO. Signed-off-by: Paul Durrant Cc: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH] trace: add syslog tracing backend

2016-08-02 Thread Daniel P. Berrange
On Tue, Aug 02, 2016 at 04:06:42PM +0100, Paul Durrant wrote: > This patch adds a tracing backend which sends output using syslog(). > The syslog backend is limited to POSIX compliant systems. > > openlog() is called with facility set to LOG_DAEMON, with the LOG_PID > option. Trace events are logg

Re: [Qemu-devel] [Patch v1 25/29] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-02 Thread David Hildenbrand
> > +# @CpuModelCompareResult: > > +# > > +# An enumeration of CPU model comparation results. > > +# > > +# @incompatible: both model definition are incompatible > > +# > > +# @identical: model A == model B > > +# > > +# @superset: model A > model B > > +# > > +# @subset: model A < model B > >

Re: [Qemu-devel] [PATCH] trace: add syslog tracing backend

2016-08-02 Thread Paul Durrant
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: 02 August 2016 16:32 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; Stefan Hajnoczi > Subject: Re: [Qemu-devel] [PATCH] trace: add syslog tracing backend > > On Tue, Aug 02, 2016 at 04:06:42PM +0100, Paul

Re: [Qemu-devel] [Patch v1 24/29] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 05:04:05PM +0200, David Hildenbrand wrote: [...] > > > > > +# model can be used by tooling without having to specify a > > > +# compatibility machine - e.g. when displaying the "host" model. > > > +# All static CPU models are migration-safe. > >

Re: [Qemu-devel] [Patch v1 25/29] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 05:15:54PM +0200, David Hildenbrand wrote: > > > +# @CpuModelCompareResult: > > > +# > > > +# An enumeration of CPU model comparation results. > > > +# > > > +# @incompatible: both model definition are incompatible > > > +# > > > +# @identical: model A == model B > > > +# >

[Qemu-devel] [PATCH v2] ipmi: Remove hotplug from IPMI BMCs

2016-08-02 Thread minyard
From: Corey Minyard No hotplug support, make sure it doesn't happen. Signed-off-by: Corey Minyard Reviewed-by: Marc-André Lureau --- hw/ipmi/ipmi_bmc_extern.c | 1 + hw/ipmi/ipmi_bmc_sim.c| 1 + 2 files changed, 2 insertions(+) I think this is ready to go, can we get it in? diff --git a

[Qemu-devel] [PATCH v2] ipmi_bmc_sim: Remove an unnecessary mutex

2016-08-02 Thread minyard
From: Corey Minyard Get rid of the unnecessary mutex, it was a vestige of something else that was not done. That way we don't have to free it. Signed-off-by: Corey Minyard Reviewed-by: Marc-André Lureau --- hw/ipmi/ipmi_bmc_sim.c | 6 -- 1 file changed, 6 deletions(-) This is pretty str

[Qemu-devel] [PATCH v2] i2c: Fix SMBus read transactions to avoid double events

2016-08-02 Thread minyard
From: Corey Minyard Change 2293c27faddf (i2c: implement broadcast write) added broadcast capability to the I2C bus, but it broke SMBus read transactions. An SMBus read transaction does two i2c_start_transaction() calls without an intervening i2c_end_transfer() call. This will result in i2c_start

Re: [Qemu-devel] [PATCH v4 09/11] block: Accept node-name for drive-mirror

2016-08-02 Thread Kevin Wolf
Am 18.07.2016 um 16:30 hat Max Reitz geschrieben: > On 14.07.2016 15:28, Kevin Wolf wrote: > > In order to remove the necessity to use BlockBackend names in the > > external API, we want to allow node-names everywhere. This converts > > drive-mirror to accept a node-name without lifting the restric

Re: [Qemu-devel] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-08-02 Thread Kevin Wolf
Am 01.08.2016 um 15:35 hat Alberto Garcia geschrieben: > On Thu 14 Jul 2016 03:28:05 PM CEST, Kevin Wolf wrote: > > -blk = blk_by_name(device); > > -if (!blk) { > > -error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, > > - "Device '%s' not found", device); > > +bs =

Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: fix dead pointer in txn list

2016-08-02 Thread John Snow
On 08/02/2016 07:05 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.08.2016 01:39, John Snow wrote: On 07/27/2016 06:49 AM, Vladimir Sementsov-Ogievskiy wrote: Job may be freed in block_job_unref and in this case this would break transaction QLIST. Fix this by removing job from this list befor

[Qemu-devel] [PATCH v4 1/2] Interface for grant copy operation in libs.

2016-08-02 Thread Paulina Szubarczyk
In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) system call is invoked. In mini-os the operation is yet not implemented. For the OSs that does not implement gnttab the call of the grant copy operation causes abort. Signed-off-by: Paulina Szubarczyk --- Changes since v3: - revert to

[Qemu-devel] [PATCH v4 0/2] qemu-qdisk: Implementation of grant copy operation.

2016-08-02 Thread Paulina Szubarczyk
Hi, It is a proposition for implementation of grant copy operation in qemu-qdisk and interface in libxc/libs. Changes since v3: Interface: - revert to cast from xengnttab_grant_copy_segment_t to ioctl_gntdev_grant_copy. - added compile-time check to compare the libs xengnttab_grant_copy_seg

[Qemu-devel] [PATCH v4 2/2] qdisk - hw/block/xen_disk: grant copy implementation

2016-08-02 Thread Paulina Szubarczyk
Copy data operated on during request from/to local buffers to/from the grant references. Before grant copy operation local buffers must be allocated what is done by calling ioreq_init_copy_buffers. For the 'read' operation, first, the qemu device invokes the read operation on local buffers and on

Re: [Qemu-devel] [PATCH v2] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Paolo Bonzini
On 02/08/2016 12:49, Igor Mammedov wrote: > Since 69382d8b (qdev: Fix object reference leak in case device.realize() > fails), object_property_set_bool releases the device object > in case realize's failed and device hasn't explicitly assigned > parent. It happens due to object_unparent() on erro

Re: [Qemu-devel] [PATCH v4 03/11] block: Accept node-name for blockdev-backup

2016-08-02 Thread Kevin Wolf
Am 18.07.2016 um 15:59 hat Max Reitz geschrieben: > On 14.07.2016 15:28, Kevin Wolf wrote: > > In order to remove the necessity to use BlockBackend names in the > > external API, we want to allow node-names everywhere. This converts > > blockdev-backup and the corresponding transaction action to ac

Re: [Qemu-devel] [PATCH v2 1/2] virtio-blk: Release s->rq queue at system_reset

2016-08-02 Thread Paolo Bonzini
> I'd prefer if Paolo's remark (about blk_drain()'s ability to produce > more failed requests, stashed in s->rq) were captured in either the > commit message, or in a code comment. Something like: > > /* We drop queued requests after blk_drain() because blk_drain() >* itself can produce the

Re: [Qemu-devel] [PATCH for-2.7 1/1] ide: fix halted IO segfault at reset

2016-08-02 Thread Paolo Bonzini
> > The patch is (was, since it's committed :)) okay, but I think there is > > another bug in the REPORT case, where ide_rw_error and > > ide_atapi_io_error are not calling ide_set_inactive and thus are leaving > > s->bus->dma->aiocb non-NULL. > > > > Paolo > > > > Actually, won't we hit ide_dma_

Re: [Qemu-devel] [PATCH for-2.7 1/1] ide: fix halted IO segfault at reset

2016-08-02 Thread Paolo Bonzini
> >> diff --git a/hw/ide/core.c b/hw/ide/core.c > >> index 081c9eb..d117b7c 100644 > >> --- a/hw/ide/core.c > >> +++ b/hw/ide/core.c > >> @@ -823,6 +823,7 @@ static void ide_dma_cb(void *opaque, int ret) > >> } > >> if (ret < 0) { > >> if (ide_handle_rw_error(s, -ret, > >>

[Qemu-devel] [PATCH v3 00/10] arm: add ast2500 support

2016-08-02 Thread Cédric Le Goater
The AST2500 SoC being very close to the AST2400 SoC, the goal of the changes below is to modify the existing platform palmetto-bmc and the AST2400 SoC to take into account the small differences and avoid code duplication. This is mostly inspired by the realview and the rpi2 platforms. First patche

[Qemu-devel] [PATCH v3 03/10] aspeed-soc: provide a framework to add new SoCs

2016-08-02 Thread Cédric Le Goater
Let's define an object class for each Aspeed SoC we support. A AspeedSoCInfo struct gathers the SoC specifications which can later be used by an instance of the class or by a board using the SoC. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed_soc.c | 27 --- hw

[Qemu-devel] [PATCH v3 01/10] ast2400: rename the Aspeed SoC files to aspeed_soc

2016-08-02 Thread Cédric Le Goater
Let's prepare for new Aspeed SoCs and rename the ast2400 file to a more generic one. There are no changes in the code apart from the header file include. Signed-off-by: Cédric Le Goater --- hw/arm/Makefile.objs| 2 +- hw/arm/aspeed_soc.c | 229 ++

[Qemu-devel] [PATCH v3 04/10] palmetto-bmc: rename the Aspeed board file to aspeed.c

2016-08-02 Thread Cédric Le Goater
We plan to add more Aspeed boards to this file. There are no changes in the code. Signed-off-by: Cédric Le Goater --- hw/arm/Makefile.objs | 2 +- hw/arm/aspeed.c | 106 ++ hw/arm/palmetto-bmc.c | 106 --

[Qemu-devel] [PATCH v3 06/10] palmetto-bmc: add board specific configuration

2016-08-02 Thread Cédric Le Goater
aspeed_board_init() now uses a board identifier to customize some values specific to the board. Signed-off-by: Cédric Le Goater --- Changes since v2: - removed silicon-rev and cpu-model. This is now in the SoC. Changes since v1: - changed aspeed_init() prototype to use a 'const AspeedBoar

[Qemu-devel] [PATCH v3 02/10] ast2400: replace ast2400 with aspeed_soc

2016-08-02 Thread Cédric Le Goater
This is a name replacement to prepare ground for other SoCs. Let's also remove the AST2400_SMC_BASE definition from the address space mappings, as it is not used. This controller was removed from the Aspeed SoC AST2500, so this provides us a better common base for the address space mapping on both

[Qemu-devel] [PATCH v3 07/10] hw/misc: use macros to define hw-strap1 register on the AST2400 Aspeed SoC

2016-08-02 Thread Cédric Le Goater
This gives some explanation behind the magic number 0x120CE416. Signed-off-by: Cédric Le Goater --- Changes since v2: - more precise definitions of the hw-strap1 register - moved hw-strap1 to the board level. hw/arm/aspeed.c | 15 +- include/hw/misc/aspeed_scu.h | 118 +++

[Qemu-devel] [PATCH v3 05/10] palmetto-bmc: replace palmetto_bmc with aspeed

2016-08-02 Thread Cédric Le Goater
This is mostly a name replacement to prepare ground for other SoCs specificities. It also adds a TypeInfo struct for the palmetto-bmc board with a custom initialization for the same reason. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 56 +

[Qemu-devel] [PATCH v3 08/10] aspeed: add a AST2500 SoC and support to the SCU and SDMC controllers controllers

2016-08-02 Thread Cédric Le Goater
Based on previous work done by Andrew Jeffery . Signed-off-by: Cédric Le Goater --- Changes since v2: - more precise definitions of the hw-strap1 register hw/arm/aspeed_soc.c | 2 ++ hw/misc/aspeed_scu.c | 45 +- hw/misc/aspeed_sdmc.c| 1 +

[Qemu-devel] [PATCH v3 10/10] palmetto-bmc: remove extra no_sdcard assignement

2016-08-02 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index e71500c64bd3..6d7b70df70da 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -145,7 +145,6 @@ static void palmetto_bmc_class_init(ObjectClass *oc, voi

[Qemu-devel] [PATCH v3 09/10] arm: add support for an ast2500 evaluation board

2016-08-02 Thread Cédric Le Goater
The ast2500 eval board has a hardware strapping register value of 0xF100C2E6 which we use for a definition of AST2500_EVB_HW_STRAP1 below. Signed-off-by: Cédric Le Goater --- Changes since v2: - removed silicon-rev and cpu-model. This is now in the SoC. Changes since v1: - changed AST2500

[Qemu-devel] [PATCH v5 00/13] cpu-exec: Safe work in quiescent state

2016-08-02 Thread Alex Bennée
Hi, I've picked up this work from Sergey and will be taking it forward from now on. Apart from adding my s-o-b tags to all the patches there are only two changes. Both are to wait_safe_cpu_work function to prevent dead-lock conditions. First I have added the macro can_wait_for_safe() which compi

[Qemu-devel] [PATCH v5 12/13] tcg: Make tb_flush() thread safe

2016-08-02 Thread Alex Bennée
From: Sergey Fedorov Use async_safe_run_on_cpu() to make tb_flush() thread safe. It can happen that multiple threads schedule a safe work to flush the translation buffer. To keep statistics and debugging output sane, always check if the translation buffer has already been flushed. Signed-off-by

[Qemu-devel] [PATCH v5 05/13] cpus: Rename flush_queued_work()

2016-08-02 Thread Alex Bennée
From: Sergey Fedorov To avoid possible confusion, rename flush_queued_work() to process_queued_cpu_work(). Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

Re: [Qemu-devel] [PATCH] resize qcow2 with snapshot

2016-08-02 Thread Kevin Wolf
Am 02.08.2016 um 15:43 hat zhangzhiming geschrieben: > ping > > zhangzhiming > zhangzhimin...@meituan.com I replied to you on July 11: http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg02241.html Message-ID: <20160711131710.gc5...@noname.redhat.com> Did you not receive the email? Kevi

[Qemu-devel] [PATCH v5 04/13] cpus: Wrap mutex used to protect CPU work

2016-08-02 Thread Alex Bennée
From: Sergey Fedorov This will be useful to enable CPU work on user mode emulation. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée --- cpus.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpus.c b/c

[Qemu-devel] [PATCH v5 11/13] cpu-exec-common: Introduce async_safe_run_on_cpu()

2016-08-02 Thread Alex Bennée
From: Sergey Fedorov This patch is based on the ideas found in work of KONRAD Frederic [1], Alex Bennée [2], and Alvise Rigo [3]. This mechanism allows to perform an operation safely in a quiescent state. Quiescent state means: (1) no vCPU is running and (2) BQL in system-mode or 'exclusive_lock

[Qemu-devel] [PATCH for-2.7] block: Accept any target node for transactional blockdev-backup

2016-08-02 Thread Kevin Wolf
Commit 0d978913 changed blockdev-backup to accept arbitrary node names instead of device names (i.e. root nodes) for the backup target. However, it forgot to make the same change in transactions and to update the documentation. This patch fixes these omissions. Signed-off-by: Kevin Wolf --- bloc

[Qemu-devel] [PATCH v5 02/13] cpus: pass CPUState to run_on_cpu helpers

2016-08-02 Thread Alex Bennée
CPUState is a fairly common pointer to pass to these helpers. This means if you need other arguments for the async_run_on_cpu case you end up having to do a g_malloc to stuff additional data into the routine. For the current users this isn't a massive deal but for MTTCG this gets cumbersome when th

Re: [Qemu-devel] [Patch v1 00/29] s390x CPU models: exposing features

2016-08-02 Thread Eduardo Habkost
On Tue, Aug 02, 2016 at 01:58:46PM +0200, David Hildenbrand wrote: [...] > So we have: > a) "query-cpu-model-expansion" - tell us what the "host" or another CPU >model looks like. Either falling back to a static model or >completely exposing all properties. The query-cpu-model-expansion in

[Qemu-devel] [PATCH 1/2] hw/ppc: use error_report instead of fprintf

2016-08-02 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- Changes since v1: - fixed _FDT() macro hw/ppc/spapr.c | 12 ++-- hw/ppc/spapr_drc.c |8 hw/ppc/spapr_iommu.c |4 ++-- hw/ppc/spapr_rtas.c | 13 +++-- hw/ppc/spapr_vio.c |3 ++- include/hw/ppc/fdt.h |8

[Qemu-devel] [PATCH v5 01/13] atomic: introduce atomic_dec_fetch.

2016-08-02 Thread Alex Bennée
Useful for counting down. Signed-off-by: Alex Bennée Signed-off-by: Sergey Fedorov --- include/qemu/atomic.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 7e13fca..560b1af 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.

[Qemu-devel] [PATCH v5 07/13] linux-user: Rework exclusive operation mechanism

2016-08-02 Thread Alex Bennée
From: Sergey Fedorov A single variable 'pending_cpus' was used for both counting currently running CPUs and for signalling the pending exclusive operation request. To prepare for supporting operations which requires a quiescent state, like translation buffer flush, it is useful to keep a counter

<    1   2   3   4   >