From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbdHQNS3 (ORCPT ); Thu, 17 Aug 2017 09:18:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbdHQNS1 (ORCPT ); Thu, 17 Aug 2017 09:18:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 54CD96ACE Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH v2 1/5] KVM: x86: Add return value to kvm_cpuid(). To: Yu Zhang , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, xiaoguangrong@tencent.com, joro@8bytes.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> <9e7e9117-12a6-aae1-8c36-28a7a50282b6@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Thu, 17 Aug 2017 15:18:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9e7e9117-12a6-aae1-8c36-28a7a50282b6@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 17 Aug 2017 13:18:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/08/2017 14:33, Yu Zhang wrote: >>>> >>>> +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? I would use true/false everywhere. >> BTW could you please > Sorry for the unfinished line. I was wondering, why can't emulate.c > include cpuid.h? The emulator should be separate from the rest of KVM, in principle it could be used by userspace too. So its interface should be as limited as possible. Paolo