Re: [Qemu-devel] [PATCH v2 0/2] move qcow2_invalidate_cache() out of coroutine context

2016-02-18 Thread Denis V. Lunev
On 02/18/2016 08:17 AM, Amit Shah wrote: Can someone from the block team please give this a review? Thanks, On (Fri) 12 Feb 2016 [09:39:32], Denis V. Lunev wrote: There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in start

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-18 Thread Alex Bligh
On 17 Feb 2016, at 18:10, Denis V. Lunev wrote: > Currently available NBD_CMD_TRIM command can not be used as the > specification explicitely says that "a client MUST NOT make any > assumptions about the contents of the export affected by this > [NBD_CMD_TRIM] command, until overwriting it again

[Qemu-devel] [PATCH V4 1/2] net/filter-mirror:Add filter-mirror

2016-02-18 Thread Zhang Chen
From: ZhangChen Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -filter-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0 Signed-off-by: ZhangChen Sign

[Qemu-devel] [PATCH V4 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-18 Thread Zhang Chen
From: ZhangChen Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. v4: - Address Jason's comments. v3: - Add filter-mirror unit test according to Jason's comments - Address zhanghailiang's comments. - Address Jason's comments. v2: - Address

[Qemu-devel] [PATCH V4 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-18 Thread Zhang Chen
From: ZhangChen In this unit test we will test the mirror function. start qemu with: -netdev socket,id=qtest-bn0,fd=%d -device e1000,netdev=qtest-bn0,id=qtest-e0 -chardev socket,id=mirror0,path=/tmp/filter-mirror-test.sock,server,nowait -object filter-mirror,id=qtest-f0,netdev=qt

[Qemu-devel] [PATCH] remove comment for nonexistent structure member

2016-02-18 Thread Cao jin
Signed-off-by: Cao jin --- include/sysemu/hostmem.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index 1ce4394..82cc6c5 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -45,7 +45,6 @@ struct HostMemoryBackendClass {

Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/17/2016 07:40 AM, Markus Armbruster wrote: > > There's no reason to do two malloc's for an alternate type visiting > a QAPI struct; let's just inline the struct directly as the C union > branch of the struct. > > >>> Also, here we pass 'obj'; visit_type_

Re: [Qemu-devel] [PATCH v10 12/13] qapi: Delete unused visit_start_union()

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/17/2016 11:08 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Commit cee2dedb noticed that if you have a partial flat union >>> (such as if an input parse failed due to a missing >>> discriminator), calling the dealloc visitor could result in >>> trying to d

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-18 Thread Denis V. Lunev
On 02/18/2016 07:46 AM, Denis V. Lunev wrote: On 02/17/2016 11:58 PM, Eric Blake wrote: On 02/17/2016 11:10 AM, Denis V. Lunev wrote: This patch proposes a new command to reduce the amount of data passed through the wire when it is known that the data is all zeroes. This functionality is genera

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-18 Thread Denis V. Lunev
On 02/18/2016 11:09 AM, Alex Bligh wrote: On 17 Feb 2016, at 18:10, Denis V. Lunev wrote: Currently available NBD_CMD_TRIM command can not be used as the specification explicitely says that "a client MUST NOT make any assumptions about the contents of the export affected by this [NBD_CMD_TRIM]

Re: [Qemu-devel] [PATCH v3] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-18 Thread Thomas Huth
On 18.02.2016 01:43, David Gibson wrote: > On Wed, Feb 17, 2016 at 05:45:42PM +0100, Thomas Huth wrote: >> This hypercall either initializes a page with zeros, or copies >> another page. >> According to LoPAPR, the i-cache of the page should also be >> flushed if using H_ICACHE_INVALIDATE or H_ICAC

Re: [Qemu-devel] [PATCH v10 11/13] qapi: Don't box branches of flat unions

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/17/2016 10:44 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> There's no reason to do two malloc's for a flat union; let's just >>> inline the branch struct directly into the C union branch of the >>> flat union. >>> >>> Surprisingly, fewer clients were actu

Re: [Qemu-devel] [PATCH v4 4/5] s390x/cpu: Add functions to register CPU state

2016-02-18 Thread David Hildenbrand
> Introduce s390_register_cpustate, which will set the > machine/cpu[n] link with the current CPU state. Additionally, > maintain an array of state pointers indexed by CPU id for fast lookup > during interrupt handling. > > Signed-off-by: Matthew Rosato Acked-by: David Hildenbrand David

Re: [Qemu-devel] [PATCH v4 5/5] s390x/cpu: Allow hotplug of CPUs

2016-02-18 Thread David Hildenbrand
> Implement cpu hotplug routine and add the machine hook. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/s390-virtio-ccw.c | 1 + > target-s390x/cpu.c | 40 > target-s390x/cpu.h | 1 + > 3 files changed, 42 insertions(+) > > diff --

Re: [Qemu-devel] [PATCH v3] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-18 Thread David Gibson
On Thu, Feb 18, 2016 at 09:35:36AM +0100, Thomas Huth wrote: > On 18.02.2016 01:43, David Gibson wrote: > > On Wed, Feb 17, 2016 at 05:45:42PM +0100, Thomas Huth wrote: > >> This hypercall either initializes a page with zeros, or copies > >> another page. > >> According to LoPAPR, the i-cache of th

[Qemu-devel] [PATCH v4] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-18 Thread Thomas Huth
This hypercall either initializes a page with zeros, or copies another page. According to LoPAPR, the i-cache of the page should also be flushed if using H_ICACHE_INVALIDATE or H_ICACHE_SYNCHRONIZE, and the d-cache should be synchronized to the RAM if the H_ICACHE_SYNCHRONIZE flag is used. For this

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-18 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > Coroutine Replay > > bool *done = req_replayed_list_get(reqid) // NULL > >

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-18 Thread Roman Kagan
On Wed, Feb 17, 2016 at 01:58:47PM -0700, Eric Blake wrote: > On 02/17/2016 11:10 AM, Denis V. Lunev wrote: > > @@ -446,6 +448,11 @@ The following request types exist: > > about the contents of the export affected by this command, until > > overwriting it again with `NBD_CMD_WRITE`. > >

Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-18 Thread Greg Kurz
On Thu, 18 Feb 2016 12:06:39 +0530 Amit Shah wrote: > On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote: > > On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote: > > > Since the addition of the configuration section in QEMU 2.4, it is > > > impossible > > > to migrate a pseries-2.3 mac

[Qemu-devel] [PATCH 8/8] spice/gl: create dummy primary surface (RfC)

2016-02-18 Thread Gerd Hoffmann
Current spice client expects we create a primary surface, even if we do display updates using dma-bufs exclusively. So just do that to get things going. Not fully clear whenever that is intentional or a bug on the spice side, so I keep this as separate patch for now. I think this should either b

[Qemu-devel] [PATCH 3/8] console: track gl_block state in QemuConsole

2016-02-18 Thread Gerd Hoffmann
Keep track of gl_block state (added in bba19b8 console: block rendering until client is done) in QemuConsole and allow to query it. This way we can avoid state inconsistencies in case different code paths make use of this. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console

[Qemu-devel] [PATCH 0/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Gerd Hoffmann
Hi, This patch series adds support for opengl and dma-buf passing to spice. With this in place you can use virtio-gpu in 3d (virgl) mode with spice. Not fully clear whenever the last patch (tagged as RfC) is actually needed. please review, Gerd Gerd Hoffmann (7): configure: add dma-buf sup

[Qemu-devel] [PATCH 5/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Gerd Hoffmann
This adds support for dma-buf passing to spice. This makes virtio-gpu with 3d acceleration work with spice. Workflow: * virglrenderer renders the guest command stream into a texture. * qemu exports the texture as dma-buf and passes on that dma-buf to spice-server. * spice-server passes the

[Qemu-devel] [PATCH 7/8] spice/gl: render DisplaySurface via opengl

2016-02-18 Thread Gerd Hoffmann
This switches over spice (in opengl mode) to render DisplaySurface updates into a opengl texture, using the helper functions in ui/console-gl.c. With this patch applied spice (with gl=on) will stop using qxl rendering ops, it will use dma-buf passing all the time, i.e. for bios/bootloader (before

[Qemu-devel] [PATCH 2/8] egl-helpers: add functions for render nodes and dma-buf passing

2016-02-18 Thread Gerd Hoffmann
Adds helpers to open a drm render node and create a opengl context for it. Also add a helper to export a texture as dma-buf. Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 13 + ui/egl-helpers.c | 129 +++ 2 files changed, 14

[Qemu-devel] [PATCH 4/8] spice: reset cursor on resize

2016-02-18 Thread Gerd Hoffmann
From: Marc-André Lureau Spice server will clear the cursor on resize. QXL driver reset it after resize, however, virtio and other devices do not. Teach qemu to set it back. Signed-off-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 14 -- 1 file changed

[Qemu-devel] [PATCH 6/8] spice: tweak debug messages.

2016-02-18 Thread Gerd Hoffmann
Adjust message levels, make messages more verbose. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 17a71ce..264ecdb 100644 --- a/ui/spice-display.c +++ b/ui/spice-di

[Qemu-devel] [PATCH 1/8] configure: add dma-buf support detection.

2016-02-18 Thread Gerd Hoffmann
Set CONFIG_OPENGL_DMABUF in case both mesa and libepoxy are new enough to have support for dma-buf import/export. Signed-off-by: Gerd Hoffmann --- configure | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0aa249b..0c0472a 10075

Re: [Qemu-devel] [PATCH] net: check packet payload length

2016-02-18 Thread Markus Armbruster
P J P writes: > +-- On Wed, 17 Feb 2016, Markus Armbruster wrote --+ > |> From: Prasad J Pandit > |> > |> While computing IP checksum, 'net_checksum_calculate' reads > |> payload length from the packet. It could exceed the given 'data' > |> buffer size. Add a check to avoid it. > |> > |> Reporte

Re: [Qemu-devel] [PATCH v4 4/5] s390x/cpu: Add functions to register CPU state

2016-02-18 Thread Igor Mammedov
On Wed, 17 Feb 2016 15:12:34 -0500 Matthew Rosato wrote: > Introduce s390_register_cpustate, which will set the > machine/cpu[n] link with the current CPU state. Additionally, > maintain an array of state pointers indexed by CPU id for fast lookup > during interrupt handling. > cosmetic nit, yo

Re: [Qemu-devel] [PATCH v4 5/5] s390x/cpu: Allow hotplug of CPUs

2016-02-18 Thread Igor Mammedov
On Wed, 17 Feb 2016 15:12:35 -0500 Matthew Rosato wrote: > Implement cpu hotplug routine and add the machine hook. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/s390-virtio-ccw.c | 1 + > target-s390x/cpu.c | 40 > target-s390x/cpu.h

Re: [Qemu-devel] [PATCH v4 5/5] s390x/cpu: Allow hotplug of CPUs

2016-02-18 Thread David Hildenbrand
> > #if !defined(CONFIG_USER_ONLY) > > +void s390_hot_add_cpu(const int64_t id, Error **errp) > > +{ > to make it future-proof wrt migration it could be better to > enforce here that 'id' grows in +1 steps so user > won't be able create cpus with gaps. That should be already covered by: if (i

Re: [Qemu-devel] [PATCH v1 3/9] target-arm: Add the thumb/IL flag to syn_data_abort

2016-02-18 Thread Edgar E. Iglesias
On Tue, Feb 16, 2016 at 10:04:38PM +0300, Sergey Fedorov wrote: > On 12.02.2016 17:33, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target-arm/internals.h | 4 +++- > > target-arm/op_helper.c | 6 -- > > 2 files changed, 7 insert

Re: [Qemu-devel] [PATCH v8 3/4] fdc: add function to determine drive chs limits

2016-02-18 Thread Roman Kagan
On Wed, Feb 17, 2016 at 10:15:32PM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 17, 2016 at 09:25:32PM +0300, Roman Kagan wrote: > > When populating ACPI objects for floppy drives one needs to provide the > > maximum values for cylinder, sector, and head number the drive supports. > > > > This p

Re: [Qemu-devel] [PATCH v1 1/2] qdev-monitor.c: Register reset function if the device has one

2016-02-18 Thread Markus Armbruster
Alistair Francis writes: > If the device being added when running qdev_device_add() has > a reset function, register it so that it can be called. > > Signed-off-by: Alistair Francis > --- > > qdev-monitor.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/qdev-monitor.c b/qdev-monitor

Re: [Qemu-devel] [PATCH v1 8/9] target-arm: A64: Create Instruction Syndromes for Data Aborts

2016-02-18 Thread Edgar E. Iglesias
On Tue, Feb 16, 2016 at 07:13:32PM +, Peter Maydell wrote: > On 12 February 2016 at 14:34, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Add support for generating the instruction syndrome for Data Aborts. > > These syndromes are used by hypervisors for example to trap and

Re: [Qemu-devel] [PATCH v2 1/1] quorum: Change vote rules for 64 bits hash

2016-02-18 Thread Dr. David Alan Gilbert
* Changlong Xie (xiecl.f...@cn.fujitsu.com) wrote: > If quorum has two children(A, B). A do flush sucessfully, but B flush failed. > We MUST choice A as winner rather than just pick anyone of them. Otherwise > the filesystem of guest will become read-only with following errors: > > end_request: I/

Re: [Qemu-devel] [PATCH v8 3/4] fdc: add function to determine drive chs limits

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:50:51PM +0300, Roman Kagan wrote: > On Wed, Feb 17, 2016 at 10:15:32PM +0200, Michael S. Tsirkin wrote: > > On Wed, Feb 17, 2016 at 09:25:32PM +0300, Roman Kagan wrote: > > > When populating ACPI objects for floppy drives one needs to provide the > > > maximum values for

Re: [Qemu-devel] [PATCH v2 06/11] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-02-18 Thread Igor Mammedov
On Thu, 18 Feb 2016 12:03:36 +0800 Xiao Guangrong wrote: > On 02/18/2016 01:26 AM, Michael S. Tsirkin wrote: > > On Wed, Feb 17, 2016 at 10:04:18AM +0800, Xiao Guangrong wrote: > > As for the rest could that commands go via MMIO that we usually > > use for control path? > >

[Qemu-devel] [PATCH 00/13] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2016-02-18 Thread Leonid Bloch
Hello All, This series is the final code of the e1000e device emulation, that we have developed. Please review, and consider acceptance of these patches to the upstream QEMU repository. The code stability was verified by various traffic tests using Fedora 22 Linux, and Windows Server 2012R2 guest

[Qemu-devel] [PATCH 03/13] pcie: Add support for PCIe CAP v1

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/pci/pcie.c | 80 +++--- include/hw/pci/pcie.h | 4 +++ include/hw/pci/pcie_regs.h | 5 +-- 3 files changed, 69 insertions(+), 20 deletions(-) dif

[Qemu-devel] [PATCH 02/13] pci: Introduce define for PM capability version 1.1

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- include/standard-headers/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h index 1becea8..cfb5db2 10064

[Qemu-devel] [PATCH 11/13] net_pkt: Extend packet abstraction as required by e1000e functionality

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman This patch extends the TX/RX packet abstractions with features that will be used by the e1000e device implementation. Changes are: 1. Support iovec lists for RX buffers 2. Deeper RX packets parsing 3. Loopback option for TX packets 4. Extended VLAN headers handling

[Qemu-devel] [PATCH 01/13] msix: make msix_clr_pending() visible for clients

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman This function will be used by e1000e device code. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/pci/msix.c | 2 +- include/hw/pci/msix.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index e

[Qemu-devel] [PATCH 08/13] vmxnet3: Use common MAC address tracing macros

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/net/vmxnet3.c | 8 hw/net/vmxnet_debug.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 43f7a34..690fa04 100644 --- a/hw/net/

[Qemu-devel] [PATCH 04/13] pcie: Introduce function for DSN capability creation

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/pci/pcie.c | 7 +++ include/hw/pci/pcie.h | 1 + include/hw/pci/pcie_regs.h | 4 3 files changed, 12 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index be3a318..f7ac7

Re: [Qemu-devel] [PATCH v11 00/15] prune some QAPI visitor cruft (was qapi cleanups subset E)

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > I'm still working on my documentation patches for QAPI visitors > (https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html), > but am finding it easier to nuke bad code up front than to document > that it is bad only to later nuke it. So this pulls bits and pieces

[Qemu-devel] [PATCH 07/13] net: Add macros for MAC address tracing

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman These macros will be used by future commits introducing e1000e device emulation and by vmxnet3 tracing code. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- include/net/net.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/net/net.h b/incl

[Qemu-devel] [PATCH 05/13] vmxnet3: Use generic function for DSN capability definition

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/net/vmxnet3.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 093a71e..43f7a34 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -23

[Qemu-devel] [PATCH 09/13] net_pkt: Name vmxnet3 packet abstractions more generic

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman This patch drops "vmx" prefix from packet abstrations names to emphasize the fact they are generic and not tied to any specific network device. These abstrations will be reused by e1000e emulation implementation introduced by following patches so their names need generaliza

[Qemu-devel] [PATCH 06/13] net: Introduce Toeplitz hash calculator

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- include/net/checksum.h | 45 + 1 file changed, 45 insertions(+) diff --git a/include/net/checksum.h b/include/net/checksum.h index 2d7a363..77d226f 100644 --- a/inc

[Qemu-devel] [PATCH 10/13] rtl8139: Move more TCP definitions to common header

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/net/rtl8139.c | 5 - include/net/eth.h | 8 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index fee97bf..262228c 100644 --- a/hw/net/rtl813

[Qemu-devel] [PATCH 12/13] e1000_regs: Add definitions for Intel 82574-specific bits

2016-02-18 Thread Leonid Bloch
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/net/e1000_regs.h | 345 +++- 1 file changed, 342 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000_regs.h b/hw/net/e1000_regs.h index 1c40244..d62b3fa

Re: [Qemu-devel] [PATCH v2 06/11] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:03:36PM +0800, Xiao Guangrong wrote: > > > On 02/18/2016 01:26 AM, Michael S. Tsirkin wrote: > >On Wed, Feb 17, 2016 at 10:04:18AM +0800, Xiao Guangrong wrote: > >As for the rest could that commands go via MMIO that we usually > >use for control path? > > >

Re: [Qemu-devel] [PATCH 01/13] msix: make msix_clr_pending() visible for clients

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:07:22PM +0200, Leonid Bloch wrote: > From: Dmitry Fleytman > > This function will be used by e1000e device code. > > Signed-off-by: Dmitry Fleytman > Signed-off-by: Leonid Bloch Reviewed-by: Michael S. Tsirkin > --- > hw/pci/msix.c | 2 +- > include/hw/pc

Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-18 Thread Laurent Vivier
On 18/02/2016 10:24, Greg Kurz wrote: > On Thu, 18 Feb 2016 12:06:39 +0530 > Amit Shah wrote: > >> On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote: >>> On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote: Since the addition of the configuration section in QEMU 2.4, it is

Re: [Qemu-devel] [PATCH 02/13] pci: Introduce define for PM capability version 1.1

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:07:23PM +0200, Leonid Bloch wrote: > From: Dmitry Fleytman > > Signed-off-by: Dmitry Fleytman > Signed-off-by: Leonid Bloch Sorry no - these are standard headers. You could add it in include/hw/pci/pci_regs.h but I'm not sure it's worth it since there's a single user

[Qemu-devel] [PATCH v2 02/17] throttle: Make throttle_conflicting() set errp

2016-02-18 Thread Alberto Garcia
The caller does not need to set it, and this will allow us to refactor this function later. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- blockdev.c | 4 +--- include/qemu/throttle.h | 2 +- tests/test-throttle.c | 12 ++-- util

[Qemu-devel] [PATCH v2 04/17] throttle: Make throttle_is_valid() set errp

2016-02-18 Thread Alberto Garcia
The caller does not need to set it, and this will allow us to refactor this function later. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- blockdev.c | 4 +--- include/qemu/throttle.h | 2 +- tests/test-throttle.c | 2 +- util/throttle.c

[Qemu-devel] [PATCH v2 14/17] qemu-iotests: Extend iotest 093 to test bursts

2016-02-18 Thread Alberto Garcia
This patch adds a new test that checks that the burst settings ('iops_max', 'iops_max_length', etc.) of the throttling code work as expected. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/093 | 65 -- tests/qemu-iotests/093.out | 4 +-- 2 f

[Qemu-devel] [PATCH v2 13/17] throttle: Test throttle_compute_wait() during bursts

2016-02-18 Thread Alberto Garcia
This test simulates an I/O burst for more than two seconds and checks that it works as expected. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- tests/test-throttle.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-th

[Qemu-devel] [PATCH v2 07/17] throttle: Use throttle_config_init() to initialize ThrottleConfig

2016-02-18 Thread Alberto Garcia
We can currently initialize ThrottleConfig by zeroing all its fields, but this will change with the new fields to define the length of the burst periods. This patch introduces a new throttle_config_init() function and uses it to replace all memset() calls that initialize ThrottleConfig directly.

[Qemu-devel] [PATCH v2 05/17] throttle: Set always an average value when setting a maximum value

2016-02-18 Thread Alberto Garcia
When testing the ranges of valid values, set_cfg_value() creates sometimes invalid throttling configurations by setting bucket.max while leaving bucket.avg uninitialized. While this doesn't break the current tests, it will as soon as we unify all functions that check the validity of the throttling

[Qemu-devel] [PATCH v2 11/17] qapi: Add burst length fields to BlockDeviceInfo

2016-02-18 Thread Alberto Garcia
This patch adds the new bps_*_max_length and iops_*_max_length parameters to the BlockDeviceInfo struct. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- block/qapi.c | 20 qapi/block-core.json | 39 +-- 2 files chan

[Qemu-devel] [PATCH v2 01/17] throttle: Make throttle_compute_timer() static

2016-02-18 Thread Alberto Garcia
This function is only used internally in throttle.c Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- include/qemu/throttle.h | 6 -- util/throttle.c | 8 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/qemu/thro

[Qemu-devel] [PATCH v2 00/17] throttle: Allow I/O bursts for a user-defined period of time

2016-02-18 Thread Alberto Garcia
Hi, here's a new version of the series that adds support for performing I/O bursts for a user-defined period of time. Please follow the link to the first version of the series for a complete description. There are two important changes in this version: a) The previous series was broken because t

[Qemu-devel] [PATCH v2 15/17] qapi: Correct the name of the iops_rd parameter

2016-02-18 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index fbbc709..9bf1b22 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1321,7 +1321,7 @@ # # @iops: total I/O o

[Qemu-devel] [PATCH v2 09/17] throttle: Add command-line settings to define the burst periods

2016-02-18 Thread Alberto Garcia
This patch adds all the throttling.*-max-length command-line parameters to define the length of the burst periods. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- blockdev.c | 37 + 1 file changed, 37 insertions(+) diff --git a/blockdev.c b/bl

[Qemu-devel] [PATCH v2 16/17] docs: Document the throttling infrastructure

2016-02-18 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- docs/throttle.txt | 252 ++ 1 file changed, 252 insertions(+) create mode 100644 docs/throttle.txt diff --git a/docs/throttle.txt b/docs/throttle.txt new file mode 100644 index 000..28204e4 --- /dev/null +

[Qemu-devel] [PATCH v2 06/17] throttle: Merge all functions that check the configuration into one

2016-02-18 Thread Alberto Garcia
There's no need to keep throttle_conflicting(), throttle_is_valid() and throttle_max_is_missing_limit() as separate functions, so this patch merges all three into one. As a consequence, check_throttle_config() becomes redundant and can be replaced with throttle_is_valid(). Signed-off-by: Alberto

[Qemu-devel] [PATCH v2 12/17] throttle: Check that burst_level leaks correctly

2016-02-18 Thread Alberto Garcia
This patch expands test_leak_bucket() to check that burst_level leaks correctly. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- tests/test-throttle.c | 16 1 file changed, 16 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 34f1f9e

[Qemu-devel] [PATCH v2 17/17] MAINTAINERS: Add myself as maintainer of the throttling code

2016-02-18 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 02710f8..c2f2dd7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1276,6 +1276,15 @@ S: Maintained F: include/qemu/sockets.h F: util/qemu-sockets.c +Throttl

[Qemu-devel] [PATCH v2 10/17] qapi: Add burst length parameters to block_set_io_throttle

2016-02-18 Thread Alberto Garcia
This patch adds the new bps_*_max_length and iops_*_max_length parameters to the block_set_io_throttle command. Signed-off-by: Alberto Garcia --- blockdev.c | 31 +++ hmp.c| 12 qapi/block-core.json | 51 +

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-18 Thread Denis V. Lunev
On 02/18/2016 12:18 PM, Roman Kagan wrote: On Wed, Feb 17, 2016 at 01:58:47PM -0700, Eric Blake wrote: On 02/17/2016 11:10 AM, Denis V. Lunev wrote: @@ -446,6 +448,11 @@ The following request types exist: about the contents of the export affected by this command, until overwriting i

Re: [Qemu-devel] [PATCH] net: check packet payload length

2016-02-18 Thread P J P
Hello Markus, +-- On Thu, 18 Feb 2016, Markus Armbruster wrote --+ | | if ((data[14] & 0xf0) != 0x40) | Buffer overrun when length <= 14. | | proto = data[23]; | Buffer overrun when length <= 23. | | I think we should check that we got at least an IPv4 header without | opt

[Qemu-devel] [PATCH v2 08/17] throttle: Add support for burst periods

2016-02-18 Thread Alberto Garcia
This patch adds support for burst periods to the throttling code. With this feature the user can keep performing bursts as defined by the LeakyBucket.max rate for a configurable period of time. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- include/qemu/throttle.h | 41 +

[Qemu-devel] [PATCH v2 03/17] throttle: Make throttle_max_is_missing_limit() set errp

2016-02-18 Thread Alberto Garcia
The caller does not need to set it, and this will allow us to refactor this function later. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- blockdev.c | 4 +--- include/qemu/throttle.h | 2 +- tests/test-throttle.c | 6 +++--- util/throttle

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-18 Thread Igor Mammedov
On Thu, 18 Feb 2016 14:39:52 +1100 David Gibson wrote: > On Tue, Feb 16, 2016 at 11:36:55AM +0100, Igor Mammedov wrote: > > On Mon, 15 Feb 2016 20:43:41 +0100 > > Markus Armbruster wrote: > > > > > Igor Mammedov writes: > > > > > > > it will allow mgmt to query present and possible to hot

Re: [Qemu-devel] [PATCH 03/13] pcie: Add support for PCIe CAP v1

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:07:24PM +0200, Leonid Bloch wrote: > From: Dmitry Fleytman > A bit of text here to explain what's different from the existing APIs. > Signed-off-by: Dmitry Fleytman > Signed-off-by: Leonid Bloch > --- > hw/pci/pcie.c | 80 > +++

[Qemu-devel] [PATCH v4] vhost-user interrupt management fixes

2016-02-18 Thread Victor Kaplansky
Since guest_mask_notifier can not be used in vhost-user mode due to buffering implied by unix control socket, force use_mask_notifier on virtio devices of vhost-user interfaces, and send correct callfd to the guest at vhost start. Using guest_notifier_mask function in vhost-user case may break int

Re: [Qemu-devel] [PATCH 04/13] pcie: Introduce function for DSN capability creation

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:07:25PM +0200, Leonid Bloch wrote: > From: Dmitry Fleytman > > Signed-off-by: Dmitry Fleytman > Signed-off-by: Leonid Bloch > --- > hw/pci/pcie.c | 7 +++ > include/hw/pci/pcie.h | 1 + > include/hw/pci/pcie_regs.h | 4 > 3 files changed, 1

Re: [Qemu-devel] [PATCH 05/13] vmxnet3: Use generic function for DSN capability definition

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:07:26PM +0200, Leonid Bloch wrote: > From: Dmitry Fleytman > > Signed-off-by: Dmitry Fleytman > Signed-off-by: Leonid Bloch > --- > hw/net/vmxnet3.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c >

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-18 Thread Igor Mammedov
On Thu, 18 Feb 2016 15:05:10 +1100 David Gibson wrote: > On Tue, Feb 16, 2016 at 11:52:42AM +0100, Igor Mammedov wrote: > > On Tue, 16 Feb 2016 16:48:34 +1100 > > David Gibson wrote: > > > > > On Mon, Feb 15, 2016 at 08:43:41PM +0100, Markus Armbruster wrote: > > > > Igor Mammedov writes:

Re: [Qemu-devel] [PATCH v4] vhost-user interrupt management fixes

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:40:36PM +0200, Victor Kaplansky wrote: > Since guest_mask_notifier can not be used in vhost-user mode due > to buffering implied by unix control socket, force > use_mask_notifier on virtio devices of vhost-user interfaces, and > send correct callfd to the guest at vhost s

Re: [Qemu-devel] [PATCH v4] vhost-user interrupt management fixes

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:40:36PM +0200, Victor Kaplansky wrote: > Since guest_mask_notifier can not be used in vhost-user mode due > to buffering implied by unix control socket, force > use_mask_notifier on virtio devices of vhost-user interfaces, and > send correct callfd to the guest at vhost s

Re: [Qemu-devel] [PATCH v2 0/5] q35: Remove old machines and unused compat code

2016-02-18 Thread Markus Armbruster
Markus Armbruster writes: > "Michael S. Tsirkin" writes: > >> On Thu, Feb 11, 2016 at 01:51:30PM -0200, Eduardo Habkost wrote: >>> On Sat, Feb 06, 2016 at 08:34:07PM +0200, Michael S. Tsirkin wrote: >>> > On Fri, Feb 05, 2016 at 12:46:11PM -0200, Eduardo Habkost wrote: >>> > > On Fri, Feb 05, 20

Re: [Qemu-devel] [PULL 00/26] ppc-for-2.6 queue 20160218

2016-02-18 Thread Peter Maydell
git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160218 > > for you to fetch changes up to 8a9c1b77e9df5b4a9fcc1ffe08b4fcff7b0c791f: > > hw/ppc/spapr: Halt CPU when powering off via RTAS call (2016-02-18 11:08:43 > +1100) > > ---

Re: [Qemu-devel] [PATCH V3 0/2] PL061 device state cleaning

2016-02-18 Thread Peter Maydell
On 17 February 2016 at 17:19, Wei Huang wrote: > Current QEMU doesn't reset PL061 device state. As a result the device > keeps a stale state after guest reboots. This causes VM fail to recceive > GPIO commands (e.g. virsh shutdown/reoot commands) after reboot. This > patchset adds reset support fo

[Qemu-devel] [PATCH v3 1/2] spapr: skip configuration section during migration of older machines

2016-02-18 Thread Greg Kurz
Since QEMU 2.4, we have a configuration section in the migration stream. This must be skipped for older machines, like it is already done for x86. This patch fixes the migration of pseries-2.3 from/to QEMU 2.3, but it breaks migration of the same machine from/to QEMU 2.4/2.4.1/2.5. We do that anyw

[Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-18 Thread Greg Kurz
QEMU 2.4 broke the migration of old pseries machine with the addition of configuration sections, which are sent unconditionally. We assume that QEMU 2.3 is more deployed than any newer release (based on the versions currently shipped by most distros). This v3 series hence reverses the logic from v

[Qemu-devel] [PATCH v3 2/2] migration: allow machine to enforce configuration section migration

2016-02-18 Thread Greg Kurz
Migration of pseries-2.3 doesn't have configuration section. Unfortunately, QEMU 2.4/2.4.1/2.5 are buggy and always stream and expect the configuration section, and break migration both ways. This patch introduces a property which allows to enforce a configuration section for machines who don't ha

[Qemu-devel] [PATCH] log: Redirect stderr to logfile if deamonized

2016-02-18 Thread Dimitris Aragiorgis
In case of daemonize, use the logfile passed with the -D option in order to redirect stderr to it instead of /dev/null. Also remove some unused code in log.h. Signed-off-by: Dimitris Aragiorgis --- include/qemu/log.h |6 -- os-posix.c |6 +- util/log.c | 11 +++

Re: [Qemu-devel] [PATCH] scripts/kvm/kvm_stat: Fix missing right parantheses

2016-02-18 Thread Janosch Frank
On 02/17/2016 07:18 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > scripts/kvm/kvm_stat | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat > index 3cf1181..517fbec 100755 > --- a/scripts/kvm/kvm_stat > +++ b/scripts/kvm/k

Re: [Qemu-devel] [PATCH v1 8/9] target-arm: A64: Create Instruction Syndromes for Data Aborts

2016-02-18 Thread Peter Maydell
On 18 February 2016 at 09:56, Edgar E. Iglesias wrote: > On Tue, Feb 16, 2016 at 07:13:32PM +, Peter Maydell wrote: >> I think this patch also would be simpler if the encoded info >> put in with the TBs was just the syndrome register, rather >> than some other encoding. > > My first try was to

Re: [Qemu-devel] [PATCH v3 00/10] hw/sd: QOMify sd.c (and pxa2xx_mmci)

2016-02-18 Thread Peter Maydell
On 16 February 2016 at 18:09, Peter Maydell wrote: > This series attempts to QOMify sd.c (the actual SD card model), > including a proper QOM bus between the controller and the card. Applied to target-arm.next, thanks. -- PMM

Re: [Qemu-devel] [PATCH v4 0/3] SD emulation fixes for Pi2 Tianocore EDK2 UEFI

2016-02-18 Thread Peter Maydell
On 8 February 2016 at 03:35, Andrew Baumann wrote: > This series contains fixes to the SD card emulation that are needed to > unblock Tianocore EDK2 UEFI (specifically, the bootloader for Windows > on Raspberry Pi 2). > > Changes in v2, based on feedback from Peter Crosthwaite: > * correct implem

Re: [Qemu-devel] [PATCH] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct

2016-02-18 Thread Peter Maydell
On 2 February 2016 at 10:49, Leon Alrae wrote: > On 25/01/16 17:40, Peter Maydell wrote: >> The r4k_tlb_t structure uses the uint_fast*_t types. Most of these >> uses are in bitfields and are thus pointless, because the bitfield >> itself specifies the width of the type; just use 'unsigned int' >>

Re: [Qemu-devel] [PATCH qemu] update-linux-headers: Add userfaultfd.h

2016-02-18 Thread Christian Borntraeger
On 02/15/2016 05:59 AM, Alexey Kardashevskiy wrote: > userfailtfd.h is used by post-copy migration so include it to > the update-linux-headers.sh as we want it updated altogether with > other kernel headers. > > Signed-off-by: Alexey Kardashevskiy Acked-by: Christian Borntraeger Paolo, shall t

Re: [Qemu-devel] [PATCH v11 03/15] qapi: Forbid 'any' inside an alternate

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > The whole point of an alternate is to allow some type-safety while > still accepting more than one JSON type. Meanwhile, the 'any' > type exists to bypass type-safety altogether. The two are > incompatible: you can't accept every type, and still tell which > branch of the a

Re: [Qemu-devel] [PATCH v2 0/5] q35: Remove old machines and unused compat code

2016-02-18 Thread Michael S. Tsirkin
On Thu, Feb 18, 2016 at 12:18:04PM +0100, Markus Armbruster wrote: > No reply from you since Monday. Yes but I'm flooded with other stuff to review. I'll get back to it, 3 days isn't such a long time. > You can > > (a) Apply Eduardo's series. > > (b) Debate its merits. > > (c) Declare the deba

  1   2   3   4   >