Re: Question on Compression for Raw Image

2020-10-20 Thread Eric Blake
On 10/20/20 9:22 AM, Wang, Wei W wrote: > On Tuesday, October 20, 2020 4:01 PM, Kevin Wolf wrote: >> Am 20.10.2020 um 03:31 hat Wang, Wei W geschrieben: >>> Hi, >>> >>> Does anyone know the reason why raw-format.c doesn't have >> compression >>> support (but qcow has the supported added)? For exam

Re: [PATCH 0/3] target/arm: MTE fixes

2020-10-20 Thread Peter Maydell
On Thu, 8 Oct 2020 at 17:21, Richard Henderson wrote: > > One code cleanup and two bug fixes for MTE. > > Vincenzo, thanks for the clear report. Can you please run > this through your test case? > > > r~ > > > Richard Henderson (3): > target/arm: Remove redundant mmu_idx lookup > target/arm:

Re: [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup

2020-10-20 Thread Peter Maydell
On Sat, 17 Oct 2020 at 19:07, Philippe Mathieu-Daudé wrote: > > Add trace event for IRQ from CPU/GPU, > use definitions for IRQ numbers. > > Philippe Mathieu-Daudé (2): > hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers > hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers A

RE: Question on Compression for Raw Image

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 04:22:43 PM CEST, Wang, Wei W wrote: > Ok, thanks. I'm thinking QEMU could do decompression of the compressed > data in raw.img when guest reads data. The qcow2 format already supports compression and it's already transparent to the guest, so you can use that. As Kevin said if

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peter Maydell
On Mon, 19 Oct 2020 at 10:36, Peng Liang wrote: > > VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). > However, microbit_i2c_vmstate doesn't follow it. Let's change it. > > Fixes: 9d68bf564e ("arm: Stub out NRF51 TWI magnetometer/accelerometer > detection") > Reported-by: Eule

Re: [PATCH] hw/arm/nseries: Fix loading kernel image on n8x0 machines

2020-10-20 Thread Peter Maydell
On Mon, 19 Oct 2020 at 10:51, Philippe Mathieu-Daudé wrote: > > Commit 7998beb9c2e removed the ram_size initialization in the > arm_boot_info structure, however it is used by arm_load_kernel(). > > Initialize the field to fix: > > $ qemu-system-arm -M n800 -append 'console=ttyS1' \ > -kernel

[PATCH v2 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img convert. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 6 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 27 ++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/tools/

[PATCH v2 0/2] qemu-img: add add support for rate limit in commit and convert

2020-10-20 Thread Zhengui li
Currently, there is no rate limit for qemu-img commit and convert. This may cause the task of qemu-img commit and convert to consume all the bandwidth of the storage. This will affect the IO performance of other processes and virtual machines under shared storage. The following patches add support

[PATCH v2 1/2] qemu-img: add support for rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img commit. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 4 +++- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 11 +-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/tools/qemu-img.rst b/docs

Re: Question on Compression for Raw Image

2020-10-20 Thread Richard W.M. Jones
On Tue, Oct 20, 2020 at 09:32:23AM -0500, Eric Blake wrote: > On 10/20/20 9:22 AM, Wang, Wei W wrote: > > On Tuesday, October 20, 2020 4:01 PM, Kevin Wolf wrote: > >> Am 20.10.2020 um 03:31 hat Wang, Wei W geschrieben: > >>> Hi, > >>> > >>> Does anyone know the reason why raw-format.c doesn't have

Re: [PATCH v3 4/5] tools/virtiofsd: xattr name mapping examples

2020-10-20 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:08PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add a few examples of xattrmaps to the documentation. > > Signed-off-by: Dr. David Alan Gilbert > --- > docs/tools/virtiofsd.rst | 50 > 1

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 4:00 PM, P J P wrote: From: Prasad J Pandit eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following return statement unreachable. Remove the g_assert call, as it maybe trigg

[PATCH v3 0/2] qemu-img: add support for rate limit in commit and convert

2020-10-20 Thread Zhengui li
Currently, there is no rate limit for qemu-img commit and convert. This may cause the task of qemu-img commit and convert to consume all the bandwidth of the storage. This will affect the IO performance of other processes and virtual machines under shared storage. The following patches add support

[PATCH v3 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img convert. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 6 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 27 ++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/tools/

[PATCH v3 1/2] qemu-img: add support for rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img commit. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 4 +++- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 11 +-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/tools/qemu-img.rst b/docs

Re: Question on Compression for Raw Image

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 04:32:23 PM CEST, Eric Blake wrote: > My recommendation would be implementing a new BDS filter that does > uncompression. Then, you could do things like: > > raw -> decompress -> file.xz This would work, although read-only and you would need a compression format that supports r

Re: [PATCH v3 0/2] qemu-img: add support for rate limit in commit and convert

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 04:47:42 PM CEST, Zhengui li wrote: > Currently, there is no rate limit for qemu-img commit and convert. This may > cause the task of qemu-img commit and convert to consume all the bandwidth > of the storage. This will affect the IO performance of other processes > and virtual ma

Re: [PATCH v11 00/12] linux-user: User support for AArch64 BTI

2020-10-20 Thread Peter Maydell
On Fri, 16 Oct 2020 at 19:42, Richard Henderson wrote: > > The kernel abi for this was merged in v5.8, just as the qemu 5.1 > merge window was closing, so this slipped to the next dev cycle. > > Changes from v10: > * Include Phil's plug of interp_name memory leak. > * Convert error reporting t

[PATCH 3/5] tests/9pfs: Set alloc in fs_create_dir()

2020-10-20 Thread Greg Kurz
fs_create_dir() is a top level test function. It should set alloc. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index d0cdc14fee3e..95638662e14d 100644 --- a/tests/qtes

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 15:05, P J P wrote: > > From: Prasad J Pandit > > eth_get_gso_type() routine returns segmentation offload type based on > L3 protocol type. It calls g_assert_not_reached if L3 protocol is > unknown, making the following return statement unreachable. Remove the > g_assert ca

[PATCH 0/5] tests/9pfs: Code refactoring

2020-10-20 Thread Greg Kurz
Some code refactoring to have a clear distinction between top level test functions and helper functions. --- Greg Kurz (5): tests/9pfs: Factor out do_fs_version() helper tests/9pfs: Turn fs_readdir_split() into a helper tests/9pfs: Set alloc in fs_create_dir() tests/9pfs:

Re: [PATCH 4/4] target/s390x: Improve SUB LOGICAL WITH BORROW

2020-10-20 Thread Richard Henderson
On 10/20/20 7:17 AM, David Hildenbrand wrote: >> +case CC_OP_ADDU: > > Can you give me a hint how we're converting the carry into a borrow? > > Can we apply something similar to compute_carry()? > >> +tcg_gen_subi_i64(cc_src, cc_src, 1); Right here: subtract one. carry = {1,0} ->

[PATCH 4/5] tests/9pfs: Factor out do_fs_attach() helper

2020-10-20 Thread Greg Kurz
fs_attach() is a top level test function. Factor out the sugar to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/qtest/v

[PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Greg Kurz
fs_version() is a top level test function. Factor out the sugar to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c

[PATCH 5/5] tests/9pfs: Turn fs_mkdir() into a helper

2020-10-20 Thread Greg Kurz
fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |7 ++- 1 file changed, 2 insertions(+), 5 del

[PATCH 2/5] tests/9pfs: Turn fs_readdir_split() into a helper

2020-10-20 Thread Greg Kurz
fs_readdir_split() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +++--- 1 file changed, 7 inser

Re: [PULL 22/23] hw/sd: Fix incorrect populated function switch status data structure

2020-10-20 Thread Philippe Mathieu-Daudé
Hi Bin, On 8/21/20 7:29 PM, Philippe Mathieu-Daudé wrote: From: Bin Meng At present the function switch status data structure bit [399:376] are wrongly pupulated. These 3 bytes encode function switch status for the 6 function groups, with 4 bits per group, starting from function group 6 at bit

Re: [PATCH 4/4] target/s390x: Improve SUB LOGICAL WITH BORROW

2020-10-20 Thread David Hildenbrand
On 20.10.20 17:11, Richard Henderson wrote: > On 10/20/20 7:17 AM, David Hildenbrand wrote: >>> +case CC_OP_ADDU: >> >> Can you give me a hint how we're converting the carry into a borrow? >> >> Can we apply something similar to compute_carry()? >> >>> +tcg_gen_subi_i64(cc_src, cc_src,

Re: [PULL v2 00/30] Block patches

2020-10-20 Thread Stefan Hajnoczi
On Mon, Oct 12, 2020 at 10:48:17PM +0100, Peter Maydell wrote: > On Mon, 12 Oct 2020 at 19:28, Stefan Hajnoczi wrote: > > > > The following changes since commit 2387df497b4b4bcf754eb7398edca82889e2ef54: > > > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' > > into sta

[PATCH] roms/Makefile: Add qboot to .PHONY list

2020-10-20 Thread Bruce Rogers
Adding qboot to the .PHONY directive will allow a make -C roms qboot invocation to work as expected Signed-off-by: Bruce Rogers --- roms/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile index 1489d47350..7045e374d3 100644 --- a/roms/Makef

Re: [PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Christian Schoenebeck
On Dienstag, 20. Oktober 2020 17:11:05 CEST Greg Kurz wrote: > fs_version() is a top level test function. Factor out the sugar > to a separate helper instead of hijacking it in other tests. > > Signed-off-by: Greg Kurz > --- > tests/qtest/virtio-9p-test.c | 14 +- > 1 file changed,

Re: [PATCH v3 4/5] tools/virtiofsd: xattr name mapping examples

2020-10-20 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Wed, Oct 14, 2020 at 07:02:08PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Add a few examples of xattrmaps to the documentation. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > docs/tools/virtiof

[PATCH 0/3] sh4: Trivial clean-ups for sh_timer.c

2020-10-20 Thread Thomas Huth
Fix coding style, add fallthrough anonotations and remove superfluous break statements in hw/timer/sh_timer.c. Thomas Huth (3): hw/timer/sh_timer: Coding style clean-up hw/timer/sh_timer: Silence warnings about missing fallthrough statements hw/timer/sh_timer: Remove superfluous "break"

[PATCH 1/3] hw/timer/sh_timer: Coding style clean-up

2020-10-20 Thread Thomas Huth
Replace TAB characters with spaces, put code after case-statement on separate lines and add some curly braces in related lines to keep checkpatch.pl happy. Signed-off-by: Thomas Huth --- hw/timer/sh_timer.c | 89 + 1 file changed, 57 insertions(+), 32

[PATCH 2/3] hw/timer/sh_timer: Silence warnings about missing fallthrough statements

2020-10-20 Thread Thomas Huth
When compiling with -Werror=implicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is very likely intended here, so add some comments to silence the compiler warnings. Signed-off-by: Thomas Huth --- hw/timer/sh_timer.c | 4 +++

Re: [PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 17:34:05 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 17:11:05 CEST Greg Kurz wrote: > > fs_version() is a top level test function. Factor out the sugar > > to a separate helper instead of hijacking it in other tests. > > > > Signed-off-by: Greg Kurz >

[PATCH 3/3] hw/timer/sh_timer: Remove superfluous "break" statements

2020-10-20 Thread Thomas Huth
hw_error() is marked as QEMU_NORETURN, so the "break" statements after this function are just dead code. Signed-off-by: Thomas Huth --- hw/timer/sh_timer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 934daaa7dc..58af1a1edb 100644 --- a/hw

Re: [PATCH v2] softmmu/memory: fix memory_region_ioeventfd_equal()

2020-10-20 Thread Stefan Hajnoczi
On Mon, Oct 19, 2020 at 01:20:13PM -0700, Elena Afanasova wrote: > Eventfd can be registered with a zero length when fast_mmio is true. > Handle this case properly when dispatching through QEMU. > > Signed-off-by: Elena Afanasova > --- > softmmu/memory.c | 11 +-- > 1 file changed, 9 ins

Re: [PATCH] accel/kvm: add PIO ioeventfds only in case kvm_eventfds_allowed is true

2020-10-20 Thread Stefan Hajnoczi
On Sat, Oct 17, 2020 at 02:01:01PM -0700, Elena Afanasova wrote: > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Elena Afanasova > --- > accel/kvm/kvm-all.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Thanks, applied just this patch to my block-next tree: https://github.com/

Re: [PATCH] docs: Better mention of qemu-img amend limitations

2020-10-20 Thread Eric Blake
On 9/23/20 4:56 PM, Nir Soffer wrote: > On Wed, Sep 23, 2020 at 11:38 PM Eric Blake wrote: >> >> Missed during merge resolution of commit bc5ee6da71. >> >> Signed-off-by: Eric Blake >> --- >> docs/tools/qemu-img.rst | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/docs/tools/qemu-

Re: [PATCH 1/5] tests/9pfs: Factor out do_fs_version() helper

2020-10-20 Thread Christian Schoenebeck
On Dienstag, 20. Oktober 2020 17:41:56 CEST Greg Kurz wrote: > On Tue, 20 Oct 2020 17:34:05 +0200 > > Christian Schoenebeck wrote: > > On Dienstag, 20. Oktober 2020 17:11:05 CEST Greg Kurz wrote: > > > fs_version() is a top level test function. Factor out the sugar > > > to a separate helper inst

Re: [PATCH v26 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-10-20 Thread Cornelia Huck
On Mon, 19 Oct 2020 02:25:28 +0530 Kirti Wankhede wrote: > On 9/25/2020 5:23 PM, Cornelia Huck wrote: > > On Wed, 23 Sep 2020 04:54:09 +0530 > > Kirti Wankhede wrote: > > > >> Define flags to be used as delimeter in migration file stream. > >> Added .save_setup and .save_cleanup functions. Ma

[PATCH] Remove deprecated -no-kvm option

2020-10-20 Thread Thomas Huth
The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in upstream QEMU (since TCG is the default here anyw

Re: [PATCH v5] sev: add sev-inject-launch-secret

2020-10-20 Thread Paolo Bonzini
On 20/10/20 15:54, Eduardo Habkost wrote: > On Tue, Oct 20, 2020 at 11:03:51AM +0200, Paolo Bonzini wrote: >> On 15/10/20 16:37, to...@linux.ibm.com wrote: >>> -static void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, Error **errp) >>> +void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, E

Re: [PATCH v2 0/4] Allow loading a no MMU kernel

2020-10-20 Thread Alistair Francis
On Tue, Oct 13, 2020 at 5:28 PM Alistair Francis wrote: > > This series allows loading a noMMU kernel using the -kernel option. > Currently if using -kernel QEMU assumes you also have firmware and loads > the kernel at a hardcoded offset. This series changes that so we only > load the kernel at an

[PULL 01/41] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-20 Thread Peter Maydell
The SMLAD instruction is supposed to: * signed multiply Rn[15:0] * Rm[15:0] * signed multiply Rn[31:16] * Rm[31:16] * perform a signed addition of the products and Ra * set Rd to the low 32 bits of the theoretical infinite-precision result * set the Q flag if the sign-extension of Rd wou

[PULL 00/41] target-arm queue

2020-10-20 Thread Peter Maydell
The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into staging (2020-10-20 11:20:36 +0100) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git

[PULL 05/41] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Reviewed-by: Luc Michel Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-id: 20201010203709.3116542-2-f4...@amsat.org Signed-off-by: Peter Maydell --- include/h

[PULL 07/41] hw/timer/bcm2835: Support the timer COMPARE registers

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé This peripheral has 1 free-running timer and 4 compare registers. Only the free-running timer is implemented. Add support the COMPARE registers (each register is wired to an IRQ). Reference: "BCM2835 ARM Peripherals" datasheet [*] chapter 12 "System Time

[PULL 02/41] target/arm: AArch32 VCVT fixed-point to float is always round-to-nearest

2020-10-20 Thread Peter Maydell
For AArch32, unlike the VCVT of integer to float, which honours the rounding mode specified by the FPSCR, VCVT of fixed-point to float is always round-to-nearest. (AArch64 fixed-point-to-float conversions always honour the FPCR rounding mode.) Implement this by providing _round_to_nearest versions

[PULL 10/41] target/arm: Use tlb_flush_page_bits_by_mmuidx*

2020-10-20 Thread Peter Maydell
From: Richard Henderson When TBI is enabled in a given regime, 56 bits of the address are significant and we need to clear out any other matching virtual addresses with differing tags. The other uses of tlb_flush_page (without mmuidx) in this file are only used by aarch32 mode. Fixes: 38d931687

[PULL 12/41] loads-stores.rst: add footnote that clarifies GETPC usage

2020-10-20 Thread Peter Maydell
From: Emanuele Giuseppe Esposito Current documentation is not too clear on the GETPC usage. In particular, when used outside the top level helper function it causes unexpected behavior. Signed-off-by: Emanuele Giuseppe Esposito Message-id: 20201015095147.1691-1-e.emanuelegiuse...@gmail.com Revi

[PULL 08/41] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé The SYS_timer is not directly wired to the ARM core, but to the SoC (peripheral) interrupt controller. Fixes: 0e5bbd74064 ("hw/arm/bcm2835_peripherals: Use the SYS_timer") Reviewed-by: Luc Michel Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé

[PULL 03/41] hw/arm/strongarm: Fix 'time to transmit a char' unit comment

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé The time to transmit a char is expressed in nanoseconds, not in ticks. Signed-off-by: Philippe Mathieu-Daudé Message-id: 20201014213601.205222-1-f4...@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/strongarm.c | 2 +- 1 file changed,

[PULL 11/41] tests/qtest: Add npcm7xx timer test

2020-10-20 Thread Peter Maydell
From: Havard Skinnemoen This test exercises the various modes of the npcm7xx timer. In particular, it triggers the bug found by the fuzzer, as reported here: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg02992.html It also found several other bugs, especially related to interrupt han

[PULL 18/41] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peter Maydell
From: Peng Liang VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). However, microbit_i2c_vmstate doesn't follow it. Let's change it. Fixes: 9d68bf564e ("arm: Stub out NRF51 TWI magnetometer/accelerometer detection") Reported-by: Euler Robot Signed-off-by: Peng Liang Reviewe

[PULL 19/41] hw/arm/nseries: Fix loading kernel image on n8x0 machines

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé Commit 7998beb9c2e removed the ram_size initialization in the arm_boot_info structure, however it is used by arm_load_kernel(). Initialize the field to fix: $ qemu-system-arm -M n800 -append 'console=ttyS1' \ -kernel meego-arm-n8x0-1.0.80.20100712.1431-vmlinuz

[PULL 04/41] hw/arm: Restrict APEI tables generation to the 'virt' machine

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé While APEI is a generic ACPI feature (usable by X86 and ARM64), only the 'virt' machine uses it, by enabling the RAS Virtualization. See commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"). Restrict the APEI tables generation code to the single user: th

[PULL 14/41] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé The IRQ values are defined few lines earlier, use them instead of the magic numbers. Signed-off-by: Philippe Mathieu-Daudé Message-id: 20201017180731.1165871-3-f4...@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/intc/bcm2836_control.c |

[PULL 27/41] target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile

2020-10-20 Thread Peter Maydell
In arm_cpu_realizefn(), if the CPU has VFP or Neon disabled then we squash the ID register fields so that we don't advertise it to the guest. This code was written for A-profile and needs some tweaks to work correctly on M-profile: * A-profile only fields should not be zeroed on M-profile: -

[PULL 24/41] target/arm: Don't allow BLX imm for M-profile

2020-10-20 Thread Peter Maydell
The BLX immediate insn in the Thumb encoding always performs a switch from Thumb to Arm state. This would be totally useless in M-profile which has no Arm decoder, and so the instruction does not exist at all there. Make the encoding UNDEF for M-profile. (This part of the encoding space is used fo

[PULL 06/41] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé The variable holding the CTRL_STATUS register is misnamed 'status'. Rename it 'ctrl_status' to make it more obvious this register is also used to control the peripheral. Reviewed-by: Luc Michel Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé M

[PULL 15/41] target/arm: Remove redundant mmu_idx lookup

2020-10-20 Thread Peter Maydell
From: Richard Henderson We already have the full ARMMMUIdx as computed from the function parameter. For the purpose of regime_has_2_ranges, we can ignore any difference between AccType_Normal and AccType_Unpriv, which would be the only difference between the passed mmu_idx and arm_mmu_idx_el. S

[PULL 25/41] target/arm: Implement v8.1M branch-future insns (as NOPs)

2020-10-20 Thread Peter Maydell
v8.1M implements a new 'branch future' feature, which is a set of instructions that request the CPU to perform a branch "in the future", when it reaches a particular execution address. In hardware, the expected implementation is that the information about the branch location and destination is cach

[PULL 30/41] linux-user/aarch64: Reset btype for signals

2020-10-20 Thread Peter Maydell
From: Richard Henderson The kernel sets btype for the signal handler as if for a call. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-2-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- linux-user/aarch64/signal.c | 10 -- 1

[PULL 09/41] accel/tcg: Add tlb_flush_page_bits_by_mmuidx*

2020-10-20 Thread Peter Maydell
From: Richard Henderson On ARM, the Top Byte Ignore feature means that only 56 bits of the address are significant in the virtual address. We are required to give the entire 64-bit address to FAR_ELx on fault, which means that we do not "clean" the top byte early in TCG. This new interface allo

[PULL 28/41] target/arm: Allow M-profile CPUs with FP16 to set FPSCR.FP16

2020-10-20 Thread Peter Maydell
M-profile CPUs with half-precision floating point support should be able to write to FPSCR.FZ16, but an M-profile specific masking of the value at the top of vfp_set_fpscr() currently prevents that. This is not yet an active bug because we have no M-profile FP16 CPUs, but needs to be fixed before w

[PULL 16/41] target/arm: Fix reported EL for mte_check_fail

2020-10-20 Thread Peter Maydell
From: Richard Henderson The reporting in AArch64.TagCheckFail only depends on PSTATE.EL, and not the AccType of the operation. There are two guest visible problems that affect LDTR and STTR because of this: (1) Selecting TCF0 vs TCF1 to decide on reporting, (2) Report "data abort same el" not "

[PULL 35/41] linux-user/elfload: Adjust iteration over phdr

2020-10-20 Thread Peter Maydell
From: Richard Henderson The second loop uses a loop induction variable, and the first does not. Transform the first to match the second, to simplify a following patch moving code between them. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201016184207.7866

[PULL 13/41] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé Add trace events for GPU and CPU IRQs. Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé Message-id: 20201017180731.1165871-2-f4...@amsat.org Signed-off-by: Peter Maydell --- hw/intc/bcm2835_ic.c | 4 +++- hw/intc/trace-events | 4 2 files change

[PULL 36/41] linux-user/elfload: Move PT_INTERP detection to first loop

2020-10-20 Thread Peter Maydell
From: Richard Henderson For BTI, we need to know if the executable is static or dynamic, which means looking for PT_INTERP earlier. Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-8-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- li

[PULL 32/41] include/elf: Add defines related to GNU property notes for AArch64

2020-10-20 Thread Peter Maydell
From: Richard Henderson These are all of the defines required to parse GNU_PROPERTY_AARCH64_FEATURE_1_AND, copied from binutils. Other missing defines related to other GNU program headers and notes are elided for now. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 2020

[PULL 20/41] decodetree: Fix codegen for non-overlapping group inside overlapping group

2020-10-20 Thread Peter Maydell
For nested groups like: { [ pattern 1 pattern 2 ] pattern 3 } the intended behaviour is that patterns 1 and 2 must not overlap with each other; if the insn matches neither then we fall through to pattern 3 as the next thing in the outer overlapping group. Currently we

Re: [PATCH] Remove deprecated -no-kvm option

2020-10-20 Thread Paolo Bonzini
On 20/10/20 17:52, Thomas Huth wrote: > The option has never been mentioned in our documentation, it's been > deprecated since years, it's marked with QEMU_ARCH_I386 (which does > not make sense anymore since KVM is available on other architectures, > too), it does not do anything by default in ups

[PULL 33/41] linux-user/elfload: Avoid leaking interp_name using GLib memory API

2020-10-20 Thread Peter Maydell
From: Philippe Mathieu-Daudé Fix an unlikely memory leak in load_elf_image(). Fixes: bf858897b7 ("linux-user: Re-use load_elf_image for the main binary.") Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-5-richard.hender...@linaro.org Mes

[PULL 38/41] linux-user/elfload: Use Error for load_elf_interp

2020-10-20 Thread Peter Maydell
From: Richard Henderson This is slightly clearer than just using strerror, though the different forms produced by error_setg_file_open and error_setg_errno isn't entirely convenient. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201016184207.786698-10-richa

[PULL 26/41] target/arm: Implement v8.1M low-overhead-loop instructions

2020-10-20 Thread Peter Maydell
v8.1M's "low-overhead-loop" extension has three instructions for looping: * DLS (start of a do-loop) * WLS (start of a while-loop) * LE (end of a loop) The loop-start instructions are both simple operations to start a loop whose iteration count (if any) is in LR. The loop-end instruction handl

[PULL 37/41] linux-user/elfload: Use Error for load_elf_image

2020-10-20 Thread Peter Maydell
From: Richard Henderson This is a bit clearer than open-coding some of this with a bare c string. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201016184207.786698-9-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- linux-user/elfload.c | 37 +

[PULL 17/41] target/arm: Ignore HCR_EL2.ATA when {E2H,TGE} != 11

2020-10-20 Thread Peter Maydell
From: Richard Henderson Unlike many other bits in HCR_EL2, the description for this bit does not contain the phrase "if ... this field behaves as 0 for all purposes other than", so do not squash the bit in arm_hcr_el2_eff. Instead, replicate the E2H+TGE test in the two places that require it. R

[PULL 31/41] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI

2020-10-20 Thread Peter Maydell
From: Richard Henderson Transform the prot bit to a qemu internal page bit, and save it in the page tables. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-3-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- include/exec/cpu-all.h

[PULL 21/41] target/arm: Implement v8.1M NOCP handling

2020-10-20 Thread Peter Maydell
>From v8.1M, disabled-coprocessor handling changes slightly: * coprocessors 8, 9, 14 and 15 are also governed by the cp10 enable bit, like cp11 * an extra range of instruction patterns is considered to be inside the coprocessor space We previously marked these up with TODO comments; implem

[PULL 40/41] linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND

2020-10-20 Thread Peter Maydell
From: Richard Henderson Use the new generic support for NT_GNU_PROPERTY_TYPE_0. Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-12-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/elfload.c | 48 +++

[PATCH v2 0/5] tests/9pfs: Code refactoring

2020-10-20 Thread Greg Kurz
Some code refactoring to have a clear distinction between top level test functions and helper functions. v2: - use "do_" prefix instead of "do_fs_" --- Greg Kurz (5): tests/9pfs: Factor out do_version() helper tests/9pfs: Turn fs_readdir_split() into a helper tests/9pfs: Set al

[PULL 41/41] tests/tcg/aarch64: Add bti smoke tests

2020-10-20 Thread Peter Maydell
From: Richard Henderson The note test requires gcc 10 for -mbranch-protection=standard. The mmap test uses PROT_BTI and does not require special compiler support. Acked-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-13-richard.hen

[PULL 39/41] linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes

2020-10-20 Thread Peter Maydell
From: Richard Henderson This is generic support, with the code disabled for all targets. Signed-off-by: Richard Henderson Message-id: 20201016184207.786698-11-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/qemu.h| 4 ++ linux-user/el

[PATCH v2 4/5] tests/9pfs: Factor out do_attach() helper

2020-10-20 Thread Greg Kurz
fs_attach() is a top level test function. Factor out the reusable code to a separate helper instead of hijacking it in other tests. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests

[PULL 22/41] target/arm: Implement v8.1M conditional-select insns

2020-10-20 Thread Peter Maydell
v8.1M brings four new insns to M-profile: * CSEL : Rd = cond ? Rn : Rm * CSINC : Rd = cond ? Rn : Rm+1 * CSINV : Rd = cond ? Rn : ~Rm * CSNEG : Rd = cond ? Rn : -Rm Implement these. Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20201019151301.2046-4-peter.mayd...@

[PULL 23/41] target/arm: Make the t32 insn[25:23]=111 group non-overlapping

2020-10-20 Thread Peter Maydell
The t32 decode has a group which represents a set of insns which overlap with B_cond_thumb because they have [25:23]=111 (which is an invalid condition code field for the branch insn). This group is currently defined using the {} overlap-OK syntax, but it is almost entirely non-overlapping patterns

[PATCH v2] Remove deprecated -no-kvm option

2020-10-20 Thread Thomas Huth
The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in upstream QEMU (since TCG is the default here anyw

[PULL 29/41] target/arm: Implement FPSCR.LTPSIZE for M-profile LOB extension

2020-10-20 Thread Peter Maydell
If the M-profile low-overhead-branch extension is implemented, FPSCR bits [18:16] are a new field LTPSIZE. If MVE is not implemented (currently always true for us) then this field always reads as 4 and ignores writes. These bits used to be the vector-length field for the old short-vector extensio

[PATCH v2 2/5] tests/9pfs: Turn fs_readdir_split() into a helper

2020-10-20 Thread Greg Kurz
fs_readdir_split() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 14 +++--- 1 file changed, 7 inser

[PULL 34/41] linux-user/elfload: Fix coding style in load_elf_image

2020-10-20 Thread Peter Maydell
From: Richard Henderson Fixing this now will clarify following patches. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201016184207.786698-6-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- linux-user/elfload.c | 12 +--- 1 file change

[PATCH v2 5/5] tests/9pfs: Turn fs_mkdir() into a helper

2020-10-20 Thread Greg Kurz
fs_mkdir() isn't a top level test function and thus shouldn't take the "void *obj, void *data, QGuestAllocator *t_alloc" arguments. Turn it into a helper to be used by test functions. Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c |7 ++- 1 file changed, 2 insertions(+), 5 del

Re: [PATCH v2 4/4] hw/riscv: Load the kernel after the firmware

2020-10-20 Thread Alistair Francis
On Mon, Oct 19, 2020 at 4:17 PM Palmer Dabbelt wrote: > > On Tue, 13 Oct 2020 17:17:33 PDT (-0700), Alistair Francis wrote: > > Instead of loading the kernel at a hardcoded start address, let's load > > the kernel at the next alligned address after the end of the firmware. > > > > This should have

Re: [PATCH v26 09/17] vfio: Add load state functions to SaveVMHandlers

2020-10-20 Thread Cornelia Huck
On Mon, 19 Oct 2020 02:17:43 +0530 Kirti Wankhede wrote: > On 10/1/2020 3:37 PM, Cornelia Huck wrote: > > On Wed, 23 Sep 2020 04:54:11 +0530 > > Kirti Wankhede wrote: > > > >> Sequence during _RESUMING device state: > >> While data for this device is available, repeat below steps: > >> a. re

[RFC PATCH 6/8] int128.h: add bunch of uint128 utility functions (INCOMPLETE)

2020-10-20 Thread Alex Bennée
These will be useful for softfloat. I've included the extract/desposit functions with the main Int128 header and not with cutils as we need alternate versions for systems that don't have compiler support for Uint128. Even with compiler support some stuff we need to hand-hack (like clz128). Signed-

[PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-20 Thread Daniel P . Berrangé
The -enable-fips option was added a long time ago to prevent the use of single DES when VNC when FIPS mode is enabled. It should never have been added, because apps are supposed to unconditionally honour FIPS mode based on the '/proc/sys/crypto/fips_enabled' file contents. In addition there is mor

Re: [PULL 09/31] hw/core/clock: introduce clock object

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/17/20 1:47 PM, Philippe Mathieu-Daudé wrote: Hi Damien, Peter, On 4/30/20 1:51 PM, Peter Maydell wrote: This object may be used to represent a clock inside a clock tree. A clock may be connected to another clock so that it receives update, through a callback, whenever the source/parent c

Re: [PATCH v2] Remove deprecated -no-kvm option

2020-10-20 Thread Paolo Bonzini
On 20/10/20 18:05, Thomas Huth wrote: > The option has never been mentioned in our documentation, it's been > deprecated since years, it's marked with QEMU_ARCH_I386 (which does > not make sense anymore since KVM is available on other architectures, > too), it does not do anything by default in ups

Re: [PULL 00/41] target-arm queue

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 5:56 PM, Peter Maydell wrote: The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into staging (2020-10-20 11:20:36 +0100) are available in the Git repository at:

<    1   2   3   4   5   >