Re: [Qemu-devel] [PATCH v3 3/3] pc-dimm: factor out address space logic into MemoryDevice code

2018-04-24 Thread Pankaj Gupta
> > > > > > >> +/* we will need a new memory slot for kvm and vhost */ > > >> +if (kvm_enabled() && !kvm_has_free_slot(machine)) { > > >> +error_setg(errp, "hypervisor has no free memory slots left"); > > >> +return; > > >> +} > > >> +if

[Qemu-devel] [PATCH] checkpatch.pl: add common glib defines to typelist

2018-04-24 Thread Peter Xu
Otherwise it can warn this: ERROR: space prohibited between function name and open parenthesis '(' When with things like this: typedef gboolean (*it_tree_iterator)(ITValue start, ITValue end); CC: Paolo Bonzini CC: Stefan Hajnoczi CC: "Daniel P.

[Qemu-devel] QEMU monitor banner printed multiple times

2018-04-24 Thread Thomas Huth
Hi, I just noticed that sometimes, the QEMU monitor banner is printed multiple times when you press "CTRL-a c" to enter the monitor: $ x86_64-softmmu/qemu-system-x86_64 -no-shutdown -nographic \ -nodefaults -virtioconsole mon:stdio QEMU 2.12.0 monitor - type 'help' for more information QEMU

Re: [Qemu-devel] [PATCH 00/10] intel-iommu: nested vIOMMU, cleanups, bug fixes

2018-04-24 Thread Peter Xu
On Tue, Apr 24, 2018 at 10:05:14PM -0700, no-re...@patchew.org wrote: [...] > === OUTPUT BEGIN === > Checking PATCH 1/10: intel-iommu: send PSI always even if across PDEs... > Checking PATCH 2/10: intel-iommu: remove IntelIOMMUNotifierNode... > Checking PATCH 3/10: intel-iommu: add iommu lock...

[Qemu-devel] [PATCH v1] hw/s390x: Allow to configure the consoles with the "-serial" parameter

2018-04-24 Thread Thomas Huth
The consoles ("sclpconsole" and "sclplmconsole") can only be configured with "-device" and "-chardev" so far. Other machines use the convenience option "-serial" to configure the default consoles, even for virtual consoles like spapr-vty on the pseries machine. So let's support this option on

[Qemu-devel] [PATCH 10/10] intel-iommu: remove notify_unmap for page walk

2018-04-24 Thread Peter Xu
Now after previous changes, we will always pass that parameter as true now. Remove it. After removing that variable, now we can greatly simplify the page walking logic. No functional change at all. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 70

[Qemu-devel] [PATCH 08/10] intel-iommu: maintain per-device iova ranges

2018-04-24 Thread Peter Xu
For each VTDAddressSpace, now we maintain what IOVA ranges we have mapped and what we have not. With that information, now we only send MAP or UNMAP when necessary. Say, we don't send MAP notifies if we know we have already mapped the range, meanwhile we don't send UNMAP notifies if we know we

[Qemu-devel] [PATCH 09/10] intel-iommu: don't unmap all for shadow page table

2018-04-24 Thread Peter Xu
IOMMU replay was carried out before in many use cases, e.g., context cache invalidations, domain flushes. We used this mechanism to sync the shadow page table by firstly (1) unmap the whole address space, then (2) walk the page table to remap what's in the table. This is very dangerous. The

[Qemu-devel] [PATCH 07/10] util: implement simple interval tree logic

2018-04-24 Thread Peter Xu
Introduce a simplest interval tree implementation based on GTree. Current implementation is mostly tailored to maintain and trace device mapped IOVA ranges, but still it might be useful to other modules in the future. It is naive in that it even does not allow user to pass in private structs

[Qemu-devel] [PATCH 04/10] intel-iommu: only do page walk for MAP notifiers

2018-04-24 Thread Peter Xu
For UNMAP-only IOMMU notifiers, we don't really need to walk the page tables. Fasten that procedure by skipping the page table walk. That should boost performance for UNMAP-only notifiers like vhost. Signed-off-by: Peter Xu --- include/hw/i386/intel_iommu.h | 2 ++

[Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock

2018-04-24 Thread Peter Xu
Add a per-iommu big lock to protect IOMMU status. Currently the only thing to be protected is the IOTLB cache, since that can be accessed even without BQL, e.g., in IO dataplane. Note that device page tables should not need any protection. The safety of that should be provided by guest OS.

[Qemu-devel] [PATCH 02/10] intel-iommu: remove IntelIOMMUNotifierNode

2018-04-24 Thread Peter Xu
That is not really necessary. Removing that node struct and put the list entry directly into VTDAddressSpace. It simplfies the code a lot. Signed-off-by: Peter Xu --- include/hw/i386/intel_iommu.h | 9 ++--- hw/i386/intel_iommu.c | 41

[Qemu-devel] [PATCH 06/10] intel-iommu: pass in address space when page walk

2018-04-24 Thread Peter Xu
We pass in the VTDAddressSpace to replace the aw bits when doing page walk. The VTDAddressSpace contains the aw bits information, meanwhile we'll need to do something more in the follow up patches regarding to the address spaces. Signed-off-by: Peter Xu ---

[Qemu-devel] [PATCH 05/10] intel-iommu: introduce vtd_page_walk_info

2018-04-24 Thread Peter Xu
During the recursive page walking of IOVA page tables, some stack variables are constant variables and never changed during the whole page walking procedure. Isolate them into a struct so that we don't need to pass those contants down the stack every time and multiple times. Signed-off-by: Peter

[Qemu-devel] [PATCH 00/10] intel-iommu: nested vIOMMU, cleanups, bug fixes

2018-04-24 Thread Peter Xu
Online repo: https://github.com/xzpeter/qemu/tree/fix-vtd-dma This series fixes several major problems that current code has: - Issue 1: when getting very big PSI UNMAP invalidations, the current code is buggy in that we might skip the notification while actually we should always send

[Qemu-devel] [PATCH 01/10] intel-iommu: send PSI always even if across PDEs

2018-04-24 Thread Peter Xu
During IOVA page table walking, there is a special case when the PSI covers one whole PDE (Page Directory Entry, which contains 512 Page Table Entries) or more. In the past, we skip that entry and we don't notify the IOMMU notifiers. This is not correct. We should send UNMAP notification to

Re: [Qemu-devel] [PATCH v3 14/46] tests/tcg/multiarch: enable additional linux-test tests

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > Un-comment the remaining tests. > > I removed the itimer value tests because I'm fairly sure a re-arming > timer will always have a different value in it when you grab it. > > I've also fixed up the clone thread flags as QEMU will only allow a > clone

Re: [Qemu-devel] [PATCH v3 15/46] tests/tcg/multiarch: move most output to stdout

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > The default test run outputs to stdout so it can be re-directed. > Errors are still reported to stderr. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH 09/16] os-posix: cleanup: Replace fprintfs with error_report in change_process_uid

2018-04-24 Thread Thomas Huth
On 24.04.2018 19:58, Ian Jackson wrote: > I'm going to be editing this function and it makes sense to clean up > this style problem in advance. > > Signed-off-by: Ian Jackson > CC: Paolo Bonzini > CC: Markus Armbruster > CC:

Re: [Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-24 Thread Thomas Huth
On 24.04.2018 19:58, Ian Jackson wrote: > Signed-off-by: Ian Jackson > CC: Paolo Bonzini > CC: Markus Armbruster > CC: Daniel P. Berrange > CC: Michael Tokarev > Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH v3 23/46] tests/tcg/x86_64: add Makefile.target

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > The sources for x86_64 are shared in the i386 directory which will be > included thanks to TARGET_BASE_ARCH. However not all sources build so > we need to filter out the ones we can't build in the 64 bit world. > > Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PATCH v3 28/46] tests/tcg/aarch64: add Makefile.target

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > Nothing much here yet. > > Signed-off-by: Alex Bennée > --- > tests/tcg/aarch64/Makefile.target | 5 + > 1 file changed, 5 insertions(+) > create mode 100644 tests/tcg/aarch64/Makefile.target > > diff --git

Re: [Qemu-devel] [PATCH v3 27/46] tests/tcg/arm: fix up test-arm-iwmmxt test

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > We need to rename the source file to a .S so we can do a single-line > assemble and link invocation. We also specify the additional CFLAGS > for the compile as it's a non-standard ARM binary. > > Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PATCH v3 24/46] tests/tcg/i386/test-i386: use modern vector_size attributes

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > The compiler complains about the old __mode__ style attributes. old [school] > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [qemu-web PATCH] Add a blog post about the release of version 2.12.0

2018-04-24 Thread Thomas Huth
Based on the contents of Michael Roth's announce e-mail for 2.12.0. Signed-off-by: Thomas Huth --- _posts/2018-04-25-qemu-2-12-0.md | 58 1 file changed, 58 insertions(+) create mode 100644 _posts/2018-04-25-qemu-2-12-0.md diff --git

Re: [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > Remove dependencies on QEMU's source tree and build directly. > > Signed-off-by: Alex Bennée > --- > tests/tcg/i386/test-i386-fprem.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v3 18/46] tests/tcg: enable building for i386

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > While you can construct a compile command that does work using the > x86_64 host compiler that most people use this is flakey. Different > distros handle this is different ways so we default to using a known > good i386 compiler via docker. > >

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Peter Xu
On Wed, Apr 25, 2018 at 11:14:23AM +0800, Peter Xu wrote: > On Tue, Apr 24, 2018 at 07:24:05PM +0100, Daniel P. Berrangé wrote: > > On Tue, Apr 24, 2018 at 06:16:31PM +0100, Dr. David Alan Gilbert wrote: > > > * Wang Xin (wangxinxin.w...@huawei.com) wrote: > > > > If the fd socket peer closed

Re: [Qemu-devel] [PATCH v3 16/46] tests/tcg: move i386 specific tests into subdir

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > These only need to be built for i386 guests. This includes a stub > tests/tcg/i386/Makfile.target which absorbs some of what was in > tests/tcg/Makefile. > > Signed-off-by: Alex Bennée > Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem

2018-04-24 Thread Thomas Huth
On 24.04.2018 17:23, Alex Bennée wrote: > Remove dependencies on QEMU's source tree and build directly. > > Signed-off-by: Alex Bennée > --- > tests/tcg/i386/test-i386-fprem.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v3 45/46] tests/Makefile.include: add [build|clean|check]-tcg targets

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:24 PM, Alex Bennée wrote: > This will ensure all linux-user targets build their guest test > programs and ensure check-tcg will run the respective tests. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > Tested-by:

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Peter Xu
On Tue, Apr 24, 2018 at 07:24:05PM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 24, 2018 at 06:16:31PM +0100, Dr. David Alan Gilbert wrote: > > * Wang Xin (wangxinxin.w...@huawei.com) wrote: > > > If the fd socket peer closed shortly, ppoll may receive a POLLHUP > > > event before the expected

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-24 Thread Thomas Huth
On 24.04.2018 19:58, Ian Jackson wrote: > This makes it much easier to find a particular thing in config.log. > > We have to use the ${BASH_LINENO[*]} syntax which is a syntax error in > other shells, so test what shell we are running and use eval. > > The extra output is only printed if

[Qemu-devel] [PATCH v6 0/4] qemu-thread: support --enable-debug-mutex

2018-04-24 Thread Peter Xu
v6: - rename __QEMU_THREAD_COMMON_H__ to QEMU_THREAD_COMMON_H - collect r-bs for Emilio v5: - init file/line [Emilio] v4: - cherrypick Emilio's patch to add "-m" parameter to atomic_add-bench tool. - use inline functions [Emilio] Micro benchmark result on "taskset -c 0 atomic_add-bench -m":

[Qemu-devel] [PATCH v6 4/4] configure: enable debug-mutex if debug enabled

2018-04-24 Thread Peter Xu
Reviewed-by: Emilio G. Cota Signed-off-by: Peter Xu --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index a80af735b2..87453edd88 100755 --- a/configure +++ b/configure @@ -1005,6 +1005,7 @@ for opt do --enable-debug)

[Qemu-devel] [PATCH v6 2/4] qemu-thread: introduce qemu-thread-common.h

2018-04-24 Thread Peter Xu
Introduce some hooks for the shared part of qemu thread between POSIX and Windows implementations. Note that in qemu_mutex_unlock_impl() we moved the call before unlock operation which should make more sense. And we don't need qemu_mutex_post_unlock() hook. Put all these shared hooks into the

[Qemu-devel] [PATCH v6 3/4] QemuMutex: support --enable-debug-mutex

2018-04-24 Thread Peter Xu
We have had some tracing tools for mutex but it's not easy to use them for e.g. dead locks. Let's provide "--enable-debug-mutex" parameter when configure to allow QemuMutex to store the last owner that took specific lock. It will be easy to use this tool to debug deadlocks since we can directly

[Qemu-devel] [PATCH v6 1/4] tests/atomic_add-bench: add -m option to use mutexes

2018-04-24 Thread Peter Xu
From: "Emilio G. Cota" This allows us to use atomic-add-bench as a microbenchmark for evaluating qemu_mutex_lock's performance. Signed-off-by: Emilio G. Cota [cherry picked from https://github.com/cota/qemu/commit/f04f34df] Signed-off-by: Peter Xu

Re: [Qemu-devel] [PATCH 0/9] target/arm: Fixups for ARM_FEATURE_V8_FP16

2018-04-24 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180425012300.14698-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH 0/9] target/arm: Fixups for ARM_FEATURE_V8_FP16 === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH 5/9] target/arm: Implement FMOV (general) for fp16

2018-04-24 Thread Philippe Mathieu-Daudé
Hi Richard, On 04/24/2018 10:22 PM, Richard Henderson wrote: > Adding the fp16 moves to/from general registers. > > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 22 +- > 1 file changed, 21 insertions(+), 1 deletion(-) >

[Qemu-devel] [PATCH 9/9] target/arm: Implement FP data-processing (3 source) for fp16

2018-04-24 Thread Richard Henderson
We missed all of the scalar fp16 fma operations. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/target/arm/translate-a64.c

[Qemu-devel] [PATCH 7/9] target/arm: Implement FCVT (scalar, fixed-point) for fp16

2018-04-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4f6317aa0f..794ede7222 100644 ---

[Qemu-devel] [PATCH 6/9] target/arm: Implement FCVT (scalar, integer) for fp16

2018-04-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper.h| 6 +++ target/arm/helper.c| 38 +- target/arm/translate-a64.c | 96 ++ 3 files changed, 122 insertions(+), 18 deletions(-) diff

[Qemu-devel] [PATCH 4/9] target/arm: Clear SVE high bits for FMOV

2018-04-24 Thread Richard Henderson
Use write_fp_dreg and clear_vec_high to zero the bits that need zeroing for these cases. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v3 00/46] fix building of tests/tcg

2018-04-24 Thread Philippe Mathieu-Daudé
> This is starting to shape up pretty nicely. I was able to add a whole > bunch of additional architectures thanks to cross compilers in Debian > Sid which are there to support the Debian "ports". These may not be > around for ever, most "ports" are on the way out, but they will be the > last

[Qemu-devel] [PATCH 8/9] target/arm: Implement FP data-processing (2 source) for fp16

2018-04-24 Thread Richard Henderson
We missed all of the scalar fp16 binary operations. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 73 ++ 1 file changed, 73 insertions(+) diff --git a/target/arm/translate-a64.c

[Qemu-devel] [PATCH 5/9] target/arm: Implement FMOV (general) for fp16

2018-04-24 Thread Richard Henderson
Adding the fp16 moves to/from general registers. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index

[Qemu-devel] [PATCH 1/9] target/arm: Implement vector shifted SCVF/UCVF for fp16

2018-04-24 Thread Richard Henderson
While we have some of the scalar paths for *CVF for fp16, we failed to decode the fp16 version of these instructions. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 33 - 1 file changed, 20 insertions(+), 13

[Qemu-devel] [PATCH 2/9] target/arm: Implement vector shifted FCVT for fp16

2018-04-24 Thread Richard Henderson
While we have some of the scalar paths for FCVT for fp16, we failed to decode the fp16 version of these instructions. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 65 -- 1 file changed, 46

[Qemu-devel] [PATCH 0/9] target/arm: Fixups for ARM_FEATURE_V8_FP16

2018-04-24 Thread Richard Henderson
When running the gcc testsuite with current aarch64-linux-user, the testsuite detects the presence of the fp16 extension and enables lots of extra tests for builtins. Quite a few of these new tests fail because we missed implementing some instructions. We really should go back and verify that

[Qemu-devel] [PATCH 3/9] target/arm: Fix float16 to/from int16

2018-04-24 Thread Richard Henderson
The instruction "ucvtf v0.4h, v04h, #2", with input 0x8000u, overflows the intermediate float16 to infinity before we have a chance to scale the output. Use float64 as the intermediate type so that no input argument (uint32_t in this case) can overflow or round before scaling. Given the declared

Re: [Qemu-devel] [PATCH] qemu-guest-agent: freeze-hook to ignore dpkg files as well

2018-04-24 Thread Philippe Mathieu-Daudé
Hi Christian, On 04/09/2018 04:18 AM, Christian Ehrhardt wrote: > Re-Ping for consideration? > > On Mon, Jan 22, 2018 at 3:03 PM, Christian Ehrhardt < > christian.ehrha...@canonical.com> wrote: > >> Hi, >> maybe I missed a formal thing on this submission, but I don't see it right >> away. You

Re: [Qemu-devel] [PATCH] Show values and description when using "qom-list"

2018-04-24 Thread QingFeng Hao
在 2018/4/24 19:49, Dr. David Alan Gilbert 写道: > * QingFeng Hao (ha...@linux.vnet.ibm.com) wrote: >> >> >> 在 2018/4/13 16:05, Perez Blanco, Ricardo (Nokia - BE/Antwerp) 写道: >>> Dear all, >>> >>> Here you can find my first contribution to qemu. Please, do not hesitate to >>> do any kind of

Re: [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > Remove dependencies on QEMU's source tree and build directly. > > Signed-off-by: Alex Bennée > --- > tests/tcg/i386/test-i386-fprem.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Reviewed-by: Richard

Re: [Qemu-devel] [PATCH v3 19/46] tests/tcg/i386: Build fix for hello-i386

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > From: Fam Zheng > > We have -Werror=missing-prototype, add a dummy prototype to avoid that > warning. > > Signed-off-by: Fam Zheng > Reviewed-by: Thomas Huth > --- > tests/tcg/i386/hello-i386.c |

Re: [Qemu-devel] [PATCH v3 16/46] tests/tcg: move i386 specific tests into subdir

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > These only need to be built for i386 guests. This includes a stub > tests/tcg/i386/Makfile.target which absorbs some of what was in > tests/tcg/Makefile. > > Signed-off-by: Alex Bennée > Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v3 15/46] tests/tcg/multiarch: move most output to stdout

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > The default test run outputs to stdout so it can be re-directed. > Errors are still reported to stderr. > > Signed-off-by: Alex Bennée > --- > tests/tcg/multiarch/test-mmap.c | 38 - > 1 file

Re: [Qemu-devel] [PATCH v3 14/46] tests/tcg/multiarch: enable additional linux-test tests

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > Un-comment the remaining tests. > > I removed the itimer value tests because I'm fairly sure a re-arming > timer will always have a different value in it when you grab it. > > I've also fixed up the clone thread flags as QEMU will only allow a > clone

Re: [Qemu-devel] [PATCH v3 13/46] tests/tcg/multiarch: Build fix for linux-test

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > From: Fam Zheng > > To keep the compiler happy, and to fit in our buildsys flags: > > - Make local functions "static" > - #ifdef out unused functions > - drop cutils/osdep dependencies > > Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH v3 05/46] configure: allow user to specify --cross-cc-cflags-foo=

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > As an individual compiler may be able to support several targets with > the appropriate flags we need to expose this to the user as well. > > Signed-off-by: Alex Bennée > > --- > v3 > - fix up the cross-cc > --- > configure

Re: [Qemu-devel] [PATCH v3 04/46] configure: move i386_cc to cross_cc_i386

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > Also dont assume x86_64 compiler can build i386 binaries. > > Signed-off-by: Alex Bennée > Tested-by: Philippe Mathieu-Daudé > > --- > v2 > - drop using system x86_64 compiler for i386 compiles > v3 > -

Re: [Qemu-devel] [PATCH v3 03/46] configure: add support for --cross-cc-FOO

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > @@ -675,10 +687,12 @@ case "$cpu" in >i386|i486|i586|i686|i86pc|BePC) > cpu="i386" > supported_cpu="yes" > +cross_cc_i386=gcc >;; >x86_64|amd64) > cpu="x86_64" > supported_cpu="yes" > +cross_cc_x86_64=gcc >;;

Re: [Qemu-devel] [PATCH v3 02/46] configure: add test for docker availability

2018-04-24 Thread Richard Henderson
On 04/24/2018 05:23 AM, Alex Bennée wrote: > This tests for a working docker installation without sudo and sets up > config-host.mak accordingly. This will be useful from cross compiling > things in the future. > > Signed-off-by: Alex Bennée > --- > configure | 17

Re: [Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-04-24 Thread Richard Henderson
On 04/24/2018 12:21 PM, Philippe Mathieu-Daudé wrote: > The libfdt does not guarantee than fdt_getprop() returns a pointer > aligned to the property size. > > Assuming the base of the fdt is aligned, a 32-bit property returns > a 32-bit aligned pointer. This is however not guaranteed for 64-bit >

Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V

2018-04-24 Thread Richard Henderson
On 04/24/2018 06:03 AM, Alex Bennée wrote: > As support was merged into the mainline kernel at 4.15 it is unlikely > 3.8.0 is the correct value. Indeed when I testing binaries created by > the current Debian SID compiler the tests failed with: > > FATAL: kernel too old > > Signed-off-by: Alex

Re: [Qemu-devel] [PATCH v3 45/46] tests/Makefile.include: add [build|clean|check]-tcg targets

2018-04-24 Thread Philippe Mathieu-Daudé
Hi Alex, On 04/24/2018 12:24 PM, Alex Bennée wrote: > This will ensure all linux-user targets build their guest test > programs and ensure check-tcg will run the respective tests. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé >

Re: [Qemu-devel] [PATCH v3 17/46] docker: Add fedora-i386-cross image

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/24/2018 12:23 PM, Alex Bennée wrote: > From: Fam Zheng > > It has some basic *-devel.i686 packages to be used with "gcc -m32" as a > 32 bit cross build environment. > > Signed-off-by: Fam Zheng > [AJB: add glibc-static] > Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PATCH 2/6] qapi: handle the riscv CpuInfoArch in query-cpus-fast

2018-04-24 Thread Eric Blake
On 04/24/2018 04:45 PM, Laszlo Ersek wrote: > Commit 25fa194b7b11 added the @riscv enum constant to @CpuInfoArch (used > in both @CpuInfo and @CpuInfoFast -- the return types of the @query-cpus > and @query-cpus-fast commands, respectively), and assigned, in both return > structures, the

Re: [Qemu-devel] [PATCH 1/6] qapi: fill in CpuInfoFast.arch in query-cpus-fast

2018-04-24 Thread Eric Blake
On 04/24/2018 04:45 PM, Laszlo Ersek wrote: > Commit ca230ff33f89 added added the @arch field to @CpuInfoFast, but it s/added added/added/ > failed to set the new field in qmp_query_cpus_fast(), when TARGET_S390X > was not defined. The updated @query-cpus-fast example in > "qapi-schema.json"

Re: [Qemu-devel] [RFC PATCH 00/33] Generic background jobs

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > Before we can make x-blockdev-create a background job, we need to > generalise the job infrastructure so that it can be used without any > associated block node. > > This series extracts a Job object from the block job infrastructure, > which should

[Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-04-24 Thread Philippe Mathieu-Daudé
The libfdt does not guarantee than fdt_getprop() returns a pointer aligned to the property size. Assuming the base of the fdt is aligned, a 32-bit property returns a 32-bit aligned pointer. This is however not guaranteed for 64-bit properties, where 64-bit loads might trigger unaligned access.

Re: [Qemu-devel] [PATCH v3 1/2] bswap.h: Fix ldl_he_p() signedness

2018-04-24 Thread Philippe Mathieu-Daudé
On 04/23/2018 01:56 PM, Peter Maydell wrote: > On 23 April 2018 at 17:25, Philippe Mathieu-Daudé wrote: >> As per the "Load and Store APIs" documentation (docs/devel/loads-stores.rst), >> "No signed load operations are provided." > > That phrase is used in the documentation

Re: [Qemu-devel] [RFC PATCH 10/33] job: Add job_delete()

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > This moves freeing the Job object and its fields from block_job_unref() > to job_delete(). > > Signed-off-by: Kevin Wolf > --- > +++ b/job.c > @@ -56,3 +56,9 @@ void *job_create(const char *job_id, const JobDriver > *driver, Error

Re: [Qemu-devel] [RFC PATCH 08/33] job: Rename BlockJobType into JobType

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > QAPI types aren't externally visible, so we can rename them without > causing problems. Before we add a job type to Job, rename the enum > so it can be used for more than just block jobs. > > Signed-off-by: Kevin Wolf > ---

Re: [Qemu-devel] [RFC PATCH 05/33] blockjob: Add block_job_driver()

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > The backup block job directly accesses the driver field in BlockJob. Add > a wrapper for getting it. > > Signed-off-by: Kevin Wolf > --- > include/block/blockjob.h | 7 +++ > block/backup.c | 8 +--- > blockjob.c

[Qemu-devel] [PATCH] block: Merge .bdrv_co_writev{, _flags} in drivers

2018-04-24 Thread Eric Blake
We have too many driver callback interfaces; simplify the mess somewhat by merging the flags parameter of .bdrv_co_writev_flags() into .bdrv_co_writev_flags(). Note that as long as a driver doesn't set .supported_write_flags, the flags argument will be 0 and behavior is identical. Also note that

[Qemu-devel] [ANNOUNCE] QEMU 2.12.0 is now available

2018-04-24 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 2.12.0 release. This release contains 2700+ commits from 204 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at:

Re: [Qemu-devel] [RFC PATCH 04/33] blockjob: Introduce block_job_ratelimit_get_delay()

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > This gets us rid of more direct accesses to BlockJob fields from the > job drivers. > > Signed-off-by: Kevin Wolf > --- > +++ b/include/block/blockjob_int.h > @@ -166,6 +166,14 @@ void block_job_sleep_ns(BlockJob *job, int64_t ns); >

[Qemu-devel] [PATCH 4/6] qapi: change the type of TargetInfo.arch from string to enum SysEmuTarget

2018-04-24 Thread Laszlo Ersek
Now that we have @SysEmuTarget, it makes sense to restict @TargetInfo.@arch to valid sysemu targets at the schema level. Cc: "Daniel P. Berrange" Cc: David Gibson Cc: Eric Blake Cc: Gerd Hoffmann Cc: Kashyap

[Qemu-devel] [PATCH 6/6] qapi: discriminate CpuInfo[Fast] on SysEmuTarget, not CpuInfoArch

2018-04-24 Thread Laszlo Ersek
Add a new field @target (of type @SysEmuTarget) to the outputs of the @query-cpus and @query-cpus-fast commands, which provides more information about the emulation target than the field @arch (of type @CpuInfoArch). Keep @arch for compatibility. Make @target the new discriminator for the

[Qemu-devel] [PATCH 2/6] qapi: handle the riscv CpuInfoArch in query-cpus-fast

2018-04-24 Thread Laszlo Ersek
Commit 25fa194b7b11 added the @riscv enum constant to @CpuInfoArch (used in both @CpuInfo and @CpuInfoFast -- the return types of the @query-cpus and @query-cpus-fast commands, respectively), and assigned, in both return structures, the @CpuInfoRISCV sub-structure to the new enum value. However,

[Qemu-devel] [PATCH 5/6] qapi: extract CpuInfoCommon to mitigate schema duplication

2018-04-24 Thread Laszlo Ersek
@CpuInfo and @CpuInfoFast duplicate the following four fields: @qom-path, @thread-id, @props and @arch. From these, extract the first three to a common structure called @CpuInfoCommon. (More on @arch later.) Introduce two new mid-layer structures, @CpuInfoBase and @CpuInfoFastBase, to soak up the

[Qemu-devel] [PATCH 3/6] qapi: add SysEmuTarget to "common.json"

2018-04-24 Thread Laszlo Ersek
We'll soon need an enumeration type that lists all the softmmu targets that QEMU (the project) supports. Introduce @SysEmuTarget to "common.json". Cc: "Daniel P. Berrange" Cc: David Gibson Cc: Eric Blake Cc: Gerd Hoffmann

[Qemu-devel] [PATCH 0/6] qapi: introduce the SysEmuTarget enumeration

2018-04-24 Thread Laszlo Ersek
This patch set adds the @SysEmuTarget enum type, and rebases a few other types to it. Here's the "anatomy" of the series: - Patches #1 and #2 fix QAPI bugs that have crept in in the 2.12 development cycle. I noticed the bugs while working on patch #6; i.e. patch #6 depends on #1 and #2. The

[Qemu-devel] [PATCH 1/6] qapi: fill in CpuInfoFast.arch in query-cpus-fast

2018-04-24 Thread Laszlo Ersek
Commit ca230ff33f89 added added the @arch field to @CpuInfoFast, but it failed to set the new field in qmp_query_cpus_fast(), when TARGET_S390X was not defined. The updated @query-cpus-fast example in "qapi-schema.json" showed "arch":"x86" only because qmp_query_cpus_fast() calls g_malloc0() to

Re: [Qemu-devel] [RFC PATCH 03/33] blockjob: Implement block_job_set_speed() centrally

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > All block job drivers support .set_speed and all of them duplicate the > same code to implement it. Move that code to blockjob.c and remove the > now useless callback. > > Signed-off-by: Kevin Wolf > --- > +++

Re: [Qemu-devel] [RFC PATCH 02/33] blockjob: Move RateLimit to BlockJob

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > Every block job has a RateLimit, and they all do the exact same thing > with it, so it should be common infrastructure. Move the struct field > for a start. > > Signed-off-by: Kevin Wolf > --- Reviewed-by: Eric Blake

Re: [Qemu-devel] [Xen-devel] [PATCH 15/16] os-posix: cleanup: Replace perror with error_report

2018-04-24 Thread Alistair Francis
On Tue, Apr 24, 2018 at 10:58 AM, Ian Jackson wrote: > perror() is defined to fprintf(stderr,...). HACKING says > fprintf(stderr,...) is wrong. So perror() is too. > > Signed-off-by: Ian Jackson > CC: Paolo Bonzini >

Re: [Qemu-devel] [PATCH v2 1/2] ipmi: Use proper struct reference for KCS vmstate

2018-04-24 Thread Corey Minyard
On 04/24/2018 10:32 AM, Dr. David Alan Gilbert wrote: * Corey Minyard (miny...@acm.org) wrote: On 03/05/2018 08:09 AM, Dr. David Alan Gilbert wrote: * miny...@acm.org (miny...@acm.org) wrote: From: Corey Minyard The vmstate for isa_ipmi_kcs was referencing into the kcs

Re: [Qemu-devel] [RFC PATCH 01/33] blockjob: Wrappers for progress counter access

2018-04-24 Thread Eric Blake
On 04/24/2018 10:24 AM, Kevin Wolf wrote: > Block job drivers are not expected to mess with the internal of the s/internal/internals/ > BlockJob object, so provide wrapper functions for one of the cases where > they still do it: Updating the progress counter. > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v3 15/22] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions

2018-04-24 Thread Aaron Lindsay
On Apr 17 16:00, Peter Maydell wrote: > On 17 April 2018 at 15:23, Aaron Lindsay wrote: > > On Apr 12 18:17, Peter Maydell wrote: > >> What's the difference between this and ARM_FEATURE_EL2 ? > > > > I use ARM_FEATURE_V7VE in a later patch to guard against implementing >

Re: [Qemu-devel] [RFC PATCH 00/33] Generic background jobs

2018-04-24 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180424152515.25664-1-kw...@redhat.com Subject: [Qemu-devel] [RFC PATCH 00/33] Generic background jobs === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log

[Qemu-devel] [Bug 1763536] Re: go build fails under qemu-ppc64le-static (qemu-user)

2018-04-24 Thread Murilo Opsfelder Araújo
With QEMU from tag v2.12.0-rc4 on Fedora 27 x86_64, it works too. muriloo@laptop$ docker run --rm -it qemutest /go # qemu-ppc64le-static --version qemu-ppc64le version 2.11.94 (v2.12.0-rc4) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers /go # go version go version

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/6] rbd: Switch to byte-based callbacks

2018-04-24 Thread Jason Dillaman
On Tue, Apr 24, 2018 at 3:25 PM, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the last few sector-based callbacks > in the rbd driver. > > Note that the driver was already using byte-based calls for >

Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V

2018-04-24 Thread Palmer Dabbelt
On Tue, 24 Apr 2018 12:07:43 PDT (-0700), peter.mayd...@linaro.org wrote: On 24 April 2018 at 17:40, Palmer Dabbelt wrote: On Tue, 24 Apr 2018 09:03:29 PDT (-0700), alex.ben...@linaro.org wrote: As support was merged into the mainline kernel at 4.15 it is unlikely 3.8.0 is

[Qemu-devel] [PATCH v2 6/6] block: Drop last of the sector-based aio callbacks

2018-04-24 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that all drivers with aio callbacks are using the byte-based interfaces, we can remove the sector-based versions. Signed-off-by: Eric Blake --- v2: rearrange conditionals to put byte-based

[Qemu-devel] [PATCH v2 3/6] null: Switch to byte-based read/write

2018-04-24 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the null-co and null-aio drivers. Note that since the null driver does nothing on writes, it trivially supports the BDRV_REQ_FUA flag (all writes have already

[Qemu-devel] [PATCH v2 4/6] rbd: Switch to byte-based callbacks

2018-04-24 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the rbd driver. Note that the driver was already using byte-based calls for performing actual I/O, so this just gets rid of a round trip of scaling; however,

[Qemu-devel] [PATCH for 2.13 v4 16/20] linux-user: move i386/x86_64 signal.c parts to i386 directory

2018-04-24 Thread Laurent Vivier
No code change, only move code from signal.c to i386/signal.c, except adding includes and exporting setup_frame() and setup_rt_frame(). x86_64/signal.c includes i386/signal.c Signed-off-by: Laurent Vivier Reviewed-by: Alex Bennée Reviewed-by: Richard

Re: [Qemu-devel] What's the next QEMU version after 2.9 ? (or: when is a good point in time to get rid of old interfaces)

2018-04-24 Thread Philippe Mathieu-Daudé
Hi Yongbok Kim, On 03/10/2017 08:58 AM, Yongbok Kim wrote: > On 10/03/2017 11:53, Thomas Huth wrote: >> On 10.03.2017 12:22, Peter Maydell wrote: >>> On 10 March 2017 at 12:07, Jason Wang wrote: On 2017年03月09日 18:20, Yongbok Kim wrote: > Indeed but we still use the

  1   2   3   4   >