Re: [Qemu-devel] [PATCH RFC v5 3/7] qemu_init_vcpu: add a new Error parameter to propagate

2018-10-11 Thread Fei Li
On 10/11/2018 09:19 PM, Markus Armbruster wrote: Fei Li writes: The caller of qemu_init_vcpu() already passed the **errp to handle Which caller? There are many. Or do you mean "The callers"? Oh, sorry, I mean "The callers" :) errors. In view of this, add a new Error parameter to the

Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error

2018-10-11 Thread Markus Armbruster
Copying Marc-André for a possible connection to his recent work on improving help. Marc-André, search for "format=help". Just in case you have further observations to offer. Max Reitz writes: > On 08.10.18 19:31, Markus Armbruster wrote: >> Calling error_report() from within a a function that

Re: [Qemu-devel] [PATCH RFC v5 2/7] ui/vnc.c: polish vnc_init_func

2018-10-11 Thread Fei Li
On 10/11/2018 09:13 PM, Markus Armbruster wrote: Fei Li writes: Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_display_open() does. And let the call trace propagate the Error. Besides, make vnc_start_worker_thread() return a

Re: [Qemu-devel] [PATCH RFC v5 1/7] Fix segmentation fault when qemu_signal_init fails

2018-10-11 Thread Fei Li
On 10/11/2018 06:02 PM, Markus Armbruster wrote: Fei Li writes: Currently, when qemu_signal_init() fails it only returns a non-zero value but without propagating any Error. But its callers need a non-null err when runs error_report_err(err), or else 0->msg occurs. The bug is in

[Qemu-devel] [PATCH] migration: avoid segmentfault when take a snapshot of a VM which being migrated

2018-10-11 Thread jialina01
During an active background migraion, snapshot will trigger a segmentfault. As snapshot clears the "current_migration" struct and updates "to_dst_file" before it finds out that there is a migration task, Migration accesses the null pointer in "current_migration" struct and qemu crashes eventually.

[Qemu-devel] [PATCH] vfio-pci: make vfio-pci device more QOM conventional

2018-10-11 Thread Li Qiang
Define a TYPE_VFIO_PCI and drop DO_UPCAST. Signed-off-by: Li Qiang --- hw/vfio/pci.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 866f0deeb7..3f232aedff 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@

[Qemu-devel] [RFC 0/5] Improve balloon handling of pagesizes other than 4kiB

2018-10-11 Thread David Gibson
The virtio-balloon devices was never really thought out for cases other than 4kiB pagesize on both guest and host. It works in some cases, but in others can be ineffectual or even cause guest memory corruption. This series makes a handful of preliminary cleanups, then makes a change to safely,

[Qemu-devel] [RFC 4/5] virtio-balloon: Use ram_block_discard_range() instead of raw madvise()

2018-10-11 Thread David Gibson
Currently, virtio-balloon uses madvise() with MADV_DONTNEED to actually discard RAM pages inserted into the balloon. This is basically a Linux only interface (MADV_DONTNEED exists on some other platforms, but doesn't always have the same semantics). It also doesn't work on hugepages and has some

[Qemu-devel] [RFC 3/5] virtio-balloon: Rework ballon_page() interface

2018-10-11 Thread David Gibson
This replaces the balloon_page() internal interface with ballon_inflate_page(), with a slightly different interface. The new interface will make future alterations simpler. Signed-off-by: David Gibson --- hw/virtio/virtio-balloon.c | 17 +++-- 1 file changed, 7 insertions(+), 10

[Qemu-devel] [RFC 2/5] virtio-balloon: Corrections to address verification

2018-10-11 Thread David Gibson
The virtio-balloon device's verification of the address given to it by the guest has a number of faults: * The addresses here are guest physical addresses, which should be 'hwaddr' rather than 'ram_addr_t' (the distinction is admittedly pretty subtle and confusing) * We don't

[Qemu-devel] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2018-10-11 Thread David Gibson
The virtio-balloon always works in units of 4kiB (BALLOON_PAGE_SIZE), but on the host side, we can only actually discard memory in units of the host page size. At present we handle this very badly: we silently ignore balloon requests that aren't host page aligned, and for requests that are host

[Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-11 Thread David Gibson
When the balloon is inflated, we discard memory place in it using madvise() with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which sounds like it makes sense but is actually unnecessary. The misleadingly named MADV_DONTNEED just discards the memory in question, it doesn't set any

Re: [Qemu-devel] [PATCH 1/1] i386: Add new model of Cascadelake-Server

2018-10-11 Thread Liu, Jingqi
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, October 11, 2018 4:35 AM > To: Liu, Jingqi > Cc: Xu, Tao3 ; pbonz...@redhat.com; r...@twiddle.net; > qemu-devel@nongnu.org; Robert Hoo > Subject: Re: [PATCH 1/1] i386: Add new model of

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

2018-10-11 Thread Fam Zheng
The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/block-pull-request for

[Qemu-devel] [PULL 1/2] iothread: fix crash with invalid properties

2018-10-11 Thread Fam Zheng
From: Marc-André Lureau -object iothread,id=foo,? will crash qemu: qemu-system-x86_64:qemu-thread-posix.c:128: qemu_cond_destroy: Assertion `cond->initialized' failed. Use thread_id != -1 to check if iothread_complete() finished successfully and the mutex/cond have been initialized.

[Qemu-devel] [PULL 2/2] nvme: correct locking around completion

2018-10-11 Thread Fam Zheng
From: Paolo Bonzini nvme_poll_queues is already protected by q->lock, and AIO callbacks are invoked outside the AioContext lock. So remove the acquire/release pair in nvme_handle_event. Signed-off-by: Paolo Bonzini Message-Id: <20180814062739.19640-1-pbonz...@redhat.com> Signed-off-by: Fam

Re: [Qemu-devel] [PATCH 0/7] target/ppc: Some cleanups to fp exceptions

2018-10-11 Thread David Gibson
On Thu, Oct 11, 2018 at 04:41:52PM -0700, Richard Henderson wrote: 1;5202;0c> There are a few bugs here, primarily wrt usage of GETPC(). > But there is opportunity to share more code between paths > that operate on different floating point types. > > This is not everything that could be done, but

Re: [Qemu-devel] [PATCH 4/4] audio: use existing macros istead ofhardcoded strings

2018-10-11 Thread maozy
On 10/11/18 7:05 PM, Peter Maydell wrote: On 11 October 2018 at 11:45, Philippe Mathieu-Daudé wrote: On 11/10/2018 11:00, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c | 16

Re: [Qemu-devel] [PATCH 1/4] wm8750: remove duplicate macro

2018-10-11 Thread maozy
On 10/11/18 6:39 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 11/10/2018 11:00, Mao Zhongyi wrote: The header file wm8750.h contains '#define TYPE_WM8750 "wm8750"' macro, but '#define CODEC "wm8750"' macro is redefined in wm8750.c, just remove the local CODEC macro and replace it with

Re: [Qemu-devel] [PATCH v2 01/11] hw/ipmi: Remove unnecessary declarations

2018-10-11 Thread Corey Minyard
On 10/11/2018 07:22 PM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/ipmi/ipmi_bmc_extern.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index bf0b7ee0f5..8c78b9804b 100644 ---

[Qemu-devel] [PATCH v2 10/11] chardev: Let qemu_chr_be_* use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Since IOCanReadHandler now returns an unsigned value, the assertion does not make sense anymore. We choose however to keep a "fail-safe" assertion to catch undesired overflows. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char.c | 17 +

[Qemu-devel] [PATCH v2 05/11] chardev: Let chr_sync_read() use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Note than tcp_chr_recv() already use size_t. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-socket.c | 2 +- include/chardev/char.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index

[Qemu-devel] [PATCH v2 11/11] chardev: FDChardev::max_size be unsigned

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-fd.c | 2 +- include/chardev/char-fd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-fd.c b/chardev/char-fd.c index bb426fa4b1..900da2f935 100644 ---

[Qemu-devel] [PATCH v2 08/11] chardev: Let IOCanReadHandler use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- backends/rng-egd.c | 4 ++-- chardev/char-mux.c | 2 +- gdbstub.c | 2 +- hw/arm/pxa2xx.c | 2 +- hw/arm/strongarm.c | 2 +- hw/char/bcm2835_aux.c | 2 +-

[Qemu-devel] [PATCH v2 04/11] chardev: Assert backend's chr_can_read() is positive

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index e115166995..952f9c9bcc 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -159,12 +159,15 @@ int

[Qemu-devel] [PATCH v2 09/11] chardev: Let qemu_chr_fe_* use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-fe.c | 8 chardev/char-win-stdio.c | 2 +- chardev/char-win.c| 2 +- include/chardev/char-fe.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH v2 06/11] chardev: Let chr_write use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/baum.c | 2 +- chardev/char-fd.c | 2 +- chardev/char-mux.c | 2 +- chardev/char-pty.c | 2 +- chardev/char-ringbuf.c | 4 ++-- chardev/char-socket.c | 2 +- chardev/char-udp.c | 2 +-

[Qemu-devel] [PATCH v2 02/11] target/xtensa: Remove unnecessary declarations

2018-10-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/xtensa-semi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index 2f76216276..e389069f0b 100644 --- a/target/xtensa/xtensa-semi.c +++ b/target/xtensa/xtensa-semi.c @@ -161,7

[Qemu-devel] [PATCH v2 03/11] chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc

2018-10-11 Thread Philippe Mathieu-Daudé
IOWatchPoll::fd_can_read() simply returns a boolean value. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-fd.c | 4 ++-- chardev/char-io.c | 4 ++-- chardev/char-pty.c| 4 ++-- chardev/char-socket.c | 6 +++--- chardev/char-udp.c

[Qemu-devel] [PATCH v2 07/11] chardev: Let IOReadHandler use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
The number of bytes can not be negative nor zero. Fixed 2 format string: - hw/char/spapr_vty.c - hw/usb/ccid-card-passthru.c Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alberto Garcia --- backends/rng-egd.c | 2 +- chardev/char-mux.c | 2 +-

[Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Hi Paolo, Here are the changes you suggested in https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html First two simple cleanups while here, then slowly convert backends then frontends. Regards, Phil. Philippe Mathieu-Daudé (11): hw/ipmi: Remove unnecessary declarations

[Qemu-devel] [PATCH v2 01/11] hw/ipmi: Remove unnecessary declarations

2018-10-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/ipmi/ipmi_bmc_extern.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index bf0b7ee0f5..8c78b9804b 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -85,10 +85,6 @@

[Qemu-devel] [PATCH] gdbstub: Remove unused include

2018-10-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index c8478de8f5..c4e4f9f082 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -20,7 +20,6 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/cutils.h"

Re: [Qemu-devel] [PATCH] spapr_pci: rename some structured types

2018-10-11 Thread David Gibson
On Thu, Oct 11, 2018 at 03:04:08PM +0200, Greg Kurz wrote: > On Thu, 11 Oct 2018 13:02:50 +0200 > Philippe Mathieu-Daudé wrote: > > > Hi Greg, > > > > On 11/10/2018 09:00, Greg Kurz wrote: > > > According to CODING_STYLE, structured types names are expected to be > > > in CamelCase. PCI is

Re: [Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-11 Thread Palmer Dabbelt
On Thu, 11 Oct 2018 02:34:16 PDT (-0700), peter.mayd...@linaro.org wrote: On 10 October 2018 at 19:22, Palmer Dabbelt wrote: On Wed, 10 Oct 2018 11:10:07 PDT (-0700), peter.mayd...@linaro.org wrote: On 10 October 2018 at 18:49, Palmer Dabbelt wrote: we should really get the ball rolling

Re: [Qemu-devel] [PATCH v2 2/3] tests/vm: Do not abuse parallelism when KVM is not available

2018-10-11 Thread Philippe Mathieu-Daudé
On Thu, Oct 11, 2018 at 4:46 AM Fam Zheng wrote: > On Mon, 10/01 01:23, Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > v2: Add get_default_jobs (Fam suggestion) > > --- > > tests/vm/basevm.py | 13 ++--- > > 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH 7/7] target/ppc: Split out float_invalid_cvt

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 67 + 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index 127c08bcec..2ed4f42275 100644 --- a/target/ppc/fpu_helper.c +++

[Qemu-devel] [PATCH 1/7] target/ppc: Split up float_invalid_op_excp

2018-10-11 Thread Richard Henderson
The always_inline trick only works if the function is always called from the outer-most helper. But it isn't, so pass in the outer-most return address. There's no need for a switch statement whose argument is always a constant. Unravel the switch and goto via more helpers. Signed-off-by:

[Qemu-devel] [PATCH 6/7] target/ppc: Split out float_invalid_op_div

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 52 +++-- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index ef251d062f..127c08bcec 100644 --- a/target/ppc/fpu_helper.c +++

[Qemu-devel] [PATCH 4/7] target/ppc: Split out float_invalid_op_addsub

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 60 ++--- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index 9ae55b1e93..111ce12a37 100644 --- a/target/ppc/fpu_helper.c +++

[Qemu-devel] [PATCH 5/7] target/ppc: Split out float_invalid_op_mul

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 43 +++-- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index 111ce12a37..ef251d062f 100644 --- a/target/ppc/fpu_helper.c +++

[Qemu-devel] [PATCH 2/7] target/ppc: Remove float_check_status

2018-10-11 Thread Richard Henderson
Use do_float_check_status directly, so that we don't get confused about which return address we're using. And definitely don't use helper_float_check_status. Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 77 +++-- 1 file changed, 35

[Qemu-devel] [PATCH 0/7] target/ppc: Some cleanups to fp exceptions

2018-10-11 Thread Richard Henderson
There are a few bugs here, primarily wrt usage of GETPC(). But there is opportunity to share more code between paths that operate on different floating point types. This is not everything that could be done, but it's a good start. Better for this not to hang out on a branch for another release.

[Qemu-devel] [PATCH 3/7] target/ppc: Introduce fp number classification

2018-10-11 Thread Richard Henderson
Having a separate, logical classifiation of numbers will unify more error paths for different formats. Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 94 ++--- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 02/20] target/arm: Don't call tcg_clear_temp_count

2018-10-11 Thread Philippe Mathieu-Daudé
On 11/10/2018 22:51, Richard Henderson wrote: > This is done generically in translator_loop. > > Reported-by: Laurent Desnogues > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/translate-a64.c | 1 - > target/arm/translate.c | 1 - > 2 files

Re: [Qemu-devel] [PATCH 05/20] target/arm: Mark some arrays const

2018-10-11 Thread Philippe Mathieu-Daudé
On 11/10/2018 22:51, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/translate.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/target/arm/translate.c b/target/arm/translate.c > index

Re: [Qemu-devel] [RFC v3 1/5] tcg: Add tlb_index and tlb_entry helpers

2018-10-11 Thread Richard Henderson
On 10/9/18 10:51 AM, Emilio G. Cota wrote: > From: Richard Henderson > > Isolate the computation of an index from an address into a > helper before we change that function. > > Reviewed-by: Alex Bennée > Signed-off-by: Richard Henderson > [ cota: convert tlb_vaddr_to_host; use atomic_read on

Re: [Qemu-devel] [PATCH v5 0/6] per-TLB lock

2018-10-11 Thread Richard Henderson
On 10/9/18 10:45 AM, Emilio G. Cota wrote: > v4: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg01421.html > > Changes since v4: > > - Add two patches to remove early calls to tlb_flush. > > You can fetch the series from: > https://github.com/cota/qemu/tree/tlb-lock-v5 Queued,

Re: [Qemu-devel] [PATCH 0/4] some TCG fixes

2018-10-11 Thread Richard Henderson
On 10/10/18 7:48 AM, Emilio G. Cota wrote: > The first patch we've seen before -- I'm taking it from the > atomic interrupt_request series. > > The other three patches are related to TCG profiling. One > of them is a build fix that I suspect has gone unnoticed > due to its dependence on

Re: [Qemu-devel] [PATCH] vl: Print error when using incorrect backend for debugcon

2018-10-11 Thread Marc-André Lureau
On Thu, Oct 11, 2018 at 9:13 PM Philippe Mathieu-Daudé wrote: > > When using an incorrect backend for the debugcon, QEMU exits silently > without any error indication, which is confusing. > Add a message that the character backend is invalid. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH] oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD

2018-10-11 Thread Brad Smith
On Thu, Oct 11, 2018 at 09:31:23PM +0200, Kamil Rytarowski wrote: > On 11.10.2018 16:25, Brad Smith wrote: > > On 10/11/2018 5:41 AM, Kamil Rytarowski wrote: > > > >> On 11.10.2018 11:36, Peter Maydell wrote: > >>> On 11 October 2018 at 00:55, Brad Smith wrote: > And from FreeBSD... >

Re: [Qemu-devel] [PATCH v2 2/2] hw/vfio/display: add ramfb support

2018-10-11 Thread Alex Williamson
On Mon, 17 Sep 2018 08:17:29 +0200 Gerd Hoffmann wrote: > So we have a boot display when using a vgpu as primary display. > > ramfb depends on a fw_cfg file. fw_cfg files can not be added and > removed at runtime, therefore a ramfb-enabled vfio device can't be > hotplugged. > > Add a

[Qemu-devel] [PATCH 15/20] target/arm: Use gvec for NEON_3R_VML

2018-10-11 Thread Richard Henderson
Move mla_op and mls_op expanders from translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 + target/arm/translate-a64.c | 106 - target/arm/translate.c | 134 - 3 files changed, 120

Re: [Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-11 Thread Michael Clark
Hi All, On Thu, Oct 11, 2018 at 7:22 AM Palmer Dabbelt wrote: > On Wed, 10 Oct 2018 11:10:07 PDT (-0700), peter.mayd...@linaro.org wrote: > > On 10 October 2018 at 18:49, Palmer Dabbelt wrote: > >> we should really > >> get the ball rolling on our big patch backlog. > > > > Yes, please do.

[Qemu-devel] [PATCH 16/20] target/arm: Use gvec for NEON_3R_VTST_VCEQ, NEON_3R_VCGT, NEON_3R_VCGE

2018-10-11 Thread Richard Henderson
Move cmtst_op expanders from translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 + target/arm/translate-a64.c | 38 -- target/arm/translate.c | 81 +++--- 3 files changed, 60 insertions(+), 61 deletions(-)

[Qemu-devel] [PATCH 10/20] target/arm: Use gvec for NEON_2RM_VMN, NEON_2RM_VNEG

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 4dcd7123e9..fae132791a 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@

[Qemu-devel] [PATCH 14/20] target/arm: Use gvec for VSRI, VSLI

2018-10-11 Thread Richard Henderson
Move shi_op and sli_op expanders from translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 + target/arm/translate-a64.c | 152 +-- target/arm/translate.c | 244 ++--- 3 files changed, 179 insertions(+),

[Qemu-devel] [PATCH 19/20] target/arm: Promote consecutive memory ops for aa32

2018-10-11 Thread Richard Henderson
For a sequence of loads or stores from a single register, little-endian operations can be promoted to an 8-byte op. This can reduce the number of operations by a factor of 8. Signed-off-by: Richard Henderson --- target/arm/translate.c | 10 ++ 1 file changed, 10 insertions(+) diff

[Qemu-devel] [PATCH 20/20] target/arm: Reorg NEON VLD/VST single element to one lane

2018-10-11 Thread Richard Henderson
Instead of shifts and masks, use direct loads and stores from the neon register file. Signed-off-by: Richard Henderson --- target/arm/translate.c | 92 +++--- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/target/arm/translate.c

[Qemu-devel] [PATCH 04/20] target/arm: Promote consecutive memory ops for aa64

2018-10-11 Thread Richard Henderson
For a sequence of loads or stores from a single register, little-endian operations can be promoted to an 8-byte op. This can reduce the number of operations by a factor of 8. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 66 +++--- 1 file

[Qemu-devel] [PATCH 13/20] target/arm: Use gvec for VSRA

2018-10-11 Thread Richard Henderson
Move ssra_op and usra_op expanders from translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 + target/arm/translate-a64.c | 106 target/arm/translate.c | 139 ++--- 3 files changed, 130

[Qemu-devel] [PATCH 12/20] target/arm: Use gvec for VSHR, VSHL

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 70 +- 1 file changed, 48 insertions(+), 22 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index e195efcc55..a16f323d52 100644 --- a/target/arm/translate.c +++

[Qemu-devel] [PATCH 07/20] target/arm: Use gvec for NEON VMOV, VMVN, VBIC & VORR (immediate)

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 67 -- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 4ac526e298..109689a286 100644 --- a/target/arm/translate.c +++

[Qemu-devel] [PATCH 18/20] target/arm: Reorg NEON VLD/VST all elements

2018-10-11 Thread Richard Henderson
Instead of shifts and masks, use direct loads and stores from the neon register file. Mirror the iteration structure of the ARM pseudocode more closely. Correct the parameters of the VLD2 A2 insn. Signed-off-by: Richard Henderson --- target/arm/translate.c | 170

[Qemu-devel] [PATCH 06/20] target/arm: Use gvec for NEON VDUP

2018-10-11 Thread Richard Henderson
Also introduces neon_element_offset to find the env offset of a specific element within a neon register. Signed-off-by: Richard Henderson --- target/arm/translate.c | 63 -- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git

[Qemu-devel] [PATCH 11/20] target/arm: Use gvec for NEON_3R_VMUL

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index fae132791a..e195efcc55 100644 --- a/target/arm/translate.c +++

[Qemu-devel] [PATCH 08/20] target/arm: Use gvec for NEON_3R_LOGIC insns

2018-10-11 Thread Richard Henderson
Move expanders for VBSL, VBIT, and VBIF from translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate.h | 6 +- target/arm/translate-a64.c | 61 -- target/arm/translate.c | 162 +++-- 3 files changed, 123 insertions(+),

[Qemu-devel] [PATCH 05/20] target/arm: Mark some arrays const

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 736880ee71..d59ffa1c67 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -72,7 +72,7 @@

[Qemu-devel] [PATCH 03/20] target/arm: Use tcg_gen_gvec_dup_i64 for LD[1-4]R

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ac9723c1b9..fff99ca303 100644 --- a/target/arm/translate-a64.c +++

[Qemu-devel] [PATCH 09/20] target/arm: Use gvec for NEON_3R_VADD_VSUB insns

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 4ab9f69b01..4dcd7123e9 100644 --- a/target/arm/translate.c +++

[Qemu-devel] [PATCH 17/20] target/arm: Use gvec for NEON VLD all lanes

2018-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 81 ++ 1 file changed, 26 insertions(+), 55 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index a9bd93bba1..1e79a1eec0 100644 --- a/target/arm/translate.c +++

[Qemu-devel] [PATCH 01/20] target/arm: Hoist address increment for vector memory ops

2018-10-11 Thread Richard Henderson
From: Richard Henderson This can reduce the number of opcodes required for certain complex forms of load-multiple (e.g. ld4.16b). Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH 00/20] target/arm: Convert some neon insns to gvec

2018-10-11 Thread Richard Henderson
The conversion to gvec is by no means complete, but it brings aa32 to parity with the work already done for aa64. Plus some misc changes, at least one of which has been sitting on a branch for 2 years. ;-P I've run the result through Alex's aarch32-all.tar.xz RISU tests. There are no

[Qemu-devel] [PATCH 02/20] target/arm: Don't call tcg_clear_temp_count

2018-10-11 Thread Richard Henderson
This is done generically in translator_loop. Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 1 - target/arm/translate.c | 1 - 2 files changed, 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index

[Qemu-devel] [PULL 10/10] RISC-V: Don't add NULL bootargs to device-tree

2018-10-11 Thread Alistair Francis
From: Michael Clark Cc: Palmer Dabbelt Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Palmer Dabbelt Signed-off-by: Alistair Francis --- hw/riscv/sifive_u.c | 4 +++- hw/riscv/spike.c| 6 --

[Qemu-devel] [PULL 09/10] RISC-V: Add missing free for plic_hart_config

2018-10-11 Thread Alistair Francis
From: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Palmer Dabbelt Signed-off-by: Alistair Francis --- hw/riscv/virt.c | 2 ++

[Qemu-devel] [PULL 07/10] RISC-V: Move non-ops from op_helper to cpu_helper

2018-10-11 Thread Alistair Francis
From: Michael Clark This patch makes op_helper.c contain only instruction operation helpers used by translate.c and moves any unrelated cpu helpers into cpu_helper.c. No logic is changed by this patch. Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Palmer Dabbelt Cc: Alistair Francis

[Qemu-devel] [PULL 08/10] RISC-V: Update CSR and interrupt definitions

2018-10-11 Thread Alistair Francis
From: Michael Clark * Add user-mode CSR defininitions. * Reorder CSR definitions to match the specification. * Change H mode interrupt comment to 'reserved'. * Remove unused X_COP interrupt. * Add user-mode interrupts. * Remove erroneous until comments on machine mode interrupts. * Move together

[Qemu-devel] [PULL 02/10] hw/riscv/virt: Connect the gpex PCIe

2018-10-11 Thread Alistair Francis
Connect the gpex PCIe device based on the device tree included in the HiFive Unleashed ROM. Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 6 ++- default-configs/riscv64-softmmu.mak | 6 ++- hw/riscv/virt.c | 58 +

[Qemu-devel] [PULL 06/10] RISC-V: Allow setting and clearing multiple irqs

2018-10-11 Thread Alistair Francis
From: Michael Clark Change the API of riscv_set_local_interrupt to take a write mask and value to allow setting and clearing of multiple local interrupts atomically in a single call. Rename the new function to riscv_cpu_update_mip. Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Palmer

[Qemu-devel] [PULL 05/10] hw/riscv/virt: Connect a VirtIO net PCIe device

2018-10-11 Thread Alistair Francis
Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 1 + default-configs/riscv64-softmmu.mak | 1 + hw/riscv/virt.c | 20 +--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/default-configs/riscv32-softmmu.mak

[Qemu-devel] [PULL 01/10] hw/riscv/virt: Increase the number of interrupts

2018-10-11 Thread Alistair Francis
Increase the number of interrupts to match the HiFive Unleashed board. Signed-off-by: Alistair Francis --- include/hw/riscv/virt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 91163d6cbf..7cb2742070 100644 ---

[Qemu-devel] [PULL 04/10] hw/riscv/sifive_u: Connect the Xilinx PCIe

2018-10-11 Thread Alistair Francis
Connect the Xilinx PCIe device based on the information in the device tree stored in the ROM of the HiFish Unleashed board. Signed-off-by: Alistair Francis --- hw/riscv/sifive_u.c | 64 + include/hw/riscv/sifive_u.h | 4 ++- 2 files changed, 67

[Qemu-devel] [PULL 03/10] riscv: Enable VGA and PCIE_VGA

2018-10-11 Thread Alistair Francis
Enable compile support for VGA devices. This allows the user to conenct a display by adding '-device bochs-display -display sdl' to their command line argument. Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 3 +++ default-configs/riscv64-softmmu.mak | 3 +++

[Qemu-devel] [PULL 00/10] riscv-pullreq queue

2018-10-11 Thread Alistair Francis
-20181011 for you to fetch changes up to f39e645c5f5e9f2b3d41e9c1ad84caae1829cce2: RISC-V: Don't add NULL bootargs to device-tree (2018-10-11 10:30:26 -0700) riscv: Connect PCIe and apply some misc patches Connect PCIe to the RISC

Re: [Qemu-devel] [PATCH v9 3/3] qmp hmp: Make system_wakeup check wake-up support and run state

2018-10-11 Thread Daniel Henrique Barboza
On 10/11/18 4:45 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: The qmp/hmp command 'system_wakeup' is simply a direct call to 'qemu_system_wakeup_request' from vl.c. This function verifies if runstate is SUSPENDED and if the wake up reason is valid before proceeding.

Re: [Qemu-devel] [PATCH] oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD

2018-10-11 Thread Kamil Rytarowski
On 11.10.2018 16:25, Brad Smith wrote: > On 10/11/2018 5:41 AM, Kamil Rytarowski wrote: > >> On 11.10.2018 11:36, Peter Maydell wrote: >>> On 11 October 2018 at 00:55, Brad Smith wrote: And from FreeBSD...   MAP_STACK MAP_STACK implies MAP_ANON, and offset of 0.  The fd

[Qemu-devel] [PULL 2/7] tests/migration: Enable the migration test on s390x, too

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth We can re-use the s390-ccw bios code to implement a small firmware for a s390x guest which prints out the "A" and "B" characters and modifies the memory, as required for the migration test. [quintela: Converted the compile script to Makefile rules] Signed-off-by: Juan Quintela

[Qemu-devel] [PULL 1/7] tests: Add migration test for aarch64

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Wei Huang This patch adds migration test support for aarch64. The test code, which implements the same functionality as x86, is booted as a kernel in qemu. Here are the design choices we make for aarch64: * We choose this -kernel approach because aarch64 QEMU doesn't provide a

[Qemu-devel] [PULL 3/7] migration: Stop postcopy fault thread before notifying

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Ilya Maximets POSTCOPY_NOTIFY_INBOUND_END handlers will remove userfault fds from the postcopy_remote_fds array which could be still in use by the fault thread. Let's stop the thread before notification to avoid possible accessing wrong memory. Fixes: 46343570c06e ("vhost+postcopy: Wire

[Qemu-devel] [PULL 7/7] migration-test: Only generate a single target architecture

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela Several changes: - We only allow generate header "inside" the tree. Why? Because we need to connit the result, so it makes no sense to generate them on the build dir. - We only generate a single target each time. Getting all the cross-compilers correctly is an

[Qemu-devel] [PULL 6/7] qmp, hmp: make subsystem/system-vendor identities optional

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: "Denis V. Lunev" According to PCI specification, subsystem id and subsystem vendor id are present only in type 0 and type 2 headers (at different offsets), but not in type 1 headers. Thus we should make this data optional in struct PciDeviceId and skip reporting them via HMP if the

[Qemu-devel] [PULL 5/7] vhost-user: Don't ask for reply on postcopy mem table set

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Ilya Maximets According to documentation, NEED_REPLY_MASK should not be set for VHOST_USER_SET_MEM_TABLE request in postcopy mode. This restriction was mistakenly applied to 'reply_supported' variable, which is local and used only for non-postcopy case. CC: Dr. David Alan Gilbert Fixes:

[Qemu-devel] [PULL 0/7] migration queue

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) are available in the Git repository at:

[Qemu-devel] [PULL 4/7] vhost-user: Fix userfaultfd leak

2018-10-11 Thread Dr. David Alan Gilbert (git)
From: Ilya Maximets 'fd' received from the vhost side is never freed. Also, everything (including 'postcopy_listen' state) should be cleaned up on vhost cleanup. Fixes: 46343570c06e ("vhost+postcopy: Wire up POSTCOPY_END notify") Fixes: f82c11165ffa ("vhost+postcopy: Register shared ufd with

Re: [Qemu-devel] [PATCH] migration-test: Only generate a single target architecture

2018-10-11 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Several changes: > - We only allow generate header "inside" the tree. Why? Because we > need to connit the result, so it makes no sense to generate them on > the build dir. > - We only generate a single target each time. Getting all the >

Re: [Qemu-devel] [PATCH 1/1] qmp, hmp: make subsystem/system-vendor identities optional

2018-10-11 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Denis V. Lunev" writes: > > > According to PCI specification subsystem id and subsystem vendor id are > > optinal and could be abscent in Type1 header and can be found on > > different offsets within Type0 and Type2 headers. > > Well, they *are*

Re: [Qemu-devel] [PATCH 28/31] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-11 Thread Markus Armbruster
Eric Blake writes: > On 10/8/18 12:31 PM, Markus Armbruster wrote: >> Calling error_report() from within a a function that takes an Error ** > > s/a a/a/ Fixing, thanks! >> argument is suspicious. qemu_fsdev_add() does that, and its caller >> fsdev_init_func() then fails without setting an

Re: [Qemu-devel] [PATCH v2 00/11] net: convert SysBus init method to a realize method

2018-10-11 Thread Eduardo Habkost
On Wed, Oct 10, 2018 at 03:30:25PM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing Eduardo since it might make sens to have this series go via his > machine-next tree, rather than Jason's net tree. Queued on machine-next, thanks! > > On 01/10/2018 08:37, Cédric Le Goater wrote: > > Hello, > > >

Re: [Qemu-devel] [PATCH 24/31] vl: Clean up error reporting in vnc_init_func()

2018-10-11 Thread Markus Armbruster
Markus Armbruster writes: > Calling error_report() in a function that takes an Error ** argument > is suspicious. vnc_init_func() does that, and then fails without > setting an error. Its caller main(), via qemu_opts_foreach(), is fine > with it, but clean it up anyway. > > Cc: Gerd Hoffmann

  1   2   3   4   >