|
|
|
@ -783,12 +783,9 @@ typedef struct CPUArchState { |
|
|
|
#else /* CONFIG_USER_ONLY */ |
|
|
|
/* For usermode syscall translation. */ |
|
|
|
bool eabi; |
|
|
|
#endif /* CONFIG_USER_ONLY */ |
|
|
|
|
|
|
|
#ifdef TARGET_TAGGED_ADDRESSES |
|
|
|
/* Linux syscall tagged address support */ |
|
|
|
bool tagged_addr_enable; |
|
|
|
#endif |
|
|
|
#endif /* CONFIG_USER_ONLY */ |
|
|
|
} CPUARMState; |
|
|
|
|
|
|
|
static inline void set_feature(CPUARMState *env, int feature) |
|
|
|
@ -3217,34 +3214,7 @@ extern const uint64_t pred_esz_masks[5]; |
|
|
|
#define TAG_GRANULE (1 << LOG2_TAG_GRANULE) |
|
|
|
|
|
|
|
#ifdef CONFIG_USER_ONLY |
|
|
|
|
|
|
|
#define TARGET_PAGE_DATA_SIZE (TARGET_PAGE_SIZE >> (LOG2_TAG_GRANULE + 1)) |
|
|
|
|
|
|
|
#ifdef TARGET_TAGGED_ADDRESSES |
|
|
|
/**
|
|
|
|
* cpu_untagged_addr: |
|
|
|
* @cs: CPU context |
|
|
|
* @x: tagged address |
|
|
|
* |
|
|
|
* Remove any address tag from @x. This is explicitly related to the |
|
|
|
* linux syscall TIF_TAGGED_ADDR setting, not TBI in general. |
|
|
|
* |
|
|
|
* There should be a better place to put this, but we need this in |
|
|
|
* include/exec/cpu_ldst.h, and not some place linux-user specific. |
|
|
|
*/ |
|
|
|
static inline target_ulong cpu_untagged_addr(CPUState *cs, target_ulong x) |
|
|
|
{ |
|
|
|
CPUARMState *env = cpu_env(cs); |
|
|
|
if (env->tagged_addr_enable) { |
|
|
|
/*
|
|
|
|
* TBI is enabled for userspace but not kernelspace addresses. |
|
|
|
* Only clear the tag if bit 55 is clear. |
|
|
|
*/ |
|
|
|
x &= sextract64(x, 0, 56); |
|
|
|
} |
|
|
|
return x; |
|
|
|
} |
|
|
|
#endif /* TARGET_TAGGED_ADDRESSES */ |
|
|
|
#endif /* CONFIG_USER_ONLY */ |
|
|
|
|
|
|
|
#endif |
|
|
|
|