Re: [Qemu-devel] [PATCH 1/2] configure: require glib 2.22

2015-05-22 Thread Alex Bennée
John Snow writes: > This provides g_ptr_array_new_with_free_func, as well as a few > other functions that we've been hacking around in glib-compat.h. > Cleaning up the compatibility headers will come later. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow Reviewed-by: Alex Bennée

Re: [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions

2015-05-22 Thread Alex Bennée
John Snow writes: > Since we're bumping the version to 2.22+, > remove the now-stale compat functions. > > Signed-off-by: John Snow Reviewed-by: Alex Bennée > --- > include/glib-compat.h | 35 --- > 1 file changed, 35 deletions(-) > > diff --git a/include/glib

Re: [Qemu-devel] [libvirt] RFC: exposing qemu's block-set-write-threshold

2015-05-22 Thread Francesco Romani
- Original Message - > From: "Eric Blake" > To: "Francesco Romani" > Cc: libvir-l...@redhat.com, "Nir Soffer" , "Peter Krempa" > , > qemu-devel@nongnu.org > Sent: Friday, May 22, 2015 6:33:01 AM > Subject: Re: [libvirt] RFC: exposing qemu's block-set-write-threshold > > [adding qemu] >

Re: [Qemu-devel] [PATCH v6 3/4] cpu/apic: drop icc bus/bridge

2015-05-22 Thread Chen Fan
On 05/20/2015 10:53 PM, Igor Mammedov wrote: On Wed, 20 May 2015 10:40:48 +0800 Zhu Guihua wrote: From: Chen Fan After CPU hotplug has been converted to BUS-less hot-plug infrastructure, the only function ICC bus performs is to propagate reset to LAPICs. However LAPIC could be reset by its

Re: [Qemu-devel] [PATCH] exec: optimize phys_page_set_level

2015-05-22 Thread Stefan Hajnoczi
On Thu, May 21, 2015 at 03:19:58PM +0200, Paolo Bonzini wrote: > phys_page_set_level is writing zeroes to a struct that has just been > filled in by phys_map_node_alloc. Instead, tell phys_map_node_alloc > whether to fill in the page "as a leaf" or "as a non-leaf". > > memcpy is faster than struc

Re: [Qemu-devel] [PATCH 04/10] target-tricore: add CMPSWP instructions of the v1.6.1 ISA

2015-05-22 Thread Bastian Koppelmann
On 05/21/2015 07:22 PM, Richard Henderson wrote: On 05/13/2015 02:45 AM, Bastian Koppelmann wrote: Those instruction were introduced in the new Aurix platform. Signed-off-by: Bastian Koppelmann I can't really review this, because I can only find the v1.6 isa. That said, the code for gen_cmp

Re: [Qemu-devel] [PATCH 08/10] target-tricore: add FCALL instructions of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
On 05/21/2015 07:28 PM, Richard Henderson wrote: On 05/13/2015 02:45 AM, Bastian Koppelmann wrote: +static void gen_fcall_save_ctx(DisasContext *ctx) +{ +tcg_gen_addi_tl(cpu_gpr_a[10], cpu_gpr_a[10], -4); +tcg_gen_qemu_st_tl(cpu_gpr_a[11], cpu_gpr_a[10], ctx->mem_idx, MO_LESL); +tc

Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status

2015-05-22 Thread Kevin Wolf
Am 21.05.2015 um 23:48 hat John Snow geschrieben: > > > On 05/20/2015 04:20 AM, Markus Armbruster wrote: > > John Snow writes: > > > >> On 05/12/2015 04:06 PM, Eric Blake wrote: > >>> On 05/12/2015 01:53 PM, John Snow wrote: > Bitmaps can be in a handful of different states with potentiall

[Qemu-devel] [PATCH v2 10/10] target-tricore: add RR_DIV and RR_DIV_U instructions of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/helper.h | 2 ++ target-tricore/op_helper.c | 49 target-tricore/translate.c | 21 + target-tricore/tricore-opcodes.h | 2 ++ 4 file

[Qemu-devel] [PATCH v2 01/10] target-tricore: Add ISA v1.3.1 cpu and fix tc1796 to using v1.3

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/target-tricore/cpu.c b/target-tricore/cpu.c index 2ba0cf4..9fe0b97 100644 --- a/target-tricore/cpu.c +++ b/target-tricore/cpu.c @@ -118,6 +118,13

[Qemu-devel] [PATCH v2 03/10] target-tricore: Add SRC_MOV_E instruction of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 663b2a0..1c37e48 100644 --- a/target-tricore/translate.c +

[Qemu-devel] [PATCH v2 08/10] target-tricore: add FCALL instructions of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- v1 -> v2: - gen_fcall_save_ctx now uses a temp for the a[10] register, so this does not get updated if the store traps. target-tricore/translate.c | 26 ++ target-tricore/tricore-opcodes.h | 3 +++ 2 files changed, 2

[Qemu-devel] [PATCH v2 02/10] target-tricore: introduce ISA v1.6.1 feature

2015-05-22 Thread Bastian Koppelmann
The aurix platform contains of several different cpu models and uses the 1.6.1 ISA. This patch changes the generic aurix model to the more specific tc27x cpu model and sets specific features. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/cpu.c | 10 +++-

[Qemu-devel] [PATCH v2 00/10] TriCore v1.6.1 ISA and missing v1.6 instructions

2015-05-22 Thread Bastian Koppelmann
Hi, the new Aurix platform introduces a new ISA version, so this patchset adds a new feature bit and changes the generic Aurix cpu to a more specific tc27x cpu model. While at this, it introduces a new cpu model tc1797 which uses the v1.3.1 ISA and fixes the tc1796 to us the v1.3 ISA. It also add

[Qemu-devel] [PATCH v2 05/10] target-tricore: add SWAPMSK instructions of the v1.6.1 ISA

2015-05-22 Thread Bastian Koppelmann
Those instruction were introduced in the new Aurix platform. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 39 +++ target-tricore/tricore-opcodes.h | 5 + 2 files changed, 44 insertions(+) diff -

[Qemu-devel] [PATCH v2 09/10] target-tricore: add FRET instructions of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- v1 -> v2: - gen_fret uses a temp now, so the PC does not get updated if the load traps. target-tricore/translate.c | 19 +++ target-tricore/tricore-opcodes.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/target-tricore/tr

[Qemu-devel] [PATCH v2 06/10] target-tricore: add RR_CRC32 instruction of the v1.6.1 ISA

2015-05-22 Thread Bastian Koppelmann
This instruction was introduced by the new Aurix platform. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/helper.h | 2 ++ target-tricore/op_helper.c | 11 +++ target-tricore/translate.c | 5 + target-tricore/tricore-opcode

[Qemu-devel] [PATCH v2 07/10] target-tricore: add SYS_RESTORE instruction of the v1.6 ISA

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 10 ++ target-tricore/tricore-opcodes.h | 1 + 2 files changed, 11 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 52f474b..4aea0c6 100644 --

[Qemu-devel] [PATCH v2 04/10] target-tricore: add CMPSWP instructions of the v1.6.1 ISA

2015-05-22 Thread Bastian Koppelmann
Those instruction were introduced in the new Aurix platform. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 35 +++ target-tricore/tricore-opcodes.h | 5 + 2 files changed, 40 insertions(+) diff --git

Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status

2015-05-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.05.2015 um 23:48 hat John Snow geschrieben: >> >> >> On 05/20/2015 04:20 AM, Markus Armbruster wrote: >> > John Snow writes: >> > >> >> On 05/12/2015 04:06 PM, Eric Blake wrote: >> >>> On 05/12/2015 01:53 PM, John Snow wrote: >> Bitmaps can be in a handful of d

Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status

2015-05-22 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 01:53 PM, John Snow wrote: >> Bitmaps can be in a handful of different states with potentially >> more to come as we tool around with migration and persistence patches. >> >> Instead of having a bunch of boolean fields, it was suggested that we >> just have an

[Qemu-devel] [PULL 02/38] block/parallels: rename parallels_header to ParallelsHeader

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" this follows QEMU coding convention Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Message-id: 1430207220-24458-3-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/parallels.c | 8 1 fi

[Qemu-devel] [PULL 05/38] block/parallels: add get_block_status

2015-05-22 Thread Stefan Hajnoczi
From: Roman Kagan Implement VFS method for get_block_status to Parallels format driver. qemu_co_mutex_lock is not necessary yet (the driver is read-only) but will be necessary very soon when write will be supported. Signed-off-by: Roman Kagan Reviewed-by: Denis V. Lunev Signed-off-by: Denis V

[Qemu-devel] [PULL 01/38] iotests, parallels: quote TEST_IMG in 076 test to be path-safe

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" suggested by Jeff Cody Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Message-id: 1430207220-24458-2-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/076 | 10 +- 1 file ch

[Qemu-devel] [PULL 00/38] Block patches

2015-05-22 Thread Stefan Hajnoczi
The following changes since commit 9e549d36e989b14423279fb991b71728a2a4ae7c: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150520-1' into staging (2015-05-21 09:07:19 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request fo

[Qemu-devel] [PULL 03/38] block/parallels: switch to bdrv_read

2015-05-22 Thread Stefan Hajnoczi
From: Roman Kagan Switch the .bdrv_read method implementation from using bdrv_pread() to bdrv_read() on the underlying file, since the latter is subject to i/o throttling while the former is not. Besides, since bdrv_read() operates in sectors rather than bytes, adjust the helper functions to do

[Qemu-devel] [PULL 06/38] block/parallels: provide _co_readv routine for parallels format driver

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Main approach is taken from qcow2_co_readv. The patch drops coroutine lock for the duration of IO operation and peforms normal scatter-gather IO using standard QEMU backend. The patch also adds comment about locking considerations in the driver. Signed-off-by: Denis V. L

[Qemu-devel] [PULL 16/38] block/parallels: keep BAT bitmap data in little endian in memory

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" This will allow to use this data as buffer to BAT update directly without any intermediate buffers. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-17-git-send-email-...@openvz.

[Qemu-devel] [PULL 08/38] block/parallels: mark parallels format driver as zero inited

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" >From the guest point of view unallocated blocks are zeroed. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Signed-off-by: Roman Kagan Message-id: 1430207220-24458-9-git-send-email-...@openvz.org CC: Roman Kagan CC: Kevin Wolf CC: Stefan Hajnoczi Signed-off-b

[Qemu-devel] [PULL 09/38] block/parallels: _co_writev callback for Parallels format

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Support write on Parallels images. The code is almost the same as one in the previous patch implemented scatter-gather IO for read. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Signed-off-by: Roman Kagan Message-id: 1430207220-24458-10-git-send-email-...@openv

[Qemu-devel] [PULL 24/38] block/parallels: delay writing to BAT till bdrv_co_flush_to_os

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The idea is that we do not need to immediately sync BAT to the image as from the guest point of view there is a possibility that IO is lost even in the physical controller until flush command was finished. bdrv_co_flush_to_os is exactly the right place for this purpose. Te

[Qemu-devel] [PULL 04/38] block/parallels: read up to cluster end in one go

2015-05-22 Thread Stefan Hajnoczi
From: Roman Kagan Teach parallels_read() to do reads in coarser granularity than just a single sector: if requested, read up to the cluster end in one go. Signed-off-by: Roman Kagan Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Message-id: 1430207220-

[Qemu-devel] [PULL 07/38] block/parallels: replace magic constants 4, 64 with proper sizeofs

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" simple purification.. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-8-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/parallels.c | 8

[Qemu-devel] [PULL 10/38] iotests, parallels: test for write into Parallels image

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-11-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/076 | 5 + tests

[Qemu-devel] [PULL 23/38] block/parallels: create bat_entry_off helper

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" calculate offset of the BAT entry in the image file. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-24-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajno

[Qemu-devel] [PULL 12/38] iotests, parallels: test for newly created parallels image via qemu-img

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-13-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/131 | 68

[Qemu-devel] [PULL 11/38] block/parallels: support parallels image creation

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Do not even care to create WithoutFreeSpace image, it is obsolete. Always create WithouFreSpacExt one. The code also does not spend a lot of efforts to fill cylinders and heads fields, they are not used actually in a real life neither in QEMU nor in Parallels products. Si

[Qemu-devel] [PULL 25/38] block/parallels: add prealloc-mode and prealloc-size open paramemets

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" This is preparational commit for tweaks in Parallels image expansion. The idea is that enlarge via truncate by one data block is slow. It would be much better to use fallocate via bdrv_write_zeroes and expand by some significant amount at once. Original idea with sequentia

[Qemu-devel] [PULL 13/38] parallels: change copyright information in the image header

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-14-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/parallels.c | 6 +- 1 file changed

[Qemu-devel] [PULL 20/38] block/parallels: implement incorrect close detection

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The software driver must set inuse field in Parallels header to 0x746F6E59 when the image is opened in read-write mode. The presence of this magic in the header on open forces image consistency check. There is an unfortunate trick here. We can not check for inuse in parall

[Qemu-devel] [PULL 15/38] block/parallels: create bat2sect helper

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" deduplicate copy/paste arithmetcs Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-16-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/par

[Qemu-devel] [PULL 22/38] block/parallels: improve image reading performance

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Try to perform IO for the biggest continuous block possible. The performance for sequential read is increased from 220 Mb/sec to 360 Mb/sec for continous image on my SSD HDD. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-

[Qemu-devel] [PULL 31/38] configure: Add workaround for ccache and clang

2015-05-22 Thread Stefan Hajnoczi
From: John Snow Test if ccache is interfering with semantic analysis of macros, disable its habit of trying to compile already pre-processed versions of code if so. ccache attempts to save time by compiling pre-processed versions of code, but this disturbs clang's static analysis enough to produc

[Qemu-devel] [PULL 14/38] block/parallels: rename catalog_ names to bat_

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" BAT means 'block allocation table'. Thus this name is clean and shorter on writing. Some obvious formatting fixes in the old code were made to make checkpatch happy. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roma

[Qemu-devel] [PULL 17/38] block/parallels: read parallels image header and BAT into single buffer

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" This metadata cache would allow to properly batch BAT updates to disk in next patches. These updates will be properly aligned to avoid read-modify-write transactions on block level. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Sign

[Qemu-devel] [PULL 34/38] block: align bounce buffers to page

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i < 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096 bytes. The difference is quite reliable. On the other hand we do not want

[Qemu-devel] [PULL 26/38] block/parallels: optimize linear image expansion

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Plain image expansion spends a lot of time to update image file size. This seriously affects the performance. The following simple test qemu_img create -f parallels -o cluster_size=64k ./1.hds 64G qemu_io -n -c "write -P 0x11 0 1024M" ./1.hds could be improved if the fo

[Qemu-devel] [PULL 18/38] block/parallels: move parallels_open/probe to the very end of the file

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" This will help to avoid forward declarations for upcoming parallels_check Some very obvious formatting fixes were made to the moved code to make checkpatch happy. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman K

[Qemu-devel] [PULL 36/38] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-22 Thread Stefan Hajnoczi
From: Fam Zheng For zero write, callers pass in NULL qiov (qemu-io "write -z" or scsi-disk "write same"). Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler fix would be in bdrv_co_do_pwritev which is the NU

[Qemu-devel] [PULL 19/38] block/parallels: implement parallels_check method of block driver

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The check is very simple at the moment. It calculates necessary stats and fix only the following errors: - space leak at the end of the image. This would happens due to preallocation - clusters outside the image are zeroed. Nothing else could be done here Signed-off-by:

[Qemu-devel] [PULL 28/38] configure: handle clang -nopie argument warning

2015-05-22 Thread Stefan Hajnoczi
gcc 4.9.2 treats -nopie as an error: cc: error: unrecognized command line option ‘-nopie’ clang 3.5.0 treats -nopie as a warning: clang: warning: argument unused during compilation: '-nopie' The causes ./configure to fail with clang: ERROR: configure test passed without -Werror but faile

[Qemu-devel] [PULL 21/38] iotests, parallels: check for incorrectly closed image in tests

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Reviewed-by: Stefan Hajnoczi Signed-off-by: Roman Kagan Message-id: 1430207220-24458-22-git-send-email-...@openvz.org CC: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/131 | 9 + t

Re: [Qemu-devel] [PATCH 06/10] crypto: add a nettle cipher implementation

2015-05-22 Thread Daniel P. Berrange
On Thu, May 21, 2015 at 12:38:01PM -0700, Richard Henderson wrote: > On 05/21/2015 03:56 AM, Daniel P. Berrange wrote: > > +static uint8_t *qcrypto_cipher_munge_des_rfb_key(const uint8_t *key, > > + size_t nkey) > > +{ > > +uint8_t *ret = g_new0(u

[Qemu-devel] [PULL 29/38] configure: factor out supported flag check

2015-05-22 Thread Stefan Hajnoczi
From: John Snow Factor out the function that checks if a compiler flag is supported or not. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1427324259-1481-3-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- configure | 33 +++--

[Qemu-devel] [PULL 27/38] block/parallels: improve image writing performance further

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Try to perform IO for the biggest continuous block possible. All blocks abscent in the image are accounted in the same type and preallocation is made for all of them at once. The performance for sequential write is increased from 200 Mb/sec to 235 Mb/sec on my SSD HDD. Si

[Qemu-devel] [PULL 30/38] configure: silence glib unknown attribute __alloc_size__

2015-05-22 Thread Stefan Hajnoczi
From: John Snow The glib headers use GCC attributes. Unfortunately the __GNUC__ and __GNUC_MINOR__ version macros are also defined by clang, but clang doesn't support the same attributes as GCC. clang 3.5.0 does not support the __alloc_size__ attribute: https://github.com/llvm-mirror/clang/

[Qemu-devel] [PULL 33/38] block: minimal bounce buffer alignment

2015-05-22 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The patch introduces new concept: minimal memory alignment for bounce buffers. Original so called "optimal" value is actually minimal required value for aligment. It should be used for validation that the IOVec is properly aligned and bounce buffer is not required. Though,

[Qemu-devel] [PULL 35/38] Revert "block: Fix unaligned zero write"

2015-05-22 Thread Stefan Hajnoczi
From: Fam Zheng This reverts commit fc3959e4669a1c2149b91ccb05101cfc7ae1fc05. The core write code already handles the case, so remove this duplication. Because commit 61007b316 moved the touched code from block.c to block/io.c, the change is manually reverted. Signed-off-by: Fam Zheng Reviewe

Re: [Qemu-devel] [PATCH 04/10] crypto: introduce generic cipher API & built-in implementation

2015-05-22 Thread Daniel P. Berrange
On Thu, May 21, 2015 at 12:52:43PM -0700, Richard Henderson wrote: > On 05/21/2015 03:56 AM, Daniel P. Berrange wrote: > > +QCryptoCipher *qcrypto_cipher_new(QCryptoCipherAlgorithm alg, > > + QCryptoCipherMode mode, > > + const uint8

[Qemu-devel] [PULL 32/38] block: return EPERM on writes or discards to read-only devices

2015-05-22 Thread Stefan Hajnoczi
From: Paolo Bonzini This is the behavior in the operating system, for example Linux's blkdev_write_iter has the following: if (bdev_read_only(I_BDEV(bd_inode))) return -EPERM; This does not apply to opening a device for read/write, when the device only supports read-only

[Qemu-devel] [PULL 38/38] block: get_block_status: use "else" when testing the opposite condition

2015-05-22 Thread Stefan Hajnoczi
From: Paolo Bonzini A bit of Boolean algebra (and common sense) tells us that the second "if" here is looking for blocks that are not allocated. This is the opposite of the "if" that sets BDRV_BLOCK_ALLOCATED, and thus it can use an "else". Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake

[Qemu-devel] [PULL 37/38] qemu-iotests: Test unaligned sub-block zero write

2015-05-22 Thread Stefan Hajnoczi
From: Fam Zheng Test zero write in byte range 512~1024 for 4k alignment. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Message-id: 1431522721-3266-4-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/033 | 13

Re: [Qemu-devel] [PULL v2 00/18] target-alpha fpu improvements

2015-05-22 Thread Peter Maydell
On 21 May 2015 at 18:39, Richard Henderson wrote: > Having fixed the UL vs ULL fiasco in patch 17. > > > r~ > > > The following changes since commit 385057cbec9b4a0eb6150330c572e875ed714965: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-05-15' > into staging (2015-05-15 1

Re: [Qemu-devel] ABNT2 keys again

2015-05-22 Thread Gerd Hoffmann
On Mi, 2015-05-20 at 14:44 +0300, Michael Tokarev wrote: > A (friendly) ping? :) > > > The solution appears to be trivial (see also some background > > at http://blog.nielshorn.net/2011/03/qemu-and-brazilian-keyboards/ ), > > but the problem is definitely still here. > > > > Maybe it's a time to

[Qemu-devel] [PATCH 1/3] target-tricore: fix OPC2_32_RR_DVINIT_HU having write before use on the result

2015-05-22 Thread Bastian Koppelmann
If the argument r1 was the same as the extended result register r3+1, we would overwrite r1 and then use it. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.

[Qemu-devel] [PATCH 3/3] target-tricore: fix BOL_ST_H_LONGOFF using ld

2015-05-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 2d886e6..bf11ed4 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -5150,7 +

[Qemu-devel] [PATCH 2/3] target-tricore: fix msub32_q producing the wrong overflow bit

2015-05-22 Thread Bastian Koppelmann
The inversion of the overflow bit as a special case, which was needed for the madd32_q instructions, does not apply for msub32_q instructions. So remove it. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/target-tri

[Qemu-devel] [PATCH 0/3] TriCore bugfixes

2015-05-22 Thread Bastian Koppelmann
Hi, while testing the new v1.6.1 instructions I found three bugs in the old instructions. Cheers, Bastian Bastian Koppelmann (3): target-tricore: fix OPC2_32_RR_DVINIT_HU having write before use on the result target-tricore: fix msub32_q producing the wrong overflow bit target-tricore

Re: [Qemu-devel] [PULL v2 00/18] target-alpha fpu improvements

2015-05-22 Thread Peter Maydell
On 22 May 2015 at 11:00, Peter Maydell wrote: > On 21 May 2015 at 18:39, Richard Henderson wrote: >> for you to fetch changes up to 32ad48abd74a997220b841e4e913edeb267aa362: >> >> target-alpha: Add vector implementation for CMPBGE (2015-05-21 10:34:18 >> -0700) > > Applied, thanks. Except I f

[Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-22 Thread Pavel Fedin
This is an improved and KVM-aware alternative to https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00942.html. Changes are: 1. MPIDR value (minus feature bits) is now directly stored in CPU instance. 2. Default assignment is based on original rule (8 CPUs per cluster). 3. If KVM is used, M

[Qemu-devel] [PATCH RFC 1/4] Add virt-v3 machine that uses GIC-500

2015-05-22 Thread Pavel Fedin
This patch introduces kernel_irqchip_type member in Machine class. Currently it it used only by virt machine for its internal purposes, however in future it is to be passed to KVM in kvm_irqchip_create(). The variable is defined as int in order to be architecture agnostic, for potential future u

[Qemu-devel] [PATCH RFC 0/4] vGICv3 support

2015-05-22 Thread Pavel Fedin
This is my alternative to Ashok's vGICv3 patch (https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg03021.html), which i am currently working on. It addresses vGIC capability verification issue (kvm_irqchip_create() / kvm_arch_irqchip_create()), as well as offers better code structure (v3 cod

[Qemu-devel] [PATCH RFC 2/4] Set kernel_irqchip_type for other ARM boards which use GIC

2015-05-22 Thread Pavel Fedin
Signed-off-by: Pavel Fedin --- hw/arm/exynos4_boards.c | 1 + hw/arm/realview.c | 1 + hw/arm/vexpress.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index d644db1..d4136bc 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exy

[Qemu-devel] [PATCH RFC 3/4] First bits of vGICv3 support:

2015-05-22 Thread Pavel Fedin
- Make use of kernel_irqchip_type in kvm_arch_irqchip_create() - Instantiate "kvm-arm-gicv3" class (not implemented yet) for GICv3 with KVM acceleration Signed-off-by: Pavel Fedin --- hw/arm/virt.c| 6 ++ include/sysemu/kvm.h | 3 ++- kvm-all.c| 2 +- stubs/kvm.c

[Qemu-devel] [PATCH RFC 4/4] Initial implementation of vGICv3.

2015-05-22 Thread Pavel Fedin
Get/put routines are missing. Live migration is not possible. Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_kvm.c | 283 2 files changed, 284 insertions(+) create mode 100644 hw/intc/arm_gicv3_kvm.c diff --git

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Daniel P. Berrange
On Thu, May 21, 2015 at 03:51:43PM +0200, Paolo Bonzini wrote: > Some of you may have heard about the "Clear Containers" initiative from > Intel, which couple KVM with various kernel tricks to create extremely > lightweight virtual machines. The experimental Clear Containers setup > requires only

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Peter Maydell
On 22 May 2015 at 12:01, Daniel P. Berrange wrote: > On the QEMU side of things I wonder if there is scope for taking AArch64's > 'virt' machine type concept and duplicating it on all architectures. Experience suggests that holding the line on "minimal" is really quite tricky, though -- there's a

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Daniel P. Berrange
On Fri, May 22, 2015 at 12:04:54PM +0100, Peter Maydell wrote: > On 22 May 2015 at 12:01, Daniel P. Berrange wrote: > > On the QEMU side of things I wonder if there is scope for taking AArch64's > > 'virt' machine type concept and duplicating it on all architectures. > > Experience suggests that

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Peter Maydell
On 22 May 2015 at 12:12, Daniel P. Berrange wrote: > Yep, it is hard saying no - but I'd think as long as it was possible to add > the extra features using -device, it ought to be practical to keep a "virt" > machine types "-nodefaults -nodefconfig" base setup pretty minimal. Mmm, but -device onl

Re: [Qemu-devel] [PATCH 00/10] Consolidate crypto APIs & implementations

2015-05-22 Thread Gonglei
On 2015/5/21 18:56, Daniel P. Berrange wrote: > This small series covers the crypto consolidation patches > I previously posted as part of a larger RFC for the TLS work > > https://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg02038.html > > Currently there are a 5 main places in QEMU whi

Re: [Qemu-devel] [PULL v2 00/18] target-alpha fpu improvements

2015-05-22 Thread Peter Maydell
On 22 May 2015 at 11:22, Peter Maydell wrote: > On 22 May 2015 at 11:00, Peter Maydell wrote: >> On 21 May 2015 at 18:39, Richard Henderson wrote: >>> for you to fetch changes up to 32ad48abd74a997220b841e4e913edeb267aa362: >>> >>> target-alpha: Add vector implementation for CMPBGE (2015-05-21

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Daniel P. Berrange
On Fri, May 22, 2015 at 12:21:27PM +0100, Peter Maydell wrote: > On 22 May 2015 at 12:12, Daniel P. Berrange wrote: > > Yep, it is hard saying no - but I'd think as long as it was possible to add > > the extra features using -device, it ought to be practical to keep a "virt" > > machine types "-no

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Gerd Hoffmann
On Fr, 2015-05-22 at 12:21 +0100, Peter Maydell wrote: > On 22 May 2015 at 12:12, Daniel P. Berrange wrote: > > Yep, it is hard saying no - but I'd think as long as it was possible to add > > the extra features using -device, it ought to be practical to keep a "virt" > > machine types "-nodefaults

[Qemu-devel] [PATCH 10/20] monitor: Propagate errors through qmp_check_input_obj()

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/monitor.c b/monitor.c index 01b1a5f..1d7ad0a 100644 --- a/monitor.c +++ b/monitor.c @@ -4929,14 +4929,14 @@ out: * 5. If the "id" key exists, it can be anythin

[Qemu-devel] [PATCH 03/20] monitor: Improve and document client_migrate_info protocol error

2015-05-22 Thread Markus Armbruster
Protocol must be spice, vnc isn't implemented. Fix up documentation. Attempts to use vnc or any other unknown protocol yield the misleading error message "Invalid parameter 'protocol'". Improve it to "Parameter 'protocol' expects spice". Signed-off-by: Markus Armbruster --- hmp-commands.hx |

[Qemu-devel] [PATCH 08/20] monitor: Drop unused "new" HMP command interface

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/monitor.c b/monitor.c index 64e7bd3..3a7e625 100644 --- a/monitor.c +++ b/monitor.c @@ -123,7 +123,6 @@ typedef struct mon_cmd_t { const char *args_type;

[Qemu-devel] [PATCH 00/20] monitor: Wean core off QError, and other cleanups

2015-05-22 Thread Markus Armbruster
Command handlers still use QError. Left for another day. Markus Armbruster (20): monitor: Drop broken, unused asynchronous command interface monitor: Clean up after previous commit monitor: Improve and document client_migrate_info protocol error monitor: Convert client_migrate_info to QAP

[Qemu-devel] [PATCH 14/20] monitor: Rename handle_user_command() to handle_hmp_command()

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index 65ef400..ecadda7 100644 --- a/monitor.c +++ b/monitor.c @@ -574,7 +574,7 @@ static int do_qmp_capabilities(Monitor *mon, const QDict *params,

[Qemu-devel] [PATCH 12/20] monitor: Inline monitor_has_error() into its only caller

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index c732203..71ca03f 100644 --- a/monitor.c +++ b/monitor.c @@ -377,11 +377,6 @@ static int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream, return

[Qemu-devel] [PATCH 02/20] monitor: Clean up after previous commit

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/monitor.c b/monitor.c index 9a0c3b7..5330e61 100644 --- a/monitor.c +++ b/monitor.c @@ -4045,18 +4045,6 @@ void monitor_set_error(Monitor *

[Qemu-devel] [PATCH 04/20] monitor: Convert client_migrate_info to QAPI

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hmp-commands.hx | 3 +-- hmp.c| 17 + hmp.h| 1 + monitor.c| 42 ++ qapi-schema.json | 20 qmp-commands.hx | 2 +- 6 files changed, 58 insertions(

[Qemu-devel] [PATCH 05/20] monitor: Use traditional command interface for HMP drive_del

2015-05-22 Thread Markus Armbruster
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. For drive_del, that's easy:

[Qemu-devel] [PATCH 17/20] monitor: Drop do_qmp_capabilities()'s superfluous QMP check

2015-05-22 Thread Markus Armbruster
Superfluous since commit 30f5041 removed it from HMP. Signed-off-by: Markus Armbruster --- monitor.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index 4b397e6..6e9cc8c 100644 --- a/monitor.c +++ b/monitor.c @@ -566,11 +566,7 @@ static void monit

[Qemu-devel] [PATCH 01/20] monitor: Drop broken, unused asynchronous command interface

2015-05-22 Thread Markus Armbruster
The asynchronous monitor command interface goes back to commit 940cc30 (Jan 2010). Added a third case to command execution. The hope back then according to the commit message was that all commands get converted to the asynchronous interface, killing off the other two cases. Didn't happen. The i

[Qemu-devel] [PATCH 06/20] monitor: Use traditional command interface for HMP device_add

2015-05-22 Thread Markus Armbruster
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. For device_add, that's easy:

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-22 Thread Markus Armbruster
Peter Maydell writes: > On 22 May 2015 at 12:12, Daniel P. Berrange wrote: >> Yep, it is hard saying no - but I'd think as long as it was possible to add >> the extra features using -device, it ought to be practical to keep a "virt" >> machine types "-nodefaults -nodefconfig" base setup pretty m

[Qemu-devel] [PATCH 15/20] monitor: Rename monitor_control_read(), monitor_control_event()

2015-05-22 Thread Markus Armbruster
... to monitor_qmp_read(), monitor_qmp_event(). Signed-off-by: Markus Armbruster --- monitor.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/monitor.c b/monitor.c index ecadda7..977c0fd 100644 --- a/monitor.c +++ b/monitor.c @@ -5043,10 +5043,7 @@ err_out:

[Qemu-devel] [PATCH 18/20] monitor: Turn int command_mode into bool in_command_mode

2015-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/monitor.c b/monitor.c index 6e9cc8c..f31a05d 100644 --- a/monitor.c +++ b/monitor.c @@ -164,7 +164,12 @@ struct MonFdset { typedef struct { QObject *i

[Qemu-devel] [PATCH 19/20] monitor: Rename monitor_ctrl_mode() to monitor_is_qmp()

2015-05-22 Thread Markus Armbruster
... and change return type to bool. Signed-off-by: Markus Armbruster --- monitor.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index f31a05d..2bdde35 100644 --- a/monitor.c +++ b/monitor.c @@ -231,8 +231,10 @@ Monitor *default_mon; stat

[Qemu-devel] [PATCH 07/20] monitor: Use trad. command interface for HMP pcie_aer_inject_error

2015-05-22 Thread Markus Armbruster
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. pcie_aer_inject_error's impl

  1   2   3   >