[Qemu-devel] [PATCH] usb: Simplify the parameter parsing of the legacy usb serial device

2017-05-19 Thread Thomas Huth
Coverity complains about the current code, so let's get rid of the now unneeded while loop and simply always emit "unrecognized serial USB option" for all unsupported options. Signed-off-by: Thomas Huth --- hw/usb/dev-serial.c | 21 + 1 file changed, 5 insertions(+), 16 delet

Re: [Qemu-devel] [PATCH v4 3/3] net/rocker: Convert to realize()

2017-05-19 Thread Markus Armbruster
Mao Zhongyi writes: > The rocker device still implements the old PCIDeviceClass .init() > instead of the new .realize(). All devices need to be converted to > .realize(). > > .init() reports errors with fprintf() and return 0 on success, negative > number on failure. Meanwhile, when -device rocke

[Qemu-devel] [Bug 1180924] Re: fails to handle a usb serial port with a specific vendorid

2017-05-19 Thread Thomas Huth
The crash has now been fixed here: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=aa612b364ecbe1dc Please also note that the "-usbdevice serial" syntax is considered as deprecated nowadays - use "-device usb-serial" instead. ** Changed in: qemu Status: New => Fix Committed -- You receive

[Qemu-devel] [PATCH v0 3/6] move tcg header file

2017-05-19 Thread Yang Zhong
move translate-all.h to ./tcg Signed-off-by: Yang Zhong --- translate-all.h => tcg/translate-all.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translate-all.h => tcg/translate-all.h (100%) diff --git a/translate-all.h b/tcg/translate-all.h similarity index 100% rename from tran

[Qemu-devel] [PATCH v0 1/6] move tcg relative files into tcg directory

2017-05-19 Thread Yang Zhong
move tcg-runtime.c to ./tcg directory Signed-off-by: Yang Zhong --- Makefile.target| 2 +- tcg-runtime.c => tcg/tcg-runtime.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tcg-runtime.c => tcg/tcg-runtime.c (100%) diff --git a/Makefile.target b/Makefile.target

[Qemu-devel] [PATCH v0 4/6] move tcg relative files into tcg directory

2017-05-19 Thread Yang Zhong
move translate-common.c to ./tcg Signed-off-by: Yang Zhong --- Makefile.target | 2 +- translate-common.c => tcg/translate-common.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename translate-common.c => tcg/translate-common.c (100%) diff --git a/Makefile.

[Qemu-devel] [PATCH v0 0/6] move the tcg files into tcg directory.

2017-05-19 Thread Yang Zhong
Move the tcg relative files into tcg directory, which will make the code more clean in qemu. Yang Zhong (6): move tcg relative files into tcg directory move tcg relative files into tcg directory move tcg header file move tcg relative files into tcg directory move tcg relative files into

[Qemu-devel] [PATCH v0 2/6] move tcg relative files into tcg directory

2017-05-19 Thread Yang Zhong
move translate-all.c file into tcg directory and update trace-events file Signed-off-by: Yang Zhong --- Makefile.objs | 1 + Makefile.target| 3 ++- tcg/trace-events | 6 ++ translate-all.c => tcg/translate-all.c | 2 +-

[Qemu-devel] [PATCH v0 6/6] change tcg relative file's compile definition

2017-05-19 Thread Yang Zhong
move tcg relative compile definitions form Makefile.target to tcg/Makefile.objs Signed-off-by: Yang Zhong --- Makefile.target | 7 +-- tcg/Makefile.objs | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 tcg/Makefile.objs diff --git a/Makefile.target b/Makefile.t

[Qemu-devel] [PATCH v0 5/6] move tcg relative files into tcg directory

2017-05-19 Thread Yang Zhong
move tci.c to ./tcg Signed-off-by: Yang Zhong --- Makefile.target| 2 +- tci.c => tcg/tci.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tci.c => tcg/tci.c (100%) diff --git a/Makefile.target b/Makefile.target index 7ee6cb3..489a325 100644 --- a/Makefile.target +++ b/Makefile

Re: [Qemu-devel] [RFC PATCH v2 1/4] migration: Introduce unregister_savevm_live()

2017-05-19 Thread David Gibson
On Fri, May 19, 2017 at 11:10:36AM +0530, Bharata B Rao wrote: > Introduce a new function unregister_savevm_live() to unregister the vmstate > handlers registered via register_savevm_live(). > > register_savevm() allocates SaveVMHandlers while register_savevm_live() > gets passed with SaveVMHandle

Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support

2017-05-19 Thread Jason Wang
On 2017年05月18日 16:43, Maxime Coquelin wrote: +When the VHOST_USER_PROTOCOL_F_SLAVE_REQ is supported by the slave, and the +master initiated the slave to master communication channel using the +VHOST_USER_SET_SLAVE_REQ_FD request, the slave can send IOTLB miss and access +failure events by s

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-19 Thread Jay Zhou
Hi Paolo and Wanpeng, On 2017/5/17 16:38, Wanpeng Li wrote: 2017-05-17 15:43 GMT+08:00 Paolo Bonzini : Recently, I have tested the performance before migration and after migration failure using spec cpu2006 https://www.spec.org/cpu2006/, which is a standard performance evaluation tool. These

Re: [Qemu-devel] [PATCH] usb: Simplify the parameter parsing of the legacy usb serial device

2017-05-19 Thread Paolo Bonzini
On 19/05/2017 09:00, Thomas Huth wrote: > Coverity complains about the current code, so let's get rid of > the now unneeded while loop and simply always emit "unrecognized > serial USB option" for all unsupported options. > > Signed-off-by: Thomas Huth > --- > hw/usb/dev-serial.c | 21 +---

Re: [Qemu-devel] [PATCH] usb: Deprecate the legacy -usbdevice option

2017-05-19 Thread Paolo Bonzini
On 19/05/2017 08:35, Thomas Huth wrote: > The '-usbdevice' option is considered as deprecated nowadays and > we might want to remove these options in a future version of QEMU. > So mark this options as deprecated in the documenation and print out > a warning if it is used to tell the user what to

Re: [Qemu-devel] [PATCH] usb: Deprecate HMP commands usb_add and usb_del

2017-05-19 Thread Paolo Bonzini
On 19/05/2017 08:36, Thomas Huth wrote: > The commands 'device_add' and 'device_del' should be used > nowadays instead. > > Signed-off-by: Thomas Huth > --- > hmp-commands.hx | 6 -- > vl.c| 6 ++ > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/hmp-com

Re: [Qemu-devel] [PATCH] usb: Deprecate HMP commands usb_add and usb_del

2017-05-19 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > The commands 'device_add' and 'device_del' should be used > nowadays instead. > > Signed-off-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert > --- > hmp-commands.hx | 6 -- > vl.c| 6 ++ > 2 files changed, 10 insertions(+), 2 d

Re: [Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-19 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 02:43:27PM +0800, Peter Xu wrote: > We don't really have a return path for the other types yet. Let's check > this when .get_return_path() is called. > > For this, we introduce a new feature bit, and set it up only for socket > typed IO channels. > > This will help detect

Re: [Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-19 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 09:25:38AM +0100, Daniel P. Berrange wrote: > On Fri, May 19, 2017 at 02:43:27PM +0800, Peter Xu wrote: > > We don't really have a return path for the other types yet. Let's check > > this when .get_return_path() is called. > > > > For this, we introduce a new feature bit,

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-19 Thread Xiao Guangrong
I do not know why i was removed from the list. On 05/19/2017 04:09 PM, Jay Zhou wrote: Hi Paolo and Wanpeng, On 2017/5/17 16:38, Wanpeng Li wrote: 2017-05-17 15:43 GMT+08:00 Paolo Bonzini : Recently, I have tested the performance before migration and after migration failure using spec cpu2

Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support

2017-05-19 Thread Maxime Coquelin
On 05/19/2017 08:48 AM, Jason Wang wrote: On 2017年05月17日 22:10, Maxime Coquelin wrote: On 05/17/2017 04:53 AM, Jason Wang wrote: On 2017年05月16日 23:16, Michael S. Tsirkin wrote: On Mon, May 15, 2017 at 01:45:28PM +0800, Jason Wang wrote: On 2017年05月13日 08:02, Michael S. Tsirkin wrote:

[Qemu-devel] [PULL 0/1] ui: egl-headless requires dmabuf support

2017-05-19 Thread Gerd Hoffmann
in the git repository at: git://git.kraxel.org/qemu tags/pull-ui-20170519-1 for you to fetch changes up to 371ec54e9f8415cd74af45acdcf67b413f50cce5: ui: egl-headless requires dmabuf support (2017-05-19 10:46:00 +0200) ui: eg

[Qemu-devel] [PULL 1/1] ui: egl-headless requires dmabuf support

2017-05-19 Thread Gerd Hoffmann
Reported-by: Thomas Huth Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20170517122744.3541-1-kra...@redhat.com --- vl.c | 4 ++-- ui/Makefile.objs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 1512df6e9e..ca4a

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-19 Thread Wei Wang
On 05/19/2017 11:10 AM, Jason Wang wrote: On 2017年05月18日 11:03, Wei Wang wrote: On 05/17/2017 02:22 PM, Jason Wang wrote: On 2017年05月17日 14:16, Jason Wang wrote: On 2017年05月16日 15:12, Wei Wang wrote: Hi: Care to post the driver codes too? OK. It may take some time to clean up the d

Re: [Qemu-devel] [RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-05-19 Thread Tian, Kevin
> From: Liu, Yi L [mailto:yi.l@linux.intel.com] > Sent: Friday, May 19, 2017 1:24 PM > > Hi Alex, > > What's your opinion with Tianyu's question? Is it accepatable > to use VFIO API in intel_iommu emulator? Did you actually need such translation at all? SID should be filled by kernel IOMMU d

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] migration: avoid recursive AioContext locking in save_vmstate()

2017-05-19 Thread Stefan Hajnoczi
On Thu, May 18, 2017 at 10:18:46AM +0200, Kevin Wolf wrote: > Am 17.05.2017 um 19:09 hat Stefan Hajnoczi geschrieben: > > diff --git a/migration/savevm.c b/migration/savevm.c > > index 7f66d58..a70ba20 100644 > > --- a/migration/savevm.c > > +++ b/migration/savevm.c > > @@ -2153,6 +2153,14 @@ int s

[Qemu-devel] [PATCH] target/i386: use multiple CPU AddressSpaces

2017-05-19 Thread Paolo Bonzini
This speeds up SMM switches. Later on it may remove the need to take the BQL, and it may also allow to reuse code between TCG and KVM. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c| 15 +- target/i386/cpu.h| 11 +- target/i386/helper.c | 54 +

Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability

2017-05-19 Thread Markus Armbruster
Juan Quintela writes: > Create one capability for block migration and one parameter for > incremental block migration. > > Signed-off-by: Juan Quintela [...] > diff --git a/include/migration/block.h b/include/migration/block.h > index 41a1ac8..5225af9 100644 > --- a/include/migration/block.h > +

Re: [Qemu-devel] specify memory in QEMU with Virtio

2017-05-19 Thread Gerd Hoffmann
On Do, 2017-05-18 at 22:43 -0400, jenia mtl wrote: > Hello. > > > How do I specify how much graphics memory the Windows client should have in > QEMU. I have successfully installed Virtio and can launch the VM (Windows) > with it. This doubles the memory form 8MB to 16MB. But I need 512. How can >

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-19 Thread Jay Zhou
Hi Xiao, On 2017/5/19 16:32, Xiao Guangrong wrote: I do not know why i was removed from the list. I was CCed to you... Your comments are very valuable to us, and thank for your quick response. On 05/19/2017 04:09 PM, Jay Zhou wrote: Hi Paolo and Wanpeng, On 2017/5/17 16:38, Wanpeng Li wr

Re: [Qemu-devel] [PATCH] Memory: use memory address space for cpu-memory

2017-05-19 Thread Paolo Bonzini
On 19/05/2017 01:28, Xu, Anthony wrote: >> On 18/05/2017 23:48, Xu, Anthony wrote: It should be called. Alternatively you could try adding a new function to mark address_space_memory as a never-destroyed AddressSpace: >>> This patch would do it, could you please submit this patch?

[Qemu-devel] [PATCH v1 03/13] qcow2: do not COW the empty areas

2017-05-19 Thread Anton Nefedov
If COW area of the newly allocated cluster is zeroes, there is no reason to write zero sectors in perform_cow() again now as whole clusters are zeroed out in single chunks by handle_alloc_space(). Introduce QCowL2Meta field "reduced", since the existing fields (offset and nb_bytes) still has to ke

[Qemu-devel] [PATCH v1 00/13] qcow2: space preallocation and COW improvements

2017-05-19 Thread Anton Nefedov
This pull request is to address a few performance problems of qcow2 format: 1. non cluster-aligned write requests (to unallocated clusters) explicitly pad data with zeroes if there is no backing data. This can be avoided and the whole clusters are preallocated and zeroed in a single

[Qemu-devel] [PATCH v1 04/13] qcow2: preallocation at image expand

2017-05-19 Thread Anton Nefedov
From: "Denis V. Lunev" This patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storages where this procedure is slow. Image expand requests have to be suspended until the allocation is performed which is done v

[Qemu-devel] [PATCH v1 09/13] qcow2: fix misleading comment about L2 linking

2017-05-19 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 25210cd..4204db9 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c

[Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-19 Thread Anton Nefedov
From: "Denis V. Lunev" Currently each single write operation can result in 3 write operations if guest offsets are not cluster aligned. One write is performed for the real payload and two for COW-ed areas. Thus the data possibly lays non-contiguously on the host filesystem. This will reduce furth

[Qemu-devel] [PATCH v1 05/13] qcow2: set inactive flag

2017-05-19 Thread Anton Nefedov
Qcow2State and BlockDriverState flags have to be in sync Signed-off-by: Anton Nefedov --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index 6e7ce96..07c1706 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1939,6 +1939,7 @@ static int qcow2_i

[Qemu-devel] [PATCH v1 07/13] qcow2: check space leak at the end of the image

2017-05-19 Thread Anton Nefedov
From: Pavel Butsykin Preallocating memory in the image may remain unused after the fall, for the qcow2_check adds the ability to identify and fix it, so as not to store extra memory on the host. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- bloc

[Qemu-devel] [PATCH v1 11/13] qcow2-cluster: make handle_dependencies() logic easier to follow

2017-05-19 Thread Anton Nefedov
Avoid complicated nested conditions; return or continue asap instead. The logic is not changed. Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git

[Qemu-devel] [PATCH v1 02/13] qcow2: is_zero_sectors(): return true if area is outside of backing file

2017-05-19 Thread Anton Nefedov
in such case, bdrv_get_block_status() shall return 0, *nr == 0 iotest 154 updated accordingly: write-zeroes tail alignment can be detected as zeroes now, so pwrite_zeroes succeeds Signed-off-by: Anton Nefedov --- block/qcow2.c | 6 -- tests/qemu-iotests/154.out | 4 ++-- 2 file

[Qemu-devel] [PATCH v1 13/13] iotest 046: test simultaneous cluster write error case

2017-05-19 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- tests/qemu-iotests/046 | 38 +- tests/qemu-iotests/046.out | 23 +++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index f2ebecf..c210b55 1

[Qemu-devel] [PATCH v1 12/13] qcow2: allow concurrent unaligned writes to the same clusters

2017-05-19 Thread Anton Nefedov
If COW area of a write request to unallocated cluster is empty, concurrent write requests can be allowed with a little bit of extra synchronization; so they don't have to wait until L2 is filled. Let qcow2_cluster.c::handle_dependencies() do the most of the job: if there is an in-flight request

[Qemu-devel] [PATCH v1 06/13] qcow2: truncate preallocated space

2017-05-19 Thread Anton Nefedov
From: "Denis V. Lunev" This could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2-cluster.c | 9 + block/qcow2-refcount.c | 7 +++ block/qcow2.c | 8 block/q

[Qemu-devel] [PATCH v1 08/13] qcow2: handle_prealloc(): find out if area zeroed by earlier preallocation

2017-05-19 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 2 ++ block/qcow2.c | 8 +++- block/qcow2.h | 4 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index b2879b9..25210cd 100

[Qemu-devel] [PATCH v1 10/13] qcow2-cluster: slightly refactor handle_dependencies()

2017-05-19 Thread Anton Nefedov
- assert the alignment on return if the allocation has to stop (at the start of a running allocation) - make use of const specifiers for local variables Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 20 +++- 1 file changed, 11 ins

[Qemu-devel] [PATCH] i386: fix read/write cr with icount option

2017-05-19 Thread Mihail Abakumov
Running Windows with icount causes a crash in instruction of write cr. This patch fixes it. Reading and writing cr cause an icount read because there are called cpu_get_apic_tpr and cpu_set_apic_tpr functions. So, there is need gen_io_start()/gen_io_end() calls. --- target/i386/translate.c

Re: [Qemu-devel] [PATCH 3/6] vhost: Update rings information for IOTLB earlier

2017-05-19 Thread Maxime Coquelin
On 05/18/2017 05:24 PM, Michael S. Tsirkin wrote: On Thu, May 18, 2017 at 04:45:23PM +0200, Maxime Coquelin wrote: Hi Michael, On 05/18/2017 09:35 AM, Maxime Coquelin wrote: On 05/17/2017 06:41 PM, Michael S. Tsirkin wrote: On Fri, May 12, 2017 at 01:21:18PM +0200, Maxime Coquelin wrote:

Re: [Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-19 Thread Peter Xu
On Fri, May 19, 2017 at 09:25:38AM +0100, Daniel P. Berrange wrote: > On Fri, May 19, 2017 at 02:43:27PM +0800, Peter Xu wrote: > > We don't really have a return path for the other types yet. Let's check > > this when .get_return_path() is called. > > > > For this, we introduce a new feature bit,

Re: [Qemu-devel] [RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-05-19 Thread Liu, Yi L
On Fri, May 19, 2017 at 09:07:49AM +, Tian, Kevin wrote: > > From: Liu, Yi L [mailto:yi.l@linux.intel.com] > > Sent: Friday, May 19, 2017 1:24 PM > > > > Hi Alex, > > > > What's your opinion with Tianyu's question? Is it accepatable > > to use VFIO API in intel_iommu emulator? > > Did yo

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-19 Thread Jason Wang
On 2017年05月19日 17:00, Wei Wang wrote: On 05/19/2017 11:10 AM, Jason Wang wrote: On 2017年05月18日 11:03, Wei Wang wrote: On 05/17/2017 02:22 PM, Jason Wang wrote: On 2017年05月17日 14:16, Jason Wang wrote: On 2017年05月16日 15:12, Wei Wang wrote: Hi: Care to post the driver codes too? OK

Re: [Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-19 Thread Peter Xu
On Fri, May 19, 2017 at 09:30:10AM +0100, Daniel P. Berrange wrote: > On Fri, May 19, 2017 at 09:25:38AM +0100, Daniel P. Berrange wrote: > > On Fri, May 19, 2017 at 02:43:27PM +0800, Peter Xu wrote: > > > We don't really have a return path for the other types yet. Let's check > > > this when .get_

Re: [Qemu-devel] [PATCH 3/3] numa: silence incomplete mapping warning under qtest

2017-05-19 Thread Stefan Hajnoczi
On Thu, May 18, 2017 at 7:20 PM, Eduardo Habkost wrote: > On Thu, May 18, 2017 at 10:09:31AM +0200, Igor Mammedov wrote: >> Suggested-by: Markus Armbruster >> Signed-off-by: Igor Mammedov > > Where exactly is the test code that triggers those messages and > requires this patch? I would like to d

Re: [Qemu-devel] [PATCH] i386: fix read/write cr with icount option

2017-05-19 Thread Paolo Bonzini
On 19/05/2017 11:36, Mihail Abakumov wrote: > Running Windows with icount causes a crash in instruction of write cr. > This patch fixes it. > > Reading and writing cr cause an icount read because there are called > cpu_get_apic_tpr and cpu_set_apic_tpr functions. So, there is need > gen_io_start

Re: [Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-19 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 05:51:43PM +0800, Peter Xu wrote: > On Fri, May 19, 2017 at 09:25:38AM +0100, Daniel P. Berrange wrote: > > On Fri, May 19, 2017 at 02:43:27PM +0800, Peter Xu wrote: > > > We don't really have a return path for the other types yet. Let's check > > > this when .get_return_pat

[Qemu-devel] [PATCH v2 0/4] spapr/xics: fix migration of older machine types

2017-05-19 Thread Greg Kurz
v2: - some patches from v1 are already merged in ppc-for-2.10 - added a new fix to a potential memory leak (patch 1) - consolidate dt_id computation (patch 3) - see individual changelogs for patch 2 and 4 This series is based on: https://github.com/dgibson/qemu.git ppc-for-2.10 I cou

[Qemu-devel] [PATCH v2 2/4] spapr: fix error reporting in xics_system_init()

2017-05-19 Thread Greg Kurz
If the user explicitely asked for kernel-irqchip support and "xics-kvm" initialization fails, we shouldn't fallback to emulated "xics" as we do now. It is also awkward to print an error message when we have an errp pointer argument. Let's use the errp argument to report the error and let the calle

[Qemu-devel] [PATCH v2 3/4] target/ppc: consolidate CPU device-tree id computation in helper

2017-05-19 Thread Greg Kurz
For historical reasons, we compute CPU device-tree ids with a non-trivial logic. This patch consolidate the logic in a single helper to be used in various places where it is currently open-coded. It is okay to get rid of DIV_ROUND_UP() because we're sure that the number of threads per core in the

[Qemu-devel] [PATCH v2 1/4] block: count bdrv_co_rw_vmstate() requests

2017-05-19 Thread Stefan Hajnoczi
Call bdrv_inc/dec_in_flight() for vmstate reads/writes. This seems unnecessary at first glance because vmstate reads/writes are done synchronously while the guest is stopped. But we need the bdrv_wakeup() in bdrv_dec_in_flight() so the main loop sees request completion. Besides, it's cleaner to c

[Qemu-devel] [PATCH v2 4/4] spapr: fix migration of ICP objects from/to older QEMU

2017-05-19 Thread Greg Kurz
Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under sPAPRCPUCore") moved ICP objects from the machine to CPU cores. This is an improvement since we no longer allocate ICP objects that will never be used. But it has the side-effect of breaking migration of older machine types from o

[Qemu-devel] [PATCH v2 3/4] migration: avoid recursive AioContext locking in save_vmstate()

2017-05-19 Thread Stefan Hajnoczi
AioContext was designed to allow nested acquire/release calls. It uses a recursive mutex so callers don't need to worry about nesting...or so we thought. BDRV_POLL_WHILE() is used to wait for block I/O requests. It releases the AioContext temporarily around aio_poll(). This gives IOThreads a ch

[Qemu-devel] [PATCH v2 1/4] spapr_cpu_core: drop reference on ICP object during CPU realization

2017-05-19 Thread Greg Kurz
When a piece of code allocates an object, it implicitely gets a reference on it. If it then makes that object a child property of another object, it should drop its own reference at some point otherwise the child object can never be finalized. The current code hence leaks one ICP object per CPU whe

[Qemu-devel] [PATCH v2 0/4] block: fix 'savevm' hang with -object iothread

2017-05-19 Thread Stefan Hajnoczi
v2: * New patch to use bdrv_drain_all_begin/end() in savevm/loadvm [Kevin] (All other patches unchanged) The 'savevm' command hangs when -object iothread is used. See patches for details, but basically the vmstate read/write code didn't conform to the latest block layer locking rules. Stefan

[Qemu-devel] [PATCH v2 4/4] migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()

2017-05-19 Thread Stefan Hajnoczi
blk/bdrv_drain_all() only takes effect for a single instant and then resumes block jobs, guest devices, and other external clients like the NBD server. This can be handy when performing a synchronous drain before terminating the program, for example. Monitor commands usually need to quiesce I/O a

[Qemu-devel] [Bug 1162227] Re: Mouse works badly when connecting to host via vnc

2017-05-19 Thread Thomas Huth
As you mentioned already, the solution is to use an USB tablet instead of a mouse device, and as far as I can see, it is also mentioned in the documentation of the "-vnc" parameter, so I'm closing this ticket now... ** Changed in: qemu Status: New => Invalid -- You received this bug notif

[Qemu-devel] [Bug 1034423] Re: Guests running OpenIndiana (and relatives) fail to boot on AMD hardware

2017-05-19 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU (currently v2.9)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launc

[Qemu-devel] [PATCH v2 2/4] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-19 Thread Stefan Hajnoczi
Calling aio_poll() directly may have been fine previously, but this is the future, man! The difference between an aio_poll() loop and BDRV_POLL_WHILE() is that BDRV_POLL_WHILE() releases the AioContext around aio_poll(). This allows the IOThread to run fd handlers or BHs to complete the request.

Re: [Qemu-devel] [RFC v5 4/4] hw/intc/arm_gicv3_its: Allow save/restore

2017-05-19 Thread Shannon Zhao
On 2017/4/14 20:46, Eric Auger wrote: > We change the restoration priority of both the GICv3 and ITS. The > GICv3 must be restored before the ITS and the ITS needs to be restored > before PCIe devices since it translates their MSI transactions. > > Signed-off-by: Eric Auger > Reviewed-by: Juan

Re: [Qemu-devel] [PATCH] i386: fix read/write cr with icount option

2017-05-19 Thread Mihail Abakumov
Paolo Bonzini писал 2017-05-19 12:59: On 19/05/2017 11:36, Mihail Abakumov wrote: Running Windows with icount causes a crash in instruction of write cr. This patch fixes it. Reading and writing cr cause an icount read because there are called cpu_get_apic_tpr and cpu_set_apic_tpr functions. So,

[Qemu-devel] [Bug 1198350] Re: USB pass-through fails with USBDEVFS_DISCONNECT: Invalid argument

2017-05-19 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU (currently v2.9)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launc

[Qemu-devel] [Bug 1511887] Re: USB device 1.1 not correctly passedthru from Linux host to Windows guest

2017-05-19 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU (currently v2.9)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launc

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2017-05-19 Thread Thomas Huth
If I get the previous comments right, this is just about using the right configuration, and not a real bug? If so, I assume we can close this ticket nowadays? ** Changed in: qemu Status: Confirmed => Incomplete -- You received this bug notification because you are a member of qemu- devel-

[Qemu-devel] [Bug 1255303] Re: ALSA underruns occurr when using QEMU

2017-05-19 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU (currently v2.9)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launc

Re: [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams

2017-05-19 Thread Markus Armbruster
Juan Quintela writes: > We have change in the previous patch to use migration capabilities for > it. Notice that we continue using the old command line flags from > migrate command from the time being. Remove the set_params method as > now it is empty. > > For savevm, one can't do a: > > savevm

[Qemu-devel] [PATCH 00/21] s390x changes

2017-05-19 Thread Cornelia Huck
Hi, here's a fairly large s390x update for which I plan to send a pull request next week. The biggest part is the introduction of the new vfio-ccw support to passthrough ccw devices (kernel part has been merged as of 4.12-rc1). There's also some changes to allow the ccw bios to boot from scsi gen

[Qemu-devel] [PATCH 02/21] pc-bios/s390-ccw: Move SCSI block factor to outer read

2017-05-19 Thread Cornelia Huck
From: Eric Farman Simple refactoring so that the blk_factor adjustment is moved into virtio_scsi_read_many routine, in preparation for another change. Signed-off-by: Eric Farman Message-Id: <20170510155359.32727-3-far...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw/vi

[Qemu-devel] [PATCH 03/21] pc-bios/s390-ccw: Break up virtio-scsi read into multiples

2017-05-19 Thread Cornelia Huck
From: Eric Farman A virtio-scsi request that goes through the host sd driver and exceeds the maximum transfer size is automatically broken up for us. But the equivalent request going to the sg driver presumes that any length requirements have already been honored. Let's use the max_sectors fiel

[Qemu-devel] [PATCH 07/21] pc-bios/s390-ccw: Build a reasonable max_sectors limit

2017-05-19 Thread Cornelia Huck
From: Eric Farman Now that we've read all the possible limits that have been defined for a virtio-scsi controller and the disk we're booting from, it's possible that we are STILL going to exceed the limits of the host device. For example, a "-device scsi-generic" device does not support the Block

[Qemu-devel] [PATCH 12/21] s390x/css: realize css_create_sch

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi The S390 virtual css support already has a mechanism to create a virtual subchannel and provide it to the guest. However, to pass-through subchannels to a guest, we need to introduce a new mechanism to create the subchannel according to the real device information. Thus we reco

[Qemu-devel] [PATCH 01/21] pc-bios/s390-ccw: Remove duplicate blk_factor adjustment

2017-05-19 Thread Cornelia Huck
From: Eric Farman When using virtio-scsi, we multiply the READ(10) data_size by a block factor twice when building the I/O. This is fine, since it's only 1 for SCSI disks, but let's clean it up. Signed-off-by: Eric Farman Reviewed-by: Christian Borntraeger Message-Id: <20170510155359.32727-2-

[Qemu-devel] [PATCH 06/21] pc-bios/s390-ccw: Get Block Limits VPD device data

2017-05-19 Thread Cornelia Huck
From: Eric Farman The "Block Limits" Inquiry VPD page is optional for any SCSI device, but if it's supported it provides a hint of the maximum I/O transfer length for this particular device. If this page is supported by the disk, let's issue that Inquiry and use the minimum of it and the SCSI con

[Qemu-devel] [PATCH 15/21] vfio/ccw: get io region info

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi vfio-ccw provides an MMIO region for I/O operations. We fetch its information via ioctls here, then we can use it performing I/O instructions and retrieving I/O results later on. Reviewed-by: Eric Auger Acked-by: Alex Williamson Signed-off-by: Dong Jia Shi Message-Id: <2017

[Qemu-devel] [PATCH 04/21] pc-bios/s390-ccw: Refactor scsi_inquiry function

2017-05-19 Thread Cornelia Huck
From: Eric Farman If we want to issue any of the SCSI Inquiry EVPD pages, which we do, we could use this function to issue both types of commands with a little bit of refactoring. Signed-off-by: Eric Farman Message-Id: <20170510155359.32727-5-far...@linux.vnet.ibm.com> Signed-off-by: Cornelia H

[Qemu-devel] [PATCH 14/21] vfio/ccw: vfio based subchannel passthrough driver

2017-05-19 Thread Cornelia Huck
From: Xiao Feng Ren We use the IOMMU_TYPE1 of VFIO to realize the subchannels passthrough, implement a vfio based subchannels passthrough driver called "vfio-ccw". Support qemu parameters in the style of: "-device vfio-ccw,sysfsdev=$mdev_file_path,devno=xx.x.' Reviewed-by: Eric Auger Acked

[Qemu-devel] [PATCH 05/21] pc-bios/s390-ccw: Get list of supported VPD pages

2017-05-19 Thread Cornelia Huck
From: Eric Farman The "Supported Pages" Inquiry EVPD page is mandatory for all SCSI devices, and is used as a gateway for what VPD pages the device actually supports. Let's issue this Inquiry, and dump that list with the debug facility. Signed-off-by: Eric Farman Message-Id: <20170510155359.327

[Qemu-devel] [PATCH 13/21] s390x/css: device support for s390-ccw passthrough

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi In order to support subchannels pass-through, we introduce a s390 subchannel device called "s390-ccw" to hold the real subchannel info. The s390-ccw devices inherit from the abstract CcwDevice which connect to the existing virtual-css-bus. Reviewed-by: Eric Auger Signed-off-b

[Qemu-devel] [PATCH 11/21] s390x/css: realize css_sch_build_schib

2017-05-19 Thread Cornelia Huck
From: Xiao Feng Ren The S390 virtual css support already has a mechanism to build a virtual subchannel information block (schib) and provide virtual subchannels to the guest. However, to pass-through subchannels to a guest, we need to introduce a new mechanism to build its schib according to the

[Qemu-devel] [PATCH 18/21] s390x/css: ccw translation infrastructure

2017-05-19 Thread Cornelia Huck
From: Xiao Feng Ren Implement a basic infrastructure of handling channel I/O instruction interception for passed through subchannels: 1. Branch the code path of instruction interception handling by SubChannel type. 2. For a passed-through subchannel, issue the ORB to kernel to do ccw transl

[Qemu-devel] [PATCH 08/21] pc-bios/s390-ccw.img: rebuild image

2017-05-19 Thread Cornelia Huck
From: Eric Farman Contains the following commits: - pc-bios/s390-ccw: Remove duplicate blk_factor adjustment - pc-bios/s390-ccw: Move SCSI block factor to outer read - pc-bios/s390-ccw: Break up virtio-scsi read into multiples - pc-bios/s390-ccw: Refactor scsi_inquiry function - pc-bios/s390-ccw:

[Qemu-devel] [PATCH 20/21] MAINTAINERS: Add vfio-ccw maintainer

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi Add Cornelia Huck as the vfio-ccw maintainer. Acked-by: Alex Williamson Signed-off-by: Dong Jia Shi Message-Id: <20170517004813.58227-14-bjsdj...@linux.vnet.ibm.com> [CH: add tree] Signed-off-by: Cornelia Huck --- MAINTAINERS | 8 1 file changed, 8 insertions(+)

[Qemu-devel] [PATCH 16/21] vfio/ccw: get irqs info and set the eventfd fd

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi vfio-ccw resorts to the eventfd mechanism to communicate with userspace. We fetch the irqs info via the ioctl VFIO_DEVICE_GET_IRQ_INFO, register a event notifier to get the eventfd fd which is sent to kernel via the ioctl VFIO_DEVICE_SET_IRQS, then we can implement read operati

[Qemu-devel] [PATCH 09/21] linux-headers: update

2017-05-19 Thread Cornelia Huck
Update against Linux v4.12-rc1. Also include the new vfio_ccw.h header. Signed-off-by: Cornelia Huck --- include/standard-headers/asm-x86/hyperv.h | 7 +- include/standard-headers/linux/input-event-codes.h | 1 + include/standard-headers/linux/input.h | 11 +--- i

[Qemu-devel] [PATCH 19/21] vfio/ccw: update sense data if a unit check is pending

2017-05-19 Thread Cornelia Huck
From: Dong Jia Shi Concurrent-sense data is currently not delivered. This patch stores the concurrent-sense data to the subchannel if a unit check is pending and the concurrent-sense bit is enabled. Then a TSCH can retreive the right IRB data back to the guest. Acked-by: Alex Williamson Signed-

[Qemu-devel] [PATCH 21/21] s390/kvm: do not reset riccb on initial cpu reset

2017-05-19 Thread Cornelia Huck
From: Christian Borntraeger The riccb is kept unchanged during initial cpu reset. Move the data structure to the other registers that are unchanged. Signed-off-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- target/s390x/cpu.c | 7 --- target/s390x/cpu.h | 6 -- 2 files cha

[Qemu-devel] [PATCH 10/21] s390x/css: add s390-squash-mcss machine option

2017-05-19 Thread Cornelia Huck
From: Xiao Feng Ren We want to support real (i.e. not virtual) channel devices even for guests that do not support MCSS-E (where guests may see devices from any channel subsystem image at once). As all virtio-ccw devices are in css 0xfe (and show up in the default css 0 for guests not activating

[Qemu-devel] [PATCH 17/21] s390x/css: introduce and realize ccw-request callback

2017-05-19 Thread Cornelia Huck
From: Xiao Feng Ren Introduce a new callback on subchannel to handle ccw-request. Realize the callback in vfio-ccw device. Besides, resort to the event notifier handler to handling the ccw-request results. 1. Pread the I/O results via MMIO region. 2. Update the scsw info to guest. 3. Inject an I/

Re: [Qemu-devel] [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI

2017-05-19 Thread Anthony PERARD
On Thu, May 18, 2017 at 01:32:59AM -0400, Lan Tianyu wrote: > From: Chao Gao > > If a vIOMMU is exposed to guest, guest will configure the msi to remapping > format. The original code isn't suitable to the new format. A new pair > bind/unbind interfaces are added for this usage. This patch recogn

Re: [Qemu-devel] [Qemu-ppc] [RESEND PATCH v10 1/5] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-19 Thread Daniel Henrique Barboza
On 05/19/2017 01:26 AM, David Gibson wrote: On Thu, May 18, 2017 at 06:54:12PM -0300, Daniel Henrique Barboza wrote: The LMB DRC release callback, spapr_lmb_release(), uses an opaque parameter, a sPAPRDIMMState struct that stores the current LMBs that are allocated to a DIMM (nr_lmbs). After e

[Qemu-devel] old_vm_running boolean variable

2017-05-19 Thread ali saeedi
Hello What is the role of "old_vm_running" variable in migration_thread? thanks a lot

[Qemu-devel] [PULL 03/20] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386

2017-05-19 Thread Paolo Bonzini
From: Xiao Guangrong Any tick policy specified on other platforms rather on TARGET_I386 will fall back to LOST_TICK_POLICY_DISCARD silently, this patch makes sure only TARGET_I386 can enable LOST_TICK_POLICY_SLEW After that, we can enable LOST_TICK_POLICY_SLEW in the common code which need not u

[Qemu-devel] [PULL 02/20] mc146818rtc: precisely count the clock for periodic timer

2017-05-19 Thread Paolo Bonzini
From: Tai Yunfang There are two issues in current code: 1) If the period is changed by re-configuring RegA, the coalesced irq will be scaled to reflect the new period, however, it calculates the new interrupt number like this: s->irq_coalesced = (s->irq_coalesced * s->period) / period;

  1   2   3   >