Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411AbdHQM4A (ORCPT ); Thu, 17 Aug 2017 08:56:00 -0400 Received: from mga07.intel.com ([134.134.136.100]:7930 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbdHQMz6 (ORCPT ); Thu, 17 Aug 2017 08:55:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,387,1498546800"; d="scan'208";a="1004788140" Subject: Re: [PATCH v2 1/5] KVM: x86: Add return value to kvm_cpuid(). To: Paolo Bonzini , kvm@vger.kernel.org References: <1502999558-2517-1-git-send-email-yu.c.zhang@linux.intel.com> <1502999558-2517-2-git-send-email-yu.c.zhang@linux.intel.com> <9deed5e8-52e9-8634-611f-553840a43f1a@redhat.com> <1493b2f0-0e6e-2dac-5ae3-1aed3595faed@linux.intel.com> Cc: linux-kernel@vger.kernel.org, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, xiaoguangrong@tencent.com, joro@8bytes.org From: Yu Zhang Message-ID: <9e7e9117-12a6-aae1-8c36-28a7a50282b6@linux.intel.com> Date: Thu, 17 Aug 2017 20:33:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1493b2f0-0e6e-2dac-5ae3-1aed3595faed@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 32 On 8/17/2017 8:23 PM, Yu Zhang wrote: > > > On 8/17/2017 8:29 PM, Paolo Bonzini wrote: >> On 17/08/2017 21:52, Yu Zhang wrote: >>> diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h >>> index ac15193..3e759cf 100644 >>> --- a/arch/x86/kvm/cpuid.h >>> +++ b/arch/x86/kvm/cpuid.h >>> @@ -21,7 +21,14 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, >>> int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, >>> struct kvm_cpuid2 *cpuid, >>> struct kvm_cpuid_entry2 __user *entries); >>> -void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, >>> u32 *edx); >>> + >>> +enum { >>> + NO_CHECK_LIMIT = 0, >>> + CHECK_LIMIT = 1, >>> +}; >> emulate.c should not include cpuid.h. The argument can be simply a >> bool, though. > > Thanks, Paolo. > So we just use true/false in emulate.c & svm.c, is this OK? > BTW could you please Sorry for the unfinished line. I was wondering, why can't emulate.c include cpuid.h? Yu