[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 01/22] target/ppc: add external PID support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [PULL 01/22] target/ppc: add external PID support |
Date: |
Thu, 15 Nov 2018 10:22:55 +0000 |
On 8 November 2018 at 12:16, David Gibson <address@hidden> wrote:
> From: Roman Kapl <address@hidden>
>
> External PID is a mechanism present on BookE 2.06 that enables application to
> store/load data from different address spaces. There are special version of
> some
> instructions, which operate on alternate address space, which is specified in
> the EPLC/EPSC regiser.
>
> This implementation uses two additional MMU modes (mmu_idx) to provide the
> address space for the load and store instructions. The QEMU TLB fill code was
> modified to recognize these MMU modes and use the values in EPLC/EPSC to find
> the proper entry in he PPC TLB. These two QEMU TLBs are also flushed on each
> write to EPLC/EPSC.
>
> Following instructions are implemented: dcbfep dcbstep dcbtep dcbtstep dcbzep
> dcbzlep icbiep lbepx ldepx lfdepx lhepx lwepx stbepx stdepx stfdepx sthepx
> stwepx.
>
> Following vector instructions are not: evlddepx evstddepx lvepx lvepxl stvepx
> stvepxl.
Hi; Coverity reports an issue (CID1396864) with this function:
> +/* dcbfep (external PID dcbf) */
> +static void gen_dcbfep(DisasContext *ctx)
> +{
> + /* XXX: specification says this is treated as a load by the MMU */
> + TCGv t0;
> + CHK_SV;
> + gen_set_access_type(ctx, ACCESS_CACHE);
> + t0 = tcg_temp_new();
> + gen_addr_reg_index(ctx, t0);
> + tcg_gen_qemu_ld_tl(t0, t0, PPC_TLB_EPID_LOAD, DEF_MEMOP(MO_UB));
> + tcg_temp_free(t0);
> +}
It says that the gen_set_access_type() call is unreachable. I think
this is a false positive (the code is unreachable, but only if
CONFIG_USER_ONLY is defined). On the other hand, all the other
similar gen_* functions in this file that use CHK_SV seem to have
a pattern of
#if defined(CONFIG_USER_ONLY)
GEN_PRIV;
#else
TCGv t0;
CHK_SV;
[etc]
#endif
so maybe we should do that here too for consistency?
thanks
-- PMM
- [Qemu-ppc] [PULL 13/22] spapr_pci: convert g_malloc() to g_new(), (continued)
- [Qemu-ppc] [PULL 13/22] spapr_pci: convert g_malloc() to g_new(), David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 09/22] target/ppc: Split out float_invalid_op_addsub, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 20/22] This patch fixes processing of rfi instructions in icount mode., David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 05/22] hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 18/22] MAINTAINERS: PPC: Remove myself, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 22/22] ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 12/22] target/ppc: Split out float_invalid_cvt, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 06/22] target/ppc: Split up float_invalid_op_excp, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 01/22] target/ppc: add external PID support, David Gibson, 2018/11/08
- Re: [Qemu-ppc] [PULL 01/22] target/ppc: add external PID support,
Peter Maydell <=
- [Qemu-ppc] [PULL 07/22] target/ppc: Remove float_check_status, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 15/22] hw/ppc/mac_newworld: Free openpic_irqs array after use, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 14/22] macio/pmu: Fix missing vmsd terminator, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 16/22] target/ppc: fix mtmsr instruction for icount, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 21/22] target/ppc: Add one reg id for ptcr, David Gibson, 2018/11/08
- [Qemu-ppc] [PULL 17/22] ppc/pnv: check size before data buffer access, David Gibson, 2018/11/08
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/22] ppc-for-3.1 queue 20181108, Eric Blake, 2018/11/08