2019-10-13 09:06:17

by Jan Kiszka

[permalink] [raw]
Subject: [PATCH] tools/virtio: Fix build

From: Jan Kiszka <[email protected]>

Various changes in the recent kernel versions broke the build due to
missing function and header stubs.

Signed-off-by: Jan Kiszka <[email protected]>
---
tools/virtio/crypto/hash.h | 0
tools/virtio/linux/dma-mapping.h | 2 ++
tools/virtio/linux/kernel.h | 2 ++
3 files changed, 4 insertions(+)
create mode 100644 tools/virtio/crypto/hash.h

diff --git a/tools/virtio/crypto/hash.h b/tools/virtio/crypto/hash.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
index f91aeb5fe571..db96cb4bf877 100644
--- a/tools/virtio/linux/dma-mapping.h
+++ b/tools/virtio/linux/dma-mapping.h
@@ -29,4 +29,6 @@ enum dma_data_direction {
#define dma_unmap_single(...) do { } while (0)
#define dma_unmap_page(...) do { } while (0)

+#define dma_max_mapping_size(d) 0
+
#endif
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 6683b4a70b05..ccf321173210 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -141,4 +141,6 @@ static inline void free_page(unsigned long addr)
#define list_for_each_entry(a, b, c) while (0)
/* end of stubs */

+#define xen_domain() 0
+
#endif /* KERNEL_H */
--
2.16.4


2019-10-13 11:56:21

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH] tools/virtio: Fix build

On Sun, Oct 13, 2019 at 11:03:30AM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <[email protected]>
>
> Various changes in the recent kernel versions broke the build due to
> missing function and header stubs.
>
> Signed-off-by: Jan Kiszka <[email protected]>

Thanks!
I think it's already fixes in the vhost tree.
That tree also includes a bugfix for the test.
Can you pls give it a spin and report?
Thanks!

> ---
> tools/virtio/crypto/hash.h | 0
> tools/virtio/linux/dma-mapping.h | 2 ++
> tools/virtio/linux/kernel.h | 2 ++
> 3 files changed, 4 insertions(+)
> create mode 100644 tools/virtio/crypto/hash.h
>
> diff --git a/tools/virtio/crypto/hash.h b/tools/virtio/crypto/hash.h
> new file mode 100644
> index 000000000000..e69de29bb2d1
> diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
> index f91aeb5fe571..db96cb4bf877 100644
> --- a/tools/virtio/linux/dma-mapping.h
> +++ b/tools/virtio/linux/dma-mapping.h
> @@ -29,4 +29,6 @@ enum dma_data_direction {
> #define dma_unmap_single(...) do { } while (0)
> #define dma_unmap_page(...) do { } while (0)
>
> +#define dma_max_mapping_size(d) 0
> +
> #endif
> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
> index 6683b4a70b05..ccf321173210 100644
> --- a/tools/virtio/linux/kernel.h
> +++ b/tools/virtio/linux/kernel.h
> @@ -141,4 +141,6 @@ static inline void free_page(unsigned long addr)
> #define list_for_each_entry(a, b, c) while (0)
> /* end of stubs */
>
> +#define xen_domain() 0
> +
> #endif /* KERNEL_H */
> --
> 2.16.4

2019-10-13 12:03:50

by Jan Kiszka

[permalink] [raw]
Subject: Re: [PATCH] tools/virtio: Fix build

On 13.10.19 13:52, Michael S. Tsirkin wrote:
> On Sun, Oct 13, 2019 at 11:03:30AM +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <[email protected]>
>>
>> Various changes in the recent kernel versions broke the build due to
>> missing function and header stubs.
>>
>> Signed-off-by: Jan Kiszka <[email protected]>
>
> Thanks!
> I think it's already fixes in the vhost tree.
> That tree also includes a bugfix for the test.
> Can you pls give it a spin and report?

Mostly fixed: the xen_domain stup is missing.

Jan

> Thanks!
>
>> ---
>> tools/virtio/crypto/hash.h | 0
>> tools/virtio/linux/dma-mapping.h | 2 ++
>> tools/virtio/linux/kernel.h | 2 ++
>> 3 files changed, 4 insertions(+)
>> create mode 100644 tools/virtio/crypto/hash.h
>>
>> diff --git a/tools/virtio/crypto/hash.h b/tools/virtio/crypto/hash.h
>> new file mode 100644
>> index 000000000000..e69de29bb2d1
>> diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
>> index f91aeb5fe571..db96cb4bf877 100644
>> --- a/tools/virtio/linux/dma-mapping.h
>> +++ b/tools/virtio/linux/dma-mapping.h
>> @@ -29,4 +29,6 @@ enum dma_data_direction {
>> #define dma_unmap_single(...) do { } while (0)
>> #define dma_unmap_page(...) do { } while (0)
>>
>> +#define dma_max_mapping_size(d) 0
>> +
>> #endif
>> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
>> index 6683b4a70b05..ccf321173210 100644
>> --- a/tools/virtio/linux/kernel.h
>> +++ b/tools/virtio/linux/kernel.h
>> @@ -141,4 +141,6 @@ static inline void free_page(unsigned long addr)
>> #define list_for_each_entry(a, b, c) while (0)
>> /* end of stubs */
>>
>> +#define xen_domain() 0
>> +
>> #endif /* KERNEL_H */
>> --
>> 2.16.4

2019-10-13 12:21:21

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH] tools/virtio: Fix build

On Sun, Oct 13, 2019 at 02:01:03PM +0200, Jan Kiszka wrote:
> On 13.10.19 13:52, Michael S. Tsirkin wrote:
> > On Sun, Oct 13, 2019 at 11:03:30AM +0200, Jan Kiszka wrote:
> >> From: Jan Kiszka <[email protected]>
> >>
> >> Various changes in the recent kernel versions broke the build due to
> >> missing function and header stubs.
> >>
> >> Signed-off-by: Jan Kiszka <[email protected]>
> >
> > Thanks!
> > I think it's already fixes in the vhost tree.
> > That tree also includes a bugfix for the test.
> > Can you pls give it a spin and report?
>
> Mostly fixed: the xen_domain stup is missing.
>
> Jan

That's in xen/xen.h. Do you still see any build errors?

> > Thanks!
> >
> >> ---
> >> tools/virtio/crypto/hash.h | 0
> >> tools/virtio/linux/dma-mapping.h | 2 ++
> >> tools/virtio/linux/kernel.h | 2 ++
> >> 3 files changed, 4 insertions(+)
> >> create mode 100644 tools/virtio/crypto/hash.h
> >>
> >> diff --git a/tools/virtio/crypto/hash.h b/tools/virtio/crypto/hash.h
> >> new file mode 100644
> >> index 000000000000..e69de29bb2d1
> >> diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
> >> index f91aeb5fe571..db96cb4bf877 100644
> >> --- a/tools/virtio/linux/dma-mapping.h
> >> +++ b/tools/virtio/linux/dma-mapping.h
> >> @@ -29,4 +29,6 @@ enum dma_data_direction {
> >> #define dma_unmap_single(...) do { } while (0)
> >> #define dma_unmap_page(...) do { } while (0)
> >>
> >> +#define dma_max_mapping_size(d) 0
> >> +
> >> #endif
> >> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
> >> index 6683b4a70b05..ccf321173210 100644
> >> --- a/tools/virtio/linux/kernel.h
> >> +++ b/tools/virtio/linux/kernel.h
> >> @@ -141,4 +141,6 @@ static inline void free_page(unsigned long addr)
> >> #define list_for_each_entry(a, b, c) while (0)
> >> /* end of stubs */
> >>
> >> +#define xen_domain() 0
> >> +
> >> #endif /* KERNEL_H */
> >> --
> >> 2.16.4

2019-10-13 13:34:45

by Jan Kiszka

[permalink] [raw]
Subject: Re: [PATCH] tools/virtio: Fix build

On 13.10.19 14:20, Michael S. Tsirkin wrote:
> On Sun, Oct 13, 2019 at 02:01:03PM +0200, Jan Kiszka wrote:
>> On 13.10.19 13:52, Michael S. Tsirkin wrote:
>>> On Sun, Oct 13, 2019 at 11:03:30AM +0200, Jan Kiszka wrote:
>>>> From: Jan Kiszka <[email protected]>
>>>>
>>>> Various changes in the recent kernel versions broke the build due to
>>>> missing function and header stubs.
>>>>
>>>> Signed-off-by: Jan Kiszka <[email protected]>
>>>
>>> Thanks!
>>> I think it's already fixes in the vhost tree.
>>> That tree also includes a bugfix for the test.
>>> Can you pls give it a spin and report?
>>
>> Mostly fixed: the xen_domain stup is missing.
>>
>> Jan
>
> That's in xen/xen.h. Do you still see any build errors?

ca16cf7b30ca79eeca4d612af121e664ee7d8737 lacks this - forgot to add to
some commit?

Jan

2019-10-13 13:44:16

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH] tools/virtio: Fix build

On Sun, Oct 13, 2019 at 03:29:34PM +0200, Jan Kiszka wrote:
> On 13.10.19 14:20, Michael S. Tsirkin wrote:
> > On Sun, Oct 13, 2019 at 02:01:03PM +0200, Jan Kiszka wrote:
> >> On 13.10.19 13:52, Michael S. Tsirkin wrote:
> >>> On Sun, Oct 13, 2019 at 11:03:30AM +0200, Jan Kiszka wrote:
> >>>> From: Jan Kiszka <[email protected]>
> >>>>
> >>>> Various changes in the recent kernel versions broke the build due to
> >>>> missing function and header stubs.
> >>>>
> >>>> Signed-off-by: Jan Kiszka <[email protected]>
> >>>
> >>> Thanks!
> >>> I think it's already fixes in the vhost tree.
> >>> That tree also includes a bugfix for the test.
> >>> Can you pls give it a spin and report?
> >>
> >> Mostly fixed: the xen_domain stup is missing.
> >>
> >> Jan
> >
> > That's in xen/xen.h. Do you still see any build errors?
>
> ca16cf7b30ca79eeca4d612af121e664ee7d8737 lacks this - forgot to add to
> some commit?
>
> Jan

Oh, you are right.
Should be fixed now.
Thanks!
--
MST