Re: [PATCH 2/8] block: add BlockParentClass class

2021-09-19 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a class that will unify block parents for blockdev-replace > functionality we are going to add. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-parent.h | 32 + > block/block-parent.c | 66

Re: [PATCH 1/2] meson: introduce modules_arch

2021-09-19 Thread Gerd Hoffmann
Hi, > Yes, I really like your approach, makes more sense indeed. But, how do I > get the core modules that other modules depend on? > > I see that Kconfig already has something in this line: > > config VGA (from hw/display) > bool > > config PCI (from hw/pci) > bool > > config QXL

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-19 Thread David Gibson
On Sun, Sep 19, 2021 at 10:23:21PM -0400, Brad Smith wrote: > On 9/17/2021 4:58 AM, David Gibson wrote: > > Hi all, > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > whether Rust supported all the host/build platforms that qemu does, > > which is obviously vital if we

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-19 Thread David Gibson
On Fri, Sep 17, 2021 at 10:04:50AM -0600, Warner Losh wrote: > On Fri, Sep 17, 2021 at 5:35 AM Daniel P. Berrangé > wrote: > > > On Fri, Sep 17, 2021 at 06:58:37PM +1000, David Gibson wrote: > > > Hi all, > > > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > > whether

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-19 Thread David Gibson
On Fri, Sep 17, 2021 at 12:34:29PM +0100, Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 06:58:37PM +1000, David Gibson wrote: > > Hi all, > > > > At the qemu-in-rust BoF at KVM Forum, I volunteered to look into > > whether Rust supported all the host/build platforms that qemu does, > >

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-19 Thread David Gibson
On Sat, Sep 18, 2021 at 01:01:35PM -0700, Richard Henderson wrote: > On 9/17/21 4:03 AM, David Gibson wrote: > > > For sparc 32, it was added to support Gentoo at that time which didn't > > > switch to 64-bit yet (https://github.com/rust-lang/rust/pull/48297) > > > > > > For the past 2-3y, Gentoo

Re: [PATCH] block/file-posix: Limit max_iov to IOV_MAX

2021-09-19 Thread Markus Armbruster
lishan writes: > AIO read/write. The size of iocb->aio_nbytes in the kernel cannot exceed > UIO_MAXIOV = 1024. > max_segments read from the block device layer may be greater than UIO_MAXIOV, > this causes the ioq_submit interface to return a -22(-EINVAL) error result. > --- >

[PATCH v3 6/6] tests/tcg: Add arm and aarch64 pc alignment tests

2021-09-19 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/tcg/aarch64/pcalign-a64.c | 37 + tests/tcg/arm/pcalign-a32.c | 46 +++ tests/tcg/aarch64/Makefile.target | 4 +-- tests/tcg/arm/Makefile.target | 4 +++ 4

[PATCH v3 4/6] target/arm: Assert thumb pc is aligned

2021-09-19 Thread Richard Henderson
Misaligned thumb PC is architecturally impossible. Assert is better than proceeding, in case we've missed something somewhere. Expand a comment about aligning the pc in gdbstub. Fail an incoming migrate if a thumb pc is misaligned. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson

[PATCH v3 5/6] target/arm: Suppress bp for exceptions with more priority

2021-09-19 Thread Richard Henderson
Both single-step and pc alignment faults have priority over breakpoint exceptions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/debug_helper.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target/arm/debug_helper.c

[PATCH v3 3/6] target/arm: Take an exception if PC is misaligned

2021-09-19 Thread Richard Henderson
For A64, any input to an indirect branch can cause this. For A32, many indirect branch paths force the branch to be aligned, but BXWritePC does not. This includes the BX instruction but also other interworking changes to PC. Prior to v8, this case is UNDEFINED. With v8, this is CONSTRAINED

[PATCH v3 2/6] linux-user/arm: Report SIGBUS and SIGSEGV correctly

2021-09-19 Thread Richard Henderson
Pull the fault information from where we placed it, in arm_cpu_tlb_fill and arm_cpu_do_unaligned_access. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/arm/cpu_loop.c | 39 ++- 1 file changed, 34 insertions(+), 5 deletions(-)

[PATCH v3 0/6] target/arm: Fix insn exception priorities

2021-09-19 Thread Richard Henderson
Raise pc alignment faults. Fix single-step and pc-align priority over breakpoints. Not yet fixing insn abort priority over breakpoints. Based-on: 20210919015718.466207-1-richard.hender...@linaro.org ("linux-user: Clean up siginfo_t handling") Changes for v3: * Rebase on siginfo_t patch set --

[PATCH v3 1/6] linux-user/aarch64: Handle EC_PCALIGNMENT

2021-09-19 Thread Richard Henderson
This will shortly be raised for execution with a misaligned pc. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/cpu_loop.c | 44 +-- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/linux-user/aarch64/cpu_loop.c

Re: Rust in Qemu BoF followup: Rust vs. qemu platform support

2021-09-19 Thread Brad Smith
On 9/17/2021 4:58 AM, David Gibson wrote: Hi all, At the qemu-in-rust BoF at KVM Forum, I volunteered to look into whether Rust supported all the host/build platforms that qemu does, which is obviously vital if we want to make Rust a non-optional component of the build. I've added the

Re: [PATCH v2 5/8] target/arm: Take an exception if PC is misaligned

2021-09-19 Thread Richard Henderson
On 8/26/21 6:45 AM, Peter Maydell wrote: On Sat, 21 Aug 2021 at 21:00, Richard Henderson wrote: For A64, any input to an indirect branch can cause this. For A32, many indirect branch paths force the branch to be aligned, but BXWritePC does not. This includes the BX instruction but also

Re: [PATCH] hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART

2021-09-19 Thread Alistair Francis
On Sun, Sep 19, 2021 at 4:07 AM Philippe Mathieu-Daudé wrote: > > - Embed SerialMM in MchpPfSoCMMUartState and QOM-initialize it > - Alias SERIAL_MM 'chardev' property on MCHP_PFSOC_UART > - Forward SerialMM sysbus IRQ in mchp_pfsoc_mmuart_realize() > - Keep mchp_pfsoc_mmuart_create() behavior >

Re: [PULL 07/30] hw/char: Add Microchip PolarFire SoC MMUART emulation

2021-09-19 Thread Alistair Francis
On Sun, Sep 19, 2021 at 2:55 AM Philippe Mathieu-Daudé wrote: > > On Thu, Sep 10, 2020 at 8:29 PM Alistair Francis > wrote: > > > > From: Bin Meng > > > > Microchip PolarFire SoC MMUART is ns16550 compatible, with some > > additional registers. Create a simple MMUART model built on top > > of

Re: [PATCH v2 06/41] linux-user: Reorg handling for SIGSEGV

2021-09-19 Thread Alistair Francis
On Sun, Sep 19, 2021 at 4:55 AM Richard Henderson wrote: > > Add stub host-signal.h for all linux-user hosts. > Add new code replacing cpu_signal_handler. > Full migration will happen one host at a time. > > Signed-off-by: Richard Henderson Acked-by: Alistair Francis Alistair > --- >

Re: [PATCH v2 05/41] configure: Merge riscv32 and riscv64 host architectures

2021-09-19 Thread Alistair Francis
On Sun, Sep 19, 2021 at 4:53 AM Richard Henderson wrote: > > The existing code for safe-syscall.inc.S will compile > without change for riscv32 and riscv64. We may also > drop the meson.build stanza that merges them for tcg/. > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis

Re: [PATCH v2 6/8] target/arm: Assert thumb pc is aligned

2021-09-19 Thread Richard Henderson
On 8/21/21 1:46 PM, Philippe Mathieu-Daudé wrote: +/* Misaligned thumb PC is architecturally impossible. */ +assert((dc->base.pc_next & 1) == 0); What about using tcg_debug_assert() instead? I don't think we want to let this one compile out. r~

Re: [PATCH v2 4/8] linux-user/arm: Report SIGBUS and SIGSEGV correctly

2021-09-19 Thread Richard Henderson
On 8/26/21 6:31 AM, Peter Maydell wrote: +si_signo = TARGET_SIGSEGV; +si_code = TARGET_SEGV_ACCERR; +break; +case 0x5: /* Translation fault, level 1 */ +case 0x7: /* Translation fault, level 2 */ +si_signo =

Re: [PATCH v3 20/20] q800: configure nubus available slots for Quadra 800

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05, Mark Cave-Ayland wrote: > Slot 0x9 is reserved for use by the in-built framebuffer whilst only slots > 0xc, 0xd and 0xe physically exist on the Quadra 800. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/q800.c | 9 + > 1 file changed, 9 insertions(+) Reviewed-by:

Re: [PATCH v3 19/20] q800: wire up nubus IRQs

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05, Mark Cave-Ayland wrote: > Nubus IRQs are routed to the CPU through the VIA2 device so wire up the IRQs > using gpios accordingly. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/q800.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/m68k/q800.c

Re: [PATCH v3 10/20] nubus-device: remove nubus_register_rom() and nubus_register_format_block()

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/16/21 12:05, Mark Cave-Ayland wrote: > Since there is no need to generate a dummy declaration ROM, remove both > nubus_register_rom() and nubus_register_format_block(). These will shortly be > replaced with a mechanism to optionally load a declaration ROM from disk to > allow real images to

Re: [PATCH] qemu-nbd: Change default cache mode to writeback

2021-09-19 Thread Nir Soffer
On Mon, Aug 16, 2021 at 6:50 PM Eric Blake wrote: > > On Fri, Aug 13, 2021 at 11:55:19PM +0300, Nir Soffer wrote: > > Both qemu and qemu-img use writeback cache mode by default, which is > > already documented in qemu(1). qemu-nbd uses writethrough cache mode by > > default, and the default cache

Re: [PATCH v2 02/41] accel/tcg: Move clear_helper_retaddr to cpu loop

2021-09-19 Thread Warner Losh
> On Sep 18, 2021, at 12:44 PM, Richard Henderson > wrote: > > Currently there are only two places that require we reset this > value before exiting to the main loop, but that will change. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c | 3 ++- > accel/tcg/user-exec.c |

Re: [PATCH v2 08/41] linux-user/host/ppc: Populate host_signal.h

2021-09-19 Thread Warner Losh
> On Sep 18, 2021, at 12:44 PM, Richard Henderson > wrote: > > Split host_signal_pc and host_signal_write out of user-exec.c. > Drop the *BSD code, to be re-created under bsd-user/ later. > > Signed-off-by: Richard Henderson > --- > linux-user/host/ppc/host-signal.h | 25 - >

Re: [PATCH v2 06/41] linux-user: Reorg handling for SIGSEGV

2021-09-19 Thread Warner Losh
> On Sep 18, 2021, at 12:44 PM, Richard Henderson > wrote: > > Add stub host-signal.h for all linux-user hosts. > Add new code replacing cpu_signal_handler. > Full migration will happen one host at a time. > > Signed-off-by: Richard Henderson > --- > linux-user/host/aarch64/host-signal.h |

Re: [PATCH v2 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER

2021-09-19 Thread Warner Losh
> On Sep 18, 2021, at 12:45 PM, Richard Henderson > wrote: > > Now that all of the linux-user hosts have been converted > to host-signal.h, drop the compatibility code. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 12 > linux-user/signal.c | 13

Re: [PATCH v2 27/41] target/i386: Implement x86_cpu_record_sigsegv

2021-09-19 Thread Warner Losh
> On Sep 18, 2021, at 12:45 PM, Richard Henderson > wrote: > > Record cr2, error_code, and exception_index. That last means > that we must exit to cpu_loop ourselves, instead of letting > exception_index being overwritten. > > Use the maperr parameter to properly set PG_ERROR_P_MASK. > >

Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv

2021-09-19 Thread Warner Losh
> On Sep 19, 2021, at 12:43 PM, Philippe Mathieu-Daudé wrote: > > On 9/19/21 20:35, Richard Henderson wrote: >> On 9/18/21 11:45 AM, Richard Henderson wrote: >>> +/** >>> + * raise_sigsegv: >>> + * @cpu: the cpu context >>> + * @addr: the guest address of the fault >>> + * @access_type:

Re: high cpu usage in idle state

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/19/21 20:06, Peter Maydell wrote: > On Sat, 18 Sept 2021 at 09:12, Ali Vatankhah wrote: >> then to check what instructions are executing I run this command: >> >> qemu-system-ppc64 -nographic -M ppce500 -cpu e5500 -kernel uImage >> -singlestep -d in_asm -D target_asm.log >> >> Obviously

Re: [PATCH v2 41/41] accel/tcg: Restrict TCGCPUOps::tlb_fill() to sysemu

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > We have replaced tlb_fill with record_sigsegv for user mod. > Move the declaration to restrict it to system emulation. > > Signed-off-by: Richard Henderson > --- > include/hw/core/tcg-cpu-ops.h | 22 ++ > linux-user/signal.c

Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/19/21 20:35, Richard Henderson wrote: > On 9/18/21 11:45 AM, Richard Henderson wrote: >> +/** >> + * raise_sigsegv: >> + * @cpu: the cpu context >> + * @addr: the guest address of the fault >> + * @access_type: access was read/write/execute >> + * @maperr: true for invalid page, false for

Re: [PATCH v2 34/41] target/ppc: Implement ppc_cpu_record_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Record DAR, DSISR, and exception_index. That last means > that we must exit to cpu_loop ourselves, instead of letting > exception_index being overwritten. Maybe complete: "This is exactly what the user-mode ppc_cpu_tlb_fill() does, so simply rename

Re: [PATCH v2 37/41] target/s390x: Implement s390_cpu_record_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Move the masking of the address from cpu_loop into > s390_cpu_record_sigsegv -- this is governed by hw, not linux. > This does mean we have to raise our own exception, rather > than return to the fallback. > > Use maperr to choose between

Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv

2021-09-19 Thread Richard Henderson
On 9/18/21 11:45 AM, Richard Henderson wrote: +/** + * raise_sigsegv: + * @cpu: the cpu context + * @addr: the guest address of the fault + * @access_type: access was read/write/execute + * @maperr: true for invalid page, false for permission fault + * @ra: host pc for unwinding + * + * Use the

Re: [PATCH v2 19/41] hw/core: Add TCGCPUOps.record_sigsegv

2021-09-19 Thread Richard Henderson
On 9/19/21 11:24 AM, Philippe Mathieu-Daudé wrote: On 9/19/21 20:22, Philippe Mathieu-Daudé wrote: On 9/18/21 20:45, Richard Henderson wrote: Add a new user-only interface for updating cpu state before raising a signal. This will replace tlb_fill for user-only and should result in less

Re: [PATCH v2 27/41] target/i386: Implement x86_cpu_record_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Record cr2, error_code, and exception_index. That last means > that we must exit to cpu_loop ourselves, instead of letting > exception_index being overwritten. > > Use the maperr parameter to properly set PG_ERROR_P_MASK. > > Signed-off-by: Richard

Re: [PATCH v2 24/41] target/cris: Make cris_cpu_tlb_fill sysemu only

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > The fallback code in raise_sigsegv is sufficient for cris-linux-user. > Remove the code from cpu_loop that handled the unnamed 0xaa exception. > > This makes all of the code in helper.c sysemu only, so remove the > ifdefs and move the file to

Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > This is a new interface to be provided by the os emulator > for raising SIGSEGV on fault. Use the new record_sigsegv > target hook. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 15 +++ > accel/tcg/user-exec.c

Re: [PATCH v2 19/41] hw/core: Add TCGCPUOps.record_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/19/21 20:22, Philippe Mathieu-Daudé wrote: > On 9/18/21 20:45, Richard Henderson wrote: >> Add a new user-only interface for updating cpu state before >> raising a signal. This will replace tlb_fill for user-only >> and should result in less boilerplate for each guest. >> >> Signed-off-by:

Re: How to fill a memory region with specific bytes?

2021-09-19 Thread Peter Maydell
On Sat, 18 Sept 2021 at 03:55, Duo jia wrote: > > Many SOCs have unique id, which is a fixed string of bytes. > I use "memory_region_init_ram" and "memory_region_add_subregion" to simulate > this region, how can I initialize specific bytes to fill? Mostly we just model that kind of thing as a

Re: [PATCH v2 19/41] hw/core: Add TCGCPUOps.record_sigsegv

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Add a new user-only interface for updating cpu state before > raising a signal. This will replace tlb_fill for user-only > and should result in less boilerplate for each guest. > > Signed-off-by: Richard Henderson > --- >

Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > Split host_signal_pc and host_signal_write out of user-exec.c. > > Signed-off-by: Richard Henderson > --- > linux-user/host/alpha/host-signal.h | 41 + > accel/tcg/user-exec.c | 31 +- > 2

Re: [PATCH v2 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Now that all of the linux-user hosts have been converted > to host-signal.h, drop the compatibility code. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 12 > linux-user/signal.c | 13 - > 2 files

Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/19/21 20:07, Richard Henderson wrote: > On 9/19/21 11:03 AM, Philippe Mathieu-Daudé wrote: >> On 9/18/21 20:44, Richard Henderson wrote: >>> Split host_signal_pc and host_signal_write out of user-exec.c. >>> >>> Signed-off-by: Richard Henderson >>> --- >>>  

Re: [PATCH v2 14/41] linux-user/host/mips: Populate host_signal.h

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:45, Richard Henderson wrote: > Split host_signal_pc and host_signal_write out of user-exec.c. > > Signed-off-by: Richard Henderson > --- > linux-user/host/mips/host-signal.h | 62 +- > accel/tcg/user-exec.c | 52 + >

Re: [PATCH v2 13/41] linux-user/host/s390: Populate host_signal.h

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > Split host_signal_pc and host_signal_write out of user-exec.c. > > Signed-off-by: Richard Henderson > --- > linux-user/host/s390/host-signal.h | 93 - > linux-user/host/s390x/host-signal.h | 2 +- > accel/tcg/user-exec.c

Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h

2021-09-19 Thread Richard Henderson
On 9/19/21 11:03 AM, Philippe Mathieu-Daudé wrote: On 9/18/21 20:44, Richard Henderson wrote: Split host_signal_pc and host_signal_write out of user-exec.c. Signed-off-by: Richard Henderson --- linux-user/host/alpha/host-signal.h | 41 + accel/tcg/user-exec.c

Re: high cpu usage in idle state

2021-09-19 Thread Peter Maydell
On Sat, 18 Sept 2021 at 09:12, Ali Vatankhah wrote: > then to check what instructions are executing I run this command: > > qemu-system-ppc64 -nographic -M ppce500 -cpu e5500 -kernel uImage -singlestep > -d in_asm -D target_asm.log > > Obviously this results in a Kernel panic, but the point is

Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > Split host_signal_pc and host_signal_write out of user-exec.c. > > Signed-off-by: Richard Henderson > --- > linux-user/host/alpha/host-signal.h | 41 + > accel/tcg/user-exec.c | 31 +- > 2

Re: [PATCH v2 06/41] linux-user: Reorg handling for SIGSEGV

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > Add stub host-signal.h for all linux-user hosts. > Add new code replacing cpu_signal_handler. > Full migration will happen one host at a time. > > Signed-off-by: Richard Henderson > --- > diff --git a/linux-user/signal.c b/linux-user/signal.c > index

Re: [PATCH v2 05/41] configure: Merge riscv32 and riscv64 host architectures

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > The existing code for safe-syscall.inc.S will compile > without change for riscv32 and riscv64. We may also > drop the meson.build stanza that merges them for tcg/. > > Signed-off-by: Richard Henderson > --- > configure

Re: Range of vcpu_index to plugin callbacks

2021-09-19 Thread Philippe Mathieu-Daudé
(Cc'ing qemu-devel@ mailing list since this is a development question). On 9/19/21 19:44, Robert Henry wrote: > What is the range of the values for vcpu_index given to callbacks, such as: > > typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index, > void *userdata); > >

Re: [PATCH v2 24/30] linux-user/openrisc: Use force_sig_fault, force_sigsegv_for_addr

2021-09-19 Thread Richard Henderson
On 8/24/21 10:17 AM, Peter Maydell wrote: I think that EXCP_RANGE should for us be unreachable in user-only mode (because it can only happen if the relevant bits in SR are set, and SR is writeable only in supervisor mode, and its starting value doesn't set these bits). So we could just delete

Re: [PATCH v3 00/25] linux-user: Clean up siginfo_t handling

2021-09-19 Thread Richard Henderson
On 9/18/21 6:56 PM, Richard Henderson wrote: Based-on: 20210918184527.408540-1-richard.hender...@linaro.org ("linux-user: Streamline handling of SIGSEGV") which is in turn based on at least 3 other patch sets, so: https://gitlab.com/rth7680/qemu/-/commits/tcg-siginfo Changes since v2: *

Re: [PATCH RESEND v2] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()

2021-09-19 Thread Richard Henderson
On 9/18/21 7:54 PM, Frank Chang wrote: Do you mean it's better to change to code sequence to something like: static void mark_fs_dirty(DisasContext *ctx) {     .     if (ctx->virt_enabled && ctx->mstatus_hs_fs != MSTATUS_FS) {         /* Remember the stage change for the rest of the TB.

Re: [RFC PATCH] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35

2021-09-19 Thread Ani Sinha
On Sun, 19 Sep 2021, Ani Sinha wrote: > > > > +static void test_acpi_q35_multif_bridge(void) > > > > +{ > > > > +test_data data = { > > > > +.machine = MACHINE_Q35, > > > > +.variant = ".multi-bridge", > > > > > > > +.required_struct_types =

Re: [PATCH v2 00/41] linux-user: Streamline handling of SIGSEGV

2021-09-19 Thread Philippe Mathieu-Daudé
On 9/18/21 20:44, Richard Henderson wrote: > linux-user: Reorg handling for SIGSEGV > linux-user/host/x86: Populate host_signal.h > linux-user/host/ppc: Populate host_signal.h > linux-user/host/alpha: Populate host_signal.h > linux-user/host/sparc: Populate host_signal.h >