From nobody Sun Apr 28 05:24:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622279710; cv=none; d=zohomail.com; s=zohoarc; b=BiZH6RcLK8T8WsidIbxx63Pe0JzOCL9cQ8O+X8gdaT2wFuFmtIbXlW0o36cAKWbJ/H0ueA7q6R9wSvC/pK8cldAgrtPCIR1eKa9q+WIoyo/dFsxwWGYubXS7b8PMsVXB50kHv7xT6y6Do2mScCsm3ZoCCHWMEa+JdlZ68Vbd6Nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622279710; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0hLBajeRODOVVhWrr6yKi1f/oM4Ln7sgbWW5uEPEvTE=; b=eMKulsORZeVvmkYIU8zI9+GrdhukNNzR5qpTD1syp1HgV/6VLKjakIPPJPa6oEEfvCY89Z5ZbZJaadapE47ALC+g0mW+KJkfkf+mcce7jVQeS/SsKqOU7dQhbtlCnyahBkW3FloA2S6qdzJtEDeu5p7F28nFWRAxCdxwrHzTjGk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622279710928623.6485466225972; Sat, 29 May 2021 02:15:10 -0700 (PDT) Received: from localhost ([::1]:45192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmv3l-0005ne-U9 for importer2@patchew.org; Sat, 29 May 2021 05:15:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmv21-0002wR-Ju for qemu-devel@nongnu.org; Sat, 29 May 2021 05:13:21 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:39378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmv1z-0000df-Sl for qemu-devel@nongnu.org; Sat, 29 May 2021 05:13:21 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A4B061FD30; Sat, 29 May 2021 09:13:17 +0000 (UTC) Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 3369911A98; Sat, 29 May 2021 09:13:16 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id IK6uCqwFsmCbEwAALh3uQQ (envelope-from ); Sat, 29 May 2021 09:13:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622279597; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0hLBajeRODOVVhWrr6yKi1f/oM4Ln7sgbWW5uEPEvTE=; b=0uGjpplLxqUTEB79TkM4cFa0eSNhh78ebQWWqXfjjjBzJG7UZWWwDDNQNolkYRoIp8o093 vyEitrHyq3Eb9ZGNFYmCQRlodoOY0vtjwYion0s5764mShPmYKw9K9vxMAgH3HHLtvBE3M XVXarFa9M310ed5wjMgraMfxrsiuOSA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622279597; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0hLBajeRODOVVhWrr6yKi1f/oM4Ln7sgbWW5uEPEvTE=; b=vGoHCr0/TC8F6hAH+jRrWhyqtXjAdz5wTJB2EaosnveK81laxZoTtyMv3l+SNup8i06Rhx m70xq+E2vGI4GFBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622279596; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0hLBajeRODOVVhWrr6yKi1f/oM4Ln7sgbWW5uEPEvTE=; b=kEiKiziEswBdOkQG8HJioFXYra1faue59deYhFUwdwr8Vzee/VZIkuiDSby2y/RDO0rHxD 4vSceUSIqKMM60Nq3VuFqYG2zfqomsGhPb7l9HzhaF41YSrPhL3ukEWIEJ1hfv/3GeeZqG AXs32MGy1S/D4zpxBfX7DKUyCsRr+J0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622279596; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0hLBajeRODOVVhWrr6yKi1f/oM4Ln7sgbWW5uEPEvTE=; b=zM2TaNGtJ0i6jNWmLY5MAolJi5F7/J/aLmCejfweg96pBm4j30hnCkOpTE9POWRe7XooK8 GAu+ooWTzu/zCdBA== From: Claudio Fontana To: Peter Maydell , Paolo Bonzini , Eduardo Habkost , Siddharth Chandrasekaran , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] i386: reorder call to cpu_exec_realizefn in x86_cpu_realizefn Date: Sat, 29 May 2021 11:13:12 +0200 Message-Id: <20210529091313.16708-2-cfontana@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210529091313.16708-1-cfontana@suse.de> References: <20210529091313.16708-1-cfontana@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: imap.suse.de; none X-Spam-Score: 1.00 X-Spamd-Result: default: False [1.00 / 100.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.29; envelope-from=cfontana@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, "Michael S . Tsirkin" , Marcelo Tosatti , Richard Henderson , qemu-devel@nongnu.org, Cameron Esfahani , Roman Bolshakov , Claudio Fontana Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 4 invalid signatures) Content-Type: text/plain; charset="utf-8" we need to expand features first, before we attempt to check them in the accel realizefn code called by cpu_exec_realizefn(). At the same time we need checks for code_urev and host_cpuid_required, and modifications to cpu->mwait to happen after the initial setting of them inside the accel realizefn code. Partial Fix. Fixes: 48afe6e4eabf ("i386: split cpu accelerators from cpu.c, using AccelC= PUClass") Signed-off-by: Claudio Fontana --- target/i386/cpu.c | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9e211ac2ce..6bcb7dbc2c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6133,34 +6133,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Erro= r **errp) Error *local_err =3D NULL; static bool ht_warned; =20 - /* Process Hyper-V enlightenments */ - x86_cpu_hyperv_realize(cpu); - - cpu_exec_realizefn(cs, &local_err); - if (local_err !=3D NULL) { - error_propagate(errp, local_err); - return; - } - - if (xcc->host_cpuid_required && !accel_uses_host_cpuid()) { - g_autofree char *name =3D x86_cpu_class_get_model_name(xcc); - error_setg(&local_err, "CPU model '%s' requires KVM or HVF", name); - goto out; - } - - if (cpu->ucode_rev =3D=3D 0) { - /* The default is the same as KVM's. */ - if (IS_AMD_CPU(env)) { - cpu->ucode_rev =3D 0x01000065; - } else { - cpu->ucode_rev =3D 0x100000000ULL; - } - } - - /* mwait extended info: needed for Core compatibility */ - /* We always wake on interrupt even if host does not have the capabili= ty */ - cpu->mwait.ecx |=3D CPUID_MWAIT_EMX | CPUID_MWAIT_IBE; - if (cpu->apic_id =3D=3D UNASSIGNED_APIC_ID) { error_setg(errp, "apic-id property was not initialized properly"); return; @@ -6190,6 +6162,34 @@ static void x86_cpu_realizefn(DeviceState *dev, Erro= r **errp) & CPUID_EXT2_AMD_ALIASES); } =20 + /* Process Hyper-V enlightenments */ + x86_cpu_hyperv_realize(cpu); + + cpu_exec_realizefn(cs, &local_err); + if (local_err !=3D NULL) { + error_propagate(errp, local_err); + return; + } + + if (xcc->host_cpuid_required && !accel_uses_host_cpuid()) { + g_autofree char *name =3D x86_cpu_class_get_model_name(xcc); + error_setg(&local_err, "CPU model '%s' requires KVM or HVF", name); + goto out; + } + + if (cpu->ucode_rev =3D=3D 0) { + /* The default is the same as KVM's. */ + if (IS_AMD_CPU(env)) { + cpu->ucode_rev =3D 0x01000065; + } else { + cpu->ucode_rev =3D 0x100000000ULL; + } + } + + /* mwait extended info: needed for Core compatibility */ + /* We always wake on interrupt even if host does not have the capabili= ty */ + cpu->mwait.ecx |=3D CPUID_MWAIT_EMX | CPUID_MWAIT_IBE; + /* For 64bit systems think about the number of physical bits to presen= t. * ideally this should be the same as the host; anything other than ma= tching * the host can cause incorrect guest behaviour. --=20 2.26.2 From nobody Sun Apr 28 05:24:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622279816; cv=none; d=zohomail.com; s=zohoarc; b=m8uOPabRos3LHzgBg8nIEQyw8j0Zij4nTrhDr0TLmEd7c2O/BpvR0XbUWMWVULfO9VoqBEjncpYLPeaPxjeCU2DM9D96FaZWgQjTaPauAOjyOHI6y5Wu4W19Iv6XcJRHHN/CNxRgR8ayr56FvMdHIy6y7fRKZsVdvRlSFc/7Dwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622279816; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+RLLpKzaG6cee9YoeuvdoRHLOhiqV7lPKVjXnQJR+5c=; b=VKSkwaWV2m7t8f+azq3uW1Tt7Dj3Mnb27bvd2yDF90ewC0WrdJQxfuqjgBnvVZAxBEBBtCYs7AHodRyDyNr30oi4F+JGYtvSasc4jrQ7EK6VBUKrZ7w0YMLYCxVxONSTI9bpTCfzdEXD3E0y46Ommr91azE0BZpNoR3ZnzYb084= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622279816548269.41626927439415; Sat, 29 May 2021 02:16:56 -0700 (PDT) Received: from localhost ([::1]:47354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmv5S-0007Jg-JH for importer2@patchew.org; Sat, 29 May 2021 05:16:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmv23-000301-EL for qemu-devel@nongnu.org; Sat, 29 May 2021 05:13:23 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:55316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmv20-0000fJ-5w for qemu-devel@nongnu.org; Sat, 29 May 2021 05:13:23 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ADBB121915; Sat, 29 May 2021 09:13:18 +0000 (UTC) Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id C3FD4118DD; Sat, 29 May 2021 09:13:17 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id cPj/La0FsmCbEwAALh3uQQ (envelope-from ); Sat, 29 May 2021 09:13:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622279598; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+RLLpKzaG6cee9YoeuvdoRHLOhiqV7lPKVjXnQJR+5c=; b=ykylH80xEmwxgMd21Qls+Am+RypWoqSTD20zrUMEAKHyvYo32N13VBtqkNUBSn9bPFOlmp wD08aKkXlJlyRMwO+gUvcgzNQqxQ5T1r1sNjzRa3lp/2KfoDy7Uny1fPtG+ol2p2lX8gA7 A9YL/fgbeg0Klc0TSlSbiW81iwI+8Sk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622279598; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+RLLpKzaG6cee9YoeuvdoRHLOhiqV7lPKVjXnQJR+5c=; b=VUMBoPN7OJgUBq3ojM8vbVmDbzggH7zjcBinnkn5SNbz6NlbY72o2YYlaT1iYHD9hc5Pj9 AYD9y77TYu77UABA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622279598; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+RLLpKzaG6cee9YoeuvdoRHLOhiqV7lPKVjXnQJR+5c=; b=ykylH80xEmwxgMd21Qls+Am+RypWoqSTD20zrUMEAKHyvYo32N13VBtqkNUBSn9bPFOlmp wD08aKkXlJlyRMwO+gUvcgzNQqxQ5T1r1sNjzRa3lp/2KfoDy7Uny1fPtG+ol2p2lX8gA7 A9YL/fgbeg0Klc0TSlSbiW81iwI+8Sk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622279598; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+RLLpKzaG6cee9YoeuvdoRHLOhiqV7lPKVjXnQJR+5c=; b=VUMBoPN7OJgUBq3ojM8vbVmDbzggH7zjcBinnkn5SNbz6NlbY72o2YYlaT1iYHD9hc5Pj9 AYD9y77TYu77UABA== From: Claudio Fontana To: Peter Maydell , Paolo Bonzini , Eduardo Habkost , Siddharth Chandrasekaran , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] i386: run accel_cpu_instance_init as instance_post_init Date: Sat, 29 May 2021 11:13:13 +0200 Message-Id: <20210529091313.16708-3-cfontana@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210529091313.16708-1-cfontana@suse.de> References: <20210529091313.16708-1-cfontana@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: imap.suse.de; none X-Spam-Score: 1.00 X-Spamd-Result: default: False [1.00 / 100.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.28; envelope-from=cfontana@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, "Michael S . Tsirkin" , Marcelo Tosatti , Richard Henderson , qemu-devel@nongnu.org, Cameron Esfahani , Roman Bolshakov , Claudio Fontana Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) Content-Type: text/plain; charset="utf-8" This partially fixes host and max cpu initialization, by running the accel cpu initialization only after all instance init functions are called for all X86 cpu subclasses. Partial Fix. Fixes: 48afe6e4eabf ("i386: split cpu accelerators from cpu.c, using AccelC= PUClass") Signed-off-by: Claudio Fontana --- target/i386/cpu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 6bcb7dbc2c..ae148fbd2f 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6422,6 +6422,11 @@ static void x86_cpu_register_feature_bit_props(X86CP= UClass *xcc, x86_cpu_register_bit_prop(xcc, name, w, bitnr); } =20 +static void x86_cpu_post_initfn(Object *obj) +{ + accel_cpu_instance_init(CPU(obj)); +} + static void x86_cpu_initfn(Object *obj) { X86CPU *cpu =3D X86_CPU(obj); @@ -6473,9 +6478,6 @@ static void x86_cpu_initfn(Object *obj) if (xcc->model) { x86_cpu_load_model(cpu, xcc->model); } - - /* if required, do accelerator-specific cpu initializations */ - accel_cpu_instance_init(CPU(obj)); } =20 static int64_t x86_cpu_get_arch_id(CPUState *cs) @@ -6810,6 +6812,8 @@ static const TypeInfo x86_cpu_type_info =3D { .parent =3D TYPE_CPU, .instance_size =3D sizeof(X86CPU), .instance_init =3D x86_cpu_initfn, + .instance_post_init =3D x86_cpu_post_initfn, + .abstract =3D true, .class_size =3D sizeof(X86CPUClass), .class_init =3D x86_cpu_common_class_init, --=20 2.26.2