Re: [Qemu-devel] [PATCHv2] macio: convert pmac_ide_ops from old_mmio

2017-09-19 Thread Mark Cave-Ayland
On 20/09/17 05:29, David Gibson wrote: > On Tue, Sep 19, 2017 at 09:02:54PM +0100, Mark Cave-Ayland wrote: >> Signed-off-by: Mark Cave-Ayland > > This didn't apply for me. Can you rebase on top of ppc-for-2.11, please. (goes and looks) Okay looks like the issue

Re: [Qemu-devel] [RFC 06/15] monitor: move the cur_mon hack deeper for QMP

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 04:05:48PM -0500, Eric Blake wrote: > On 09/14/2017 02:50 AM, Peter Xu wrote: > > In monitor_qmp_read(), we have the hack to temporarily replace the > > cur_mon pointer. Now we move this hack deeper inside the QMP dispatcher > > routine since the Monitor pointer can be

Re: [Qemu-devel] [RFC 05/15] qjson: add "opaque" field to JSONMessageParser

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 03:55:41PM -0500, Eric Blake wrote: > On 09/14/2017 02:50 AM, Peter Xu wrote: > > It'll be passed to emit() as well when it happens. > > > > Signed-off-by: Peter Xu > > --- > > include/qapi/qmp/json-streamer.h | 8 ++-- > > monitor.c

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-19 Thread Nikunj A Dadhania
David Gibson writes: > On Wed, Sep 20, 2017 at 09:50:24AM +0530, Nikunj A Dadhania wrote: >> David Gibson writes: >> >> > On Fri, Sep 15, 2017 at 02:39:16PM +0530, Nikunj A Dadhania wrote: >> >> David Gibson

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-19 Thread David Gibson
On Wed, Sep 20, 2017 at 09:50:24AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > On Fri, Sep 15, 2017 at 02:39:16PM +0530, Nikunj A Dadhania wrote: > >> David Gibson writes: > >> > >> > On Fri, Sep 15, 2017 at 01:53:15PM

Re: [Qemu-devel] [RFC 02/15] qobject: allow NULL for qstring_get_str()

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 03:48:35PM -0500, Eric Blake wrote: > On 09/14/2017 02:50 AM, Peter Xu wrote: > > Then I can get NULL rather than crash when calling things like: > > > > qstring_get_str(qobject_to_qstring(object)); > > > > when key does not exist. > > Right now, qdict_get_str() is

Re: [Qemu-devel] [RFC PATCH v2 03/21] ppc/xive: define the XIVE internal tables

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 03:46:20PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:39 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:17PM +0200, Cédric Le Goater wrote: > >> The XIVE interrupt controller of the POWER9 uses a set of tables to > >> redirect exception from event sources

Re: [Qemu-devel] [PATCHv2] macio: convert pmac_ide_ops from old_mmio

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 09:02:54PM +0100, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland This didn't apply for me. Can you rebase on top of ppc-for-2.11, please. > --- > hw/ide/macio.c | 181 > +++-

Re: [Qemu-devel] [PATCH v2 2/2] spapr_pci: make index property mandatory

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 04:03:57PM +0200, Greg Kurz wrote: > On Tue, 19 Sep 2017 09:03:58 +1000 > David Gibson wrote: > > > On Thu, Sep 14, 2017 at 04:14:44PM +0200, Greg Kurz wrote: > > > Creating several PHBs without index property confuses the DRC code > > > and

Re: [Qemu-devel] [RFC PATCH v2 06/21] ppc/xive: introduce handlers for interrupt sources

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 05:08:21PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:48 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:20PM +0200, Cédric Le Goater wrote: > >> These are very similar to the XICS handlers in a simpler form. They > >> make use of the ICSIRQState array of

Re: [Qemu-devel] [RFC PATCH v2 05/21] ppc/xive: allocate IRQ numbers for the IPIs

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 04:52:10PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:45 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:19PM +0200, Cédric Le Goater wrote: > >> The number of IPIs is deduced from the max number of CPUs the guest > >> supports and the IRQ numbers for the

Re: [Qemu-devel] [RFC 01/15] char-io: fix possible race on IOWatchPoll

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 02:59:37PM -0500, Eric Blake wrote: > On 09/14/2017 02:50 AM, Peter Xu wrote: > > This is not a problem if we are only having one single loop thread like > > before. However, after per-monitor thread is introduced, this is not > > true any more, and the race can happen. >

Re: [Qemu-devel] [RFC 00/15] QMP: out-of-band (OOB) execution support

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 10:19:21AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Mon, Sep 18, 2017 at 06:09:29PM +0200, Marc-André Lureau wrote: > > > On Mon, Sep 18, 2017 at 1:26 PM, Dr. David Alan Gilbert > > > wrote: > > > > *

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-19 Thread Nikunj A Dadhania
David Gibson writes: > On Fri, Sep 15, 2017 at 02:39:16PM +0530, Nikunj A Dadhania wrote: >> David Gibson writes: >> >> > On Fri, Sep 15, 2017 at 01:53:15PM +0530, Nikunj A Dadhania wrote: >> >> David Gibson

Re: [Qemu-devel] [PATCH 5/5] migration: Route more error paths

2017-09-19 Thread Fam Zheng
On Tue, 09/19 19:00, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > vmstate_save is called in a few places, and vmstate_save_state is > called in lots of places. > > Route error returns from the easier cases back up; there are lots > of more

[Qemu-devel] [RFC] Another Para-Virtualization page recycler. Empty Guest OS free pages every few seconds

2017-09-19 Thread XaviLi
PPR (Per Page Recycler) is a para virtualization driver currently available for KVM hosts and Linux/Windows guests. With PPR, every page freed to Guest OS can be recycled in seconds by hypervisor. Therefore, VMs can dynamical allocate/free pages from hypervisor according to application’s

[Qemu-devel] [RFC] A multithread lockless deduplication engine

2017-09-19 Thread XaviLi
PageONE (Page Object Non-duplicate Engine) is a multithread kernel page deduplication engine. It is based on a lock-less tree algorithm we currently named as SD (Static and Dynamic) Tree. Normal operations such as insert/query/delete to this tree are block-less. Adding more CPU cores can

Re: [Qemu-devel] [PATCH 5/5] migration: Route more error paths

2017-09-19 Thread Peter Xu
On Tue, Sep 19, 2017 at 07:00:38PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > vmstate_save is called in a few places, and vmstate_save_state is > called in lots of places. > > Route error returns from the easier cases back up; there are

[Qemu-devel] [PATCH v10 13/13] docker: Use archive-source.py

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Alex Bennée --- tests/docker/Makefile.include | 14 ++ tests/docker/run | 8 +--- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/tests/docker/Makefile.include

[Qemu-devel] [PATCH v10 12/13] tests: Add README for vm tests

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/vm/README | 89 + 1 file changed, 89 insertions(+) create mode 100644 tests/vm/README diff --git a/tests/vm/README b/tests/vm/README new file mode 100644 index 00..ae53dce6ee ---

[Qemu-devel] [PATCH v10 08/13] tests: Add NetBSD image

2017-09-19 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng Reviewed-by: Kamil Rytarowski --- tests/vm/netbsd | 42 ++ 1 file changed, 42 insertions(+) create mode 100755

[Qemu-devel] [PATCH v10 11/13] MAINTAINERS: Add tests/vm entry

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3d735979ef..0f8f1db332 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1901,6 +1901,7 @@ S: Maintained

[Qemu-devel] [PATCH v10 07/13] tests: Add FreeBSD image

2017-09-19 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng --- tests/vm/freebsd | 42 ++ 1 file changed, 42 insertions(+) create mode 100755 tests/vm/freebsd diff --git

[Qemu-devel] [PATCH v10 10/13] Makefile: Add rules to run vm tests

2017-09-19 Thread Fam Zheng
Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Fam Zheng --- Makefile | 2 ++ configure | 2 +- tests/vm/Makefile.include | 42 ++ 3 files

[Qemu-devel] [PATCH v10 05/13] tests: Add vm test lib

2017-09-19 Thread Fam Zheng
This is the common code to implement a "VM test" to 1) Download and initialize a pre-defined VM that has necessary dependencies to build QEMU and SSH access. 2) Archive $SRC_PATH to a .tar file. 3) Boot the VM, and pass the source tar file to the guest. 4) SSH into the VM, untar the

[Qemu-devel] [PATCH v10 09/13] tests: Add OpenBSD image

2017-09-19 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng --- tests/vm/openbsd | 43 +++ 1 file changed, 43 insertions(+) create mode 100755 tests/vm/openbsd diff --git

[Qemu-devel] [PATCH v10 06/13] tests: Add ubuntu.i386 image

2017-09-19 Thread Fam Zheng
This adds a 32bit guest. The official LTS cloud image is downloaded and initialized with cloud-init. Signed-off-by: Fam Zheng --- tests/vm/ubuntu.i386 | 89 1 file changed, 89 insertions(+) create mode 100755

[Qemu-devel] [PATCH v10 04/13] tests: Add a test key pair

2017-09-19 Thread Fam Zheng
This will be used by setup test user ssh. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- tests/keys/README | 6 ++ tests/keys/id_rsa | 27 +++ tests/keys/id_rsa.pub | 1 + 3 files changed, 34 insertions(+) create

[Qemu-devel] [PATCH v10 01/13] gitignore: Ignore vm test images

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- .gitignore | 1 + tests/.gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index cf65316863..40acfcb9e2 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ /vscclient /vhost-user-scsi

[Qemu-devel] [PATCH v10 03/13] scripts: Add archive-source.sh

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- scripts/archive-source.sh | 51 +++ 1 file changed, 51 insertions(+) create mode 100755 scripts/archive-source.sh diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh new file mode 100755

[Qemu-devel] [PATCH v10 02/13] qemu.py: Add "wait()" method

2017-09-19 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Alex Bennée --- scripts/qemu.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 5e02dd8e78..2b5c2accb5 100644 ---

[Qemu-devel] [PATCH v10 00/13] tests: Add VM based build tests (for non-x86_64 and/or non-Linux)

2017-09-19 Thread Fam Zheng
v10: Rebase - trivial conflict in docker Makefile.include. Specify bash in shebang. [Eric] Tweaks in README and pub key comment. [Eric] Clean up $1.list if tar failed. [Eric] Set locale in cloud-init for ubuntu image. v9: Don't use 'set -e' in archive-source.sh. [Eric] Add

Re: [Qemu-devel] [PATCH v9 04/13] tests: Add a test key pair

2017-09-19 Thread Fam Zheng
On Tue, 09/19 10:18, Eric Blake wrote: > On 09/19/2017 02:27 AM, Fam Zheng wrote: > > This will be used by setup test user ssh. > > > > Signed-off-by: Fam Zheng > > --- > > tests/keys/README | 6 ++ > > tests/keys/id_rsa | 27 +++ > >

Re: [Qemu-devel] [PATCH v9 03/13] scripts: Add archive-source.sh

2017-09-19 Thread Fam Zheng
On Tue, 09/19 10:10, Eric Blake wrote: > On 09/19/2017 02:27 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > scripts/archive-source.sh | 46 > > ++ > > 1 file changed, 46 insertions(+) > > create mode 100755

Re: [Qemu-devel] [PATCH v9 06/13] tests: Add ubuntu.i386 image

2017-09-19 Thread Fam Zheng
On Tue, 09/19 16:12, Alex Bennée wrote: > Could we also do something about locales in this setup. The build gives > a lot of noise like: > > perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). > perl: warning: Setting locale failed. > perl: warning: Please check that

Re: [Qemu-devel] [PATCH v4 0/3] x86_iommu: Fix segfault when starting on non-PCI machines

2017-09-19 Thread Peter Xu
On Mon, Sep 18, 2017 at 04:37:47PM +0200, Mohammed Gamal wrote: > Starting qemu with > qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu > leads to a segfault. The code assume PCI bus is present and > tries to access the bus structure without checking. > > The patch series moves the error

Re: [Qemu-devel] [PATCH v2] spapr: introduce helpers to migrate HPT chunks and the end marker

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 04:11:07PM +0200, Greg Kurz wrote: > This consolidates some duplicated code in a dedicated helpers. > > Signed-off-by: Greg Kurz Applied to ppc-for-2.11. > --- > v2: - open-code writes for the end marker > --- > hw/ppc/spapr.c | 38

Re: [Qemu-devel] [PATCH v9 05/20] dirty-bitmap: Avoid size query failure during truncate

2017-09-19 Thread Fam Zheng
On Tue, 09/19 19:00, John Snow wrote: > > > On 09/19/2017 04:18 PM, Eric Blake wrote: > > We've previously fixed several places where we failed to account > > for possible errors from bdrv_nb_sectors(). Fix another one by > > making bdrv_dirty_bitmap_truncate() take the new size from the > >

Re: [Qemu-devel] [PATCH] ppc/pnv: Improve macro parenthesization

2017-09-19 Thread David Gibson
On Tue, Sep 19, 2017 at 09:16:03AM -0500, Eric Blake wrote: > Although none of the existing macro call-sites were broken, > it's always better to write macros that properly parenthesize > arguments that can be complex expressions, so that the intended > order of operations is not broken. > >

Re: [Qemu-devel] [PATCH v2 4/4] s390x/css: support ccw IDA

2017-09-19 Thread Dong Jia Shi
* Halil Pasic [2017-09-19 20:05:48 +0200]: > > > On 09/19/2017 02:23 PM, Cornelia Huck wrote: > > +{ > > +union {uint64_t fmt2; uint32_t fmt1; } idaw; > ^ > Nit. > > >> Maybe checkpatch

Re: [Qemu-devel] [PATCH v2 3/4] virtio-ccw: use ccw data stream

2017-09-19 Thread Dong Jia Shi
* Halil Pasic [2017-09-19 15:30:29 +0200]: > > > On 09/19/2017 11:06 AM, Cornelia Huck wrote: > > On Tue, 19 Sep 2017 11:37:30 +0800 > > Dong Jia Shi wrote: > > > >> * Halil Pasic [2017-09-13 13:50:28 +0200]: >

[Qemu-devel] [PATCH 07/12] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing

2017-09-19 Thread Michael Roth
From: Pavel Butsykin After calling qcow2_inactivate(), all qcow2 caches must be flushed, but this may not happen, because the last call qcow2_store_persistent_dirty_bitmaps() can lead to marking l2/refcont cache as dirty. Let's move

[Qemu-devel] [PATCH 04/12] virtfs: error out gracefully when mandatory suboptions are missing

2017-09-19 Thread Michael Roth
From: Greg Kurz We internally convert -virtfs to -fsdev/-device. If the user doesn't provide the path or security_model suboptions, and the fsdev backend requires them, we hit an assertion when populating the internal -fsdev option: util/qemu-option.c:547: opt_set: Assertion

[Qemu-devel] [PATCH 06/12] hw/arm/allwinner-a10: Mark the allwinner-a10 device with user_creatable = false

2017-09-19 Thread Michael Roth
From: Thomas Huth QEMU currently exits unexpectedly when the user accidentially tries to do something like this: $ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic QEMU 2.9.93 monitor - type 'help' for more information (qemu) device_add allwinner-a10

[Qemu-devel] [PATCH 02/12] s390-ccw: Fix alignment for CCW1

2017-09-19 Thread Michael Roth
From: Farhan Ali The commit 198c0d1f9df8c4 s390x/css: check ccw address validity exposes an alignment issue in ccw bios. According to PoP the CCW must be doubleword aligned. Let's fix this in the bios. Cc: qemu-sta...@nongnu.org Signed-off-by: Farhan Ali

[Qemu-devel] [PATCH 11/12] libvhost-user: support resuming vq->last_avail_idx based on used_idx

2017-09-19 Thread Michael Roth
From: Marc-André Lureau This is the same workaround as commit 523b018dde3b765, which was lost with libvhost-user transition in commit e10e798c85c2331. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PATCH 12/12] vhost-user-bridge: fix resume regression (since 2.9)

2017-09-19 Thread Michael Roth
From: Marc-André Lureau Commit e10e798c85c2331 switched to libvhost-user which lacked support for resuming the avail_idx based on used_idx. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1485867 Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH 08/12] vhost: Release memory references on cleanup

2017-09-19 Thread Michael Roth
From: Alex Williamson vhost registers a MemoryListener where it adds and removes references to MemoryRegions as the MemoryRegionSections pass through. The region_add callback is invoked for each existing section when the MemoryListener is registered, but

[Qemu-devel] [PATCH 01/12] slirp: fix clearing ifq_so from pending packets

2017-09-19 Thread Michael Roth
From: Samuel Thibault The if_fastq and if_batchq contain not only packets, but queues of packets for the same socket. When sofree frees a socket, it thus has to clear ifq_so from all the packets from the queues, not only the first. Signed-off-by: Samuel Thibault

[Qemu-devel] [PATCH 00/12] Patch Round-up for stable 2.10.1, freeze on 2017-09-27

2017-09-19 Thread Michael Roth
Hi everyone, The following new patches are queued for QEMU stable v2.10.1: https://github.com/mdroth/qemu/commits/stable-2.10-staging The release is planned for 2017-10-02: https://wiki.qemu.org/Planning/2.10 Please respond here or CC qemu-sta...@nongnu.org on any patches you think should

[Qemu-devel] [PATCH 05/12] arm_gicv3_kvm: Fix compile warning

2017-09-19 Thread Michael Roth
From: Pranith Kumar Fix the following warning: /home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) {

[Qemu-devel] [PATCH 03/12] target/arm: Fix aa64 ldp register writeback

2017-09-19 Thread Michael Roth
From: Richard Henderson For "ldp x0, x1, [x0]", if the second load is on a second page and the second page is unmapped, the exception would be raised with x0 already modified. This means the instruction couldn't be restarted. Cc: qemu-...@nongnu.org Cc:

[Qemu-devel] [PATCH 09/12] mps2-an511: Fix wiring of UART overflow interrupt lines

2017-09-19 Thread Michael Roth
From: Peter Maydell Fix an error that meant we were wiring every UART's overflow interrupts into the same inputs 0 and 1 of the OR gate, rather than giving each its own input. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 10/12] scsi-bus: correct responses for INQUIRY and REQUEST SENSE

2017-09-19 Thread Michael Roth
From: Hannes Reinecke According to SPC-3 INQUIRY and REQUEST SENSE should return GOOD even on unsupported LUNS. Signed-off-by: Hannes Reinecke Message-Id: <1503049022-14749-1-git-send-email-h...@suse.de> Reported-by: Laszlo Ersek Fixes:

Re: [Qemu-devel] [PATCH v2] hw/sd: fix out-of-bounds check for multi block reads

2017-09-19 Thread Alistair Francis
On Tue, Sep 19, 2017 at 1:23 AM, Michael Olbrich wrote: > On Mon, Sep 18, 2017 at 02:28:26PM -0700, Alistair Francis wrote: >> On Sat, Sep 16, 2017 at 3:35 AM, Michael Olbrich >> wrote: >> > The current code checks if the next block exceeds the

Re: [Qemu-devel] [PATCH] target/arm: Remove out of date ARM ARM section references in A64 decoder

2017-09-19 Thread Alistair Francis
On Fri, Sep 15, 2017 at 8:08 AM, Peter Maydell wrote: > In the A64 decoder, we have a lot of references to section numbers > from version A.a of the v8A ARM ARM (DDI0487). This version of the > document is now long obsolete (we are currently on revision B.a), > and

Re: [Qemu-devel] [PATCH v2 1/1] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro

2017-09-19 Thread Alistair Francis
On Fri, Sep 15, 2017 at 3:37 PM, Max Filippov wrote: > On Fri, Sep 15, 2017 at 2:56 PM, Alistair Francis > wrote: >> Instead of using the hardcoded (MemTxAttrs){0} for no memory attributes >> let's use the already defined MEMTXATTRS_UNSPECIFIED

[Qemu-devel] qmeu-arm SIGSEGV for self-modifying code

2017-09-19 Thread John Reiser
[Moving here from https://bugzilla.redhat.com/show_bug.cgi?id=1493304 ] qemu-arm from qemu-user-2.10.0-1.fc27.x86_64 (thus emulating 32-bit ARM on x86_64) generates SIGSEGV when code modifies a never-previously executed instruction that is on a writable page and is 848 bytes ahead of pc. A

[Qemu-devel] [PATCH 3/3] linux-user: add SO_LINGER to getsockopt

2017-09-19 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/syscall.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ad689dad50..91bd27c63a 100644 --- a/linux-user/syscall.c

[Qemu-devel] [PATCH 2/3] linux-user: add SO_LINGER to setsockopt

2017-09-19 Thread Carlo Marcelo Arenas Belón
Original implementation by Chen Gang; all bugs mine Signed-off-by: Chen Gang Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/syscall.c | 15 +++ linux-user/syscall_defs.h | 5 + 2 files changed, 20 insertions(+) diff

[Qemu-devel] [PATCH 1/3] linux-user: fix TARGET_SO_LINGER for sparc

2017-09-19 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/socket.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/socket.h b/linux-user/socket.h index 7051cd2cf4..129f9b4713 100644 --- a/linux-user/socket.h +++ b/linux-user/socket.h @@

Re: [Qemu-devel] [PATCH v9 05/20] dirty-bitmap: Avoid size query failure during truncate

2017-09-19 Thread John Snow
On 09/19/2017 04:18 PM, Eric Blake wrote: > We've previously fixed several places where we failed to account > for possible errors from bdrv_nb_sectors(). Fix another one by > making bdrv_dirty_bitmap_truncate() take the new size from the > caller instead of querying itself; then adjust the

Re: [Qemu-devel] [PATCH 2/2] hw/pcie: disable IO port fwd by default for pcie-root-port

2017-09-19 Thread Laszlo Ersek
Hi Marcel, On 09/06/17 16:26, Marcel Apfelbaum wrote: > For most cases the devices attached to PCIe Root Ports > do not need IO ports range, add an 'enable-io-fwd' property > making it false by default, but keeping it true for older machines. > > Signed-off-by: Marcel Apfelbaum

Re: [Qemu-devel] [RFC 07/15] monitor: unify global init

2017-09-19 Thread Eric Blake
On 09/19/2017 04:35 PM, Eric Blake wrote: > On 09/14/2017 02:50 AM, Peter Xu wrote: >> There are many places for monitor init its globals, at least: >> > Are we sure that this new function is called sooner than any access to > monitor_lock, > >> -static void __attribute__((constructor))

Re: [Qemu-devel] [PATCH V8] qqq: module for synchronizing with a simulation

2017-09-19 Thread nutarojj
From: "James J. Nutaro" This revision of the patch fixes and error in which a callback is registered to act read the synchronization socket when qemu indicates it has data. This causes a deadlock and the callback was removed. James J. Nutaro (1): Synchronize the qemu

[Qemu-devel] [PATCH 1/2] ppc: remove unused CPU definitions

2017-09-19 Thread John Snow
Following commit aef77960, remove now-unused definitions from cpu-models.h. Signed-off-by: John Snow --- target/ppc/cpu-models.h | 32 1 file changed, 32 deletions(-) diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h index

[Qemu-devel] [PATCH 0/2] ppc: remove dead definitions

2017-09-19 Thread John Snow
Following conversation from: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg05362.html Split into two patches: (1) Definitions that match Igor's cleanup precisely (2) Everything else I brazenly took a chainsaw to with little precision (Only lightly tested.) John Snow (2): ppc:

[Qemu-devel] [PATCH 2/2] ppc: remove all unused CPU definitions

2017-09-19 Thread John Snow
Remove *all* unused CPU definitions as indicated by compile-time `#if 0` constructs. Signed-off-by: John Snow --- target/ppc/cpu-models.h | 223 1 file changed, 223 deletions(-) diff --git a/target/ppc/cpu-models.h

Re: [Qemu-devel] [RFC 07/15] monitor: unify global init

2017-09-19 Thread Eric Blake
On 09/14/2017 02:50 AM, Peter Xu wrote: > There are many places for monitor init its globals, at least: > > - monitor_init_qmp_commands() at the very beginning > - single function to init monitor_lock > - in the first entry of monitor_init() using "is_first_init" > > Unify them a bit. > >

Re: [Qemu-devel] [PATCH v2] softfloat: rename make_float[x80|128]_init to const_float[x80|128]

2017-09-19 Thread Eric Blake
On 09/19/2017 04:10 PM, Laurent Vivier wrote: > We already have const_float16(), const_float32() and const_float64(), > so rename make_floatx80_init() and make_float128_init() as s/as/to now be/ > const_floatx80() and const_float128(). s/\./, for consistency./ > > Redefine make_float16(),

[Qemu-devel] [PATCH v2] softfloat: rename make_float[x80|128]_init to const_float[x80|128]

2017-09-19 Thread Laurent Vivier
We already have const_float16(), const_float32() and const_float64(), so rename make_floatx80_init() and make_float128_init() as const_floatx80() and const_float128(). Redefine make_float16(), make_float32() and make_float64() as make_floatx80() and make_float128() using a cast. Signed-off-by:

Re: [Qemu-devel] [RFC 06/15] monitor: move the cur_mon hack deeper for QMP

2017-09-19 Thread Eric Blake
On 09/14/2017 02:50 AM, Peter Xu wrote: > In monitor_qmp_read(), we have the hack to temporarily replace the > cur_mon pointer. Now we move this hack deeper inside the QMP dispatcher > routine since the Monitor pointer can be passed in to that using the new > JSON Parser opaque field now. > >

Re: [Qemu-devel] [RFC 05/15] qjson: add "opaque" field to JSONMessageParser

2017-09-19 Thread Eric Blake
On 09/14/2017 02:50 AM, Peter Xu wrote: > It'll be passed to emit() as well when it happens. > > Signed-off-by: Peter Xu > --- > include/qapi/qmp/json-streamer.h | 8 ++-- > monitor.c| 7 --- > qga/main.c | 5 +++-- >

Re: [Qemu-devel] [RFC 02/15] qobject: allow NULL for qstring_get_str()

2017-09-19 Thread Eric Blake
On 09/14/2017 02:50 AM, Peter Xu wrote: > Then I can get NULL rather than crash when calling things like: > > qstring_get_str(qobject_to_qstring(object)); > > when key does not exist. Right now, qdict_get_str() is documented as: * This function assumes that 'key' exists and it stores a *

[Qemu-devel] [PATCH v9 15/20] mirror: Switch mirror_dirty_init() to byte-based iteration

2017-09-19 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin

[Qemu-devel] [PATCH v9 14/20] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes

2017-09-19 Thread Eric Blake
Some of the callers were already scaling bytes to sectors; others can be easily converted to pass byte offsets, all in our shift towards a consistent byte interface everywhere. Making the change will also make it easier to write the hold-out callers to use byte rather than sectors for their

Re: [Qemu-devel] [PATCH v7 1/4] hw/pci: introduce pcie-pci-bridge device

2017-09-19 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 02:36:47AM +0300, Aleksandr Bezzubikov wrote: > Introduce a new PCIExpress-to-PCI Bridge device, > which is a hot-pluggable PCI Express device and > supports devices hot-plug with SHPC. > > This device is intended to replace the DMI-to-PCI Bridge. > > Signed-off-by:

[Qemu-devel] [PATCH v9 20/20] dirty-bitmap: Convert internal hbitmap size/granularity

2017-09-19 Thread Eric Blake
Now that all callers are using byte-based interfaces, there's no reason for our internal hbitmap to remain with sector-based granularity. It also simplifies our internal scaling, since we already know that hbitmap widens requests out to granularity boundaries. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v9 10/20] dirty-bitmap: Set iterator start by offset, not sector

2017-09-19 Thread Eric Blake
All callers to bdrv_dirty_iter_new() passed 0 for their initial starting point, drop that parameter. Most callers to bdrv_set_dirty_iter() were scaling a byte offset to a sector number; the exception qcow2-bitmap will be converted later to use byte rather than sector iteration. Move the scaling

[Qemu-devel] [PATCH v9 16/20] qcow2: Switch qcow2_measure() to byte-based iteration

2017-09-19 Thread Eric Blake
This is new code, but it is easier to read if it makes passes over the image using bytes rather than sectors (and will get easier in the future when bdrv_get_block_status is converted to byte-based). Signed-off-by: Eric Blake Reviewed-by: John Snow

[Qemu-devel] [PATCH v9 08/20] dirty-bitmap: Change bdrv_dirty_bitmap_*serialize*() to take bytes

2017-09-19 Thread Eric Blake
Right now, the dirty-bitmap code exposes the fact that we use a scale of sector granularity in the underlying hbitmap to anything that wants to serialize a dirty bitmap. It's nicer to uniformly expose bytes as our dirty-bitmap interface, matching the previous change to bitmap size. The only

[Qemu-devel] [PATCH v9 07/20] dirty-bitmap: Track bitmap size by bytes

2017-09-19 Thread Eric Blake
We are still using an internal hbitmap that tracks a size in sectors, with the granularity scaled down accordingly, because it lets us use a shortcut for our iterators which are currently sector-based. But there's no reason we can't track the dirty bitmap size in bytes, since it is (mostly) an

[Qemu-devel] [PATCH v9 13/20] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes

2017-09-19 Thread Eric Blake
Half the callers were already scaling bytes to sectors; the other half can eventually be simplified to use byte iteration. Both callers were already using the result as a bool, so make that explicit. Making the change also makes it easier for a future dirty-bitmap patch to offload scaling over

[Qemu-devel] [PULL 12/12] MAINTAINERS: Update git URLs for my trees

2017-09-19 Thread Eduardo Habkost
List the branches where I queue patches for Machine Core, NUMA, Memory Backends, and X86. Update the NUMA section to list the "machine-next" branch instead of "numa". Signed-off-by: Eduardo Habkost Message-Id: <20170901153928.17058-1-ehabk...@redhat.com> Signed-off-by:

[Qemu-devel] [PATCH v9 09/20] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based

2017-09-19 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the qcow2 bitmap helper function sectors_covered_by_bitmap_cluster(), renaming it to bytes_covered_by_bitmap_cluster() in the process. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v9 19/20] dirty-bitmap: Switch bdrv_set_dirty() to bytes

2017-09-19 Thread Eric Blake
Both callers already had bytes available, but were scaling to sectors. Move the scaling to internal code. In the case of bdrv_aligned_pwritev(), we are now passing the exact offset rather than a rounded sector-aligned value, but that's okay as long as dirty bitmap widens start/bytes to

[Qemu-devel] [PULL 10/12] NUMA: Replace MAX_NODES with nb_numa_nodes in for loop

2017-09-19 Thread Eduardo Habkost
From: Dou Liyang In QEMU, the number of the NUMA nodes is determined by parse_numa_opts(). Then, QEMU uses it for iteration, for example: for (i = 0; i < nb_numa_nodes; i++) However, in memory_region_allocate_system_memory(), it uses MAX_NODES not nb_numa_nodes.

[Qemu-devel] [PULL 11/12] hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM

2017-09-19 Thread Eduardo Habkost
Currently, Using the fisrt node without memory on the machine makes QEMU unhappy. With this example command line: ... \ -m 1024M,slots=4,maxmem=32G \ -numa node,nodeid=0 \ -numa node,mem=1024M,nodeid=1 \ -numa node,nodeid=2 \ -numa node,nodeid=3 \ Guest reports "No NUMA configuration

[Qemu-devel] [PATCH v9 18/20] qcow2: Switch store_bitmap_data() to byte-based iteration

2017-09-19 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. iotests 165 was rather weak - on a default 64k-cluster image, where bitmap granularity also defaults to 64k

[Qemu-devel] [PULL 09/12] numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed

2017-09-19 Thread Eduardo Habkost
From: Igor Mammedov Calculating default node-ids for CPUs in possible_cpu_arch_ids() is rather fragile since defaults calculation uses nb_numa_nodes but callback might be potentially called early before all -numa CLI options are parsed, which would lead to cpus assigned only

[Qemu-devel] [PATCH v9 03/20] qcow2: Ensure bitmap serialization is aligned

2017-09-19 Thread Eric Blake
When subdividing a bitmap serialization, the code in hbitmap.c enforces that start/count parameters are aligned (except that count can end early at end-of-bitmap). We exposed this required alignment through bdrv_dirty_bitmap_serialization_align(), but forgot to actually check that we comply with

[Qemu-devel] [PATCH v9 17/20] qcow2: Switch load_bitmap_data() to byte-based iteration

2017-09-19 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Vladimir

[Qemu-devel] [PATCH v9 00/20] make dirty-bitmap byte-based

2017-09-19 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a

[Qemu-devel] [PATCH v9 05/20] dirty-bitmap: Avoid size query failure during truncate

2017-09-19 Thread Eric Blake
We've previously fixed several places where we failed to account for possible errors from bdrv_nb_sectors(). Fix another one by making bdrv_dirty_bitmap_truncate() take the new size from the caller instead of querying itself; then adjust the sole caller bdrv_truncate() to pass the size just

[Qemu-devel] [PATCH v9 11/20] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset

2017-09-19 Thread Eric Blake
Thanks to recent cleanups, most callers were scaling a return value of sectors into bytes (the exception, in qcow2-bitmap, will be converted to byte-based iteration later). Update the interface to do the scaling internally instead. In qcow2-bitmap, the code was specifically checking for an error

[Qemu-devel] [PATCH v9 12/20] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes

2017-09-19 Thread Eric Blake
Thanks to recent cleanups, all callers were scaling a return value of sectors into bytes; do the scaling internally instead. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf Reviewed-by: Fam Zheng

[Qemu-devel] [PULL 08/12] arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly

2017-09-19 Thread Eduardo Habkost
From: Igor Mammedov there are 2 use cases to deal with: 1: fixed CPU models per board/soc 2: boards with user configurable cpu_model and fallback to default cpu_model if user hasn't specified one explicitly For the 1st drop intermediate cpu_model parsing and use

[Qemu-devel] [PATCH v9 01/20] block: Make bdrv_img_create() size selection easier to read

2017-09-19 Thread Eric Blake
All callers of bdrv_img_create() pass in a size, or -1 to read the size from the backing file. We then set that size as the QemuOpt default, which means we will reuse that default rather than the final parameter to qemu_opt_get_size() several lines later. But it is rather confusing to read

[Qemu-devel] [PATCH v9 02/20] hbitmap: Rename serialization_granularity to serialization_align

2017-09-19 Thread Eric Blake
The only client of hbitmap_serialization_granularity() is dirty-bitmap's bdrv_dirty_bitmap_serialization_align(). Keeping the two names consistent is worthwhile, and the shorter name is more representative of what the function returns (the required alignment to be used for start/count of other

[Qemu-devel] [PATCH v9 06/20] dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes

2017-09-19 Thread Eric Blake
We're already reporting bytes for bdrv_dirty_bitmap_granularity(); mixing bytes and sectors in our return values is a recipe for confusion. A later cleanup will convert dirty bitmap internals to be entirely byte-based, but in the meantime, we should report the bitmap size in bytes. The only

  1   2   3   4   5   6   7   >