Re: [Qemu-devel] [PATCH v3 17/19] target-i386: fix apic object leak when CPU is deleted

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 13, 2016 at 05:46:25PM +0200, Igor Mammedov wrote: > On Wed, 13 Jul 2016 17:26:18 +0200 > Igor Mammedov wrote: > > > On Wed, 13 Jul 2016 12:04:44 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Jul 06, 2016 at 08:20:53AM +0200, Igor

Re: [Qemu-devel] [PATCH] qom: add option -dt-printf wich writes DeviceClass hierarchy in file

2016-07-13 Thread Andreas Färber
Am 13.07.2016 um 17:30 schrieb goremykin: > Andreas Färber писал 2016-07-12 18:41: >> Am 12.07.2016 um 17:33 schrieb goremy...@ispras.ru: >>> From: goremykin >>> >>> Option -dt-printf 'file' writes Device Tree (DiveceClass hierarchy) to >>> 'file' using Json format. This

[Qemu-devel] tests/ide-test hangs with gthread

2016-07-13 Thread Marc-André Lureau
Hi, Since 4840f10 "memory: let address_space_rw/ld*/st* run outside the BQL", the ide-test /x86_64/ide/bmdma/no_busmaster hangs when qemu is compiled with gthread coroutine . Is this a known issue? (fwiw, running the test alone also crashes, with -p /x86_64/ide/bmdma/no_busmaster, lacking

Re: [Qemu-devel] [PATCH] qom: add option -dt-printf wich writes DeviceClass hierarchy in file

2016-07-13 Thread Peter Maydell
On 13 July 2016 at 16:30, goremykin wrote: > We are developing automatic boards and device templates creation tools. It > would be better if I get DeviceClass hierarchy without QEMU running, but > it's unachievable due to implementation of QEMU device registration. > External

Re: [Qemu-devel] [RFC 02/13] migration: Allow the migrate command to work on file: urls

2016-07-13 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Usage: > (qemu) migrate file:/path/to/vm_statefile > > Signed-off-by: zhanghailiang > Signed-off-by: Benoit Canet > --- > - With this patch, we can easily test memory snapshot > -

Re: [Qemu-devel] [PATCH v3 18/19] target-i386: add x86_cpu_unrealizefn()

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 11:59:29 -0300 Eduardo Habkost wrote: > On Wed, Jul 06, 2016 at 08:20:54AM +0200, Igor Mammedov wrote: > > first remove VCPU from exec loop and only then remove lapic. > > > > Signed-off-by: Chen Fan > > Signed-off-by: Gu

Re: [Qemu-devel] [PATCH v3 17/19] target-i386: fix apic object leak when CPU is deleted

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 17:26:18 +0200 Igor Mammedov wrote: > On Wed, 13 Jul 2016 12:04:44 -0300 > Eduardo Habkost wrote: > > > On Wed, Jul 06, 2016 at 08:20:53AM +0200, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > >

Re: [Qemu-devel] [PATCH] qom: add option -dt-printf wich writes DeviceClass hierarchy in file

2016-07-13 Thread goremykin
Andreas Färber писал 2016-07-12 18:41: Am 12.07.2016 um 17:33 schrieb goremy...@ispras.ru: From: goremykin Option -dt-printf 'file' writes Device Tree (DiveceClass hierarchy) to 'file' using Json format. This helps developers visualize the hierarchy of DeviceClass

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.

2016-07-13 Thread Richard Henderson
On 07/13/2016 05:35 AM, Michael Rolnik wrote: > a. a helper function sets a flag within env ... and exits the cpu loop. > b. cpu_get_tb_cpu_state introduces this flag, though tb.flags, for code > generation by gen_intermediate_code > c. the code is generated Yep. > d. the flag remains to be

Re: [Qemu-devel] [PATCH v3 17/19] target-i386: fix apic object leak when CPU is deleted

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 12:04:44 -0300 Eduardo Habkost wrote: > On Wed, Jul 06, 2016 at 08:20:53AM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2016-07-13 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 2.0.0+dfsg-2ubuntu1.25 --- qemu (2.0.0+dfsg-2ubuntu1.25) trusty; urgency=medium [Kai Storbeck] * backport patch to fix guest hangs after live migration (LP: #1297218) -- Serge Hallyn Fri, 01 Jul 2016 14:25:20

[Qemu-devel] [Bug 1297218] Update Released

2016-07-13 Thread Chris J Arges
The verification of the Stable Release Update for qemu has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a

Re: [Qemu-devel] [PATCH v3 18/19] target-i386: add x86_cpu_unrealizefn()

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 06, 2016 at 08:20:54AM +0200, Igor Mammedov wrote: > first remove VCPU from exec loop and only then remove lapic. > > Signed-off-by: Chen Fan > Signed-off-by: Gu Zheng > Signed-off-by: Zhu Guihua >

Re: [Qemu-devel] [PATCH v3 17/19] target-i386: fix apic object leak when CPU is deleted

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 06, 2016 at 08:20:53AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > target-i386/cpu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 04c0b79..2fa445d 100644 > --- a/target-i386/cpu.c >

Re: [Qemu-devel] [PATCH v3 07/19] pc: set APIC ID based on socket/core/thread ids if it's not been set yet

2016-07-13 Thread Igor Mammedov
On Mon, 11 Jul 2016 23:48:27 -0300 Eduardo Habkost wrote: > On Wed, Jul 06, 2016 at 08:20:43AM +0200, Igor Mammedov wrote: > > CPU added with device_add help won't have APIC ID set, > > so set it according to socket/core/thread ids provided > > with device_add command. > >

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Penyaev
On Wed, Jul 13, 2016 at 1:45 PM, Kevin Wolf wrote: > Am 13.07.2016 um 13:33 hat Roman Penyaev geschrieben: >> Just to be sure that we are on the same page: >> >> 1. We have this commit "linux-aio: Cancel BH if not needed" which >> >>a) introduces performance regression on my

Re: [Qemu-devel] [PATCH v3 16/19] target-i386: cpu: do not ignore error and fix apic parent

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 06, 2016 at 08:20:52AM +0200, Igor Mammedov wrote: > object_property_add_child() silently fails with error that it can't > create duplicate propery 'apic' as we already have 'apic' property > registered for 'apic' feature. As result generic device_realize puts > apic into unattached

Re: [Qemu-devel] [PATCH v3 00/19] pc: add CPU hot-add/hot-remove with device_add/device_del

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 11:27:23 -0300 Eduardo Habkost wrote: > On Wed, Jul 06, 2016 at 08:20:36AM +0200, Igor Mammedov wrote: > > Igor Mammedov (19): > > target-i386: cpu: use uint32_t for X86CPU.apic_id > > pc: add x86_topo_ids_from_apicid() > > pc: extract CPU lookup

Re: [Qemu-devel] [PATCH v3 00/19] pc: add CPU hot-add/hot-remove with device_add/device_del

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 06, 2016 at 08:20:36AM +0200, Igor Mammedov wrote: > Igor Mammedov (19): > target-i386: cpu: use uint32_t for X86CPU.apic_id > pc: add x86_topo_ids_from_apicid() > pc: extract CPU lookup into a separate function > pc: cpu: consolidate apic-id validity checks in

[Qemu-devel] [PATCH v18 1/4] block/gluster: rename [server, volname, image] -> [host, volume, path]

2016-07-13 Thread Prasanna Kumar Kalever
A future patch will add support for multiple gluster servers. Existing terminology is a bit unusual in relation to what names are used by other networked devices, and doesn't map very well to the terminology we expect to use for multiple servers. Therefore, rename the following options: 'server'

Re: [Qemu-devel] [PATCH v5] x86: Set physical address bits based on host

2016-07-13 Thread Eduardo Habkost
On Mon, Jul 11, 2016 at 08:28:46PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add the host-phys-bits boolean property, if true, take phys-bits > from the hosts physical bits value, overriding either the default > or the user specified

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] iotests: Test format probes

2016-07-13 Thread Colin Lord
On 07/12/2016 05:17 PM, John Snow wrote: > > > On 07/11/2016 03:50 PM, Colin Lord wrote: >> Adds a new iotest for testing that the format probing functions work as >> expected. This is done by booting up a vm with a disk image without >> specifying the image format. Then the format is checked

[Qemu-devel] [PATCH v18 2/4] block/gluster: code cleanup

2016-07-13 Thread Prasanna Kumar Kalever
unified coding styles of multiline function arguments and other error functions moved random declarations of structures and other list variables Signed-off-by: Prasanna Kumar Kalever Reviewed-by: Eric Blake Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v18 4/4] block/gluster: add support for multiple gluster servers

2016-07-13 Thread Prasanna Kumar Kalever
This patch adds a way to specify multiple volfile servers to the gluster block backend of QEMU with tcp|rdma transport types and their port numbers. Problem: Currently VM Image on gluster volume is specified like this: file=gluster[+tcp]://host[:port]/testvol/a.img Assuming we have three hosts

[Qemu-devel] [PATCH v18 0/4] block/gluster: add support for multiple gluster servers

2016-07-13 Thread Prasanna Kumar Kalever
This version of patches are rebased on master branch. Prasanna Kumar Kalever (4): block/gluster: rename [server, volname, image] -> [host, volume, path] block/gluster: code cleanup block/gluster: using new qapi schema block/gluster: add support for multiple gluster servers v1: multiple

[Qemu-devel] [PULL 11/14] net: do not use atexit for cleanup

2016-07-13 Thread Paolo Bonzini
This will be necessary in the next patch, which stops using atexit for character devices; without it, vhost-user and the redirector filter will cause a use-after-free. Relying on the ordering of atexit calls is also brittle, even now that both the network and chardev subsystems are using atexit.

Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time

2016-07-13 Thread Eduardo Habkost
On Wed, Jul 13, 2016 at 09:56:25AM +0200, Igor Mammedov wrote: > On Tue, 12 Jul 2016 14:18:22 -0300 > Eduardo Habkost wrote: > > > On Tue, Jul 12, 2016 at 02:48:43PM +0200, Igor Mammedov wrote: > > > On Tue, 12 Jul 2016 00:29:08 -0300 > > > Eduardo Habkost

[Qemu-devel] [PATCH v18 3/4] block/gluster: using new qapi schema

2016-07-13 Thread Prasanna Kumar Kalever
this patch adds 'GlusterServer' related schema in qapi/block-core.json Signed-off-by: Prasanna Kumar Kalever --- block/gluster.c | 89 ++-- qapi/block-core.json | 67 --- 2

[Qemu-devel] [PULL 09/14] tap: use an exit notifier to call down_script

2016-07-13 Thread Paolo Bonzini
From: Marc-André Lureau We would like to move back net_cleanup() at the end of main function, like it used to be until f30dbae63a46f23116715dff8d130c, but minimum tap cleanup is necessary regarless at exit() time. Use an exit notifier to call TAP down_script. If

[Qemu-devel] [PULL 10/14] slirp: use exit notifier for slirp_smb_cleanup

2016-07-13 Thread Paolo Bonzini
We would like to move back net_cleanup() at the end of main function, like it used to be until f30dbae63a46f23116715dff8d130c, but minimum cleanup is needed regardless at exit() time for slirp's SMB functionality. Use an exit notifier to call slirp_smb_cleanup. If net_cleanup() is called first,

[Qemu-devel] [PULL 02/14] scsi-bus: Use longer sense buffer with scanners

2016-07-13 Thread Paolo Bonzini
From: Jarkko Lavinen Scanners can provide additional sense bytes beyond 18 bytes. VueScan uses 32 bytes alloc length with Request Sense command. Signed-off-by: Jarkko Lavinen Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL v2 33/34] vvfat: Fix qcow write target driver specification

2016-07-13 Thread Kevin Wolf
From: Max Reitz First, bdrv_open_child() expects all options for the child to be prefixed by the child's name (and a separating dot). Second, bdrv_open_child() does not take ownership of the QDict passed to it but only extracts all options for the child, so if a QDict is

Re: [Qemu-devel] [PATCH 0/6] Start a contrib/libvhost-user

2016-07-13 Thread Marc-André Lureau
ping On Sat, Jun 4, 2016 at 11:05 PM, wrote: > From: Marc-André Lureau > > Hi > > vhost-user & virtio are not so simple and evolve regularly. There > isn't a reference code that would help you get started either. And > the backends

[Qemu-devel] [PULL 14/14] hostmem: detect host backend memory is being used properly

2016-07-13 Thread Paolo Bonzini
From: Xiao Guangrong Currently, we use memory_region_is_mapped() to detect if the host backend memory is being used. This works if the memory is directly mapped into guest's address space, however, it is not true for nvdimm as it uses aliased memory region to map

[Qemu-devel] [PULL 08/14] util: Fix MIN_NON_ZERO

2016-07-13 Thread Paolo Bonzini
From: Fam Zheng MIN_NON_ZERO(1, 0) is evaluated to 0. Rewrite the macro to fix it. Reported-by: Miroslav Rezanina Signed-off-by: Fam Zheng Message-Id: <1468306113-847-1-git-send-email-f...@redhat.com> Reviewed-by: Eric Blake

[Qemu-devel] [PULL 12/14] char: do not use atexit cleanup handler

2016-07-13 Thread Paolo Bonzini
From: Marc-André Lureau It turns out qemu is calling exit() in various places from various threads without taking much care of resources state. The atexit() cleanup handlers cannot easily destroy resources that are in use (by the same thread or other). Since

[Qemu-devel] [PULL 07/14] qemu-sockets: use qapi_free_SocketAddress in cleanup

2016-07-13 Thread Paolo Bonzini
From: Marc-André Lureau Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that may leak some linked data. Signed-off-by: Marc-André Lureau Message-Id: <20160706164246.22116-1-marcandre.lur...@redhat.com> Signed-off-by:

[Qemu-devel] [PULL 01/14] scsi-bus: Add SCSI scanner support

2016-07-13 Thread Paolo Bonzini
From: Jarkko Lavinen Add support for missing scanner specific SCSI commands and their xfer lenghts as per ANSI spec section 15. Signed-off-by: Jarkko Lavinen Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 31

[Qemu-devel] [PULL 03/14] Use "-s" instead of "--quiet" to resolve non-fatal build error on FreeBSD.

2016-07-13 Thread Paolo Bonzini
From: Sean Bruno The --quiet argument is not available on all operating systems. Use -s instead to match the rest of the Makefile uses. This fixes a non-fatal error seen on FreeBSD. Reviewed-by: Eric Blake Reviewed-by: Fam Zheng

[Qemu-devel] [PULL 00/14] SCSI, chardev, build fixes for 2016-07-13

2016-07-13 Thread Paolo Bonzini
The following changes since commit a91a4e7d8cfe6ece610aacf7c52738188f5b5cb5: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-07-11 15:08:47 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you

[Qemu-devel] [PULL 13/14] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
From: Xiao Guangrong 'info memdev' crashes QEMU: (qemu) info memdev Unexpected error in parse_str() at qapi/string-input-visitor.c:111: Parameter 'null' expects an int64 value or range It is caused by null uint16List is returned if 'host-nodes' is the

[Qemu-devel] [PULL 05/14] json-streamer: fix double-free on exiting during a parse

2016-07-13 Thread Paolo Bonzini
Now that json-streamer tries not to leak tokens on incomplete parse, the tokens can be freed twice if QEMU destroys the json-streamer object during the parser->emit call. To fix this, create the new empty GQueue earlier, so that it is already in place when the old one is passed to parser->emit.

Re: [Qemu-devel] [PATCH for 2.7 resend] linux-aio: share one LinuxAioState within an AioContext

2016-07-13 Thread Paolo Bonzini
Ping. On 04/07/2016 18:33, Paolo Bonzini wrote: > This has better performance because it executes fewer system calls > and does not use a bottom half per disk. > > Originally proposed by Ming Lei. > > Acked-by: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 06/14] disas: avoid including everything in headers compiled from C++

2016-07-13 Thread Paolo Bonzini
disas/arm-a64.cc is careful to include only the bare minimum that it needs---qemu/osdep.h and disas/bfd.h. Unfortunately, disas/bfd.h then includes qemu-common.h, which brings in qemu/option.h and from there we get the kitchen sink. This causes problems because for example QEMU's atomic macros

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Penyaev
On Wed, Jul 13, 2016 at 2:22 PM, Eric Blake wrote: > On 07/13/2016 01:57 AM, Roman Pen wrote: >> v1..v2: >> >> o comment tweaks. >> o fix QEMU coding style. > > The above comments should be delayed... > >> >> Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer

Re: [Qemu-devel] [PATCH v11 14/28] intel_iommu: Add support for PCI MSI remap

2016-07-13 Thread David Kiarie
On Tue, Jul 5, 2016 at 11:19 AM, Peter Xu wrote: > This patch enables interrupt remapping for PCI devices. > > To play the trick, one memory region "iommu_ir" is added as child region > of the original iommu memory region, covering range 0xfeeX (which is > the address range

[Qemu-devel] [PULL v2 30/34] qemu-iotests: Test naming of throttling groups

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia Throttling groups are named using the 'group' parameter of the block_set_io_throttle command and the throttling.group command-line option. If that parameter is unspecified the groups get the name of the block device. This patch adds a new test to check the

[Qemu-devel] [PULL 04/14] main-loop: check return value before using pointer

2016-07-13 Thread Paolo Bonzini
From: Cao jin pointer 'qemu_aio_context' should be checked first before it is used. qemu_bh_new() will use it. Signed-off-by: Cao jin Message-Id: <1467799740-26079-2-git-send-email-caoj.f...@cn.fujitsu.com> Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL v2 16/34] coroutine: move entry argument to qemu_coroutine_create

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini In practice the entry argument is always known at creation time, and it is confusing that sometimes qemu_coroutine_enter is used with a non-NULL argument to re-enter a coroutine (this happens in block/sheepdog.c and tests/test-coroutine.c). So pass the

[Qemu-devel] [PATCH v3 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Pen
Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us with specified number of events. But kernel ring buffer allocation logic is a bit tricky (ring buffer is page size aligned + some percpu allocation are required) so eventually more than requested events number is allocated.

[Qemu-devel] [PULL v2 28/34] vmdk: fix metadata write regression

2016-07-13 Thread Kevin Wolf
From: Reda Sallahi Commit "cdeaf1f vmdk: add bdrv_co_write_zeroes" causes a regression on writes. It writes metadata after every write instead of doing it only once for each cluster. vmdk_pwritev() writes metadata whenever m_data is set as valid so this patch sets m_data as

[Qemu-devel] [PULL 1/1] Add optionrom compatible with fw_cfg DMA version

2016-07-13 Thread Paolo Bonzini
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> [Add -fno-toplevel-reorder, support clang without -m16.

[Qemu-devel] [PULL v2 34/34] iotests: Make 157 actually format-agnostic

2016-07-13 Thread Kevin Wolf
From: Max Reitz iotest 157 pretends not to care about the image format used, but in fact it does due to the format name not being filtered in its output. This patch adds filtering and changes the reference output accordingly. Signed-off-by: Max Reitz

[Qemu-devel] [PULL v2 31/34] hmp: use snapshot name to determine whether a snapshot is 'fully available'

2016-07-13 Thread Kevin Wolf
From: Lin Ma Currently qemu uses snapshot id to determine whether a snapshot is fully available, It causes incorrect output in some scenario. For instance: (qemu) info block drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2 (qcow2) Cache mode:

[Qemu-devel] [PULL 0/1] updated fw_cfg option ROM 2016-07-13

2016-07-13 Thread Paolo Bonzini
The following changes since commit a91a4e7d8cfe6ece610aacf7c52738188f5b5cb5: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-07-11 15:08:47 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream-fwcfg

[Qemu-devel] [PULL v2 21/34] qemu-iotests: Test setting WCE with qdev

2016-07-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/157 | 88 ++ tests/qemu-iotests/157.out | 22 tests/qemu-iotests/group | 1 + 3 files changed, 111 insertions(+) create

[Qemu-devel] [PULL v2 32/34] hmp: show all of snapshot info on every block dev in output of 'info snapshots'

2016-07-13 Thread Kevin Wolf
From: Lin Ma Currently, the output of 'info snapshots' shows fully available snapshots. It's opaque, hides some snapshot information to users. It's not convenient if users want to know more about all of snapshot information on every block device via monitor. Follow Kevin's and

[Qemu-devel] [PULL v2 23/34] qemu-img: Use strerror() for generic resize error

2016-07-13 Thread Kevin Wolf
From: Max Reitz Emitting the plain error number is not very helpful. Use strerror() instead. Signed-off-by: Max Reitz Message-id: 20160615153630.2116-2-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz

[Qemu-devel] [PULL v2 29/34] blockdev: Fix regression with the default naming of throttling groups

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia When I/O limits are set for a block device, the name of the throttling group is taken from the BlockBackend if the user doesn't specify one. Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in blockdev_init() to the end of the function,

[Qemu-devel] [PULL v2 20/34] block/qdev: Allow configuring rerror/werror with qdev properties

2016-07-13 Thread Kevin Wolf
The rerror/werror policies are implemented in the devices, so that's where they should be configured. In comparison to the old options in -drive, the qdev properties are only added to those devices that actually support them. If the option isn't given (or "auto" is specified), the setting of the

[Qemu-devel] [PULL v2 27/34] Improve block job rate limiting for small bandwidth values

2016-07-13 Thread Kevin Wolf
From: Sascha Silbe ratelimit_calculate_delay() previously reset the accounting every time slice, no matter how much data had been processed before. This had (at least) two consequences: 1. The minimum speed is rather large, e.g. 5 MiB/s for commit and stream. Not

[Qemu-devel] [PULL v2 24/34] qcow2: Avoid making the L1 table too big

2016-07-13 Thread Kevin Wolf
From: Max Reitz We refuse to open images whose L1 table we deem "too big". Consequently, we should not produce such images ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Message-id: 20160615153630.2116-3-mre...@redhat.com Reviewed-by: Eric

[Qemu-devel] [PULL v2 19/34] commit: Fix use of error handling policy

2016-07-13 Thread Kevin Wolf
Commit implemented the 'enospc' policy as 'ignore' if the error was not ENOSPC. The QAPI documentation promises that it's treated as 'stop'. Using the common block job error handling function fixes this and also adds the missing QMP event. Signed-off-by: Kevin Wolf Reviewed-by:

[Qemu-devel] [PULL v2 18/34] block/qdev: Allow configuring WCE with qdev properties

2016-07-13 Thread Kevin Wolf
As cache.writeback is a BlockBackend property and as such more related to the guest device than the BlockDriverState, we already removed it from the blockdev-add interface. This patch adds the new way to set it, as a qdev property of the corresponding guest device. For example: -drive

[Qemu-devel] [PULL v2 09/34] commit: Add 'job-id' parameter to 'block-commit'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'block-commit', allowing the user to specify the ID of the block job to be created. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-devel] [PULL v2 26/34] qcow2: Fix qcow2_get_cluster_offset()

2016-07-13 Thread Kevin Wolf
From: Max Reitz Recently, qcow2_get_cluster_offset() has been changed to work with bytes instead of sectors. This invalidated some assertions and introduced a possible integer multiplication overflow. This could be reproduced using e.g. $ qemu-img create -f qcow2 -o

[Qemu-devel] [PULL v2 22/34] block: Remove BB options from blockdev-add

2016-07-13 Thread Kevin Wolf
werror/rerror are now available as qdev options. The stats-* options are removed without an existing replacement; they should probably be configurable with a separate QMP command like I/O throttling settings. Removing id is left for another day because this involves updating qemu-iotests cases to

[Qemu-devel] [PULL v2 14/34] coroutine: use QSIMPLEQ instead of QTAILQ

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini CoQueue do not need to remove any element but the head of the list; processing is always strictly FIFO. Therefore, the simpler singly-linked QSIMPLEQ can be used instead. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL v2 25/34] qemu-io: Use correct range limitations

2016-07-13 Thread Kevin Wolf
From: Max Reitz create_iovec() has a comment lamenting the lack of SIZE_T_MAX. Since there actually is a SIZE_MAX, use it. Two places use INT_MAX for checking the upper bound of a sector count that is used as an argument for a blk_*() function (blk_discard() and

[Qemu-devel] [PULL v2 07/34] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia

[Qemu-devel] [PULL v2 17/34] block/qdev: Allow node name for drive properties

2016-07-13 Thread Kevin Wolf
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. The order of operations in release_drive() must be reversed in order to avoid a use-after-free bug because now blk_detach_dev() frees the last reference if an

[Qemu-devel] [PULL v2 11/34] blockjob: Update description of the 'device' field in the QMP API

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia The 'device' field in all BLOCK_JOB_* events and 'block-job-*' command is no longer the device name, but the ID of the job. This patch updates the documentation to clarify that. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-devel] [PULL v2 13/34] raw-posix: Use qemu_dup

2016-07-13 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- block/raw-posix.c | 10 +- 1 file

[Qemu-devel] [PULL v2 06/34] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', allowing the user to specify the ID of the block job to be created. The HMP 'drive_mirror' command remains unchanged. Signed-off-by: Alberto Garcia

[Qemu-devel] [PULL v2 12/34] osdep: Introduce qemu_dup

2016-07-13 Thread Kevin Wolf
From: Fam Zheng And use it in qemu_dup_flags. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- include/qemu/osdep.h | 3 +++ util/osdep.c |

[Qemu-devel] [PULL v2 15/34] test-coroutine: prepare for the next patch

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini The next patch moves the coroutine argument from first-enter to creation time. In this case, coroutine has not been initialized yet when the coroutine is created, so change to a pointer. Signed-off-by: Paolo Bonzini Reviewed-by:

[Qemu-devel] [PULL v2 01/34] stream: Fix prototype of stream_start()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia 'stream-start' has a parameter called 'backing-file', which is the string to be written to bs->backing when the job finishes. In the stream_start() implementation it is called 'backing_file_str', but it the prototype in the header file it is called

[Qemu-devel] [PULL v2 10/34] qemu-img: Set the ID of the block job in img_commit()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia img_commit() creates a block job without an ID. This is no longer allowed now that we require it to be unique and well-formed. We were solving this by having a fallback in block_job_create(), but now that we extended the API of commit_active_start() we can

[Qemu-devel] [PULL v2 05/34] blockjob: Add 'job_id' parameter to block_job_create()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia When a new job is created, the job ID is taken from the device name of the BDS. This patch adds a new 'job_id' parameter to let the caller provide one instead. This patch also verifies that the ID is always unique and well-formed. This causes problems in a

[Qemu-devel] [PULL v2 08/34] stream: Add 'job-id' parameter to 'block-stream'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'block-stream', allowing the user to specify the ID of the block job to be created. The HMP 'block_stream' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin

[Qemu-devel] [PULL v2 00/34] Block layer patches

2016-07-13 Thread Kevin Wolf
The following changes since commit ca3d87d4c84032f19478010b5604cac88b045c25: Merge remote-tracking branch 'remotes/armbru/tags/pull-include-2016-07-12' into staging (2016-07-12 16:04:36 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

[Qemu-devel] [PULL v2 04/34] block: Use block_job_get() in find_block_job()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia find_block_job() looks for a block backend with a specified name, checks whether it has a block job and acquires its AioContext. We want to identify jobs by their ID and not by the block backend they're attached to, so this patch ignores the backends

[Qemu-devel] [PULL v2 02/34] blockjob: Update description of the 'id' field

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia The 'id' field of the BlockJob structure will be able to hold any ID, not only a device name. This patch updates the description of that field and the error messages where it is being used. Soon we'll add the ability to set an arbitrary ID when creating a

[Qemu-devel] [PULL v2 03/34] blockjob: Add block_job_get()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia Currently the way to look for a specific block job is to iterate the list manually using block_job_next(). Since we want to be able to identify a job primarily by its ID it makes sense to have a function that does just that. Signed-off-by: Alberto Garcia

Re: [Qemu-devel] [PATCH] qxl: fix qxl_set_dirty call in qxl_dirty_one_surface

2016-07-13 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > qxl_set_dirty() expects start and end as range specification. > qxl_dirty_one_surface passes 'size' instead of 'offset + size' as end > parameter. Fix that. Also use uint64_t everywhere while being at it. > > Bug was added by "e25139b qxl: set only

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.

2016-07-13 Thread Michael Rolnik
a. a helper function sets a flag within env b. cpu_get_tb_cpu_state introduces this flag, though tb.flags, for code generation by gen_intermediate_code c. the code is generated d. the flag remains to be set within env. Who clear it? On Wed, Jul 13, 2016 at 3:54 AM, Michael Rolnik

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: exit if compat mode is unknown

2016-07-13 Thread Greg Kurz
On Wed, 13 Jul 2016 11:10:21 +0200 Greg Kurz wrote: > Now that properties are set with -global, if we pass a bogus value for > compat mode, a warning is printed and the property is simply ignored. > For example, if the host is POWER8 and we pass compat=POWER7 instead of >

[Qemu-devel] [PATCH] qxl: fix qxl_set_dirty call in qxl_dirty_one_surface

2016-07-13 Thread Gerd Hoffmann
qxl_set_dirty() expects start and end as range specification. qxl_dirty_one_surface passes 'size' instead of 'offset + size' as end parameter. Fix that. Also use uint64_t everywhere while being at it. Bug was added by "e25139b qxl: set only off-screen surfaces dirty instead of the whole vram"

[Qemu-devel] [PATCH] xen: remove xenstore watches of backends when terminating qemu

2016-07-13 Thread Juergen Gross
Xenstore watches of the /local/domain//backend/ directories are never removed. This can lead to a memory leak in xenstored, especially when xenstored is running in another domain (this will be the case either for a system with xenstore-stubdom, or with driver domains running qemu-based backends).

Re: [Qemu-devel] [PATCH v10] Add optionrom compatible with fw_cfg DMA version

2016-07-13 Thread Richard W.M. Jones
Thanks for reposting this Paolo. I tested it by applying it on top of qemu. In libguestfs sources we have a benchmark program called utils/boot-benchmark/boot-benchmark. Using the qemu package from Fedora (qemu-2.6.0-3.fc24.x86_64): $ killall -STOP firefox $ ./boot-benchmark Result:

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Eric Blake
On 07/13/2016 01:57 AM, Roman Pen wrote: > v1..v2: > > o comment tweaks. > o fix QEMU coding style. The above comments should be delayed... > > Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us > with specified number of events. But kernel ring buffer allocation

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Cao jin
On 07/13/2016 07:40 PM, Paolo Bonzini wrote: On 13/07/2016 13:40, Cao jin wrote: On 07/13/2016 06:21 PM, Paolo Bonzini wrote: On 13/07/2016 11:06, Cao jin wrote: When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. It's potentially slower though. Is it because

Re: [Qemu-devel] [PATCH] ppc: abort if compat property contains an unknown value

2016-07-13 Thread Thomas Huth
On 13.07.2016 12:00, Greg Kurz wrote: > It is not possible to set the compat property to an unknown value with > powerpc_set_compat(). Something must have gone terribly wrong in QEMU, > if we detect an "Internal error" in powerpc_get_compat(). Let's abort then. > > This patch also drops the

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Kevin Wolf
Am 13.07.2016 um 13:33 hat Roman Penyaev geschrieben: > Just to be sure that we are on the same page: > > 1. We have this commit "linux-aio: Cancel BH if not needed" which > >a) introduces performance regression on my fio workloads on the > following config: "iothread=1, VCPU=8, MQ=8".

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 13:40, Cao jin wrote: > > > On 07/13/2016 06:21 PM, Paolo Bonzini wrote: >> >> >> On 13/07/2016 11:06, Cao jin wrote: >>> When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. >> >> It's potentially slower though. >> > > Is it because the function in the i/o

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 13:29, Markus Armbruster wrote: >> > I'm curious about one thing. Eric/Markus, it would be nice to open code >> > the visit of the list with >> > >> > visit_start_list(v, name, NULL, 0, ); >> > if (err) { >> > goto out; >> > } >> > ... >> >

[Qemu-devel] [PATCH v4 1/6] block/qdev: Allow node name for drive properties

2016-07-13 Thread Kevin Wolf
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. The order of operations in release_drive() must be reversed in order to avoid a use-after-free bug because now blk_detach_dev() frees the last reference if an

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Penyaev
On Wed, Jul 13, 2016 at 12:31 PM, Paolo Bonzini wrote: > > > On 13/07/2016 09:57, Roman Pen wrote: >> v1..v2: >> >> o comment tweaks. >> o fix QEMU coding style. >> >> Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us >> with specified number of

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Cao jin
On 07/13/2016 06:21 PM, Paolo Bonzini wrote: On 13/07/2016 11:06, Cao jin wrote: When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. It's potentially slower though. Is it because the function in the i/o loop path, so the potentially extra arithmetical instructions

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/07/2016 06:18, Xiao Guangrong wrote: >> >> Return MAX_NODES under this case to fix this bug >> >> Signed-off-by: Xiao Guangrong >> --- >> backends/hostmem.c | 22 ++ >> 1 file changed, 14

<    1   2   3   >