Re: [PATCH] pc-bios: ensure installed ROMs don't have execute permissions

2025-05-31 Thread Helge Deller
analysed by various tools/linters, which can trip up on the ROMs. Tell meson explicitly that all the ROMs should be without execute permission when installed. Signed-off-by: Daniel P. Berrangé Reviewed-by: Helge Deller Tested-by: Helge Deller Thanks! Helge --- pc-bios/meson.build | 2

Re: [PATCH 0/3] target/hppa: Fix FP exception handling

2025-05-24 Thread Helge Deller
On 5/24/25 12:26, Michael Tokarev wrote: On 17.05.2025 15:00, del...@kernel.org wrote: From: Helge Deller This series fixes and improves the floating point exception handling in the hppa system and user emulation. A testcase is included in patch #3. Please review. Thanks! Helge Helge

Re: [PATCH] roms: re-remove execute bit from hppa-firmware*

2025-05-24 Thread Helge Deller
64.img Reviewed-by: Daniel P. Berrangé Acked-by: Helge Deller Though given the back & forth, I wonder if we wouldn't be better off changing meson.build rules instead to mode 0644 for all blobs ? install_data(blobs, install_dir: qemu_datadir, ins

Re: [PATCH v5 00/24] target/m68k: fpu improvements

2025-05-07 Thread Helge Deller
On 5/7/25 23:12, Richard Henderson wrote: v3: https://lore.kernel.org/qemu-devel/20240909172823.649837-1-richard.hender...@linaro.org/ v4: https://lore.kernel.org/qemu-devel/20250224171444.440135-1-richard.hender...@linaro.org/ Changes for v5: - Rebase from February. :-/ - Use ldl_be_p

Re: [PATCH v2] hw/char/serial: Remove unused prog_if compat property

2025-05-02 Thread Helge Deller
Mathieu-Daudé --- v2: Reword commit message, add Rb tag hw/char/diva-gsp.c | 6 ++ hw/char/serial-pci-multi.c | 7 ++- hw/char/serial-pci.c | 10 ++ 3 files changed, 6 insertions(+), 17 deletions(-) Reviewed-by: Helge Deller Helge

Re: Generic way to detect qemu linux-user emulation

2025-03-18 Thread Helge Deller
On 3/18/25 11:18, Andreas Schwab wrote: Is there a generic way for a program to detect that is it being run inside the linux-user emulation? Yes, having a reliable way to detect it would be good. My current (unreliable) way to detect it is using uname. The kernel string and arch name don't mat

Re: Generic way to detect qemu linux-user emulation

2025-03-18 Thread Helge Deller
On 3/18/25 11:36, Helge Deller wrote: On 3/18/25 11:18, Andreas Schwab wrote: Is there a generic way for a program to detect that is it being run inside the linux-user emulation? Yes, having a reliable way to detect it would be good. In qemu-user emulation we could change the return values

Re: Call for GSoC internship project ideas

2025-02-07 Thread Helge Deller
On 2/7/25 15:47, Stefan Hajnoczi wrote: On Fri, Feb 7, 2025 at 9:39 AM Helge Deller wrote: Hi Stefan, On 1/28/25 17:16, Stefan Hajnoczi wrote: How to propose your idea -- Reply to this email with the following project idea template filled in: Would something

Re: Call for GSoC internship project ideas

2025-02-07 Thread Helge Deller
Hi Stefan, On 1/28/25 17:16, Stefan Hajnoczi wrote: How to propose your idea -- Reply to this email with the following project idea template filled in: Would something like this be acceptable? === Develop a driver to emulate an existing network-, scsi- or graphic-

Re: [PATCH] MAINTAINERS: Add myself as HPPA maintainer

2025-01-31 Thread Helge Deller
On 1/31/25 19:15, Philippe Mathieu-Daudé wrote: On 28/1/25 18:09, del...@kernel.org wrote: From: Helge Deller Since I contribute quite some code to hppa, I'd like to step up and become the secondary maintainer for HPPA beside Richard. Additionally change status of hppa machines to maint

Re: [PULL 8/9] target/hppa: Implement space register hashing for 64-bit HP-UX

2025-01-31 Thread Helge Deller
On 1/30/25 20:06, Michael Tokarev wrote: 30.01.2025 16:29, del...@kernel.org wrote: diff --git a/target/hppa/translate.c b/target/hppa/translate.c +    if (ctx->is_pa20 && (a->dr == 2)) { +    /* Update gva_offset_mask from the new value of %dr2 */ +    gen_helper_update_gva_offset_m

Re: [PATCH 4/4] target/hppa: Implement space register hashing for 64-bit HP-UX

2025-01-29 Thread Helge Deller
ariable in CPUArchState and recalculated at every modification of the CPU PSW or %dr2. Signed-off-by: Helge Deller Suggested-by: Richard Henderson Suggested-by: Sven Schnelle diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index c86f9190d2..5655677431 100644 --- a/target/hppa/cpu.c +++ b/target/

Re: [PATCH 4/4] target/hppa: Implement space register hashing for 64-bit HP-UX

2025-01-28 Thread Helge Deller
* Richard Henderson : > On 1/28/25 17:52, Richard Henderson wrote: > > On 1/28/25 14:45, del...@kernel.org wrote: > > > +    if (ctx->is_pa20 && (a->dr == 2)) { > > > +    /* Exit TB to recalculate gva_offset_mask on %dr2 */ > > > +    ctx->base.is_jmp = DISAS_IAQ_N_STALE_EXIT; > > > +    }

Re: [PATCH 3/5] target/hppa: Implement CPU diagnose registers for 64-bit HP-UX

2025-01-28 Thread Helge Deller
On 1/28/25 19:19, Richard Henderson wrote: On 1/28/25 08:14, del...@kernel.org wrote: From: Helge Deller PA-RISC CPUs have diagnose registers (%dr). Those are mostly undocumented and control cache behaviour, memory behaviour, reset button management and many other related internal CPU things

Re: [PATCH 1/2] hw/hppa: Support up to 256 GiB RAM on 64-bit machines

2025-01-24 Thread Helge Deller
On 1/24/25 18:52, Philippe Mathieu-Daudé wrote: On 22/1/25 19:09, del...@kernel.org wrote: From: Helge Deller Allow up to 256 GB RAM, which is the maximum a rp8440 machine (the very last 64-bit PA-RISC machine) physically supports. Signed-off-by: Helge Deller ---   hw/hppa/hppa_hardware.h

Re: [PATCH v4 1/7] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-22 Thread Helge Deller
* Laurent Vivier : > [...] > It would be cleaner to replace all the IFA_XXX by their QEMU_IFA_XXX. Thanks for review, Laurent! Below I've merged patch #1 and #7, as suggested by you. Is this OK? Can you review? Thanks! Helge ____ From: Helge D

Re: [PATCH v3 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF

2025-01-20 Thread Helge Deller
On 1/20/25 21:42, Helge Deller wrote: On 1/20/25 19:17, Laurent Vivier wrote: Le 19/01/2025 à 05:41, del...@kernel.org a écrit : From: Helge Deller Add IP_MULTICAST_IF and share the code with IP_ADD_MEMBERSHIP / IP_DROP_MEMBERSHIP. Sharing the code makes sense, because the manpage of ip(7

Re: [PATCH v3 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF

2025-01-20 Thread Helge Deller
On 1/20/25 19:17, Laurent Vivier wrote: Le 19/01/2025 à 05:41, del...@kernel.org a écrit : From: Helge Deller Add IP_MULTICAST_IF and share the code with IP_ADD_MEMBERSHIP / IP_DROP_MEMBERSHIP. Sharing the code makes sense, because the manpage of ip(7)  says: IP_MULTICAST_IF (since Linux

[PATCH v2] linux-user: Add missing /proc/cpuinfo fields for sparc

2025-01-08 Thread Helge Deller
Add some missing fields which may be parsed by userspace applications. Signed-off-by: Helge Deller v2: - fixed cpu name and type depending on currently active CPU diff --git a/linux-user/sparc/target_proc.h b/linux-user/sparc/target_proc.h index 3bb3134a47..744fa10730 100644 --- a/linux-user

Re: [PATCH] linux-user: Add missing /proc/cpuinfo fields for sparc

2025-01-08 Thread Helge Deller
On 1/9/25 01:40, Richard Henderson wrote: On 1/8/25 15:21, Helge Deller wrote: My suggestion: I change my patch to just add: +    dprintf(fd, "ncpus probed\t: %d\n", num_cpus); +    dprintf(fd, "ncpus active\t: %d\n", num_cpus); +    dprintf(fd, "State:\n"); + 

Re: [PATCH] linux-user: Add missing /proc/cpuinfo fields for sparc

2025-01-08 Thread Helge Deller
On 1/8/25 23:59, Richard Henderson wrote: On 1/8/25 13:16, Helge Deller wrote: Add some missing fields which may be parsed by userspace applications. Signed-off-by: Helge Deller diff --git a/linux-user/sparc/target_proc.h b/linux-user/sparc/target_proc.h index 3bb3134a47..172d089fed 100644

Re: [PATCH v4 1/6] tests: Add functional tests for HPPA machines

2025-01-08 Thread Helge Deller
-quick+func-hppa / func-hppa-version OK 0.14s 1 subtests passed 3/4 qemu:func-quick+func-hppa / func-hppa-info_usernetOK 0.22s 1 subtests passed 4/4 qemu:func-quick+func-hppa / func-hppa-hppa_seabiosOK 0.22s 2 subtests passed Suggested-by: Helge Deller Signed-off-by: Philippe

[PATCH] linux-user: Add missing /proc/cpuinfo fields for sparc

2025-01-08 Thread Helge Deller
Add some missing fields which may be parsed by userspace applications. Signed-off-by: Helge Deller diff --git a/linux-user/sparc/target_proc.h b/linux-user/sparc/target_proc.h index 3bb3134a47..172d089fed 100644 --- a/linux-user/sparc/target_proc.h +++ b/linux-user/sparc/target_proc.h @@ -8,7

Re: [PATCH v4 4/6] target/hppa: Only set PSW 'M' bit on reset

2025-01-01 Thread Helge Deller
e M bit. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Helge Deller --- target/hppa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 41538d39d62..dbd46842841 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -20

Re: [PATCH v4 1/6] tests: Add functional tests for HPPA machines

2025-01-01 Thread Helge Deller
-quick+func-hppa / func-hppa-version OK 0.14s 1 subtests passed 3/4 qemu:func-quick+func-hppa / func-hppa-info_usernetOK 0.22s 1 subtests passed 4/4 qemu:func-quick+func-hppa / func-hppa-hppa_seabiosOK 0.22s 2 subtests passed Suggested-by: Helge Deller Signed-off-by: Philippe

Re: [PATCH v3 0/5] hppa CPU reset and speedup

2024-12-30 Thread Helge Deller
On 12/30/24 21:47, Philippe Mathieu-Daudé wrote: On 30/12/24 21:24, Helge Deller wrote: Hi Philippe, On 12/30/24 16:25, Philippe Mathieu-Daudé wrote: Respin of: https://lore.kernel.org/qemu-devel/20241229234154.32250-1- del...@kernel.org/ "Add CPU reset function and speed up runtim

Re: [PATCH v3 0/5] hppa CPU reset and speedup

2024-12-30 Thread Helge Deller
On 12/30/24 21:36, Philippe Mathieu-Daudé wrote: On 30/12/24 21:24, Helge Deller wrote: Hi Philippe, On 12/30/24 16:25, Philippe Mathieu-Daudé wrote: Respin of: https://lore.kernel.org/qemu-devel/20241229234154.32250-1- del...@kernel.org/ "Add CPU reset function and speed up runtim

Re: [PATCH v3 0/5] hppa CPU reset and speedup

2024-12-30 Thread Helge Deller
(untested) We haven't implemented PSW-M support and the first thing the firmware does is to reprogram PSW. So, basically it's not needed. Helge, could we add a functional test booting Linux? What exactly are you looking for? Some trivial preinstalled disc image with kernels? Any examples?

Re: [PATCH v3] target/hppa: Add CPU reset method

2024-12-28 Thread Helge Deller
On 12/29/24 02:58, Richard Henderson wrote: On 12/27/24 15:17, Helge Deller wrote: Add the CPU reset method, which resets all CPU registers and the TLB to zero. Then the CPU will switch to 32-bit mode (PSW_W bit is not set) and start execution at address 0xf004. Although we currently want

Re: [PATCH] target/hppa: Speed up hppa_is_pa20()

2024-12-28 Thread Helge Deller
On 12/28/24 12:16, BALATON Zoltan wrote: On Sat, 28 Dec 2024, Helge Deller wrote: Although the hppa_is_pa20() helper is costly due to string comparisms in object_dynamic_cast(), it is called quite often during memory lookups and at each start of a block of instruction translations. Speed

[PATCH v2] target/hppa: Speed up hppa_is_pa20()

2024-12-28 Thread Helge Deller
result in the is_pa20 of struct CPUArchState. Signed-off-by: Helge Deller v2: - moved init to hppa_cpu_initfn() and is_pa20 to end of CPUArchState struct (feedback by Richard) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index b908cf65c6..05de952a87 100644 --- a/target/hppa/cpu.c +++ b

[PATCH] target/hppa: Speed up hppa_is_pa20()

2024-12-27 Thread Helge Deller
result in the is_pa20 of struct CPUArchState. Signed-off-by: Helge Deller diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index a31dc32a9f..08ac1ec068 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -281,6 +281,7 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState

[PATCH v3] target/hppa: Add CPU reset method

2024-12-27 Thread Helge Deller
case the state structs gets extended with other variables later on which should not be reset. Signed-off-by: Helge Deller V3: - Call reset function from hppa_machine_reset() instead V2: - Add end_reset_fields marker - call reset function in hppa_cpu_initfn() diff --git a/hw/hppa/machine.c b/hw

Re: [PULL 0/6] Linux user fix gupnp patches

2024-12-19 Thread Helge Deller
Hi Stefan, On 12/19/24 21:01, Stefan Hajnoczi wrote: Will this go through Laurent or did you send a pull request to have it merged into qemu.git/master directly? Actually, I'm fine with either one. I do understand that reviewing this patchset is somewhat challenging as this area is quite compl

Re: [PATCH 0/6] linux-user: Add support for various missing netlink sockopt entries

2024-12-13 Thread Helge Deller
ping for review... On 11/29/24 15:38, del...@kernel.org wrote: From: Helge Deller This patchset adds various missing sockopt calls, so that qemu linux-user is able to successfully build the debian gupnp package in a chroot. Tested with a 32-bit big-endian hppa linux-user chroot running on a

[PATCH] linux-user: Fix setreuid and setregid to use direct syscalls

2024-11-05 Thread Helge Deller
missed in that commit. This fixes the build of the debian package of the uid_wrapper library (https://cwrap.org/uid_wrapper.html) when running linux-user. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 59b2080b98..0279f23576 100644 --- a/linux-user/sysca

[PATCH v2] target/hppa: Add CPU reset method

2024-11-04 Thread Helge Deller
case the state structs gets extended with other variables later on which should not be reset. Signed-off-by: Helge Deller V2: (based on feedback by Peter Maydell) - Add end_reset_fields marker - call reset function in hppa_cpu_initfn() diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index

Re: [PATCH] target/hppa: Add CPU reset method

2024-10-29 Thread Helge Deller
On 10/29/24 13:44, Peter Maydell wrote: On Fri, 25 Oct 2024 at 19:25, Helge Deller wrote: Add the missing CPU reset method, which resets all CPU registers and the TLB to zero. Then the CPU will switch to 32-bit mode (PSW_W bit is not set) and start execution at address 0xf004. Signed-off

Re: [PATCH 00/21] softfloat: Set 2-NaN propagation rule in float_status, not at compile time

2024-10-25 Thread Helge Deller
On 10/25/24 16:59, Peter Maydell wrote: On Fri, 25 Oct 2024 at 15:49, Helge Deller wrote: On 10/25/24 16:12, Peter Maydell wrote: A summary of those TODOs and other oddities I have noticed but not tried to tackle is:> * hppa really ought to implement a CPU reset method * alpha a

[PATCH] target/hppa: Add CPU reset method

2024-10-25 Thread Helge Deller
Add the missing CPU reset method, which resets all CPU registers and the TLB to zero. Then the CPU will switch to 32-bit mode (PSW_W bit is not set) and start execution at address 0xf004. Signed-off-by: Helge Deller diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index c38439c180

Re: [PATCH 00/21] softfloat: Set 2-NaN propagation rule in float_status, not at compile time

2024-10-25 Thread Helge Deller
On 10/25/24 16:12, Peter Maydell wrote: A summary of those TODOs and other oddities I have noticed but not tried to tackle is:> * hppa really ought to implement a CPU reset method * alpha also doesn't implement CPU reset I used the alpha code as template to implement the hppa machine. Tha

Re: [PATCH v3 11/20] target/hppa: Implement TCGCPUOps.tlb_fill_align

2024-10-09 Thread Helge Deller
On 10/9/24 02:04, Richard Henderson wrote: Convert hppa_cpu_tlb_fill to hppa_cpu_tlb_fill_align so that we can recognize alignment exceptions in the correct priority order. Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=219339 Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v3 06/20] accel/tcg: Use the alignment test in tlb_fill_align

2024-10-09 Thread Helge Deller
On 10/9/24 02:04, Richard Henderson wrote: When we have a tlb miss, defer the alignment check to the new tlb_fill_align hook. Move the existing alignment check so that we only perform it with a tlb hit. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v3 05/20] accel/tcg: Add TCGCPUOps.tlb_fill_align

2024-10-09 Thread Helge Deller
whole page + * @probe: test only, no fault + * @ra: host return address for exception unwind + * + * If the access is valid, fill in @out and return true. + * Otherwise if probe is true, return false. + * Otherwise raise and exception and do not return. Otherwise raise an(?) exception... Reviewed-by: Helge Deller

Re: [PATCH v2 20/21] target/arm: Add arm_cpu_tlb_fill_align

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Fill in the tlb_fill_align hook. So far this is the same as tlb_fill_align_first, except that we can pass memop to get_phys_addr as well. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/internals.h | 3

Re: [PATCH v2 19/21] target/arm: Move device detection earlier in get_phys_addr_lpae

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Determine cache attributes, and thence Device vs Normal memory, "thence" ? Other than that I have no arm knowledge to review the patch below Helge earlier in the function. We have an existing regime_is_stage2 if block into which this can be sl

Re: [PATCH v2 17/21] target/arm: Pass MemOp through get_phys_addr_twostage

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Pass memop through get_phys_addr_twostage with its recursion with get_phys_addr_nogpc. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/ptw.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

Re: [PATCH v2 18/21] target/arm: Pass MemOp to get_phys_addr_lpae

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Pass the value through from get_phys_addr_nogpc. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/ptw.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

Re: [PATCH v2 16/21] target/arm: Pass MemOp to get_phys_addr_nogpc

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Zero is the safe do-nothing value for callers to use. Pass the value through from get_phys_addr_gpc and get_phys_addr_with_space_nogpc. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/ptw.c | 14 -- 1

Re: [PATCH v2 14/21] target/arm: Pass MemOp to get_phys_addr_with_space_nogpc

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Zero is the safe do-nothing value for callers to use. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/internals.h | 3 ++- target/arm/helper.c| 4 ++-- target/arm/ptw.c | 2 +- 3 files changed, 5

Re: [PATCH v2 15/21] target/arm: Pass MemOp to get_phys_addr_gpc

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Zero is the safe do-nothing value for callers to use. Pass the value through from get_phys_addr. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/ptw.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-)

Re: [PATCH v2 13/21] target/arm: Pass MemOp to get_phys_addr

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Zero is the safe do-nothing value for callers to use. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/arm/internals.h | 3 ++- target/arm/ptw.c| 2 +- target/arm/tcg/m_helper.c | 8 target

Re: [PATCH v2 12/21] target/hppa: Add hppa_cpu_tlb_fill_align

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Fill in the tlb_fill_align hook, so that we can recognize alignment exceptions in the correct priority order. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/cpu.h| 3 +++ target/hppa/cpu.c| 2

Re: [PATCH v2 11/21] target/hppa: Handle alignment faults in hppa_get_physical_address

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: In Chapter 5, Interruptions, the group 3 exceptions lists "Unaligned data reference trap" has higher priority than "Data memory break trap". Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/h

Re: [PATCH v2 10/21] target/hppa: Fix priority of T, D, and B page faults

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Drop the 'else' so that ret is overridden with the highest priority fault. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/mem_helper.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

Re: [PATCH v2 09/21] target/hppa: Perform access rights before protection id check

2024-10-07 Thread Helge Deller
rson Reviewed-by: Helge Deller --- target/hppa/mem_helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

Re: [PATCH v2 08/21] target/hppa: Add MemOp argument to hppa_get_physical_address

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Just add the argument, unused at this point. Zero is the safe do-nothing value for all callers. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/cpu.h| 2 +- target/hppa/int_helper.c | 2 +- target/hppa

Re: [PATCH v2 07/21] accel/tcg: Use the tlb_fill_align hook

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: When we have a tlb miss, defer the alignment check to the new tlb_fill_align hook. Move the existing alignment check so that we only perform it with a tlb hit. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- accel/tcg/cputlb.c

Re: [PATCH v2 06/21] hw/core/tcg-cpu-ops: Introduce tlb_fill_align hook

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Add the hook to struct TCGCPUOps. Add a default implementation that recognizes alignment faults before page faults. Populate all TCGCPUOps structures with the default implementation. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 05/21] include/exec/memop: Introduce memop_atomicity_bits

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Split out of mmu_lookup. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- include/exec/memop.h | 24 accel/tcg/cputlb.c | 16 ++-- 2 files changed, 26 insertions(+), 14 deletions(-) diff

Re: [PATCH v2 04/21] include/exec/memop: Rename get_alignment_bits

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Rename to use "memop_" prefix, like other functions that operate on MemOp. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- include/exec/memop.h | 4 ++-- accel/tcg/cputlb.c | 4 ++-- acce

Re: [PATCH v2 03/21] include/exec/memop: Move get_alignment_bits from tcg.h

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: This function is specific to MemOp, not TCG in general. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- include/exec/memop.h | 23 +++ include/tcg/tcg.h| 23 --- 2 files changed, 23

Re: [PATCH v2 02/21] accel/tcg: Expand tlb_fill for 3 callers

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- accel/tcg/cputlb.c | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index fd6459b695

Re: [PATCH v2 01/21] accel/tcg: Assert noreturn from write-only page for atomics

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: There should be no "just in case"; the page is already in the tlb, and known to be not readable. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- accel/tcg/cputlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletion

Re: [PATCH v2 00/21] accel/tcg: Introduce tlb_fill_align hook

2024-10-07 Thread Helge Deller
On 10/5/24 22:05, Richard Henderson wrote: This new hook will allow targets to recognize an alignment fault with the correct priority with respect to other faults that can be raised by paging. This should fix several hppa fault priority issues, most importantly that access permissions come befor

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-02 Thread Helge Deller
On 10/2/24 17:47, Peter Maydell wrote: On Wed, 2 Oct 2024 at 16:35, Alex Bennée wrote: Helge Deller writes: When the emulated CPU reads or writes to a memory location a) for which no read/write permissions exists, *and* b) the access happens unaligned (non-natural alignment), then the CPU

{PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-01 Thread Helge Deller
necessary code to allow PARISC and possibly other architectures to trigger a memory fault instead. Signed-off-by: Helge Deller Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=219339 diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 117b516739..dd1da358fb 100644 --- a/accel/tcg/cputlb.c +++ b

[PATCH v2] target/hppa: Fix PSW V-bit packaging in cpu_hppa_get for hppa64

2024-09-03 Thread Helge Deller
Signed-off-by: Helge Deller Reviewed-by: Richard Henderson Tested-by: Guenter Roeck Fixes: 931adff31478 ("target/hppa: Update cpu_hppa_get/put_psw for hppa64") Cc: qemu-sta...@nongnu.org # v8.2+ --- v2: - added change to cpu.h (as requested by Richard) - added Richards R-b - added sta

[PATCH] target/hppa: Fix random 32-bit linux-user crashes

2024-09-03 Thread Helge Deller
hppa: Do not mask in copy_iaoq_entry") Signed-off-by: Helge Deller diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 2bcb3b602b..56d9568d6c 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -319,7 +319,7 @@ static inline target_ulong hppa_form_gva_psw(target

[PATCH] target/hppa: Fix PSW V-bit packaging in cpu_hppa_get for hppa64

2024-09-03 Thread Helge Deller via
Signed-off-by: Helge Deller Fixes: 931adff31478 ("target/hppa: Update cpu_hppa_get/put_psw for hppa64") diff --git a/target/hppa/helper.c b/target/hppa/helper.c index b79ddd8184..d4b1a3cd5a 100644 --- a/target/hppa/helper.c +++ b/target/hppa/helper.c @@ -53,7 +53,7 @@ target_ulong cpu_hp

Re: qemu-hppa-user: crashes immediately in hppa chroot

2024-08-29 Thread Helge Deller
On 8/29/24 04:38, Richard Henderson wrote: On 8/29/24 03:12, Helge Deller wrote: Hi Richard, I tested qemu-user from v9.1-rc4 for hppa and noticed that it crashes immediately when starting a hppa chroot. I was able to bisect the segfault back to commit 081a0ed188d8d9d9038f00337d331d185a7ae331

qemu-hppa-user: crashes immediately in hppa chroot

2024-08-28 Thread Helge Deller
Hi Richard, I tested qemu-user from v9.1-rc4 for hppa and noticed that it crashes immediately when starting a hppa chroot. I was able to bisect the segfault back to commit 081a0ed188d8d9d9038f00337d331d185a7ae331 Author: Richard Henderson Date: Wed Mar 27 13:04:00 2024 -1000 target/hppa: D

Re: [PATCH v2 3/6] hppa: Add support for an emulated TOC/NMI button.

2024-05-29 Thread Helge Deller
On 5/29/24 17:11, Philippe Mathieu-Daudé wrote: Hi Helge & Richard, Hi Philippe, Nevermind the missed review comments, I'm revisiting this patch while looking at building libtcg-hppa.so. Ok. On 1/2/22 00:56, Philippe Mathieu-Daudé wrote: On 31/1/22 22:35, Helge Deller wrote: A

Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default

2024-05-28 Thread Helge Deller
On 5/28/24 12:35, Thomas Huth wrote: On 28/05/2024 11.54, Gerd Hoffmann wrote: The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann ---   hw/usb/hcd-ohci-pci.c | 1 +   hw/usb/Kconfig    | 1 -   2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd

Re: [PATCH v2 41/45] target/hppa: Implement CF_PCREL

2024-05-14 Thread Helge Deller
o install. > > As expected, this reduces the runtime overhead of compilation when > running a Linux kernel with address space randomization enabled. Ah! I was wondering why you tried to convert to CF_PCREL at all. So, that's the overall reason. > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 40/45] target/hppa: Adjust priv for B,GATE at runtime

2024-05-14 Thread Helge Deller
* Richard Henderson : > Do not compile in the priv change based on the first > translation; look up the PTE at execution time. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 39/45] target/hppa: Drop tlb_entry return from hppa_get_physical_address

2024-05-14 Thread Helge Deller
* Richard Henderson : > The return-by-reference is never used. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 38/45] target/hppa: Implement PSW_X

2024-05-14 Thread Helge Deller
* Richard Henderson : > Use PAGE_WRITE_INV to temporarily enable write permission > on for a given page, driven by PSW_X being set. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 37/45] target/hppa: Implement PSW_B

2024-05-14 Thread Helge Deller
* Richard Henderson : > PSW_B causes B,GATE to trap as an illegal instruction, removing > the sequential execution test that was merely an approximation. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 36/45] target/hppa: Manage PSW_X and PSW_B in translator

2024-05-14 Thread Helge Deller
t most once per TB. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 35/45] target/hppa: Split PSW X and B into their own field

2024-05-14 Thread Helge Deller
* Richard Henderson : > Generally, both of these bits are cleared at the end of each > instruction. By separating these, we will be able to clear > both with a single insn, instead of 2 or 3. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 34/45] target/hppa: Improve hppa_cpu_dump_state

2024-05-14 Thread Helge Deller
* Richard Henderson : > Print both raw IAQ_Front and IAQ_Back as well as the GVAs. > Print control registers in system mode. > Print floating point register if CPU_DUMP_FPU. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 33/45] target/hppa: Do not mask in copy_iaoq_entry

2024-05-14 Thread Helge Deller
* Richard Henderson : > As with loads and stores, code offsets are kept intact until the > full gva is formed. In qemu, this is in cpu_get_tb_cpu_state. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 32/45] target/hppa: Store full iaoq_f and page offset of iaoq_b in TB

2024-05-14 Thread Helge Deller
ds wrong, or missing commas, but maybe I'm just wrong...? Other than that...: Reviewed-by: Helge Deller > Signed-off-by: Richard Henderson

Re: [PATCH v2 31/45] linux-user/hppa: Force all code addresses to PRIV_USER

2024-05-14 Thread Helge Deller
* Richard Henderson : > The kernel does this along the return path to user mode. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > linux-user/hppa/target_cpu.h | 4 ++-- > target/hppa/cpu.h| 3 +++ > linux-user/elfload.c | 4 ++--

Re: [PATCH v2 30/45] target/hppa: Use delay_excp for conditional trap on overflow

2024-05-14 Thread Helge Deller
tions(-) Reviewed-by: Helge Deller

Re: [PATCH v2 29/45] target/hppa: Use delay_excp for conditional traps

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > target/hppa/helper.h | 1 - > target/hppa/int_helper.c | 2 +- > target/hppa/op_helper.c | 7 --- > target/hppa/translate.c | 41 ++-- > 4

Re: [PATCH v2 28/45] target/hppa: Introduce DisasDelayException

2024-05-14 Thread Helge Deller
rget/hppa/translate.c | 60 + > 1 file changed, 55 insertions(+), 5 deletions(-) Reviewed-by: Helge Deller

Re: [PATCH v2 27/45] target/hppa: Remove cond_free

2024-05-14 Thread Helge Deller
tions do the right thing with c or cf == 0, > so there's no need for a special case anymore. > > Signed-off-by: Richard Henderson > --- > target/hppa/translate.c | 102 +++- > 1 file changed, 27 insertions(+), 75 deletions(-) Reviewed-by: Helge Deller

Re: [PATCH v2 26/45] target/hppa: Use TCG_COND_TST* in trans_ftest

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson > --- > target/hppa/translate.c | 22 ++ > 1 file changed, 6 insertions(+), 16 deletions(-) Reviewed-by: Helge Deller

Re: [PATCH v2 25/45] target/hppa: Use registerfields.h for FPSR

2024-05-14 Thread Helge Deller
* Richard Henderson : > Define all of the context dependent field definitions. > Use FIELD_EX32 and FIELD_DP32 with named fields instead > of extract32 and deposit32 with raw constants. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/h

Re: [PATCH v2 24/45] target/hppa: Use TCG_COND_TST* in trans_bb_imm

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/target/hppa/translate.c b/target/hppa/translate.c > index 47f4b23d

Re: [PATCH v2 23/45] target/hppa: Use TCG_COND_TST* in do_unit_addsub

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 22/45] target/hppa: Use TCG_COND_TST* in do_unit_zero_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 21/45] target/hppa: Use TCG_COND_TST* in do_log_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > We can directly test bits of a 32-bit comparison without > zero or sign-extending an intermediate result. > We can directly test bit 0 for odd/even. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 20/45] target/hppa: Use TCG_COND_TST* in do_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > We can directly test bits of a 32-bit comparison without > zero or sign-extending an intermediate result. > We can directly test bit 0 for odd/even. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 19/45] target/hppa: Rename cond_make_* helpers

2024-05-14 Thread Helge Deller
>cond_make_0_tmp -> cond_make_ti >cond_make_0 -> cond_make_vi >cond_make -> cond_make_vv > > Pass 0 explictly, rather than implicitly in the function name. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 18/45] target/hppa: Use displacements in DisasIAQE

2024-05-14 Thread Helge Deller
* Richard Henderson : > This is a first step in enabling CF_PCREL, but for now > we regenerate the absolute address before writeback. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 17/45] target/hppa: Introduce and use DisasIAQE for branch management

2024-05-14 Thread Helge Deller
* Richard Henderson : > Wrap offset and space together in one structure, ensuring > that they're copied together as required. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 08/45] target/hppa: Add install_link

2024-05-14 Thread Helge Deller
On 5/14/24 16:37, Helge Deller wrote: * Richard Henderson : Add a common routine for writing the return address. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 54 +++-- 1 file changed, 31 insertions(+), 23

  1   2   3   4   5   6   7   8   9   10   >