From nobody Sun Nov 9 14:47:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551345905864957.6289343090019; Thu, 28 Feb 2019 01:25:05 -0800 (PST) Received: from localhost ([127.0.0.1]:34946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzHw4-0000ic-LM for importer@patchew.org; Thu, 28 Feb 2019 04:25:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzHvA-0000JX-L3 for qemu-devel@nongnu.org; Thu, 28 Feb 2019 04:24:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzHuv-0000Zt-SD for qemu-devel@nongnu.org; Thu, 28 Feb 2019 04:23:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46556) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzHuv-0000Za-Ax for qemu-devel@nongnu.org; Thu, 28 Feb 2019 04:23:49 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 319C230BF188; Thu, 28 Feb 2019 09:23:48 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E69918EE2; Thu, 28 Feb 2019 09:23:46 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Feb 2019 10:23:45 +0100 Message-Id: <20190228092345.16294-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 28 Feb 2019 09:23:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] target-i386: add kvm stubs to user-mode emulators X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The CPUID code will call kvm_arch_get_supported_cpuid() and, even though it is undef kvm_enabled() so it never runs for user-mode emulators, sometimes clang will not optimize it out at -O0. That could be considered a compiler bug, however at -O0 we give it a pass and just add the stubs. Reported-by: Kamil Rytarowski Tested-by: Kamil Rytarowski Signed-off-by: Paolo Bonzini --- target/i386/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs index cb9c265525..48e0c28434 100644 --- a/target/i386/Makefile.objs +++ b/target/i386/Makefile.objs @@ -3,10 +3,10 @@ obj-$(CONFIG_TCG) +=3D translate.o obj-$(CONFIG_TCG) +=3D bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o obj-$(CONFIG_TCG) +=3D int_helper.o mem_helper.o misc_helper.o mpx_helper.o obj-$(CONFIG_TCG) +=3D seg_helper.o smm_helper.o svm_helper.o +obj-$(call lnot,$(CONFIG_KVM)) +=3D kvm-stub.o ifeq ($(CONFIG_SOFTMMU),y) obj-y +=3D machine.o arch_memory_mapping.o arch_dump.o monitor.o obj-$(CONFIG_KVM) +=3D kvm.o -obj-$(call lnot,$(CONFIG_KVM)) +=3D kvm-stub.o obj-$(CONFIG_HYPERV) +=3D hyperv.o obj-$(call lnot,$(CONFIG_HYPERV)) +=3D hyperv-stub.o ifeq ($(CONFIG_WIN32),y) --=20 2.20.1