From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v6 3/4] Mask function7 ebx against host capability word9 Date: Wed, 01 Jun 2011 11:57:41 +0300 Message-ID: <4DE5FF05.9030501@redhat.com> References: <5D8008F58939784290FAB48F5497519844E9278572@shsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Yang, Wei Y" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162204Ab1FAI5w (ORCPT ); Wed, 1 Jun 2011 04:57:52 -0400 In-Reply-To: <5D8008F58939784290FAB48F5497519844E9278572@shsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/30/2011 06:17 PM, Yang, Wei Y wrote: > This patch masks CPUID leaf 7 ebx against host capability word9. > @@ -2404,6 +2408,15 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, > } > break; > } > + case 7: { > + /* Mask ebx against host capbability word 9 */ > + if (index == 0) { > + entry->ebx&= kvm_supported_word9_x86_features; > + cpuid_mask(&entry->edx, 9); > + } > + break; > + } > + /* function 0xb has additional index. */ I see that function 7 also depends on ecx, so it should set KVM_CPUID_FLAG_SIGNIFCANT_INDEX. We should mask off ecx != 0 and all the reserved words, since we don't support the features in them. -- error compiling committee.c: too many arguments to function