[Qemu-devel] [PATCH v4 01/14] compiler.h: add QEMU_ALIGNED() to enforce struct alignment

2016-04-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qemu/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index

[Qemu-devel] [PATCH v4 02/14] seqlock: remove optional mutex

2016-04-29 Thread Emilio G. Cota
This option is unused; besides, it bloats the struct when not needed. Let's just let writers define their own locks elsewhere. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- cpus.c

[Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-04-29 Thread Emilio G. Cota
Having a fixed-size hash table for keeping track of all translation blocks is suboptimal: some workloads are just too big or too small to get maximum performance from the hash table. The MRU promotion policy helps improve performance when the hash table is a little undersized, but it cannot make

[Qemu-devel] [PATCH v4 11/14] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-29 Thread Emilio G. Cota
This is a hash table with optional auto-resizing and MRU promotion for reads and writes. Its implementation goal is to stay fast while scaling for read-mostly workloads. A hash table with these features will be necessary for the scalability of the ongoing MTTCG work; before those changes arrive

[Qemu-devel] [PATCH v4 00/14] tb hash improvements

2016-04-29 Thread Emilio G. Cota
Changes from v3: - added reviewed-by tags from v3. I dropped the review tags from the 'qht' and 'info jit' patches because they have changed quite a bit from v3. - qdist: new module to print intuitive histograms, see 'info jit' below. - qht: + bug fix: remove unnecessary requirement of

Re: [Qemu-devel] [RFC v3] translate-all: protect code_gen_buffer with RCU

2016-04-29 Thread Emilio G. Cota
On Tue, Apr 26, 2016 at 07:32:39 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > With two code_gen "halves", if two tb_flush calls are done in the same > > RCU read critical section, we're screwed. I added a cpu_exit at the end > > of tb_flush to try to mitigate this, but I

[Qemu-devel] [PATCH v4 07/14] exec: add tb_hash_func5, derived from xxhash

2016-04-29 Thread Emilio G. Cota
This will be used by upcoming changes for hashing the tb hash. Add this into a separate file to include the copyright notice from xxhash. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/tb-hash-xx.h | 94

[Qemu-devel] [PATCH v4 09/14] qdist: add module to represent frequency distributions of data

2016-04-29 Thread Emilio G. Cota
Sometimes it is useful to have a quick histogram to represent a certain distribution -- for example, when investigating a performance regression in a hash table due to inadequate hashing. The appended allows us to easily represent a distribution using Unicode characters. Further, the data

[Qemu-devel] [PATCH v4 12/14] qht: add test program

2016-04-29 Thread Emilio G. Cota
Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/.gitignore | 1 + tests/Makefile | 5 +- tests/test-qht.c | 177 +++ 3 files changed, 182 insertions(+), 1 deletion(-) create mode

[Qemu-devel] [PATCH v4 06/14] qemu-thread: add simple test-and-set spinlock

2016-04-29 Thread Emilio G. Cota
From: Guillaume Delbergue Signed-off-by: Guillaume Delbergue [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini [Emilio's additions: use atomic_test_and_set instead of atomic_xchg; call cpu_relax() while

[Qemu-devel] [PATCH v4 08/14] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-29 Thread Emilio G. Cota
For some workloads such as arm bootup, tb_phys_hash is performance-critical. The is due to the high frequency of accesses to the hash table, originated by (frequent) TLB flushes that wipe out the cpu-private tb_jmp_cache's. More info:

[Qemu-devel] [PATCH v4 14/14] translate-all: add tb hash bucket info to 'info jit' dump

2016-04-29 Thread Emilio G. Cota
Examples: - Good hashing, i.e. tb_hash_func5(phys_pc, pc, flags): TB count715135/2684354 [...] TB hash buckets 388775/524288 (74.15% head buckets used) TB hash occupancy 33.04% avg chain occ. Histogram: [0,10)%|▆ █ ▅▁▃▁▁|[90,100]% TB hash avg chain 1.017 buckets. Histogram:

[Qemu-devel] [PATCH v4 04/14] include/processor.h: define cpu_relax()

2016-04-29 Thread Emilio G. Cota
Taken from the linux kernel. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qemu/processor.h | 34 ++ 1 file changed, 34 insertions(+) create mode

[Qemu-devel] [PATCH v4 05/14] atomics: add atomic_test_and_set

2016-04-29 Thread Emilio G. Cota
This new helper expands to __atomic_test_and_set where available; otherwise it expands to atomic_xchg. Signed-off-by: Emilio G. Cota --- include/qemu/atomic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index

[Qemu-devel] [PATCH v4 03/14] seqlock: rename write_lock/unlock to write_begin/end

2016-04-29 Thread Emilio G. Cota
It is a more appropriate name, now that the mutex embedded in the seqlock is gone. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- cpus.c | 28 ++--

[Qemu-devel] [PATCH v4 10/14] qdist: add test program

2016-04-29 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- tests/.gitignore | 1 + tests/Makefile | 6 +- tests/test-qdist.c | 363 + 3 files changed, 369 insertions(+), 1 deletion(-) create mode 100644 tests/test-qdist.c diff --git

[Qemu-devel] [PATCH v2] spapr: Don't set the TM ibm, pa-features bit in PR KVM mode

2016-04-29 Thread Anton Blanchard
We don't support transactional memory in PR KVM, so don't tell the OS that we do. Signed-off-by: Anton Blanchard --- v2: Fix build with CONFIG_KVM disabled, noticed by Alex. diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b69995e..dc3e3c9 100644 --- a/hw/ppc/spapr.c +++

Re: [Qemu-devel] [PATCH v4 13/14] block: Switch blk_write_zeroes() to byte interface

2016-04-29 Thread Eric Blake
On 04/29/2016 02:08 PM, Eric Blake wrote: > Sector-based blk_write() should die; convert the one-off > variant blk_write_zeroes(). > > Signed-off-by: Eric Blake > Acked-by: Denis V. Lunev > --- > +++ b/include/sysemu/block-backend.h > @@ -96,8 +96,8 @@ int

[Qemu-devel] [V9 3/4] hw/core: Add AMD IOMMU to machine properties

2016-04-29 Thread David Kiarie
Added an enum, subject to review, to machine properties which it used to override iommu emulated from Intel to AMD. Signed-off-by: David Kiarie --- hw/core/machine.c | 33 ++--- include/hw/boards.h | 1 +

[Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU

2016-04-29 Thread David Kiarie
Add IVRS table for AMD IOMMU. Generate IVRS or DMAR depending on emulated IOMMU Signed-off-by: David Kiarie --- hw/acpi/aml-build.c | 2 +- hw/acpi/core.c | 13 --- hw/i386/acpi-build.c| 93 +++--

[Qemu-devel] [V9 1/4] hw/i386: Introduce AMD IOMMU

2016-04-29 Thread David Kiarie
Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU The IOMMU does basic translation, error checking and has a minimal IOTLB implementation Signed-off-by: David Kiarie --- hw/i386/Makefile.objs |1 + hw/i386/amd_iommu.c | 1426

[Qemu-devel] [V9 0/4] AMD IOMMU

2016-04-29 Thread David Kiarie
These series adds AMD IOMMU support to Qemu. It's currently in the 9th version. In this series I have (hopefully) addressed all the comments made in the previous version. I have also tested and successfully passed-through PCI device 'ac97' with more devices to be tested. David Kiarie (4):

[Qemu-devel] [PATCH v4 01/14] block: Allow BDRV_REQ_FUA through blk_pwrite()

2016-04-29 Thread Eric Blake
We have several block drivers that understand BDRV_REQ_FUA, and emulate it in the block layer for the rest by a full flush. But without a way to actually request BDRV_REQ_FUA during a pass-through blk_pwrite(), FUA-aware block drivers like NBD are forced to repeat the emulation logic of a full

[Qemu-devel] [PATCH v4 14/14] block: Kill blk_write(), blk_read()

2016-04-29 Thread Eric Blake
Now that there are no remaining clients, we can drop these functions, to ensure that all future users get the byte-based interfaces. Sadly, there are still remaining sector-based interfaces, such as blk_aio_writev; those will have to wait for another day. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v4 00/14] block: kill sector-based blk_write/read

2016-04-29 Thread Eric Blake
2.7 material, depends on Kevin's block-next: git://repo.or.cz/qemu/kevin.git block-next Previously posted as part of a larger NBD series [1] (at v3, explaining why this is v4), but these are independent enough to make for easier review on their own, and is mostly orthogonal to Kevin's recent work

[Qemu-devel] [PATCH v4 13/14] block: Switch blk_write_zeroes() to byte interface

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes(). Signed-off-by: Eric Blake Acked-by: Denis V. Lunev --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 block/parallels.c |

[Qemu-devel] [PATCH v4 12/14] block: Switch blk_read_unthrottled() to byte interface

2016-04-29 Thread Eric Blake
Sector-based blk_read() should die; convert the one-off variant blk_read_unthrottled(). Signed-off-by: Eric Blake --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 hw/block/hd-geometry.c | 2 +- 3 files changed, 7 insertions(+),

[Qemu-devel] [PATCH v4 04/14] onenand: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- Not compile tested - I'm not sure what else I'd need in my environment to actually test this one. I have: Fedora 23, dnf builddep qemu

[Qemu-devel] [PATCH v4 10/14] qemu-img: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- qemu-img.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

[Qemu-devel] [PATCH v4 11/14] qemu-io: Switch to byte-based block access

2016-04-29 Thread Eric Blake
blk_write() and blk_read() are now very simple wrappers around blk_pwrite() and blk_pread(). There's no reason to require the user to pass in aligned numbers. Keep 'read -p' and 'write -p' so that I don't have to hunt down and update all users of qemu-io, but make the default 'read' and 'write'

[Qemu-devel] [PATCH v4 05/14] pflash: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/pflash_cfi01.c | 12 ++-- hw/block/pflash_cfi02.c | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-)

[Qemu-devel] [PATCH v4 08/14] atapi: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Add new defines ATAPI_SECTOR_BITS and ATAPI_SECTOR_SIZE to use anywhere we were previously scaling BDRV_SECTOR_* by 4, for better legibility. Signed-off-by: Eric Blake --- v4: add new defines for

[Qemu-devel] [PATCH v4 07/14] m25p80: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- Not compile tested - I'm not sure what else I'd need in my environment to actually test this one. I have: Fedora 23, dnf builddep qemu ./configure --enable-kvm

[Qemu-devel] [PATCH v4 09/14] nbd: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- qemu-nbd.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index c55b40f..c07ceef 100644 --- a/qemu-nbd.c +++

[Qemu-devel] [PATCH v4 02/14] fdc: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/fdc.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/block/fdc.c

[Qemu-devel] [PATCH v4 03/14] nand: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). This file is doing some complex computations to map various flash page sizes (256, 512, and 2048) atop generic uses of 512-byte sector operations. Perhaps someone will want to tidy up the

[Qemu-devel] [PATCH v4 06/14] sd: Switch to byte-based block access

2016-04-29 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Greatly simplifies the code, now that we let the block layer take care of alignment and read-modify-write on our behalf :) Signed-off-by: Eric Blake --- hw/sd/sd.c | 46

Re: [Qemu-devel] [PATCH v5 00/18] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-04-29 Thread Radim Krčmář
2016-04-28 17:18+0800, Peter Xu: > On Thu, Apr 28, 2016 at 09:19:28AM +0200, Jan Kiszka wrote: >> Instead of fiddling with irq routes for the IOAPIC - where we don't need >> it -, I would suggest to do the following: Send IOAPIC events via >> kvm_irqchip_send_msi to the kernel. Only irqfd users

Re: [Qemu-devel] [PATCH v5 18/18] ioapic: clear remote irr bit for edge-triggered interrupts

2016-04-29 Thread Radim Krčmář
2016-04-28 15:05+0800, Peter Xu: > This is to better emulate IOAPIC version 0x1X hardware. Linux kernel > leveraged this "feature" to do explicit EOI since EOI register is still > not introduced at that time. This will also fix the issue that level > triggered interrupts failed to work when IR

Re: [Qemu-devel] [PATCH v5 17/18] ioapic: keep RO bits for IOAPIC entry

2016-04-29 Thread Radim Krčmář
2016-04-28 15:05+0800, Peter Xu: > Currently IOAPIC RO bits can be written. To be better aligned with > hardware, we should let them read-only. > > Signed-off-by: Peter Xu > --- Reviewed-by: Radim Krčmář

Re: [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast()

2016-04-29 Thread Sergey Fedorov
On 29/04/16 19:32, Richard Henderson wrote: > On 04/29/2016 06:58 AM, Sergey Fedorov wrote: >> On 29/04/16 16:54, Alex Bennée wrote: >>> Sergey Fedorov writes: diff --git a/cpu-exec.c b/cpu-exec.c index f49a436e1a5a..5f23c0660d6e 100644 --- a/cpu-exec.c

Re: [Qemu-devel] emulation details of qemu

2016-04-29 Thread Alex Bennée
tutu sky writes: > Thank you in advance Alex. > you said: "Using the QEMU's gdbstub to debug a guest is different from > debugging QEMU by running it under gdb." > if i want to see the hardware's internal which is emulated by QEMU, If by hardware's internal state then

Re: [Qemu-devel] [PATCH v3 03/18] qapi: Factor out JSON string escaping

2016-04-29 Thread Eric Blake
On 04/29/2016 06:09 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Pull out a new qstring_append_json_string() helper, so that all >> JSON output producers can use the same output escaping rules. >> >> While it appears that vmstate's use of the simpler qjson.c >>

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-04-29 Thread Yuanhan Liu
On Fri, Apr 29, 2016 at 12:40:09PM +0200, Marc-André Lureau wrote: > Hi > > On Thu, Apr 28, 2016 at 7:23 AM, Yuanhan Liu > wrote: > > On Fri, Apr 01, 2016 at 01:16:21PM +0200, marcandre.lur...@redhat.com wrote: > >> From: Marc-André Lureau

Re: [Qemu-devel] [PATCH RFC 0/8] basic vfio-ccw infrastructure

2016-04-29 Thread Alex Williamson
On Fri, 29 Apr 2016 14:11:47 +0200 Dong Jia Shi wrote: > vfio: ccw: basic vfio-ccw infrastructure > > > Introduction > > > Here we describe the vfio support for Channel I/O devices (aka. CCW > devices) for

[Qemu-devel] [PATCH v2] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Jan Vesely
Fixes build failure with --enable-xfsctl and new linux headers (>=4.5) and older xfsprogs(<4.5): In file included from /usr/include/xfs/xfs.h:38:0, from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:97: /usr/include/xfs/xfs_fs.h:42:8: error:

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Jan Vesely
On Fri, 2016-04-29 at 15:49 +0100, Peter Maydell wrote: > On 29 April 2016 at 15:31, Stefan Weil wrote: > > > > Is it a bug of the system headers? Or simply a design which > > requires users to be careful when including certain header files? > > > > Both

Re: [Qemu-devel] [PATCH v5 00/10] tcg: Direct block chaining clean-up

2016-04-29 Thread Richard Henderson
On 04/28/2016 02:33 PM, Sergey Fedorov wrote: > From: Sergey Fedorov > > This series combines a set of patches which is meant to improve overall code > structure and readability of the direct block chaining mechanism. The other > point is to make a step towards thread

Re: [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast()

2016-04-29 Thread Richard Henderson
On 04/29/2016 06:58 AM, Sergey Fedorov wrote: > On 29/04/16 16:54, Alex Bennée wrote: >> Sergey Fedorov writes: >>> diff --git a/cpu-exec.c b/cpu-exec.c >>> index f49a436e1a5a..5f23c0660d6e 100644 >>> --- a/cpu-exec.c >>> +++ b/cpu-exec.c >>> @@ -320,7 +320,9 @@ found:

Re: [Qemu-devel] [PATCH RFC 2/9] vfio: No-IOMMU mode support

2016-04-29 Thread Alex Williamson
On Fri, 29 Apr 2016 14:13:16 +0200 Xiao Feng Ren wrote: > Add qemu support for the newly introduced VFIO No-IOMMU driver. > > We need to add special handling for: > - Group character device is /dev/vfio/noiommu-$GROUP. > - No-IOMMU does not rely on a memory

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-04-29 Thread Eric Blake
On 04/04/2016 07:43 AM, Alberto Garcia wrote: > This patch makes the 'device' parameter of the 'block-stream' command > accept a node name as well as a device name. > > In addition to that, operation blockers will be checked in all > intermediate nodes between the top and the base node. > >

Re: [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node

2016-04-29 Thread Eric Blake
On 04/04/2016 07:43 AM, Alberto Garcia wrote: > Currently, block jobs can only be owned by root nodes. This patch > allows block jobs to be in any arbitrary node, by making the following > changes: > > - Block jobs can now be identified by the node name of their > BlockDriverState in addition

Re: [Qemu-devel] [PATCH v5 7/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>

2016-04-29 Thread Leon Alrae
On 18/04/16 17:03, Aleksandar Markovic wrote: > @@ -3049,6 +3050,330 @@ uint32_t helper_float_floorw_s(CPUMIPSState *env, > uint32_t fst0) > return wt2; > } > > +uint64_t helper_float_cvt_2008_l_d(CPUMIPSState *env, uint64_t fdt0) > +{ > +uint64_t dt2; > + > +dt2 =

Re: [Qemu-devel] emulation details of qemu

2016-04-29 Thread tutu sky
Thank you in advance Alex. you said: "Using the QEMU's gdbstub to debug a guest is different from debugging QEMU by running it under gdb." if i want to see the hardware's internal which is emulated by QEMU, i must make QEMU to run in step mode and run QEMU under GDB, no matter which guest is

[Qemu-devel] [PATCH v2 4/5] test: Postcopy

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-04-29 Thread Kevin Wolf
Am 28.04.2016 um 14:20 hat Alberto Garcia geschrieben: > On Wed 27 Apr 2016 03:34:19 PM CEST, Max Reitz wrote: > >> +/* Look for the top-level node that contains 'bs' in its chain */ > >> +active = NULL; > >> +do { > >> +active = bdrv_next(active); > >> +

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > This patch makes the 'device' parameter of the 'block-stream' command > accept a node name as well as a device name. > > In addition to that, operation blockers will be checked in all > intermediate nodes between the top and the base node.

Re: [Qemu-devel] [PATCH v9 06/11] block: Support streaming to an intermediate layer

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > This makes sure that the image we are steaming into is open in s/steaming/streaming/ > read-write mode during the operation. > > The block job is created on the destination image, but operation > blockers are also set on the active layer.

Re: [Qemu-devel] emulation details of qemu

2016-04-29 Thread Alex Bennée
tutu sky writes: > Magic answer, Thanks a lot Alex. > you mean GDB will be enabled for just QEMU's itself internals? It does not > make importance or any difference for guest running on it? > if i want describe my opinion in another way, i think you said that > when

Re: [Qemu-devel] [PATCH v5 5/9] target-mips: Activate IEEE 274-2008 signaling NaN bit meaning

2016-04-29 Thread Leon Alrae
On 18/04/16 17:03, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Functions mips_cpu_reset() and msa_reset() are updated so that flag > snan_bit_is_one is properly set for any Mips FPU/MSA configuration. > For main FPUs, CPUs with FCR31's FCR31_NAN2008

Re: [Qemu-devel] [PATCH v2 1/5] Postcopy: Avoid 0 length discards

2016-04-29 Thread Denis V. Lunev
On 04/29/2016 05:47 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect.

Re: [Qemu-devel] [PATCH v2 3/5] Postcopy: Add stats on page requests

2016-04-29 Thread Denis V. Lunev
On 04/29/2016 05:47 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert --- hmp.c | 4

Re: [Qemu-devel] [PATCH v2 2/5] Migration: Split out ram part of qmp_query_migrate

2016-04-29 Thread Denis V. Lunev
On 04/29/2016 05:47 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert ---

Re: [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > Currently, block jobs can only be owned by root nodes. This patch > allows block jobs to be in any arbitrary node, by making the following > changes: > > - Block jobs can now be identified by the node name of their > BlockDriverState in

Re: [Qemu-devel] [PATCH v2 3/5] Postcopy: Add stats on page requests

2016-04-29 Thread Eric Blake
On 04/29/2016 08:47 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > On the source, add a count of page requests received from the > destination. > > Signed-off-by: Dr. David Alan Gilbert > --- Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v2 2/5] Migration: Split out ram part of qmp_query_migrate

2016-04-29 Thread Eric Blake
On 04/29/2016 08:47 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The RAM section of qmp_query_migrate is reasonably complex > and repeated 3 times. Split it out into a helper. > > Signed-off-by: Dr. David Alan Gilbert >

[Qemu-devel] [PATCH v2 3/5] Postcopy: Add stats on page requests

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert --- hmp.c | 4 include/migration/migration.h | 2 ++ migration/migration.c

[Qemu-devel] [PATCH v2 0/5] postcopy (& 1 test) patch for 2.7

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a small set of postcopy changes, the largest of which is an x86 test for postcopy. Andrea's libqtest change came about from running my test under very heavy load. The test includes a self contained migration workload that

[Qemu-devel] [PATCH v2 5/5] tests: fix libqtest socket timeouts

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli --- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v2 2/5] Migration: Split out ram part of qmp_query_migrate

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 57

[Qemu-devel] [PATCH v2 1/5] Postcopy: Avoid 0 length discards

2016-04-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert ---

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Peter Maydell
On 29 April 2016 at 15:31, Stefan Weil wrote: > Is it a bug of the system headers? Or simply a design which > requires users to be careful when including certain header files? > > Both /usr/include/xfs/xfs_fs.h and /usr/include/linux/fs.h define > the same struct fsxattr, and

Re: [Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close()

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > bdrv_close_all() cancels all block jobs by iterating over all > BlockDriverStates. This patch simplifies the code by iterating > directly over the block jobs using block_job_next(). > > Signed-off-by: Alberto Garcia This

Re: [Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs()

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but > this function can only find those in top-level BlockDriverStates. > > This patch uses block_job_next() instead. > > Signed-off-by: Alberto Garcia

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Stefan Weil
Am 29.04.2016 um 16:00 schrieb Peter Maydell: > On 29 April 2016 at 14:56, Stefan Weil wrote: >> Am 29.04.2016 um 15:54 schrieb Peter Maydell: >> >>> This means we'll build with a HAVE_FSXATTR define set, but >>> nothing in the tree tries to use that as far as I can tell: >>>

Re: [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all()

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate > over all top-level BlockDriverStates. Therefore the code is unable to > find block jobs in other nodes. > > This patch uses block_job_next() to iterate over all block

Re: [Qemu-devel] [PATCH v9 01/11] block: keep a list of block jobs

2016-04-29 Thread Kevin Wolf
Am 04.04.2016 um 15:43 hat Alberto Garcia geschrieben: > The current way to obtain the list of existing block jobs is to > iterate over all root nodes and check which ones own a job. > > Since we want to be able to support block jobs in other nodes as well, > this patch keeps a list of jobs that

Re: [Qemu-devel] [PATCH v5 5/9] target-mips: Activate IEEE 274-2008 signaling NaN bit meaning

2016-04-29 Thread Maciej W. Rozycki
On Mon, 25 Apr 2016, Aleksandar Markovic wrote: > No, nothing is lost. The plan is to add this functionality at a later time. OK then, as you prefer. Although I find the order somewhat odd as r5+ is a special case of r3. Maciej

Re: [Qemu-devel] [PATCH v16 00/24] qapi visitor cleanups (post-introspection cleanups subset E)

2016-04-29 Thread Eric Blake
On 04/29/2016 07:09 AM, Markus Armbruster wrote: >>> Looks ready. Thanks for the quick respin! >> >> As usual, I'll be glad double-check your qapi-next branch once you've >> made the tweaks you suggested while applying the series. > > Applied to qapi-next, thanks! Looks good; I'll start basing

Re: [Qemu-devel] [PATCH v5 4/9] target-mips: Amend processor definitions in relation to FCR31

2016-04-29 Thread Leon Alrae
On 18/04/16 17:03, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Amend definitions of some Mips processors related to FCR31 > (float status control register). Most significantly, FCR31 of > processors mips32r6-generic, mips64r6-generic, and P5600 will

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Peter Maydell
On 29 April 2016 at 14:56, Stefan Weil wrote: > Am 29.04.2016 um 15:54 schrieb Peter Maydell: > >> This means we'll build with a HAVE_FSXATTR define set, but >> nothing in the tree tries to use that as far as I can tell: >> "git grep HAVE_FSXATTR" returns no matches. What am I

Re: [Qemu-devel] [PATCH v5 2/9] softfloat: For Mips only, correct default NaN values

2016-04-29 Thread Leon Alrae
On 18/04/16 17:03, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Only for Mips platform, and only for cases when snan_bit_is_one is 0, > correct default NaN values (in their 16-, 32-, and 64-bit flavors). > > For more info, see [1], page 84, Table

Re: [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast()

2016-04-29 Thread Sergey Fedorov
On 29/04/16 16:54, Alex Bennée wrote: > Sergey Fedorov writes: >> diff --git a/cpu-exec.c b/cpu-exec.c >> index f49a436e1a5a..5f23c0660d6e 100644 >> --- a/cpu-exec.c >> +++ b/cpu-exec.c >> @@ -320,7 +320,9 @@ found: >> return tb; >> } >> >> -static inline

[Qemu-devel] [PATCH RFC 5/8] vfio: ccw: realize VFIO_DEVICE_CCW_HOT_RESET ioctl

2016-04-29 Thread Dong Jia Shi
Introduce VFIO_DEVICE_CCW_HOT_RESET ioctl for vfio-ccw to make it possible to hot-reset the device. We try to achieve a hot reset by first offlining the device and then onlining it again: this should clear all state at the subchannel. Signed-off-by: Dong Jia Shi

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Stefan Weil
Am 29.04.2016 um 15:54 schrieb Peter Maydell: > This means we'll build with a HAVE_FSXATTR define set, but > nothing in the tree tries to use that as far as I can tell: > "git grep HAVE_FSXATTR" returns no matches. What am I missing? > > thanks > -- PMM > It's used by the system headers:

Re: [Qemu-devel] [PATCH v3 04/18] qapi: Factor out JSON number formatting

2016-04-29 Thread Eric Blake
On 04/29/2016 07:22 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Pull out a new qstring_append_json_number() helper, so that all >> JSON output producers can use a consistent style for printing >> floating point without duplicating code (since we are doing more >>

[Qemu-devel] [PATCH RFC 6/8] vfio: ccw: introduce page array interfaces

2016-04-29 Thread Dong Jia Shi
CCW translation requires to pin/unpin sets of mem pages frequently. Currently we have a lack of support to do this in an efficient way. So we introduce page_array data structure and helper functions to handle pin/unpin operations here. Signed-off-by: Dong Jia Shi ---

Re: [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast()

2016-04-29 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > Move tb_add_jump() call and surrounding code from cpu_exec() into > tb_find_fast(). That simplifies cpu_exec() a little by hiding the direct > chaining optimization details into tb_find_fast().

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Peter Maydell
On 29 April 2016 at 14:07, Jan Vesely wrote: > Fixes build failure with --enable-xfsctl and > new linux headers (>=4.5) and older xfsprogs(<4.5): > In file included from /usr/include/xfs/xfs.h:38:0, > from >

Re: [Qemu-devel] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-04-29 Thread Stefan Weil
Am 29.04.2016 um 15:07 schrieb Jan Vesely: > Fixes build failure with --enable-xfsctl and > new linux headers (>=4.5) and older xfsprogs(<4.5): > In file included from /usr/include/xfs/xfs.h:38:0, > from >

Re: [Qemu-devel] [PATCH v5 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit

2016-04-29 Thread Leon Alrae
On 18/04/16 17:03, Aleksandar Markovic wrote: > -#if SNAN_BIT_IS_ONE > -return ((uint32_t)(a << 1) >= 0xff80); > -#else > -return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003F ); > -#endif > +if (status->snan_bit_is_one) { > +return ((uint32_t)(a << 1) >=

Re: [Qemu-devel] [PATCH for-2.6] acpi: fix bios linker loadder COMMAND_ALLOCATE on bigendian host

2016-04-29 Thread Igor Mammedov
On Fri, 29 Apr 2016 15:16:07 +0200 Laurent Vivier wrote: > On 29/04/2016 14:44, Igor Mammedov wrote: > > 'make check' fails with: > > > > ERROR:tests/bios-tables-test.c:493:load_expected_aml: > >assertion failed: (g_file_test(aml_file, G_FILE_TEST_EXISTS)) > > > > since

Re: [Qemu-devel] [PATCH v3 06/18] qapi: Add qstring_append_format()

2016-04-29 Thread Markus Armbruster
Eric Blake writes: > Back in commit 764c1ca (Nov 2009), we added qstring_append_int(). > However, it did not see any use until commit 190c882 (Jan 2015). > Furthermore, it has a rather limited use case - to print anything > else, callers still have to format into a temporary

[Qemu-devel] [PATCH RFC 3/8] vfio: ccw: basic implementation for vfio_ccw driver

2016-04-29 Thread Dong Jia Shi
Add a basic vfio_ccw driver, which depends on the VFIO No-IOMMU support. Add a new config option: Device Drivers --> VFIO Non-Privileged userspace driver framework --> VFIO No-IOMMU support --> VFIO support for ccw devices Signed-off-by: Dong Jia Shi

[Qemu-devel] [PATCH RFC 8/8] vfio: ccw: realize VFIO_DEVICE_CCW_CMD_REQUEST ioctl

2016-04-29 Thread Dong Jia Shi
Introduce VFIO_DEVICE_CCW_CMD_REQUEST ioctl for vfio-ccw to handle the translated ccw commands. We implement the basic ccw command handling infrastructure here: 1. Issue the translated ccw commands to the device. 2. Once we get the execution result, update the guest SCSW with it.

[Qemu-devel] [PATCH RFC 0/8] basic vfio-ccw infrastructure

2016-04-29 Thread Dong Jia Shi
vfio: ccw: basic vfio-ccw infrastructure Introduction Here we describe the vfio support for Channel I/O devices (aka. CCW devices) for Linux/s390. Motivation for vfio-ccw is to passthrough CCW devices to a virtual machine, while vfio is the

[Qemu-devel] [PATCH RFC 1/8] iommu: s390: enable iommu api for s390 ccw devices

2016-04-29 Thread Dong Jia Shi
This enables IOMMU API if CONFIG_CCW is configured. Signed-off-by: Dong Jia Shi Reviewed-by: Pierre Morel --- drivers/iommu/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/Kconfig

[Qemu-devel] [PATCH RFC 2/8] s390: move orb.h from drivers/s390/ to arch/s390/

2016-04-29 Thread Dong Jia Shi
Let's make orb-related definitions available outside of the common I/O layer for future use (e.g. for passing channel devices to a guest). Signed-off-by: Dong Jia Shi Reviewed-by: Pierre Morel --- {drivers/s390/cio =>

[Qemu-devel] [PATCH RFC 4/8] vfio: ccw: realize VFIO_DEVICE_GET_INFO ioctl

2016-04-29 Thread Dong Jia Shi
Introduce device information about vfio-ccw: VFIO_DEVICE_FLAGS_CCW. Realize VFIO_DEVICE_GET_INFO ioctl for vfio-ccw. Signed-off-by: Dong Jia Shi Reviewed-by: Pierre Morel --- drivers/vfio/ccw/vfio_ccw.c | 20

[Qemu-devel] [PATCH RFC 7/8] vfio: ccw: introduce ccw chain interfaces

2016-04-29 Thread Dong Jia Shi
Introduce ccwchain structure and helper functions that can be used to handle special ccw programs issued from user-space. The following limitations apply: 1. Supports only prefetch enabled mode. 2. Supports direct ccw chaining by translating them to idal ccws. 3. Supports idal(c64) ccw chaining.

  1   2   >