[Qemu-devel] [PATCH v6 02/35] atomics: add atomic_op_fetch variants

2016-10-11 Thread Richard Henderson
From: "Emilio G. Cota" This paves the way for upcoming work. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson Message-Id: <1467054136-10430-9-git-send-email-c...@braap.org> ---

[Qemu-devel] [PATCH v6 00/35] cmpxchg-based emulation of atomics

2016-10-11 Thread Richard Henderson
Sixth time is the charm, right? This time I'm certain that it compiles with centos6, and contains the previously missing update from Emilio to atomic_add-bench. r~ Alex Bennée (1): linux-user: enable parallel code generation on clone Emilio G. Cota (18): atomics: add atomic_xor

Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Programmingkid
On Oct 11, 2016, at 2:12 PM, Eric Blake wrote: > On 10/11/2016 01:03 PM, Programmingkid wrote: > >>> +/* Mac OSX has a bug that incorrectly defines SIZE_MAX with >>> + * the wrong type. Our replacement isn't usable in preprocessor >>> + * expressions, but it is sufficient for our needs. */ >>>

Re: [Qemu-devel] [PATCH 0/5] More thread sanitizer fixes and atomic.h improvements

2016-10-11 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH 0/5] More thread sanitizer fixes and atomic.h improvements Message-id:

Re: [Qemu-devel] [PATCH v3 0/7] Runtime pagesize computation

2016-10-11 Thread Richard Henderson
On 10/11/2016 12:08 PM, Peter Maydell wrote: The basic idea here is that: * the target CPU implementation has to opt into variable page size by defining TARGET_PAGE_BITS_VARY, and then calling set_preferred_target_page_bits() in its realize function with whatever the CPU as

Re: [Qemu-devel] vt-x support for qemu

2016-10-11 Thread Anand J
I want to run KVM on qemu. For this qemu must provide vt-x/amd-v instruction support in the software mode. I was planning to try to add this feature in qemu. If somebody is already working on it please reply. Thanks, Anand On Mon, Oct 10, 2016 at 9:48 PM, Anand J

[Qemu-devel] [kvm-unit-tests PATCHv6 3/3] arm: pmu: Add CPI checking

2016-10-11 Thread Christopher Covington
Calculate the numbers of cycles per instruction (CPI) implied by ARM PMU cycle counter values. The code includes a strict checking facility intended for the -icount option in TCG mode but it is not yet enabled in the configuration file. Enabling it must wait on infrastructure improvements which

[Qemu-devel] [kvm-unit-tests PATCHv6 2/3] arm: pmu: Check cycle count increases

2016-10-11 Thread Christopher Covington
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington Reviewed-by: Andrew Jones --- arm/pmu.c | 60

[Qemu-devel] [kvm-unit-tests PATCHv6 1/3] arm: Add PMU test

2016-10-11 Thread Christopher Covington
Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). As of October 2016, whether KVM mode has a PMU at all is a tricky question of which QEMU / mach-virt version is used. So only enable the TCG mode tests for now.

Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Peter Maydell
On 11 October 2016 at 19:12, Eric Blake wrote: > On 10/11/2016 01:03 PM, Programmingkid wrote: > >>> +/* Mac OSX has a bug that incorrectly defines SIZE_MAX with >>> + * the wrong type. Our replacement isn't usable in preprocessor >>> + * expressions, but it is sufficient for

Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option

2016-10-11 Thread Markus Armbruster
Marc-André Lureau writes: > This option does nothing since commit 06ac27f. Deprecate it. > > Signed-off-by: Marc-André Lureau > --- > vl.c | 11 +++ > include/monitor/monitor.h | 2 +- > qemu-options.hx

Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Eric Blake
On 10/11/2016 01:03 PM, Programmingkid wrote: >> +/* Mac OSX has a bug that incorrectly defines SIZE_MAX with >> + * the wrong type. Our replacement isn't usable in preprocessor >> + * expressions, but it is sufficient for our needs. */ >> +#if defined(HAVE_BROKEN_SIZE_MAX) &&

Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Markus Armbruster
Eric Blake writes: > C99 requires SIZE_MAX to be declared with the same type as the > integral promotion of size_t, but OSX mistakenly defines it as > an 'unsigned long long' expression even though size_t is only > 'unsigned long'. Rather than futzing around with whether

[Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Programmingkid
On Oct 11, 2016, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: > C99 requires SIZE_MAX to be declared with the same type as the > integral promotion of size_t, but OSX mistakenly defines it as > an 'unsigned long long' expression even though size_t is only > 'unsigned long'. Rather than

[Qemu-devel] [PATCHv2] monitor: deprecate 'default' option

2016-10-11 Thread Marc-André Lureau
This option does nothing since commit 06ac27f. Deprecate it. Signed-off-by: Marc-André Lureau --- vl.c | 11 +++ include/monitor/monitor.h | 2 +- qemu-options.hx | 8 3 files changed, 8 insertions(+), 13

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 0/7] Runtime pagesize computation

2016-10-11 Thread Peter Maydell
Oops, I messed up Paolo's email address sending this. Sorry about that... thanks -- PMM On 11 October 2016 at 18:08, Peter Maydell wrote: > (I posted version 2 way back in June...) > > The basic idea here is that: > * the target CPU implementation has to opt into

[Qemu-devel] [PATCH v3 2/7] exec.c: Remove static allocation of sub_section of sub_page

2016-10-11 Thread Peter Maydell
From: Vijaya Kumar K Allocate sub_section dynamically. Remove dependency on TARGET_PAGE_SIZE to make run-time page size detection for arm platforms. Signed-off-by: Vijaya Kumar K Message-id:

[Qemu-devel] [very-WIP 3/4] slirp: VMStatify sbuf

2016-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the sbuf structure to a VMStateDescription. Note this uses the VMSTATE_WITH_TMP mechanism to calculate and reload the offsets based on the pointers. Signed-off-by: Dr. David Alan Gilbert --- slirp/sbuf.h | 4

[Qemu-devel] [very-WIP 4/4] virtio/migration: Migrate virtio-net to VMState

2016-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Only lightly smoke-tested so far Signed-off-by: Dr. David Alan Gilbert --- hw/net/virtio-net.c| 317 +++-- include/hw/virtio/virtio-net.h | 4 +- 2 files changed, 214

[Qemu-devel] [very-WIP 2/7] tests/migration: Add test for VMSTATE_WITH_TMP

2016-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a test for VMSTATE_WITH_TMP to tests/test-vmstate.c Signed-off-by: Dr. David Alan Gilbert --- tests/test-vmstate.c | 97 +--- 1 file changed, 93 insertions(+), 4

[Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" VMSTATE_WITH_TMP is for handling structures where some calculation or rearrangement of the data needs to be performed before the data hits the wire. For example, where the value on the wire is an offset from a non-migrated base, but the data

Re: [Qemu-devel] [PATCH v4] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-11 Thread P J P
+-- On Mon, 10 Oct 2016, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote --+ | Your series failed automatic build test. Please find the testing commands and | their output below. If you have docker installed, you can probably reproduce it | locally. I tried to build it locally(without

[Qemu-devel] [PATCH v3 4/7] cpu: Support a target CPU having a variable page size

2016-10-11 Thread Peter Maydell
Support target CPUs having a page size which isn't knownn at compile time. To use this, the CPU implementation should: * define TARGET_PAGE_BITS_VARY * not define TARGET_PAGE_BITS * define TARGET_PAGE_BITS_MIN to the smallest value it might possibly want for TARGET_PAGE_BITS * call

[Qemu-devel] [very-WIP 0/4] Migration: VMSTATE_WITH_TMP

2016-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, I'm interested in comments on the idea here, it's certainly not ready to go in yet; and VERY untested. Here I've added a macro, VMSTATE_WITH_TMP which allows you to allocate a temporary structure, transmit that with a

[Qemu-devel] [PATCH v3 5/7] migration/savevm.c: migrate non-default page size

2016-10-11 Thread Peter Maydell
Add a subsection to vmstate_configuration which is present only if the guest is using a target page size which is different from the default. This allows us to helpfully diagnose attempts to migrate between machines which are using different target page sizes. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH v3 1/7] migration: Remove static allocation of xzblre cache buffer

2016-10-11 Thread Peter Maydell
From: Vijaya Kumar K Allocate xzblre zero page cache buffer dynamically. Remove dependency on TARGET_PAGE_SIZE to make run-time page size detection for arm platforms. Signed-off-by: Vijaya Kumar K Message-id:

[Qemu-devel] [PATCH v3 7/7] hw/arm/virt: Set minimum_page_bits to 12

2016-10-11 Thread Peter Maydell
Since the virt board model will never create a CPU which is pre-ARMv7, we know that our minimum page size is 4K and can set minimum_page_bits accordingly, for improved performance. Note that this is a migration compatibility break, so we introduce it only for the virt-2.8 machine and onward;

[Qemu-devel] [PATCH v3 6/7] target-arm: Make page size a runtime setting

2016-10-11 Thread Peter Maydell
Rather than defining TARGET_PAGE_BITS to always be 10, switch to using a value picked at runtime. This allows us to use 4K pages for modern ARM CPUs (and in particular all 64-bit CPUs) without having to drop support for the old ARMv5 CPUs which had 1K pages. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH v3 3/7] translate-all.c: Compute L1 page table properties at runtime

2016-10-11 Thread Peter Maydell
From: Vijaya Kumar K Remove L1 page mapping table properties computing statically using macros which is dependent on TARGET_PAGE_BITS. Drop macros V_L1_SIZE, V_L1_SHIFT, V_L1_BITS macros and replace with variables which are computed at early stage of VM boot.

[Qemu-devel] [PATCH v3 0/7] Runtime pagesize computation

2016-10-11 Thread Peter Maydell
(I posted version 2 way back in June...) The basic idea here is that: * the target CPU implementation has to opt into variable page size by defining TARGET_PAGE_BITS_VARY, and then calling set_preferred_target_page_bits() in its realize function with whatever the CPU as instantiated

Re: [Qemu-devel] [PATCH] hw/intc/arm_gic_kvm: Fix build on aarch64

2016-10-11 Thread Christopher Covington
On 10/11/2016 12:43 PM, Peter Maydell wrote: > On 11 October 2016 at 17:32, Christopher Covington > wrote: >> Remove unused debugging code to fix native building on aarch64. Without >> this change, the following -Werr output inhibits make from completing. >> >>

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-11 Thread Markus Armbruster
Eric Blake writes: > On 10/11/2016 09:57 AM, Kevin Wolf wrote: >> Should we introduce a new, clean blockdev-stream command that fixes this >> and matches the common name pattern? Of course, block-stream vs. >> blockdev-stream could be a bit confusing, too... >> > > A new

Re: [Qemu-devel] [PATCH 0/3] block: new bdrv_drain implementation

2016-10-11 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH 0/3] block: new bdrv_drain implementation Message-id:

Re: [Qemu-devel] [PATCH 1/3] block: add BDS field to count in-flight requests

2016-10-11 Thread Paolo Bonzini
On 11/10/2016 17:25, Kevin Wolf wrote: > Am 11.10.2016 um 16:09 hat Paolo Bonzini geschrieben: >> Is what you call "a BDS-level bdrv_isolate_begin/end" the same as my >> "bdrv_drained_begin(bs) and bdrv_drained_end(bs), which quiesce all root >> BdrvChildren reachable from bs"? Anyway I think

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr

2016-10-11 Thread Daniel P. Berrange
On Tue, Oct 11, 2016 at 04:18:46PM +, Marc-André Lureau wrote: > Hi > > On Tue, Oct 11, 2016 at 6:28 PM Marc-André Lureau < > marcandre.lur...@gmail.com> wrote: > > > Hi > > > > On Tue, Oct 11, 2016 at 4:21 PM Claudio Imbrenda < > > imbre...@linux.vnet.ibm.com> wrote: > > > > Hi, > > > > I

Re: [Qemu-devel] [PATCH] hw/intc/arm_gic_kvm: Fix build on aarch64

2016-10-11 Thread Peter Maydell
On 11 October 2016 at 17:32, Christopher Covington wrote: > Remove unused debugging code to fix native building on aarch64. Without > this change, the following -Werr output inhibits make from completing. > > qemu/hw/intc/arm_gic_kvm.c:38:18: error: debug_gic_kvm defined

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-11 Thread Markus Armbruster
Kevin Wolf writes: > Am 11.10.2016 um 16:30 hat Alberto Garcia geschrieben: [...] >> 3) QEMU could advertise that feature to the client. This is probably >> simpler than trying to figure it out from the API. I guess that's the >> idea of 'qmp_capabilities'? > > I think that was

[Qemu-devel] [PATCH] hw/intc/arm_gic_kvm: Fix build on aarch64

2016-10-11 Thread Christopher Covington
Remove unused debugging code to fix native building on aarch64. Without this change, the following -Werr output inhibits make from completing. qemu/hw/intc/arm_gic_kvm.c:38:18: error: debug_gic_kvm defined but not used [-Werror=unused-const-variable=] static const int debug_gic_kvm = 0;

[Qemu-devel] [PATCH] char: serial: check divider value against baud base

2016-10-11 Thread P J P
From: Prasad J Pandit 16550A UART device uses an oscillator to generate frequencies (baud base), which decide communication speed. This speed could be changed by dividing it by a divider. If the divider is greater than the baud base, speed is set to zero, leading to a

Re: [Qemu-devel] [PATCH v14 07/21] qapi: permit scalar type conversions in QObjectInputVisitor

2016-10-11 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Currently the QObjectInputVisitor assumes that all scalar > values are directly represented as the final types declared > by the thing being visited. ie it assumes an 'int' is using i.e. > QInt, and a 'bool' is using QBool, etc. This is good

Re: [Qemu-devel] [QEMU PATCH v5 1/6] migration: alternative way to set instance_id in SaveStateEntry

2016-10-11 Thread Michael Roth
Quoting David Gibson (2016-10-10 00:31:20) > On Fri, Oct 07, 2016 at 09:07:49AM +0100, Dr. David Alan Gilbert wrote: > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > On Wed, Oct 05, 2016 at 09:44:57AM -0700, Jianjun Duan wrote: > > > > Please see comments below: > > > > > > > > On

[Qemu-devel] [PATCH v3 1/5] tests/docker: add travis dockerfile

2016-10-11 Thread Alex Bennée
This target grabs the latest Travis containers from their repository at quay.io and then installs QEMU's build dependencies. With this it is possible to run on broadly the same setup as they have on travis-ci.org. Signed-off-by: Alex Bennée ---

[Qemu-devel] [PATCH v3 4/5] tests/docker/Makefile.include: add a generic docker-run target

2016-10-11 Thread Alex Bennée
This re-factors the docker makefile to include a docker-run target which can be controlled entirely from environment variables specified on the make command line. This allows us to run against any given docker image we may have in our repository, for example: make docker-run TEST="test-quick"

[Qemu-devel] [PATCH v3 0/5] generic docker run patches

2016-10-11 Thread Alex Bennée
Hi Fam, I've re-based the series for the generic run target. The aim being to allow a developer to run tests against any generic docker target even if it is not in the list of approved targets: make docker-run TEST=test-quick IMAGE=debian:arm64 \

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr

2016-10-11 Thread Marc-André Lureau
Hi On Tue, Oct 11, 2016 at 6:28 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Tue, Oct 11, 2016 at 4:21 PM Claudio Imbrenda < > imbre...@linux.vnet.ibm.com> wrote: > > Hi, > > I noticed that this patch kills the Qemu monitor for me. If I start a > text-mode guest with

[Qemu-devel] [PATCH v3 2/5] tests/docker: test-build script

2016-10-11 Thread Alex Bennée
Much like test-quick but only builds. This is useful for some of the build targets like ThreadSanitizer that don't yet pass "make check". Signed-off-by: Alex Bennée --- v3 - fix comments for script - merge with new build_dir - flatten default target list ---

[Qemu-devel] [PATCH v3 5/5] tests/docker/Makefile.include: remove verification targets

2016-10-11 Thread Alex Bennée
As it turns out there are a bunch of verification targets we don't hit because of other matching patterns in rules.mk. Drop the verification steps all together. Signed-off-by: Alex Bennée --- v3 - new for v3, could be squashed with previous commit ---

[Qemu-devel] [PATCH v3 3/5] tests/docker: make test-mingw honour TARGET_LIST

2016-10-11 Thread Alex Bennée
The other builders honour this variable, so should the mingw build. Signed-off-by: Alex Bennée --- tests/docker/test-mingw | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw index 3396876..2adadcb

Re: [Qemu-devel] [PATCH 2/3] target-arm: Code changes to implement overwrite of tag field on PC load

2016-10-11 Thread Peter Maydell
On 11 October 2016 at 16:51, Thomas Hanson wrote: > On 5 October 2016 at 16:01, Peter Maydell wrote: >> It matches the style of the rest of the code which generally >> prefers to convert register numbers into TCGv earlier rather >> than later

Re: [Qemu-devel] [PATCH 2/3] target-arm: Code changes to implement overwrite of tag field on PC load

2016-10-11 Thread Richard Henderson
On 10/11/2016 10:51 AM, Thomas Hanson wrote: As a separate issue, we now have functions to load the PC from an immediate value and from a register. Where else could we legitimately load the PC from? E.g. an internal cpu register holding an exception return address? I don't know the

Re: [Qemu-devel] [PATCH 1/3] tests/boot-sector: Use minimum length for the Forth boot script

2016-10-11 Thread Eric Blake
On 10/11/2016 10:19 AM, Thomas Huth wrote: > The pxe-test is quite slow on ppc64 with tcg. We can speed it up > a little bit by decreasing the size of the file that has to be > loaded via TFTP. > > Signed-off-by: Thomas Huth > --- > tests/boot-sector.c | 6 +++--- > 1 file

Re: [Qemu-devel] [PATCH v5 13/35] tcg: Add atomic helpers

2016-10-11 Thread Alex Bennée
Richard Henderson writes: > On 10/11/2016 10:21 AM, Alex Bennée wrote: >> Is this just using plain git tools or one of the >> porcelain layers? > > Just plain git tools. > > In this case it appears I simply left the centos6-adjusted patch set on the > vm, > without pushing

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-11 Thread Eric Blake
On 10/11/2016 09:57 AM, Kevin Wolf wrote: > Should we introduce a new, clean blockdev-stream command that fixes this > and matches the common name pattern? Of course, block-stream vs. > blockdev-stream could be a bit confusing, too... > A new command is easy to introspect (query-commands), lets

Re: [Qemu-devel] [PATCH 2/3] target-arm: Code changes to implement overwrite of tag field on PC load

2016-10-11 Thread Thomas Hanson
On 5 October 2016 at 16:01, Peter Maydell wrote: > On 5 October 2016 at 14:53, Tom Hanson wrote: > > On 09/29/2016 07:24 PM, Peter Maydell wrote: > >> On 16 September 2016 at 10:34, Thomas Hanson > wrote: > >>> +void

Re: [Qemu-devel] [PATCH 1/2] dma-helpers: explicitly pass alignment into dma-helpers

2016-10-11 Thread John Snow
On 10/10/2016 03:23 PM, Mark Cave-Ayland wrote: On 10/10/16 17:34, Eric Blake wrote: On 10/09/2016 11:43 AM, Mark Cave-Ayland wrote: The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not necessarily the case for all platforms. Use this as the default alignment for all

[Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Eric Blake
C99 requires SIZE_MAX to be declared with the same type as the integral promotion of size_t, but OSX mistakenly defines it as an 'unsigned long long' expression even though size_t is only 'unsigned long'. Rather than futzing around with whether size_t is 32- or 64-bits wide (which would be needed

Re: [Qemu-devel] [PATCH v2 4/4] tests/docker/Makefile.include: add a generic docker-run target

2016-10-11 Thread Alex Bennée
Fam Zheng writes: > On Mon, 10/03 17:32, Alex Bennée wrote: >> This re-factors the docker makefile to include a docker-run target which >> can be controlled entirely from environment variables specified on the >> make command line. This allows us to run against any given docker

Re: [Qemu-devel] [PATCH v5 13/35] tcg: Add atomic helpers

2016-10-11 Thread Richard Henderson
On 10/11/2016 10:21 AM, Alex Bennée wrote: Is this just using plain git tools or one of the porcelain layers? Just plain git tools. In this case it appears I simply left the centos6-adjusted patch set on the vm, without pushing them back to github. So at least I don't have to regenerate

Re: [Qemu-devel] [PATCH RFC] docs: add PCIe devices placement guidelines

2016-10-11 Thread Andrea Bolognani
On Mon, 2016-10-10 at 17:36 +0300, Marcel Apfelbaum wrote: > > What's the advantage in using ARI to stuff more than eight > > of anything that's not Endpoint Devices in a single slot? > >  > > I mean, if we just fill up all 32 slots in a PCIe Root Bus > > with 8 PCIe Root Ports each we already end

Re: [Qemu-devel] [PATCH 1/3] block: add BDS field to count in-flight requests

2016-10-11 Thread Kevin Wolf
Am 11.10.2016 um 16:09 hat Paolo Bonzini geschrieben: > > Anyway, let's see which of the existing bdrv_drained_begin/end users > > would use this (please correct): > > > > * Block jobs use during completion > > > > * The QMP transaction commands to start block jobs drain as well, but > > they

Re: [Qemu-devel] [PATCH v5 13/35] tcg: Add atomic helpers

2016-10-11 Thread Alex Bennée
Richard Henderson writes: > On 10/11/2016 01:47 AM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> Add all of cmpxchg, op_fetch, fetch_op, and xchg. >>> Handle both endian-ness, and sizes up to 8. >>> Handle expanding non-atomically, when

Re: [Qemu-devel] [PATCH v6 08/15] qstring: Add qstring_wrap_str()

2016-10-11 Thread Marc-André Lureau
Hi On Tue, Oct 11, 2016 at 7:05 PM Eric Blake wrote: > On 10/11/2016 10:04 AM, Eric Blake wrote: > > On 10/11/2016 06:08 AM, Marc-André Lureau wrote: > > > >>> +++ b/block.c > >>> @@ -1640,7 +1640,8 @@ static BlockDriverState > >>> *bdrv_append_temp_snapshot(BlockDriverState

[Qemu-devel] [PATCH v6 08.5/15] fixup! qstring: Add qstring_wrap_str()

2016-10-11 Thread Eric Blake
Signed-off-by: Eric Blake --- squash this in to address Marc-Andre's finding on a harmless extra g_free. --- block.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 16d5981..6f00fd4 100644 --- a/block.c +++ b/block.c @@

[Qemu-devel] [PATCH] char.h: misc doc fix

2016-10-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 19dad3f..d0ffdbd 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@

[Qemu-devel] [PATCH 3/3] tests/boot-sector: Increase time-out to 90 seconds

2016-10-11 Thread Thomas Huth
Since the PXE tester runs rather slow on ppc64 with tcg, there is a chance that we hit the 60 seconds timeout on machines that have a heavy CPU load. So let's increase the timeout to ease the situation. Signed-off-by: Thomas Huth --- tests/boot-sector.c | 4 ++-- 1 file

[Qemu-devel] [PATCH 2/3] tests/boot-sector: Use mkstemp() to create a unique file name

2016-10-11 Thread Thomas Huth
The pxe-test is run for three different targets now (x86_64, i386 and ppc64), and the bios-tables-test is run for two targets (x86_64 and i386). But each of the tests is using an invariant name for the disk image with the boot sector code - so if the tests are running in parallel, there is a race

[Qemu-devel] [PATCH 1/3] tests/boot-sector: Use minimum length for the Forth boot script

2016-10-11 Thread Thomas Huth
The pxe-test is quite slow on ppc64 with tcg. We can speed it up a little bit by decreasing the size of the file that has to be loaded via TFTP. Signed-off-by: Thomas Huth --- tests/boot-sector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 0/3] Improvements for the boot-sector tester

2016-10-11 Thread Thomas Huth
Here are two patches that try to improve the situation with the slow pxe-test on ppc64 a little bit, and one patch that fixes a potential race condition between tests that run in parallel by using a random filename instead of an invariant one. Thomas Huth (3): tests/boot-sector: Use minimum

Re: [Qemu-devel] [PATCH v5 06/14] nbd: Send message along with server NBD_REP_ERR errors

2016-10-11 Thread Eric Blake
On 07/19/2016 12:15 AM, Fam Zheng wrote: > On Mon, 07/18 22:07, Eric Blake wrote: >> nbd/server.c | 78 >> +--- >> 1 file changed, 59 insertions(+), 19 deletions(-) >> >> diff --git a/nbd/server.c b/nbd/server.c >> index c8716f1..ad31c4a

Re: [Qemu-devel] Multiple QMP socket clients

2016-10-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Oct 11, 2016 at 03:17:04PM +0100, Daniel P. Berrange wrote: > > On Tue, Oct 11, 2016 at 03:08:34PM +0100, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > > On Tue, Oct 11, 2016 at 12:26:37PM

Re: [Qemu-devel] [PATCH v6 12/15] qapi: Support pretty printing in JSON output visitor

2016-10-11 Thread Eric Blake
On 10/11/2016 06:20 AM, Marc-André Lureau wrote: > On Mon, Oct 10, 2016 at 5:44 PM Eric Blake wrote: > >> Add pretty printing, where the format intentionally matches that of >> qobject_to_json() (a later patch will then rework qobject-json.c to >> work on top of the JSON

Re: [Qemu-devel] [PATCH 03/29] target-sparc: add UA2005 TTE bit #defines

2016-10-11 Thread Richard Henderson
On 10/11/2016 08:51 AM, Artyom Tarasenko wrote: On Tue, Oct 11, 2016 at 7:50 AM, Richard Henderson wrote: On 10/10/2016 04:45 PM, Artyom Tarasenko wrote: Hmm. Would it make more sense to reorg these as TTE_US1_* TTE_UA2005_* with some duplication for the bits that

Re: [Qemu-devel] [PATCH v6 08/15] qstring: Add qstring_wrap_str()

2016-10-11 Thread Eric Blake
On 10/11/2016 10:04 AM, Eric Blake wrote: > On 10/11/2016 06:08 AM, Marc-André Lureau wrote: > >>> +++ b/block.c >>> @@ -1640,7 +1640,8 @@ static BlockDriverState >>> *bdrv_append_temp_snapshot(BlockDriverState *bs, >>> qdict_put(snapshot_options, "file.driver", >>>

Re: [Qemu-devel] [PATCH v6 08/15] qstring: Add qstring_wrap_str()

2016-10-11 Thread Eric Blake
On 10/11/2016 06:08 AM, Marc-André Lureau wrote: >> +++ b/block.c >> @@ -1640,7 +1640,8 @@ static BlockDriverState >> *bdrv_append_temp_snapshot(BlockDriverState *bs, >> qdict_put(snapshot_options, "file.driver", >>qstring_from_str("file")); >>

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-11 Thread Kevin Wolf
Am 11.10.2016 um 16:30 hat Alberto Garcia geschrieben: > On Mon 10 Oct 2016 09:09:25 PM CEST, Eric Blake wrote: > >> # @job-id: #optional identifier for the newly-created block job. If > >> # omitted, the device name will be used. (Since 2.7) > >> # > >> -# @device: the device name or

Re: [Qemu-devel] [PATCH v2 2/2] block/replication: Clarify 'top-id' parameter usage

2016-10-11 Thread Eric Blake
On 10/11/2016 05:46 AM, Changlong Xie wrote: > Replication driver only support 'top-id' parameter in secondary side, > and it must not be supplied in primary side Grammar suggestion: The replication driver only supports the 'top-id' parameter for the secondary side; it must not be supplied for

Re: [Qemu-devel] [PATCH v2 1/2] block/replication: prefect the logic to acquire 'top_id'

2016-10-11 Thread Eric Blake
On 10/11/2016 05:46 AM, Changlong Xie wrote: > Only g_strdup(top_id) if 'top_id' is not NULL, although there > is no memory leak here > > Signed-off-by: Changlong Xie > --- > block/replication.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

Re: [Qemu-devel] [PATCH 01/29] target-sparc: don't trap on MMU-fault if MMU is disabled

2016-10-11 Thread Richard Henderson
On 10/11/2016 09:00 AM, Artyom Tarasenko wrote: On Mon, Oct 10, 2016 at 11:14 PM, Richard Henderson wrote: On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: if (is_exec) { -helper_raise_exception(env, TT_CODE_ACCESS); +if (env->lsu & (IMMU_E)) { +

Re: [Qemu-devel] [PATCH 03/15] xen: Create a new file xen_pvdev.c

2016-10-11 Thread Anthony PERARD
On Tue, Oct 04, 2016 at 09:43:32AM +0300, Emil Condrea wrote: > The purpose of the new file is to store generic functions shared by frontend > and backends such as xenstore operations, xendevs. > > Signed-off-by: Quan Xu > Signed-off-by: Emil Condrea

Re: [Qemu-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

2016-10-11 Thread Eric Blake
On 10/11/2016 03:22 AM, Markus Armbruster wrote: > query-memory-devices returns a list of MemoryDeviceInfo: > > ## > # @MemoryDeviceInfo: > # > # Union containing information about a memory device > # > # Since: 2.1 > ## > { 'union': 'MemoryDeviceInfo', 'data':

Re: [Qemu-devel] [PATCH 28/29] target-sparc: move common cpu initialisation routines to sparc64.c

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- hw/sparc64/Makefile.objs | 1 + hw/sparc64/sparc64.c | 378 + hw/sparc64/sun4u.c | 351

Re: [Qemu-devel] [PATCH 29/29] target-sparc: fix up Niagara machine

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: Remove the Niagara stub implementation from sun4u.c and add a machine, compatible with Legion simulator from the OpenSPARC T1 project. The machine uses the firmware supplied with the OpenSPARC T1 project,

Re: [Qemu-devel] [PATCH V2] colo-proxy: fix memory leak

2016-10-11 Thread Eric Blake
On 10/11/2016 02:33 AM, Zhang Chen wrote: > Fix memory leak in colo-compare.c and filter-rewriter.c > Report by Coverity. This part is fine. > > v2: > - use traces instead of fprintf in colo-compare.c > > v1: > - initial patch ...but this part should live... > > Signed-off-by: Zhang

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-11 Thread Alberto Garcia
On Mon 10 Oct 2016 09:09:25 PM CEST, Eric Blake wrote: >> # @job-id: #optional identifier for the newly-created block job. If >> # omitted, the device name will be used. (Since 2.7) >> # >> -# @device: the device name or node-name of a root node >> +# @device: the device or node name

Re: [Qemu-devel] [PATCH v6 3/3] target-i386: Return runnability information on query-cpu-definitions

2016-10-11 Thread Igor Mammedov
On Fri, 7 Oct 2016 17:29:02 -0300 Eduardo Habkost wrote: > Fill the "unavailable-features" field on the x86 implementation > of query-cpu-definitions. > > Cc: Jiri Denemark > Cc: libvir-l...@redhat.com > Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH 26/29] target-sparc: store the UA2005 entries in sun4u format

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: +sun4u_tte = TTE_PA(sun4v_tte) | (sun4v_tte & TTE_VALID_BIT); +sun4u_tte |= (sun4v_tte & 3ULL) << 61; +sun4u_tte |= (sun4v_tte & TTE_NFO_BIT_UA2005) >> 2; +sun4u_tte |= (sun4v_tte & TTE_USED_BIT_UA2005) >> 6; +sun4u_tte |=

Re: [Qemu-devel] [PATCH v4] build: Work around SIZE_MAX bug in OSX headers

2016-10-11 Thread Eric Blake
On 10/11/2016 02:18 AM, Markus Armbruster wrote: >> +#define SIZE_MAX ((sizeof(char)) * -1) > > All right, let's see how this works. > > > Cute, but what's wrong with straightforward > > #define SIZE_MAX ((size_t)-1) I was trying to make the macro usable even in situations where

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr

2016-10-11 Thread Marc-André Lureau
Hi On Tue, Oct 11, 2016 at 4:21 PM Claudio Imbrenda < imbre...@linux.vnet.ibm.com> wrote: > Hi, > > I noticed that this patch kills the Qemu monitor for me. If I start a > text-mode guest with -nographic, then I can't switch to the monitor any > longer with Ctrl+a c . The guest works otherwise,

Re: [Qemu-devel] [PATCH 25/29] target-sparc: implement UA2005 ASI_MMU (0x21)

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: + switch ((addr >> 3) & 0x3) { + case 1: + env->dmmu.mmu_primary_context = val; + env->immu.mmu_primary_context = val; + /* can be optimized to only flush MMU_USER_PRIMARY_IDX +

Re: [Qemu-devel] Multiple QMP socket clients

2016-10-11 Thread Daniel P. Berrange
On Tue, Oct 11, 2016 at 03:17:04PM +0100, Daniel P. Berrange wrote: > On Tue, Oct 11, 2016 at 03:08:34PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > On Tue, Oct 11, 2016 at 12:26:37PM +0200, Samuel Ortiz wrote: > > > > Hi, > > > > > > > > On a

Re: [Qemu-devel] [PATCH] tests/boot-sector: Use mkstemp() to create a unique file name

2016-10-11 Thread Fam Zheng
On Tue, 10/11 15:32, Thomas Huth wrote: > The pxe-test is run for three different targets now (x86_64, i386 > and ppc64), and the bios-tables-test is run for two targets (x86_64 > and i386). But each of the tests is using an invariant name for the > disk image with the boot sector code - so if the

[Qemu-devel] [PATCH v5 1/1] block: improve error handling in raw_open

2016-10-11 Thread Halil Pasic
Make raw_open for POSIX more consistent in handling errors by setting the error object also when qemu_open fails. The error object was set generally set in case of errors, but I guess this case was overlooked. Do the same for win32. Signed-off-by: Halil Pasic

Re: [Qemu-devel] [PATCH 24/29] target-sparc: add more registers to dump_mmu

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/mmu_helper.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 23/29] target-sparc: implement ST_BLKINIT_ ASIs

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: @@ -2234,13 +2234,24 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TCGv addr, switch (da.type) { case GET_ASI_EXCP: break; -case GET_ASI_DTWINX: /* Reserved for stda. */ -gen_exception(dc, TT_ILL_INSN); -

Re: [Qemu-devel] [PATCH] tests/boot-sector: Use mkstemp() to create a unique file name

2016-10-11 Thread Thomas Huth
On 11.10.2016 15:38, Peter Maydell wrote: > On 11 October 2016 at 14:32, Thomas Huth wrote: >> The pxe-test is run for three different targets now (x86_64, i386 >> and ppc64), and the bios-tables-test is run for two targets (x86_64 >> and i386). But each of the tests is using an

Re: [Qemu-devel] [PATCH 1/3] block: add BDS field to count in-flight requests

2016-10-11 Thread Paolo Bonzini
First of all, a correction: >> The exception is that there are places >> where we don't have a BlockBackend and thus call >> bdrv_drain/bdrv_co_drain instead of blk_drain/blk_co_drain Nevermind---it's just that there is no blk_drained_begin/end yet. On 11/10/2016 13:00, Kevin Wolf wrote: >

Re: [Qemu-devel] [PATCH 02/15] xen: Fix coding style warnings

2016-10-11 Thread Anthony PERARD
On Tue, Oct 04, 2016 at 09:43:31AM +0300, Emil Condrea wrote: > Fixes: > * WARNING: line over 80 characters > > Signed-off-by: Emil Condrea > --- > hw/block/xen_disk.c | 3 ++- > hw/char/xen_console.c| 6 -- > hw/display/xenfb.c | 30

Re: [Qemu-devel] [PATCH 22/29] target-sparc: implement auto-demapping for UA2005 CPUs

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: +uint64_t size = 1024ULL * (8 << 3 * TTE_PGSIZE(tlb[i].tte)); Your previous expression, 8192 << 3 * TTE_PGSIZE is clearer. Perhaps this itself should be extracted as a macro? +if ((new_vaddr == vaddr) ||

Re: [Qemu-devel] [PATCH 21/29] target-sparc: allow 256M sized pages

2016-10-11 Thread Richard Henderson
On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: +uint64_t mask = 1ULL + ~(8192ULL << 3 * TTE_PGSIZE(tlb->tte)); Not the first time it has appeared in this patch series, but I find the "1 + ~" idiom to be strange. Surely plain old "-" is clearer. r~

Re: [Qemu-devel] Multiple QMP socket clients

2016-10-11 Thread Daniel P. Berrange
On Tue, Oct 11, 2016 at 03:08:34PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > On Tue, Oct 11, 2016 at 12:26:37PM +0200, Samuel Ortiz wrote: > > > Hi, > > > > > > On a qemu instance started with a qmp unix socket: > > > > > > -qmp

<    1   2   3   4   >