[Qemu-devel] [PULL V2 06/12] rocker: forbid to change world type

2016-03-07 Thread Jason Wang
From: Jiri Pirko Port to world assignment should be permitted only by qemu user. Driver should not be able to do it, so forbid that possibility. Signed-off-by: Jiri Pirko Signed-off-by: Jason Wang --- hw/net/rocker/rocker.c| 8 +++- hw/net/rocker/rocker_fp.c | 5 + hw/net/rocker/r

[Qemu-devel] [PULL V2 10/12] filter: Add 'status' property for filter object

2016-03-07 Thread Jason Wang
From: zhanghailiang With this property, users can control if this filter is 'on' or 'off'. The default behavior for filter is 'on'. For some types of filters, they may need to react to status changing, So here, we introduced status changing callback/notifier for filter class. We will skip the d

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-07 Thread Jason Wang
On 03/08/2016 03:50 PM, Wen Congyang wrote: > On 03/08/2016 03:33 PM, Jason Wang wrote: >> >> On 03/08/2016 12:51 PM, Peter Maydell wrote: >>> On 7 March 2016 at 10:12, Jason Wang wrote: The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: Merge rem

[Qemu-devel] [PULL V2 05/12] net: netmap: probe netmap interface for virtio-net header

2016-03-07 Thread Jason Wang
From: Vincenzo Maffione Previous implementation of has_ufo, has_vnet_hdr, has_vnet_hdr_len, etc. did not really probe for virtio-net header support for the netmap interface attached to the backend. These callbacks were correct for VALE ports, but incorrect for hardware NICs, pipes, monitors, etc.

[Qemu-devel] [PULL V2 08/12] rocker: add name field into WorldOps ale let world specify its name

2016-03-07 Thread Jason Wang
From: Jiri Pirko Also use this in world_name getter function. Signed-off-by: Jiri Pirko Signed-off-by: Jason Wang --- hw/net/rocker/rocker_of_dpa.c | 1 + hw/net/rocker/rocker_world.c | 7 +-- hw/net/rocker/rocker_world.h | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --g

[Qemu-devel] [PULL V2 03/12] MAINTAINERS: Add entries for include/net/ files

2016-03-07 Thread Jason Wang
From: Thomas Huth The include/net/ files correspond to the files in the net/ directory, thus there should be corresponding entries in the MAINTAINERS file. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/

[Qemu-devel] [PULL V2 04/12] net: simplify net_init_tap_one logic

2016-03-07 Thread Jason Wang
From: Paolo Bonzini net_init_tap_one receives in vhostfdname a fd name from vhostfd= or vhostfds=, or NULL if there is no vhostfd=/vhostfds=. It is simpler to just check vhostfdname, than it is to check for vhostfd= or vhostfds=. This also calms down Coverity, which otherwise thinks that monito

[Qemu-devel] [PULL V2 11/12] filter-buffer: Add status_changed callback processing

2016-03-07 Thread Jason Wang
From: zhanghailiang While the status of filter-buffer changing from 'on' to 'off', it need to release all the buffered packets, and delete the related timer, while switch from 'off' to 'on', it need to resume the release packets timer. Here, we extract the process of setup timer into a new helpe

[Qemu-devel] [PULL V2 07/12] rocker: return -ENOMEM in case of some world alloc fails

2016-03-07 Thread Jason Wang
From: Jiri Pirko Until now, 0 is returned in this error case. Fix it ro return -ENOMEM. Signed-off-by: Jiri Pirko Signed-off-by: Jason Wang --- hw/net/rocker/rocker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index a1d921d..104c097 100

[Qemu-devel] [PULL V2 02/12] net: filter: correctly remove filter from the list during finalization

2016-03-07 Thread Jason Wang
Qemu may crash when we want to add two filters on the same netdev but the initialization of second fails (e.g missing parameters): ./qemu-system-x86_64 -netdev user,id=un0 \ -object filter-buffer,id=f0,netdev=un0,interval=10 \ -object filter-buffer,id=f1,netdev=un0 Segmentation fault (core dumpe

[Qemu-devel] [PULL V2 01/12] net: ne2000: check ring buffer control registers

2016-03-07 Thread Jason Wang
From: Prasad J Pandit Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152) bytes to process network packets. Registers PSTART & PSTOP define ring buffer size & location. Setting these registers to invalid values could lead to infinite loop or OOB r/w access issues. Add check to avoid it. Report

[Qemu-devel] [PULL V2 00/12] Net patches

2016-03-07 Thread Jason Wang
The following changes since commit 97556fe80e4f7252300b3498b3477fb4295153a3: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-03-08 04:53:37 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-07 Thread Wen Congyang
On 03/08/2016 03:33 PM, Jason Wang wrote: > > > On 03/08/2016 12:51 PM, Peter Maydell wrote: >> On 7 March 2016 at 10:12, Jason Wang wrote: >>> The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: >>> >>> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-

[Qemu-devel] [PATCH v4 2/3] arm: qmp: add query-gic-capabilities interface

2016-03-07 Thread Peter Xu
This patch adds the command "query-gic-capabilities" but not implemnet it. The command is ARM-only. Return of the command is a list of GICCapability struct that describes all GIC versions that current QEMU and system support. Signed-off-by: Peter Xu --- monitor.c| 8 qapi-s

[Qemu-devel] [PATCH v4 1/3] arm: qmp: add GICCapability struct

2016-03-07 Thread Peter Xu
Define new struct to describe whether we support specific GIC version. Signed-off-by: Peter Xu --- qapi-schema.json | 22 ++ 1 file changed, 22 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7b8f2a1..0b2de6c 100644 --- a/qapi-schema.json +++ b/qapi-sche

[Qemu-devel] [PATCH v4 3/3] arm: implement query-gic-capabilities

2016-03-07 Thread Peter Xu
For emulated GIC capabilities, currently only gicv2 is supported. We need to add gicv3 in when emulated gicv3 ready. For KVM accelerated ARM VM, we detect the capability bits using ioctls. When probing the KVM capabilities, we cannot leverage existing helper functions like kvm_create_device() sinc

[Qemu-devel] [PATCH v4 0/3] ARM: add query-gic-capabilities SMP command

2016-03-07 Thread Peter Xu
v4 changes: - all: rename query-gic-capability to query-gic-capabilities [Andrea] - patch 3: rename helper function to kvm_support_device, make it inline and lighter. [Drew] v3 changes: - patch 2: remove func declaration, add qmp header [Drew] - patch 3: being able to detect KVM GIC capabilities

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-07 Thread Jason Wang
On 03/08/2016 12:51 PM, Peter Maydell wrote: > On 7 March 2016 at 10:12, Jason Wang wrote: >> The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: >> >> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-04' >> into staging (2016-03-06 11:53:27 +)

Re: [Qemu-devel] [PATCH 4/8] usb: fix unbounded stack for xhci_dma_write_u32s

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 14:00, Peter Xu wrote: > First of all, this function cannot be inlined even with always_inline, > so removing inline. Please don't mix two different changes in one patch. > After that, make its stack bounded. > > Suggested-by: Paolo Bonzini > CC: Gerd Hoffmann > Signed-off-b

Re: [Qemu-devel] [RFC 0/2] Interrupt Remapping support for Intel VT-d IOMMU.

2016-03-07 Thread Rita Sinha
Hi Jan, > > Rita, it seems the two patches didn't make it to the list. I got them > but they aren't in the archive. Did you receive any error messages? > SorryI did not get any error message. I will resend it. Regards, Rita Sinha

Re: [Qemu-devel] [PATCH 5/8] usb: fix unbounded stack for inotify_watchfn

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 14:00, Peter Xu wrote: > Suggested-by: Paolo Bonzini > CC: Gerd Hoffmann > Signed-off-by: Peter Xu > --- > hw/usb/dev-mtp.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c > index 7391783..e6dae2f 100644 > -

Re: [Qemu-devel] [PATCH] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-07 Thread Fam Zheng
On Tue, 03/08 15:10, Peter Xu wrote: > On Tue, Mar 08, 2016 at 02:18:35PM +0800, Fam Zheng wrote: > > It is only called once for each opened image, so we can do it the easy > > way. > > > > Signed-off-by: Fam Zheng > > --- > > block/vmdk.c | 25 ++--- > > 1 file changed, 14 i

Re: [Qemu-devel] [PATCH 8/8] hw/i386: fix unbounded stack for load_multiboot

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 14:00, Peter Xu wrote: > Suggested-by: Paolo Bonzini > CC: Paolo Bonzini > CC: Richard Henderson > CC: Eduardo Habkost > CC: "Michael S. Tsirkin" > Signed-off-by: Peter Xu > --- > hw/i386/multiboot.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > di

Re: [Qemu-devel] [PATCH] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-07 Thread Peter Xu
On Tue, Mar 08, 2016 at 02:18:35PM +0800, Fam Zheng wrote: > It is only called once for each opened image, so we can do it the easy > way. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 25 ++--- > 1 file changed, 14 insertions(+), 11 deletions(-) > > diff --git a/block

Re: [Qemu-devel] [RFC 0/2] Interrupt Remapping support for Intel VT-d IOMMU.

2016-03-07 Thread Jan Kiszka
On 2016-03-08 04:24, Rita Sinha wrote: > These patches add Interrupt Remapping support for Intel VT-d IOMMU. > Currently split irqchip mode is not supported. ...while that is likely easily to fix (reason is understood). Rita, it seems the two patches didn't make it to the list. I got them but the

[Qemu-devel] [PATCH 8/8] hw/i386: fix unbounded stack for load_multiboot

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Michael S. Tsirkin" Signed-off-by: Peter Xu --- hw/i386/multiboot.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 9e164

[Qemu-devel] [PATCH 5/8] usb: fix unbounded stack for inotify_watchfn

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Gerd Hoffmann Signed-off-by: Peter Xu --- hw/usb/dev-mtp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 7391783..e6dae2f 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -432,13 +432,1

[Qemu-devel] [PATCH 6/8] usb: fix unbounded stack for usb_mtp_add_str

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Gerd Hoffmann Signed-off-by: Peter Xu --- hw/usb/dev-mtp.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index e6dae2f..40fe26e 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -718,16 +718,20

[Qemu-devel] [PATCH 7/8] migration: fix unbounded stack for source_return_path_thread

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Juan Quintela CC: Amit Shah Signed-off-by: Peter Xu --- migration/migration.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 0129d9f..f1a3976 100644 --- a/migration/migration.c +++ b

[Qemu-devel] [PATCH 3/8] usb: fix unbounded stack for ohci_td_pkt

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Gerd Hoffmann Signed-off-by: Peter Xu --- hw/usb/hcd-ohci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 17ed461..c3cd4e2 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -936,11 +

[Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Markus Armbruster CC: Kevin Wolf CC: qemu-bl...@nongnu.org Signed-off-by: Peter Xu --- block/qapi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qapi.c index db2d3fb..687e577 100644 --- a/block/qapi.c +++ b/block/q

[Qemu-devel] [PATCH 4/8] usb: fix unbounded stack for xhci_dma_write_u32s

2016-03-07 Thread Peter Xu
First of all, this function cannot be inlined even with always_inline, so removing inline. After that, make its stack bounded. Suggested-by: Paolo Bonzini CC: Gerd Hoffmann Signed-off-by: Peter Xu --- hw/usb/hcd-xhci.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff -

[Qemu-devel] [PATCH 1/8] qdict: fix unbounded stack for qdict_array_entries

2016-03-07 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Luiz Capitulino Signed-off-by: Peter Xu --- qobject/qdict.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index 9833bd0..eb602a7 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -704,17

[Qemu-devel] [PATCH 0/8] Fix several unbounded stack usage

2016-03-07 Thread Peter Xu
Suggested by Paolo. Ths patchset fixes several of the warnings generated by "-Wstack-usage=10". There are about 20-30 unbound stack cases during my build, and this patch is only fixing several of them, those which are obvious and easy. For the rest, most of them need some knowledge on specif

[Qemu-devel] [PATCH] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-07 Thread Fam Zheng
It is only called once for each opened image, so we can do it the easy way. Signed-off-by: Fam Zheng --- block/vmdk.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index a8db5d9..1ec2452 100644 --- a/block/vmdk.c +++ b

Re: [Qemu-devel] [PATCH v4 08/26] crypto: add support for the twofish cipher algorithm

2016-03-07 Thread Fam Zheng
On Mon, 02/29 12:00, Daniel P. Berrange wrote: > New cipher algorithms 'twofish-128', 'twofish-192' and > 'twofish-256' are defined for the Twofish algorithm. > The gcrypt backend does not support 'twofish-192'. > > The nettle and gcrypt cipher backends are updated to > support the new cipher and

[Qemu-devel] [PATCH v6 2/2] cutils: add avx2 instruction optimization

2016-03-07 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 instructions for optimization. For platform supports AVX2 instructions, use AVX2 instructions for optimization can help to improve the performance of buffer_find_nonzero_offset() about 30% comparing to SSE2. Live

[Qemu-devel] [PATCH v6 0/2] add avx2 instruction optimization

2016-03-07 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 instructions for optimization. For platform supports AVX2 instructions, use the AVX2 instructions for optimization can help to improve the performance of zero page checking about 30% comparing to SSE2. Live migrat

[Qemu-devel] [PATCH v6 1/2] configure: detect ifunc and avx2 attribute

2016-03-07 Thread Liang Li
Detect if the compiler can support the ifun and avx2, if so, set CONFIG_AVX2_OPT which will be used to turn on the avx2 instruction optimization. Suggested-by: Paolo Bonzini Suggested-by: Peter Maydell Signed-off-by: Liang Li --- configure | 21 + 1 file changed, 21 inserti

Re: [Qemu-devel] [PATCHv2 1/3] target-ppc: Split out SREGS get/put functions

2016-03-07 Thread David Gibson
On Tue, Mar 08, 2016 at 04:13:08PM +1100, Alexey Kardashevskiy wrote: > On 03/08/2016 02:53 PM, David Gibson wrote: > >On Tue, Mar 08, 2016 at 02:01:12PM +1100, Alexey Kardashevskiy wrote: > >>On 03/08/2016 11:37 AM, David Gibson wrote: > >>>On Mon, Mar 07, 2016 at 01:26:24PM +1100, David Gibson wr

Re: [Qemu-devel] [PULL 00/15] Memory changes and misc bug fixes for 2016-03-07

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 00:36, Paolo Bonzini wrote: > The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-04' > into staging (2016-03-06 11:53:27 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v2 5/5] bcm2835_dma: add emulation of Raspberry Pi DMA controller

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 12:23, Andrew Baumann wrote: >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] >> Sent: Monday, 7 March 2016 8:37 PM >> >> On 4 March 2016 at 01:24, Andrew Baumann >> wrote: >> > At present, all DMA transfers complete inline (so a looping descriptor >> > queue will lock

Re: [Qemu-devel] [PATCH v2 5/5] bcm2835_dma: add emulation of Raspberry Pi DMA controller

2016-03-07 Thread Andrew Baumann
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Monday, 7 March 2016 8:37 PM > > On 4 March 2016 at 01:24, Andrew Baumann > wrote: > > At present, all DMA transfers complete inline (so a looping descriptor > > queue will lock up the device). We also do not model pause/abort, > > a

Re: [Qemu-devel] [PATCH v3 0/3] ARM: add query-gic-capability SMP command

2016-03-07 Thread Peter Xu
On Mon, Mar 07, 2016 at 10:55:54AM +0100, Andrea Bolognani wrote: > I tested this both on a v2-only machine > >   {"return": [ > {"emulated": false, "version": 3, "kernel": false}, > {"emulated": true, "version": 2, "kernel": true} >   ]} > > and on a v3-only machine > >   {"return": [ >

Re: [Qemu-devel] [PATCHv2 1/3] target-ppc: Split out SREGS get/put functions

2016-03-07 Thread Alexey Kardashevskiy
On 03/08/2016 02:53 PM, David Gibson wrote: On Tue, Mar 08, 2016 at 02:01:12PM +1100, Alexey Kardashevskiy wrote: On 03/08/2016 11:37 AM, David Gibson wrote: On Mon, Mar 07, 2016 at 01:26:24PM +1100, David Gibson wrote: Currently the getting and setting of Power MMU registers (sregs) take up l

Re: [Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-07 Thread Peter Maydell
On 7 March 2016 at 21:00, Samuel Thibault wrote: > The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-04' > into staging (2016-03-06 11:53:27 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PULL 00/14] Net patches

2016-03-07 Thread Peter Maydell
On 7 March 2016 at 10:12, Jason Wang wrote: > The following changes since commit 1464ad45cd6cdeb0b5c1a54d3d3791396e47e52f: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-04' > into staging (2016-03-06 11:53:27 +) > > are available in the git repository at: > > htt

[Qemu-devel] [PATCH v4 12/15] hbitmap: serialization

2016-03-07 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bit

[Qemu-devel] [PATCH v4 10/15] block: Add two dirty bitmap getters

2016-03-07 Thread Fam Zheng
For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bi

[Qemu-devel] [PATCH v4 15/15] block: More operations for meta dirty bitmap

2016-03-07 Thread Fam Zheng
Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count. Signed-off-by: Fam Zheng --- block/dirty

[Qemu-devel] [PATCH v4 07/15] HBitmap: Introduce "meta" bitmap to track bit changes

2016-03-07 Thread Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 2 +- include/qemu/hbitmap.h | 17 + util/hbitmap.c | 66 ++ 3 files chan

[Qemu-devel] [PATCH v4 13/15] block: BdrvDirtyBitmap serialization interface

2016-03-07 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 37 +++

[Qemu-devel] [PATCH v4 09/15] block: Support meta dirty bitmap

2016-03-07 Thread Fam Zheng
The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 52 include/block/dirty-bitmap.h | 9 2 files changed, 61 insertions(+) diff --git a/block/d

[Qemu-devel] [PATCH v4 14/15] tests: Add test code for hbitmap serialization

2016-03-07 Thread Fam Zheng
Acked-by: John Snow Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index c00c2b5..8f64941 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-h

[Qemu-devel] [PATCH v4 05/15] block: Remove unused typedef of BlockDriverDirtyHandler

2016-03-07 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/block/block.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 3fbd70d..ff1933a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -322,8 +322,6 @@ BlockDriverState

[Qemu-devel] [PATCH v4 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-03-07 Thread Fam Zheng
We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bloc

[Qemu-devel] [PATCH v4 03/15] typedefs: Add BdrvDirtyBitmap

2016-03-07 Thread Fam Zheng
Following patches to refactor and move block dirty bitmap code could use this. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/block/block.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block.h b/include/block/blo

[Qemu-devel] [PATCH v4 08/15] tests: Add test code for meta bitmap

2016-03-07 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/test-hbitmap.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index abe1427..c00c2b5 100644 --- a/tests/test-hbitmap.c +++ b/tests/tes

[Qemu-devel] [PATCH v4 02/15] block: Include hbitmap.h in block.h

2016-03-07 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/block/block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block.h b/include/block/block.h index 1c4f4d8..00827f7 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -8,6 +8,7 @@ #incl

[Qemu-devel] [PATCH v4 06/15] block: Hide HBitmap in block dirty bitmap interface

2016-03-07 Thread Fam Zheng
HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place, now the new BdrvDirtyBitmapIter must be dyn

[Qemu-devel] [PATCH v4 04/15] block: Move block dirty bitmap code to separate files

2016-03-07 Thread Fam Zheng
The only code change is making bdrv_dirty_bitmap_truncate public. It is used in block.c. Also two long lines (bdrv_get_dirty) are wrapped. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block.c | 360 block/Makefile.objs

[Qemu-devel] [PATCH v4 01/15] backup: Use Bitmap to replace "s->bitmap"

2016-03-07 Thread Fam Zheng
"s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- bloc

[Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-03-07 Thread Fam Zheng
v4: Rebase. Add rev-by from John in patches 1-5, 7, 8. Remove BdrvDirtyBitmap typedef from dirty-bitmap.h in patch 4. [Max] Add assertion on bm->meta in patch 9. [John] Two major features are added to block dirty bitmap (and underlying HBitmap) in this series: meta bitmap and serializa

Re: [Qemu-devel] [PATCH v2 5/5] bcm2835_dma: add emulation of Raspberry Pi DMA controller

2016-03-07 Thread Peter Maydell
On 4 March 2016 at 01:24, Andrew Baumann wrote: > At present, all DMA transfers complete inline (so a looping descriptor > queue will lock up the device). We also do not model pause/abort, > arbitrarion/priority, or debug features. > > Signed-off-by: Andrew Baumann > --- Reviewed-by: Peter Mayde

Re: [Qemu-devel] [PATCH v2 4/5] bcm2835_property: implement framebuffer control/configuration properties

2016-03-07 Thread Peter Maydell
On 4 March 2016 at 01:24, Andrew Baumann wrote: > The property channel driver now interfaces with the framebuffer device > to query and set framebuffer parameters. As a result of this, the "get > ARM RAM size" query now correctly returns the video RAM base address > (not total RAM size), and the r

Re: [Qemu-devel] [PATCH v2 3/5] bcm2835_fb: add framebuffer device for Raspberry Pi

2016-03-07 Thread Peter Maydell
On 4 March 2016 at 01:24, Andrew Baumann wrote: > The framebuffer occupies the upper portion of memory (64MiB by > default), but it can only be controlled/configured via a system > mailbox or property channel (to be added by a subsequent patch). > > Signed-off-by: Andrew Baumann Reviewed-by: Pet

Re: [Qemu-devel] [PATCH v2 2/5] bcm2835_aux: add emulation of BCM2835 AUX (aka UART1) block

2016-03-07 Thread Peter Maydell
On 4 March 2016 at 01:24, Andrew Baumann wrote: > At present only the core UART functions (data path for tx/rx) are > implemented, which is enough for UEFI to boot. The following > features/registers are unimplemented: > * Line/modem control > * Scratch register > * Extra control > * Baudr

Re: [Qemu-devel] [RFC PATCH v1 08/10] spapr: CPU hotplug support

2016-03-07 Thread David Gibson
On Mon, Mar 07, 2016 at 11:59:42AM +0530, Bharata B Rao wrote: > On Mon, Mar 07, 2016 at 02:49:06PM +1100, David Gibson wrote: > > On Fri, Mar 04, 2016 at 12:24:19PM +0530, Bharata B Rao wrote: > > > Set up device tree entries for the hotplugged CPU core and use the > > > exising EPOW event infrast

Re: [Qemu-devel] [PULL 0/5] migration pull

2016-03-07 Thread Li, Liang Z
> > > Amit or Liang, can you restrict the new optimization to GCC 4.9+? > > > > > > Paolo > > > > Of course, how about using '#if QEMU_GNUC_PREREQ(4, 9) && defined > CONFIG_AVX2_OPT' instead of '#ifdef CONFIG_AVX2_OPT' in cutils.c? > > Hi Liang, are you going to submit a new series with this? Ye

Re: [Qemu-devel] [RFC PATCH v1 05/10] cpu: Abstract CPU core type

2016-03-07 Thread David Gibson
On Mon, Mar 07, 2016 at 11:29:29AM +0100, Igor Mammedov wrote: > On Mon, 7 Mar 2016 14:36:55 +1100 > David Gibson wrote: > > > On Fri, Mar 04, 2016 at 07:07:20PM +0100, Igor Mammedov wrote: > > > On Fri, 4 Mar 2016 16:32:53 +0530 > > > Bharata B Rao wrote: > > > > > > > On Fri, Mar 04, 2016 a

Re: [Qemu-devel] [PULL 0/5] migration pull

2016-03-07 Thread Amit Shah
On (Wed) 24 Feb 2016 [09:27:50], Li, Liang Z wrote: > > It's a bug in the header file, it was fixed in 4.9. > > > > https://gcc.gnu.org/ml/gcc-patches/2013-06/txtvBBiTsFs8g.txt > > > > Amit or Liang, can you restrict the new optimization to GCC 4.9+? > > > > Paolo > > Of course, how about using

Re: [Qemu-devel] [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-07 Thread Niels de Vos
On Mon, Mar 07, 2016 at 01:27:38PM -0500, Jeff Cody wrote: > On Mon, Mar 07, 2016 at 07:04:15PM +0100, Niels de Vos wrote: > > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > > it possible to detect sparse areas in files. > > > > Signed-off-by: Niels de Vos > > > > -- >

Re: [Qemu-devel] [RFC PATCH v1 05/10] cpu: Abstract CPU core type

2016-03-07 Thread David Gibson
On Mon, Mar 07, 2016 at 11:40:11AM +0100, Igor Mammedov wrote: > On Mon, 7 Mar 2016 14:01:55 +0530 > Bharata B Rao wrote: > > > On Mon, Mar 07, 2016 at 02:36:55PM +1100, David Gibson wrote: > > > On Fri, Mar 04, 2016 at 07:07:20PM +0100, Igor Mammedov wrote: > > > > On Fri, 4 Mar 2016 16:32:53

Re: [Qemu-devel] [PATCHv2 1/3] target-ppc: Split out SREGS get/put functions

2016-03-07 Thread David Gibson
On Tue, Mar 08, 2016 at 02:01:12PM +1100, Alexey Kardashevskiy wrote: > On 03/08/2016 11:37 AM, David Gibson wrote: > >On Mon, Mar 07, 2016 at 01:26:24PM +1100, David Gibson wrote: > >>Currently the getting and setting of Power MMU registers (sregs) take up > >>large inline chunks of the kvm_arch_g

Re: [Qemu-devel] [PATCH v12 7/9] hw/ptimer: Fix counter - 1 returned by ptimer_get_count for the active timer

2016-03-07 Thread Peter Crosthwaite
On Tue, Feb 2, 2016 at 7:19 AM, Dmitry Osipenko wrote: > 30.01.2016 19:43, Dmitry Osipenko пишет: >> >> Due to rounding down performed by ptimer_get_count, it returns counter - 1 >> for >> the active timer. That's incorrect because counter should decrement only >> after >> period been expired, not

Re: [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication

2016-03-07 Thread Changlong Xie
On 03/05/2016 01:53 AM, Stefan Hajnoczi wrote: On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: +static void secondary_do_checkpoint(BDRVReplicationState *s, Error **errp) +{ +Error *local_err = NULL; +int ret; + +if (!s->secondary_disk->bs->job) { +error_setg(e

Re: [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication

2016-03-07 Thread Changlong Xie
On 03/05/2016 01:39 AM, Stefan Hajnoczi wrote: On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: +static void replication_start(ReplicationState *rs, ReplicationMode mode, + Error **errp) +{ +BlockDriverState *bs = rs->opaque; +BDRVReplicationSta

[Qemu-devel] [RFC 0/2] Interrupt Remapping support for Intel VT-d IOMMU.

2016-03-07 Thread Rita Sinha
These patches add Interrupt Remapping support for Intel VT-d IOMMU. Currently split irqchip mode is not supported. Jan Kiszka (2): i386: Prepare for interrupt remapping i386: Interrupt remapping support for VT-d hw/i386/acpi-build.c | 28 +- hw/i386/intel_iommu.c

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

2016-03-07 Thread Jason Wang
On 02/23/2016 01:37 AM, Leonid Bloch wrote: > 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 > in

Re: [Qemu-devel] [Qemu-block] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-03-07 Thread Changlong Xie
On 03/05/2016 12:13 AM, Stefan Hajnoczi wrote: On Fri, Feb 05, 2016 at 12:18:06PM +0800, Changlong Xie wrote: diff --git a/replication.h b/replication.h new file mode 100644 index 000..faea649 --- /dev/null +++ b/replication.h @@ -0,0 +1,53 @@ +/* + * Replication filter + * + * Copyright (c)

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

2016-03-07 Thread Jason Wang
On 02/23/2016 01:37 AM, Leonid Bloch wrote: > Hello All, > > This is v2 of the patches, after the initial reviews. > > For convenience, the same patches are available at: > https://github.com/daynix/qemu-e1000e/tree/e1000e-submit-v2 > > Best regards, > Leonid. > > Changes since v1: > > 1. PCI_PM_

Re: [Qemu-devel] [PATCHv2 1/3] target-ppc: Split out SREGS get/put functions

2016-03-07 Thread Alexey Kardashevskiy
On 03/08/2016 11:37 AM, David Gibson wrote: On Mon, Mar 07, 2016 at 01:26:24PM +1100, David Gibson wrote: Currently the getting and setting of Power MMU registers (sregs) take up large inline chunks of the kvm_arch_get_registers() and kvm_arch_put_registers() functions. Especially since there a

Re: [Qemu-devel] [PATCH v10 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-03-07 Thread Changlong Xie
On 03/08/2016 12:02 AM, Max Reitz wrote: On 07.03.2016 17:02, Eric Blake wrote: On 03/05/2016 11:13 AM, Max Reitz wrote: +index = atoi(child->name + 9); Optional: Assert absence of an error: Indeed, atoi() is worthless, because it cannot do error detection. unsigned long index; char

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Jason Wang
On 03/07/2016 08:16 PM, Jan Kiszka wrote: > On 2016-03-07 13:14, Thomas Huth wrote: >> On 07.03.2016 13:06, Jan Kiszka wrote: >>> On 2016-03-07 12:09, Samuel Thibault wrote: Jason Wang, on Mon 07 Mar 2016 13:03:11 +0800, wrote: > Btw, do you want to be the maintainer of slirp? (Or maybe

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Jason Wang
On 03/07/2016 07:19 PM, Samuel Thibault wrote: > Jason Wang, on Mon 07 Mar 2016 14:48:16 +0800, wrote: >> - Lots of checkpatch warnings, let's try to silent it. > They are indentation issues, yes. They are already existing in slirp/ > . Whenever new code was added we sticked with the qemu style,

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/15] block: Move block dirty bitmap code to separate files

2016-03-07 Thread Fam Zheng
On Mon, 03/07 19:49, Max Reitz wrote: > On 27.02.2016 10:20, Fam Zheng wrote: > > The only code change is making bdrv_dirty_bitmap_truncate public. It is > > used in block.c. > > > > Also two long lines (bdrv_get_dirty) are wrapped. > > > > Signed-off-by: Fam Zheng > > Reviewed-by: John Snow >

Re: [Qemu-devel] [Qemu-block] [PATCH v3 09/15] block: Support meta dirty bitmap

2016-03-07 Thread Fam Zheng
On Mon, 02/29 18:00, John Snow wrote: > > > On 02/27/2016 04:20 AM, Fam Zheng wrote: > > The added group of operations enables tracking of the changed bits in > > the dirty bitmap. > > > > Signed-off-by: Fam Zheng > > --- > > block/dirty-bitmap.c | 51 > > +

Re: [Qemu-devel] [PATCHv2 1/7] vfio: Start improving VFIO/EEH interface

2016-03-07 Thread David Gibson
On Mon, Mar 07, 2016 at 12:49:04PM -0700, Alex Williamson wrote: > On Mon, 29 Feb 2016 18:06:21 +1100 > David Gibson wrote: > > > At present the code handling IBM's Enhanced Error Handling (EEH) interface > > on VFIO devices operates by bypassing the usual VFIO logic with > > vfio_container_ioctl

[Qemu-devel] [PATCHv3 6/7] spapr_pci: Remove finish_realize hook

2016-03-07 Thread David Gibson
Now that spapr-pci-vfio-host-bridge is reduced to just a stub, there is only one implementation of the finish_realize hook in sPAPRPHBClass. So, we can fold that implementation into its (single) caller, and remove the hook. That's the last thing left in sPAPRPHBClass, so that can go away as well.

[Qemu-devel] [PATCHv3 7/7] vfio: Eliminate vfio_container_ioctl()

2016-03-07 Thread David Gibson
vfio_container_ioctl() was a bad interface that bypassed abstraction boundaries, had semantics that sat uneasily with its name, and was unsafe in many realistic circumstances. Now that spapr-pci-vfio-host-bridge has been folded into spapr-pci-host-bridge, there are no more users, so remove it. Si

[Qemu-devel] [PATCHv3 3/7] spapr_pci: Eliminate class callbacks

2016-03-07 Thread David Gibson
The EEH operations in the spapr-vfio-pci-host-bridge no longer rely on the special groupid field in sPAPRPHBVFIOState. So we can simplify, removing the class specific callbacks with direct calls based on a simple spapr_phb_eeh_enabled() helper. For now we implement that in terms of a boolean in t

[Qemu-devel] [PATCHv3 5/7] spapr_pci: (Mostly) remove spapr-pci-vfio-host-bridge

2016-03-07 Thread David Gibson
Now that the regular spapr-pci-host-bridge can handle EEH, there are only two things that spapr-pci-vfio-host-bridge does differently: 1. automatically sizes its DMA window to match the host IOMMU 2. checks if the attached VFIO container is backed by the VFIO_SPAPR_TCE_IOMMU type on

[Qemu-devel] [PATCHv3 4/7] spapr_pci: Allow EEH on spapr-pci-host-bridge

2016-03-07 Thread David Gibson
Now that the EEH code is independent of the special spapr-vfio-pci-host-bridge device, we can allow it on all spapr PCI host bridges instead. We do this by changing spapr_phb_eeh_available() to be based on the vfio_eeh_as_ok() call instead of the host bridge class. Because the value of vfio_eeh_a

[Qemu-devel] [PATCHv3 1/7] vfio: Start improving VFIO/EEH interface

2016-03-07 Thread David Gibson
At present the code handling IBM's Enhanced Error Handling (EEH) interface on VFIO devices operates by bypassing the usual VFIO logic with vfio_container_ioctl(). That's a poorly designed interface with unclear semantics about exactly what can be operated on. In particular it operates on a single

[Qemu-devel] [PATCHv3 2/7] spapr_pci: Switch to vfio_eeh_as_op() interface

2016-03-07 Thread David Gibson
This switches all EEH on VFIO operations in spapr_pci_vfio.c from the broken vfio_container_ioctl() interface to the new vfio_as_eeh_op() interface. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci_vfio.c | 50 -

[Qemu-devel] [PATCHv3 0/7] Allow EEH on spapr-pci-host-bridge devices

2016-03-07 Thread David Gibson
For historical reasons, the spapr machine type has two PCI host bridge implementations: spapr-pci-host-bridge, and spapr-vfio-pci-host-bridge. The latter was (duh) designed for VFIO devices, but later reworks mean it's not necessary for that, and VFIO can be used on the regular host bridge. The o

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Jason Wang
On 03/07/2016 07:55 PM, Samuel Thibault wrote: > Jason Wang, on Mon 07 Mar 2016 14:48:16 +0800, wrote: >> - the series does not build on w32: >> In file included from ./slirp/slirp.h:126:0, >> from stubs/slirp.c:3: >> ./slirp/ip6.h:9:24: fatal error: netinet/in.h: No such file or

Re: [Qemu-devel] [Qemu-block] [PATCH v3 06/15] block: Hide HBitmap in block dirty bitmap interface

2016-03-07 Thread Fam Zheng
On Mon, 03/07 20:11, Max Reitz wrote: > On 27.02.2016 10:20, Fam Zheng wrote: > > HBitmap is an implementation detail of block dirty bitmap that should be > > hidden > > from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying > > HBitmapIter. > > > > A small difference in the in

Re: [Qemu-devel] [PATCH 2/9] hw/arm: QOM'ify highbank.c

2016-03-07 Thread hitmoon
在 2016年03月08日 01:40, Peter Crosthwaite 写道: On Sun, Mar 6, 2016 at 11:05 PM, xiaoqiang zhao wrote: Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Peter Crosthwaite (just this one as I have done some highbank work recently - I cant

Re: [Qemu-devel] [PATCHv9 06/10] slirp: Reindent after refactoring

2016-03-07 Thread Jason Wang
On 03/07/2016 07:38 PM, Samuel Thibault wrote: > Jason Wang, on Mon 07 Mar 2016 15:02:53 +0800, wrote: >> On 02/23/2016 03:28 AM, Samuel Thibault wrote: >>> From: Guillaume Subiron >>> >>> No code change. >>> >>> Signed-off-by: Guillaume Subiron >>> Signed-off-by: Samuel Thibault >>> Reviewed-

  1   2   3   4   >