[Qemu-devel] [PULL v2 12/15] linux-user: Add support for FIOGETOWN and FIOSETOWN ioctls

2019-09-11 Thread Laurent Vivier
From: Aleksandar Markovic FIOGETOWN and FIOSETOWN ioctls have platform-specific definitions, hence non-standard definition in QEMU too. Other than that, they both have a single integer argument, and their functionality is emulated in a straightforward way. Signed-off-by: Aleksandar Markovic Re

[Qemu-devel] [PULL v2 07/15] linux-user/arm: Adjust MAX_RESERVED_VA for M-profile

2019-09-11 Thread Laurent Vivier
From: Richard Henderson Limit the virtual address space for M-profile cpus to 2GB, so that we avoid all of the magic addresses in the top half of the M-profile system map. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20190822185929.16891-3-richard.hender...@linaro.o

[Qemu-devel] [PULL v2 01/15] linux-user: remove useless variable

2019-09-11 Thread Laurent Vivier
filename is only used to open the file if AT_EXECFD is not provided. But exec_path already contains the path of the file to open. Remove filename as it is only used in main.c whereas exec_path is also used in syscall.c. Fixes: d088d664f201 ("linux-user: identify running binary in /proc/self/exe")

[Qemu-devel] [PULL v2 06/15] linux-user: Pass CPUState to MAX_RESERVED_VA

2019-09-11 Thread Laurent Vivier
From: Richard Henderson Turn the scalar macro into a functional macro. Move the creation of the cpu up a bit within main() so that we can pass it to the invocation of MAX_RESERVED_VA. Delay the validation of the -R parameter until MAX_RESERVED_VA is computed. So far no changes to any of the MA

[Qemu-devel] [PULL v2 15/15] linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls

2019-09-11 Thread Laurent Vivier
From: Aleksandar Markovic FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls are misc commands for controlling a floppy drive. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier Message-Id: <1567601968-26946-7-git-send-email-aleksandar.marko...@rt-rk.com> Signed-off-by: Laurent Vivie

[Qemu-devel] [PULL v2 08/15] linux-user: Support gdb 'qOffsets' query for ELF

2019-09-11 Thread Laurent Vivier
From: Josh Kunz This is needed to support debugging PIE ELF binaries running under QEMU user mode. Currently, `code_offset` and `data_offset` remain unset for all ELF binaries, so GDB is unable to correctly locate the position of the binary's text and data. The fields `code_offset`, and `data_of

[Qemu-devel] [PULL v2 10/15] linux-user: drop redundant handling of environment variables

2019-09-11 Thread Laurent Vivier
From: Max Filippov QEMU_STRACE and QEMU_RAND_SEED are handled by the parse_args, no need to do it again in main. Signed-off-by: Max Filippov Reviewed-by: Laurent Vivier Message-Id: <20190906165736.5612-1-jcmvb...@gmail.com> Signed-off-by: Laurent Vivier --- linux-user/main.c | 7 --- 1 f

Re: [Qemu-devel] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback

2019-09-11 Thread Kevin Wolf
Am 11.09.2019 um 08:20 hat Max Reitz geschrieben: > On 10.09.19 16:52, Kevin Wolf wrote: > > Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > >> If the driver does not implement bdrv_get_allocated_file_size(), we > >> should fall back to cumulating the allocated size of all non-COW > >> children

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:34:57PM +0200, Johannes Berg wrote: > On Tue, 2019-09-10 at 11:33 -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2019 at 05:14:36PM +0200, Johannes Berg wrote: > > > Is any of you familiar with the process of getting a virtio device ID > > > assigned, and if so, do

[Qemu-devel] [PULL v2 14/15] linux-user: Add support for FDMSGON and FDMSGOFF ioctls

2019-09-11 Thread Laurent Vivier
From: Aleksandar Markovic FDMSGON and FDMSGOFF switch informational messages of floppy drives on and off. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier Reviewed-by: Laurent Vivier Message-Id: <1567601968-26946-6-git-send-email-aleksandar.marko...@rt-rk.com> Signed-off-by: Lau

Re: [Qemu-devel] [Qemu-block] [PATCH v2 3/7] curl: Check completion in curl_multi_do()

2019-09-11 Thread Max Reitz
On 10.09.19 18:11, Maxim Levitsky wrote: > On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: >> While it is more likely that transfers complete after some file >> descriptor has data ready to read, we probably should not rely on it. >> Better be safe than sorry and call curl_multi_check_completio

Re: [Qemu-devel] qemu_futex_wait() lockups in ARM64: 2 possible issues

2019-09-11 Thread Rafael David Tinoco
Quick update... > value INT_MAX (4294967295) seems WRONG for qemu_futex_wait(): > > - EV_BUSY, being -1, and passed as an argument qemu_futex_wait(void *, > unsigned), is a two's complement, making argument into a INT_MAX when > that's not what is expected (unless I missed something). > > *** If

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] Move qtests to a separate folder

2019-09-11 Thread Kevin Wolf
Am 10.09.2019 um 21:07 hat Eric Blake geschrieben: > On 9/10/19 1:58 PM, Thomas Huth wrote: > > Our "tests" directory is very overcrowded - we store the qtests, > > unit test and other files there. That makes it difficult to > > determine which file belongs to each test subsystem, and the > > wildc

Re: [Qemu-devel] [PATCH v2 00/17] RISC-V: support vector extension

2019-09-11 Thread Aleksandar Markovic
11.09.2019. 08.35, "liuzhiwei" је написао/ла: > > Features: > * support specification riscv-v-spec-0.7.1( https://content.riscv.org/wp-content/uploads/2019/06/17.40-Vector_RISCV-20190611-Vectors.pdf ). Hi, Zhivei. The linked document is a presentation, outlining general concepts of the instruc

Re: [Qemu-devel] [PATCH v2 04/24] dsoundaudio: port to the new audio backend api

2019-09-11 Thread Gerd Hoffmann
> +static void *dsound_get_buffer_in(HWVoiceIn *hw, size_t *size) > { > +int err; > +void *ret; > +n > +hr = IDirectSoundCaptureBuffer_GetCurrentPosition(dscb, &cpos, NULL); Huh? Stray 'n' here. That can hardly survived a build test ... Removed it. Builds now. Continuing testing

Re: [Qemu-devel] [PATCH 1/7] spapr: Simplify handling of pre ISA 3.0 guest workaround handling

2019-09-11 Thread Cédric Le Goater
On 11/09/2019 06:04, David Gibson wrote: > Certain old guest versions don't understand the radix MMU introduced with > POWER ISA 3.0, but incorrectly select it if presented with the option at > CAS time. We workaround this in qemu by explicitly excluding the radix > (and other ISA 3.0 linked) opti

Re: [Qemu-devel] [PATCH] BootLinuxConsoleTest: Test the Quadra 800

2019-09-11 Thread Laurent Vivier
Le 10/09/2019 à 22:02, Philippe Mathieu-Daudé a écrit : > On 9/10/19 7:07 PM, Cleber Rosa wrote: >> On Tue, Sep 10, 2019 at 06:34:30PM +0200, Philippe Mathieu-Daudé wrote: >>> This test boots a Linux kernel on a Quadra 800 board >>> and verify the serial is working. >>> >>> Example: >>> >>> $ avo

Re: [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910193347.16000-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine Message-id: 20190910193347.16

Re: [Qemu-devel] [PATCH 0/3] target/mips: Convert to do_transaction_failed hook

2019-09-11 Thread Aleksandar Markovic
02.08.2019. 18.29, "Philippe Mathieu-Daudé" је написао/ла: > > Cc'ing broader MIPS audience. > > On 8/2/19 6:04 PM, Peter Maydell wrote: > > This patchset converts the MIPS target away from the > > old broken do_unassigned_access hook to the new (added in > > 2017...) do_transaction_failed hook. >

Re: [Qemu-devel] [PATCH 1/7] spapr: Simplify handling of pre ISA 3.0 guest workaround handling

2019-09-11 Thread Greg Kurz
On Wed, 11 Sep 2019 14:04:46 +1000 David Gibson wrote: > Certain old guest versions don't understand the radix MMU introduced with > POWER ISA 3.0, but incorrectly select it if presented with the option at > CAS time. We workaround this in qemu by explicitly excluding the radix > (and other ISA

Re: [Qemu-devel] [PATCH 3/7] spapr: Fixes a leak in CAS

2019-09-11 Thread Cédric Le Goater
On 11/09/2019 06:04, David Gibson wrote: > From: Alexey Kardashevskiy > > Add a missing g_free(fdt) if the resulting tree is bigger > than the space allocated by SLOF. > > Signed-off-by: Alexey Kardashevskiy > Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Thanks, C. > --- >

Re: [Qemu-devel] [PATCH 2/7] spapr: Move handling of special NVLink numa node from reset to init

2019-09-11 Thread Cédric Le Goater
On 11/09/2019 06:04, David Gibson wrote: > The number of NUMA nodes in the system is fixed from the command line. > Therefore, there's no need to recalculate it at reset time, and we can > determine the special gpu_numa_id value used for NVLink2 devices at init > time. > > This simplifies the rese

Re: [Qemu-devel] [PATCH 2/7] spapr: Move handling of special NVLink numa node from reset to init

2019-09-11 Thread Greg Kurz
On Wed, 11 Sep 2019 14:04:47 +1000 David Gibson wrote: > The number of NUMA nodes in the system is fixed from the command line. > Therefore, there's no need to recalculate it at reset time, and we can > determine the special gpu_numa_id value used for NVLink2 devices at init > time. > > This sim

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:14:36PM +0200, Johannes Berg wrote: > On Tue, 2019-09-10 at 17:03 +0200, Stefan Hajnoczi wrote: > > > > > Now, this means that the CPU (that's part of the simulation) has to > > > *wait* for the device to add an entry to the simulation calendar in > > > response to the k

Re: [Qemu-devel] [PATCH 3/7] spapr: Fixes a leak in CAS

2019-09-11 Thread Greg Kurz
On Wed, 11 Sep 2019 14:04:48 +1000 David Gibson wrote: > From: Alexey Kardashevskiy > > Add a missing g_free(fdt) if the resulting tree is bigger > than the space allocated by SLOF. > > Signed-off-by: Alexey Kardashevskiy > Signed-off-by: David Gibson > --- Reviewed-by: Greg Kurz > hw/pp

Re: [Qemu-devel] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback

2019-09-11 Thread Max Reitz
On 11.09.19 08:55, Kevin Wolf wrote: > Am 11.09.2019 um 08:20 hat Max Reitz geschrieben: >> On 10.09.19 16:52, Kevin Wolf wrote: >>> Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: If the driver does not implement bdrv_get_allocated_file_size(), we should fall back to cumulating the all

Re: [Qemu-devel] [PULL 00/15] Linux user for 4.2 patches

2019-09-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910163600.19971-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/15] Linux user for 4.2 patches Message-id: 20190910163600.19971-1-laur...@vivier.eu Ty

Re: [Qemu-devel] [PATCH 1/7] spapr: Simplify handling of pre ISA 3.0 guest workaround handling

2019-09-11 Thread Alexey Kardashevskiy
On 11/09/2019 14:04, David Gibson wrote: > Certain old guest versions don't understand the radix MMU introduced with > POWER ISA 3.0, but incorrectly select it if presented with the option at > CAS time. We workaround this in qemu by explicitly excluding the radix > (and other ISA 3.0 linked) o

Re: [Qemu-devel] [PATCH 7/7] spapr: Perform machine reset in a more sensible order

2019-09-11 Thread Alexey Kardashevskiy
On 11/09/2019 14:04, David Gibson wrote: > We've made several changes in the past to the machine reset order to fix > specific problems. However, we've ended up with an order that doesn't make > a lot of logical sense. This is an attempt to rectify this. > > First we reset global CAS options,

Re: [Qemu-devel] [PATCH 2/7] spapr: Move handling of special NVLink numa node from reset to init

2019-09-11 Thread Alexey Kardashevskiy
On 11/09/2019 14:04, David Gibson wrote: > The number of NUMA nodes in the system is fixed from the command line. > Therefore, there's no need to recalculate it at reset time, and we can > determine the special gpu_numa_id value used for NVLink2 devices at init > time. > > This simplifies the r

Re: [Qemu-devel] [PATCH v13 6/6] migration: Include migration support for machine check handling

2019-09-11 Thread Aravinda Prasad
On Tuesday 10 September 2019 02:18 PM, Greg Kurz wrote: > Hi Aravinda, > > Sorry for not being able to review the whole series in one pass, > and thus forcing you to poste more versions... but I have some > more remarks about migration. That's fine. In fact I have to thank you for your time fo

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount

2019-09-11 Thread Max Reitz
On 10.09.19 17:41, Peter Lieven wrote: > libnfs recently added support for unmounting. Add support > in Qemu too. > > Signed-off-by: Peter Lieven > --- > block/nfs.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/nfs.c b/block/nfs.c > index 2c98508275..f39acfdb28 100644 > ---

Re: [Qemu-devel] [PATCH 7/7] spapr: Perform machine reset in a more sensible order

2019-09-11 Thread David Gibson
On Wed, Sep 11, 2019 at 05:40:58PM +1000, Alexey Kardashevskiy wrote: > > > On 11/09/2019 14:04, David Gibson wrote: > > We've made several changes in the past to the machine reset order to fix > > specific problems. However, we've ended up with an order that doesn't make > > a lot of logical se

Re: [Qemu-devel] [PATCH 7/7] spapr: Perform machine reset in a more sensible order

2019-09-11 Thread Cédric Le Goater
On 11/09/2019 06:04, David Gibson wrote: > We've made several changes in the past to the machine reset order to fix > specific problems. However, we've ended up with an order that doesn't make > a lot of logical sense. This is an attempt to rectify this. There are some more problems though. See

Re: [Qemu-devel] [PATCH 4/7] spapr: Skip leading zeroes from memory@ DT node names

2019-09-11 Thread Greg Kurz
On Wed, 11 Sep 2019 14:04:49 +1000 David Gibson wrote: > From: Alexey Kardashevskiy > > The device tree build by QEMU at the machine reset time is used by SLOF > to build its internal device tree but the node names are not preserved > exactly so when QEMU provides a device tree update in respon

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] Move qtests to a separate folder

2019-09-11 Thread Thomas Huth
On 11/09/2019 08.58, Kevin Wolf wrote: > Am 10.09.2019 um 21:07 hat Eric Blake geschrieben: >> On 9/10/19 1:58 PM, Thomas Huth wrote: >>> Our "tests" directory is very overcrowded - we store the qtests, >>> unit test and other files there. That makes it difficult to >>> determine which file belongs

Re: [Qemu-devel] [PATCH v4 02/10] hw/core: create Resettable QOM interface

2019-09-11 Thread David Gibson
On Wed, Aug 21, 2019 at 06:33:33PM +0200, Damien Hedde wrote: > This commit defines an interface allowing multi-phase reset. This aims > to solve a problem of the actual single-phase reset (built in > DeviceClass and BusClass): reset behavior is dependent on the order > in which reset handlers are

Re: [Qemu-devel] [PATCH v1 4/4] elf: move ELF_ARCH definition to elf-arch.h

2019-09-11 Thread Alex Bennée
Aleksandar Markovic writes: > 10.09.2019. 21.34, "Alex Bennée" је написао/ла: >> >> This is preparatory for plugins which will want to report the >> architecture to plugins. Move the ELF_ARCH definition out of the >> loader and into its own header. >> >> Signed-off-by: Alex Bennée >> --- > >

Re: [Qemu-devel] [PATCH v1 3/4] elf: move elf_ops.h into include/elf/ and rename

2019-09-11 Thread Alex Bennée
Alex Bennée writes: > Lets keep all the Elf manipulation bits together. Also rename the file > to better reflect how it is used and add a little header to the file. > > Signed-off-by: Alex Bennée > --- > hw/core/loader.c| 4 ++-- It is arguable this could be a priv

Re: [Qemu-devel] [PATCH v2 1/3] tests/migration: mem leak fix

2019-09-11 Thread Alex Bennée
Mao Zhongyi writes: > ‘data’ has the possibility of memory leaks, so use the > glic macros g_autofree recommended by CODING_STYLE.rst nit: glib > to automatically release the memory that returned from > g_malloc(). > > Cc: arm...@redhat.com > Cc: laur...@vivier.eu > Cc: tony.ngu...@bt.com > C

[Qemu-devel] [PULL] RISC-V Patches for the 4.2 Soft Freeze, Part 1

2019-09-11 Thread Palmer Dabbelt
The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: Merge remote-tracking branch 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 09:48:34 +0100) are available in the Git repository at: git://github.com/palmer-dabbelt/qemu.git tags/riscv-for-

[Qemu-devel] [PULL 03/47] riscv: sifive_u: Fix clock-names property for ethernet node

2019-09-11 Thread Palmer Dabbelt
From: Guenter Roeck The correct property name is clock-names, not clocks-names. Without this patch, the Ethernet driver fails to instantiate with the following error. macb 100900fc.ethernet: failed to get macb_clk (-2) macb: probe of 100900fc.ethernet failed with error -2 Signed-off-by: Guente

Re: [Qemu-devel] [PATCH v1 10/28] target/riscv: Convert mie and mstatus to pointers

2019-09-11 Thread Palmer Dabbelt
On Fri, 23 Aug 2019 16:38:15 PDT (-0700), Alistair Francis wrote: To handle the new Hypervisor CSR register swapping let's use pointers. We only need to convert the MIE and MSTATUS CSRs. With the exception of MIP all of the other CSRs that swap with virtulsation changes are S-Mode only, so we ca

[Qemu-devel] [PULL 02/47] riscv: sivive_u: Add dummy serial clock and aliases entry for uart

2019-09-11 Thread Palmer Dabbelt
From: Guenter Roeck The riscv uart needs valid clocks. This requires a refereence to the clock node. Since the SOC clock is not emulated by qemu, add a reference to a fixed clock instead. The clock-frequency entry in the uart node does not seem to be necessary, so drop it. In addition to a refer

[Qemu-devel] [PULL 07/47] target/riscv: Create function to test if FP is enabled

2019-09-11 Thread Palmer Dabbelt
From: Alistair Francis Let's create a function that tests if floating point support is enabled. We can then protect all floating point operations based on if they are enabled. This patch so far doesn't change anything, it's just preparing for the Hypervisor support for floating point operations.

[Qemu-devel] [PULL 05/47] target/riscv/pmp: Convert qemu_log_mask(LOG_TRACE) to trace events

2019-09-11 Thread Palmer Dabbelt
From: Philippe Mathieu-Daudé Use the always-compiled trace events, remove the now unused RISCV_DEBUG_PMP definition. Note pmpaddr_csr_read() could previously do out-of-bound accesses passing addr_index >= MAX_RISCV_PMPS. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Sign

[Qemu-devel] [PULL 01/47] riscv: sifive_u: Add support for loading initrd

2019-09-11 Thread Palmer Dabbelt
From: Guenter Roeck Add support for loading initrd with "-initrd " to the sifive_u machine. This lets us boot into Linux without disk drive. Signed-off-by: Guenter Roeck Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 20 +--- 1 file chan

[Qemu-devel] [PULL 04/47] target/riscv/pmp: Restrict priviledged PMP to system-mode emulation

2019-09-11 Thread Palmer Dabbelt
From: Philippe Mathieu-Daudé The RISC-V Physical Memory Protection is restricted to privileged modes. Restrict its compilation to QEMU system builds. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/Makefile.objs | 3 ++- targ

[Qemu-devel] [PULL 10/47] riscv: Add a helper routine for finding firmware

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This adds a helper routine for finding firmware. It is currently used only for "-bios default" case. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/boot.c | 22 +++--- include/hw/riscv/boot.h | 1 + 2 f

[Qemu-devel] [PULL 09/47] riscv: rv32: Root page table address can be larger than 32-bit

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng For RV32, the root page table's PPN has 22 bits hence its address bits could be larger than the maximum bits that target_ulong is able to represent. Use hwaddr instead. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/cpu_hel

[Qemu-devel] [PULL 08/47] target/riscv: Update the Hypervisor CSRs to v0.4

2019-09-11 Thread Palmer Dabbelt
From: Alistair Francis Update the Hypervisor CSR addresses to match the v0.4 spec. Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- target/riscv/cpu_bits.h | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-)

[Qemu-devel] [PULL 06/47] riscv: plic: Remove unused interrupt functions

2019-09-11 Thread Palmer Dabbelt
From: Alistair Francis Signed-off-by: Alistair Francis Reviewed-by: Jonathan Behrens Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Chih-Min Chao Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_plic.c | 12 include/hw/riscv/sifive_plic.h | 3 --- 2 files changed, 1

[Qemu-devel] [PULL 17/47] riscv: hw: Remove not needed PLIC properties in device tree

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This removes "reg-names" and "riscv,max-priority" properties of the PLIC node from device tree. Signed-off-by: Bin Meng Reviewed-by: Jonathan Behrens Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 2 -- hw/riscv/virt.c | 2 -- 2 file

[Qemu-devel] [PULL 13/47] riscv: sifive_test: Add reset functionality

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This adds a reset opcode for sifive_test device to trigger a system reset for testing purpose. Signed-off-by: Bin Meng Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_test.c | 4 include/hw/riscv/sifive_test.h | 3 ++- 2 files changed

[Qemu-devel] [PULL 12/47] riscv: hmp: Add a command to show virtual memory mappings

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This adds 'info mem' command for RISC-V, to show virtual memory mappings that aids debugging. Rather than showing every valid PTE, the command compacts the output by merging all contiguous physical address mappings into one block and only shows the merged block mapping details. S

[Qemu-devel] [PULL 11/47] riscv: Resolve full path of the given bios image

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng At present when "-bios image" is supplied, we just use the straight path without searching for the configured data directories. Like "-bios default", we add the same logic so that "-L" actually works. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Da

[Qemu-devel] [PULL 20/47] riscv: hw: Remove the unnecessary include of target/riscv/cpu.h

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng The inclusion of "target/riscv/cpu.h" is unnecessary in various sifive model drivers. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_prci.c | 1 - hw/riscv/sifive_test.c | 1 - hw/riscv/sifive_uart.c | 1 - 3 files chang

[Qemu-devel] [PULL 15/47] riscv: hw: Remove superfluous "linux, phandle" property

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng "linux,phandle" property is optional. Remove all instances in the sifive_u, virt and spike machine device trees. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 4 hw/riscv/spike.c| 1 - hw/riscv/virt.c

[Qemu-devel] [PULL 19/47] riscv: hw: Change to use qemu_log_mask(LOG_GUEST_ERROR, ...) instead

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Replace the call to hw_error() with qemu_log_mask(LOG_GUEST_ERROR,...) in various sifive models. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_prci.c | 8 +--- hw/riscv/sifive_test.c | 5 +++-- hw/riscv/sifive_uart.

[Qemu-devel] [PULL 14/47] riscv: hw: Remove duplicated "hw/hw.h" inclusion

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Commit a27bd6c779ba ("Include hw/qdev-properties.h less") wrongly added "hw/hw.h" to sifive_prci.c and sifive_test.c. Another inclusion of "hw/hw.h" was later added via commit 650d103d3ea9 ("Include hw/hw.h exactly where needed"), that resulted in duplicated inclusion of "hw/hw.h"

[Qemu-devel] [PULL 16/47] riscv: hw: Use qemu_fdt_setprop_cell() for property with only 1 cell

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Some of the properties only have 1 cell so we should use qemu_fdt_setprop_cell() instead of qemu_fdt_setprop_cells(). Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 18 +- hw/riscv/virt.c | 24 +

[Qemu-devel] [PULL 21/47] riscv: roms: Remove executable attribute of opensbi images

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Like other binary files, the executable attribute of opensbi images should not be set. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin

[Qemu-devel] [PULL 29/47] riscv: hart: Add a "hartid-base" property to RISC-V hart array

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng At present each hart's hartid in a RISC-V hart array is assigned the same value of its index in the hart array. But for a system that has multiple hart arrays, this is not the case any more. Add a new "hartid-base" property so that hartid number can be assigned based on the proper

[Qemu-devel] [PULL 26/47] riscv: sifive_e: Drop sifive_mmio_emulate()

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Use create_unimplemented_device() instead. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/Kconfig| 1 + hw/riscv/sifive_e.c | 23 --- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/hw/r

[Qemu-devel] [PULL 22/47] riscv: sifive_u: Remove the unnecessary include of prci header

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng sifive_u machine does not use PRCI as of today. Remove the prci header inclusion. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifiv

[Qemu-devel] [PULL 18/47] riscv: hw: Change create_fdt() to return void

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng There is no need to return fdt at the end of create_fdt() because it's already saved in s->fdt. Signed-off-by: Bin Meng Reviewed-by: Chih-Min Chao Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 11 +++

[Qemu-devel] [PULL 30/47] riscv: sifive_u: Set the minimum number of cpus to 2

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng It is not useful if we only have one management CPU. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 4 +++- include/hw/riscv/sifive_u.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PULL 27/47] riscv: Add a sifive_cpu.h to include both E and U cpu type defines

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Group SiFive E and U cpu type defines into one header file. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Palmer Dabbelt --- include/hw/riscv/sifive_cpu.h | 31 +++ include/hw/riscv/sifive_

[Qemu-devel] [PULL 23/47] riscv: sifive: Rename sifive_prci.{c, h} to sifive_e_prci.{c, h}

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Current SiFive PRCI model only works with sifive_e machine, as it only emulates registers or PRCI block in the FE310 SoC. Rename the file name to make it clear that it is for sifive_e. This also prefix "sifive_e"/"SIFIVE_E" for all macros, variables and functions. Signed-off-by:

[Qemu-devel] [PULL 24/47] riscv: sifive_e: prci: Fix a typo of hfxosccfg register programming

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng For hfxosccfg register programming, SIFIVE_E_PRCI_HFXOSCCFG_RDY and SIFIVE_E_PRCI_HFXOSCCFG_EN should be used. Signed-off-by: Bin Meng Acked-by: Alistair Francis Reviewed-by: Chih-Min Chao Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_

[Qemu-devel] [PULL 36/47] riscv: sifive_u: Reference PRCI clocks in UART and ethernet nodes

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Now that we have added a PRCI node, update existing UART and ethernet nodes to reference PRCI as their clock sources, to keep in sync with the Linux kernel device tree. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c

[Qemu-devel] [PULL 32/47] riscv: sifive_u: Update PLIC hart topology configuration string

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng With heterogeneous harts config, the PLIC hart topology configuration string are "M,MS,.." because of the monitor hart #0. Suggested-by: Fabien Chouteau Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 7 --- 1

[Qemu-devel] [PULL 25/47] riscv: sifive_e: prci: Update the PRCI register block size

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Currently the PRCI register block size is set to 0x8000, but in fact 0x1000 is enough, which is also what the manual says. Signed-off-by: Bin Meng Reviewed-by: Chih-Min Chao Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_e_prci.c | 2 +

[Qemu-devel] [PULL 28/47] riscv: hart: Extract hart realize to a separate routine

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Currently riscv_harts_realize() creates all harts based on the same cpu type given in the hart array property. With current implementation it can only create homogeneous harts. Exact the hart realize to a separate routine in preparation for supporting multiple hart arrays. Note th

[Qemu-devel] [PULL 43/47] riscv: sifive_u: Remove handcrafted clock nodes for UART and ethernet

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng In the past we did not have a model for PRCI, hence two handcrafted clock nodes ("/soc/ethclk" and "/soc/uartclk") were created for the purpose of supplying hard-coded clock frequencies. But now since we have added the PRCI support in QEMU, we don't need them any more. Signed-off-

[Qemu-devel] [PULL 40/47] riscv: sifive: Implement a model for SiFive FU540 OTP

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This implements a simple model for SiFive FU540 OTP (One-Time Programmable) Memory interface, primarily for reading out the stored serial number from the first 1 KiB of the 16 KiB OTP memory reserved by SiFive for internal use. Signed-off-by: Bin Meng Reviewed-by: Alistair Franci

[Qemu-devel] [PULL 31/47] riscv: sifive_u: Update hart configuration to reflect the real FU540 SoC

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng The FU540-C000 includes a 64-bit E51 RISC-V core and four 64-bit U54 RISC-V cores. Currently the sifive_u machine only populates 4 U54 cores. Update the max cpu number to 5 to reflect the real hardware, by creating 2 CPU clusters as containers for RISC-V hart arrays to populate het

[Qemu-devel] [PULL 35/47] riscv: sifive_u: Add PRCI block to the SoC

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng Add PRCI mmio base address and size mappings to sifive_u machine, and generate the corresponding device tree node. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 24 +++- include/hw/risc

[Qemu-devel] [PULL 44/47] riscv: sifive_u: Update model and compatible strings in device tree

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This updates model and compatible strings to use the same strings as used in the Linux kernel device tree (hifive-unleashed-a00.dts). Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 5 +++-- 1 file changed, 3 insert

[Qemu-devel] [PULL 39/47] riscv: roms: Update default bios for sifive_u machine

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng With the support of heterogeneous harts and PRCI model, it's now possible to use the OpenSBI image (PLATFORM=sifive/fu540) built for the real hardware. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- pc-bios/opensbi-riscv64-sifive_u-fw_j

[Qemu-devel] [PULL 37/47] riscv: sifive_u: Update UART base addresses and IRQs

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This updates the UART base address and IRQs to match the hardware. Signed-off-by: Bin Meng Reviewed-by: Jonathan Behrens Acked-by: Alistair Francis Reviewed-by: Chih-Min Chao Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 4 ++-- include/hw/riscv/sifive_u.h

[Qemu-devel] [PULL 34/47] riscv: sifive_u: Generate hfclk and rtcclk nodes

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng To keep in sync with Linux kernel device tree, generate hfclk and rtcclk nodes in the device tree, to be referenced by PRCI node. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 23 +++ i

[Qemu-devel] [PULL 46/47] target/riscv: Fix mstatus dirty mask

2019-09-11 Thread Palmer Dabbelt
From: Alistair Francis This is meant to mask off the hypervisor bits, but a typo caused it to mask MPP instead. Fixes: 1f0419cb04 ("target/riscv: Allow setting mstatus virtulisation bits") Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Signed-off-by: Palmer Dabbelt --- target/riscv/cs

[Qemu-devel] [PULL 33/47] riscv: sifive: Implement PRCI model for FU540

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This adds a simple PRCI model for FU540 (sifive_u). It has different register layout from the existing PRCI model for FE310 (sifive_e). Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/Makefile.objs | 1 + hw/riscv/si

Re: [Qemu-devel] [PATCH v1 2/4] elf: move elf.h to elf/elf.h and split out types

2019-09-11 Thread BALATON Zoltan
On Tue, 10 Sep 2019, Alex Bennée wrote: diff --git a/include/elf/elf-types.inc.h b/include/elf/elf-types.inc.h new file mode 100644 index 000..35163adb2b5 --- /dev/null +++ b/include/elf/elf-types.inc.h @@ -0,0 +1,63 @@ +/* + * Elf Type Specialisation + * + * Copyright (c) 2019 + * Writte

[Qemu-devel] [PULL 38/47] riscv: sifive_u: Change UART node name in device tree

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng OpenSBI for fu540 does DT fix up (see fu540_modify_dt()) by updating chosen "stdout-path" to point to "/soc/serial@...", and U-Boot will use this information to locate the serial node and probe its driver. However currently we generate the UART node name as "/soc/uart@...", causing

[Qemu-devel] [PULL 47/47] target/riscv: Use TB_FLAGS_MSTATUS_FS for floating point

2019-09-11 Thread Palmer Dabbelt
From: Alistair Francis Use the TB_FLAGS_MSTATUS_FS macro when enabling floating point in the tb flags. Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/r

[Qemu-devel] [PULL 42/47] riscv: sifive_u: Fix broken GEM support

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng At present the GEM support in sifive_u machine is seriously broken. The GEM block register base was set to a weird number (0x100900FC), which for no way could work with the cadence_gem model in QEMU. Not like other GEM variants, the FU540-specific GEM has a management block to con

[Qemu-devel] [PULL 41/47] riscv: sifive_u: Instantiate OTP memory with a serial number

2019-09-11 Thread Palmer Dabbelt
From: Bin Meng This adds an OTP memory with a given serial number to the sifive_u machine. With such support, the upstream U-Boot for sifive_fu540 boots out of the box on the sifive_u machine. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/si

Re: [Qemu-devel] [PULL 00/15] Linux user for 4.2 patches

2019-09-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910163600.19971-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/15] Linux user for 4.2 patches Message-id: 20190910163600.19971-1-laur...@vivier.eu Ty

Re: [Qemu-devel] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback

2019-09-11 Thread Kevin Wolf
Am 11.09.2019 um 09:37 hat Max Reitz geschrieben: > On 11.09.19 08:55, Kevin Wolf wrote: > > Am 11.09.2019 um 08:20 hat Max Reitz geschrieben: > >> On 10.09.19 16:52, Kevin Wolf wrote: > >>> Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > If the driver does not implement bdrv_get_allocated

[Qemu-devel] [PULL 45/47] target/riscv: Use both register name and ABI name

2019-09-11 Thread Palmer Dabbelt
From: Atish Patra Use both the generic register name and ABI name for the general purpose registers and floating point registers. Signed-off-by: Atish Patra Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.c | 19 +++ 1

Re: [Qemu-devel] QEMU as ISS (Instruction Set Simulator)

2019-09-11 Thread Libo Zhou
Reverting the commit solved my problem, although I don't know why it needed to be fixed to 64-bit back then. Finally I can now single step a cross-compiled MIPS program on a QEMU Linux user binary and observe the register and memory contents. -- Original -- Fr

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] Move qtests to a separate folder

2019-09-11 Thread Kevin Wolf
Am 11.09.2019 um 10:01 hat Thomas Huth geschrieben: > On 11/09/2019 08.58, Kevin Wolf wrote: > > Am 10.09.2019 um 21:07 hat Eric Blake geschrieben: > >> On 9/10/19 1:58 PM, Thomas Huth wrote: > >>> Our "tests" directory is very overcrowded - we store the qtests, > >>> unit test and other files ther

Re: [Qemu-devel] [PATCH 1/3] cputlb: Disable __always_inline__ without optimization

2019-09-11 Thread Peter Maydell
On Wed, 11 Sep 2019 at 02:43, Richard Henderson wrote: > > This forced inlining can result in missing symbols, > which makes a debugging build harder to follow. > > Reported-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > accel/tcg/cputlb.c | 16 ++-- > 1 file changed,

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
On Wed, 2019-09-11 at 09:35 +0200, Stefan Hajnoczi wrote: > On Tue, Sep 10, 2019 at 05:14:36PM +0200, Johannes Berg wrote: > > On Tue, 2019-09-10 at 17:03 +0200, Stefan Hajnoczi wrote: > > > > Now, this means that the CPU (that's part of the simulation) has to > > > > *wait* for the device to add a

Re: [Qemu-devel] [PATCH 5/7] spapr: Do not put empty properties for -kernel/-initrd/-append

2019-09-11 Thread Greg Kurz
On Wed, 11 Sep 2019 14:04:50 +1000 David Gibson wrote: > From: Alexey Kardashevskiy > > We are going to use spapr_build_fdt() for the boot time FDT and as an > update for SLOF during handling of H_CAS. SLOF will apply all properties > from the QEMU's FDT which is usually ok unless there are pro

Re: [Qemu-devel] [PATCH v2 1/3] migration: Add validate-uuid capability

2019-09-11 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > This capability realizes simple source validation by UUID. > It's useful for live migration between hosts. > > Signed-off-by: Yury Kotov Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 9 + > migration/migration.h

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-11 Thread Michael S. Tsirkin
On Tue, Sep 10, 2019 at 05:52:36PM +0200, Johannes Berg wrote: > On Mon, 2019-09-09 at 15:50 +0200, Johannes Berg wrote: > > > > We can document how to behave in case of inconsistent protocol features, > > > yes. > > > > OK. > > Coming back to this, I was just looking at it. > > How/where would

Re: [Qemu-devel] [PATCH v2] docs/nvdimm: add example on persistent backend setup

2019-09-11 Thread Wei Yang
On Thu, Aug 01, 2019 at 08:40:53AM +0800, Wei Yang wrote: >Persistent backend setup requires some knowledge about nvdimm and ndctl >tool. Some users report they may struggle to gather these knowledge and >have difficulty to setup it properly. > >Here we provide two examples for persistent backend a

  1   2   3   4   >