[PATCH v3 0/3] tools/libs: decouple more from mini-os

Juergen Gross posted 3 patches 2 years, 3 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220116082346.26194-1-jgross@suse.com
tools/libs/ctrl/xc_minios.c |   9 ---
tools/libs/evtchn/minios.c  | 143 ++++++++++++++++++++++++------------
tools/libs/gnttab/minios.c  |  67 +++++++++++++----
3 files changed, 148 insertions(+), 71 deletions(-)
[PATCH v3 0/3] tools/libs: decouple more from mini-os
Posted by Juergen Gross 2 years, 3 months ago
This small series removes some hard coupling of the Xen build with some
Mini-OS internals, especially the struct file layout and the internal
organization of the file handling.

This series depends on the Mini-OS series posted recently:

https://lists.xen.org/archives/html/xen-devel/2022-01/threads.html#00635

The main idea is to no longer have Xen library specific structures
inside struct file, or to let struct file layout depend on the
configuration of Mini-OS.

All Xen libraries needing a hook in struct file should use the now
available generic dev pointer and allocate the needed data dynamically.

Additionally Xen libraries should get the pointer of struct file via
the new get_file_from_fd() function instead of accessing directly the
files[] array, which might go away in future (e.g. in order to support
dynamic allocation of struct file as needed).

Via using alloc_file_type() the libs provide a function vector in
order to enable Mini-OS to remove the dedicated callbacks into the
libs via known function names and replacing them to use the new
vector.

Changes in V3:
- comments addressed

Changes in V2:
- comments addressed
- add using alloc_file_type()
- new patch 3

Juergen Gross (3):
  tools/libs/evtchn: decouple more from mini-os
  tools/libs/gnttab: decouple more from mini-os
  tools/libs/ctrl: remove file related handling

 tools/libs/ctrl/xc_minios.c |   9 ---
 tools/libs/evtchn/minios.c  | 143 ++++++++++++++++++++++++------------
 tools/libs/gnttab/minios.c  |  67 +++++++++++++----
 3 files changed, 148 insertions(+), 71 deletions(-)

-- 
2.26.2


Re: [PATCH v3 0/3] tools/libs: decouple more from mini-os
Posted by Samuel Thibault 2 years, 3 months ago
Juergen Gross, le dim. 16 janv. 2022 09:23:43 +0100, a ecrit:
> This small series removes some hard coupling of the Xen build with some
> Mini-OS internals, especially the struct file layout and the internal
> organization of the file handling.
> 
> This series depends on the Mini-OS series posted recently:
> 
> https://lists.xen.org/archives/html/xen-devel/2022-01/threads.html#00635
> 
> The main idea is to no longer have Xen library specific structures
> inside struct file, or to let struct file layout depend on the
> configuration of Mini-OS.
> 
> All Xen libraries needing a hook in struct file should use the now
> available generic dev pointer and allocate the needed data dynamically.
> 
> Additionally Xen libraries should get the pointer of struct file via
> the new get_file_from_fd() function instead of accessing directly the
> files[] array, which might go away in future (e.g. in order to support
> dynamic allocation of struct file as needed).
> 
> Via using alloc_file_type() the libs provide a function vector in
> order to enable Mini-OS to remove the dedicated callbacks into the
> libs via known function names and replacing them to use the new
> vector.

Thanks!