qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-arm] [PATCH 04/26] target/arm: Convert to CPUClas


From: Richard Henderson
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 04/26] target/arm: Convert to CPUClass::tlb_fill
Date: Wed, 3 Apr 2019 14:30:58 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/3/19 12:14 PM, Peter Maydell wrote:
> On Wed, 3 Apr 2019 at 10:44, Richard Henderson
> <address@hidden> wrote:
> 
>> +bool arm_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
>> +                      MMUAccessType access_type, int mmu_idx,
>> +                      bool probe, uintptr_t retaddr)
>> +{
>> +    ARMCPU *cpu = ARM_CPU(cs);
>> +
>> +#ifdef CONFIG_USER_ONLY
>> +    cpu->env.exception.vaddress = address;
>> +    if (access_type == MMU_INST_FETCH) {
>> +        cs->exception_index = EXCP_PREFETCH_ABORT;
>> +    } else {
>> +        cs->exception_index = EXCP_DATA_ABORT;
>> +    }
>> +    cpu_loop_exit_restore(cs, retaddr);
>> +#else
>> +    hwaddr phys_addr;
>> +    target_ulong page_size;
>> +    int prot, ret;
>> +    MemTxAttrs attrs = {};
>> +    ARMMMUFaultInfo fi = {};
>> +
>> +    /*
>> +     * Walk the page table and (if the mapping exists) add the page
>> +     * to the TLB. Return false on success, or true on failure. Populate
>> +     * fsr with ARM DFSR/IFSR fault register format value on failure.
>> +     */
> 
> This comment about what we return doesn't seem to match what
> the code is doing.

Bah.  The perils of copying comments while changing the function signature.


r~



reply via email to

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