s390x: cleanup & re-enable some skey code
This commit is contained in:
@ -219,13 +219,6 @@ void s390_enable_css_support(S390CPU *cpu)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void s390_cpu_reset_full(CPUState *dev)
|
|
||||||
{
|
|
||||||
return s390_cpu_reset(dev, S390_CPU_RESET_CLEAR);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void s390_cpu_class_init(struct uc_struct *uc, CPUClass *oc)
|
static void s390_cpu_class_init(struct uc_struct *uc, CPUClass *oc)
|
||||||
{
|
{
|
||||||
S390CPUClass *scc = S390_CPU_CLASS(oc);
|
S390CPUClass *scc = S390_CPU_CLASS(oc);
|
||||||
|
@ -460,47 +460,6 @@ static void s390_max_cpu_model_class_init(struct uc_struct *uc, CPUClass *oc, vo
|
|||||||
// "Enables all features supported by the accelerator in the current host";
|
// "Enables all features supported by the accelerator in the current host";
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Generate type name for a cpu model. Caller has to free the string. */
|
|
||||||
static char *s390_cpu_type_name(const char *model_name)
|
|
||||||
{
|
|
||||||
return g_strdup_printf(S390_CPU_TYPE_NAME("%s"), model_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate type name for a base cpu model. Caller has to free the string. */
|
|
||||||
static char *s390_base_cpu_type_name(const char *model_name)
|
|
||||||
{
|
|
||||||
return g_strdup_printf(S390_CPU_TYPE_NAME("%s-base"), model_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
CPUClass *s390_cpu_class_by_name(const char *name)
|
|
||||||
{
|
|
||||||
char *typename = s390_cpu_type_name(name);
|
|
||||||
CPUClass *oc;
|
|
||||||
|
|
||||||
oc = object_class_by_name(typename);
|
|
||||||
g_free(typename);
|
|
||||||
return oc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const TypeInfo qemu_s390_cpu_type_info = {
|
|
||||||
//.name = S390_CPU_TYPE_NAME("qemu"),
|
|
||||||
.parent = TYPE_S390_CPU,
|
|
||||||
.instance_init = s390_qemu_cpu_model_initfn,
|
|
||||||
.instance_finalize = s390_cpu_model_finalize,
|
|
||||||
.class_init = s390_qemu_cpu_model_class_init,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const TypeInfo max_s390_cpu_type_info = {
|
|
||||||
//.name = S390_CPU_TYPE_NAME("max"),
|
|
||||||
.parent = TYPE_S390_CPU,
|
|
||||||
.instance_init = s390_max_cpu_model_initfn,
|
|
||||||
.instance_finalize = s390_cpu_model_finalize,
|
|
||||||
.class_init = s390_max_cpu_model_class_init,
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void init_ignored_base_feat(void)
|
static void init_ignored_base_feat(void)
|
||||||
{
|
{
|
||||||
static const int feats[] = {
|
static const int feats[] = {
|
||||||
|
@ -2061,9 +2061,6 @@ uint32_t HELPER(tprot)(CPUS390XState *env, uint64_t a1, uint64_t a2)
|
|||||||
/* insert storage key extended */
|
/* insert storage key extended */
|
||||||
uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2)
|
uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static S390SKeysState *ss;
|
static S390SKeysState *ss;
|
||||||
static S390SKeysClass *skeyclass;
|
static S390SKeysClass *skeyclass;
|
||||||
uint64_t addr = wrap_address(env, r2);
|
uint64_t addr = wrap_address(env, r2);
|
||||||
@ -2076,7 +2073,7 @@ uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (unlikely(!ss)) {
|
if (unlikely(!ss)) {
|
||||||
ss = s390_get_skeys_device();
|
ss = s390_get_skeys_device(env->uc);
|
||||||
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2084,13 +2081,11 @@ uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set storage key extended */
|
/* set storage key extended */
|
||||||
void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)
|
void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
static S390SKeysState *ss;
|
static S390SKeysState *ss;
|
||||||
static S390SKeysClass *skeyclass;
|
static S390SKeysClass *skeyclass;
|
||||||
uint64_t addr = wrap_address(env, r2);
|
uint64_t addr = wrap_address(env, r2);
|
||||||
@ -2103,7 +2098,7 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (unlikely(!ss)) {
|
if (unlikely(!ss)) {
|
||||||
ss = s390_get_skeys_device();
|
ss = s390_get_skeys_device(env->uc);
|
||||||
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2114,14 +2109,11 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)
|
|||||||
* that point to a physical address we have to flush the whole TLB.
|
* that point to a physical address we have to flush the whole TLB.
|
||||||
*/
|
*/
|
||||||
tlb_flush_all_cpus_synced(env_cpu(env));
|
tlb_flush_all_cpus_synced(env_cpu(env));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset reference bit extended */
|
/* reset reference bit extended */
|
||||||
uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2)
|
uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
#if 0
|
|
||||||
static S390SKeysState *ss;
|
static S390SKeysState *ss;
|
||||||
static S390SKeysClass *skeyclass;
|
static S390SKeysClass *skeyclass;
|
||||||
uint8_t re, key;
|
uint8_t re, key;
|
||||||
@ -2133,7 +2125,7 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (unlikely(!ss)) {
|
if (unlikely(!ss)) {
|
||||||
ss = s390_get_skeys_device();
|
ss = s390_get_skeys_device(env->uc);
|
||||||
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
skeyclass = S390_SKEYS_GET_CLASS(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2163,7 +2155,6 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return re >> 1;
|
return re >> 1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t HELPER(mvcs)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2)
|
uint32_t HELPER(mvcs)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2)
|
||||||
|
Reference in New Issue
Block a user