From 6aff24c6a61c6fec31e555c7748ba6085b7b2c06 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 9 Jun 2016 19:11:03 +0200 Subject: pc: Parse CPU features only once Considering that features are converted to global properties and global properties are automatically applied to every new instance of created CPU (at object_new() time), there is no point in parsing cpu_model string every time a CPU created. So move parsing outside CPU creation loop and do it only once. Parsing also should be done before any CPU is created so that features would affect the first CPU a well. Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- qom/cpu.c | 1 - 1 file changed, 1 deletion(-) (limited to 'qom') diff --git a/qom/cpu.c b/qom/cpu.c index f884a666a1..a9727a1e64 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -297,7 +297,6 @@ static void cpu_common_parse_features(const char *typename, char *features, * to assert(!cpu_globals_initialized). * Current callers of ->parse_features() are: * - cpu_generic_init() - * - cpu_x86_create() */ if (cpu_globals_initialized) { return; -- cgit v1.2.1