Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbdIOVO3 (ORCPT ); Fri, 15 Sep 2017 17:14:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdIOVO1 (ORCPT ); Fri, 15 Sep 2017 17:14:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4CC33356E6 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH v2 3/3] KVM: SVM: Add irqchip_split() checks before enabling AVIC To: Suravee Suthikulpanit , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, joro@8bytes.org References: <1505230962-86304-1-git-send-email-suravee.suthikulpanit@amd.com> <1505230962-86304-4-git-send-email-suravee.suthikulpanit@amd.com> <20170914152031.GA23415@flask> <3603043c-964f-d10c-8cc0-fa3476e3bbb5@amd.com> From: Paolo Bonzini Message-ID: <36af3324-dd87-c932-2b23-4b4ba45047e4@redhat.com> Date: Fri, 15 Sep 2017 23:14:23 +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: 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.30]); Fri, 15 Sep 2017 21:14:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 28 On 15/09/2017 21:21, Suravee Suthikulpanit wrote: >>>> >>>> >>>> static bool svm_get_enable_apicv(struct kvm_vcpu *vcpu) >>>> { >>> A close contender was pr_info_once() here: >>> >>> if (avic && !irqchip_split(vcpu->kvm)) >>> pr_info_once(...) >>> >> >> Looks good. > > Actually, thinking about it again, this would not work either since > pr_xxx_once() would only print the message once per loading of kvm_amd > module. However, we would prefer the message to be printed per VM > initialization. I also tried adding the check and print this message in > the kvm_x86_ops.vm_init(), but this also does not work since the > vm_init() function is called before the > kvm_vm_ioctl_enable_cap(KVM_CAP_SPLIT_IRQCHIP). > > Therefore, pr_info() might be better here, even though this would get > print per VCPU initialization. Any other suggestions? My suggestion is to make it pr_info_once. No one looks at dmesg anyway unless things go very wrong. Paolo