From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3ODW-00072B-BZ for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3ODU-00031a-DR for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:58 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:36634) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3ODS-0002uF-FP for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:56 -0400 Received: by mail-wr1-x42f.google.com with SMTP id g18so2542773wru.3 for ; Mon, 11 Mar 2019 09:55:49 -0700 (PDT) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id e12sm6484836wrs.91.2019.03.11.09.55.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 09:55:47 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 11 Mar 2019 17:55:13 +0100 Message-Id: <1552323335-46779-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1552323335-46779-1-git-send-email-pbonzini@redhat.com> References: <1552323335-46779-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL v2 09/31] target-i386: add kvm stubs to user-mode emulators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 cb9c265..48e0c28 100644 --- a/target/i386/Makefile.objs +++ b/target/i386/Makefile.objs @@ -3,10 +3,10 @@ obj-$(CONFIG_TCG) += translate.o obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o +obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o ifeq ($(CONFIG_SOFTMMU),y) obj-y += machine.o arch_memory_mapping.o arch_dump.o monitor.o obj-$(CONFIG_KVM) += kvm.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o obj-$(CONFIG_HYPERV) += hyperv.o obj-$(call lnot,$(CONFIG_HYPERV)) += hyperv-stub.o ifeq ($(CONFIG_WIN32),y) -- 1.8.3.1