[Qemu-devel] [PATCH 01/19] migration: to_dst_file at that point is NULL

2017-04-17 Thread Juan Quintela
We have just arrived as: migration.c: qemu_migrate() s = migrate_init() <- puts it to NULL {tcp,unix}_start_outgoing_migration -> socket_outgoing_migration migration_channel_connect() sets to_dst_file if tls is enabled, we do another round through

[Qemu-devel] [PATCH 04/19] migration: Remove MigrationState from migration_channel_incomming()

2017-04-17 Thread Juan Quintela
All callers were calling migrate_get_current(), so do it inside the function. Signed-off-by: Juan Quintela --- include/migration/channel.h | 3 +-- migration/channel.c | 5 +++-- migration/exec.c| 2 +- migration/fd.c | 2 +-

Re: [Qemu-devel] [Qemu-block] [PATCH 02/17] trace: Show blockjob actions via bytes, not sectors

2017-04-17 Thread Eric Blake
On 04/17/2017 02:18 PM, John Snow wrote: >> @@ -346,13 +349,15 @@ static uint64_t coroutine_fn >> mirror_iteration(MirrorBlockJob *s) >> if (sector_num < 0) { >> bdrv_set_dirty_iter(s->dbi, 0); >> sector_num = bdrv_dirty_iter_next(s->dbi); >> -

Re: [Qemu-devel] [Qemu-block] [PATCH 01/17] blockjob: Track job ratelimits via bytes, not sectors

2017-04-17 Thread Eric Blake
On 04/17/2017 02:18 PM, John Snow wrote: > > > On 04/11/2017 06:29 PM, Eric Blake wrote: >> The user interface specifies job rate limits in bytes/second. >> It's pointless to have our internal representation track things >> in sectors/second, particularly since we want to move away from >>

Re: [Qemu-devel] [PATCH v2] ipmi: add SET_SENSOR_READING command

2017-04-17 Thread Corey Minyard
On 04/12/2017 02:08 AM, Cédric Le Goater wrote: SET_SENSOR_READING is a complex IPMI command (see IPMI spec 35.17) which enables the host software to set the reading value and the event status of sensors supporting it. Below is a proposal for all the operations (reading, assert, deassert, event

Re: [Qemu-devel] [PATCH v2 0/2] migration: fix virtio-rng

2017-04-17 Thread Amit Shah
On (Wed) 12 Apr 2017 [15:53:10], Laurent Vivier wrote: > When post-copy migration is enabled, the destination > guest can ask for memory from the source when the > vmstate is restored. > > In the case of virtio, a part of the virtqueue > is migrated by the vmstate structure (last_avail_idx) >

Re: [Qemu-devel] [Qemu-block] [PATCH 01/17] blockjob: Track job ratelimits via bytes, not sectors

2017-04-17 Thread John Snow
On 04/11/2017 06:29 PM, Eric Blake wrote: > The user interface specifies job rate limits in bytes/second. > It's pointless to have our internal representation track things > in sectors/second, particularly since we want to move away from > sector-based interfaces. > > Fix up a doc typo found

Re: [Qemu-devel] [Qemu-block] [PATCH 02/17] trace: Show blockjob actions via bytes, not sectors

2017-04-17 Thread John Snow
On 04/11/2017 06:29 PM, Eric Blake wrote: > Upcoming patches are going to switch to byte-based interfaces > instead of sector-based. Even worse, trace_backup_do_cow_enter() > had a weird mix of cluster and sector indices. Make the tracing > uniformly use bytes. > > Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-17 Thread Pranith Kumar
On Mon, Apr 17, 2017 at 2:42 PM, Peter Maydell wrote: > On 15 April 2017 at 20:29, Pranith Kumar wrote: >> Tested and confirmed that the stretch i386 debian qcow2 image on a >> raspberry pi 2 works. >> >> Fixes: LP#: 893208

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-17 Thread Peter Maydell
On 15 April 2017 at 20:29, 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] [RFC for-2.10 2/3] pci: Allow host bridges to override PCI/PCIe hybrid device behaviour

2017-04-17 Thread Eduardo Habkost
On Tue, Mar 28, 2017 at 01:16:50PM +1100, David Gibson wrote: > Currently PCI/PCIe hybrid devices - that is, devices which can appear as > either plain PCI or PCIe depending on where they're attached - will only > appear in PCIe mode if they're attached to a PCIe bus via a root port or >

Re: [Qemu-devel] [PATCH 1/2] COLO-compare: Optimize tcp compare for option field

2017-04-17 Thread Philippe Mathieu-Daudé
Hi Zhang, On 04/16/2017 06:24 AM, Zhang Chen wrote: In this patch we support packet that have tcp options field. Add tcp options field check, If the packet have options field we just skip it and compare tcp payload, Avoid unnecessary checkpoint, optimize performance. Signed-off-by: Zhang Chen

Re: [Qemu-devel] [PATCH v2 for-2.10 07/18] crypto: hmac: move crypto/hmac.h into include/crypto/

2017-04-17 Thread Philippe Mathieu-Daudé
On 04/16/2017 10:33 PM, Longpeng(Mike) wrote: Moves crypto/hmac.h into include/crypto/, likes cipher.h and hash.h Signed-off-by: Longpeng(Mike) Reviewed-by: Philippe Mathieu-Daudé --- crypto/hmac.h | 166

Re: [Qemu-devel] [PATCH 6/6] migration: detailed traces for postcopy

2017-04-17 Thread Philippe Mathieu-Daudé
Hi Alexey, On 04/14/2017 10:17 AM, Alexey Perevalov wrote: It could help to track down vCPU state during page fault and page fault sources. This patch showes proc's status/stack/syscall file at the moment of pagefault, it's very interesting to know who was page fault initiator. Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.10 1/2] block: An empty filename counts as no filename

2017-04-17 Thread Philippe Mathieu-Daudé
Hi Max, On 04/13/2017 01:06 PM, Max Reitz wrote: Reproducer: $ ./qemu-img info '' qemu-img: ./block.c:1008: bdrv_open_driver: Assertion `!drv->bdrv_needs_filename || bs->filename[0]' failed. [1]26105 abort (core dumped) ./qemu-img info '' This patch fixes this to be:

Re: [Qemu-devel] [PATCH v2 for-2.10 12/16] block/qcow2: Extract qcow2_calc_size_usage()

2017-04-17 Thread Philippe Mathieu-Daudé
On 04/03/2017 01:09 PM, Max Reitz wrote: We will need very similar functionality for full/falloc preallocation in qcow2_truncate(). Although we will not be able to reuse much of the actual code, it still makes sense to keep all of this in one place. Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v2 4/7] intel_iommu: renaming context entry helpers

2017-04-17 Thread Peter Xu
The old names are too long and less ordered. Let's start to use vtd_ce_*() as a pattern. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/i386/intel_iommu.c

[Qemu-devel] [PATCH v2 3/7] x86-iommu: use DeviceClass properties

2017-04-17 Thread Peter Xu
No reason to keep tens of lines if we can do it actually far shorter. Signed-off-by: Peter Xu --- hw/i386/x86-iommu.c | 47 +++ 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c

[Qemu-devel] [PATCH v2 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Peter Xu
Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 109 + hw/i386/intel_iommu_internal.h | 1 + hw/i386/trace-events | 1 + hw/i386/x86-iommu.c| 1 + include/hw/i386/x86-iommu.h| 1 + 5 files

[Qemu-devel] [PATCH v2 6/7] intel_iommu: use IOMMU_ACCESS_FLAG()

2017-04-17 Thread Peter Xu
We have that now, so why not use it. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index c8751ba..05ae631 100644 --- a/hw/i386/intel_iommu.c +++

[Qemu-devel] [PATCH v2 1/7] memory: tune last param of iommu_ops.translate()

2017-04-17 Thread Peter Xu
This patch converts the old "is_write" bool into IOMMUAccessFlags. The difference is that "is_write" can only express either read/write, but sometimes what we really want is "none" here (neither read nor write). Replay is an good example - during replay, we should not check any RW permission bits

[Qemu-devel] [PATCH v2 5/7] intel_iommu: provide vtd_ce_get_type()

2017-04-17 Thread Peter Xu
Helper to fetch VT-d context entry type. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 4628f04..c8751ba 100644 --- a/hw/i386/intel_iommu.c +++

[Qemu-devel] [PATCH v2 2/7] memory: remove the last param in memory_region_iommu_replay()

2017-04-17 Thread Peter Xu
We were always passing in that one as "false" to assume that's an read operation, and we also assume that IOMMU translation would always have that read permission. A better permission would be IOMMU_NONE since the replay is after all not a real read operation, but just a page table rebuilding

[Qemu-devel] [PATCH v2 0/7] VT-d: PT (passthrough) mode support and misc fixes

2017-04-17 Thread Peter Xu
v2: - resending v1 since my patch script had a regression, which failed to send the patches to the list... trying again. sorry for the noise! This series is for 2.10, and based on following series: [PATCH v8 0/9] VT-d: vfio enablement and misc enhances This series add support for

Re: [Qemu-devel] [PATCH] util/error: Fix leak in error_vprepend()

2017-04-17 Thread Jeff Cody
On Thu, Apr 13, 2017 at 06:09:52PM +0200, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > util/error.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/error.c b/util/error.c > index 9c40b1f458..020b86b9f0 100644 > --- a/util/error.c > +++ b/util/error.c > @@

[Qemu-devel] [PATCH v2] char: Fix removing wrong GSource that be found by fd_in_tag

2017-04-17 Thread zhanghailiang
We use fd_in_tag to find a GSource, fd_in_tag is return value of g_source_attach(GSource *source, GMainContext *context), the return value is unique only in the same context, so we may get the same values with different 'context' parameters. It is no problem to find the right fd_in_tag by using

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_begin

2017-04-17 Thread Jeff Cody
On Mon, Apr 17, 2017 at 04:27:19PM +0800, Fam Zheng wrote: > On Fri, 04/14 09:51, Stefan Hajnoczi wrote: > > On Fri, Apr 14, 2017 at 9:02 AM, Fam Zheng wrote: > > > @@ -398,11 +399,15 @@ void bdrv_drain_all(void); > > > */

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread 李强
> -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of > jack.chen > Sent: Monday, April 17, 2017 6:56 PM > To: Peter Xu > Cc: qemu > Subject: Re: [Qemu-devel] qemu memory manage question > > Thanks,from the path you have list to

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread Peter Xu
On Mon, Apr 17, 2017 at 06:55:40PM +0800, jack.chen wrote: > Thanks,from the path you have list to me,it can be well explained,but > according to the source code,in the end of > kvm_init,kvm_memory_listener and kvm_io_listener were registered by > memory_listener_register(),and in the end of >

Re: [Qemu-devel] [PATCH 02/15] colo-compare: implement the process of checkpoint

2017-04-17 Thread Hailiang Zhang
Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang wrote: While do checkpoint, we need to flush all the unhandled packets,

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
Thanks,from the path you have list to me,it can be well explained,but according to the source code,in the end of kvm_init,kvm_memory_listener and kvm_io_listener were registered by memory_listener_register(),and in the end of memory_listener_register(),listener_add_address_space() was called

Re: [Qemu-devel] [Qemu-devel RFC v2 4/4] msf2: Add Emcraft's Smartfusion2 SOM kit.

2017-04-17 Thread sundeep subbaraya
Hii Alistair, On Sat, Apr 15, 2017 at 2:42 AM, Alistair Francis wrote: > On Sun, Apr 9, 2017 at 4:19 AM, Subbaraya Sundeep > wrote: >> Emulated Emcraft's Smartfusion2 System On Module starter >> kit. >> >> Signed-off-by: Subbaraya Sundeep

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread Peter Xu
On Mon, Apr 17, 2017 at 06:09:11PM +0800, jack.chen wrote: > hello,I have some questions about memory allocation in qemu for > virtual machine.I found when configure_accelerator function was called > ,memory slots were registered to KVM,but at that time address_space > have not been initialized

Re: [Qemu-devel] [Qemu-devel RFC v2 2/4] msf2: Microsemi Smartfusion2 System Register block.

2017-04-17 Thread sundeep subbaraya
Hi Alistair, On Sat, Apr 15, 2017 at 3:02 AM, Alistair Francis wrote: > On Sun, Apr 9, 2017 at 4:19 AM, Subbaraya Sundeep > wrote: >> Added Sytem register block of Smartfusion2. >> This block has PLL registers which are accessed by guest. >> >>

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-17 Thread sundeep subbaraya
Hii Alistair, On Sat, Apr 15, 2017 at 2:58 AM, Alistair Francis wrote: > On Sun, Apr 9, 2017 at 4:19 AM, Subbaraya Sundeep > wrote: >> Modelled System Timer in Microsemi's Smartfusion2 Soc. >> Timer has two 32bit down counters and two interrupts. >>

[Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
hello,I have some questions about memory allocation in qemu for virtual machine.I found when configure_accelerator function was called ,memory slots were registered to KVM,but at that time address_space have not been initialized and ram have not been allocated,it is really confused me,Thanks a

[Qemu-devel] need help about trace reconstruction

2017-04-17 Thread oussema ben khedher via Qemu-devel
hi  i m comparing the trace of execution of reconstruction of trace instruction of a code running in real board and the trace of  the same code running in qemu .. and i found that there is some function not called in the reconstruction of qemu trace .. i guess that qemu do some optimization or

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9-rc5 v2] block: Drain BH in bdrv_drained_begin

2017-04-17 Thread Fam Zheng
On Fri, 04/14 09:51, Stefan Hajnoczi wrote: > On Fri, Apr 14, 2017 at 9:02 AM, Fam Zheng wrote: > > @@ -398,11 +399,15 @@ void bdrv_drain_all(void); > > */\ > > assert(!bs_->wakeup); \

Re: [Qemu-devel] [PATCH 2/6] util: introduce glib-helper.c

2017-04-17 Thread Alexey
Hi Philippe, On Fri, Apr 14, 2017 at 01:05:52PM -0300, Philippe Mathieu-Daudé wrote: > Hi Alexey, > > On 04/14/2017 10:17 AM, Alexey Perevalov wrote: > >There is a lack of g_int_cmp which compares pointers value in glib, > >xen_disk.c introduced its own, so the same function now requires > >in

Re: [Qemu-devel] [PATCH] util/error: Fix leak in error_vprepend()

2017-04-17 Thread Fam Zheng
On Thu, 04/13 18:09, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > util/error.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/error.c b/util/error.c > index 9c40b1f458..020b86b9f0 100644 > --- a/util/error.c > +++ b/util/error.c > @@ -134,6 +134,7 @@

Re: [Qemu-devel] [PATCH for-2.10 0/2] block: An empty filename counts as no filename

2017-04-17 Thread Fam Zheng
On Thu, 04/13 18:06, Max Reitz wrote: > See patch 1 for what is happening when you try "qemu-img info ''" and > for the fix. > > (Patch 2 just adds a simple test.) Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-17 Thread Hailiang Zhang
On 2017/4/12 22:28, Eric Blake wrote: On 04/12/2017 09:05 AM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

<    1   2