[Qemu-devel] [PATCH] usb-redirect: Avoid double free of data

2016-02-24 Thread Fam Zheng
If dropping packets, data is freed, the caller's loop should not continue. Reported by ccc-analyzer. Signed-off-by: Fam Zheng --- hw/usb/redirect.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index d0f7cb8..38a5393 100644

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

2016-02-24 Thread Jason Wang
On 02/24/2016 02:54 PM, Zhang Chen wrote: > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > v6: > - Address Jason's comments. > > v5: > - Address Jason's comments. > > v4: > - Address Jason's comments. > > v3: > - Add filter-mirror unit t

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

2016-02-24 Thread Jason Wang
On 02/24/2016 02:11 PM, P J P wrote: > 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

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

2016-02-24 Thread Jason Wang
On 02/23/2016 04:46 PM, Vincenzo Maffione wrote: > 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 har

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

2016-02-24 Thread Amit Shah
On (Tue) 23 Feb 2016 [18:49:00], 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] [PATCH] replace fixed str limit by g_strdup_printf

2016-02-24 Thread Neo Jia
A trivial change to remove string limit by using g_strdup_printf and g_strconcat Tested-by: Neo Jia Signed-off-by: Neo Jia Signed-off-by: Kirti Wankhede --- hw/vfio/pci.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c inde

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

2016-02-24 Thread Denis V. Lunev
On 02/24/2016 11:22 AM, Amit Shah wrote: On (Tue) 23 Feb 2016 [18:49:00], 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 i

Re: [Qemu-devel] [PATCH v3 2/8] cpu: introduce possible-cpus interface

2016-02-24 Thread Igor Mammedov
On Tue, 23 Feb 2016 18:38:33 -0300 Eduardo Habkost wrote: > On Tue, Feb 23, 2016 at 05:05:54PM +0100, Igor Mammedov wrote: > > on x86 currently range 0..max_cpus is used to generate > > architecture-dependent CPU ID (APIC Id) for each present > > and possible CPUs. However architecture-dependent

Re: [Qemu-devel] [GIT PULL] pseries: Update SLOF firmware image to 20160223

2016-02-24 Thread Alexey Kardashevskiy
On 02/24/2016 04:45 PM, David Gibson wrote: On Tue, Feb 23, 2016 at 07:25:13PM +1100, Alexey Kardashevskiy wrote: This is expected to go via the powerpc tree at git://github.com/dgibson/qemu.git The following changes since commit 8eb779e4223a18db9838a49ece1bc72cfdfb7761: Merge remote-trac

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

2016-02-24 Thread Markus Armbruster
David Gibson writes: > On Mon, Feb 22, 2016 at 10:05:54AM +0100, Markus Armbruster wrote: >> David Gibson writes: >> >> > On Fri, Feb 19, 2016 at 10:51:11AM +0100, Markus Armbruster wrote: >> >> David Gibson writes: >> >> >> >> > On Thu, Feb 18, 2016 at 11:37:39AM +0100, Igor Mammedov wrote:

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

2016-02-24 Thread 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_invalidate_cache() closes the im

[Qemu-devel] [PATCH 1/2] migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context

2016-02-24 Thread 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_invalidate_cache() closes the im

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

2016-02-24 Thread Markus Armbruster
Igor Mammedov writes: > On Mon, 22 Feb 2016 13:54:32 +1100 > David Gibson wrote: [...] >> This is why Eduardo suggested - and I agreed - that it's probably >> better to implement the "1st layer" as an internal structure/interface >> only, and implement the 2nd layer on top of that. When/if we n

[Qemu-devel] [PATCH 2/2] migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context

2016-02-24 Thread 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_invalidate_cache() closes the im

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-24 Thread Zhang Chen
On 02/24/2016 11:39 AM, Jason Wang wrote: On 02/18/2016 03:50 PM, Zhang Chen wrote: On 02/18/2016 10:41 AM, Jason Wang wrote: On 02/05/2016 02:50 PM, Zhang Chen wrote: From: ZhangChen Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector ca

[Qemu-devel] [PATCH] loader: fix potential memory leak

2016-02-24 Thread Cao jin
Signed-off-by: Cao jin --- hw/core/loader.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index 3a57415..24fea65 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -827,10 +827,16 @@ int rom_add_file(const char *file, const char *fw_dir, err:

[Qemu-devel] 答复: [PATCH v2] net: ne2000: check ring buffer control registers

2016-02-24 Thread yanghongke
Good day to you! After my test, I find that the issue is fixed with this patch. When receiving packet, ne2000_buffer_full return 1, ne2000_receive immediately return -1,so it avoid infinite loop or OOB r/w access issues. -邮件原件- 发件人: Jason Wang [mailto:jasow...@redhat.com]

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

2016-02-24 Thread Li, Liang Z
> > > On 23/02/2016 12:25, Peter Maydell wrote: > > On 23 February 2016 at 10:43, Peter Maydell > wrote: > >> That code fragment you suggest compiles fine normally, but not if I > >> add -save-temps: > >> > >> $ cat /tmp/zz9.c > >> #pragma GCC target("avx2") > >> #include > >> __m256i foo; > >>

Re: [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends

2016-02-24 Thread Markus Armbruster
Max Reitz writes: > On 23.02.2016 10:48, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 22.02.2016 09:24, Markus Armbruster wrote: Max Reitz writes: > On 17.02.2016 17:20, Kevin Wolf wrote: >> Am 17.02.2016 um 16:41 hat Max Reitz geschrieben: >>> On 17.02.2016 11

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

2016-02-24 Thread Cornelia Huck
On Fri, 19 Feb 2016 15:18:11 + 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. > > Signed-off-by: Wei Yang > CC: Cornelia Huck > CC: C

Re: [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 10:28 hat Markus Armbruster geschrieben: > Max Reitz writes: > > > On 23.02.2016 10:48, Markus Armbruster wrote: > >> Max Reitz writes: > >> > >>> On 22.02.2016 09:24, Markus Armbruster wrote: > Max Reitz writes: > > > On 17.02.2016 17:20, Kevin Wolf wrote: > >>>

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

2016-02-24 Thread Vincenzo Maffione
2016-02-24 9:21 GMT+01:00 Jason Wang : > > > On 02/23/2016 04:46 PM, Vincenzo Maffione wrote: >> 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 c

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

2016-02-24 Thread Roman Kagan
On Tue, Feb 23, 2016 at 05:49:21PM +0200, Michael S. Tsirkin wrote: > On Tue, Feb 23, 2016 at 06:29:33PM +0300, Denis V. Lunev wrote: > > On 02/23/2016 06:24 PM, Michael S. Tsirkin wrote: > > >On Tue, Feb 23, 2016 at 05:59:44PM +0300, Denis V. Lunev wrote: > > >>From: Igor Redko > > >> > > >>We ar

[Qemu-devel] [PATCH v5 0/3] modify vote rules for flush operation

2016-02-24 Thread Changlong Xie
ChangLog: v5: 1. Fix invalid node name in docs/qmp-events.txt 2. Address comments from Eric, drop QUORUM_FLUSH_ERROR. Instead of reworking QUORUM_REPORT_BAD to make it compatible with quorum read/write/flush operations v4: 1. Introduce QUORUM_FLUSH_ERROR event to notify flush failure. v3: 1. *Note*

[Qemu-devel] [PATCH v5 3/3] quorum: modify vote rules for flush operation

2016-02-24 Thread Changlong Xie
Keep flush interface the same logic as quorum read/write, Otherwise in following scenario, we'll encounter unexpected errors. Quorum has two children(A, B). A do flush sucessfully, but B flush failed. This cause the filesystem of guest become read-only with following errors: end_request: I/O erro

[Qemu-devel] [PATCH v5 2/3] qmp event: Refactor QUORUM_REPORT_BAD

2016-02-24 Thread Changlong Xie
Introduce QuorumOpType, and make QUORUM_REPORT_BAD compatible with it. Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/quorum.c | 28 +++- docs/qmp-events.txt | 8 qapi/block.json | 16 ++

[Qemu-devel] [PATCH v5 1/3] docs: fix invalid node name in qmp event

2016-02-24 Thread Changlong Xie
Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- docs/qmp-events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt index 52eb7e2..f96e120 100644 --- a/docs/qmp-events.txt +++

Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > When QEMU creates a VHD image, it goes by the original spec, > calculating the current_size based on the nearest CHS geometry (with an > exception for disks > 127GB). > > Apparently, Azure will only allow images that are sized to the nearest > MB

Re: [Qemu-devel] [PATCH v5 1/3] docs: fix invalid node name in qmp event

2016-02-24 Thread Alberto Garcia
On Wed 24 Feb 2016 11:11:53 AM CET, Changlong Xie wrote: > Cc: Dr. David Alan Gilbert > Cc: Wen Congyang > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v3 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers

2016-02-24 Thread Andrey Smetanin
Add Hyper-V VMBus hypercalls blank handlers which just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. Changes v3: * use HVCALL_* defines Changes v2: * use KVM_EXIT_HYPERV exit type Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Edu

[Qemu-devel] [PATCH v3 1/2] headers: KVM Hyper-V VMBus hypercalls defines and exit

2016-02-24 Thread Andrey Smetanin
This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC:

Re: [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > This tests auto-detection, and overrides, of VHD image sizes created > by Virtual PC and Hyper-V. > > This adds two sample images: > > hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V > virtualpc-dynamic.vhd.bz2- dynamic

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

2016-02-24 Thread Markus Armbruster
John Snow writes: > On 02/23/2016 05:51 AM, Daniel P. Berrange wrote: >> Pretty printing of JSON responses is important to be able to understand >> large responses from query commands in particular. Unfortunately this >> was broken during the addition of the verbose flag in >> >> commit 1ceca0

[Qemu-devel] [PATCH v3] net: netmap: implement virtio-net header probe

2016-02-24 Thread Vincenzo Maffione
Current implementation for netmap backend does not really probe the netmap kernel module to know whether virtio-net header is supported for a specific netmap port. This is only correct for VALE ports, but it is not correct for hardware ports, pipes, etc. This patch properly implements the missing

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

2016-02-24 Thread 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. This patch fixes the imp

Re: [Qemu-devel] [GIT PULL] pseries: Update SLOF firmware image to 20160223

2016-02-24 Thread David Gibson
On Wed, Feb 24, 2016 at 07:37:46PM +1100, Alexey Kardashevskiy wrote: > On 02/24/2016 04:45 PM, David Gibson wrote: > >On Tue, Feb 23, 2016 at 07:25:13PM +1100, Alexey Kardashevskiy wrote: > >> > >>This is expected to go via the powerpc tree at > >>git://github.com/dgibson/qemu.git > >> > >> > >>T

[Qemu-devel] [PATCH] vhost-user: verify that number of queues is less than MAX_QUEUE_NUM

2016-02-24 Thread Ilya Maximets
Fix QEMU crash when -netdev vhost-user,queues=n is passed with number of queues greater than MAX_QUEUE_NUM. Signed-off-by: Ilya Maximets --- net/vhost-user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index 451dbbf..b753b3d 100644

[Qemu-devel] [PATCH] target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs

2016-02-24 Thread Leon Alrae
MIPS Release 6 and MIPS SIMD Architecture make it mandatory to have IEEE 754-2008 FPU which is indicated by CP1 FIR.HAS2008, FCSR.ABS2008 and FCSR.NAN2008 bits set to 1. In QEMU we still keep these bits cleared as there is no 2008-NaN support. However, this now causes problems preventing from runn

Re: [Qemu-devel] CPU hotplug, again

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 13:01:06 +1100 David Gibson wrote: > On Tue, Feb 23, 2016 at 12:18:59PM +0100, Igor Mammedov wrote: > > On Tue, 23 Feb 2016 21:05:04 +1100 > > David Gibson wrote: > > > > > On Tue, Feb 23, 2016 at 03:10:26PM +0530, Bharata B Rao wrote: > > > > On Tue, Feb 23, 2016 at 04:

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

2016-02-24 Thread David Gibson
On Wed, Feb 24, 2016 at 09:42:10AM +0100, Markus Armbruster wrote: > David Gibson writes: > > > On Mon, Feb 22, 2016 at 10:05:54AM +0100, Markus Armbruster wrote: > >> David Gibson writes: > >> > >> > On Fri, Feb 19, 2016 at 10:51:11AM +0100, Markus Armbruster wrote: > >> >> David Gibson write

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

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 21:51:19 +1100 David Gibson wrote: > On Wed, Feb 24, 2016 at 09:42:10AM +0100, Markus Armbruster wrote: > > David Gibson writes: > > > > > On Mon, Feb 22, 2016 at 10:05:54AM +0100, Markus Armbruster wrote: > > >> David Gibson writes: > > >> > > >> > On Fri, Feb 19, 2

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

2016-02-24 Thread David Gibson
On Thu, Feb 18, 2016 at 11:55:16AM +0100, Igor Mammedov wrote: > 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

Re: [Qemu-devel] CPU hotplug, again

2016-02-24 Thread David Gibson
On Wed, Feb 24, 2016 at 11:48:33AM +0100, Igor Mammedov wrote: > On Wed, 24 Feb 2016 13:01:06 +1100 > David Gibson wrote: > > > On Tue, Feb 23, 2016 at 12:18:59PM +0100, Igor Mammedov wrote: > > > On Tue, 23 Feb 2016 21:05:04 +1100 > > > David Gibson wrote: > > > > > > > On Tue, Feb 23, 2016

Re: [Qemu-devel] Status of multithreading in user mode

2016-02-24 Thread Laurent Vivier
Le 23/02/2016 17:40, Cecilia Gonzalez-Alvarez a écrit : > Hi all, Hi Cecilia, > I'm planning to use Qemu as a functional simulation frontend for a > multicore simulator. > > Although later plans include full-system simulation, I'd like to start, > for the sake of simplicity, with the individua

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

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 09:53:33 +0100 Markus Armbruster wrote: > Igor Mammedov writes: > > > On Mon, 22 Feb 2016 13:54:32 +1100 > > David Gibson wrote: > [...] > >> This is why Eduardo suggested - and I agreed - that it's probably > >> better to implement the "1st layer" as an internal structur

Re: [Qemu-devel] [PATCH RESEND v2 1/2] qemu-file: Fix qemu_put_compression_data flaw

2016-02-24 Thread Juan Quintela
"Li, Liang Z" wrote: > On %D, %SN wrote: > %Q > > %C Nice Template answer without insntantiate the content O:-) > > Liang > > >> -Original Message- >> From: qemu-devel-bounces+liang.z.li=intel@nongnu.org [mailto:qemu- >> devel-bounces+liang.z.li=intel@nongnu.org] On Behalf Of

Re: [Qemu-devel] [PATCH] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD

2016-02-24 Thread Juan Quintela
Matthew Fortune wrote: > sys/eventfd.h was being guarded only by a check for linux but does > not exist on older distributions like CentOS 5. Move the include > into the code that uses it and add an appropriate guard. > > Signed-off-by: Matthew Fortune > --- > migration/postcopy-ram.c | 4 ++-- >

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

2016-02-24 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 20.02.2016 um 08:11 hat Pavel Dovgalyuk geschrieben: > > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > > > > Coroutine

Re: [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > > This tests auto-detection, and overrides, of VHD image sizes created > > by Virtual PC and Hyper-V. > > > > This adds two sample images: > > > > hyperv2012r2-dynamic.vhd.bz2 - dynam

Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 11:19:37AM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > > When QEMU creates a VHD image, it goes by the original spec, > > calculating the current_size based on the nearest CHS geometry (with an > > exception for disks > 127GB). > > > > App

Re: [Qemu-devel] [PATCH 2/3] qapi-visit: Expose visit_type_FOO_fields()

2016-02-24 Thread Markus Armbruster
Eric Blake writes: > Dan Berrange reported a case where he needs to work with a > QCryptoBlockOptions union type using the OptsVisitor, but only > visit one of the branches of that type (the discriminator is not > visited directly, but learned externally). When things were > boxed, it was easy:

Re: [Qemu-devel] Migrating decrementer

2016-02-24 Thread Juan Quintela
David Gibson wrote: > On Tue, Feb 23, 2016 at 09:27:09PM +, Mark Cave-Ayland wrote: >> On 03/02/16 04:59, David Gibson wrote: >> >> >> Going back to your earlier email you suggested that the host timebase is >> >> always continuously running, even when the guest is paused. But then >> >> resu

Re: [Qemu-devel] [PATCH v5 2/3] qmp event: Refactor QUORUM_REPORT_BAD

2016-02-24 Thread Alberto Garcia
On Wed 24 Feb 2016 11:11:54 AM CET, Changlong Xie wrote: > -static void quorum_report_bad(QuorumAIOCB *acb, char *node_name, int ret) > +static void quorum_report_bad(QuorumOpType type, QuorumAIOCB *acb, > + char *node_name, int ret) > { > const char *msg = NULL;

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

2016-02-24 Thread Alberto Garcia
On Wed 24 Feb 2016 11:11:55 AM CET, Changlong Xie wrote: > +if (result) { > +quorum_report_bad(QUORUM_OP_TYPE_FLUSH, NULL, > + s->children[i]->bs->node_name, result); This line can change depending on what happens with patch 2, but the rest looks co

[Qemu-devel] [PATCH] spice/gl: Enable dmabuf only for spice >= 0.13.1

2016-02-24 Thread Michal Privoznik
After 474114b7 the dmabuf feature is enabled whenever spice greater than or equal to spice 0.13.0 is found. This is because two new functions are required: spice_qxl_gl_scanout and spice_qxl_gl_draw_async. These were, however, introduce in 0.13.1 release. Well, technically they haven't been release

Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
if the size is forced I would set the chs values to max. this way no new creator String is needed and it is even backwards compatible. this is what disk2vhd does. Peter > Am 24.02.2016 um 13:24 schrieb Jeff Cody : > >> On Wed, Feb 24, 2016 at 11:19:37AM +0100, Kevin Wolf wrote: >> Am 24.02.2

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

2016-02-24 Thread Shlomo Pongratz
On Monday, February 22, 2016, Peter Maydell wrote: > 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

Re: [Qemu-devel] [PATCH v2 0/2] Allow x-blockdev-del on a BB with a monitor-owned BDS

2016-02-24 Thread Alberto Garcia
On Tue 09 Feb 2016 04:57:34 PM CET, Alberto Garcia wrote: > This series allow x-blockdev-del to be peformed on a BlockBackend that > has a BDS inserted with an additional reference if that reference is > from the monitor. > > v2 squashes two of the patches together and fixes the commit message, > b

Re: [Qemu-devel] [PATCH 3/3] qapi: Update docs to match recent generator changes

2016-02-24 Thread Markus Armbruster
Eric Blake writes: > Several commits have been changing the generator, but not updating > the docs to match: > - The implicit tag member is named "type", not "kind". Screwed up in > commit 39a1815. > - Commit 9f08c8ec made list types lazy, and thereby dropped > UserDefOneList if nothing explicit

Re: [Qemu-devel] [PATCH] spice/gl: Enable dmabuf only for spice >= 0.13.1

2016-02-24 Thread Marc-André Lureau
Hi - Original Message - > After 474114b7 the dmabuf feature is enabled whenever spice > greater than or equal to spice 0.13.0 is found. This is because > two new functions are required: spice_qxl_gl_scanout and > spice_qxl_gl_draw_async. These were, however, introduce in 0.13.1 > release.

Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: > if the size is forced I would set the chs values to max. this way no > new creator String is needed and it is even backwards compatible. this > is what disk2vhd does. Does disk2vhd do it this way even if the size is smaller than the maximum th

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

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 22:26:04 +1100 David Gibson wrote: > On Thu, Feb 18, 2016 at 11:55:16AM +0100, Igor Mammedov wrote: > > 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:3

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

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 12:59 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 20.02.2016 um 08:11 hat Pavel Dovgalyuk geschrieben: > > > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > Am 16.02.2016 u

Re: [Qemu-devel] [PATCH 1/3] qapi-dealloc: Reduce use outside of generated code

2016-02-24 Thread Markus Armbruster
Eric Blake writes: > No need to roll our own use of the dealloc visitors when we can > just directly use the qapi_free_FOO() functions that do what we > want in one line. > > In net.c, inline net_visit() into its remaining lone caller. > > After this patch, test-visitor-serialization.c is the onl

[Qemu-devel] [PULL 01/19] qemu-options.hx: Improve documentation of chardev multiplexing mode

2016-02-24 Thread Paolo Bonzini
From: Peter Maydell The current documentation of chardev mux=on is rather brief and opaque; expand it to hopefully be a bit more helpful. Signed-off-by: Peter Maydell Message-Id: <1455643738-6068-1-git-send-email-peter.mayd...@linaro.org> Signed-off-by: Paolo Bonzini --- qemu-doc.texi | 30

[Qemu-devel] [PULL 08/19] dump-guest-memory: disable dump when in INMIGRATE state

2016-02-24 Thread Paolo Bonzini
From: Peter Xu Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-7-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- dump.c | 5 + 1 file changed, 5 insertions(+) diff --git a/dump.c b/dump.c index fed84a6..923e3a5 100644 --- a/dump.c +++ b/dump

[Qemu-devel] [PULL 04/19] dump-guest-memory: add "detach" flag for QMP/HMP interfaces.

2016-02-24 Thread Paolo Bonzini
From: Peter Xu This patch only adds the interfaces, but does not implement them. "detach" parameter is made optional, to make sure that all the old dump-guest-memory requests will still be able to work. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-3-git-send-emai

[Qemu-devel] [PULL 00/19] Misc changes for 2016-02-24

2016-02-24 Thread Paolo Bonzini
The following changes since commit dd5e38b19d7cb07d317e1285941d8245c01da540: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160218-1' into staging (2016-02-18 15:20:35 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] [PULL 09/19] dump-guest-memory: add "detach" support

2016-02-24 Thread Paolo Bonzini
From: Peter Xu If "detach" is provided, one thread is created to do the dump work, while main thread will return immediately. For each GuestPhysBlock, adding one more field "mr" to points to MemoryRegion that it belongs, also ref the mr before use. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

[Qemu-devel] [PULL 02/19] scripts/kvm/kvm_stat: Fix missing right parantheses and ".format(...)"

2016-02-24 Thread Paolo Bonzini
From: Fam Zheng They seem to have snuck in when applying Janosch Frank 's previous patch. Signed-off-by: Fam Zheng Message-Id: <1455848416-13177-1-git-send-email-f...@redhat.com> Reviewed-by: Janosch Frank Tested-by: Janosch Frank Signed-off-by: Paolo Bonzini --- scripts/kvm/kvm_stat | 5 ++

[Qemu-devel] [PULL 14/19] log: Redirect stderr to logfile if deamonized

2016-02-24 Thread Paolo Bonzini
From: 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 Message-Id: <1455795518-19205-1-git-send-email-dim...@arrikto.com> Signed-

[Qemu-devel] [PULL 03/19] dump-guest-memory: cleanup: removing dump_{error|cleanup}().

2016-02-24 Thread Paolo Bonzini
From: Peter Xu It might be a little bit confusing and error prone to do dump_cleanup() in these two functions. A better way is to do dump_cleanup() before dump finish, no matter whether dump has succeeded or not. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-2-git

[Qemu-devel] [PULL 13/19] dump-guest-memory: add qmp event DUMP_COMPLETED

2016-02-24 Thread Paolo Bonzini
From: Peter Xu One new QMP event DUMP_COMPLETED is added. When a dump finishes, one DUMP_COMPLETED event will occur to notify the user. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-12-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- docs/qmp

[Qemu-devel] [PULL 05/19] dump-guest-memory: using static DumpState, add DumpStatus

2016-02-24 Thread Paolo Bonzini
From: Peter Xu Instead of malloc/free each time for DumpState, make it static. Added DumpStatus to show status for dump. This is to be used for detached dump. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-4-git-send-email-pet...@redhat.com> Signed-off-by: Paolo B

[Qemu-devel] [PULL 17/19] memory: Remove unreachable return statement

2016-02-24 Thread Paolo Bonzini
From: Gonglei Signed-off-by: Gonglei Message-Id: <1455935721-8804-4-git-send-email-arei.gong...@huawei.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 1cf2e51..4e5a145 100644 --

[Qemu-devel] [PULL 06/19] dump-guest-memory: add dump_in_progress() helper function

2016-02-24 Thread Paolo Bonzini
From: Peter Xu For now, it has no effect. It will be used in dump detach support. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-5-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- dump.c| 13 + include/qemu-common.h |

[Qemu-devel] [PULL 10/19] DumpState: adding total_size and written_size fields

2016-02-24 Thread Paolo Bonzini
From: Peter Xu Here, total_size is the size in bytes to be dumped (raw data, which means before compression), while written_size are bytes handled (raw size too). Signed-off-by: Peter Xu Message-Id: <1455772616-8668-9-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- dump.c

[Qemu-devel] [PULL 07/19] dump-guest-memory: introduce dump_process() helper function.

2016-02-24 Thread Paolo Bonzini
From: Peter Xu No functional change. Cleanup only. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng Message-Id: <1455772616-8668-6-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- dump.c| 31 +-- include/sysemu/dump.h | 3 +++ 2 fi

[Qemu-devel] [PULL 15/19] exec: store RAMBlock pointer into memory region

2016-02-24 Thread Paolo Bonzini
From: Gonglei Each RAM memory region has a unique corresponding RAMBlock. In the current realization, the memory region only stored the ram_addr which means the offset of RAM address space, We need to qurey the global ram.list to find the ram block by ram_addr if we want to get the ram block, whi

[Qemu-devel] [PULL 12/19] Dump: add hmp command "info dump"

2016-02-24 Thread Paolo Bonzini
From: Peter Xu It will calculate percentage of finished work from completed and total. Signed-off-by: Peter Xu Message-Id: <1455772616-8668-11-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 14 ++ hmp.c| 17 +++

[Qemu-devel] [PULL 16/19] memory: optimize qemu_get_ram_ptr and qemu_ram_ptr_length

2016-02-24 Thread Paolo Bonzini
From: Gonglei these two functions consume too much cpu overhead to find the RAMBlock by ram address. After this patch, we can pass the RAMBlock pointer to them so that they don't need to find the RAMBlock anymore most of the time. We can get better performance in address translation processing.

[Qemu-devel] [PULL 11/19] Dump: add qmp command "query-dump"

2016-02-24 Thread Paolo Bonzini
From: Peter Xu When dump-guest-memory is requested with detach flag, after its return, user could query its status using "query-dump" command (with no argument). The result contains: - status: current dump status - completed: bytes written in the latest dump - total: bytes to write in the latest

[Qemu-devel] [PULL 18/19] chardev: Properly initialize ChardevCommon components

2016-02-24 Thread Paolo Bonzini
From: Eric Blake Commit d0d7708b forgot to parse logging for spice chardevs and virtual consoles. This requires making qemu_chr_parse_common() non-static. While at it, use a temporary variable to make the code shorter, as well as reduce the churn when a later patch alters the layout of simple uni

[Qemu-devel] [PULL 19/19] target-i386: fix confusion in xcr0 bit position vs. mask

2016-02-24 Thread Paolo Bonzini
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_*_BIT when a bit position is requested. Reviewed-by: Richard Henderson Acked-by: Eduardo Habkost Signed-off-by: Paolo Bonzi

Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: > > if the size is forced I would set the chs values to max. this way no > > new creator String is needed and it is even backwards compatible. this > > is what disk2vhd does. > > Does

Re: [Qemu-devel] CPU hotplug, again

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 22:28:22 +1100 David Gibson wrote: > On Wed, Feb 24, 2016 at 11:48:33AM +0100, Igor Mammedov wrote: > > On Wed, 24 Feb 2016 13:01:06 +1100 > > David Gibson wrote: > > > > > On Tue, Feb 23, 2016 at 12:18:59PM +0100, Igor Mammedov wrote: > > > > On Tue, 23 Feb 2016 21:05:0

Re: [Qemu-devel] Regarding Cortex-A7 CPU definition

2016-02-24 Thread Deepak kumar Raju
Hi Peter, We are emulating the A7 hardware board in QEMU. Currently I have started with A15 CPU config. I need to enable GIC and generic timer. Can you please point me to how GIC & generic timer should be enabled considering vexpress.c emulation board?. Thanks in advance for the help, Best Regard

Re: [Qemu-devel] [PATCH] aio-posix: Change CONFIG_EPOLL to CONFIG_EPOLL_CREATE1

2016-02-24 Thread Stefan Hajnoczi
On Tue, Feb 23, 2016 at 03:42:14PM +, Matthew Fortune wrote: > CONFIG_EPOLL was being used to guard epoll_create1 which results > in build failures on CentOS 5. > > Signed-off-by: Matthew Fortune > --- > aio-posix.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Thanks, appli

[Qemu-devel] [Bug 1549298] [NEW] Add missing MSRs for powertop

2016-02-24 Thread Michael Vetter
Public bug reported: I reported this same bug on the powertop bugtracker [1] because I think both projects need to change something here. When running powertop it crashes and prints: unknown op '{' read_msr cpu0 0xe8 : Input/output error It seems that powertop is trying to acc

[Qemu-devel] [PATCH] vl.c: fix memleaks with g_strdup+strtok

2016-02-24 Thread Quentin PEREZ
>From cfd35648b6ab681891fe90b2813e63a4fdbe365f Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Wed, 24 Feb 2016 10:10:56 +0100 Subject: [PATCH] vl.c: fix memleaks with g_strdup+strtok Signed-off-by: Quentin Perez --- vl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] net: filter: correctly remove filter from the list during finalization

2016-02-24 Thread Yang Hongyang
On Wed, Feb 24, 2016 at 11:44 AM, Jason Wang wrote: > 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 \ > -obj

Re: [Qemu-devel] [PATCH 1/2] trace: include CPU index in trace_memory_region_ops_*()

2016-02-24 Thread Stefan Hajnoczi
On Wed, Feb 17, 2016 at 01:29:14PM -0800, Hollis Blanchard wrote: > Knowing which CPU performed an action is essential for understanding SMP guest > behavior. > > However, cpu_physical_memory_rw() may be executed by a machine init function, > before any VCPUs are running, when there is no CPU runn

Re: [Qemu-devel] [PATCH 2/2] trace: separate MMIO tracepoints from TB-access tracepoints

2016-02-24 Thread Stefan Hajnoczi
On Wed, Feb 17, 2016 at 01:29:15PM -0800, Hollis Blanchard wrote: > Memory accesses to code which has previously been translated into a TB show up > in the MMIO path, so that they may invalidate the TB. It's extremely confusing > to mix those in with device MMIOs, so split them into their own trace

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

2016-02-24 Thread Igor Mammedov
On Wed, 24 Feb 2016 12:54:17 +1100 David Gibson wrote: > On Tue, Feb 23, 2016 at 10:46:45AM +0100, Igor Mammedov wrote: > > On Mon, 22 Feb 2016 13:54:32 +1100 > > David Gibson wrote: > > > > > On Fri, Feb 19, 2016 at 04:49:11PM +0100, Igor Mammedov wrote: > > > > On Fri, 19 Feb 2016 15:38:4

[Qemu-devel] [PATCH] target-mips: add MAAR, MAARI register

2016-02-24 Thread Yongbok Kim
The MAAR register is a read/write register included in Release 5 of the architecture that defines the accessibility attributes of physical address regions. In particular, MAAR defines whether an instruction fetch or data load can speculatively access a memory region within the physical address boun

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

2016-02-24 Thread Wei Yang
On Wed, Feb 24, 2016 at 10:40:15AM +0100, Cornelia Huck wrote: >On Fri, 19 Feb 2016 15:18:11 + >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 MS

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

2016-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2016 at 01:01:34PM +0300, Roman Kagan wrote: > On Tue, Feb 23, 2016 at 05:49:21PM +0200, Michael S. Tsirkin wrote: > > On Tue, Feb 23, 2016 at 06:29:33PM +0300, Denis V. Lunev wrote: > > > On 02/23/2016 06:24 PM, Michael S. Tsirkin wrote: > > > >On Tue, Feb 23, 2016 at 05:59:44PM +0

Re: [Qemu-devel] [PATCH v3 0/2] virtio-balloon: improve balloon statistics

2016-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2016 at 10:50:46AM +0300, Denis V. Lunev wrote: > New counter from the Linux kernel + It is in AKPM's linux-next kernel but I will revert it there if the suggested interface extension is not submitted to the Virtio ABI committee soon. > generic framework to pass currently > unkno

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

2016-02-24 Thread Igor Mammedov
On Tue, 23 Feb 2016 18:26:20 -0300 Eduardo Habkost wrote: > On Tue, Feb 23, 2016 at 10:46:45AM +0100, Igor Mammedov wrote: > > On Mon, 22 Feb 2016 13:54:32 +1100 > > David Gibson wrote: > [...] > > > This is why Eduardo suggested - and I agreed - that it's probably > > > better to implement th

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

2016-02-24 Thread Peter Maydell
On 24 February 2016 at 12:50, Shlomo Pongratz wrote: > > > On Monday, February 22, 2016, Peter Maydell > wrote: >> >> +struct GICv3CPUState { >> +uint64_t affinity_id;/* Cached affinity ID of the CPU */ >> + >> +/* Redistributor */ >> +uint32_t level; /* C

  1   2   3   >