summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2014-03-03 23:19:19 +0100
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:45 +0100
commit94a444b295cddad008483eb928925a793af5aa9b (patch)
treedb419c4cd3a8b241d8511719292a72a469991789 /include
parentd940ee9b787d37a9ea90f4379a79825ade08bb05 (diff)
downloadqemu-94a444b295cddad008483eb928925a793af5aa9b.tar.gz
cpu: Introduce CPUClass::parse_features() hook
Adapt the X86CPU implementation to suit the generic hook. This involves a cleanup of error handling to cope with NULL errp. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/qom/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 89d5dd126f..3703b6864e 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -68,6 +68,7 @@ struct TranslationBlock;
* CPUClass:
* @class_by_name: Callback to map -cpu command line model name to an
* instantiatable CPU type.
+ * @parse_features: Callback to parse command line arguments.
* @reset: Callback to reset the #CPUState to its initial state.
* @reset_dump_flags: #CPUDumpFlags to use for reset logging.
* @has_work: Callback for checking if there is work to do.
@@ -97,6 +98,7 @@ typedef struct CPUClass {
/*< public >*/
ObjectClass *(*class_by_name)(const char *cpu_model);
+ void (*parse_features)(CPUState *cpu, char *str, Error **errp);
void (*reset)(CPUState *cpu);
int reset_dump_flags;