qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/24] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions


From: Warner Losh
Subject: Re: [PATCH 04/24] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions
Date: Thu, 28 Oct 2021 11:36:44 -0600



On Thu, Oct 28, 2021 at 9:14 AM Richard Henderson <richard.henderson@linaro.org> wrote:
On 10/19/21 9:44 AM, Warner Losh wrote:
> +    cpsr_write(env, regs->uregs[16], 0xffffffff, CPSRWriteRaw);

This looks a bit suspicious.
Over in linux-user we use

     cpsr_write(env, regs->uregs[16], CPSR_USER | CPSR_EXEC,
                CPSRWriteByInstr);

Are you setting something special in pt_regs that would warrant writing supervisor bits of
CPSR?  In addition, CPSRWriteRaw won't rebuild hflags, which means that changes to Thumb
state won't be recognized properly.

Now that you highlight it, the code I posted looks wrong. The above code makes better
sense to me. I'll make the change in our bsd-user fork and run it through the FreeBSD
test harness that we have. I'll see if it introduces any regressions. Today I have an
environment that I maintain by hand that runs ~5900 tests, of which bsd-user's
qemu-arm passes like ~5500. My long term goal is to get that integrated first into the
bsd-user fork's CI and later into the optional FreeBSD CI in qemu project. In addition,
I'll be tagging 'testing qemu-user' in the testing environment so we can exclude things
not emulated and/or mark known problems with a bug pointer. The test takes about
3 hours to run in emulation is the only thing I'm worried about...

Warner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]