From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5N63-0000mg-Ta for qemu-devel@nongnu.org; Mon, 20 Jan 2014 17:13:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5N5o-0006Ra-Gb for qemu-devel@nongnu.org; Mon, 20 Jan 2014 17:13:31 -0500 Received: from cantor2.suse.de ([195.135.220.15]:46215 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5N5o-0006PV-AC for qemu-devel@nongnu.org; Mon, 20 Jan 2014 17:13:16 -0500 Message-ID: <52DD9F77.4040904@suse.de> Date: Mon, 20 Jan 2014 23:13:11 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1390228618-21663-1-git-send-email-ehabkost@redhat.com> In-Reply-To: <1390228618-21663-1-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-i386: enable x2apic by default on more recent CPU models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Paolo Bonzini , Bandan Das , Igor Mammedov , Anthony Liguori , "Michael S. Tsirkin" Am 20.01.2014 15:36, schrieb Eduardo Habkost: > This enables x2apic on the following CPU models: Conroe, Penryn, > Nehalem, Westmere, Opteron_G[12345]. >=20 > Normally we try to keep the CPU model definitions as close as the real > CPUs as possible, but x2apic can be emulated by KVM without host CPU > support for x2apic, and it improves performance by reducing APIC access > overhead. x2apic emulation is available on KVM since 2009 (Linux > 2.6.32-rc1), there's no reason for not enabling x2apic by default when > running KVM. >=20 > About testing: Conroe, Penryn, Nehalem, Westemere and Opteron_G[123] > have x2apic enabled on RHEL-6 since RHEL-6.0, so the presence of x2apic > on those CPU models got lots of testing in the last few years. I want t= o > eventually enable x2apic on all other CPU models as well, but it will > require some testing to ensure it won't confuse guests. >=20 > This shouldn't affect TCG at all because features not supported by TCG > are automatically and silently disabled by QEMU when initializing the > CPU. >=20 > Signed-off-by: Eduardo Habkost > --- > v1 was sent in September 2013: > Message-Id: <1379704517-19177-1-git-send-email-ehabkost@redhat.com> > http://article.gmane.org/gmane.comp.emulators.qemu/234541 >=20 > It got an Acked-by from Gleb but it was ignored by all maintainers. > --- > hw/i386/pc_piix.c | 9 +++++++++ > hw/i386/pc_q35.c | 9 +++++++++ > target-i386/cpu.c | 37 +++++++++++++++++++------------------ > 3 files changed, 37 insertions(+), 18 deletions(-) [...] > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 0eea8c7..8f4dcfd 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -798,7 +798,7 @@ static x86_def_t builtin_x86_defs[] =3D { > CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE= | > CPUID_DE | CPUID_FP87, > .features[FEAT_1_ECX] =3D > - CPUID_EXT_SSSE3 | CPUID_EXT_SSE3, > + CPUID_EXT_X2APIC | CPUID_EXT_SSSE3 | CPUID_EXT_SSE3, > .features[FEAT_8000_0001_EDX] =3D > CPUID_EXT2_LM | CPUID_EXT2_NX | CPUID_EXT2_SYSCALL, > .features[FEAT_8000_0001_ECX] =3D [snip] I remember discussing about this before, but don't see an email reply, so maybe it was on IRC? I don't like the argument that we can put arbitrary stuff in our model definitions and rely on TCG not having implemented it to make it correct. Is x2apic something that TCG can never implement for some reason? Then that needs a better explanation. Otherwise, is there no criteria we can add this flag for when kvm_enabled()? Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg