All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/18] mini-os: remove struct file dependency on config
@ 2022-01-11 14:57 Juergen Gross
  2022-01-11 14:58 ` [PATCH v2 01/18] mini-os: split struct file definition from its usage Juergen Gross
                   ` (18 more replies)
  0 siblings, 19 replies; 40+ messages in thread
From: Juergen Gross @ 2022-01-11 14:57 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: samuel.thibault, wl, Juergen Gross

Today the layout of struct file is depending on the Mini-OS
configuration. This is especially bad as the layout is exported to
external users like the Xen libraries built for Mini-OS, and those
are being built only once for multiple stubdom configurations.

Today there is no direct problem resulting from this, as the main
difference between struct file layouts is a large union containing all
the device specific data for the different file types. The largest
union member is not configuration dependant, so the build is currently
not broken.

In order to avoid any future problems this patch series is eliminating
the configuration dependency by replacing most of the device specific
union members by a single pointer.

The two union members used by Xen libraries can't be replaced yet, as
those need to be switched to use the generic pointer first.

In order to hide the Mini-OS internal implementation of the files
array, patches 15-17 are introducing a common framework to access a
struct file via its file descriptor, and to allocate new file types
dynamically instead of having them all pre-defined. The file type
specific operations are supplied via a function vector in order to
remove the dependency of lib/sys.c on all the various file types.

Changes in V2:
- added 3 more patches

Juergen Gross (18):
  mini-os: split struct file definition from its usage
  mini-os: makes file.read bool and move it ahead of device specific
    part
  mini-os: make offset a common struct file member for all types
  mini-os: replace multiple fd elements in struct file by common one
  mini-os: introduce a common dev pointer in struct file
  mini-os: eliminate blkfront union member in struct file
  mini-os: eliminate consfront union member in struct file
  mini-os: eliminate fbfront union member in struct file
  mini-os: eliminate kbdfront union member in struct file
  mini-os: eliminate netfront union member in struct file
  mini-os: move tpm respgot member of struct file to device specific
    data
  mini-os: eliminate tpmfront union member in struct file
  mini-os: eliminate tpmtis union member in struct file
  mini-os: eliminate xenbus union member in struct file
  mini-os: introduce get_file_from_fd()
  mini-os: reset file type in close() in one place only
  mini-os: use function vectors instead of switch for file operations
  mini-os: remove file type FTYPE_XC

 Config.mk                     |   1 -
 arch/x86/testbuild/all-no     |   1 -
 arch/x86/testbuild/all-yes    |   1 -
 arch/x86/testbuild/newxen-yes |   1 -
 blkfront.c                    |  15 +-
 console/xencons_ring.c        |   2 +-
 fbfront.c                     |  16 +-
 include/lib.h                 | 123 ++++++------
 include/tpmfront.h            |   2 +
 lib/sys.c                     | 363 +++++++++++++++++++++++-----------
 lib/xs.c                      |  14 +-
 netfront.c                    |   6 +-
 tpm_tis.c                     |  23 +--
 tpmfront.c                    |  33 ++--
 14 files changed, 352 insertions(+), 249 deletions(-)

-- 
2.26.2



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

end of thread, other threads:[~2022-01-12  8:22 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 14:57 [PATCH v2 00/18] mini-os: remove struct file dependency on config Juergen Gross
2022-01-11 14:58 ` [PATCH v2 01/18] mini-os: split struct file definition from its usage Juergen Gross
2022-01-11 14:58 ` [PATCH v2 02/18] mini-os: makes file.read bool and move it ahead of device specific part Juergen Gross
2022-01-11 14:58 ` [PATCH v2 03/18] mini-os: make offset a common struct file member for all types Juergen Gross
2022-01-11 14:58 ` [PATCH v2 04/18] mini-os: replace multiple fd elements in struct file by common one Juergen Gross
2022-01-11 14:58 ` [PATCH v2 05/18] mini-os: introduce a common dev pointer in struct file Juergen Gross
2022-01-11 14:58 ` [PATCH v2 06/18] mini-os: eliminate blkfront union member " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 07/18] mini-os: eliminate consfront " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 08/18] mini-os: eliminate fbfront " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 09/18] mini-os: eliminate kbdfront " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 10/18] mini-os: eliminate netfront " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 11/18] mini-os: move tpm respgot member of struct file to device specific data Juergen Gross
2022-01-11 14:58 ` [PATCH v2 12/18] mini-os: eliminate tpmfront union member in struct file Juergen Gross
2022-01-11 14:58 ` [PATCH v2 13/18] mini-os: eliminate tpmtis " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 14/18] mini-os: eliminate xenbus " Juergen Gross
2022-01-11 14:58 ` [PATCH v2 15/18] mini-os: introduce get_file_from_fd() Juergen Gross
2022-01-11 18:17   ` Andrew Cooper
2022-01-12  7:36     ` Juergen Gross
2022-01-11 14:58 ` [PATCH v2 16/18] mini-os: reset file type in close() in one place only Juergen Gross
2022-01-11 15:28   ` Samuel Thibault
2022-01-11 18:11   ` Andrew Cooper
2022-01-12  7:35     ` Juergen Gross
2022-01-11 19:14   ` Andrew Cooper
2022-01-12  7:39     ` Juergen Gross
2022-01-11 14:58 ` [PATCH v2 17/18] mini-os: use function vectors instead of switch for file operations Juergen Gross
2022-01-11 18:08   ` Andrew Cooper
2022-01-11 19:39     ` Samuel Thibault
2022-01-12  7:34     ` Juergen Gross
2022-01-12  8:19       ` Andrew Cooper
2022-01-12  8:22         ` Juergen Gross
2022-01-11 19:58   ` Samuel Thibault
2022-01-11 20:05   ` Samuel Thibault
2022-01-11 20:42     ` Samuel Thibault
2022-01-12  7:42     ` Juergen Gross
2022-01-11 20:10   ` Samuel Thibault
2022-01-11 14:58 ` [PATCH v2 18/18] mini-os: remove file type FTYPE_XC Juergen Gross
2022-01-11 18:19   ` Andrew Cooper
2022-01-12  7:37     ` Juergen Gross
2022-01-11 19:42 ` [PATCH v2 00/18] mini-os: remove struct file dependency on config Andrew Cooper
2022-01-12  7:40   ` Juergen Gross

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.