From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch v5 3/4] Mask function7 ebx against host capability word9 Date: Mon, 30 May 2011 14:44:14 +0300 Message-ID: <4DE3830E.1040606@redhat.com> References: <5D8008F58939784290FAB48F5497519844E92781E1@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]:2175 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313Ab1E3LoS (ORCPT ); Mon, 30 May 2011 07:44:18 -0400 In-Reply-To: <5D8008F58939784290FAB48F5497519844E92781E1@shsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/30/2011 06:01 AM, Yang, Wei Y wrote: > This patch masks CPUID leaf 7 ebx against host capability word9. > > } > break; > } > + case 7: > + /* Mask ebx against host capability word 9 */ > + if (index == 0) cpuid_mask(&entry->ebx, 9); > + break; > + /* function 0xb has additional index. */ > case 0xb: { > int i, level_type; > It's not just masking leaf 7. It's enabling it - before we passed 0 every time. So we need to give it the same treatment as other leaves. We expose a bit only if we explicitly support it in kvm, and it is enabled in the host. See kvm_supported_word[01456] features for examples. btw, we could also expose fsgsbase and rep/movsb (but in a separate patch, please). -- error compiling committee.c: too many arguments to function