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

2016-02-22 Thread Jason Wang
On 02/18/2016 06:33 PM, P J P wrote: > 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 sh

Re: [Qemu-devel] [PULL 0/5] tcg queued patches

2016-02-22 Thread Richard Henderson
On 02/16/2016 03:45 AM, Peter Maydell wrote: Well, it doesn't repro on i686-linux; with a cross-compiler to mingw it still might, but filing the bug will save me setting up the full cross environment to be able to build qemu with mingw. I started filing a bug, but the preprocessed source exceed

Re: [Qemu-devel] [PULL 8/9] static checker: e1000-82540em got aliased to e1000

2016-02-22 Thread Amit Shah
On (Tue) 23 Feb 2016 [15:02:58], Jason Wang wrote: > >> This means that 2.5 cannot migrate 2.4 virtual machines, right? Is that > >> something we want to rectify in 2.6 by making e1000-82540em an alias of > >> e1000 (instead of the other way round)? > > You're right; I misread it. With that commi

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

2016-02-22 Thread Amit Shah
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 starting from > suspended state, i.e. it processes incoming migration, and in the same > time 'info block' is call

[Qemu-devel] [PULL 5/5] cutils: add avx2 instruction optimization

2016-02-22 Thread Amit Shah
From: 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% compari

[Qemu-devel] [PULL 4/5] configure: detect ifunc and avx2 attribute

2016-02-22 Thread Amit Shah
From: 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 Reviewed-by: Paolo Bonzini Message-Id: <1453880034-

[Qemu-devel] [PULL 1/5] migration: move bdrv_invalidate_cache_all of of coroutine context

2016-02-22 Thread Amit Shah
From: "Denis V. Lunev" There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that qcow2_invalid

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

2016-02-22 Thread Amit Shah
The following changes since commit 8eb779e4223a18db9838a49ece1bc72cfdfb7761: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-02-22 16:55:41 +) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/migration.git tags/migr

[Qemu-devel] [PULL 2/5] migration: move bdrv_invalidate_cache_all of of coroutine context

2016-02-22 Thread Amit Shah
From: "Denis V. Lunev" There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that qcow2_invalid

[Qemu-devel] [PULL 3/5] migration: reorder code to make it symmetric

2016-02-22 Thread Amit Shah
From: Wei Yang In qemu_savevm_state_complete_precopy(), it iterates on each device to add a json object and transfer related status to destination, while the order of the last two steps could be refined. Current order: json_start_object() save_section_header() vmstate_save()

Re: [Qemu-devel] [PATCH RFC] fw-cfg: support writeable blobs

2016-02-22 Thread Gerd Hoffmann
On Mo, 2016-02-22 at 22:12 +0200, Michael S. Tsirkin wrote: > On Mon, Feb 22, 2016 at 03:26:56PM +0100, Gerd Hoffmann wrote: > > On Mo, 2016-02-22 at 14:41 +0200, Michael S. Tsirkin wrote: > > > Useful to send guest data back to QEMU. > > > > Use case? > > > > cheers, > > Gerd > > VM GEN ID at

Re: [Qemu-devel] [PULL 8/9] static checker: e1000-82540em got aliased to e1000

2016-02-22 Thread Jason Wang
On 02/22/2016 08:39 PM, Amit Shah wrote: > On (Thu) 11 Feb 2016 [14:04:06], Paolo Bonzini wrote: >> >> On 05/02/2016 14:56, Amit Shah wrote: >>> Commit 8304402033e8dbe8e379017d51ed1dd8344f1dce changed the name of the >>> e1000-82540em device to e1000. This was flagged: >>> >>>Section "e1000-

[Qemu-devel] [PATCH] topology.h: cleanup

2016-02-22 Thread Cao jin
remove useless parameter of several functions Signed-off-by: Cao jin --- include/hw/i386/topology.h | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/topology.h b/include/hw/i386/topology.h index 148cc1b..d0f473c 100644 --- a/include/hw/i386/to

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

2016-02-22 Thread Zhang Chen
On 02/23/2016 10:31 AM, Jason Wang wrote: On 02/18/2016 04:10 PM, Zhang Chen wrote: 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,pa

Re: [Qemu-devel] [PATCH qemu] memory: Fix IOMMU replay base address

2016-02-22 Thread David Gibson
On Tue, Feb 23, 2016 at 01:11:35PM +1100, Alexey Kardashevskiy wrote: > On 02/22/2016 11:12 PM, David Gibson wrote: > >On Mon, Feb 22, 2016 at 10:36:19PM +1100, Alexey Kardashevskiy wrote: > >>On 02/22/2016 05:26 PM, David Gibson wrote: > >>>On Mon, Feb 22, 2016 at 05:09:39PM +1100, Alexey Kardashe

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

2016-02-22 Thread Yi Min Zhao
于 Mon, 22 Feb 2016 14:15:07 +0100 Christian Borntraeger 写道: > On 02/19/2016 04:18 PM, Wei Yang wrote: > > Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is > > the more proper on retrieving MSIX entries. > > > > This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

Re: [Qemu-devel] [RFC PATCH v0 0/8] cpu-package hotplug

2016-02-22 Thread Bharata B Rao
On Mon, Feb 22, 2016 at 04:32:25PM +0100, Andreas Färber wrote: > Hi Bharata, > > Am 22.02.2016 um 06:01 schrieb Bharata B Rao: > > This is an attempt to implement David Gibson's RFC that was posted at > > https://lists.gnu.org/archive/html/qemu-ppc/2016-02/msg0.html > > I am not sure if I hav

Re: [Qemu-devel] [PATCH] qed: fix bdrv_qed_drain

2016-02-22 Thread Fam Zheng
On Wed, 02/17 12:28, Paolo Bonzini wrote: > > > On 17/02/2016 03:57, Fam Zheng wrote: > > On Tue, 02/16 16:53, Paolo Bonzini wrote: > >> The current implementation of bdrv_qed_drain can cause a double > >> completion of a request. > >> > >> The problem is that bdrv_qed_drain calls qed_plug_alloca

Re: [Qemu-devel] [PATCH v3 1/1] quorum: modify vote rules for flush operation

2016-02-22 Thread Changlong Xie
On 02/22/2016 10:33 PM, Alberto Garcia wrote: On Mon 22 Feb 2016 10:50:37 AM CET, Changlong Xie wrote: -winner = quorum_get_vote_winner(&error_votes); -result = winner->value.l; - +if (success_count >= s->threshold) +result = 0; +else { +winner = quorum_get_vote_w

Re: [Qemu-devel] [PATCH] fixup! block-migration: acquire AioContext as necessary

2016-02-22 Thread Fam Zheng
On Fri, 02/19 16:10, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > migration/block.c | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/migration/block.c b/migration/block.c > index 3bfa908..eea4788 100644 > --- a/migration/block.c > +++ b/migr

Re: [Qemu-devel] [PATCH v7 0/5] don't use NVDIMM for balooning

2016-02-22 Thread Xiao Guangrong
On 02/10/2016 04:49 PM, Vladimir Sementsov-Ogievskiy wrote: v7: 02: Reviewed-by: Igor Mammedov 04: object instead of dimm 05: arror_abort instead of NULL for getting size property, remove superfluous include v6: add stubbed pc_dimm_build_list, fix compilation for !CONFIG_ME

[Qemu-devel] CPU hotplug, again

2016-02-22 Thread David Gibson
Hi Andreas, I've now found (with Thomas' help) your RFC series for socket/core based cpu hotplug on x86 (https://github.com/afaerber/qemu-cpu/compare/qom-cpu-x86). It seems sensible enough as far as it goes, but doesn't seem to address a bunch of the things that I was attempting to do with the cp

Re: [Qemu-devel] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-22 Thread hitmoon
在 2016年02月22日 19:03, Peter Maydell 写道: On 22 February 2016 at 10:28, hitmoon wrote: 在 2016年02月22日 17:24, Peter Maydell 写道: Just noticed this won't work as it is -- the vmstate struct is for the M48t59State*, but the ISA and Sysbus wrappers have their own structs which are what the dc->vmsd wi

Re: [Qemu-devel] [PATCH v2 2/3] block/backup: avoid copying less than full target clusters

2016-02-22 Thread Fam Zheng
On Mon, 02/22 17:07, John Snow wrote: > During incremental backups, if the target has a cluster size that is > larger than the backup cluster size and we are backing up to a target > that cannot (for whichever reason) pull clusters up from a backing image, > we may inadvertantly create unusable inc

Re: [Qemu-devel] [PATCH] firmware: fw_cfg register offsets on supported architectures only

2016-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2016 at 04:18:18PM -0500, Gabriel Somlo wrote: > Refrain from defining default fw_cfg register offsets on > unsupported architectures -- throw an error instead. If > QEMU were to add fw_cfg support on additional architectures, > we should add them to the FW_CFG_SYSFS depends stateme

Re: [Qemu-devel] [PATCH v8 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2016 at 03:26:23PM -0500, Gabriel L. Somlo wrote: > On Mon, Feb 22, 2016 at 10:14:50PM +0200, Michael S. Tsirkin wrote: > > On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabriel L. Somlo wrote: > > > > > +static void fw_cfg_io_cleanup(void) > > > > > +{ > > > > > + if (fw_cfg_is_mmi

Re: [Qemu-devel] [PATCH v2 1/3] block/backup: make backup cluster size configurable

2016-02-22 Thread Fam Zheng
On Mon, 02/22 17:07, John Snow wrote: > 64K might not always be appropriate, make this a runtime value. > > Signed-off-by: John Snow > --- > block/backup.c | 64 > +- > 1 file changed, 36 insertions(+), 28 deletions(-) > > diff --git a/bl

Re: [Qemu-devel] [PATCH 00/13] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-02-22 Thread Peter Xu
On Fri, Feb 19, 2016 at 05:38:48PM +0100, Radim Krčmář wrote: > 2016-02-19 07:46+0100, Jan Kiszka: > > - Rita Sinha is currently working on integrating my old patches with the > > split-irqchip to get KVM working (as an Outreachy project). It's > > probably a bit unfortunate to consider a different

Re: [Qemu-devel] [PATCH 0/2] block/vhdx: Small cleanups

2016-02-22 Thread Jeff Cody
On Mon, Feb 22, 2016 at 06:39:48PM +0100, Max Reitz wrote: > On 18.12.2015 16:04, Max Reitz wrote: > > Just some bits I discovered while going through the Coverity report. > > > > (The issue reported by Coverity actually was not an issue.) > > > > > > Max Reitz (2): > > vhdx: DIV_ROUND_UP() in

Re: [Qemu-devel] [PATCH v2 0/3] memory: an optimization

2016-02-22 Thread Fam Zheng
On Mon, 02/22 11:22, Paolo Bonzini wrote: > > > On 22/02/2016 09:34, Gonglei wrote: > > Perf top tells me qemu_get_ram_ptr consume some cpu cycles. > > > > Before this optimization: > > 1.26% qemu-kvm [.] qemu_get_ram_ptr > > 0.89% qemu-kvm [.] qemu_get_ra

Re: [Qemu-devel] [PATCH 01/13] q35: add "int-remap" flag to enable intr

2016-02-22 Thread Peter Xu
On Sun, Feb 21, 2016 at 12:38:38PM +0200, Marcel Apfelbaum wrote: > On 02/19/2016 05:30 AM, Peter Xu wrote: > >One flag is added to specify whether to enable INTR for emulated > >IOMMU. By default, interrupt remapping is not supportted. To enable it, > >we should specify something like: > > > >$ qe

Re: [Qemu-devel] [PATCH V2 2/2] hw/virtio: group virtio flags into an enum

2016-02-22 Thread Jason Wang
On 02/10/2016 09:31 PM, Marcel Apfelbaum wrote: > Minimizes the possibility to assign > the same bit to different features. > > Signed-off-by: Marcel Apfelbaum > --- > hw/virtio/virtio-pci.h | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/hw/virtio/vi

Re: [Qemu-devel] [PATCH V2 1/2] hw/virtio: fix double use of a virtio flag

2016-02-22 Thread Jason Wang
On 02/10/2016 09:31 PM, Marcel Apfelbaum wrote: > Commits 1811e64c and a6df8adf use the same virtio feature bit 4 > for different features. > > Fix it by using different bits. > > Reported-by: Laurent Vivier > Tested-by: Laurent Vivier > Signed-off-by: Marcel Apfelbaum > --- > hw/virtio/virti

Re: [Qemu-devel] [RFC PATCH 00/16] Qemu Bit Map (QBM) - an overlay format for persistent dirty bitmap

2016-02-22 Thread Fam Zheng
(I'm Cc'ing a few more people here just in case they have different visions about raw image use cases.) On Mon, 02/22 15:24, Kevin Wolf wrote: > Am 26.01.2016 um 11:38 hat Fam Zheng geschrieben: > > This series introduces a simple format to enable support of persistence of > > block dirty bitmaps.

Re: [Qemu-devel] [PATCH 2/2] hw/virtio: group virtio flags into an enum

2016-02-22 Thread Jason Wang
On 02/10/2016 08:22 PM, Marcel Apfelbaum wrote: > Minimizes the possibility to assign > the same bit to different features. > > Signed-off-by: Marcel Apfelbaum > --- > hw/virtio/virtio-pci.h | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/hw/virtio/vir

Re: [Qemu-devel] [PATCH 1/2] hw/virtio: fix double use of a virtio flag

2016-02-22 Thread Jason Wang
On 02/10/2016 08:22 PM, Marcel Apfelbaum wrote: > Commits 1811e64c and a6df8adf use the same virtio feature bit 4 > for different features. > > Fix it by using different bits. > > Reported-by: Laurent Vivier > Signed-off-by: Marcel Apfelbaum > --- > hw/virtio/virtio-pci.h | 2 +- > 1 file chan

Re: [Qemu-devel] [PATCH] net: netmap: probe netmap interface for virtio-net header

2016-02-22 Thread Jason Wang
On 02/18/2016 09:34 PM, Vincenzo Maffione wrote: >>> static void netmap_set_offload(NetClientState *nc, int csum, int tso4, int >>> tso6, >>> >> @@ -376,7 +394,7 @@ static void netmap_set_offload(NetClientState *nc, >>> >> int csum, int tso4, int tso6, >>> >> * enables the offloadings. >

Re: [Qemu-devel] [PATCH] net: ne2000: check ring buffer control registers

2016-02-22 Thread Jason Wang
On 02/09/2016 02:47 PM, P J P wrote: > Hello Jason, > > +-- On Fri, 5 Feb 2016, Jason Wang wrote --+ > | I suspect this could even work. Consider after realizing, s->stop is > | zero, any attempt to set STARTPG will fail? > > Ie after 'pci_ne2000_realize'? It does not seem to set or reset s->s

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

2016-02-22 Thread Changlong Xie
On 02/22/2016 06:34 PM, Kevin Wolf wrote: Am 22.02.2016 um 10:02 hat Dr. David Alan Gilbert geschrieben: * Changlong Xie (xiecl.f...@cn.fujitsu.com) wrote: On 02/20/2016 10:28 PM, Max Reitz wrote: On 19.02.2016 12:24, Alberto Garcia wrote: On Fri 19 Feb 2016 09:26:53 AM CET, Wen Congyang wro

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

2016-02-22 Thread Zhang Chen
On 02/23/2016 10:03 AM, Jason Wang wrote: On 02/18/2016 04:10 PM, Zhang Chen wrote: 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 -fil

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

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > 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,ser

Re: [Qemu-devel] [PATCH qemu] memory: Fix IOMMU replay base address

2016-02-22 Thread Alexey Kardashevskiy
On 02/22/2016 11:12 PM, David Gibson wrote: On Mon, Feb 22, 2016 at 10:36:19PM +1100, Alexey Kardashevskiy wrote: On 02/22/2016 05:26 PM, David Gibson wrote: On Mon, Feb 22, 2016 at 05:09:39PM +1100, Alexey Kardashevskiy wrote: Since a788f227 "memory: Allow replay of IOMMU mapping notification

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

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > 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

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

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > 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 zha

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

2016-02-22 Thread Jason Wang
On 02/17/2016 11:53 AM, Zhang Chen wrote: > > > On 02/15/2016 03:06 PM, Zhang Chen wrote: >> >> >> On 02/15/2016 01:23 PM, Jason Wang wrote: >>> >>> On 02/04/2016 05:00 PM, Zhang Chen wrote: On 02/04/2016 03:43 PM, Zhang Chen wrote: > From: ZhangChen > > Filter-mirror is a

Re: [Qemu-devel] [Bug 1548170] [NEW] qemu-kvm-spice spice server locks up when large user image is set

2016-02-22 Thread Fam Zheng
On Mon, 02/22 04:06, Christopher Snowhill wrote: > Public bug reported: > > QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.22), Copyright > (c) 2003-2008 Fabrice Bellard > > I have QEMU kvm spice installed, running a Windows 10 1511, freshly > installed this morning, using VirtIO root vo

[Qemu-devel] [PATCH] aio-posix: Don't use epoll if epoll_create1 not available

2016-02-22 Thread Fam Zheng
Reported-by: Matthew Fortune Signed-off-by: Fam Zheng --- aio-posix.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index fa7f8ab..97e5a0c 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -18,7 +18,9 @@ #include "block/block.h" #include "qem

Re: [Qemu-devel] CONFIG_EPOLL vs CONFIG_EPOLL_CREATE1

2016-02-22 Thread Fam Zheng
On Mon, 02/22 17:21, Matthew Fortune wrote: > Hi, > > I've recently tried building qemu with a sysroot that has support > for epoll_create but not epoll_create1. > > New code introduced in the following commit uses epoll_create1 but > guards it using CONFIG_EPOLL rather than CONFIG_EPOLL_CREATE1.

Re: [Qemu-devel] [RFC PATCH v0 0/8] cpu-package hotplug

2016-02-22 Thread David Gibson
On Mon, Feb 22, 2016 at 04:32:25PM +0100, Andreas Färber wrote: > Hi Bharata, > > Am 22.02.2016 um 06:01 schrieb Bharata B Rao: > > This is an attempt to implement David Gibson's RFC that was posted at > > https://lists.gnu.org/archive/html/qemu-ppc/2016-02/msg0.html > > I am not sure if I hav

Re: [Qemu-devel] [RFC PATCH v0 4/8] spapr: Introduce CPU core device

2016-02-22 Thread David Gibson
On Mon, Feb 22, 2016 at 04:58:46PM +0100, Andreas Färber wrote: > Am 22.02.2016 um 08:47 schrieb David Gibson: > > On Mon, Feb 22, 2016 at 07:44:40AM +0100, Andreas Färber wrote: > >> Am 22.02.2016 um 06:01 schrieb Bharata B Rao: > >>> sPAPR CPU core device is a container of CPU thread devices. CPU

Re: [Qemu-devel] %cpu used by qemu-kvm processes

2016-02-22 Thread Felipe Franciosi
Out of curiosity: I noticed your VM is called WS2008r2. Do you still see this high cpu utilisation with WS2012r2? Thanks, Felipe From: mailto:qemu-devel-bounces+felipe=nutanix@nongnu.org>> on behalf of Jean-Pierre Ribeauville mailto:jpribeauvi...@axway.com>> Date: Friday, 19 February 201

Re: [Qemu-devel] RFC: incremental backups: qmp-block-dirty-bitmap-diff

2016-02-22 Thread John Snow
On 02/14/2016 03:02 AM, Fam Zheng wrote: > On Tue, 02/09 19:48, John Snow wrote: >> - Reading an entire drive to populate a bitmap with the understanding >> that an incremental backup is soon to follow is inefficient if the drive >> is more than just a little dirty: it may have been quicker to ju

Re: [Qemu-devel] [PATCH RFC 0/2] Versioning ARM virt machine types

2016-02-22 Thread Peter Maydell
On 22 February 2016 at 21:06, Wei Huang wrote: > We start to see more features been added to ARM virtual machine models. > For the purpose of backward compatibility (e.g. migration), it is time > to consider versioning machine types for ARM VMs. As a beginning step, this > patchset defines an abst

[Qemu-devel] [PATCH v2 1/3] block/backup: make backup cluster size configurable

2016-02-22 Thread John Snow
64K might not always be appropriate, make this a runtime value. Signed-off-by: John Snow --- block/backup.c | 64 +- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/block/backup.c b/block/backup.c index 00cafdb..76addef 1006

Re: [Qemu-devel] drive-backup

2016-02-22 Thread John Snow
On 02/22/2016 03:21 PM, Stefan Priebe wrote: > Hello, > > is there any chance or hack to work with a bigger cluster size for the > drive backup job? > > See: > http://git.qemu.org/?p=qemu.git;a=blob;f=block/backup.c;h=16105d40b193be9bb40346027bdf58e62b956a96;hb=98d2c6f2cd80afaa2dc10091f5e35a97c

[Qemu-devel] [PATCH v2 2/3] block/backup: avoid copying less than full target clusters

2016-02-22 Thread John Snow
During incremental backups, if the target has a cluster size that is larger than the backup cluster size and we are backing up to a target that cannot (for whichever reason) pull clusters up from a backing image, we may inadvertantly create unusable incremental backup images. For example: If the

[Qemu-devel] [PATCH v2 3/3] iotests/124: Add cluster_size mismatch test

2016-02-22 Thread John Snow
If a backing file isn't specified in the target image and the cluster_size is larger than the bitmap granularity, we run the risk of creating bitmaps with allocated clusters but empty/no data which will prevent the proper reading of the backup in the future. Reviewed-by: Fam Zheng Signed-off-by:

[Qemu-devel] [PATCH v2 0/3] blockjob: correct backup cluster size for backups

2016-02-22 Thread John Snow
Backups sometimes need a non-64KiB transfer cluster size. See patch #2 for the detailed justificaton. === v2 === 01: Removed "sectors_per_cluster" as a cached property of the Backup Block Job, In favor of recomputing it with a small function where needed. (I like v1 more. Thoughts?) 02: E

Re: [Qemu-devel] [PATCH] qmp-shell: fix pretty printing of JSON responses

2016-02-22 Thread Eric Blake
On 02/22/2016 10:02 AM, Daniel P. Berrange wrote: > Pretty printing of JSON responses is important to be able > to understand large responses from query commands in > particular, eg > > (QEMU) query-chardev > { u'return': [ { u'filename': u'vc', >u'frontend-open': Fal

Re: [Qemu-devel] [PATCH] target-i386: fix confusion in xcr0 bit position vs. mask

2016-02-22 Thread Eduardo Habkost
On Mon, Feb 22, 2016 at 11:14:44AM -0800, Richard Henderson wrote: > On 02/22/2016 02:19 AM, Paolo Bonzini wrote: > > The xsave and xrstor helpers are accessing the x86_ext_save_areas array > > using a bit mask instead of a bit position. Provide two sets of XSTATE_* > > definitions and use XSTATE_

Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"

2016-02-22 Thread Eduardo Habkost
(CCing libvir-list) On Sat, Feb 20, 2016 at 04:00:30AM -0500, Paolo Bonzini wrote: > - Original Message - > > From: "Jan Kiszka" > > To: "Eduardo Habkost" , "Paolo Bonzini" > > > > Cc: "qemu-devel" , "kvm" > > Sent: Saturday, February 20, 2016 9:09:32 AM > > Subject: kvm: "warning: hos

[Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-22 Thread Samuel Thibault
struct mbuf uses a C99 open char array to allow inlining data. Inlining this in another structure is however a GNU extension. The inlines used so far in struct Slirp were actually only needed as head of struct mbuf lists. This replaces these inline with mere struct quehead, and use casts as appropr

Re: [Qemu-devel] [PATCH 2/2] virtio-balloon: add 'available' counter

2016-02-22 Thread Eric Blake
On 02/20/2016 12:54 AM, Denis V. Lunev wrote: > The patch for the kernel part is in linux-next already: > commit ac88e7c908b920866e529862f2b2f0129b254ab2 > Author: Igor Redko > Date: Thu Feb 18 09:23:01 2016 +1100 > > virtio_balloon: export 'available' memory to balloon statistics >

Re: [Qemu-devel] [PATCH 1/2] virtio-balloon: export all balloon statistics

2016-02-22 Thread Eric Blake
On 02/20/2016 12:54 AM, Denis V. Lunev wrote: > From: Igor Redko > > We are making experiments with different autoballooning strategies > based on the guest behavior. Thus we need to experiment with different > guest statistics. For now every counter change requires QEMU recompilation > and dance

[Qemu-devel] [PATCH] firmware: fw_cfg register offsets on supported architectures only

2016-02-22 Thread Gabriel Somlo
Refrain from defining default fw_cfg register offsets on unsupported architectures -- throw an error instead. If QEMU were to add fw_cfg support on additional architectures, we should add them to the FW_CFG_SYSFS depends statement in drivers/firmware/Kconfig, and provide default values for register

[Qemu-devel] [RFC 3/5] hw/intc/arm_gicv3_kvm: Implement get/put functions

2016-02-22 Thread Peter Maydell
From: Pavel Fedin This actually implements pre_save and post_load methods for in-kernel vGICv3. Signed-off-by: Pavel Fedin [PMM: * use decimal, not 0bnnn * fixed typo in names of ICC_APR0R_EL1 and ICC_AP1R_EL1 * completely rearranged the get and put functions to read and write the state i

[Qemu-devel] [PATCH RFC 2/2] arm: virt: Move machine class init code to the abstract machine type

2016-02-22 Thread Wei Huang
This patch moves the common class initialization code from "virt-2.5" to the new abstract class. An empty property is added to "virt-2.5" machine. In the meanwhile, related machine funtion are renamed to "virt_2_5_blah_blah" for consistency. Signed-off-by: Wei Huang --- hw/arm/virt.c | 34 ++

[Qemu-devel] [RFC 5/5] hw/intc/arm_gicv3_common: Add vmstate descriptors

2016-02-22 Thread Peter Maydell
From: Pavel Fedin Add state structure descriptors and actually enable live migration. In order to describe fixed-size bitmaps, VMSTATE_BITMAP_STATIC() macro is introduced. Signed-off-by: Pavel Fedin [PMM: Adjust to renamed struct fields] --- hw/intc/arm_gicv3_common.c | 45 ++

[Qemu-devel] [PATCH RFC 0/2] Versioning ARM virt machine types

2016-02-22 Thread Wei Huang
We start to see more features been added to ARM virtual machine models. For the purpose of backward compatibility (e.g. migration), it is time to consider versioning machine types for ARM VMs. As a beginning step, this patchset defines an abstract machine type for ARM VMs. The current "virt" machin

[Qemu-devel] [PATCH RFC 1/2] arm: virt: Add an abstract ARM virt machine type

2016-02-22 Thread Wei Huang
In preparation for future ARM virt machine types, this patch creates an abstract type for all ARM machines. The current machine type in QEMU (i.e. "virt") is renamed to "virt-2.5", which is similar to other architectures. For the purpose of backward compatibility, "virt" is converted to an alias, p

[Qemu-devel] [RFC 1/5] hw/intc/arm_gicv3_common: Add state information

2016-02-22 Thread Peter Maydell
From: Pavel Fedin Add state information to GICv3 object structure and implement arm_gicv3_common_reset(). Also, add some functions for registers which are not stored directly but simulated. State information includes not only pure GICv3 data, but also some legacy registers. This will be useful f

[Qemu-devel] [RFC 2/5] kernel: Add definitions for GICv3 attributes

2016-02-22 Thread Peter Maydell
From: Pavel Fedin This temporary patch adds kernel API definitions. Use proper header update procedure after these features are released. Signed-off-by: Pavel Fedin --- linux-headers/asm-arm64/kvm.h | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/linux-he

[Qemu-devel] [RFC 4/5] migration: Define VMSTATE_UINT64_2DARRAY

2016-02-22 Thread Peter Maydell
Define a VMSTATE_UINT64_2DARRAY macro, to go with the ones we already have for other type sizes. Signed-off-by: Peter Maydell --- include/migration/vmstate.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 7246f29..ecc4992

[Qemu-devel] [PATCH] Use unsigned types for the 'len' argument of all memory read/write functions

2016-02-22 Thread Martin Galvan
When looking at address_space_read_continue I noticed the 'len' variable was a signed int, while it clearly should be a hwaddr or some other unsigned type. I started looking around and saw that this error had spread all over the code. I replaced the signed int by their unsigned counterparts as muc

Re: [Qemu-devel] [PATCH v6 7/7] s390x/cpu: Allow hotplug of CPUs

2016-02-22 Thread Matthew Rosato
On 02/22/2016 12:22 PM, Andreas Färber wrote: > Am 22.02.2016 um 18:06 schrieb Matthew Rosato: >> Implement cpu hotplug routine and add the machine hook. >> >> Signed-off-by: Matthew Rosato >> --- >> hw/s390x/s390-virtio-ccw.c | 33 + >> target-s390x/cpu.c

[Qemu-devel] [Bug 1548471] [NEW] Lost of log file during block migration

2016-02-22 Thread stgleb
Public bug reported: Hello, i've discovered that during live block migration log file is copied(or created on destination) but it actually empty. When regular(cold) migration is called log file migrates successfully. I'm working on nova project in openstack and i've tried to fix it by adding s

Re: [Qemu-devel] [PATCH v6 3/7] s390x/cpu: Move some CPU initialization into realize

2016-02-22 Thread Matthew Rosato
On 02/22/2016 12:35 PM, Andreas Färber wrote: > Am 22.02.2016 um 18:06 schrieb Matthew Rosato: >> In preparation for hotplug, defer some CPU initialization >> until the device is actually being realized. >> >> Signed-off-by: Matthew Rosato >> --- >> target-s390x/cpu.c | 9 ++--- >> 1 file cha

Re: [Qemu-devel] [PATCH v6 1/7] s390x/cpu: Cleanup init in preparation for hotplug

2016-02-22 Thread Matthew Rosato
On 02/22/2016 12:46 PM, Andreas Färber wrote: > Am 22.02.2016 um 18:06 schrieb Matthew Rosato: >> Ensure a valid cpu_model is set upfront by setting the >> default value directly into the MachineState when none is >> specified. This is needed to ensure hotplugged CPUs share >> the same cpu_model.

Re: [Qemu-devel] [PATCH v8 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-02-22 Thread Gabriel L. Somlo
On Mon, Feb 22, 2016 at 10:14:50PM +0200, Michael S. Tsirkin wrote: > On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabriel L. Somlo wrote: > > > > +static void fw_cfg_io_cleanup(void) > > > > +{ > > > > + if (fw_cfg_is_mmio) { > > > > + iounmap(fw_cfg_dev_base); > > > > +

[Qemu-devel] [RFC 0/5] GICv3 state structs and migration

2016-02-22 Thread Peter Maydell
This is a very rough-and-ready RFC that takes Pavel's patch series from last year: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg05284.html and applies the various changes I recommended in code review. I haven't tested this beyond compile-testing, but I think that the general shape of i

[Qemu-devel] drive-backup

2016-02-22 Thread Stefan Priebe
Hello, is there any chance or hack to work with a bigger cluster size for the drive backup job? See: http://git.qemu.org/?p=qemu.git;a=blob;f=block/backup.c;h=16105d40b193be9bb40346027bdf58e62b956a96;hb=98d2c6f2cd80afaa2dc10091f5e35a97c181e4f5 This is very slow with ceph - may be due to the 6

Re: [Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events

2016-02-22 Thread Alex Bennée
Lluís Vilanova writes: > Lluís Vilanova writes: > >> NOTE: This series should complete the framework for guest code tracing. From >> here on, other series can concurrently add actual events and improve >> the >> guest code tracing features and performance (e.g., control tracing >>

Re: [Qemu-devel] [PATCH v8 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-02-22 Thread Michael S. Tsirkin
On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabriel L. Somlo wrote: > > > +static void fw_cfg_io_cleanup(void) > > > +{ > > > + if (fw_cfg_is_mmio) { > > > + iounmap(fw_cfg_dev_base); > > > + release_mem_region(fw_cfg_p_base, fw_cfg_p_size); > > > + } else { > > > + ioport_unm

Re: [Qemu-devel] [PATCH RFC] fw-cfg: support writeable blobs

2016-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2016 at 03:26:56PM +0100, Gerd Hoffmann wrote: > On Mo, 2016-02-22 at 14:41 +0200, Michael S. Tsirkin wrote: > > Useful to send guest data back to QEMU. > > Use case? > > cheers, > Gerd VM GEN ID at least wants to pass address of some blob in guest memory to host. Apparently,

Re: [Qemu-devel] [PATCH 15/37] tcg: Clean up includes

2016-02-22 Thread Richard Henderson
On 02/22/2016 11:24 AM, Peter Maydell wrote: > On 22 February 2016 at 19:11, Richard Henderson wrote: >> On 02/19/2016 10:24 AM, Peter Maydell wrote: >>> How do you feel about renaming the tcg-target.c files to >>> tcg-target.inc.c ? Then I can make clean-includes know that >>> *.inc.c are not to

Re: [Qemu-devel] [RFC PATCH v2 08/10] net/colo-proxy: Handle packet and connection

2016-02-22 Thread Dr. David Alan Gilbert
* Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: > > > On 02/20/2016 04:04 AM, Dr. David Alan Gilbert wrote: > >* Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: > >>From: zhangchen > >> > >>In here we will handle ip packet and connection > >> > >>Signed-off-by: zhangchen > >>Signed-off-by

Re: [Qemu-devel] kernel 4.4.2: kvm_irq_delivery_to_api / rwsem_down_read_failed

2016-02-22 Thread Paolo Bonzini
- Original Message - > From: "Stefan Priebe" > To: "Paolo Bonzini" , "qemu-devel" > , k...@vger.kernel.org > Sent: Monday, February 22, 2016 8:35:41 PM > Subject: Re: kernel 4.4.2: kvm_irq_delivery_to_api / rwsem_down_read_failed > > > Am 22.02.2016 um 18:36 schrieb Paolo Bonzini: > >

Re: [Qemu-devel] kernel 4.4.2: kvm_irq_delivery_to_api / rwsem_down_read_failed

2016-02-22 Thread Stefan Priebe
Am 22.02.2016 um 18:36 schrieb Paolo Bonzini: On 20/02/2016 11:44, Stefan Priebe wrote: Hi, while testing Kernel 4.4.2 and starting 20 Qemu 2.4.1 virtual machines. I got those traces and a load of 500 on those system. I was only abler to recover by sysrq-trigger. It seems like something ha

[Qemu-devel] [PATCHv9 01/10] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the guest is now able to

[Qemu-devel] [PATCHv9 05/10] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron Basically, this patch adds some switch in various TCP functions to prepare them for the IPv6 case. To have something to "switch" in tcp_input() and tcp_respond(), a new argument is used to give them the sa_family of the addresses they are working on. This patch does not

[Qemu-devel] [PATCHv9 04/10] slirp: Factorizing tcpiphdr structure with an union

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various func

[Qemu-devel] [PATCHv9 07/10] slirp: Handle IPv6 in TCP functions

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth -

[Qemu-devel] [PATCHv9 09/10] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-22 Thread Samuel Thibault
From: Yann Bordenave This patch adds parameters to manage some new options in the qemu -net command. Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in argument to the qemu command. Defaults parameters are respectively fec0::2, fec0::, /64 and fec0::3. Signed-off-by: Yann B

[Qemu-devel] [PATCHv9 02/10] slirp: Adding ICMPv6 error sending

2016-02-22 Thread Samuel Thibault
From: Yann Bordenave Disambiguation : icmp_error is renamed into icmp_send_error, since it doesn't manage errors, but only sends ICMP Error messages. Adding icmp6_send_error to send ICMPv6 Error messages. This function is simpler than the v4 version. Adding some calls in various functions to sen

[Qemu-devel] [PATCHv9 08/10] slirp: Adding IPv6 address for DNS relay

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is developed using this Slirp attribute. sotranslate_in/out/accept() are also updated to manage the IPv6 case so the guest can be able to join the host using one of the Slirp addresses. For now this only po

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

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/tcp_input.c | 92 +++--- slirp/tcp_output.c | 29 + slirp/tcp_subr.c | 50

[Qemu-devel] [PATCHv9 10/10] slirp: Add IPv6 support to the TFTP code

2016-02-22 Thread Samuel Thibault
From: Thomas Huth Add the handler code for incoming TFTP packets to udp6_input(), and make sure that the TFTP code can send packets with both, udp_output() and udp6_output() by introducing a wrapper function called tftp_udp_output(). Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault ---

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

2016-02-22 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, make UDP and TCP compatible with IPv6, and add TFTP over IPv6. Difference with version 8 is: - Fix freeing random number generator - Fix coding style - Fix prefix lengths in in6_equal_dns macro Here i

[Qemu-devel] [PATCHv9 03/10] slirp: Adding IPv6 UDP support

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Review

Re: [Qemu-devel] [PATCH 15/37] tcg: Clean up includes

2016-02-22 Thread Peter Maydell
On 22 February 2016 at 19:11, Richard Henderson wrote: > On 02/19/2016 10:24 AM, Peter Maydell wrote: >> How do you feel about renaming the tcg-target.c files to >> tcg-target.inc.c ? Then I can make clean-includes know that >> *.inc.c are not to have the cleaning rules applied to them. > > I supp

  1   2   3   4   >