Received: from eggs.gnu.org ([2001:4830:134:3::10]:50551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrRVg-00008u-Ru for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrRVa-0006YC-Qx for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:15:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrRVa-0006Xw-MP for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:15:22 -0400 From: Eduardo Habkost Date: Wed, 28 Oct 2015 12:15:09 -0200 Message-Id: <1446041709-26510-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1446041709-26510-1-git-send-email-ehabkost@redhat.com> References: <1446041709-26510-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PULL 2/2] target-i386: Enable "check" mode by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Current default behavior of QEMU is to silently disable features that are not supported by the host when a CPU model is requested in the command-line. This means that in addition to risking breaking guest ABI by default, we are silent about it. I would like to enable "enforce" by default, but this can easily break existing production systems because of the way libvirt makes assumptions about CPU models today (this will change in the future, once QEMU provide a proper interface for checking if a CPU model is runnable). But there's no reason we should be silent about it. So, change target-i386 to enable "check" mode by default so at least we have some warning printed to stderr (and hopefully logged somewhere) when QEMU disables a feature that is not supported by the host system. Reviewed-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index c1a9e09..9280bfc 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3141,7 +3141,7 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("hv-reset", X86CPU, hyperv_reset, false), DEFINE_PROP_BOOL("hv-vpindex", X86CPU, hyperv_vpindex, false), DEFINE_PROP_BOOL("hv-runtime", X86CPU, hyperv_runtime, false), - DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, false), + DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, true), DEFINE_PROP_BOOL("enforce", X86CPU, enforce_cpuid, false), DEFINE_PROP_BOOL("kvm", X86CPU, expose_kvm, true), DEFINE_PROP_UINT32("level", X86CPU, env.cpuid_level, 0), -- 2.1.0