[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 31/35] cpu: Move icount_decr to CPUNegativeOffse
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 31/35] cpu: Move icount_decr to CPUNegativeOffsetState |
Date: |
Mon, 25 Mar 2019 18:23:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 23/03/19 20:09, Richard Henderson wrote:
> Amusingly, we had already ignored the comment to keep this
> value at the end of CPUState. This restores the minimum
> negative offset from TCG_AREG0 for code generation.
>
> This is slightly complicated for qom/cpu.c and tcg-all.c,
> in that they are compiled once. This means we need an out
> of line helper to access the icount_decr value.
>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Andreas Färber <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>
> RFC: I had problems with the build system moving qom/cpu.c
> from common-obj-y to obj-y. Then I tried just splitting out
> a piece of it, and ran into odder build system issues. Then
> I hacked Makefile.target in a way that doesn't look right,
> but works.
>
> Question: Should I bother splitting qom/cpu.c at all? Just
> move the whole thing to obj-y (with non-broken build changes,
> obviously, whatever that might be).
I think you should, because moving it to obj-y would be a major headache
if we ever were to resurrect the multiarch patches by Peter C.
That said, does cpu_neg really need env_neg and thus ArchCPU? Perhaps
you could:
1) define CPUTLB in terms of MAX_MMU_MODES (12) instead of NB_MMU_MODES
2) assert that
offsetof(ArchCPU, env) - offsetof(ArchCPU, neg) ==
sizeof(CPUNegativeOffsetState)
3) use this in cpu_neg to go from cpu->env_ptr to the
CPUNegativeOffsetState.
This lets you implement cpu_neg in a target-independent manner.
Paolo
- [Qemu-devel] [PATCH for-4.1 00/35] tcg: Move the softmmu tlb to CPUNegativeOffsetState, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 16/35] target/mips: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 30/35] cpu: Introduce CPUNegativeOffsetState, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 32/35] cpu: Move the softmmu tlb to CPUNegativeOffsetState, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 29/35] cpu: Move ENV_OFFSET to exec/gen-icount.h, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 25/35] target/tilegx: Use env_cpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 33/35] cpu: Remove CPU_COMMON, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 31/35] cpu: Move icount_decr to CPUNegativeOffsetState, Richard Henderson, 2019/03/23
- Re: [Qemu-devel] [PATCH 31/35] cpu: Move icount_decr to CPUNegativeOffsetState,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 27/35] target/unicore32: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 35/35] tcg/arm: Use LDRD to load tlb mask+table, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 28/35] target/xtensa: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 20/35] target/ppc: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 34/35] tcg/aarch64: Use LDP to load tlb mask+table, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 22/35] target/s390x: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 17/35] target/moxie: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 19/35] target/openrisc: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23