[Qemu-devel] [PATCH v3 5/6] cadence_gem: Correct indentation

2016-07-26 Thread Alistair Francis
Fix up the indentation inside the for loop that was introduced in the previous patch. This commit is almost empty if viewed using 'git show -w', except for a few changes that were required to avoid the 80 charecter line limit. Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v3 0/2] improve error handling of global properties

2016-07-26 Thread Eduardo Habkost
On Fri, Jul 22, 2016 at 01:01:10AM +0200, Greg Kurz wrote: > As suggested by Eduardo, this series split the error handling of global > properties in two separate patches. Reviewed-by: Eduardo Habkost Applied to machine-next, thanks. -- Eduardo

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

2016-07-26 Thread Max Reitz
On 26.07.2016 19:18, Halil Pasic wrote: > > > On 07/26/2016 05:42 PM, Max Reitz wrote: >>> +++ b/block/raw-posix.c @@ -485,6 +485,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, s->fd = -1; fd = qemu_open(filename, s->open_flags, 0644);

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

2016-07-26 Thread Sascha Silbe
Dear Max, Max Reitz writes: > We don't guarantee that error_setg_errno() does not modify errno. (In > practice it should not, but we don't guarantee that.) I agree it's a good general policy to _not_ rely on the callee explicitly saving and restoring errno. Especially since

[Qemu-devel] [PATCH v3 0/6] Add support for Cadence GEM priority queues

2016-07-26 Thread Alistair Francis
This patch series adds initial priority queue support to the Cadence GEM device. This is based on original work by Peter C, that has been ported to the latest version of QEMU. There is more GEM work that I'd like to upstream after this, but I figured this a good place to start. I have done

[Qemu-devel] [PATCH v3 4/6] cadence_gem: Add queue support

2016-07-26 Thread Alistair Francis
Signed-off-by: Alistair Francis --- There is a indentation error in this patch in the gem_transmit function. I have written it like that to make it easier to see the changes. It is fixed in the next patch. V3: -Fix up number of queues logic - Fixup vmstate version

[Qemu-devel] [PATCH v3 1/6] cadence_gem: QOMify Cadence GEM

2016-07-26 Thread Alistair Francis
The sysbus_init_irq() call will eventually depend on a property so it needs to be in the realize function. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V2: - Update commit message hw/net/cadence_gem.c | 28

[Qemu-devel] [PATCH v3 6/6] xlnx-zynqmp: Set the number of priority queues

2016-07-26 Thread Alistair Francis
Set the ZynqMP number of priority queues to 2. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- hw/arm/xlnx-zynqmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index

Re: [Qemu-devel] [PATCH v2 3/6] exec: set cpu_index only if it's not been explictly set

2016-07-26 Thread Eduardo Habkost
On Mon, Jul 25, 2016 at 11:59:21AM +0200, Igor Mammedov wrote: > it keeps the legacy behavior for all users that doesn't care > about stable cpu_index value, but would allow boards that > would support device_add/device_del to set stable cpu_index > that won't depend on order in which cpus are

Re: [Qemu-devel] [PATCH v2 0/6] Fix migration issues with arbitrary cpu-hot(un)plug

2016-07-26 Thread Eduardo Habkost
On Mon, Jul 25, 2016 at 11:59:18AM +0200, Igor Mammedov wrote: [...] > Igor Mammedov (6): > exec: reduce CONFIG_USER_ONLY ifdeffenery > exec: don't use cpu_index to detect if cpu_exec_init()'s been called > for cpu > exec: set cpu_index only if it's not been explictly set > qdev: fix

[Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-26 Thread Sascha Silbe
As a general policy, we want callers to save errno themselves. error_setg_internal() currently goes out of its way to preserve errno, so with the API documentation not mentioning it either way, callers might come to rely on the current behaviour of the implementation. Spell out that we don't want

[Qemu-devel] [PATCH RFC v0 4/6] target-ppc: add vslv instruction

2016-07-26 Thread Nikunj A Dadhania
From: Vivek Andrew Sha vslv: Vector Shift Left Variable Signed-off-by: Vivek Andrew Sha Signed-off-by: Nikunj A Dadhania --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 14 ++

[Qemu-devel] [PATCH RFC v0 1/6] target-ppc: add dtstsfi[q] instructions

2016-07-26 Thread Nikunj A Dadhania
From: Sandipan Das DFP Test Significance Immediate [Quad] Signed-off-by: Sandipan Das Signed-off-by: Nikunj A Dadhania --- target-ppc/dfp_helper.c | 35 +++ target-ppc/helper.h

[Qemu-devel] [PATCH RFC v0 3/6] target-ppc: add vcmpnez[b, h, w][.] instructions

2016-07-26 Thread Nikunj A Dadhania
From: Swapnil Bokade Adds following instructions: vcmpnezb[.]: Vector Compare Not Equal or Zero Byte vcmpnezh[.]: Vector Compare Not Equal or Zero Halfword vcmpnezw[.]: Vector Compare Not Equal or Zero Word Signed-off-by: Swapnil Bokade

[Qemu-devel] [PATCH RFC v0 0/6] POWER9 TCG enablements - part2

2016-07-26 Thread Nikunj A Dadhania
This series contains 11 new instructions for POWER9 described in ISA3.0. Patches: 01: dtstsfi[q]: DFP Test Significance Immediate [Quad] 02: vabsdub : Vector Absolute Difference Unsigned Byte vabsduh : Vector Absolute Difference Unsigned Halfword vabsduw :

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

2016-07-26 Thread Max Reitz
On 26.07.2016 20:03, Sascha Silbe wrote: > Dear Max, > > Max Reitz writes: > >> We don't guarantee that error_setg_errno() does not modify errno. (In >> practice it should not, but we don't guarantee that.) > > I agree it's a good general policy to _not_ rely on the callee >

Re: [Qemu-devel] [PULL 26/28] apic: Use apic_id as apic's migration instance_id

2016-07-26 Thread Eduardo Habkost
On Tue, Jul 26, 2016 at 04:16:04PM +0200, Igor Mammedov wrote: > On Tue, 26 Jul 2016 18:41:22 +0530 > Amit Shah wrote: > > > On (Tue) 26 Jul 2016 [14:58:39], Igor Mammedov wrote: > > > > This was flagged by a nightly run of the static checker when this > > > > series was

[Qemu-devel] [PATCH RFC v0 5/6] target-ppc: add vsrv instruction

2016-07-26 Thread Nikunj A Dadhania
From: Vivek Andrew Sha Adds Vector Shift Right Variable instruction. Signed-off-by: Vivek Andrew Sha Signed-off-by: Nikunj A Dadhania --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 17

[Qemu-devel] [PATCH RFC v0 2/6] target-ppc: add vabsdu[b, h, w] instructions

2016-07-26 Thread Nikunj A Dadhania
From: Sandipan Das Adds following instructions: vabsdub: Vector Absolute Difference Unsigned Byte vabsduh: Vector Absolute Difference Unsigned Halfword vabsduw: Vector Absolute Difference Unsigned Word Signed-off-by: Sandipan Das [ use

[Qemu-devel] [Bug 1546680] Re: Incorrect display colors when running big endian guest on POWER8 little endian host

2016-07-26 Thread Timothy Pearson
QEMU emulator version 2.6.0 (Debian 1:2.6+dfsg-3), Copyright (c) 2003-2008 Fabrice Bellard qemu-system-ppc64 --enable-kvm -M pseries -cpu host -m 3G -cdrom Fedora- Server-dvd-ppc64-24-1.2.iso Fedora 24 Server -- You received this bug notification because you are a member of qemu- devel-ml,

[Qemu-devel] [PATCH v3 3/6] cadence_gem: Add support for screening

2016-07-26 Thread Alistair Francis
The Cadence GEM hardware allows incoming data to be 'screened' based on some register values. Add support for these screens. We also need to increase the max regs to avoid compilation failures. These new registers are implemented in the next patch. Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v2 3/6] cadence_gem: Add support for screening

2016-07-26 Thread Alistair Francis
On Tue, Jul 26, 2016 at 9:55 AM, Peter Maydell wrote: > On 26 July 2016 at 17:42, Alistair Francis > wrote: >> On Tue, Jul 26, 2016 at 5:01 AM, Peter Maydell >> wrote: >>> On 26 July 2016 at 01:12, Alistair

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

2016-07-26 Thread Sascha Silbe
Dear Max, Max Reitz writes: >> So how about: >> >> /* >> * Just like error_setg(), with @os_error info added to the message. >> * If @os_error is non-zero, ": " + strerror(os_error) is appended to >> * the human-readable error message. >> + * >> + * Reminder: errno

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-26 Thread Eric Blake
On 07/26/2016 12:44 PM, Sascha Silbe wrote: > As a general policy, we want callers to save errno > themselves. error_setg_internal() currently goes out of its way to > preserve errno, so with the API documentation not mentioning it either > way, callers might come to rely on the current behaviour

[Qemu-devel] [PATCH RFC v0 6/6] target-ppc: add extswsli[.] instruction

2016-07-26 Thread Nikunj A Dadhania
extswsli : Extend Sign Word & Shift Left Immediate Signed-off-by: Nikunj A Dadhania --- target-ppc/translate.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 3382cd0..0a1b750

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

2016-07-26 Thread Max Reitz
On 26.07.2016 19:18, Halil Pasic wrote: > > > On 07/26/2016 05:42 PM, Max Reitz wrote: >>> +++ b/block/raw-posix.c @@ -485,6 +485,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, s->fd = -1; fd = qemu_open(filename, s->open_flags, 0644);

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 0/2] Fix regression with the default naming of throttling groups

2016-07-26 Thread John Snow
On 07/26/2016 11:34 AM, Max Reitz wrote: > On 26.07.2016 14:52, Alberto Garcia wrote: >> On Fri, Jul 08, 2016 at 05:05:12PM +0300, Alberto Garcia wrote: >>> Hi, >>> >>> Stefan reported this, this is a regression caused by commit >>> efaa7c4eeb7490c6f37f3. >>> >>> I sent a separate series for the

Re: [Qemu-devel] [PATCH V5 0/7] pxb: fix 64-bit MMIO allocation

2016-07-26 Thread Michael S. Tsirkin
On Sun, Jul 17, 2016 at 07:53:07PM +0300, Marcel Apfelbaum wrote: > > v4 -> v5: > Addressed the pull request issues: (Peter Maydell) > See: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00882.html > - cland warning -> "hw/pci/pci.c:196:23: runtime error: shift exponent -1 > is

Re: [Qemu-devel] [PATCH v2 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-07-26 Thread Michael S. Tsirkin
On Wed, Jun 29, 2016 at 06:32:13PM +0800, Liang Li wrote: > This patch set contains two parts of changes to the virtio-balloon. > > One is the change for speeding up the inflating & deflating process, > the main idea of this optimization is to use bitmap to send the page > information to host

[Qemu-devel] [Bug 1546680] Re: Incorrect display colors when running big endian guest on POWER8 little endian host

2016-07-26 Thread Timothy Pearson
** Attachment added: "Screenshot showing problem is also present in kernel framebuffer mode" https://bugs.launchpad.net/qemu/+bug/1546680/+attachment/4707706/+files/centos-big-endian-display-color-problem-kernel-framebuffer-fedora-24.png -- You received this bug notification because you are

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

2016-07-26 Thread John Snow
On 07/26/2016 07:34 AM, Halil Pasic wrote: > 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. > >

[Qemu-devel] [PATCH v3 2/6] cadence_gem: Add the num-priority-queues property

2016-07-26 Thread Alistair Francis
The Cadence GEM hardware supports N number priority queues, this patch is a step towards that by adding the property to set the queues. At the moment behaviour doesn't change as we only use queue 0. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell

Re: [Qemu-devel] [PATCH v1 1/8] hw: arm: SMMUv3 emulation model

2016-07-26 Thread Edgar E. Iglesias
On Thu, Jun 23, 2016 at 11:52:14AM +0530, Prem Mallappa wrote: > Big patch adds SMMUv3 model to Qemu > - As per SMMUv3 spec 16.0 > - Works with SMMUv3 driver in Linux 4.7rc1 > - Only LPAE mode translation supported > - BE mode is not supported yet > - Stage1, Stage2 and S1+S2 > -

[Qemu-devel] [PULL 2/2] mirror: double performance of the bulk stage if the disc is full

2016-07-26 Thread Jeff Cody
From: Vladimir Sementsov-Ogievskiy Mirror can do up to 16 in-flight requests, but actually on full copy (the whole source disk is non-zero) in-flight is always 1. This happens as the request is not limited in size: the data occupies maximum available capacity of s->buf.

Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.

2016-07-26 Thread Sean Bruno
On 07/26/16 03:32, Paolo Bonzini wrote: > >> Update the build flags appropriately for FreeBSD and add the correct >> LD_EMULATION type for the FreeBSD build case. >> >> Signed-off-by: Sean Bruno > > I posted the right fix a couple days ago, but didn't manage to send a pull

[Qemu-devel] [PATCH v6 24/33] char: add and use tcp_chr_wait_connected

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Add a chr_wait_connected for the tcp backend, and use it in the open_socket() function. Signed-off-by: Marc-André Lureau --- qemu-char.c | 63 ++--- 1 file

[Qemu-devel] [PATCH v6 27/33] tests: fix vhost-user-test leak

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Spotted by valgrind. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 46d0588..27b10c1

[Qemu-devel] [PATCH v6 32/33] vhost-user-test: add flags mismatch test

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Check that qemu disconnects the backend that doesn't have the previously acked features. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 59 - 1

[Qemu-devel] [PATCH 15/32] ppc: Make tlb_fill() use new exception helper

2016-07-26 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mmu_helper.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 3eb3cd7..80cc262 100644 --- a/target-ppc/mmu_helper.c +++

[Qemu-devel] [PATCH 19/32] ppc: Don't update NIP in facility unavailable interrupts

2016-07-26 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed. Also remove gen_update_current_nip() which didn't seem to make much sense to me. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 1 -

[Qemu-devel] [PATCH 18/32] ppc: Don't update NIP in DCR access routines

2016-07-26 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed Signed-off-by: Benjamin Herrenschmidt --- target-ppc/timebase_helper.c | 23 +-- target-ppc/translate.c | 12 2 files changed, 13

[Qemu-devel] [PATCH 29/32] ppc: Don't set access_type on all load/stores on hash64

2016-07-26 Thread Benjamin Herrenschmidt
We don't use it so let's not generate the updates. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 57e9a12..fcff24a 100644 ---

[Qemu-devel] [PATCH 32/32] ppc: Speed up load/store multiple

2016-07-26 Thread Benjamin Herrenschmidt
Use a single translate when not crossing a page boundary and avoid going through layers of helpers. MacOS uses those instructions a lot, so does OpenBIOS. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 69

[Qemu-devel] [PULL 0/2] Block patches for 2.7

2016-07-26 Thread Jeff Cody
The following changes since commit f49ee630d73729ecaeecf4b38a8df11bc613914d: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160726' into staging (2016-07-26 11:53:47 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull

[Qemu-devel] [PULL 1/2] block/gluster: fix doc in the qapi schema and member name

2016-07-26 Thread Jeff Cody
From: Prasanna Kumar Kalever 1. qapi @BlockdevOptionsGluster schema member name s/debug_level/debug-level/ 2. rearrange the versioning 3. s/server description/servers description/ Signed-off-by: Prasanna Kumar Kalever Reviewed-by: Eric

[Qemu-devel] [PATCH v6 02/33] vhost-user: minor simplification

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Shorten the code and make it more clear by using the specialized function g_str_has_prefix(). Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[Qemu-devel] [PATCH v6 08/33] vhost: make vhost_dev_cleanup() idempotent

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau It is called on multiple code path, so make it safe to call several times (note: I don't remember a reproducer here, but a function called 'cleanup' should probably be idempotent in my book) Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v6 15/33] vhost-user: call set_msgfds unconditionally

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau It is fine to call set_msgfds() with 0 fd, and ensures any previous fd array is cleared. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[Qemu-devel] [PATCH v6 12/33] vhost: add missing VHOST_OPS_DEBUG

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Add missing VHOST_OPS_DEBUG() logs, for completeness. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v6 29/33] tests: add a simple /vhost-user/multiqueue test

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau This test just checks that 2 virtio-net queues can be setup over vhost-user and waits for them to be started. Signed-off-by: Marc-André Lureau --- tests/Makefile.include | 2 +- tests/vhost-user-test.c | 108

[Qemu-devel] [PATCH v6 20/33] Revert "vhost-net: do not crash if backend is not present"

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Now that get_vhost_net() returns non-null after a successful vhost_net_init(), we no longer need to check this case. This reverts commit ecd34898596c60f79886061618dd7e01001113ad. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v6 23/33] char: add chr_wait_connected callback

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau A function to wait on the backend to be connected, to be used in the following patches. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 8 qemu-char.c | 9 + 2 files

[Qemu-devel] [PATCH v6 26/33] tests: plug some leaks in virtio-net-test

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Found thanks to valgrind. Signed-off-by: Marc-André Lureau --- tests/virtio-net-test.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/virtio-net-test.c

[Qemu-devel] [PATCH v6 28/33] tests: add /vhost-user/connect-fail test

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Check early connection failure and resume. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 38 ++ 1 file changed, 38 insertions(+) diff --git

[Qemu-devel] [PATCH 03/32] ppc: Move classic fp ops out of translate.c

2016-07-26 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 1205 +--- target-ppc/translate/fp-impl.c | 1098 target-ppc/translate/fp-ops.c |

[Qemu-devel] [PATCH 16/32] ppc: Rework NIP updates vs. exception generation

2016-07-26 Thread Benjamin Herrenschmidt
We make env->nip almost always point to the faulting instruction, thus avoiding a mess of "store_current" vs "store_next" in the exception handling. The syscall exception knows to move the PC by 4 and that's really about it. This actually fixes a number of cases where the translator was setting

[Qemu-devel] [PATCH 21/32] ppc: Don't update NIP on conditional trap instructions

2016-07-26 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/excp_helper.c | 6 -- target-ppc/translate.c | 8 2 files changed, 4 insertions(+), 10 deletions(-)

[Qemu-devel] [PATCH 14/32] ppc: Don't update NIP in lmw/stmw/icbi

2016-07-26 Thread Benjamin Herrenschmidt
Instead, pass GETPC() result to the corresponding helpers. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 11 ++- target-ppc/translate.c | 6 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/target-ppc/mem_helper.c

[Qemu-devel] [PATCH 30/32] ppc: Use a helper to generate "LE unsupported" alignment interrupts

2016-07-26 Thread Benjamin Herrenschmidt
Some operations aren't allowed in LE mode, use a helper rather than open coding the exception generation. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v6 01/33] misc: indentation

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f92d3f8..3677a82 100644 ---

[Qemu-devel] [PATCH v6 11/33] vhost: do not assert() on vhost_ops failure

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Calling a vhost operation may fail, for example with disconnected vhost-user backend, but qemu shouldn't abort in this case. Log an error instead, except on error and cleanup code paths where it can be mostly ignored. Let's use a

[Qemu-devel] [PATCH v6 14/33] qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Calling qemu_chr_fe_set_msgfds() on unconnected socket leads to crash since s->ioc is NULL in this case. Return an error earlier instead. Signed-off-by: Marc-André Lureau --- qemu-char.c | 10 ++ 1 file

[Qemu-devel] [PATCH v6 09/33] vhost-net: always call vhost_dev_cleanup() on failure

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau vhost_dev_init(), calling vhost backend initialization, should be cleaned up after failure too. Call vhost_dev_cleanup() in all failure cases. First, it needs to zero-alloc the struct to avoid the initial garbage. Signed-off-by: Marc-André

[Qemu-devel] [PATCH v6 17/33] vhost-user: check vhost_user_{read, write}() return value

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau The vhost-user code is quite inconsistent with error handling. Instead of ignoring some return values of read/write and silently going on with invalid state (invalid read for example), break the code flow when the error happened.

[Qemu-devel] [PATCH v6 25/33] vhost-user: wait until backend init is completed

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau The chardev waits for an initial connection before starting qemu, and vhost-user should wait for the backend negotiation to be completed before starting qemu too. vhost-user is started in the net_vhost_user_event callback, which is

[Qemu-devel] [PATCH v6 13/33] vhost: use error_report() instead of fprintf(stderr, ...)

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Let's use qemu proper error reporting API, this ensures the error is reported at the right place (stderr or monitor), with a conventional format. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 19

[Qemu-devel] [PATCH v6 16/33] vhost-user: check qemu_chr_fe_set_msgfds() return value

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Check qemu_chr_fe_set_msgfds() for errors, to make sure the message to be sent is correct. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v6 18/33] vhost-user: keep vhost_net after a disconnection

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Many code paths assume get_vhost_net() returns non-null. Keep VhostUserState.vhost_net after a successful vhost_net_init(), instead of freeing it in vhost_net_cleanup(). VhostUserState.vhost_net is thus freed before after being recreated or

[Qemu-devel] [PATCH v6 21/33] vhost-net: vhost_migration_done is vhost-user specific

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Either the callback is mandatory to implement, in which case an assert() is more appropriate, or it's not and we can't tell much whether the function should fail or not (given it's name, I guess it should silently success by default). Instead,

[Qemu-devel] [PATCH for-2.7 1/1] ide: fix halted IO segfault at reset

2016-07-26 Thread John Snow
If one attempts to perform a system_reset after a failed IO request that causes the VM to enter a paused state, QEMU will segfault trying to free up the pending IO requests. These requests have already been completed and freed, though, so all we need to do is free them before we enter the paused

[Qemu-devel] [PATCH for-2.7 0/1] ide: fix halted IO segfault at reset

2016-07-26 Thread John Snow
For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch ide-reset-segfault https://github.com/jnsnow/qemu/tree/ide-reset-segfault This version is tagged ide-reset-segfault-v1:

[Qemu-devel] [PATCH 10/32] ppc: Make float_check_status() pass the return address

2016-07-26 Thread Benjamin Herrenschmidt
Instead of relying on NIP having been updated already. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/fpu_helper.c | 63 + 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/target-ppc/fpu_helper.c

[Qemu-devel] [PATCH 04/32] ppc: Move embedded spe ops out of translate.c

2016-07-26 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 1328 +-- target-ppc/translate/spe-impl.c | 1229 target-ppc/translate/spe-ops.c |

[Qemu-devel] [PATCH 13/32] ppc: Don't update NIP in lswi/lswx/stswi/stswx

2016-07-26 Thread Benjamin Herrenschmidt
Instead, pass GETPC() result to the corresponding helpers. This requires a bit of fiddling to get the PC (hopefully) right in the case where we generate a program check, though the hacks there are temporary, a subsequent patch will clean this all up by always having the nip already set to the

[Qemu-devel] Improving QEMU's About dialog

2016-07-26 Thread Programmingkid
Under Mac OS X, QEMU's about dialog is not very helpful. It only displays an icon and the name of the binary. I think this should be improved. Let me know what you think of this idea: Version: Git commit version: Build date: Example:

[Qemu-devel] forking a virtual machine

2016-07-26 Thread Tim Newsham
Hi, We've got an unusual use case for our qemu virtual machines. We're using a qemu-based system to run a bunch of instrumented test cases. QEMU provides the instrumented execution environment. Before we start testing we setup the test environment, which includes booting an operating system as a

Re: [Qemu-devel] [PATCH v2] test: port postcopy test to ppc64

2016-07-26 Thread David Gibson
On Thu, Jul 21, 2016 at 06:47:56PM +0200, Laurent Vivier wrote: > As userfaultfd syscall is available on powerpc, migration > postcopy can be used. > > This patch adds the support needed to test this on powerpc, > instead of using a bootsector to run code to modify memory, > we use a FORTH script

[Qemu-devel] [PATCH v6 03/33] vhost-user: disconnect on HUP

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau In some cases, qemu_chr_fe_read_all() on HUP event doesn't raise CHR_EVENT_CLOSED because the read/recv function returns -1 on disconnected peers (for example with tch_chr_recv, an ECONNRESET errno overwritten as EIO). It is simpler to

[Qemu-devel] [PATCH v6 05/33] vhost: make vhost_log_put() idempotent

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau Although not strictly required, it is nice to have vhost_log_put() safely callable multiple times. Clear dev->log* when calling vhost_log_put() to make the function idempotent. This also simplifies a bit the caller work. Signed-off-by:

[Qemu-devel] [PATCH v6 07/33] vhost: fix cleanup on not fully initialized device

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau If vhost_dev_init() failed, caller may still call vhost_dev_cleanup() later. However, vhost_dev_cleanup() tries to remove the device from the list even if it wasn't yet added, which may lead to crashes. Similarly for the memory listener.

[Qemu-devel] [PATCH v6 22/33] vhost: add assert() to check runtime behaviour

2016-07-26 Thread marcandre . lureau
From: Marc-André Lureau All these functions must be called only after the backend is connected. They are called from virtio-net.c, after either virtio or link status change. The check for nc->peer->link_down should ensure vhost_net_{start,stop}() are always called

Re: [Qemu-devel] [PATCH 16/32] ppc: Rework NIP updates vs. exception generation

2016-07-26 Thread David Gibson
On Wed, Jul 27, 2016 at 08:21:10AM +1000, Benjamin Herrenschmidt wrote: > We make env->nip almost always point to the faulting instruction, > thus avoiding a mess of "store_current" vs "store_next" in the > exception handling. The syscall exception knows to move the PC by > 4 and that's really

Re: [Qemu-devel] [PATCH 02/32] ppc: Provide basic raise_exception_* functions

2016-07-26 Thread David Gibson
On Wed, Jul 27, 2016 at 08:20:56AM +1000, Benjamin Herrenschmidt wrote: > Instead of using the same helpers called from translate.c, let's have > a bunch of functions that take the various argument combinations, > especially the retaddr which will be needed in subsequent patches, > and leave the

Re: [Qemu-devel] [PATCH 24/32] ppc: Make alignment exceptions suck less

2016-07-26 Thread David Gibson
On Wed, Jul 27, 2016 at 08:21:18AM +1000, Benjamin Herrenschmidt wrote: > The current alignment exception generation tries to load the opcode > to put in DSISR from a context where a cpu_ldl_code() is really not > a good idea. It might fault and longjmp out and that's not something > we want

Re: [Qemu-devel] [PATCH 32/32] ppc: Speed up load/store multiple

2016-07-26 Thread David Gibson
On Wed, Jul 27, 2016 at 08:21:26AM +1000, Benjamin Herrenschmidt wrote: > Use a single translate when not crossing a page boundary and avoid > going through layers of helpers. MacOS uses those instructions > a lot, so does OpenBIOS. > > Signed-off-by: Benjamin Herrenschmidt

Re: [Qemu-devel] [PATCH 02/32] ppc: Provide basic raise_exception_* functions

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 11:50 +1000, David Gibson wrote: >  > > +void raise_exception_err(CPUPPCState *env, uint32_t exception, > > + uint32_t error_code) > > +{ > > +raise_exception_err_ra(env, exception, error_code, 0); > > +} > > + > > +void raise_exception(CPUPPCState

Re: [Qemu-devel] [PATCH 32/32] ppc: Speed up load/store multiple

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 12:47 +1000, David Gibson wrote: > > +#if defined(HOST_WORDS_BIGENDIAN) > > +    memcpy(>gpr[reg], src, adjlen); > > +    reg += (adjlen >> 2); > > +    addr = addr_add(env, addr, adjlen); > > +#else > > +    while(adjlen) { > > +    env->gpr[reg++] =

Re: [Qemu-devel] [PATCH V5 0/7] pxb: fix 64-bit MMIO allocation

2016-07-26 Thread Marcel Apfelbaum
On 07/26/2016 09:30 PM, Michael S. Tsirkin wrote: On Sun, Jul 17, 2016 at 07:53:07PM +0300, Marcel Apfelbaum wrote: v4 -> v5: Addressed the pull request issues: (Peter Maydell) See: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00882.html - cland warning ->

Re: [Qemu-devel] [PATCH 16/32] ppc: Rework NIP updates vs. exception generation

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 12:19 +1000, David Gibson wrote: > twi etc will generally resume from the next instruction if they trap, > yes?  In which case I'm a bit confused by the nip - 4.  But possibly I > just haven't correctly followed all the nip update logic changed by > this patch. >From the ISA

[Qemu-devel] [PATCH v2 repost 1/7] virtio-balloon: rework deflate to add page to a list

2016-07-26 Thread Liang Li
will allow faster notifications using a bitmap down the road. balloon_pfn_to_page() can be removed because it's useless. Signed-off-by: Liang Li Signed-off-by: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Cornelia Huck

[Qemu-devel] [PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info

2016-07-26 Thread Liang Li
Support the request for vm's free page information, response with a page bitmap. QEMU can make use of this free page bitmap to speed up live migration process by skipping process the free pages. Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Andrew

Re: [Qemu-devel] [RFC PATCH 3/3] hw/arm/virt: add nvdimm emulation support

2016-07-26 Thread kwangwoo....@sk.com
Hi Peter, Thanks for your guidance! > -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Tuesday, July 26, 2016 5:23 PM > To: 이광우(LEE KWANGWOO) MS SW > Cc: Xiao Guangrong; Michael S. Tsirkin; Igor Mammedov; Paolo Bonzini; Richard > Henderson; Eduardo >

Re: [Qemu-devel] [PATCH 26/32] ppc: Speed up dcbz

2016-07-26 Thread David Gibson
On Wed, Jul 27, 2016 at 08:21:20AM +1000, Benjamin Herrenschmidt wrote: > Use tlb_vaddr_to_host to do a fast path single translate for > the whole cache line. Also make the reservation check match > the entire range. > > Signed-off-by: Benjamin Herrenschmidt > --- >

Re: [Qemu-devel] [PATCH 10/32] ppc: Make float_check_status() pass the return address

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 11:57 +1000, David Gibson wrote: > > -void helper_float_check_status(CPUPPCState *env) > > +static __attribute__((noinline)) void > do_float_check_status(CPUPPCState *env, > > +    > uintptr_t raddr) > > Why do you need

Re: [Qemu-devel] [PATCH 24/32] ppc: Make alignment exceptions suck less

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 12:30 +1000, David Gibson wrote: > On Wed, Jul 27, 2016 at 08:21:18AM +1000, Benjamin Herrenschmidt > wrote: > > > > The current alignment exception generation tries to load the opcode > > to put in DSISR from a context where a cpu_ldl_code() is really not > > a good idea.

Re: [Qemu-devel] [PATCH 21/32] ppc: Don't update NIP on conditional trap instructions

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 12:26 +1000, David Gibson wrote: > On Wed, Jul 27, 2016 at 08:21:15AM +1000, Benjamin Herrenschmidt > wrote: > > > > This is no longer necessary as the helpers will properly retrieve > > the return address when needed. > > Is this right?  Don't the tw etc. instructions

Re: [Qemu-devel] [PATCH 25/32] ppc: Handle unconditional (always/never) traps at translation time

2016-07-26 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 12:33 +1000, David Gibson wrote: >  > Should you be returning true here? > > Without it, IIUC, the functions below will generate the unconditional > trap, then generate more code to actually test the condition and trap > again. You are right, we generate dead code, will

Re: [Qemu-devel] [PATCH] util: Relax assertion in iov_copy()

2016-07-26 Thread Michael S. Tsirkin
On Mon, Jul 25, 2016 at 02:43:35PM +0300, Shmulik Ladkani wrote: > From: Shmulik Ladkani > > In cases where iov_copy() is passed with zero 'bytes' argument and a > non-zero 'offset' argument, nothing gets copied - as expected. > > However since no copy

[Qemu-devel] [PATCH v2 repost 3/7] mm: add a function to get the max pfn

2016-07-26 Thread Liang Li
Expose the function to get the max pfn, so it can be used in the virtio-balloon device driver. Signed-off-by: Liang Li Cc: Andrew Morton Cc: Vlastimil Babka Cc: Mel Gorman Cc: Michael S. Tsirkin

[Qemu-devel] [PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-07-26 Thread Liang Li
This patchset is for kernel and contains two parts of change to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio

  1   2   3   4   >