[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 04/21] target-arm: Provide correct syndrome i
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 04/21] target-arm: Provide correct syndrome information for cpreg access traps |
Date: |
Mon, 17 Mar 2014 12:32:29 +0000 |
On 17 March 2014 03:05, Peter Crosthwaite <address@hidden> wrote:
> On Fri, Mar 7, 2014 at 5:32 AM, Peter Maydell <address@hidden> wrote:
>> For exceptions taken to AArch64, if a coprocessor/system register
>> access fails due to a trap or enable bit then the syndrome information
>> must include details of the failing instruction (crn/crm/opc1/opc2
>> fields, etc). Make the decoder construct the syndrome information
>> at translate time so it can be passed at runtime to the access-check
>> helper function and used as required.
> Can we space out the constants to a consistent tab stop for readability?
Sure.
>> -void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip)
>> +void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip, uint32_t
>> syndrome)
>> {
>> const ARMCPRegInfo *ri = rip;
>> switch (ri->accessfn(env, ri)) {
>> case CP_ACCESS_OK:
>> return;
>> case CP_ACCESS_TRAP:
>> + env->exception.syndrome = syndrome;
>
> Can TCG just deposit this directly and unconditionally straight to the
> env to avoid the extra syndrome arg?
Hmm. I think in theory that would be possible, but it seems
to me that it would be pretty confusing if exception.syndrome
could be set for anything other than "we're going to take an
exception and this is it". Passing the syndrome as a function
argument (probably in a register) seems better than always
doing a store to memory, as well. Or am I missing something that
would make it slower?
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v4 16/21] target-arm: Implement SP_EL0, SP_EL1, (continued)
- [Qemu-devel] [PATCH v4 19/21] target-arm: Implement AArch64 EL1 exception handling, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 18/21] target-arm: Move arm_log_exception() into internals.h, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 21/21] hw/arm/virt: Add support for Cortex-A57, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 04/21] target-arm: Provide correct syndrome information for cpreg access traps, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 10/21] target-arm: Add v8 mmu translation support, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 11/21] target-arm: Don't mention PMU in debug feature register, Peter Maydell, 2014/03/06
- [Qemu-devel] [PATCH v4 06/21] target-arm: Provide syndrome information for MMU faults, Peter Maydell, 2014/03/06