[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 10/20] target/microblaze: initialise MemTxAttrs for CPU a
From: |
Edgar E. Iglesias |
Subject: |
Re: [PATCH v5 10/20] target/microblaze: initialise MemTxAttrs for CPU access |
Date: |
Fri, 11 Nov 2022 20:41:15 +0100 |
On Fri, Nov 11, 2022 at 06:25:25PM +0000, Alex Bennée wrote:
> Both of these functions deal with CPU based access (as is evidenced by
> the secure check straight after). Use the new MEMTXATTRS_CPU
> constructor to ensure the correct CPU id is filled in should it ever
> be needed by any devices later.
Looks good to me!
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> target/microblaze/helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
> index 98bdb82de8..655be3b320 100644
> --- a/target/microblaze/helper.c
> +++ b/target/microblaze/helper.c
> @@ -44,7 +44,7 @@ bool mb_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
> MicroBlazeMMULookup lu;
> unsigned int hit;
> int prot;
> - MemTxAttrs attrs = {};
> + MemTxAttrs attrs = MEMTXATTRS_CPU(cs);
>
> attrs.secure = mb_cpu_access_is_secure(cpu, access_type);
>
> @@ -235,7 +235,7 @@ hwaddr mb_cpu_get_phys_page_attrs_debug(CPUState *cs,
> vaddr addr,
> unsigned int hit;
>
> /* Caller doesn't initialize */
> - *attrs = (MemTxAttrs) {};
> + *attrs = MEMTXATTRS_CPU(cs);
> attrs->secure = mb_cpu_access_is_secure(cpu, MMU_DATA_LOAD);
>
> if (mmu_idx != MMU_NOMMU_IDX) {
> --
> 2.34.1
>
- Re: [PATCH v5 15/20] hw/i386: update vapic_write to use MemTxAttrs, (continued)
- [PATCH v5 19/20] hw/isa: derive CPUState from MemTxAttrs in apm_ioport_writeb, Alex Bennée, 2022/11/11
- [PATCH v5 06/20] qtest: make read/write operation appear to be from CPU, Alex Bennée, 2022/11/11
- [PATCH v5 09/20] hw/arm: remove current_cpu hack from pxa2xx access, Alex Bennée, 2022/11/11
- [PATCH v5 10/20] target/microblaze: initialise MemTxAttrs for CPU access, Alex Bennée, 2022/11/11
- [PATCH v5 12/20] target/riscv: initialise MemTxAttrs for CPU access, Alex Bennée, 2022/11/11
- [PATCH v5 16/20] include: add MEMTXATTRS_MACHINE helper, Alex Bennée, 2022/11/11
- [PATCH v5 11/20] target/sparc: initialise MemTxAttrs for CPU access, Alex Bennée, 2022/11/11
- [PATCH v5 18/20] hw/i386: convert apic access to use MemTxAttrs, Alex Bennée, 2022/11/11