All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mini-os: prepare mini-os stubdoms to use stable libs only
@ 2021-10-04 14:19 Juergen Gross
  2021-10-04 14:19 ` [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC Juergen Gross
  2021-10-04 14:19 ` [PATCH 2/2] mini-os: add config options for xen libraries Juergen Gross
  0 siblings, 2 replies; 5+ messages in thread
From: Juergen Gross @ 2021-10-04 14:19 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: samuel.thibault, wl, Juergen Gross

When built as stubdom Mini-OS can't be linked to use only stable Xen
libraries, as there is only one config option for adding Xen library
support, which includes libxenctrl.

This series is changing that by adding dedicated config options for
each Xen library needing special support in Mini-OS.

Juergen Gross (2):
  mini-os: fix testbuilds regarding CONFIG_XC
  mini-os: add config options for xen libraries

 Config.mk                     | 8 +++++++-
 arch/x86/testbuild/all-no     | 4 +++-
 arch/x86/testbuild/all-yes    | 8 +++++---
 arch/x86/testbuild/newxen-yes | 8 +++++---
 lib/sys.c                     | 8 ++++++--
 5 files changed, 26 insertions(+), 10 deletions(-)

-- 
2.26.2



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

* [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC
  2021-10-04 14:19 [PATCH 0/2] mini-os: prepare mini-os stubdoms to use stable libs only Juergen Gross
@ 2021-10-04 14:19 ` Juergen Gross
  2021-10-05 21:26   ` Samuel Thibault
  2021-10-04 14:19 ` [PATCH 2/2] mini-os: add config options for xen libraries Juergen Gross
  1 sibling, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2021-10-04 14:19 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: samuel.thibault, wl, Juergen Gross

CONFIG_GC is requiring external support, so disable it in testbuilds.

The only reason this is working right now is its usage being inside
a HAVE_LIBC section.

Make that more obvious by making the default setting of CONFIG_XC
depending on libc being available.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 Config.mk                     | 3 ++-
 arch/x86/testbuild/all-yes    | 3 ++-
 arch/x86/testbuild/newxen-yes | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 15311ef..8f4cea9 100644
--- a/Config.mk
+++ b/Config.mk
@@ -62,6 +62,7 @@ MINIOS_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
 MINIOS_TARGET_ARCH     ?= $(MINIOS_COMPILE_ARCH)
 endif
 
+stubdom ?= n
 libc = $(stubdom)
 
 XEN_INTERFACE_VERSION ?= 0x00030205
@@ -179,7 +180,6 @@ CONFIG-y += CONFIG_FBFRONT
 CONFIG-y += CONFIG_KBDFRONT
 CONFIG-y += CONFIG_CONSFRONT
 CONFIG-y += CONFIG_XENBUS
-CONFIG-y += CONFIG_XC
 CONFIG-n += CONFIG_QEMU_XS_ARGS
 CONFIG-n += CONFIG_TEST
 CONFIG-n += CONFIG_PCIFRONT
@@ -195,6 +195,7 @@ CONFIG-y += CONFIG_PARAVIRT
 else
 CONFIG-n += CONFIG_PARAVIRT
 endif
+CONFIG-$(libc) += CONFIG_XC
 CONFIG-$(lwip) += CONFIG_LWIP
 
 $(foreach i,$(CONFIG-y),$(eval $(i) ?= y))
diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
index 8732e69..5464342 100644
--- a/arch/x86/testbuild/all-yes
+++ b/arch/x86/testbuild/all-yes
@@ -13,7 +13,8 @@ CONFIG_FBFRONT = y
 CONFIG_KBDFRONT = y
 CONFIG_CONSFRONT = y
 CONFIG_XENBUS = y
-CONFIG_XC = y
+# XC is special: it needs support from outside
+CONFIG_XC = n
 # LWIP is special: it needs support from outside
 CONFIG_LWIP = n
 CONFIG_BALLOON = y
diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
index 9c30c00..2a3ed2e 100644
--- a/arch/x86/testbuild/newxen-yes
+++ b/arch/x86/testbuild/newxen-yes
@@ -13,7 +13,8 @@ CONFIG_FBFRONT = y
 CONFIG_KBDFRONT = y
 CONFIG_CONSFRONT = y
 CONFIG_XENBUS = y
-CONFIG_XC = y
+# XC is special: it needs support from outside
+CONFIG_XC = n
 # LWIP is special: it needs support from outside
 CONFIG_LWIP = n
 CONFIG_BALLOON = y
-- 
2.26.2



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

* [PATCH 2/2] mini-os: add config options for xen libraries
  2021-10-04 14:19 [PATCH 0/2] mini-os: prepare mini-os stubdoms to use stable libs only Juergen Gross
  2021-10-04 14:19 ` [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC Juergen Gross
@ 2021-10-04 14:19 ` Juergen Gross
  2021-10-05 21:26   ` Samuel Thibault
  1 sibling, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2021-10-04 14:19 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: samuel.thibault, wl, Juergen Gross

Today close hooks into libxenctrl, libxenevtchn and libxengnttab are
under the CONFIG_XC umbrella. In order to support Mini-OS builds using
stable Xen libraries only, add CONFIG_LIBXENCTRL, CONFIG_LIBXENEVTCHN
and CONFIG_LIBXENGNTTAB config options.

In case CONFIG_XC was specified in the Mini-OS config explicitly, set
the three new variables to the specified value.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 Config.mk                     | 7 ++++++-
 arch/x86/testbuild/all-no     | 4 +++-
 arch/x86/testbuild/all-yes    | 9 +++++----
 arch/x86/testbuild/newxen-yes | 9 +++++----
 lib/sys.c                     | 8 ++++++--
 5 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/Config.mk b/Config.mk
index 8f4cea9..5e66089 100644
--- a/Config.mk
+++ b/Config.mk
@@ -195,7 +195,12 @@ CONFIG-y += CONFIG_PARAVIRT
 else
 CONFIG-n += CONFIG_PARAVIRT
 endif
-CONFIG-$(libc) += CONFIG_XC
+# Support legacy CONFIG_XC value
+CONFIG_XC ?= $(libc)
+CONFIG-$(CONFIG_XC) += CONFIG_LIBXENCTRL
+CONFIG-$(CONFIG_XC) += CONFIG_LIBXENEVTCHN
+CONFIG-$(CONFIG_XC) += CONFIG_LIBXENGNTTAB
+
 CONFIG-$(lwip) += CONFIG_LWIP
 
 $(foreach i,$(CONFIG-y),$(eval $(i) ?= y))
diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no
index 1c50bba..7972ecd 100644
--- a/arch/x86/testbuild/all-no
+++ b/arch/x86/testbuild/all-no
@@ -13,7 +13,9 @@ CONFIG_FBFRONT = n
 CONFIG_KBDFRONT = n
 CONFIG_CONSFRONT = n
 CONFIG_XENBUS = n
-CONFIG_XC = n
+CONFIG_LIBXENCTRL = n
+CONFIG_LIBXENEVTCHN = n
+CONFIG_LIBXENGNTTAB = n
 CONFIG_LWIP = n
 CONFIG_BALLOON = n
 CONFIG_USE_XEN_CONSOLE = n
diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
index 5464342..bc8eea5 100644
--- a/arch/x86/testbuild/all-yes
+++ b/arch/x86/testbuild/all-yes
@@ -13,9 +13,10 @@ CONFIG_FBFRONT = y
 CONFIG_KBDFRONT = y
 CONFIG_CONSFRONT = y
 CONFIG_XENBUS = y
-# XC is special: it needs support from outside
-CONFIG_XC = n
-# LWIP is special: it needs support from outside
-CONFIG_LWIP = n
 CONFIG_BALLOON = y
 CONFIG_USE_XEN_CONSOLE = y
+# The following are special: they need support from outside
+CONFIG_LIBXENCTRL = n
+CONFIG_LIBXENEVTCHN = n
+CONFIG_LIBXENGNTTAB = n
+CONFIG_LWIP = n
diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
index 2a3ed2e..f72123b 100644
--- a/arch/x86/testbuild/newxen-yes
+++ b/arch/x86/testbuild/newxen-yes
@@ -13,10 +13,11 @@ CONFIG_FBFRONT = y
 CONFIG_KBDFRONT = y
 CONFIG_CONSFRONT = y
 CONFIG_XENBUS = y
-# XC is special: it needs support from outside
-CONFIG_XC = n
-# LWIP is special: it needs support from outside
-CONFIG_LWIP = n
 CONFIG_BALLOON = y
 CONFIG_USE_XEN_CONSOLE = y
 XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
+# The following are special: they need support from outside
+CONFIG_LIBXENCTRL = n
+CONFIG_LIBXENEVTCHN = n
+CONFIG_LIBXENGNTTAB = n
+CONFIG_LWIP = n
diff --git a/lib/sys.c b/lib/sys.c
index c6a7b9f..e8d5eb2 100644
--- a/lib/sys.c
+++ b/lib/sys.c
@@ -437,13 +437,17 @@ int close(int fd)
 	    return res;
 	}
 #endif
-#ifdef CONFIG_XC
+#ifdef CONFIG_LIBXENCTRL
 	case FTYPE_XC:
 	    minios_interface_close_fd(fd);
 	    return 0;
+#endif
+#ifdef CONFIG_LIBXENEVTCHN
 	case FTYPE_EVTCHN:
 	    minios_evtchn_close_fd(fd);
             return 0;
+#endif
+#ifdef CONFIG_LIBXENGNTTAB
 	case FTYPE_GNTMAP:
 	    minios_gnttab_close_fd(fd);
 	    return 0;
@@ -1373,7 +1377,7 @@ void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset
 
     if (fd == -1)
         return map_zero(n, 1);
-#ifdef CONFIG_XC
+#ifdef CONFIG_LIBXENCTRL
     else if (files[fd].type == FTYPE_XC) {
         unsigned long zero = 0;
         return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, NULL, 0);
-- 
2.26.2



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

* Re: [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC
  2021-10-04 14:19 ` [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC Juergen Gross
@ 2021-10-05 21:26   ` Samuel Thibault
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2021-10-05 21:26 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wl

Juergen Gross, le lun. 04 oct. 2021 16:19:23 +0200, a ecrit:
> CONFIG_GC is requiring external support, so disable it in testbuilds.
> 
> The only reason this is working right now is its usage being inside
> a HAVE_LIBC section.
> 
> Make that more obvious by making the default setting of CONFIG_XC
> depending on libc being available.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks!

> ---
>  Config.mk                     | 3 ++-
>  arch/x86/testbuild/all-yes    | 3 ++-
>  arch/x86/testbuild/newxen-yes | 3 ++-
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/Config.mk b/Config.mk
> index 15311ef..8f4cea9 100644
> --- a/Config.mk
> +++ b/Config.mk
> @@ -62,6 +62,7 @@ MINIOS_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
>  MINIOS_TARGET_ARCH     ?= $(MINIOS_COMPILE_ARCH)
>  endif
>  
> +stubdom ?= n
>  libc = $(stubdom)
>  
>  XEN_INTERFACE_VERSION ?= 0x00030205
> @@ -179,7 +180,6 @@ CONFIG-y += CONFIG_FBFRONT
>  CONFIG-y += CONFIG_KBDFRONT
>  CONFIG-y += CONFIG_CONSFRONT
>  CONFIG-y += CONFIG_XENBUS
> -CONFIG-y += CONFIG_XC
>  CONFIG-n += CONFIG_QEMU_XS_ARGS
>  CONFIG-n += CONFIG_TEST
>  CONFIG-n += CONFIG_PCIFRONT
> @@ -195,6 +195,7 @@ CONFIG-y += CONFIG_PARAVIRT
>  else
>  CONFIG-n += CONFIG_PARAVIRT
>  endif
> +CONFIG-$(libc) += CONFIG_XC
>  CONFIG-$(lwip) += CONFIG_LWIP
>  
>  $(foreach i,$(CONFIG-y),$(eval $(i) ?= y))
> diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
> index 8732e69..5464342 100644
> --- a/arch/x86/testbuild/all-yes
> +++ b/arch/x86/testbuild/all-yes
> @@ -13,7 +13,8 @@ CONFIG_FBFRONT = y
>  CONFIG_KBDFRONT = y
>  CONFIG_CONSFRONT = y
>  CONFIG_XENBUS = y
> -CONFIG_XC = y
> +# XC is special: it needs support from outside
> +CONFIG_XC = n
>  # LWIP is special: it needs support from outside
>  CONFIG_LWIP = n
>  CONFIG_BALLOON = y
> diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
> index 9c30c00..2a3ed2e 100644
> --- a/arch/x86/testbuild/newxen-yes
> +++ b/arch/x86/testbuild/newxen-yes
> @@ -13,7 +13,8 @@ CONFIG_FBFRONT = y
>  CONFIG_KBDFRONT = y
>  CONFIG_CONSFRONT = y
>  CONFIG_XENBUS = y
> -CONFIG_XC = y
> +# XC is special: it needs support from outside
> +CONFIG_XC = n
>  # LWIP is special: it needs support from outside
>  CONFIG_LWIP = n
>  CONFIG_BALLOON = y
> -- 
> 2.26.2
> 

-- 
Samuel
<k> faut en profiter, aujourd'hui, les blagues bidon sont à 100 dollars
 -+- #sos-bourse -+-


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

* Re: [PATCH 2/2] mini-os: add config options for xen libraries
  2021-10-04 14:19 ` [PATCH 2/2] mini-os: add config options for xen libraries Juergen Gross
@ 2021-10-05 21:26   ` Samuel Thibault
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2021-10-05 21:26 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wl

Juergen Gross, le lun. 04 oct. 2021 16:19:24 +0200, a ecrit:
> Today close hooks into libxenctrl, libxenevtchn and libxengnttab are
> under the CONFIG_XC umbrella. In order to support Mini-OS builds using
> stable Xen libraries only, add CONFIG_LIBXENCTRL, CONFIG_LIBXENEVTCHN
> and CONFIG_LIBXENGNTTAB config options.
> 
> In case CONFIG_XC was specified in the Mini-OS config explicitly, set
> the three new variables to the specified value.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks!

> ---
>  Config.mk                     | 7 ++++++-
>  arch/x86/testbuild/all-no     | 4 +++-
>  arch/x86/testbuild/all-yes    | 9 +++++----
>  arch/x86/testbuild/newxen-yes | 9 +++++----
>  lib/sys.c                     | 8 ++++++--
>  5 files changed, 25 insertions(+), 12 deletions(-)
> 
> diff --git a/Config.mk b/Config.mk
> index 8f4cea9..5e66089 100644
> --- a/Config.mk
> +++ b/Config.mk
> @@ -195,7 +195,12 @@ CONFIG-y += CONFIG_PARAVIRT
>  else
>  CONFIG-n += CONFIG_PARAVIRT
>  endif
> -CONFIG-$(libc) += CONFIG_XC
> +# Support legacy CONFIG_XC value
> +CONFIG_XC ?= $(libc)
> +CONFIG-$(CONFIG_XC) += CONFIG_LIBXENCTRL
> +CONFIG-$(CONFIG_XC) += CONFIG_LIBXENEVTCHN
> +CONFIG-$(CONFIG_XC) += CONFIG_LIBXENGNTTAB
> +
>  CONFIG-$(lwip) += CONFIG_LWIP
>  
>  $(foreach i,$(CONFIG-y),$(eval $(i) ?= y))
> diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no
> index 1c50bba..7972ecd 100644
> --- a/arch/x86/testbuild/all-no
> +++ b/arch/x86/testbuild/all-no
> @@ -13,7 +13,9 @@ CONFIG_FBFRONT = n
>  CONFIG_KBDFRONT = n
>  CONFIG_CONSFRONT = n
>  CONFIG_XENBUS = n
> -CONFIG_XC = n
> +CONFIG_LIBXENCTRL = n
> +CONFIG_LIBXENEVTCHN = n
> +CONFIG_LIBXENGNTTAB = n
>  CONFIG_LWIP = n
>  CONFIG_BALLOON = n
>  CONFIG_USE_XEN_CONSOLE = n
> diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
> index 5464342..bc8eea5 100644
> --- a/arch/x86/testbuild/all-yes
> +++ b/arch/x86/testbuild/all-yes
> @@ -13,9 +13,10 @@ CONFIG_FBFRONT = y
>  CONFIG_KBDFRONT = y
>  CONFIG_CONSFRONT = y
>  CONFIG_XENBUS = y
> -# XC is special: it needs support from outside
> -CONFIG_XC = n
> -# LWIP is special: it needs support from outside
> -CONFIG_LWIP = n
>  CONFIG_BALLOON = y
>  CONFIG_USE_XEN_CONSOLE = y
> +# The following are special: they need support from outside
> +CONFIG_LIBXENCTRL = n
> +CONFIG_LIBXENEVTCHN = n
> +CONFIG_LIBXENGNTTAB = n
> +CONFIG_LWIP = n
> diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
> index 2a3ed2e..f72123b 100644
> --- a/arch/x86/testbuild/newxen-yes
> +++ b/arch/x86/testbuild/newxen-yes
> @@ -13,10 +13,11 @@ CONFIG_FBFRONT = y
>  CONFIG_KBDFRONT = y
>  CONFIG_CONSFRONT = y
>  CONFIG_XENBUS = y
> -# XC is special: it needs support from outside
> -CONFIG_XC = n
> -# LWIP is special: it needs support from outside
> -CONFIG_LWIP = n
>  CONFIG_BALLOON = y
>  CONFIG_USE_XEN_CONSOLE = y
>  XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
> +# The following are special: they need support from outside
> +CONFIG_LIBXENCTRL = n
> +CONFIG_LIBXENEVTCHN = n
> +CONFIG_LIBXENGNTTAB = n
> +CONFIG_LWIP = n
> diff --git a/lib/sys.c b/lib/sys.c
> index c6a7b9f..e8d5eb2 100644
> --- a/lib/sys.c
> +++ b/lib/sys.c
> @@ -437,13 +437,17 @@ int close(int fd)
>  	    return res;
>  	}
>  #endif
> -#ifdef CONFIG_XC
> +#ifdef CONFIG_LIBXENCTRL
>  	case FTYPE_XC:
>  	    minios_interface_close_fd(fd);
>  	    return 0;
> +#endif
> +#ifdef CONFIG_LIBXENEVTCHN
>  	case FTYPE_EVTCHN:
>  	    minios_evtchn_close_fd(fd);
>              return 0;
> +#endif
> +#ifdef CONFIG_LIBXENGNTTAB
>  	case FTYPE_GNTMAP:
>  	    minios_gnttab_close_fd(fd);
>  	    return 0;
> @@ -1373,7 +1377,7 @@ void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset
>  
>      if (fd == -1)
>          return map_zero(n, 1);
> -#ifdef CONFIG_XC
> +#ifdef CONFIG_LIBXENCTRL
>      else if (files[fd].type == FTYPE_XC) {
>          unsigned long zero = 0;
>          return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, NULL, 0);
> -- 
> 2.26.2
> 

-- 
Samuel
<y> update-menus: relocation error: update-menus: symbol _ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E, version GLIBCPP_3.2 not defined in file libstdc++.so.5 with link time reference
<y> quoi que ça peut bien vouloir dire ?
<D> N a eu la meme merde
<y> c ça que ça veut dire ? wow, c'est bien crypté :)
 -+- #ens-mim s'entraide -+-


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

end of thread, other threads:[~2021-10-05 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 14:19 [PATCH 0/2] mini-os: prepare mini-os stubdoms to use stable libs only Juergen Gross
2021-10-04 14:19 ` [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC Juergen Gross
2021-10-05 21:26   ` Samuel Thibault
2021-10-04 14:19 ` [PATCH 2/2] mini-os: add config options for xen libraries Juergen Gross
2021-10-05 21:26   ` Samuel Thibault

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.