e2k: disable probe page cache by default
This commit is contained in:
parent
376350c626
commit
1ae8e5f53a
@ -130,7 +130,9 @@ void cpu_loop(CPUE2KState *env)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
|
if (env->enable_pagecache) {
|
||||||
e2k_clear_probe_page_cache(num);
|
e2k_clear_probe_page_cache(num);
|
||||||
|
}
|
||||||
ret = do_syscall(env, num, args[1], args[2], args[3],
|
ret = do_syscall(env, num, args[1], args[2], args[3],
|
||||||
args[4], args[5], args[6], args[7], args[8]);
|
args[4], args[5], args[6], args[7], args[8]);
|
||||||
}
|
}
|
||||||
|
@ -262,6 +262,7 @@ static struct TCGCPUOps e2k_tcg_ops = {
|
|||||||
static Property e2k_cpu_properties[] = {
|
static Property e2k_cpu_properties[] = {
|
||||||
DEFINE_PROP_BOOL("force_save_alc_dst", E2KCPU, env.force_save_alc_dst, false),
|
DEFINE_PROP_BOOL("force_save_alc_dst", E2KCPU, env.force_save_alc_dst, false),
|
||||||
DEFINE_PROP_BOOL("tags", E2KCPU, env.enable_tags, false),
|
DEFINE_PROP_BOOL("tags", E2KCPU, env.enable_tags, false),
|
||||||
|
DEFINE_PROP_BOOL("pagecache", E2KCPU, env.enable_pagecache, false),
|
||||||
DEFINE_PROP_END_OF_LIST()
|
DEFINE_PROP_END_OF_LIST()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -936,6 +936,9 @@ typedef struct CPUArchState {
|
|||||||
/* Enable tags handling.
|
/* Enable tags handling.
|
||||||
* Default: false */
|
* Default: false */
|
||||||
bool enable_tags;
|
bool enable_tags;
|
||||||
|
/* Enable page cache for speculative memory accesses.
|
||||||
|
* Default: false */
|
||||||
|
bool enable_pagecache;
|
||||||
|
|
||||||
struct e2k_def_t def;
|
struct e2k_def_t def;
|
||||||
|
|
||||||
|
@ -20,15 +20,20 @@
|
|||||||
static bool e2k_probe_access_cached(CPUE2KState *env, target_ulong page, int flags)
|
static bool e2k_probe_access_cached(CPUE2KState *env, target_ulong page, int flags)
|
||||||
{
|
{
|
||||||
int index = (page >> TARGET_PAGE_BITS) & (TARGET_PROBE_CACHE_SIZE - 1);
|
int index = (page >> TARGET_PAGE_BITS) & (TARGET_PROBE_CACHE_SIZE - 1);
|
||||||
|
uint8_t page_flags;
|
||||||
|
|
||||||
if (env->probe_cache_page[index] == page) {
|
if (env->enable_pagecache && env->probe_cache_page[index] == page) {
|
||||||
return (env->probe_cache_flags[index] & flags) == flags;
|
return (env->probe_cache_flags[index] & flags) == flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
env->probe_cache_page[index] = page;
|
page_flags = page_get_flags(page);
|
||||||
env->probe_cache_flags[index] = page_get_flags(page);
|
|
||||||
|
|
||||||
return (env->probe_cache_flags[index] & flags) == flags;
|
if (env->enable_pagecache) {
|
||||||
|
env->probe_cache_page[index] = page;
|
||||||
|
env->probe_cache_flags[index] = page_flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (page_flags & flags) == flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool e2k_probe_access(CPUE2KState *env, target_ulong addr, int size, int flags)
|
static bool e2k_probe_access(CPUE2KState *env, target_ulong addr, int size, int flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user