From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tCHwx6p3JzDvMQ for ; Tue, 8 Nov 2016 03:30:25 +1100 (AEDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tCHwx3YGTz9vFD for ; Tue, 8 Nov 2016 03:30:25 +1100 (AEDT) Subject: Re: [PATCH] vfio: Fix build break when SPAPR_TCE_IOMMU=n To: Alex Williamson , Michael Ellerman References: <1478238521-32203-1-git-send-email-mpe@ellerman.id.au> <81900126-f1aa-b480-c2fa-f0fa04d625c1@redhat.com> <87zilblmcd.fsf@concordia.ellerman.id.au> <20161107092505.429f07d6@t450s.home> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, aik@ozlabs.ru, gwshan@linux.vnet.ibm.com From: Paolo Bonzini Message-ID: <85b0913f-af6d-12a6-2952-b727f0eb7ca9@redhat.com> Date: Mon, 7 Nov 2016 17:30:09 +0100 MIME-Version: 1.0 In-Reply-To: <20161107092505.429f07d6@t450s.home> Content-Type: text/plain; charset=windows-1252 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 07/11/2016 17:25, Alex Williamson wrote: > On Mon, 07 Nov 2016 19:34:42 +1100 > Michael Ellerman wrote: > >> Paolo Bonzini writes: >>> On 04/11/2016 06:48, Michael Ellerman wrote: >>>> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig >>>> index da6e2ce77495..6b51a4ebed8a 100644 >>>> --- a/drivers/vfio/Kconfig >>>> +++ b/drivers/vfio/Kconfig >>>> @@ -6,12 +6,12 @@ config VFIO_IOMMU_TYPE1 >>>> config VFIO_IOMMU_SPAPR_TCE >>>> tristate >>>> depends on VFIO && SPAPR_TCE_IOMMU >>>> - default n >>>> + default VFIO >>> >>> No need to depend on VFIO since you already have it in "default". > > depends and defaults are different beasts though, if VFIO is not > enabled and we're not on a powerpc system with SPAPR, > VFIO_IOMMU_SPAPR_TCE should not be selectable, not just default to 'n'. AFAIU without a prompt nothing is selectable anyway (hence my preference for a shorthand). Paolo >> >> True, I can take that out. >> >>> (I assume you cannot use "default y" because "depends on" doesn't downgrade >>> "y" to "m" when VFIO is a module. >> >> Correct. >> >>> A shorthand is >>> >>> def_tristate VFIO && SPAPR_TCE_IOMMU >> >> Yep. My experience though is that a lot of folks don't really know what >> that means. So I prefer to spell it out with an explicit type, depends >> and default. >> >> But I'll respin it that way if Alex prefers the shorter style. > > Perhaps I'm one of those people. Non-powerpc archs should not have an > option to select this, which is why the depends is there, AIUI. So > long as we don't start exposing options that aren't relevant to a > platform, I'm flexible on what shorthands we use, but you may need to > teach me about them first. Thanks, > > Alex >