Re: [Qemu-devel] [PATCH v4 06/21] target-arm: Provide syndrome information for MMU faults

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

 



On 17 March 2014 12:41, Peter Maydell <peter.maydell@xxxxxxxxxx> wrote:
> On 17 March 2014 03:28, Peter Crosthwaite <peter.crosthwaite@xxxxxxxxxx> wrote:
>> On Fri, Mar 7, 2014 at 5:32 AM, Peter Maydell <peter.maydell@xxxxxxxxxx> wrote:
>>> From: Rob Herring <rob.herring@xxxxxxxxxx>
>
>>> +    /* Set bit 26 for exceptions with no change in EL */
>>> +    if (arm_current_pl(env)) {
>>> +        syn |= 1 << ARM_EL_EC_SHIFT;
>>> +    }
>>> +
>>
>> Perhaps in internals.h:
>>
>> #define ARM_EL_EC_SAME_LEVEL (1 << ARM_EL_EC_SHIFT)
>>
>> Then this becomes:
>>
>> syn |= ARM_EL_EC_SAME_LEVEL
>>
>> Then in internals.h you can be more self documenting with:
>>
>> EC_BREAKPOINT_SAME_EL = EC_BREAKPOINT | ARM_EL_EC_SAME_LEVEL
>
> Yeah, seems reasonable.

On the other hand you can't define EC_BREAKPOINT_SAME_EL
like that, because the EC_ enum values aren't shifted.

Perhaps it would be better to have the syn_* functions for
the EC values which have SAME_EL versions (currently just
insn abort and data abort, since we don't implement any
of the hardware debug exceptions) have an extra parameter
bool same_el, and have the syn_ function OR in the extra bit.

thanks
-- PMM
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux