Re: [Qemu-devel] [PATCH v4 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-06-05 Thread Valluri, Amarnath
On Wed, 2017-05-24 at 14:34 +, Marc-André Lureau wrote: Hi On Tue, May 16, 2017 at 12:00 PM Amarnath Valluri mailto:amarnath.vall...@intel.com>> wrote: TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend wa

Re: [Qemu-devel] [PATCH v2 1/4] dump: add DumpInfo structure

2017-06-05 Thread Andrew Jones
On Fri, Jun 02, 2017 at 09:46:35AM +, Marc-André Lureau wrote: > Hi > > On Thu, Jun 1, 2017 at 10:19 PM Eric Blake wrote: > > > On 06/01/2017 01:06 PM, Laszlo Ersek wrote: > > > On 06/01/17 15:03, Marc-André Lureau wrote: > > >> One way or another, the guest could communicate various dump in

Re: [Qemu-devel] [PATCH v4 8/8] tpm: Added support for TPM emulator

2017-06-05 Thread Valluri, Amarnath
On Wed, 2017-05-24 at 11:15 -0400, Stefan Berger wrote: > On 05/16/2017 03:58 AM, Amarnath Valluri wrote: > > > > This change introduces a new TPM backend driver that can > > communicate with > > swtpm(software TPM emulator) using unix domain socket interface. > > > > Swtpm uses two unix sockets,

Re: [Qemu-devel] [PATCH 0/7] KVM: MMU: fast write protect

2017-06-05 Thread Jay Zhou
On 2017/5/3 18:52, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Background == The original idea of this patchset is from Avi who raised it in the mailing list during my vMMU development some years ago This patchset introduces a extremely fast way to write protect all the guest

[Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?

2017-06-05 Thread Dou Liyang
Hi all, I want to boot up a system with some removable memory. So, i used '-object' and '-device' to cold-plug memory in QEmu as following : ./x86_64-softmmu/qemu-system-x86_64 \ ... -object memory-backend-ram,id=mem3,size=128M \ -device pc-dimm,id=dimm3,memdev=mem3 \

[Qemu-devel] [PATCH v6 2/8] vmdk: Rename get_whole_cluster() to vmdk_perform_cow()

2017-06-05 Thread Ashijeet Acharya
Rename the existing function get_whole_cluster() to vmdk_perform_cow() as its sole purpose is to perform COW for the first and the last allocated clusters if needed. Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng --- block/vmdk.c | 23 ++- 1 file changed, 14 insertio

[Qemu-devel] [PATCH v6 1/8] vmdk: Move vmdk_find_offset_in_cluster() to the top

2017-06-05 Thread Ashijeet Acharya
Move the existing vmdk_find_offset_in_cluster() function to the top of the driver. Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng --- block/vmdk.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index a9bd22b..22

[Qemu-devel] [PATCH v6 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-06-05 Thread Ashijeet Acharya
Previously posted series patches: v1 - http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg02044.html v2 - http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg05080.html v3 - http://lists.nongnu.org/archive/html/qemu-devel/2017-04/msg00074.html v4 - http://lists.nongnu.org/archive/htm

[Qemu-devel] [PATCH v6 5/8] vmdk: Set maximum bytes allocated in one cycle

2017-06-05 Thread Ashijeet Acharya
Set the maximum bytes allowed to get allocated at once to be not more than the extent size boundary to handle writes at two separate extents appropriately. Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng --- block/vmdk.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-

[Qemu-devel] [PATCH v6 3/8] vmdk: Rename get_cluster_offset() to vmdk_get_cluster_offset()

2017-06-05 Thread Ashijeet Acharya
Rename the existing get_cluster_offset() to vmdk_get_cluster_offset() and update name in all the callers accordingly. Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng --- block/vmdk.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) d

[Qemu-devel] [PATCH v6 7/8] vmdk: Update metadata for multiple clusters

2017-06-05 Thread Ashijeet Acharya
Include a next pointer in VmdkMetaData struct to point to the previous allocated L2 table. Modify vmdk_L2update to start updating metadata for allocation of multiple clusters at once. Signed-off-by: Ashijeet Acharya --- block/vmdk.c | 128 ++---

[Qemu-devel] [PATCH v6 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-05 Thread Ashijeet Acharya
Introduce two new helper functions handle_alloc() and vmdk_alloc_cluster_offset(). handle_alloc() helps to allocate multiple clusters at once starting from a given offset on disk and performs COW if necessary for first and last allocated clusters. vmdk_alloc_cluster_offset() helps to return the off

[Qemu-devel] [PATCH v6 4/8] vmdk: Factor out metadata loading code out of vmdk_get_cluster_offset()

2017-06-05 Thread Ashijeet Acharya
Move the cluster tables loading code out of the existing vmdk_get_cluster_offset() function and implement it in separate get_cluster_table() and vmdk_l2load() functions. Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng --- block/vmdk.c | 153 ---

[Qemu-devel] [PATCH v6 8/8] vmdk: Make vmdk_get_cluster_offset() return cluster offset only

2017-06-05 Thread Ashijeet Acharya
vmdk_alloc_clusters() introduced earlier now handles the task of allocating clusters and performing COW when needed. Thus we can change vmdk_get_cluster_offset() to stick to the sole purpose of returning cluster offset using sector number. Update the changes at all call sites. Signed-off-by: Ashij

Re: [Qemu-devel] [PATCH v2 2/4] dump: add vmcoreinfo ELF note

2017-06-05 Thread Andrew Jones
On Thu, Jun 01, 2017 at 05:03:23PM +0400, Marc-André Lureau wrote: > Read vmcoreinfo note from guest memory when dump_info provides the > address, and write it as an ELF note in the dump. > > NUMBER(phys_base) in vmcoreinfo has only been recently introduced in > Linux 4.10 ("kexec: export the valu

Re: [Qemu-devel] [PATCH v2 3/4] kdump: add vmcoreinfo

2017-06-05 Thread Andrew Jones
On Thu, Jun 01, 2017 at 05:03:24PM +0400, Marc-André Lureau wrote: > kdump header provides offset and size of the vmcoreinfo note, append it > if available. > > Signed-off-by: Marc-André Lureau > --- > dump.c | 48 > 1 file changed, 44 insertions(

Re: [Qemu-devel] allocation zone extensions for the firmware linker/loader

2017-06-05 Thread Dr. David Alan Gilbert
* Laszlo Ersek (ler...@redhat.com) wrote: > On 06/02/17 17:45, Laszlo Ersek wrote: > > > The patches can cause linker/loader breakage when old firmware is booted > > on new QEMU. However, that's no problem (it's nothing new), the next > > release of QEMU should bundle the new firmware binaries as

Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-06-05 Thread Fam Zheng
On Thu, 06/01 14:26, Stefan Hajnoczi wrote: > On Wed, May 31, 2017 at 05:57:46PM +0800, Fam Zheng wrote: > > On Wed, 05/31 10:39, Stefan Hajnoczi wrote: > > > On Wed, May 24, 2017 at 10:18:44AM +0800, Fam Zheng wrote: > > > > On Thu, 05/11 15:41, Stefan Hajnoczi wrote: > > > > > On Wed, Apr 19, 201

Re: [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?

2017-06-05 Thread Igor Mammedov
On Mon, 5 Jun 2017 15:53:02 +0800 Dou Liyang wrote: > Hi all, > > I want to boot up a system with some removable memory. > > So, i used '-object' and '-device' to cold-plug memory > in QEmu as following : > > ./x86_64-softmmu/qemu-system-x86_64 \ > ... > -object memory-backend-ram,

Re: [Qemu-devel] [PATCH v2 0/6] vhost-user: Specify and implement device IOTLB support

2017-06-05 Thread Jason Wang
On 2017年06月02日 23:24, Michael S. Tsirkin wrote: On Fri, Jun 02, 2017 at 01:53:11PM +0800, Jason Wang wrote: On 2017年06月01日 21:59, Michael S. Tsirkin wrote: On Wed, May 31, 2017 at 04:33:33PM +0800, Jason Wang wrote: On 2017年05月31日 02:20, Michael S. Tsirkin wrote: On Fri, May 26, 2017 at 04

[Qemu-devel] [PATCH] Add chardev-send-break monitor command

2017-06-05 Thread Stefan Fritsch
Sending a break on a serial console can be useful for debugging the guest. But not all chardev backends support sending breaks (only telnet and mux do). The chardev-send-break command allows to send a break even if using other backends. Signed-off-by: Stefan Fritsch --- chardev/char.c | 12 +++

[Qemu-devel] [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-05 Thread Wei Wang
This patch enables the virtio-net tx queue size to be configurable between 256 and 1024 by the user. The queue size specified by the user should be power of 2. If "tx_queue_size" is not offered by the user, the default queue size, 1024, will be used. For the traditional QEMU backend, setting the t

Re: [Qemu-devel] [PATCH V6 02/10] migration: pass MigrationIncomingState* into migration check functions

2017-06-05 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > On 05/31/2017 08:54 PM, Dr. David Alan Gilbert wrote: > > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > That tiny refactoring is necessary to be able to set > > > UFFD_FEATURE_THREAD_ID while requesting features, and then > > > to cr

Re: [Qemu-devel] [PATCH] timer.h: Provide better monotonic time

2017-06-05 Thread Paolo Bonzini
On 02/06/2017 14:24, Peter Maydell wrote: > On 18 April 2017 at 20:18, Pranith Kumar wrote: >> Tested and confirmed that the stretch i386 debian qcow2 image on a >> raspberry pi 2 works. >> >> Fixes: LP#: 893208 >> Signed-off-by: Pranith Kumar >> -

Re: [Qemu-devel] [PATCH 15/19] nbd/server: use errp instead of LOG

2017-06-05 Thread Vladimir Sementsov-Ogievskiy
On 04.06.2017 00:46, Eric Blake wrote: > On 05/30/2017 09:30 AM, Vladimir Sementsov-Ogievskiy wrote: >> Move to modern errp scheme from just LOGging errors. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> nbd/server.c | 257 >> ++

Re: [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?

2017-06-05 Thread Dou Liyang
Hi Igor, At 06/05/2017 04:45 PM, Igor Mammedov wrote: On Mon, 5 Jun 2017 15:53:02 +0800 Dou Liyang wrote: Hi all, I want to boot up a system with some removable memory. So, i used '-object' and '-device' to cold-plug memory in QEmu as following : ./x86_64-softmmu/qemu-system-x86_64 \

Re: [Qemu-devel] allocation zone extensions for the firmware linker/loader

2017-06-05 Thread Igor Mammedov
On Sat, 3 Jun 2017 09:36:23 +0200 Laszlo Ersek wrote: > On 06/02/17 17:45, Laszlo Ersek wrote: > > > The patches can cause linker/loader breakage when old firmware is booted > > on new QEMU. However, that's no problem (it's nothing new), the next > > release of QEMU should bundle the new firmwar

Re: [Qemu-devel] [PATCH v4 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-06-05 Thread Marc-André Lureau
Hi On Mon, Jun 5, 2017 at 11:22 AM Valluri, Amarnath < amarnath.vall...@intel.com> wrote: > On Wed, 2017-05-24 at 14:34 +, Marc-André Lureau wrote: > > Hi > > On Tue, May 16, 2017 at 12:00 PM Amarnath Valluri < > amarnath.vall...@intel.com> wrote: > > TPMDriverOps inside TPMBackend is not req

[Qemu-devel] [PATCH] target/m68k: implement rtd

2017-06-05 Thread Laurent Vivier
Add "Return and Deallocate" (rtd) instruction. RTD #d (SP) -> PC SP + 4 + d -> SP Signed-off-by: Laurent Vivier --- target/m68k/cpu.c | 2 ++ target/m68k/cpu.h | 1 + target/m68k/translate.c | 11 +++ 3 files changed, 14 insertions(+) diff --git a/target/m68k/c

Re: [Qemu-devel] [PULL 00/15] chardev patches

2017-06-05 Thread Peter Maydell
On 2 June 2017 at 20:15, Marc-André Lureau wrote: > Sorry, git-publish printed an error on invalid remote, but keep going. I > should fix it. Here is the new pull request: > > The following changes since commit 43771d5d92312504305c19abe29ec5bfabd55f01: > > Merge remote-tracking branch 'remotes/a

[Qemu-devel] [PATCH 0/2] monitor: add trace events for HMP and QMP commands

2017-06-05 Thread Stefan Hajnoczi
It's nice to have HMP and QMP commands as part of a trace log. This makes it possible to correlate QEMU-internal events with the monitor commands that caused them. Stefan Hajnoczi (2): monitor: add handle_hmp_command trace event monitor: resurrect handle_qmp_command trace event monitor.c

[Qemu-devel] [PATCH 1/2] monitor: add handle_hmp_command trace event

2017-06-05 Thread Stefan Hajnoczi
It is often useful to correlate QEMU-internal events with monitor commands that caused them. Trace the full HMP command being executed. Signed-off-by: Stefan Hajnoczi --- monitor.c| 2 ++ trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/monitor.c b/monitor.c index baa73c9.

[Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command trace event

2017-06-05 Thread Stefan Hajnoczi
Commit 104fc3027960dd2aa9d310936a6cb201c60e1088 ("qmp: Drop duplicated QMP command object checks") removed the call to trace_handle_qmp_command() while eliminating code duplication. This patch brings the trace event back so QEMU-internal trace events can be correlated with the QMP commands that ca

Re: [Qemu-devel] [PULL v2 00/22] Docker and block patches

2017-06-05 Thread Paolo Bonzini
On 02/06/2017 23:30, Fam Zheng wrote: > Cc'ing Paolo. > > On Fri, 06/02 16:50, Peter Maydell wrote: >> On 2 June 2017 at 09:10, Fam Zheng wrote: >>> The following changes since commit 43771d5d92312504305c19abe29ec5bfabd55f01: >>> >>> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi

[Qemu-devel] [PATCH v1 0/1] qemu/migration: fix the migration bug found by qemu-iotests case 068

2017-06-05 Thread QingFeng Hao
Hi all, This patch is to fix the migration bug found by qemu-iotests case 068 and based on upstream master's commit: cb8b8ef4578: Merge remote-tracking branch 'remotes/elmarco/tags/chrfe-pull-request' into staging. The bug was introduced by commit "660819b migration: shut src return path uncondi

[Qemu-devel] [PATCH v1 1/1] qemu/migration: fix the double free problem on from_src_file

2017-06-05 Thread QingFeng Hao
In load_vmstate, mis->from_src_file is freed twice, the first free is by qemu_fclose, the second is by migration_incoming_state_destroy and it causes Illegal instruction exception. The fix is just to remove the first free. This problem is found by qemu-iotests case 068 since commit "660819b migrat

Re: [Qemu-devel] [PULL 00/15] chardev patches

2017-06-05 Thread Marc-André Lureau
Hi On Mon, Jun 5, 2017 at 2:15 PM Peter Maydell wrote: > On 2 June 2017 at 20:15, Marc-André Lureau > wrote: > > Sorry, git-publish printed an error on invalid remote, but keep going. I > > should fix it. Here is the new pull request: > > > > The following changes since commit > 43771d5d9231250

Re: [Qemu-devel] [RFC PATCH v1 0/9] BQL and Replay Lock changes

2017-06-05 Thread Pavel Dovgalyuk
Alex, Do you have newer fixed version of these patches? Pavel Dovgalyuk > -Original Message- > From: Alex Bennée [mailto:alex.ben...@linaro.org] > Sent: Friday, May 05, 2017 1:38 PM > To: pbonz...@redhat.com; boost.li...@gmail.com; pavel.dovga...@ispras.ru > Cc: c...@braap.org; qemu-dev

Re: [Qemu-devel] [PULL 00/15] chardev patches

2017-06-05 Thread Peter Maydell
On 5 June 2017 at 11:50, Marc-André Lureau wrote: > Hi > > On Mon, Jun 5, 2017 at 2:15 PM Peter Maydell > wrote: >> >> On 2 June 2017 at 20:15, Marc-André Lureau >> wrote: >> > Sorry, git-publish printed an error on invalid remote, but keep going. I >> > should fix it. Here is the new pull reque

Re: [Qemu-devel] [PATCH v1 1/1] qemu/migration: fix the double free problem on from_src_file

2017-06-05 Thread Dr. David Alan Gilbert
* QingFeng Hao (ha...@linux.vnet.ibm.com) wrote: > In load_vmstate, mis->from_src_file is freed twice, the first free is by > qemu_fclose, the second is by migration_incoming_state_destroy and > it causes Illegal instruction exception. The fix is just to remove the > first free. > > This problem i

Re: [Qemu-devel] [PATCH 1/5] ram: Call migration_page_queue_free() at ram_migration_cleanup()

2017-06-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We shouldn't be using memory later than that. > > Signed-off-by: Juan Quintela Yes, I think I agree: migration_completion calls await_return_path_close_on_source that makes sure there's no more incoming requests. migration_completion is call

Re: [Qemu-devel] [PATCH 2/5] ram: Move ZERO_TARGET_PAGE inside XBZRLE

2017-06-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It was only used by XBZRLE anyways. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/migration/ram.c b/migration/ram

Re: [Qemu-devel] [PULL 00/22] Trivial patches for 2017-06-04

2017-06-05 Thread Peter Maydell
On 4 June 2017 at 16:45, Michael Tokarev wrote: > Trivial patches for 04 Jun 2017. Please consider applying. > > /mjt > > The following changes since commit c6e84fbd447a51e1161d74d71566a5f67b47eac5: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2017-06-02 17:4

Re: [Qemu-devel] [PATCH v2 1/1] s390x: vmstatify config migration for virtio-ccw

2017-06-05 Thread Eric Blake
On 06/04/2017 10:09 PM, Dong Jia Shi wrote: > * Halil Pasic [2017-06-02 16:05:31 +0200]: > > Hi Halil, > > Sorry for the late show up. I just found some nits, which could be > ignored for me. > >> Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for >> flexibility (extending us

Re: [Qemu-devel] [PATCH] Add chardev-send-break monitor command

2017-06-05 Thread Eric Blake
On 06/05/2017 03:52 AM, Stefan Fritsch wrote: > Sending a break on a serial console can be useful for debugging the > guest. But not all chardev backends support sending breaks (only telnet > and mux do). The chardev-send-break command allows to send a break even > if using other backends. > > Sig

Re: [Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command trace event

2017-06-05 Thread Eric Blake
On 06/05/2017 05:42 AM, Stefan Hajnoczi wrote: > Commit 104fc3027960dd2aa9d310936a6cb201c60e1088 ("qmp: Drop duplicated > QMP command object checks") removed the call to > trace_handle_qmp_command() while eliminating code duplication. > > This patch brings the trace event back so QEMU-internal tra

Re: [Qemu-devel] [PATCH 1/2] monitor: add handle_hmp_command trace event

2017-06-05 Thread Eric Blake
On 06/05/2017 05:42 AM, Stefan Hajnoczi wrote: > It is often useful to correlate QEMU-internal events with monitor > commands that caused them. Trace the full HMP command being executed. > > Signed-off-by: Stefan Hajnoczi > --- > monitor.c| 2 ++ > trace-events | 1 + > 2 files changed, 3 i

Re: [Qemu-devel] [PATCH 4/5] ram: Use MigrationStats for statistics

2017-06-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > RAM Statistics need to survive migration to make info migrate work, so we > need to store them outside of RAMState. As we already have an struct > with those fields, just used them. (MigrationStats and XBZRLECacheStats). > > Signed-off-by: Juan Quint

[Qemu-devel] [PATCH 06/19] block: access io_plugged with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 4 ++-- include/block/block_int.h | 8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index 4a598299a9..bb1c9c5432 100644 --- a/block/io.c +++ b/block/io.c @

[Qemu-devel] [PATCH 03/19] block: access io_limits_disabled with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini --- block/block-backend.c | 4 ++-- block/throttle-groups.c| 2 +- include/sysemu/block-backend.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/block/block-backend.c

[Qemu-devel] [PATCH 02/19] block: access quiesce_counter with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini --- block/io.c| 4 ++-- include/block/block_int.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 98c690f306..70643df494 100644 --- a/block/i

[Qemu-devel] [PATCH 12/19] block: access write_gen with atomics

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block.c | 2 +- block/io.c| 6 +++--- include/block/block_int.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index af6366bcef..361005cba9 100644 --- a/block

[Qemu-devel] [PATCH v4 00/19] Block layer thread safety, part 1

2017-06-05 Thread Paolo Bonzini
v3->v4: rebased and included fixes in Fam's v2 pull request new patch 18, fixing testsuite failures on OS X Paolo Bonzini (19): block: access copy_on_read with atomic ops block: access quiesce_counter with atomic ops block: access io_limits_disabled with atomic ops block: access se

[Qemu-devel] [PATCH 07/19] throttle-groups: only start one coroutine from drained_begin

2017-06-05 Thread Paolo Bonzini
Starting all waiting coroutines from bdrv_drain_all is unnecessary; throttle_group_co_io_limits_intercept calls schedule_next_request as soon as the coroutine restarts, which in turn will restart the next request if possible. If we only start the first request and let the coroutines dance from the

[Qemu-devel] [PATCH 04/19] block: access serialising_in_flight with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 6 +++--- include/block/block_int.h | 10 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index 70643df494..d76202b452 100644 --- a/block/io.c +++ b/block/

[Qemu-devel] [PATCH 14/19] block: introduce dirty_bitmap_mutex

2017-06-05 Thread Paolo Bonzini
It protects only the list of dirty bitmaps; in the next patch we will also protect their content. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/dirty-bitmap.c | 44 +++- block/mirror.c| 3 ++- blockdev.c

[Qemu-devel] [PATCH 01/19] block: access copy_on_read with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block.c | 6 -- block/io.c| 8 blockdev.c| 2 +- include/block/block_int.h | 11 ++- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/block.c b/

[Qemu-devel] [PATCH 11/19] block: use Stat64 for wr_highest_offset

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 4 +--- block/qapi.c | 2 +- include/block/block_int.h | 7 --- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index bb1c9c5432..bc69b4cecd 100644 --

[Qemu-devel] [PATCH 09/19] throttle-groups: protect throttled requests with a CoMutex

2017-06-05 Thread Paolo Bonzini
Another possibility is to use tg->lock, which we're holding anyway in both schedule_next_request and throttle_group_co_io_limits_intercept. This would require open-coding the CoQueue however, so I've chosen this alternative. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/bl

[Qemu-devel] [PATCH v5 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-06-05 Thread Amarnath Valluri
Move thread handling inside TPMBackend, this way backend implementations need not to maintain their own thread life cycle, instead they needs to implement 'handle_request()' class method that always been called from a thread. This change made tpm_backend_int.h kind of useless, hence removed it. S

[Qemu-devel] [PATCH 13/19] block: protect tracked_requests and flush_queue with reqs_lock

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block.c | 1 + block/io.c| 16 ++-- include/block/block_int.h | 14 +- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 361005cba9..a5cb

[Qemu-devel] [PATCH 05/19] block: access wakeup with atomic ops

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 3 ++- block/nfs.c | 4 +++- block/sheepdog.c | 3 ++- include/block/block.h | 5 +++-- include/block/block_int.h | 7 +-- 5 files changed, 15 insertions(+), 7 deletions(-) d

[Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex

2017-06-05 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/dirty-bitmap.c | 68 ++-- block/mirror.c | 11 +-- include/block/block_int.h| 4 +-- include/block/dirty-bitmap.h | 25 +++- migration/block.c

[Qemu-devel] [PATCH v5 5/8] tmp backend: Add new api to read backend TpmInfo

2017-06-05 Thread Amarnath Valluri
TPM configuration options are backend implementation details and shall not be part of base TPMBackend object, and these shall not be accessed directly outside of the class, hence added a new interface method, get_tpm_options() to TPMDriverOps., which shall be implemented by the derived classes to r

[Qemu-devel] [PATCH 15/19] migration/block: reset dirty bitmap before reading

2017-06-05 Thread Paolo Bonzini
Any data that is returned by read may be stale already, the bitmap has to be cleared before issuing the read. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- migration/block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/block.c b/migration/block

[Qemu-devel] [PATCH 08/19] throttle-groups: do not use qemu_co_enter_next

2017-06-05 Thread Paolo Bonzini
Prepare for removing this function; always restart throttled requests from coroutine context. This will matter when restarting throttled requests will have to acquire a CoMutex. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/throttle-groups.c |

[Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2017-06-05 Thread Paolo Bonzini
I'm not trying too hard yet. Later, with multiqueue support, this may cause mutex contention or cacheline bouncing. Cc: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/accounting.c | 16 include/block/accounting.h | 8 ++-- 2 fi

[Qemu-devel] [PATCH v5 8/8] tpm: Added support for TPM emulator

2017-06-05 Thread Amarnath Valluri
This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. Swtpm uses two unix sockets, one for plain TPM commands and responses, and one for out-of-band control messages. The swtpm and associated tools can be found h

[Qemu-devel] [PATCH 10/19] util: add stats64 module

2017-06-05 Thread Paolo Bonzini
This module provides fast paths for 64-bit atomic operations on machines that only have 32-bit atomic access. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Fam Zheng --- include/qemu/stats64.h | 193 + util/Makefile.obj

[Qemu-devel] [PATCH v5 4/8] tpm-backend: Made few interface methods optional

2017-06-05 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri Reviewed-by: Marc-André Lureau Reviewed-by: Stefan

[Qemu-devel] [PATCH v5 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-06-05 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri Reviewed-by: Marc-André

[Qemu-devel] [PATCH v5 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-06-05 Thread Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to remove unneeded destroy() method from TpmDriverOps interface as TPMBackend is a Qemu Object, we can use object_unref() inplace of tpm_backend_destroy() to free the backend

[Qemu-devel] [PATCH v5 7/8] tpm-passthrough: move reusable code to utils

2017-06-05 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4 +++ 3 files changed, 34 insertions(+), 59 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 17/19] block: introduce block_account_one_io

2017-06-05 Thread Paolo Bonzini
This is the common code to account operations that produced actual I/O. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/accounting.c | 51 ++- 1 file changed, 22 insertions(+), 29 deletions(-) diff

[Qemu-devel] [PATCH 18/19] block: split BlockAcctStats creation and setup

2017-06-05 Thread Paolo Bonzini
block_acct_destroy is called unconditionally in blk_delete, but there is no BlockAcctStats function that is called unconditionally in blk_new. Split block_acct_init in two, so that it will be possible to create a QemuMutex in block_acct_init and destroy it in block_acct_cleanup. Cc: Alberto Garcia

[Qemu-devel] [PATCH v4 0/8] Provide support for the software TPM emulator

2017-06-05 Thread Amarnath Valluri
Briefly, Theses set of patches introduces: - new TPM backend driver to support software TPM emulators(swtpm(1)). - and few supported fixes/enhancements/cleanup to existing tpm backend code. The similar idea was initiated earliar(2) by Stefan Berger(CCed) with slightly different approach, u

[Qemu-devel] [PATCH v5 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-06-05 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger --- backends/tpm.c | 9 - hw/tpm/tpm_passthrough.c | 12 hw/tpm/tpm_tis.c | 14 -- i

[Qemu-devel] qdev properties vs qom object properties

2017-06-05 Thread Peter Maydell
I perpetually get confused about qdev properties vs QOM object properties. Why do we have both of these APIs? How do they interact? Which is the recommended one for new device code? Do we have a transition plan for old code? Where should I be looking for the documentation on this? For a specific

Re: [Qemu-devel] Target AVR (patch)

2017-06-05 Thread Peter Maydell
On 2 June 2017 at 11:22, Anichang via Qemu-devel wrote: > Attached patch since > > git://git.qemu.org/qemu.git 43771d5d92312504305c19abe29ec5bfabd55f01 > Running the sample board outputs: > > $ ./qemu-system-avr > Unexpected error in object_property_add() at qom/object.c:940: > qemu-system-avr: a

Re: [Qemu-devel] [PATCH v4 00/19] Block layer thread safety, part 1

2017-06-05 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20170605123908.18777-1-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH v4 00/19] Block layer thread

Re: [Qemu-devel] qdev properties vs qom object properties

2017-06-05 Thread Paolo Bonzini
On 05/06/2017 15:10, Peter Maydell wrote: > I perpetually get confused about qdev properties vs QOM object > properties. > > Why do we have both of these APIs? > How do they interact? qdev properties are just a wrapper around QOM object properties, taking care of: - not allowing to set the pro

Re: [Qemu-devel] [PATCH v2 2/6] pci: Add comment for pci_add_capability2()

2017-06-05 Thread Marcel Apfelbaum
On 02/06/2017 10:54, Mao Zhongyi wrote: Add a comment for pci_add_capability2() to explain the return value. This may help to make a correct return value check for its callers. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Suggested-by: Markus Armbruster Signed-off-by: Mao Zho

Re: [Qemu-devel] qdev properties vs qom object properties

2017-06-05 Thread Eduardo Habkost
On Mon, Jun 05, 2017 at 02:10:06PM +0100, Peter Maydell wrote: > I perpetually get confused about qdev properties vs QOM object > properties. You are not alone. :) > > Why do we have both of these APIs? I don't know. Probably because the QOM property API was introduced, it was just a subset o

Re: [Qemu-devel] qdev properties vs qom object properties

2017-06-05 Thread Eduardo Habkost
On Mon, Jun 05, 2017 at 03:32:56PM +0200, Paolo Bonzini wrote: [...] > > Which is the recommended one for new device code? > > Do we have a transition plan for old code? > > Where should I be looking for the documentation on this? > > There is no transition plan, qdev properties are not going to g

Re: [Qemu-devel] [PATCH] target-ppc: Fix openpic timer read register offset

2017-06-05 Thread alarson
David Gibson wrote on 06/04/2017 07:55:34 PM: > From: David Gibson > To: Aaron Larson > Cc: ag...@suse.de, qemu-devel@nongnu.org, qemu-...@nongnu.org > Date: 06/04/2017 07:55 PM > Subject: Re: [PATCH] target-ppc: Fix openpic timer read register offset > > On Fri, Jun 02, 2017 at 04:32:59AM -0

Re: [Qemu-devel] [PATCH v3 5/9] ivshmem: use ram_from_fd()

2017-06-05 Thread Paolo Bonzini
On 02/06/2017 16:12, Marc-André Lureau wrote: > Instead of having its own mmap handling code, reuse the code from > exec.c. > > Note: memory_region_init_ram_from_fd() adds some restrictions > (check for xen, kvm sync-mmu, etc) and changes (such as size > alignment). This may actually be more corre

Re: [Qemu-devel] qdev properties vs qom object properties

2017-06-05 Thread Paolo Bonzini
On 05/06/2017 15:36, Eduardo Habkost wrote: > On Mon, Jun 05, 2017 at 02:10:06PM +0100, Peter Maydell wrote: >> Why do we have both of these APIs? > > I don't know. Probably because the QOM property API was > introduced, it was just a subset of of the features provided by > qdev properties, so

Re: [Qemu-devel] [PATCH v3 3/4] qom/cpu: remove host_tid field

2017-06-05 Thread Paolo Bonzini
On 02/06/2017 15:05, Alex Bennée wrote: > This was only used by the gdbstub and even then was only being set for > subsequent threads. Rather the continue duplicating the number just > make the gdbstub get the information from TaskState structure. > > Now the tid is correctly reported for all th

Re: [Qemu-devel] [PATCH v3 0/4] some gdbstub fixes for debug and vcont

2017-06-05 Thread Paolo Bonzini
On 02/06/2017 15:05, Alex Bennée wrote: > Hi, > > This is v3 and hopefully the final version the gdbstub fixes. There is > one minor change to patch two where I pulled forward the move of > cpu_gdb_index into gdbstub.c from the third patch. > > Otherwise it is basically a re-base and a whole ho

Re: [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?

2017-06-05 Thread Michal Hocko
On Mon 05-06-17 10:45:08, Igor Mammedov wrote: > On Mon, 5 Jun 2017 15:53:02 +0800 > Dou Liyang wrote: > > > Hi all, > > > > I want to boot up a system with some removable memory. > > > > So, i used '-object' and '-device' to cold-plug memory > > in QEmu as following : > > > > ./x86_64-softmmu

[Qemu-devel] [PATCHv2 03/04] colo-compare: Update the COLO document to add the IOThread configuration

2017-06-05 Thread Yong Wang
From: Wang Yong Update colo-proxy.txt,add IOThread configuration. Later we have to configure IOThread,if not COLO can not work. Signed-off-by: Wang Yong Signed-off-by: Wang Guang --- docs/colo-proxy.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/colo-proxy.txt b/

[Qemu-devel] [PATCHv2 01/04] colo-compare: Use IOThread context timer to Check old packet regularly

2017-06-05 Thread Yong Wang
From: Wang Yong Remove the task which check old packet in the comparing thread, then use IOthread context timer to handle it. Signed-off-by: Wang Yong Signed-off-by: Wang Guang --- net/colo-compare.c | 62 +++--- 1 file changed, 50 insertions(+),

[Qemu-devel] [PATCHv2 04/04] colo-compare: Update the COLO document to fix the processing of secondary packets in the main thread

2017-06-05 Thread Yong Wang
From: Wang Yong In my test, secondary does not process the packets comparing in the IOThread but in the qemu main thread processing. secondary's configuration " -chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait" here,we should use 'wait' instead of 'nowait' configuration . after u

[Qemu-devel] [PATCHv2 00/04] Replace the COLO comparing thread with IOThread

2017-06-05 Thread Yong Wang
It's a good idea to use IOThread instead of COLO comparing thread. comparing thread can be completely replaced by IOThread, so this idea came. This series of updates mainly include the old packet regularly check and primary/secondary network packets compare all into the IOThread processing. Pleas

[Qemu-devel] [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread of the primary

2017-06-05 Thread Yong Wang
From: Wang Yong Process pactkets in the IOThread which arrived over the socket. we use qio_channel_set_aio_fd_handler to set the handlers on the IOThread AioContext.then the packets from the primary and the secondary are processed in the IOThread. Finally remove the colo-compare thread using the

[Qemu-devel] [PATCH] block/qcow.c: Fix memory leak in qcow_create()

2017-06-05 Thread Peter Maydell
Coverity points out that the code path in qcow_create() for the magic "fat:" backing file name leaks the memory used to store the filename (CID 1307771). Free the memory before we overwrite the pointer. Signed-off-by: Peter Maydell --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --g

Re: [Qemu-devel] [PATCH] block/qcow.c: Fix memory leak in qcow_create()

2017-06-05 Thread Eric Blake
On 06/05/2017 08:55 AM, Peter Maydell wrote: > Coverity points out that the code path in qcow_create() for > the magic "fat:" backing file name leaks the memory used to > store the filename (CID 1307771). Free the memory before > we overwrite the pointer. > > Signed-off-by: Peter Maydell > --- >

Re: [Qemu-devel] [PATCH] block/qcow.c: Fix memory leak in qcow_create()

2017-06-05 Thread Philippe Mathieu-Daudé
On 06/05/2017 10:55 AM, Peter Maydell wrote: Coverity points out that the code path in qcow_create() for the magic "fat:" backing file name leaks the memory used to store the filename (CID 1307771). Free the memory before we overwrite the pointer. Signed-off-by: Peter Maydell Reviewed-by: Phi

[Qemu-devel] [PULL 00/21] Trivial patches for 2017-06-05

2017-06-05 Thread Michael Tokarev
This is a resend of the yesterday's trivial-patches queue, without an ivshmem change which broke static build (will take a look at that later). The rest is exactly the same, so sending only the cover letter. Thanks, /mjt The following changes since commit c6e84fbd447a51e1161d74d71566a5f67b47eac5

Re: [Qemu-devel] [PATCH v2 04/15] qcow2: alloc space for COW in one chunk

2017-06-05 Thread Eric Blake
On 06/01/2017 10:14 AM, Anton Nefedov wrote: > From: "Denis V. Lunev" > > Currently each single write operation can result in 3 write operations Maybe: Currently each single guest write operation can result in up to 3 host write operations > if guest offsets are not cluster aligned. One write

  1   2   3   >