From patchwork Sun Jul 12 13:10:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 35259 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6CDB76h012506 for ; Sun, 12 Jul 2009 13:11:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbZGLNK6 (ORCPT ); Sun, 12 Jul 2009 09:10:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751953AbZGLNK6 (ORCPT ); Sun, 12 Jul 2009 09:10:58 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59709 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbZGLNK6 (ORCPT ); Sun, 12 Jul 2009 09:10:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6CDAw6Q010561 for ; Sun, 12 Jul 2009 09:10:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6CDAveX030385; Sun, 12 Jul 2009 09:10:57 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6CDAuFj027989; Sun, 12 Jul 2009 09:10:56 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id E11471336CC; Sun, 12 Jul 2009 16:10:55 +0300 (IDT) Date: Sun, 12 Jul 2009 16:10:55 +0300 From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] always report x2apic as supported feature Message-ID: <20090712131055.GB28046@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We emulate x2apic in software, so host support is not required. Signed-off-by: Gleb Natapov --- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 00844eb..c256da7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1497,6 +1497,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, case 1: entry->edx &= kvm_supported_word0_x86_features; entry->ecx &= kvm_supported_word4_x86_features; + /* we support x2apic emulation even if host does not support + it since we emulate x2apic in software */ + entry->ecx |= F(X2APIC); break; /* function 2 entries are STATEFUL. That is, repeated cpuid commands * may return different values. This forces us to get_cpu() before