From 410e98146ffde201ab4c778823ac8beaa74c4c3f Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sat, 24 Dec 2016 20:29:33 +0000 Subject: target/i386: Fix bad patch application to translate.c In commit c52ab08aee6f7d4717fc6b517174043126bd302f, the patch snippet for the "syscall" insn got applied to "iret". Signed-off-by: Doug Evans Message-Id: Signed-off-by: Eduardo Habkost --- target/i386/translate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'target') diff --git a/target/i386/translate.c b/target/i386/translate.c index 59e11fcd1f..7adfff09fc 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -6435,10 +6435,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, tcg_const_i32(s->pc - s->cs_base)); set_cc_op(s, CC_OP_EFLAGS); } - /* TF handling for the syscall insn is different. The TF bit is checked - after the syscall insn completes. This allows #DB to not be - generated after one has entered CPL0 if TF is set in FMASK. */ - gen_eob_worker(s, false, true); + gen_eob(s); break; case 0xe8: /* call im */ { @@ -7119,7 +7116,10 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_update_cc_op(s); gen_jmp_im(pc_start - s->cs_base); gen_helper_syscall(cpu_env, tcg_const_i32(s->pc - pc_start)); - gen_eob(s); + /* TF handling for the syscall insn is different. The TF bit is checked + after the syscall insn completes. This allows #DB to not be + generated after one has entered CPL0 if TF is set in FMASK. */ + gen_eob_worker(s, false, true); break; case 0x107: /* sysret */ if (!s->pe) { -- cgit v1.2.3-55-g7522 From 8ed877b78498c89aa7ce5c76aa20841ff5072796 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Nov 2016 16:21:39 -0200 Subject: qmp: Report QOM type name on query-cpu-definitions The new typename attribute on query-cpu-definitions will be used to help management software use device-list-properties to check which properties can be set using -cpu or -global for the CPU model. Signed-off-by: Eduardo Habkost Message-Id: <1479320499-29818-1-git-send-email-ehabkost@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost --- qapi-schema.json | 5 ++++- target/arm/helper.c | 1 + target/i386/cpu.c | 1 + target/ppc/translate_init.c | 1 + target/s390x/cpu_models.c | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) (limited to 'target') diff --git a/qapi-schema.json b/qapi-schema.json index e42998edec..ce20f16757 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3221,6 +3221,9 @@ # @unavailable-features: #optional List of properties that prevent # the CPU model from running in the current # host. (since 2.8) +# @typename: Type name that can be used as argument to @device-list-properties, +# to introspect properties configurable using -cpu or -global. +# (since 2.9) # # @unavailable-features is a list of QOM property names that # represent CPU model attributes that prevent the CPU from running. @@ -3242,7 +3245,7 @@ ## { 'struct': 'CpuDefinitionInfo', 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', - '*unavailable-features': [ 'str' ] } } + '*unavailable-features': [ 'str' ], 'typename': 'str' } } ## # @query-cpu-definitions: diff --git a/target/arm/helper.c b/target/arm/helper.c index 8dcabbf576..9f1a335e3f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5214,6 +5214,7 @@ static void arm_cpu_add_definition(gpointer data, gpointer user_data) info = g_malloc0(sizeof(*info)); info->name = g_strndup(typename, strlen(typename) - strlen("-" TYPE_ARM_CPU)); + info->q_typename = g_strdup(typename); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b0640f1e38..a149c8dc42 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2235,6 +2235,7 @@ static void x86_cpu_definition_entry(gpointer data, gpointer user_data) info->name = x86_cpu_class_get_model_name(cc); x86_cpu_class_check_missing_features(cc, &info->unavailable_features); info->has_unavailable_features = true; + info->q_typename = g_strdup(object_class_get_name(oc)); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 626e03186c..19ef2505e4 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -10305,6 +10305,7 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) info = g_malloc0(sizeof(*info)); info->name = g_strdup(alias->alias); + info->q_typename = g_strdup(object_class_get_name(oc)); entry = g_malloc0(sizeof(*entry)); entry->value = info; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c1e729df5e..5b66d3325d 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -290,6 +290,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque) info->has_migration_safe = true; info->migration_safe = scc->is_migration_safe; info->q_static = scc->is_static; + info->q_typename = g_strdup(object_class_get_name(klass)); entry = g_malloc0(sizeof(*entry)); -- cgit v1.2.3-55-g7522