[PATCH v1 00/29] Introduce stub headers necessary for full Xen build

Oleksii Kurochko posted 29 patches 7 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1694702259.git.oleksii.kurochko@gmail.com
xen/include/asm-generic/altp2m.h        |  34 +++++++
xen/include/asm-generic/cpufeature.h    |  23 +++++
xen/include/asm-generic/delay.h         |  21 +++++
xen/include/asm-generic/device.h        |  65 ++++++++++++++
xen/include/asm-generic/div64.h         |  24 +++++
xen/include/asm-generic/domain.h        |  53 +++++++++++
xen/include/asm-generic/event.h         |  39 ++++++++
xen/include/asm-generic/flushtlb.h      |  42 +++++++++
xen/include/asm-generic/grant_table.h   |  14 +++
xen/include/asm-generic/guest_access.h  |  31 +++++++
xen/include/asm-generic/guest_atomics.h |  47 ++++++++++
xen/include/asm-generic/hardirq.h       |  27 ++++++
xen/include/asm-generic/hypercall.h     |  14 +++
xen/include/asm-generic/iocap.h         |  17 ++++
xen/include/asm-generic/iommu.h         |  17 ++++
xen/include/asm-generic/irq.h           |  44 +++++++++
xen/include/asm-generic/mem_access.h    |  14 +++
xen/include/asm-generic/monitor.h       |  64 +++++++++++++
xen/include/asm-generic/numa.h          |  35 ++++++++
xen/include/asm-generic/p2m.h           | 115 ++++++++++++++++++++++++
xen/include/asm-generic/paging.h        |  17 ++++
xen/include/asm-generic/pci.h           |  18 ++++
xen/include/asm-generic/percpu.h        |  35 ++++++++
xen/include/asm-generic/random.h        |  20 +++++
xen/include/asm-generic/setup.h         |  16 ++++
xen/include/asm-generic/smp.h           |  30 +++++++
xen/include/asm-generic/softirq.h       |  17 ++++
xen/include/asm-generic/spinlock.h      |  23 +++++
xen/include/asm-generic/xenoprof.h      |  14 +++
29 files changed, 930 insertions(+)
create mode 100644 xen/include/asm-generic/altp2m.h
create mode 100644 xen/include/asm-generic/cpufeature.h
create mode 100644 xen/include/asm-generic/delay.h
create mode 100644 xen/include/asm-generic/device.h
create mode 100644 xen/include/asm-generic/div64.h
create mode 100644 xen/include/asm-generic/domain.h
create mode 100644 xen/include/asm-generic/event.h
create mode 100644 xen/include/asm-generic/flushtlb.h
create mode 100644 xen/include/asm-generic/grant_table.h
create mode 100644 xen/include/asm-generic/guest_access.h
create mode 100644 xen/include/asm-generic/guest_atomics.h
create mode 100644 xen/include/asm-generic/hardirq.h
create mode 100644 xen/include/asm-generic/hypercall.h
create mode 100644 xen/include/asm-generic/iocap.h
create mode 100644 xen/include/asm-generic/iommu.h
create mode 100644 xen/include/asm-generic/irq.h
create mode 100644 xen/include/asm-generic/mem_access.h
create mode 100644 xen/include/asm-generic/monitor.h
create mode 100644 xen/include/asm-generic/numa.h
create mode 100644 xen/include/asm-generic/p2m.h
create mode 100644 xen/include/asm-generic/paging.h
create mode 100644 xen/include/asm-generic/pci.h
create mode 100644 xen/include/asm-generic/percpu.h
create mode 100644 xen/include/asm-generic/random.h
create mode 100644 xen/include/asm-generic/setup.h
create mode 100644 xen/include/asm-generic/smp.h
create mode 100644 xen/include/asm-generic/softirq.h
create mode 100644 xen/include/asm-generic/spinlock.h
create mode 100644 xen/include/asm-generic/xenoprof.h
[PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii Kurochko 7 months, 2 weeks ago
Based on two patch series [1] and [2], the idea of which is to provide minimal
amount of things for a complete Xen build, a large amount of headers are the same
or almost the same, so it makes sense to move them to asm-generic.

Also, providing such stub headers should help future architectures to add
a full Xen build.

[1] https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
[2] https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/

Oleksii Kurochko (29):
  xen/asm-generic: introduce stub header spinlock.h
  xen/asm-generic: introduce stub header paging.h
  xen/asm-generic: introduce stub header cpufeature.h
  xen/asm-generic: introduce stub header device.h
  xen/asm-generic: introduce stub header event.h
  xen/asm-generic: introduce stub header grant_table.h
  xen/asm-generic: introduce stub header guest_atomics.h
  xen/asm-generic: introduce stub hypercall.h
  xen/asm-generic: introduce stub header iocap.h
  xen/asm-generic: introduce stub header iommu.h
  xen/asm-generic: introduce stub header mem_access.h
  xen/asm-generic: introduce stub header pci.h
  xen/asm-generic: introduce stub header random.h
  xen/asm-generic: introduce stub header setup.h
  xen/asm-generic: introduce stub header xenoprof.h
  xen/asm-generic: introduce stub header flushtlb.h
  xen/asm-generic: introduce stub header percpu.h
  xen/asm-generic: introduce stub header smp.h
  xen/asm-generic: introduce stub header hardirq.h
  xen/asm-generic: introduce stub header div64.h
  xen/asm-generic: introduce stub header altp2m.h
  xen/asm-generic: introduce stub header delay.h
  xen/asm-generic: introduce stub header domain.h
  xen/asm-generic: introduce stub header guest_access.h
  xen/asm-generic: introduce stub header irq.h
  xen/asm-generic: introduce stub header monitor.h
  xen/asm-generic: introduce stub header numa.h
  xen/asm-generic: introduce stub header p2m.h
  xen/asm-generic: introduce stub header softirq.h

 xen/include/asm-generic/altp2m.h        |  34 +++++++
 xen/include/asm-generic/cpufeature.h    |  23 +++++
 xen/include/asm-generic/delay.h         |  21 +++++
 xen/include/asm-generic/device.h        |  65 ++++++++++++++
 xen/include/asm-generic/div64.h         |  24 +++++
 xen/include/asm-generic/domain.h        |  53 +++++++++++
 xen/include/asm-generic/event.h         |  39 ++++++++
 xen/include/asm-generic/flushtlb.h      |  42 +++++++++
 xen/include/asm-generic/grant_table.h   |  14 +++
 xen/include/asm-generic/guest_access.h  |  31 +++++++
 xen/include/asm-generic/guest_atomics.h |  47 ++++++++++
 xen/include/asm-generic/hardirq.h       |  27 ++++++
 xen/include/asm-generic/hypercall.h     |  14 +++
 xen/include/asm-generic/iocap.h         |  17 ++++
 xen/include/asm-generic/iommu.h         |  17 ++++
 xen/include/asm-generic/irq.h           |  44 +++++++++
 xen/include/asm-generic/mem_access.h    |  14 +++
 xen/include/asm-generic/monitor.h       |  64 +++++++++++++
 xen/include/asm-generic/numa.h          |  35 ++++++++
 xen/include/asm-generic/p2m.h           | 115 ++++++++++++++++++++++++
 xen/include/asm-generic/paging.h        |  17 ++++
 xen/include/asm-generic/pci.h           |  18 ++++
 xen/include/asm-generic/percpu.h        |  35 ++++++++
 xen/include/asm-generic/random.h        |  20 +++++
 xen/include/asm-generic/setup.h         |  16 ++++
 xen/include/asm-generic/smp.h           |  30 +++++++
 xen/include/asm-generic/softirq.h       |  17 ++++
 xen/include/asm-generic/spinlock.h      |  23 +++++
 xen/include/asm-generic/xenoprof.h      |  14 +++
 29 files changed, 930 insertions(+)
 create mode 100644 xen/include/asm-generic/altp2m.h
 create mode 100644 xen/include/asm-generic/cpufeature.h
 create mode 100644 xen/include/asm-generic/delay.h
 create mode 100644 xen/include/asm-generic/device.h
 create mode 100644 xen/include/asm-generic/div64.h
 create mode 100644 xen/include/asm-generic/domain.h
 create mode 100644 xen/include/asm-generic/event.h
 create mode 100644 xen/include/asm-generic/flushtlb.h
 create mode 100644 xen/include/asm-generic/grant_table.h
 create mode 100644 xen/include/asm-generic/guest_access.h
 create mode 100644 xen/include/asm-generic/guest_atomics.h
 create mode 100644 xen/include/asm-generic/hardirq.h
 create mode 100644 xen/include/asm-generic/hypercall.h
 create mode 100644 xen/include/asm-generic/iocap.h
 create mode 100644 xen/include/asm-generic/iommu.h
 create mode 100644 xen/include/asm-generic/irq.h
 create mode 100644 xen/include/asm-generic/mem_access.h
 create mode 100644 xen/include/asm-generic/monitor.h
 create mode 100644 xen/include/asm-generic/numa.h
 create mode 100644 xen/include/asm-generic/p2m.h
 create mode 100644 xen/include/asm-generic/paging.h
 create mode 100644 xen/include/asm-generic/pci.h
 create mode 100644 xen/include/asm-generic/percpu.h
 create mode 100644 xen/include/asm-generic/random.h
 create mode 100644 xen/include/asm-generic/setup.h
 create mode 100644 xen/include/asm-generic/smp.h
 create mode 100644 xen/include/asm-generic/softirq.h
 create mode 100644 xen/include/asm-generic/spinlock.h
 create mode 100644 xen/include/asm-generic/xenoprof.h

-- 
2.41.0
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Jan Beulich 7 months, 2 weeks ago
On 14.09.2023 16:56, Oleksii Kurochko wrote:
> Based on two patch series [1] and [2], the idea of which is to provide minimal
> amount of things for a complete Xen build, a large amount of headers are the same
> or almost the same, so it makes sense to move them to asm-generic.
> 
> Also, providing such stub headers should help future architectures to add
> a full Xen build.
> 
> [1] https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> [2] https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> 
> Oleksii Kurochko (29):
>   xen/asm-generic: introduce stub header spinlock.h

At the example of this, personally I think this goes too far. Headers in
asm-generic should be for the case where an arch elects to not implement
certain functionality. Clearly spinlocks are required uniformly.

Jan
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii 7 months, 1 week ago
On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
> On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > Based on two patch series [1] and [2], the idea of which is to
> > provide minimal
> > amount of things for a complete Xen build, a large amount of
> > headers are the same
> > or almost the same, so it makes sense to move them to asm-generic.
> > 
> > Also, providing such stub headers should help future architectures
> > to add
> > a full Xen build.
> > 
> > [1]
> > https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> > [2]
> > https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> > 
> > Oleksii Kurochko (29):
> >   xen/asm-generic: introduce stub header spinlock.h
> 
> At the example of this, personally I think this goes too far. Headers
> in
> asm-generic should be for the case where an arch elects to not
> implement
> certain functionality. Clearly spinlocks are required uniformly.
It makes sense. Then I will back to the option [2] where I introduced
all this headers as part of RISC-V architecture. 

~ Oleksii
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Jan Beulich 7 months, 1 week ago
On 18.09.2023 10:51, Oleksii wrote:
> On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
>> On 14.09.2023 16:56, Oleksii Kurochko wrote:
>>> Based on two patch series [1] and [2], the idea of which is to
>>> provide minimal
>>> amount of things for a complete Xen build, a large amount of
>>> headers are the same
>>> or almost the same, so it makes sense to move them to asm-generic.
>>>
>>> Also, providing such stub headers should help future architectures
>>> to add
>>> a full Xen build.
>>>
>>> [1]
>>> https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
>>> [2]
>>> https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
>>>
>>> Oleksii Kurochko (29):
>>>   xen/asm-generic: introduce stub header spinlock.h
>>
>> At the example of this, personally I think this goes too far. Headers
>> in
>> asm-generic should be for the case where an arch elects to not
>> implement
>> certain functionality. Clearly spinlocks are required uniformly.
> It makes sense. Then I will back to the option [2] where I introduced
> all this headers as part of RISC-V architecture. 

You did see though that in a reply to my own mail I said I take back the
comment, at least as far as this header (and perhaps several others) are
concerned.

Jan

Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii 7 months, 1 week ago
On Mon, 2023-09-18 at 11:29 +0200, Jan Beulich wrote:
> On 18.09.2023 10:51, Oleksii wrote:
> > On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
> > > On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > > > Based on two patch series [1] and [2], the idea of which is to
> > > > provide minimal
> > > > amount of things for a complete Xen build, a large amount of
> > > > headers are the same
> > > > or almost the same, so it makes sense to move them to asm-
> > > > generic.
> > > > 
> > > > Also, providing such stub headers should help future
> > > > architectures
> > > > to add
> > > > a full Xen build.
> > > > 
> > > > [1]
> > > > https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> > > > [2]
> > > > https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> > > > 
> > > > Oleksii Kurochko (29):
> > > >   xen/asm-generic: introduce stub header spinlock.h
> > > 
> > > At the example of this, personally I think this goes too far.
> > > Headers
> > > in
> > > asm-generic should be for the case where an arch elects to not
> > > implement
> > > certain functionality. Clearly spinlocks are required uniformly.
> > It makes sense. Then I will back to the option [2] where I
> > introduced
> > all this headers as part of RISC-V architecture. 
> 
> You did see though that in a reply to my own mail I said I take back
> the
> comment, at least as far as this header (and perhaps several others)
> are
> concerned.
> 
I missed that comment on the patch about spinlock.

Well, then, I don't fully understand the criteria.

What about empty headers or temporary empty headers?

For example, asm/xenoprof.h is empty for all arches except x86, so it
is a good candidate for asm-generic.
But asm/grant_table.h is empty for PPC and RISC-V for now but won't be
empty in the future. Does it make sense to put them to asm-generic? The
only benefit I see is that in future architecture if they follow the
same way of adding support for the arch to Xen, they will face the same
issue: building full Xen requires this empty header.

So, should I wait for some time on other patches of the patch series?

~ Oleksii
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Jan Beulich 7 months, 1 week ago
On 18.09.2023 14:05, Oleksii wrote:
> On Mon, 2023-09-18 at 11:29 +0200, Jan Beulich wrote:
>> On 18.09.2023 10:51, Oleksii wrote:
>>> On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
>>>> On 14.09.2023 16:56, Oleksii Kurochko wrote:
>>>>> Based on two patch series [1] and [2], the idea of which is to
>>>>> provide minimal
>>>>> amount of things for a complete Xen build, a large amount of
>>>>> headers are the same
>>>>> or almost the same, so it makes sense to move them to asm-
>>>>> generic.
>>>>>
>>>>> Also, providing such stub headers should help future
>>>>> architectures
>>>>> to add
>>>>> a full Xen build.
>>>>>
>>>>> [1]
>>>>> https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
>>>>> [2]
>>>>> https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
>>>>>
>>>>> Oleksii Kurochko (29):
>>>>>   xen/asm-generic: introduce stub header spinlock.h
>>>>
>>>> At the example of this, personally I think this goes too far.
>>>> Headers
>>>> in
>>>> asm-generic should be for the case where an arch elects to not
>>>> implement
>>>> certain functionality. Clearly spinlocks are required uniformly.
>>> It makes sense. Then I will back to the option [2] where I
>>> introduced
>>> all this headers as part of RISC-V architecture. 
>>
>> You did see though that in a reply to my own mail I said I take back
>> the
>> comment, at least as far as this header (and perhaps several others)
>> are
>> concerned.
>>
> I missed that comment on the patch about spinlock.
> 
> Well, then, I don't fully understand the criteria.
> 
> What about empty headers or temporary empty headers?
> 
> For example, asm/xenoprof.h is empty for all arches except x86, so it
> is a good candidate for asm-generic.

That's an example where I think it is wrong (or at least unnecessary) for
the xen/ header to include the asm/ one irrespective of the controlling
CONFIG_* setting. From what I can tell common code would build fine with
the #include moved; x86 code may require an adjustment or two. IOW this
is a case where I think preferably presence of an arch header was
required only when XENOPROF can actually be yet to y in Kconfig.

> But asm/grant_table.h is empty for PPC and RISC-V for now but won't be
> empty in the future. Does it make sense to put them to asm-generic? The
> only benefit I see is that in future architecture if they follow the
> same way of adding support for the arch to Xen, they will face the same
> issue: building full Xen requires this empty header.

Here I can see different ways of looking at it. Personally I'd prefer
stub headers to be used only if, for the foreseeable future, they are
intended to remain in use. grant_table.h pretty clearly doesn't fall in
this category. (You may want to peek at what's being done on the PPC
side. Nevertheless some of what's done there could likely benefit from
what you're doing here.)

> So, should I wait for some time on other patches of the patch series?

Well, afaic I'd prefer if I got a chance to look over at least some more
of the patches in this series. But you're of course free to submit a v2
at any time.

Jan

Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii 7 months, 1 week ago
On Mon, 2023-09-18 at 14:38 +0200, Jan Beulich wrote:
> On 18.09.2023 14:05, Oleksii wrote:
> > On Mon, 2023-09-18 at 11:29 +0200, Jan Beulich wrote:
> > > On 18.09.2023 10:51, Oleksii wrote:
> > > > On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
> > > > > On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > > > > > Based on two patch series [1] and [2], the idea of which is
> > > > > > to
> > > > > > provide minimal
> > > > > > amount of things for a complete Xen build, a large amount
> > > > > > of
> > > > > > headers are the same
> > > > > > or almost the same, so it makes sense to move them to asm-
> > > > > > generic.
> > > > > > 
> > > > > > Also, providing such stub headers should help future
> > > > > > architectures
> > > > > > to add
> > > > > > a full Xen build.
> > > > > > 
> > > > > > [1]
> > > > > > https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> > > > > > [2]
> > > > > > https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> > > > > > 
> > > > > > Oleksii Kurochko (29):
> > > > > >   xen/asm-generic: introduce stub header spinlock.h
> > > > > 
> > > > > At the example of this, personally I think this goes too far.
> > > > > Headers
> > > > > in
> > > > > asm-generic should be for the case where an arch elects to
> > > > > not
> > > > > implement
> > > > > certain functionality. Clearly spinlocks are required
> > > > > uniformly.
> > > > It makes sense. Then I will back to the option [2] where I
> > > > introduced
> > > > all this headers as part of RISC-V architecture. 
> > > 
> > > You did see though that in a reply to my own mail I said I take
> > > back
> > > the
> > > comment, at least as far as this header (and perhaps several
> > > others)
> > > are
> > > concerned.
> > > 
> > I missed that comment on the patch about spinlock.
> > 
> > Well, then, I don't fully understand the criteria.
> > 
> > What about empty headers or temporary empty headers?
> > 
> > For example, asm/xenoprof.h is empty for all arches except x86, so
> > it
> > is a good candidate for asm-generic.
> 
> That's an example where I think it is wrong (or at least unnecessary)
> for
> the xen/ header to include the asm/ one irrespective of the
> controlling
> CONFIG_* setting. From what I can tell common code would build fine
> with
> the #include moved; x86 code may require an adjustment or two. IOW
> this
> is a case where I think preferably presence of an arch header was
> required only when XENOPROF can actually be yet to y in Kconfig.
> 
> > But asm/grant_table.h is empty for PPC and RISC-V for now but won't
> > be
> > empty in the future. Does it make sense to put them to asm-generic?
> > The
> > only benefit I see is that in future architecture if they follow
> > the
> > same way of adding support for the arch to Xen, they will face the
> > same
> > issue: building full Xen requires this empty header.
> 
> Here I can see different ways of looking at it. Personally I'd prefer
> stub headers to be used only if, for the foreseeable future, they are
> intended to remain in use. grant_table.h pretty clearly doesn't fall
> in
> this category. (You may want to peek at what's being done on the PPC
> side. Nevertheless some of what's done there could likely benefit
> from
> what you're doing here.)
> 
> > So, should I wait for some time on other patches of the patch
> > series?
> 
> Well, afaic I'd prefer if I got a chance to look over at least some
> more
> of the patches in this series. But you're of course free to submit a
> v2
> at any time.
I think that it will be better to wait for some time not to produce
unnecessary patches.

~ Oleksii
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii 6 months, 1 week ago
On Fri, 2023-09-22 at 09:00 +0300, Oleksii wrote:
> On Mon, 2023-09-18 at 14:38 +0200, Jan Beulich wrote:
> > On 18.09.2023 14:05, Oleksii wrote:
> > > On Mon, 2023-09-18 at 11:29 +0200, Jan Beulich wrote:
> > > > On 18.09.2023 10:51, Oleksii wrote:
> > > > > On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
> > > > > > On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > > > > > > Based on two patch series [1] and [2], the idea of which
> > > > > > > is
> > > > > > > to
> > > > > > > provide minimal
> > > > > > > amount of things for a complete Xen build, a large amount
> > > > > > > of
> > > > > > > headers are the same
> > > > > > > or almost the same, so it makes sense to move them to
> > > > > > > asm-
> > > > > > > generic.
> > > > > > > 
> > > > > > > Also, providing such stub headers should help future
> > > > > > > architectures
> > > > > > > to add
> > > > > > > a full Xen build.
> > > > > > > 
> > > > > > > [1]
> > > > > > > https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> > > > > > > [2]
> > > > > > > https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> > > > > > > 
> > > > > > > Oleksii Kurochko (29):
> > > > > > >   xen/asm-generic: introduce stub header spinlock.h
> > > > > > 
> > > > > > At the example of this, personally I think this goes too
> > > > > > far.
> > > > > > Headers
> > > > > > in
> > > > > > asm-generic should be for the case where an arch elects to
> > > > > > not
> > > > > > implement
> > > > > > certain functionality. Clearly spinlocks are required
> > > > > > uniformly.
> > > > > It makes sense. Then I will back to the option [2] where I
> > > > > introduced
> > > > > all this headers as part of RISC-V architecture. 
> > > > 
> > > > You did see though that in a reply to my own mail I said I take
> > > > back
> > > > the
> > > > comment, at least as far as this header (and perhaps several
> > > > others)
> > > > are
> > > > concerned.
> > > > 
> > > I missed that comment on the patch about spinlock.
> > > 
> > > Well, then, I don't fully understand the criteria.
> > > 
> > > What about empty headers or temporary empty headers?
> > > 
> > > For example, asm/xenoprof.h is empty for all arches except x86,
> > > so
> > > it
> > > is a good candidate for asm-generic.
> > 
> > That's an example where I think it is wrong (or at least
> > unnecessary)
> > for
> > the xen/ header to include the asm/ one irrespective of the
> > controlling
> > CONFIG_* setting. From what I can tell common code would build fine
> > with
> > the #include moved; x86 code may require an adjustment or two. IOW
> > this
> > is a case where I think preferably presence of an arch header was
> > required only when XENOPROF can actually be yet to y in Kconfig.
> > 
> > > But asm/grant_table.h is empty for PPC and RISC-V for now but
> > > won't
> > > be
> > > empty in the future. Does it make sense to put them to asm-
> > > generic?
> > > The
> > > only benefit I see is that in future architecture if they follow
> > > the
> > > same way of adding support for the arch to Xen, they will face
> > > the
> > > same
> > > issue: building full Xen requires this empty header.
> > 
> > Here I can see different ways of looking at it. Personally I'd
> > prefer
> > stub headers to be used only if, for the foreseeable future, they
> > are
> > intended to remain in use. grant_table.h pretty clearly doesn't
> > fall
> > in
> > this category. (You may want to peek at what's being done on the
> > PPC
> > side. Nevertheless some of what's done there could likely benefit
> > from
> > what you're doing here.)
> > 
> > > So, should I wait for some time on other patches of the patch
> > > series?
> > 
> > Well, afaic I'd prefer if I got a chance to look over at least some
> > more
> > of the patches in this series. But you're of course free to submit
> > a
> > v2
> > at any time.
> I think that it will be better to wait for some time not to produce
> unnecessary patches.
Hmm... but my gitlab CI told me that there is an issue with riscv64
build I'll double-check.

~ Oleksii
Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Julien Grall 7 months, 1 week ago
Hi Jan,

On 18/09/2023 10:29, Jan Beulich wrote:
> On 18.09.2023 10:51, Oleksii wrote:
>> On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
>>> On 14.09.2023 16:56, Oleksii Kurochko wrote:
>>>> Based on two patch series [1] and [2], the idea of which is to
>>>> provide minimal
>>>> amount of things for a complete Xen build, a large amount of
>>>> headers are the same
>>>> or almost the same, so it makes sense to move them to asm-generic.
>>>>
>>>> Also, providing such stub headers should help future architectures
>>>> to add
>>>> a full Xen build.
>>>>
>>>> [1]
>>>> https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
>>>> [2]
>>>> https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
>>>>
>>>> Oleksii Kurochko (29):
>>>>    xen/asm-generic: introduce stub header spinlock.h
>>>
>>> At the example of this, personally I think this goes too far. Headers
>>> in
>>> asm-generic should be for the case where an arch elects to not
>>> implement
>>> certain functionality. Clearly spinlocks are required uniformly.
>> It makes sense. Then I will back to the option [2] where I introduced
>> all this headers as part of RISC-V architecture.
> 
> You did see though that in a reply to my own mail I said I take back the
> comment,

I can't find a reply to our own mail in my inbox. Do you have a message-id?

? at least as far as this header (and perhaps several others) are
> concerned.

Do you have a list where you think they should be kept? Or are you 
planning to answer to all you disagree/agree one by one?

Cheers,

-- 
Julien Grall

Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Jan Beulich 7 months, 1 week ago
On 18.09.2023 11:32, Julien Grall wrote:
> Hi Jan,
> 
> On 18/09/2023 10:29, Jan Beulich wrote:
>> On 18.09.2023 10:51, Oleksii wrote:
>>> On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
>>>> On 14.09.2023 16:56, Oleksii Kurochko wrote:
>>>>> Based on two patch series [1] and [2], the idea of which is to
>>>>> provide minimal
>>>>> amount of things for a complete Xen build, a large amount of
>>>>> headers are the same
>>>>> or almost the same, so it makes sense to move them to asm-generic.
>>>>>
>>>>> Also, providing such stub headers should help future architectures
>>>>> to add
>>>>> a full Xen build.
>>>>>
>>>>> [1]
>>>>> https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
>>>>> [2]
>>>>> https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
>>>>>
>>>>> Oleksii Kurochko (29):
>>>>>    xen/asm-generic: introduce stub header spinlock.h
>>>>
>>>> At the example of this, personally I think this goes too far. Headers
>>>> in
>>>> asm-generic should be for the case where an arch elects to not
>>>> implement
>>>> certain functionality. Clearly spinlocks are required uniformly.
>>> It makes sense. Then I will back to the option [2] where I introduced
>>> all this headers as part of RISC-V architecture.
>>
>> You did see though that in a reply to my own mail I said I take back the
>> comment,
> 
> I can't find a reply to our own mail in my inbox. Do you have a message-id?

Oh, sorry, I said so in reply to 01/29.

> ? at least as far as this header (and perhaps several others) are
>> concerned.
> 
> Do you have a list where you think they should be kept? Or are you 
> planning to answer to all you disagree/agree one by one?

I think this can only be one-by-one.

Jan

Re: [PATCH v1 00/29] Introduce stub headers necessary for full Xen build
Posted by Oleksii 7 months, 1 week ago
On Mon, 2023-09-18 at 11:51 +0300, Oleksii wrote:
> On Thu, 2023-09-14 at 17:08 +0200, Jan Beulich wrote:
> > On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > > Based on two patch series [1] and [2], the idea of which is to
> > > provide minimal
> > > amount of things for a complete Xen build, a large amount of
> > > headers are the same
> > > or almost the same, so it makes sense to move them to asm-
> > > generic.
> > > 
> > > Also, providing such stub headers should help future
> > > architectures
> > > to add
> > > a full Xen build.
> > > 
> > > [1]
> > > https://lore.kernel.org/xen-devel/cover.1694543103.git.sanastasio@raptorengineering.com/
> > > [2]
> > > https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kurochko@gmail.com/
> > > 
> > > Oleksii Kurochko (29):
> > >   xen/asm-generic: introduce stub header spinlock.h
> > 
> > At the example of this, personally I think this goes too far.
> > Headers
> > in
> > asm-generic should be for the case where an arch elects to not
> > implement
> > certain functionality. Clearly spinlocks are required uniformly.
> It makes sense. Then I will back to the option [2] where I introduced
> all this headers as part of RISC-V architecture.
And I will review the current patch series probably it is still can be
something moved to asm-generic.

> 
> ~ Oleksii