diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-08-19 15:49:41 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-10-03 20:53:30 -0700 |
commit | af803a4fcb1c707a6a885b5736335baf794f7676 (patch) | |
tree | 3663346c9fc832baaffe1743d7f0302b1aa6773c /include | |
parent | c3c8bf579b431b6b305dce12d67ff6fe86bc79e8 (diff) | |
download | qemu-af803a4fcb1c707a6a885b5736335baf794f7676.zip qemu-af803a4fcb1c707a6a885b5736335baf794f7676.tar.gz qemu-af803a4fcb1c707a6a885b5736335baf794f7676.tar.bz2 |
accel/tcg: Introduce probe_access_full
Add an interface to return the CPUTLBEntryFull struct
that goes with the lookup. The result is not intended
to be valid across multiple lookups, so the user must
use the results immediately.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/exec-all.h | 15 | ||||
-rw-r--r-- | include/qemu/typedefs.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index bcad607..d255d69 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -434,6 +434,21 @@ int probe_access_flags(CPUArchState *env, target_ulong addr, MMUAccessType access_type, int mmu_idx, bool nonfault, void **phost, uintptr_t retaddr); +#ifndef CONFIG_USER_ONLY +/** + * probe_access_full: + * Like probe_access_flags, except also return into @pfull. + * + * The CPUTLBEntryFull structure returned via @pfull is transient + * and must be consumed or copied immediately, before any further + * access or changes to TLB @mmu_idx. + */ +int probe_access_full(CPUArchState *env, target_ulong addr, + MMUAccessType access_type, int mmu_idx, + bool nonfault, void **phost, + CPUTLBEntryFull **pfull, uintptr_t retaddr); +#endif + #define CODE_GEN_ALIGN 16 /* must be >= of the size of a icache line */ /* Estimated block size for TB allocation. */ diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 42f4ceb..a4aee23 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -42,6 +42,7 @@ typedef struct ConfidentialGuestSupport ConfidentialGuestSupport; typedef struct CPUAddressSpace CPUAddressSpace; typedef struct CPUArchState CPUArchState; typedef struct CPUState CPUState; +typedef struct CPUTLBEntryFull CPUTLBEntryFull; typedef struct DeviceListener DeviceListener; typedef struct DeviceState DeviceState; typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot; |