Received: from eggs.gnu.org ([2001:4830:134:3::10]:58358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwxgc-0000Fg-1n for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwxgV-0000zX-Ou for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:33:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwxgV-0000zQ-HO for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:32:55 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB5IWroO006724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 5 Dec 2014 13:32:54 -0500 Date: Fri, 5 Dec 2014 16:32:51 -0200 From: Eduardo Habkost Message-ID: <20141205183251.GE5002@thinpad.lan.raisama.net> References: <1417801466-23485-1-git-send-email-pbonzini@redhat.com> <1417801466-23485-3-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1417801466-23485-3-git-send-email-pbonzini@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Fri, Dec 05, 2014 at 06:44:24PM +0100, Paolo Bonzini wrote: > vm86 mode extensions date back to the 486. All models should have > them. >=20 > Signed-off-by: Paolo Bonzini TCG doesn't support VME (that's probably why we didn't have it set on most CPU models), and I would like to eventually make check/enforce mode work on TCG as well. I was going to suggest adding it to kvm_default_features instead, but as we have existing models that have CPUID_VME already, let's be consistent and add it to all of them (and deal with TCG check/enforce mode later, if necessary). > --- > hw/i386/pc_piix.c | 15 +++++++++++++++ > hw/i386/pc_q35.c | 15 +++++++++++++++ > target-i386/cpu.c | 30 +++++++++++++++--------------- > 3 files changed, 45 insertions(+), 15 deletions(-) >=20 > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index 5ad23d0..3f1524e 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -305,6 +305,21 @@ static void pc_init_pci(MachineState *machine) > =20 > static void pc_compat_2_2(MachineState *machine) > { > + x86_cpu_compat_set_features("kvm64", FEAT_1_ECX, CPUID_EXT_VME, 0)= ; qemu/hw/i386/pc_piix.c:313:54: error: =E2=80=98CPUID_EXT_VME=E2=80=99 undeclared (first use in this function) x86_cpu_compat_set_features("kvm64", FEAT_1_ECX, CPUID_EXT_VME, 0); > + x86_cpu_compat_set_features("kvm32", FEAT_1_ECX, CPUID_EXT_VME, 0)= ; > + x86_cpu_compat_set_features("coreduo", FEAT_1_ECX, CPUID_EXT_VME, = 0); > + x86_cpu_compat_set_features("Conroe", FEAT_1_ECX, CPUID_EXT_VME, 0= ); > + x86_cpu_compat_set_features("Penryn", FEAT_1_ECX, CPUID_EXT_VME, 0= ); > + x86_cpu_compat_set_features("Nehalem", FEAT_1_ECX, CPUID_EXT_VME, = 0); > + x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, CPUID_EXT_VME,= 0); > + x86_cpu_compat_set_features("SandyBridge", FEAT_1_ECX, CPUID_EXT_V= ME, 0); > + x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, CPUID_EXT_VME, = 0); > + x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, CPUID_EXT_VME= , 0); > + x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_VM= E, 0); > + x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_VM= E, 0); > + x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_VM= E, 0); > + x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, CPUID_EXT_VM= E, 0); > + x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, CPUID_EXT_VM= E, 0); The features need to be _removed_ when running an older machine-type, not added. It should be: x86_cpu_compat_set_features(MODEL, FEAT_1_EDX, 0, CPUID_VME); But the list of CPU models is correct, and matches what is being changed on builtin_x86_defs[]. --=20 Eduardo