Message ID | 20170525210508.4910-27-aurelien@aurel32.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 25.05.2017 23:05, Aurelien Jarno wrote: > Now that the extended-translation facility 2 has been fully implemented, > it's possible to emulated a most a z800 CPU with TCG. > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> > --- > target/s390x/cpu_models.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c > index 8d27363b07..9c4227d2dd 100644 > --- a/target/s390x/cpu_models.c > +++ b/target/s390x/cpu_models.c > @@ -670,8 +670,8 @@ static S390CPUModel *get_max_cpu_model(Error **errp) > if (kvm_enabled()) { > kvm_s390_get_host_cpu_model(&max_model, errp); > } else { > - /* TCG emulates a z900 */ > - max_model.def = &s390_cpu_defs[0]; > + /* TCG emulates at most a z800 */ > + max_model.def = &s390_cpu_defs[3]; These hard-coded offsets into s390_cpu_defs are kind of ugly ... Maybe you could use max_model.def = s390_find_cpu_def(0x2066, 7, 3, NULL); instead? Thomas
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 8d27363b07..9c4227d2dd 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -670,8 +670,8 @@ static S390CPUModel *get_max_cpu_model(Error **errp) if (kvm_enabled()) { kvm_s390_get_host_cpu_model(&max_model, errp); } else { - /* TCG emulates a z900 */ - max_model.def = &s390_cpu_defs[0]; + /* TCG emulates at most a z800 */ + max_model.def = &s390_cpu_defs[3]; bitmap_copy(max_model.features, max_model.def->default_feat, S390_FEAT_MAX); }
Now that the extended-translation facility 2 has been fully implemented, it's possible to emulated a most a z800 CPU with TCG. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- target/s390x/cpu_models.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)