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

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

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

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

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

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

Re: [Qemu-devel] [PATCH 03/10] target-ppc: Rework ppc_store_slb

2016-01-26 Thread Thomas Huth
On 27.01.2016 01:04, David Gibson wrote: > On Mon, Jan 25, 2016 at 08:22:51PM +0100, Alexander Graf wrote: >> >> >> On 01/25/2016 06:15 AM, David Gibson wrote: >>> ppc_store_slb updates the SLB for PPC cpus with 64-bit hash MMUs. >>> Currently it takes two parameters, which contain values encoded a

Re: [Qemu-devel] [PATCH] migration: remove useless code.

2016-01-26 Thread Fam Zheng
On Wed, 01/27 14:11, Liang Li wrote: > Since 's->state' will be set in migrate_init(), there is no > need to set it before calling migrate_init(). The code and > the related comments can be removed. Reviewed-by: Fam Zheng > > Signed-off-by: Liang Li > --- > migration/migration.c | 6 -- >

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Hailiang Zhang
On 2016/1/27 13:59, Jason Wang wrote: On 01/27/2016 08:37 AM, Hailiang Zhang wrote: On 2016/1/26 11:18, Jason Wang wrote: On 01/25/2016 03:22 PM, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer

Re: [Qemu-devel] [PULL 00/28] ppc-for-2.6 queue 20160125

2016-01-26 Thread David Gibson
On Tue, Jan 26, 2016 at 11:56:15AM +0100, Gerd Hoffmann wrote: > Hi, > > > Just set up a 32bit vm and maybe configure it to automatically test your > > git branch? ;) > > Container works even better as you can kick the build right from the > (host) command line, without boot vm, login, ... >

[Qemu-devel] [PATCH] migration: remove useless code.

2016-01-26 Thread Liang Li
Since 's->state' will be set in migrate_init(), there is no need to set it before calling migrate_init(). The code and the related comments can be removed. Signed-off-by: Liang Li --- migration/migration.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/migration/migration.c b/migration

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Jason Wang
On 01/27/2016 08:37 AM, Hailiang Zhang wrote: > On 2016/1/26 11:18, Jason Wang wrote: >> >> >> On 01/25/2016 03:22 PM, Hailiang Zhang wrote: >>> On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: > We add each netdev a default buffer filter, whic

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Jike Song
On 01/27/2016 11:07 AM, Alex Williamson wrote: > On Wed, 2016-01-27 at 09:47 +0800, Jike Song wrote: >> On 01/27/2016 06:56 AM, Alex Williamson wrote: >>> On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, Jan

Re: [Qemu-devel] [PATCH v2] net/filter: Fix the output information for command 'info network'

2016-01-26 Thread Jason Wang
On 01/27/2016 12:59 AM, Eric Blake wrote: > On 01/25/2016 11:43 PM, zhanghailiang wrote: >> The properties of netfilter object could be changed by 'qom-set' >> command, but the output of 'info network' command is not updated, >> because it got the old information through nf->info_str, it will >>

Re: [Qemu-devel] [PATCH V3] net: always walk through filters in reverse if traffic is egress

2016-01-26 Thread Jason Wang
On 01/26/2016 01:00 PM, Li Zhijian wrote: > Previously, if we attach more than filters for one netdev, IN/OUT traffic pass > through filters in a same order. > ingress: netdev ->filter1 ->filter2 ->...filter[n] ->emulated device > egress: emulated device ->filter1 ->filter2 ->...filter[n] ->netde

Re: [Qemu-devel] [RFC 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-26 Thread Jason Wang
On 01/26/2016 02:44 PM, Fam Zheng wrote: > On Tue, 01/26 06:24, w...@redhat.com wrote: >> Wei Xu (10): >> 'Segment', 'Chain' and 'Status' enumeration. >> Initilize & Cleanup. >> Chain lookup and packets caching. >> Tcp general data coalescing >> The draining timer >> IPv4 checksum. >>

Re: [Qemu-devel] [PATCH v2] net: netmap: use nm_open() to open netmap ports

2016-01-26 Thread Jason Wang
On 01/26/2016 02:24 AM, Vincenzo Maffione wrote: > This patch simplifies the netmap backend code by means of the nm_open() > helper function provided by netmap_user.h, which hides the details of > open(), iotcl() and mmap() carried out on the netmap device. > > Moreover, the semantic of nm_open()

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Wed, 2016-01-27 at 09:52 +0800, Yang Zhang wrote: > On 2016/1/27 6:56, Alex Williamson wrote: > > On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > > Sent: Wednesday, January 27, 2016 6:27 AM > > > >  > > > > On Tue, 201

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Jason Wang
On 01/25/2016 07:19 PM, Hailiang Zhang wrote: > On 2016/1/25 15:22, Hailiang Zhang wrote: >> On 2016/1/25 13:18, Jason Wang wrote: >>> >>> >>> On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Wed, 2016-01-27 at 09:47 +0800, Jike Song wrote: > On 01/27/2016 06:56 AM, Alex Williamson wrote: > > On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > > Sent: Wednesday, January 27, 2016 6:27 AM > > > >   > > > > On Tue

[Qemu-devel] [PATCH v2 11/14] hw/timer: QOM'ify puv3_ost

2016-01-26 Thread xiaoqiang zhao
assign puv3_ost_init to puv3_ost_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/puv3_ost.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index fa9eefd..0926c06 100644

[Qemu-devel] [PATCH v2 14/14] hw/timer: QOM'ify tusb6010 and remove all tabs

2016-01-26 Thread xiaoqiang zhao
* assign tusb6010_init to tusb6010_info.instance_init and drop the SysBusDeviceClass::init * use spaces instead of tabs Signed-off-by: xiaoqiang zhao --- hw/timer/tusb6010.c | 323 ++-- 1 file changed, 161 insertions(+), 162 deletions(-) diff --g

[Qemu-devel] [PATCH v2 12/14] hw/timer: QOM'ify pxa2xx_timer

2016-01-26 Thread xiaoqiang zhao
* split pxa2xx_timer_init into pxa2xx_timer_type_info.instance_init and pxa2xx_timer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/pxa2xx_timer.c | 36 +--- 1 file changed, 21 insertions(+), 15 de

[Qemu-devel] [PATCH v2 10/14] hw/timer: QOM'ify pl031

2016-01-26 Thread xiaoqiang zhao
assign pl031_init to pl031_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/pl031.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 34d9b44..b3a2152 100644 --- a/hw/timer/pl0

[Qemu-devel] [PATCH v2 13/14] hw/timer: QOM'ify slavio_timer

2016-01-26 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/slavio_timer.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/slavio_timer

[Qemu-devel] [PATCH v2 06/14] hw/timer: QOM'ify grlib_gptimer

2016-01-26 Thread xiaoqiang zhao
* split grlib_gptimer_init into grlib_gptimer_info.instance_init and grlib_gptimer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions

[Qemu-devel] [PATCH v2 09/14] hw/timer: QOM'ify milkymist_sysctl

2016-01-26 Thread xiaoqiang zhao
* split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and milkymist_sysctl_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions

[Qemu-devel] [PATCH v2 05/14] hw/timer: QOM'ify exynos4210_rtc

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_rtc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c in

[Qemu-devel] [PATCH v2 03/14] hw/timer: QOM'ify exynos4210_mct

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_mct.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c in

[Qemu-devel] [PATCH v2 07/14] hw/timer: QOM'ify lm32_timer

2016-01-26 Thread xiaoqiang zhao
* split lm32_timer_init into lm32_timer_info.instance_init and lm32_timer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v2 04/14] hw/timer: QOM'ify exynos4210_pwm

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_pwm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c in

[Qemu-devel] [PATCH v2 08/14] hw/timer: QOM'ify m48txx_sysbus

2016-01-26 Thread xiaoqiang zhao
* split m48t59_init1 into m48txx_sysbus_type_info.instance_init and m48t59_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH v2 00/14] QOM'ify hw/timer/*

2016-01-26 Thread xiaoqiang zhao
This patch series QOM'ify timer code under hw/timer directory. Main idea is to split the initfn's work, some to TypeInfo.instance_init and some is placed in DeviceClass::realize. Drop the use of SysBusDeviceClass::init if possible. changes since v1: fix a stupid typo (timmer->timer) xiaoqiang zha

[Qemu-devel] [PATCH v2 01/14] hw/timer: QOM'ify arm_timer

2016-01-26 Thread xiaoqiang zhao
* assign icp_pit_init to icp_pit_info.instance_init * split sp804_init into sp804_info.instance_init (sp804_init) and sp804_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/arm_timer.c | 38 +- 1

[Qemu-devel] [PATCH v2 02/14] hw/timer: QOM'ify etraxfs_timer

2016-01-26 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index

Re: [Qemu-devel] [PATCH] nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file

2016-01-26 Thread Gonglei (Arei)
> > Subject: [PATCH] nvme: generate OpenFirmware device path in the "bootorder" > fw_cfg file > > Background on QEMU boot indices > --- > > Normally, the "bootindex" property is configured for bootable devices > with: > > DEVICE_instance_init() > device_add_boot

[Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-26 Thread Zhang Chen
From: ZhangChen Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -traffic-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=m

Re: [Qemu-devel] [PATCH 04/10] target-ppc: Rework SLB page size lookup

2016-01-26 Thread David Gibson
On Mon, Jan 25, 2016 at 08:38:49PM +0100, Alexander Graf wrote: > > > On 01/25/2016 06:15 AM, David Gibson wrote: > >Currently, the ppc_hash64_page_shift() function looks up a page size based > >on information in an SLB entry. It open codes the bit translation for > >existing CPUs, however diffe

Re: [Qemu-devel] [PATCH 05/10] target-ppc: Use actual page size encodings from HPTE

2016-01-26 Thread David Gibson
On Mon, Jan 25, 2016 at 09:18:18PM +0100, Alexander Graf wrote: > > > On 01/25/2016 06:15 AM, David Gibson wrote: > >At present the 64-bit hash MMU code uses information from the SLB to > >determine the page size of a translation. We do need that information to > >correctly look up the hash tabl

Re: [Qemu-devel] [PATCH 03/10] target-ppc: Rework ppc_store_slb

2016-01-26 Thread David Gibson
On Mon, Jan 25, 2016 at 08:22:51PM +0100, Alexander Graf wrote: > > > On 01/25/2016 06:15 AM, David Gibson wrote: > >ppc_store_slb updates the SLB for PPC cpus with 64-bit hash MMUs. > >Currently it takes two parameters, which contain values encoded as the > >register arguments to the slbmte inst

Re: [Qemu-devel] [PATCH v2 5/5] blockjob: add Job parameter to BlockCompletionFunc

2016-01-26 Thread Fam Zheng
On Tue, 01/26 18:54, John Snow wrote: > It will no longer be sufficient to rely on the opaque parameter > containing a BDS, and there's no way to reliably include a > self-reference to the job we're creating, so always pass the Job > object forward to any callbacks. > > Signed-off-by: John Snow >

Re: [Qemu-devel] [PATCH v2 4/5] block/backup: Pack Notifier within BackupBlockJob

2016-01-26 Thread Fam Zheng
On Tue, 01/26 18:54, John Snow wrote: > Instead of relying on peeking at bs->job, we want to explicitly get > a reference to the job that was involved in this notifier callback. > > Pack the Notifier inside of the BackupBlockJob so we can use > container_of to get a reference back to the BackupBlo

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Jike Song
On 01/27/2016 09:34 AM, Yang Zhang wrote: > On 2016/1/27 8:06, Jike Song wrote: >> On 01/26/2016 10:05 PM, Yang Zhang wrote: >>> On 2016/1/26 15:41, Jike Song wrote: >>> We will need to extend: - VFIO_DEVICE_GET_REGION_INFO a) adding a flag: DONT_MAP. For example, t

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Yang Zhang
On 2016/1/27 6:56, Alex Williamson wrote: On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, January 27, 2016 6:27 AM On Tue, 2016-01-26 at 22:15 +, Tian, Kevin wrote: From: Alex Williamson [mailto:alex.william..

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Jike Song
On 01/27/2016 06:56 AM, Alex Williamson wrote: > On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: >>> From: Alex Williamson [mailto:alex.william...@redhat.com] >>> Sent: Wednesday, January 27, 2016 6:27 AM >>> >>> On Tue, 2016-01-26 at 22:15 +, Tian, Kevin wrote: > From: Alex William

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Zhang Chen
On 01/27/2016 03:46 AM, Dr. David Alan Gilbert wrote: * Yang Hongyang (hongyang.y...@easystack.cn) wrote: On 01/26/2016 04:59 PM, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. netfilter plugin fix It make qemu has ability to copy and mirror guest's s/ma

Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag()

2016-01-26 Thread Chen Gang
On 2016年01月26日 18:26, Peter Maydell wrote: > On 26 January 2016 at 10:19, Chen Gang wrote: >> When I run WeChat.exe with i386 wine with qemu-i386 under sw_64 arch. >> >> - The related command: >> >>"./i386-linux-user/qemu-i386 -strace -L /upstream/i386_wine >> /upstream/i386_wine/usr/local

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Yang Zhang
On 2016/1/27 8:06, Jike Song wrote: On 01/26/2016 10:05 PM, Yang Zhang wrote: On 2016/1/26 15:41, Jike Song wrote: We will need to extend: - VFIO_DEVICE_GET_REGION_INFO a) adding a flag: DONT_MAP. For example, the MMIO of vgpu should be trapped instead of being mmap-ed. I may not

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Zhang Chen
On 01/27/2016 08:44 AM, Hailiang Zhang wrote: On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirrorer0

Re: [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2016-01-26 Thread Fam Zheng
On Tue, 01/26 17:57, John Snow wrote: > Can we implement a function that, in the event of a disaster, compares > the current state of the drive with the last known good incremental and > populates a bitmap based on the difference? > > Actually, we probably really want this feature around regardles

Re: [Qemu-devel] [PATCH 3/4] target-ppc: add CPU access_type into the migration stream

2016-01-26 Thread Alexey Kardashevskiy
On 01/26/2016 06:03 AM, Alexander Graf wrote: On 01/08/2016 03:29 AM, Alexey Kardashevskiy wrote: On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: This is referenced in cpu_ppc_handle_mmu_fault() and so should be included in the migration stream. Signed-off-by: Mark Cave-Ayland --- target-

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Hailiang Zhang
On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirrorer0,host=ip_primary,port=X,server,nowait -traffic-mi

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Hailiang Zhang
On 2016/1/26 11:18, Jason Wang wrote: On 01/25/2016 03:22 PM, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled, so it has n

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Jike Song
On 01/26/2016 10:05 PM, Yang Zhang wrote: > On 2016/1/26 15:41, Jike Song wrote: > >> We will need to extend: >> >> - VFIO_DEVICE_GET_REGION_INFO >> >> >> a) adding a flag: DONT_MAP. For example, the MMIO of vgpu >> should be trapped instead of being mmap-ed. > > I may not in the context, but

[Qemu-devel] [PATCH v2 1/5] block: Allow mirror_start to return job references

2016-01-26 Thread John Snow
Pick up an extra reference in mirror_start_job to allow callers of mirror_start and commit_active_start to get a reference to the job they have created. Phase out callers from fishing the job out of bs->job -- use the return value instead. Callers of mirror_start_job and commit_active_start are no

[Qemu-devel] [PATCH v2 3/5] block: allow backup_start to return job references

2016-01-26 Thread John Snow
backup_start picks up a reference to return the job it created to a caller. callers are updated to put down the reference when they are finished. This is particularly interesting for transactions where backup jobs pick up an implicit reference to the job. Previously, we check to see if the job sti

[Qemu-devel] [PATCH v2 4/5] block/backup: Pack Notifier within BackupBlockJob

2016-01-26 Thread John Snow
Instead of relying on peeking at bs->job, we want to explicitly get a reference to the job that was involved in this notifier callback. Pack the Notifier inside of the BackupBlockJob so we can use container_of to get a reference back to the BackupBlockJob object. This cuts out one more case where

[Qemu-devel] [PATCH v2 0/5] block: reduce reliance on bs->job pointer

2016-01-26 Thread John Snow
This is a small collection of patches to reduce our use of the bs->job pointer where possible. There are still more usages in the code, but this cuts down on a few. The goal is to eventually eliminate all of them and allow multiple block jobs to run concurrently, but design on what that will look

[Qemu-devel] [PATCH v2 2/5] block: Allow stream_start to return job references

2016-01-26 Thread John Snow
stream_start now picks up a reference for its return value, a copy of the job started. callers are responsible for putting it down when they are done with it. This removes a minor reference to bs->job in qmp_block_stream, for a simple tracing function. Reviewed-by: Kevin Wolf Signed-off-by: John

[Qemu-devel] [PATCH v2 5/5] blockjob: add Job parameter to BlockCompletionFunc

2016-01-26 Thread John Snow
It will no longer be sufficient to rely on the opaque parameter containing a BDS, and there's no way to reliably include a self-reference to the job we're creating, so always pass the Job object forward to any callbacks. Signed-off-by: John Snow --- block/backup.c| 2 +- block/commi

Re: [Qemu-devel] [PATCH v9 07/37] qapi: Improve generated event use of qapi visitor

2016-01-26 Thread Eric Blake
On 01/20/2016 10:10 AM, Eric Blake wrote: > Oops. It all gets cleaned up in 33 when visit_end_struct() loses the > errp argument, but in the meantime, I think the most robust way to write > this would be: > > out_obj: > visit_end_struct(v, err ? NULL : &err); > if (err) { > ... > >> >> I

[Qemu-devel] 回复:Re: [PATCH 00/14] QOM'ify hw/timmer/*

2016-01-26 Thread
Thanks Erick,I will update. 在2016年01月27日 01:58,Eric Blake 写道: On 01/26/2016 03:55 AM, xiaoqiang zhao wrote: > This patch series QOM'ify timmer code under hw/timmer directory. s/timmer/timer/ in the subject lines and throughout the entire series > Main idea is to split the initfn's work, some

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Tue, 2016-01-26 at 14:28 -0800, Neo Jia wrote: > On Tue, Jan 26, 2016 at 01:06:13PM -0700, Alex Williamson wrote: > > > 1.1 Under per-physical device sysfs: > > > -- > > >   > > > vgpu_supported_types - RO, list the

[Qemu-devel] [PATCH] nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file

2016-01-26 Thread Laszlo Ersek
Background on QEMU boot indices --- Normally, the "bootindex" property is configured for bootable devices with: DEVICE_instance_init() device_add_bootindex_property(..., "bootindex", ...) object_property_add(..., device_get_bootindex,

Re: [Qemu-devel] Migrating decrementer

2016-01-26 Thread Mark Cave-Ayland
On 26/01/16 22:31, Mark Cave-Ayland wrote: > For a typical savevm/loadvm pair I see something like this: > > savevm: > > tb->guest_timebase = 26281306490558 > qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) = 7040725511 > > loadvm: > > cpu_get_host_ticks() = 26289847005259 > tb_off_adj = -8540514701 > q

Re: [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2016-01-26 Thread John Snow
On 01/26/2016 03:45 AM, Vladimir Sementsov-Ogievskiy wrote: > On 03.06.2015 01:17, John Snow wrote: >> >> On 05/28/2015 04:56 PM, Denis V. Lunev wrote: >>> On 28/05/15 23:09, John Snow wrote: On 05/26/2015 10:51 AM, Denis V. Lunev wrote: > On 26/05/15 17:48, Denis V. Lunev wrote: >>

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Tue, 2016-01-26 at 22:39 +, Tian, Kevin wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, January 27, 2016 6:27 AM > >  > > On Tue, 2016-01-26 at 22:15 +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > >

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, January 27, 2016 6:27 AM > > On Tue, 2016-01-26 at 22:15 +, Tian, Kevin wrote: > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Wednesday, January 27, 2016 6:08 AM > > > > > > > > > > > >

Re: [Qemu-devel] Migrating decrementer

2016-01-26 Thread Mark Cave-Ayland
On 25/01/16 11:10, David Gibson wrote: > Um.. so the migration duration is a complete red herring, regardless > of the units. > > Remember, we only ever compute the guest timebase value at the moment > the guest requests it - actually maintaining a current timebase value > makes sense in hardware

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Neo Jia
On Tue, Jan 26, 2016 at 01:06:13PM -0700, Alex Williamson wrote: > On Tue, 2016-01-26 at 02:20 -0800, Neo Jia wrote: > > On Mon, Jan 25, 2016 at 09:45:14PM +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > >  > > Hi Alex, Kevin and Jike, > >  > > (Seems I

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Tue, 2016-01-26 at 22:15 +, Tian, Kevin wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, January 27, 2016 6:08 AM > >  > > > > > >  > > > > >  > > > > > Today KVMGT (not using VFIO yet) registers I/O emulation callbacks to > > > > > KVM, so VM MMIO ac

Re: [Qemu-devel] [PATCH 1/6] i.MX: Allow GPT timer to rollover.

2016-01-26 Thread Jean-Christophe DUBOIS
Le 26/01/2016 22:54, Eric Blake a écrit : On 01/26/2016 02:44 PM, Jean-Christophe Dubois wrote: [meta-reply] Make sure your git settings properly thread your messages. Your 1/6 came through as a top-level thread, rather than in-reply-to the 0/6 cover letter (likewise for the rest of the series).

Re: [Qemu-devel] [PATCH v5] qom, qmp, hmp, qapi: create qom-type-prop-list for class properties

2016-01-26 Thread Daniel P. Berrange
On Tue, Jan 26, 2016 at 03:26:35PM -0200, Eduardo Habkost wrote: > On Tue, Jan 26, 2016 at 03:51:21PM +, Daniel P. Berrange wrote: > > On Tue, Jan 26, 2016 at 01:35:38PM -0200, Eduardo Habkost wrote: > > > On Mon, Jan 25, 2016 at 11:24:47AM +0300, Valentin Rakush wrote: > > > > This patch adds

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, January 27, 2016 6:08 AM > > > > > > > > > > > > > > Today KVMGT (not using VFIO yet) registers I/O emulation callbacks to > > > > KVM, so VM MMIO access will be forwarded to KVMGT directly for > > > > emulation in kern

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Tue, 2016-01-26 at 21:50 +, Tian, Kevin wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, January 27, 2016 5:44 AM > >  > > On Tue, 2016-01-26 at 21:21 +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > >

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, January 27, 2016 12:13 AM > > b) adding other information. For example, for the OpRegion, QEMU need > > to do more than mmap a region, it has to: > > > > - allocate a region > > - copy contents from somewhere in host to that region > > - mmap i

Re: [Qemu-devel] [PATCH 1/6] i.MX: Allow GPT timer to rollover.

2016-01-26 Thread Eric Blake
On 01/26/2016 02:44 PM, Jean-Christophe Dubois wrote: [meta-reply] Make sure your git settings properly thread your messages. Your 1/6 came through as a top-level thread, rather than in-reply-to the 0/6 cover letter (likewise for the rest of the series). > GPT timer need to rolloever when it reac

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, January 27, 2016 5:44 AM > > On Tue, 2016-01-26 at 21:21 +, Tian, Kevin wrote: > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Wednesday, January 27, 2016 12:37 AM > > > > > > On Tue, 201

[Qemu-devel] [PATCH 5/6] i.MX: Add i.MX6 SOC implementation.

2016-01-26 Thread Jean-Christophe Dubois
For now we only support the following devices: * up to 4 Cortex A9 cores * A9 MPCORE (SCU, GIC, TWD) * 5 i.MX UARTs * 2 EPIT timers * 1 GPT timer * 7 GPIO controllers * 6 SDHC controllers * 1 CCM device * 1 SRC device * various ROM/RAM areas. Signed-off-by: Jean-Christophe Dubois --- default-con

[Qemu-devel] [PATCH 6/6] i.MX: Add sabrelite i.MX6 emulation.

2016-01-26 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois --- hw/arm/Makefile.objs | 2 +- hw/arm/sabrelite.c | 93 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 hw/arm/sabrelite.c diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs

[Qemu-devel] [PATCH 4/6] i.MX: Add i.MX6 System Reset Controller device.

2016-01-26 Thread Jean-Christophe Dubois
This controller is also present in i.MX5X devices but they are not yet emulated by Qemu. Signed-off-by: Jean-Christophe Dubois --- hw/misc/Makefile.objs | 1 + hw/misc/imx6_src.c | 353 + include/hw/misc/imx6_src.h | 72 + 3 fil

[Qemu-devel] [PATCH 1/6] i.MX: Allow GPT timer to rollover.

2016-01-26 Thread Jean-Christophe Dubois
GPT timer need to rolloever when it reaches 0x. It also need to reset to 0 when in "retart mode" and crossing the compare 1 register. Signed-off-by: Jean-Christophe Dubois --- hw/timer/imx_gpt.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --

[Qemu-devel] [PATCH 2/6] i.MX: simplify CCM to only handle clock required by timers.

2016-01-26 Thread Jean-Christophe Dubois
Various i.MX timers (GPT, EPIT, PWM, ...) are only requesting 4 clocks from the system. * CLK_NONE, * CLK_IPG, * CLK_IPG_HIGH, * CLK_32k Other "clocks" are not required by the qemu framework so far. Signed-off-by: Jean-Christophe Dubois --- hw/misc/imx25_ccm.c | 35 +--

[Qemu-devel] [PATCH v3 15/19] fdc: use IsaDma interface instead of global DMA_* functions

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 63 ++ 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index e45a7f4..ba77bea 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -627,6 +62

[Qemu-devel] [PATCH 3/6] i.MX: Add i.MX6 CCM and ANALOG device.

2016-01-26 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois --- hw/misc/Makefile.objs | 1 + hw/misc/imx6_ccm.c | 764 + include/hw/misc/imx6_ccm.h | 195 3 files changed, 960 insertions(+) create mode 100644 hw/misc/imx6_ccm.c create mode 10064

[Qemu-devel] [PATCH 0/6] Add i.MX6 (Single/Dual/Quad) support

2016-01-26 Thread Jean-Christophe Dubois
This patch series adds support for the Freescale i.MX6 processor. For now we only support the following devices: * up to 4 Cortex A9 cores * A9 MPCORE (SCU, GIC, TWD) * 5 i.MX UARTs * 2 EPIT timers * 1 GPT timer * 7 GPIO controllers * 6 SDHC controllers * 1 CCM device * 1 SRC device * various ROM/

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Neo Jia [mailto:c...@nvidia.com] > Sent: Wednesday, January 27, 2016 5:31 AM > > On Tue, Jan 26, 2016 at 09:21:42PM +, Tian, Kevin wrote: > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Wednesday, January 27, 2016 12:37 AM > > > > > > On Tue, 2016-01-26 at 2

[Qemu-devel] [PATCH v3 17/19] gus: use IsaDma interface instead of global DMA_* functions

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/audio/gus.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index e0c8a4e..b027eb5 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -57,6 +57,7 @@ typedef struct GUSState { SWV

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Alex Williamson
On Tue, 2016-01-26 at 21:21 +, Tian, Kevin wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, January 27, 2016 12:37 AM > >  > > On Tue, 2016-01-26 at 22:05 +0800, Yang Zhang wrote: > > > On 2016/1/26 15:41, Jike Song wrote: > > > > On 01/26/2016 05:30 AM,

[Qemu-devel] [PATCH v3 19/19] dma: remove now useless DMA_* functions

2016-01-26 Thread Hervé Poussineau
Keep only DMA_init function as a wrapper around DMA controllers creation. Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 65 hw/sparc/sun4m.c | 22 -- hw/sparc64/sun4u.c | 22 -- include/hw/isa

[Qemu-devel] [PATCH v3 13/19] sparc: disable floppy DMA

2016-01-26 Thread Hervé Poussineau
All functions relative to DMA (DMA_*() functions) are stubs on sparc platform. Disable the DMA in the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index

Re: [Qemu-devel] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-01-26 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, January 27, 2016 4:06 AM > > On Tue, 2016-01-26 at 02:20 -0800, Neo Jia wrote: > > On Mon, Jan 25, 2016 at 09:45:14PM +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > > H

[Qemu-devel] [PATCH v3 18/19] sb16: use IsaDma interface instead of global DMA_* functions

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/audio/sb16.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 995435f..9973e77 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -55,6 +55,8 @@ typedef struct SB16State {

[Qemu-devel] [PATCH v3 05/19] i8257: rename functions to start with i8257_ prefix

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 91 +- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index e0713a5..b525063 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -80,11 +80

[Qemu-devel] [PATCH v3 10/19] isa: add an ISA DMA interface, and store it within the ISA bus

2016-01-26 Thread Hervé Poussineau
This will permit to deprecate global DMA_*() functions. Signed-off-by: Hervé Poussineau --- hw/isa/isa-bus.c| 21 + include/hw/isa/isa.h| 38 ++ include/qemu/typedefs.h | 1 + 3 files changed, 60 insertions(+) diff --git a/hw/

[Qemu-devel] [PATCH v3 03/19] i8257: rename struct dma_cont to I8257State

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 4d0b49d..f4fcf39 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -52,7 +52,7 @@ struct dma

[Qemu-devel] [PATCH v3 14/19] sparc64: disable floppy DMA

2016-01-26 Thread Hervé Poussineau
All functions relative to DMA (DMA_*() functions) are stubs on sparc64 platform. Disable the DMA of the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau --- hw/sparc64/sun4u.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hw

[Qemu-devel] [PATCH v3 04/19] i8257: rename struct dma_regs to I8257Regs

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index f4fcf39..e0713a5 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -37,7 +37,7 @@ #define ldeb

[Qemu-devel] [PATCH v3 02/19] i8257: pass ISA bus to DMA_init() function

2016-01-26 Thread Hervé Poussineau
i8257 DMA controller exists on one ISA bus, so let's specify it at initialization. Signed-off-by: Hervé Poussineau --- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 2 +- hw/i386/pc.c| 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_mal

[Qemu-devel] [PATCH v3 08/19] i8257: QOM'ify

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 160 ++--- 1 file changed, 107 insertions(+), 53 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 186a48a..2eb6d42 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -26,6 +26

[Qemu-devel] [PATCH v3 09/19] i8257: move state definition to new independent header

2016-01-26 Thread Hervé Poussineau
We will now be able to embed the i8257 interrupt controller in another object. Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 35 +-- include/hw/isa/i8257.h | 42 ++ 2 files changed, 43 insertions(+), 34 deleti

[Qemu-devel] [PATCH v3 07/19] i8257: add missing const

2016-01-26 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 9f70144..186a48a 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -86,7 +86,7 @@ enum { static void i8257_dma_run(void *opaque); -st

[Qemu-devel] [PATCH v3 06/19] i8257: make the DMA running method per controller

2016-01-26 Thread Hervé Poussineau
This removes some static/global variables, and we're now running only the required controller (master or slave) Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 75 ++ 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/hw/d

  1   2   3   4   >