All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
@ 2017-07-18 17:22 Murilo Opsfelder Araujo
  2017-07-25 13:56 ` Murilo Opsfelder Araújo
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Murilo Opsfelder Araujo @ 2017-07-18 17:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: kvm, Alex Williamson, Michael Ellerman, linuxppc-dev,
	Murilo Opsfelder Araujo

When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
following:

    drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
    vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
    drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
    vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'

In this case, vfio_pci.c should use the empty definitions of
vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.

This patch fixes it by guarding these function definitions with
CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
built, which is where the non-empty versions of these functions are. We need to
make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
option.

This issue was found during a randconfig build. Logs are here:

    http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---

Changes from v1:
- Rebased on top of next-20170718.

 include/linux/vfio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 586809a..a47b985 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -152,7 +152,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
 					      size_t *data_size);

 struct pci_dev;
-#ifdef CONFIG_EEH
+#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
 extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
 extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
 extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
@@ -173,7 +173,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
 {
 	return -ENOTTY;
 }
-#endif /* CONFIG_EEH */
+#endif /* CONFIG_VFIO_SPAPR_EEH */

 /*
  * IRQfd - generic
--
2.9.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-18 17:22 [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Murilo Opsfelder Araujo
@ 2017-07-25 13:56 ` Murilo Opsfelder Araújo
  2017-07-25 15:44     ` Alex Williamson
  2017-07-26  3:25 ` David Gibson
  2017-07-26 19:37 ` Alex Williamson
  2 siblings, 1 reply; 13+ messages in thread
From: Murilo Opsfelder Araújo @ 2017-07-25 13:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: kvm, Alex Williamson, Michael Ellerman, linuxppc-dev

On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
> following:
> 
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
> 
> In this case, vfio_pci.c should use the empty definitions of
> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
> 
> This patch fixes it by guarding these function definitions with
> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
> built, which is where the non-empty versions of these functions are. We need to
> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
> option.
> 
> This issue was found during a randconfig build. Logs are here:
> 
>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
> 
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
> ---
> 
> Changes from v1:
> - Rebased on top of next-20170718.

Hi, Alex.

Are you applying this?

Thanks!

-- 
Murilo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-25 13:56 ` Murilo Opsfelder Araújo
@ 2017-07-25 15:44     ` Alex Williamson
  0 siblings, 0 replies; 13+ messages in thread
From: Alex Williamson @ 2017-07-25 15:44 UTC (permalink / raw)
  To: Murilo Opsfelder Araújo
  Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev, aik, David Gibson

[cc +Alexey, David]

Any comments from the usual suspects for vfio/spapr?  Thanks,

Alex

On Tue, 25 Jul 2017 10:56:38 -0300
Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:

> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
> > When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
> > following:
> > 
> >     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
> >     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
> >     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
> >     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
> > 
> > In this case, vfio_pci.c should use the empty definitions of
> > vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
> > 
> > This patch fixes it by guarding these function definitions with
> > CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
> > built, which is where the non-empty versions of these functions are. We need to
> > make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
> > option.
> > 
> > This issue was found during a randconfig build. Logs are here:
> > 
> >     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
> > 
> > Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
> > ---
> > 
> > Changes from v1:
> > - Rebased on top of next-20170718.  
> 
> Hi, Alex.
> 
> Are you applying this?
> 
> Thanks!
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
@ 2017-07-25 15:44     ` Alex Williamson
  0 siblings, 0 replies; 13+ messages in thread
From: Alex Williamson @ 2017-07-25 15:44 UTC (permalink / raw)
  To: Murilo Opsfelder Araújo
  Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev, aik, David Gibson

[cc +Alexey, David]

Any comments from the usual suspects for vfio/spapr?  Thanks,

Alex

On Tue, 25 Jul 2017 10:56:38 -0300
Murilo Opsfelder Ara=C3=BAjo <mopsfelder@gmail.com> wrote:

> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
> > When CONFIG_EEH=3Dy and CONFIG_VFIO_SPAPR_EEH=3Dn, build fails with the
> > following:
> >=20
> >     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
> >     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_e=
eh_release'
> >     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
> >     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_=
eeh_open'
> >=20
> > In this case, vfio_pci.c should use the empty definitions of
> > vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
> >=20
> > This patch fixes it by guarding these function definitions with
> > CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.=
c is
> > built, which is where the non-empty versions of these functions are. We=
 need to
> > make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a trist=
ate
> > option.
> >=20
> > This issue was found during a randconfig build. Logs are here:
> >=20
> >     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
> >=20
> > Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
> > ---
> >=20
> > Changes from v1:
> > - Rebased on top of next-20170718. =20
>=20
> Hi, Alex.
>=20
> Are you applying this?
>=20
> Thanks!
>=20

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-25 15:44     ` Alex Williamson
@ 2017-07-26  1:17       ` Alexey Kardashevskiy
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2017-07-26  1:17 UTC (permalink / raw)
  To: Alex Williamson, Murilo Opsfelder Araújo
  Cc: linuxppc-dev, linux-kernel, kvm, David Gibson

On 26/07/17 01:44, Alex Williamson wrote:
> [cc +Alexey, David]
> 
> Any comments from the usual suspects for vfio/spapr?  Thanks,


Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical
sense and won't be seen in the wild so EEH + VFIO should enforce
VFIO_SPAPR_EEH but this is for another patch.


> 
> Alex
> 
> On Tue, 25 Jul 2017 10:56:38 -0300
> Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:
> 
>> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
>>> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
>>> following:
>>>
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>>>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>>>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
>>>
>>> In this case, vfio_pci.c should use the empty definitions of
>>> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
>>>
>>> This patch fixes it by guarding these function definitions with
>>> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
>>> built, which is where the non-empty versions of these functions are. We need to
>>> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
>>> option.
>>>
>>> This issue was found during a randconfig build. Logs are here:
>>>
>>>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>>>
>>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>>> ---
>>>
>>> Changes from v1:
>>> - Rebased on top of next-20170718.  
>>
>> Hi, Alex.
>>
>> Are you applying this?
>>
>> Thanks!
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
@ 2017-07-26  1:17       ` Alexey Kardashevskiy
  0 siblings, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2017-07-26  1:17 UTC (permalink / raw)
  To: Alex Williamson, Murilo Opsfelder Araújo
  Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev, David Gibson

On 26/07/17 01:44, Alex Williamson wrote:
> [cc +Alexey, David]
> 
> Any comments from the usual suspects for vfio/spapr?  Thanks,


Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical
sense and won't be seen in the wild so EEH + VFIO should enforce
VFIO_SPAPR_EEH but this is for another patch.


> 
> Alex
> 
> On Tue, 25 Jul 2017 10:56:38 -0300
> Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:
> 
>> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
>>> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
>>> following:
>>>
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>>>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>>>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
>>>
>>> In this case, vfio_pci.c should use the empty definitions of
>>> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
>>>
>>> This patch fixes it by guarding these function definitions with
>>> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
>>> built, which is where the non-empty versions of these functions are. We need to
>>> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
>>> option.
>>>
>>> This issue was found during a randconfig build. Logs are here:
>>>
>>>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>>>
>>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>>> ---
>>>
>>> Changes from v1:
>>> - Rebased on top of next-20170718.  
>>
>> Hi, Alex.
>>
>> Are you applying this?
>>
>> Thanks!
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-25 15:44     ` Alex Williamson
@ 2017-07-26  1:31       ` Alexey Kardashevskiy
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2017-07-26  1:31 UTC (permalink / raw)
  To: Alex Williamson, Murilo Opsfelder Araújo
  Cc: linuxppc-dev, linux-kernel, kvm, David Gibson

On 26/07/17 01:44, Alex Williamson wrote:
> [cc +Alexey, David]
> 
> Any comments from the usual suspects for vfio/spapr?  Thanks,

[trying again as mailists rejected the previous response]

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical
sense and won't be seen in the wild so EEH + VFIO should enforce
VFIO_SPAPR_EEH but this is for another patch.


> 
> Alex
> 
> On Tue, 25 Jul 2017 10:56:38 -0300
> Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:
> 
>> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
>>> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
>>> following:
>>>
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>>>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>>>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
>>>
>>> In this case, vfio_pci.c should use the empty definitions of
>>> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
>>>
>>> This patch fixes it by guarding these function definitions with
>>> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
>>> built, which is where the non-empty versions of these functions are. We need to
>>> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
>>> option.
>>>
>>> This issue was found during a randconfig build. Logs are here:
>>>
>>>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>>>
>>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>>> ---
>>>
>>> Changes from v1:
>>> - Rebased on top of next-20170718.  
>>
>> Hi, Alex.
>>
>> Are you applying this?
>>
>> Thanks!
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
@ 2017-07-26  1:31       ` Alexey Kardashevskiy
  0 siblings, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2017-07-26  1:31 UTC (permalink / raw)
  To: Alex Williamson, Murilo Opsfelder Araújo
  Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev, David Gibson

On 26/07/17 01:44, Alex Williamson wrote:
> [cc +Alexey, David]
> 
> Any comments from the usual suspects for vfio/spapr?  Thanks,

[trying again as mailists rejected the previous response]

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical
sense and won't be seen in the wild so EEH + VFIO should enforce
VFIO_SPAPR_EEH but this is for another patch.


> 
> Alex
> 
> On Tue, 25 Jul 2017 10:56:38 -0300
> Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:
> 
>> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
>>> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
>>> following:
>>>
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>>>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>>>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
>>>
>>> In this case, vfio_pci.c should use the empty definitions of
>>> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
>>>
>>> This patch fixes it by guarding these function definitions with
>>> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
>>> built, which is where the non-empty versions of these functions are. We need to
>>> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
>>> option.
>>>
>>> This issue was found during a randconfig build. Logs are here:
>>>
>>>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>>>
>>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>>> ---
>>>
>>> Changes from v1:
>>> - Rebased on top of next-20170718.  
>>
>> Hi, Alex.
>>
>> Are you applying this?
>>
>> Thanks!
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-25 15:44     ` Alex Williamson
                       ` (2 preceding siblings ...)
  (?)
@ 2017-07-26  2:06     ` Alexey Kardashevskiy
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2017-07-26  2:06 UTC (permalink / raw)
  To: Alex Williamson, Murilo Opsfelder Araújo
  Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev, David Gibson

On 26/07/17 01:44, Alex Williamson wrote:
> [cc +Alexey, David]
> 
> Any comments from the usual suspects for vfio/spapr?  Thanks,

[trying once again as mailists rejected the previous response due to broken
outgoing mail encoding config in my thunderbird]

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical
sense and won't be seen in the wild so EEH + VFIO should enforce
VFIO_SPAPR_EEH but this is for another patch.


> 
> Alex
> 
> On Tue, 25 Jul 2017 10:56:38 -0300
> Murilo Opsfelder Araújo <mopsfelder@gmail.com> wrote:
> 
>> On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote:
>>> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
>>> following:
>>>
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>>>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>>>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>>>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
>>>
>>> In this case, vfio_pci.c should use the empty definitions of
>>> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
>>>
>>> This patch fixes it by guarding these function definitions with
>>> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
>>> built, which is where the non-empty versions of these functions are. We need to
>>> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
>>> option.
>>>
>>> This issue was found during a randconfig build. Logs are here:
>>>
>>>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>>>
>>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>>> ---
>>>
>>> Changes from v1:
>>> - Rebased on top of next-20170718.  
>>
>> Hi, Alex.
>>
>> Are you applying this?
>>
>> Thanks!
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-18 17:22 [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Murilo Opsfelder Araujo
  2017-07-25 13:56 ` Murilo Opsfelder Araújo
@ 2017-07-26  3:25 ` David Gibson
  2017-07-26 19:37 ` Alex Williamson
  2 siblings, 0 replies; 13+ messages in thread
From: David Gibson @ 2017-07-26  3:25 UTC (permalink / raw)
  To: Murilo Opsfelder Araujo
  Cc: linux-kernel, kvm, Alex Williamson, Michael Ellerman, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2355 bytes --]

On Tue, Jul 18, 2017 at 02:22:20PM -0300, Murilo Opsfelder Araujo wrote:
> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
> following:
> 
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
> 
> In this case, vfio_pci.c should use the empty definitions of
> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
> 
> This patch fixes it by guarding these function definitions with
> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
> built, which is where the non-empty versions of these functions are. We need to
> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
> option.
> 
> This issue was found during a randconfig build. Logs are here:
> 
>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
> 
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
> 
> Changes from v1:
> - Rebased on top of next-20170718.
> 
>  include/linux/vfio.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/vfio.h b/include/linux/vfio.h
> index 586809a..a47b985 100644
> --- a/include/linux/vfio.h
> +++ b/include/linux/vfio.h
> @@ -152,7 +152,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
>  					      size_t *data_size);
> 
>  struct pci_dev;
> -#ifdef CONFIG_EEH
> +#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
>  extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
>  extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
>  extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
> @@ -173,7 +173,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
>  {
>  	return -ENOTTY;
>  }
> -#endif /* CONFIG_EEH */
> +#endif /* CONFIG_VFIO_SPAPR_EEH */
> 
>  /*
>   * IRQfd - generic

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-18 17:22 [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Murilo Opsfelder Araujo
  2017-07-25 13:56 ` Murilo Opsfelder Araújo
  2017-07-26  3:25 ` David Gibson
@ 2017-07-26 19:37 ` Alex Williamson
  2017-07-27 19:36   ` Murilo Opsfelder Araújo
  2 siblings, 1 reply; 13+ messages in thread
From: Alex Williamson @ 2017-07-26 19:37 UTC (permalink / raw)
  To: Murilo Opsfelder Araujo; +Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev

On Tue, 18 Jul 2017 14:22:20 -0300
Murilo Opsfelder Araujo <mopsfelder@gmail.com> wrote:

> When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
> following:
> 
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
>     vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
>     drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
>     vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'
> 
> In this case, vfio_pci.c should use the empty definitions of
> vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.
> 
> This patch fixes it by guarding these function definitions with
> CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
> built, which is where the non-empty versions of these functions are. We need to
> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
> option.
> 
> This issue was found during a randconfig build. Logs are here:
> 
>     http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
> 
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
> ---

Applied to my for-linus branch with David and Alexey's R-b for v4.13.
Thanks,

Alex

> 
> Changes from v1:
> - Rebased on top of next-20170718.
> 
>  include/linux/vfio.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/vfio.h b/include/linux/vfio.h
> index 586809a..a47b985 100644
> --- a/include/linux/vfio.h
> +++ b/include/linux/vfio.h
> @@ -152,7 +152,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
>  					      size_t *data_size);
> 
>  struct pci_dev;
> -#ifdef CONFIG_EEH
> +#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
>  extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
>  extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
>  extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
> @@ -173,7 +173,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
>  {
>  	return -ENOTTY;
>  }
> -#endif /* CONFIG_EEH */
> +#endif /* CONFIG_VFIO_SPAPR_EEH */
> 
>  /*
>   * IRQfd - generic
> --
> 2.9.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-07-26 19:37 ` Alex Williamson
@ 2017-07-27 19:36   ` Murilo Opsfelder Araújo
  0 siblings, 0 replies; 13+ messages in thread
From: Murilo Opsfelder Araújo @ 2017-07-27 19:36 UTC (permalink / raw)
  To: Alex Williamson; +Cc: linux-kernel, kvm, Michael Ellerman, linuxppc-dev

On 07/26/2017 04:37 PM, Alex Williamson wrote:
[...]
> Applied to my for-linus branch with David and Alexey's R-b for v4.13.
> Thanks,
> 
> Alex

Thank you all!

-- 
Murilo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
  2017-06-06 12:09 [PATCH] " Murilo Opsfelder Araujo
@ 2017-06-08  0:06 ` Murilo Opsfelder Araujo
  0 siblings, 0 replies; 13+ messages in thread
From: Murilo Opsfelder Araujo @ 2017-06-08  0:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: kvm, Alex Williamson, Michael Ellerman, linuxppc-dev,
	kbuild test robot, kbuild-all, Murilo Opsfelder Araujo

When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the
following:

    drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release':
    vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release'
    drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open':
    vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open'

In this case, vfio_pci.c should use the empty definitions of
vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions.

This patch fixes it by guarding these function definitions with
CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is
built, which is where the non-empty versions of these functions are. We need to
make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
option.

This issue was found during a randconfig build. Logs are here:

    http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
v1..v2:
- Make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
  option (fix http://www.spinics.net/lists/kvm/msg151032.html).

 include/linux/vfio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index edf9b2c..92232f73 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -150,7 +150,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
 					      size_t *data_size);
 
 struct pci_dev;
-#ifdef CONFIG_EEH
+#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
 extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
 extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
 extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
@@ -171,7 +171,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
 {
 	return -ENOTTY;
 }
-#endif /* CONFIG_EEH */
+#endif /* CONFIG_VFIO_SPAPR_EEH */
 
 /*
  * IRQfd - generic
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-27 19:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 17:22 [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Murilo Opsfelder Araujo
2017-07-25 13:56 ` Murilo Opsfelder Araújo
2017-07-25 15:44   ` Alex Williamson
2017-07-25 15:44     ` Alex Williamson
2017-07-26  1:17     ` Alexey Kardashevskiy
2017-07-26  1:17       ` Alexey Kardashevskiy
2017-07-26  1:31     ` Alexey Kardashevskiy
2017-07-26  1:31       ` Alexey Kardashevskiy
2017-07-26  2:06     ` Alexey Kardashevskiy
2017-07-26  3:25 ` David Gibson
2017-07-26 19:37 ` Alex Williamson
2017-07-27 19:36   ` Murilo Opsfelder Araújo
  -- strict thread matches above, loose matches on Subject: below --
2017-06-06 12:09 [PATCH] " Murilo Opsfelder Araujo
2017-06-08  0:06 ` [PATCH v2] " Murilo Opsfelder Araujo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.