All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mini-os: test and document config variations
@ 2016-09-02  8:56 Juergen Gross
  2016-09-02  8:56 ` [PATCH 1/3] mini-os: fix builds with uncommon config settings Juergen Gross
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Juergen Gross @ 2016-09-02  8:56 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2

Add a "testbuild" target to Makefile which builds various configurations.
Repair some minor issues uncovered by those test builds.
Document the config framework.

Juergen Gross (3):
  mini-os: fix builds with uncommon config settings
  mini-os: add testbuild target to Makefile
  mini-os: update README to reflect recent changes

 Makefile                      | 10 ++++++++++
 README                        | 31 +++++++++++++++++++++++++++++++
 arch/x86/arch.mk              |  2 ++
 arch/x86/testbuild/all-no     | 18 ++++++++++++++++++
 arch/x86/testbuild/all-yes    | 19 +++++++++++++++++++
 arch/x86/testbuild/balloon    |  2 ++
 arch/x86/testbuild/newxen     |  1 +
 arch/x86/testbuild/newxen-yes | 20 ++++++++++++++++++++
 arch/x86/testbuild/std        |  0
 include/x86/os.h              |  5 +++++
 include/xenbus.h              |  6 ++++--
 11 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100644 arch/x86/testbuild/all-no
 create mode 100644 arch/x86/testbuild/all-yes
 create mode 100644 arch/x86/testbuild/balloon
 create mode 100644 arch/x86/testbuild/newxen
 create mode 100644 arch/x86/testbuild/newxen-yes
 create mode 100644 arch/x86/testbuild/std

-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH 1/3] mini-os: fix builds with uncommon config settings
  2016-09-02  8:56 [PATCH 0/3] mini-os: test and document config variations Juergen Gross
@ 2016-09-02  8:56 ` Juergen Gross
  2016-09-03  0:38   ` Samuel Thibault
  2016-09-02  8:56 ` [PATCH 2/3] mini-os: add testbuild target to Makefile Juergen Gross
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Juergen Gross @ 2016-09-02  8:56 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2

Some config settings won't build standalone. Fix the following cases:

- all CONFIG_* set to "n"
- standard config with latest Xen interface version

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 include/x86/os.h | 5 +++++
 include/xenbus.h | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/x86/os.h b/include/x86/os.h
index 90ab6e6..0f5dd6c 100644
--- a/include/x86/os.h
+++ b/include/x86/os.h
@@ -514,6 +514,11 @@ static __inline__ unsigned long __ffs(unsigned long word)
 #endif /* ifdef __INSIDE_MINIOS */
 
 /********************* common i386 and x86_64  ****************************/
+#define xen_mb()  mb()
+#define xen_rmb() rmb()
+#define xen_wmb() wmb()
+#define xen_barrier() asm volatile ( "" : : : "memory")
+
 #define wrmsr(msr,val1,val2) \
       __asm__ __volatile__("wrmsr" \
                            : /* no outputs */ \
diff --git a/include/xenbus.h b/include/xenbus.h
index c254652..12391b9 100644
--- a/include/xenbus.h
+++ b/include/xenbus.h
@@ -7,10 +7,14 @@ typedef unsigned long xenbus_transaction_t;
 #define XBT_NIL ((xenbus_transaction_t)0)
 
 #ifdef CONFIG_XENBUS
+extern uint32_t xenbus_evtchn;
+
 /* Initialize the XenBus system. */
 void init_xenbus(void);
 void get_xenbus(void *p);
 #else
+#define xenbus_evtchn ~0
+
 static inline void init_xenbus(void)
 {
 }
@@ -33,8 +37,6 @@ struct xenbus_event {
 };
 typedef struct xenbus_event *xenbus_event_queue;
 
-extern uint32_t xenbus_evtchn;
-
 char *xenbus_watch_path_token(xenbus_transaction_t xbt, const char *path, const char *token, xenbus_event_queue *events);
 char *xenbus_unwatch_path_token(xenbus_transaction_t xbt, const char *path, const char *token);
 extern struct wait_queue_head xenbus_watch_queue;
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH 2/3] mini-os: add testbuild target to Makefile
  2016-09-02  8:56 [PATCH 0/3] mini-os: test and document config variations Juergen Gross
  2016-09-02  8:56 ` [PATCH 1/3] mini-os: fix builds with uncommon config settings Juergen Gross
@ 2016-09-02  8:56 ` Juergen Gross
  2016-09-03  0:41   ` Samuel Thibault
  2016-09-02  8:56 ` [PATCH 3/3] mini-os: update README to reflect recent changes Juergen Gross
  2016-09-05 11:17 ` [PATCH 0/3] mini-os: test and document config variations Wei Liu
  3 siblings, 1 reply; 9+ messages in thread
From: Juergen Gross @ 2016-09-02  8:56 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2

Add a "testbuild" target to the Makefile to test building a set of
pre-defined configurations.

Configurations tested are stored under arch/<arch>/testbuild in form
of configuration files. All configurations found there are built in
a local directory.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 Makefile                      | 10 ++++++++++
 arch/x86/arch.mk              |  2 ++
 arch/x86/testbuild/all-no     | 18 ++++++++++++++++++
 arch/x86/testbuild/all-yes    | 19 +++++++++++++++++++
 arch/x86/testbuild/balloon    |  2 ++
 arch/x86/testbuild/newxen     |  1 +
 arch/x86/testbuild/newxen-yes | 20 ++++++++++++++++++++
 arch/x86/testbuild/std        |  0
 8 files changed, 72 insertions(+)
 create mode 100644 arch/x86/testbuild/all-no
 create mode 100644 arch/x86/testbuild/all-yes
 create mode 100644 arch/x86/testbuild/balloon
 create mode 100644 arch/x86/testbuild/newxen
 create mode 100644 arch/x86/testbuild/newxen-yes
 create mode 100644 arch/x86/testbuild/std

diff --git a/Makefile b/Makefile
index 8e8e56e..81b936f 100644
--- a/Makefile
+++ b/Makefile
@@ -178,6 +178,16 @@ clean:	arch_clean
 	$(RM) $(OBJ_DIR)/lwip.a $(LWO)
 	rm -f tags TAGS
 
+.PHONY: testbuild
+TEST_CONFIGS := $(wildcard $(CURDIR)/$(TARGET_ARCH_DIR)/testbuild/*)
+testbuild:
+	for arch in $(MINIOS_TARGET_ARCHS); do \
+		for conf in $(TEST_CONFIGS); do \
+			$(MAKE) clean; \
+			MINIOS_TARGET_ARCH=$$arch MINIOS_CONFIG=$$conf $(MAKE) || exit 1; \
+		done; \
+	done
+	$(MAKE) clean
 
 define all_sources
      ( find . -name '*.[chS]' -print )
diff --git a/arch/x86/arch.mk b/arch/x86/arch.mk
index 673a19d..c87885f 100644
--- a/arch/x86/arch.mk
+++ b/arch/x86/arch.mk
@@ -3,6 +3,8 @@
 # (including x86_32, x86_32y and x86_64).
 #
 
+MINIOS_TARGET_ARCHS := x86_32 x86_64
+
 ifeq ($(MINIOS_TARGET_ARCH),x86_32)
 ARCH_CFLAGS  := -m32 -march=i686
 ARCH_LDFLAGS := -m elf_i386
diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no
new file mode 100644
index 0000000..78720c3
--- /dev/null
+++ b/arch/x86/testbuild/all-no
@@ -0,0 +1,18 @@
+CONFIG_PARAVIRT = n
+CONFIG_START_NETWORK = n
+CONFIG_SPARSE_BSS = n
+CONFIG_QEMU_XS_ARGS = n
+CONFIG_TEST = n
+CONFIG_PCIFRONT = n
+CONFIG_BLKFRONT = n
+CONFIG_TPMFRONT = n
+CONFIG_TPM_TIS = n
+CONFIG_TPMBACK = n
+CONFIG_NETFRONT = n
+CONFIG_FBFRONT = n
+CONFIG_KBDFRONT = n
+CONFIG_CONSFRONT = n
+CONFIG_XENBUS = n
+CONFIG_XC = n
+CONFIG_LWIP = n
+CONFIG_BALLOON = n
diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
new file mode 100644
index 0000000..303c56b
--- /dev/null
+++ b/arch/x86/testbuild/all-yes
@@ -0,0 +1,19 @@
+CONFIG_PARAVIRT = y
+CONFIG_START_NETWORK = y
+CONFIG_SPARSE_BSS = y
+CONFIG_QEMU_XS_ARGS = y
+CONFIG_TEST = y
+CONFIG_PCIFRONT = y
+CONFIG_BLKFRONT = y
+CONFIG_TPMFRONT = y
+CONFIG_TPM_TIS = y
+CONFIG_TPMBACK = y
+CONFIG_NETFRONT = y
+CONFIG_FBFRONT = y
+CONFIG_KBDFRONT = y
+CONFIG_CONSFRONT = y
+CONFIG_XENBUS = y
+CONFIG_XC = y
+# LWIP is special: it needs support from outside
+CONFIG_LWIP = n
+CONFIG_BALLOON = y
diff --git a/arch/x86/testbuild/balloon b/arch/x86/testbuild/balloon
new file mode 100644
index 0000000..6fa5eef
--- /dev/null
+++ b/arch/x86/testbuild/balloon
@@ -0,0 +1,2 @@
+CONFIG_PARAVIRT = n
+CONFIG_BALLOON = y
diff --git a/arch/x86/testbuild/newxen b/arch/x86/testbuild/newxen
new file mode 100644
index 0000000..b412924
--- /dev/null
+++ b/arch/x86/testbuild/newxen
@@ -0,0 +1 @@
+XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
new file mode 100644
index 0000000..907a8a0
--- /dev/null
+++ b/arch/x86/testbuild/newxen-yes
@@ -0,0 +1,20 @@
+CONFIG_PARAVIRT = y
+CONFIG_START_NETWORK = y
+CONFIG_SPARSE_BSS = y
+CONFIG_QEMU_XS_ARGS = y
+CONFIG_TEST = y
+CONFIG_PCIFRONT = y
+CONFIG_BLKFRONT = y
+CONFIG_TPMFRONT = y
+CONFIG_TPM_TIS = y
+CONFIG_TPMBACK = y
+CONFIG_NETFRONT = y
+CONFIG_FBFRONT = y
+CONFIG_KBDFRONT = y
+CONFIG_CONSFRONT = y
+CONFIG_XENBUS = y
+CONFIG_XC = y
+# LWIP is special: it needs support from outside
+CONFIG_LWIP = n
+CONFIG_BALLOON = y
+XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
diff --git a/arch/x86/testbuild/std b/arch/x86/testbuild/std
new file mode 100644
index 0000000..e69de29
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH 3/3] mini-os: update README to reflect recent changes
  2016-09-02  8:56 [PATCH 0/3] mini-os: test and document config variations Juergen Gross
  2016-09-02  8:56 ` [PATCH 1/3] mini-os: fix builds with uncommon config settings Juergen Gross
  2016-09-02  8:56 ` [PATCH 2/3] mini-os: add testbuild target to Makefile Juergen Gross
@ 2016-09-02  8:56 ` Juergen Gross
  2016-09-03  0:43   ` Samuel Thibault
  2016-09-05 11:17 ` [PATCH 0/3] mini-os: test and document config variations Wei Liu
  3 siblings, 1 reply; 9+ messages in thread
From: Juergen Gross @ 2016-09-02  8:56 UTC (permalink / raw)
  To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2

Add some notes to README regarding configuration of Mini-OS via config
files.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 README | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/README b/README
index 7e9c07a..abd8440 100644
--- a/README
+++ b/README
@@ -19,6 +19,37 @@ This includes:
 
 - to build it just type make.
 
+- Mini-OS can be configured in various ways by specifying a config file:
+
+  MINIOS_CONFIG=config-file make
+
+  config-file can contain various CONFIG_* items set to either "y" or "n".
+  Their defaults can be found in Config.mk.
+  It is possible to specify the interface version of Xen via setting
+
+  XEN_INTERFACE_VERSION=<version>
+
+  in the config file. This defaults to 0x00030205, which is the minimal
+  version supported. The latest available version is specified by setting
+
+  XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
+
+- By typing
+
+  make testbuild
+
+  it is possible to test builds of various configurations. This should be
+  done always after modifying Mini-OS.
+
+  The configurations which are build tested can be found in the directory
+  arch/*/testbuild with one file per configuration. Those configurations are
+  being built for each sub-architecture (e.g. x86_32 and x86_64 for the
+  x86 architecture).
+
+  Please update the current configuration files when adding a new CONFIG_
+  item and maybe even add a new configuration file if the new item interacts
+  with other CONFIG_ items.
+
 - to build it with TCP/IP support, download LWIP 1.3.2 source code and type
 
   make LWIPDIR=/path/to/lwip/source
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH 1/3] mini-os: fix builds with uncommon config settings
  2016-09-02  8:56 ` [PATCH 1/3] mini-os: fix builds with uncommon config settings Juergen Gross
@ 2016-09-03  0:38   ` Samuel Thibault
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2016-09-03  0:38 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2

Juergen Gross, on Fri 02 Sep 2016 10:56:45 +0200, wrote:
> Some config settings won't build standalone. Fix the following cases:
> 
> - all CONFIG_* set to "n"
> - standard config with latest Xen interface version
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

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

> ---
>  include/x86/os.h | 5 +++++
>  include/xenbus.h | 6 ++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/include/x86/os.h b/include/x86/os.h
> index 90ab6e6..0f5dd6c 100644
> --- a/include/x86/os.h
> +++ b/include/x86/os.h
> @@ -514,6 +514,11 @@ static __inline__ unsigned long __ffs(unsigned long word)
>  #endif /* ifdef __INSIDE_MINIOS */
>  
>  /********************* common i386 and x86_64  ****************************/
> +#define xen_mb()  mb()
> +#define xen_rmb() rmb()
> +#define xen_wmb() wmb()
> +#define xen_barrier() asm volatile ( "" : : : "memory")
> +
>  #define wrmsr(msr,val1,val2) \
>        __asm__ __volatile__("wrmsr" \
>                             : /* no outputs */ \
> diff --git a/include/xenbus.h b/include/xenbus.h
> index c254652..12391b9 100644
> --- a/include/xenbus.h
> +++ b/include/xenbus.h
> @@ -7,10 +7,14 @@ typedef unsigned long xenbus_transaction_t;
>  #define XBT_NIL ((xenbus_transaction_t)0)
>  
>  #ifdef CONFIG_XENBUS
> +extern uint32_t xenbus_evtchn;
> +
>  /* Initialize the XenBus system. */
>  void init_xenbus(void);
>  void get_xenbus(void *p);
>  #else
> +#define xenbus_evtchn ~0
> +
>  static inline void init_xenbus(void)
>  {
>  }
> @@ -33,8 +37,6 @@ struct xenbus_event {
>  };
>  typedef struct xenbus_event *xenbus_event_queue;
>  
> -extern uint32_t xenbus_evtchn;
> -
>  char *xenbus_watch_path_token(xenbus_transaction_t xbt, const char *path, const char *token, xenbus_event_queue *events);
>  char *xenbus_unwatch_path_token(xenbus_transaction_t xbt, const char *path, const char *token);
>  extern struct wait_queue_head xenbus_watch_queue;
> -- 
> 2.6.6
> 

-- 
Samuel
(03:13:14) <j> bon
(03:13:19) <j> il est tard :p
(03:13:25) <g> c'est l'heure de manger
(03:13:38) <j> hm j'ai mangé à 1h moi, j'ai des horaires raisonnables

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH 2/3] mini-os: add testbuild target to Makefile
  2016-09-02  8:56 ` [PATCH 2/3] mini-os: add testbuild target to Makefile Juergen Gross
@ 2016-09-03  0:41   ` Samuel Thibault
  2016-09-05  6:12     ` Juergen Gross
  0 siblings, 1 reply; 9+ messages in thread
From: Samuel Thibault @ 2016-09-03  0:41 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2

Juergen Gross, on Fri 02 Sep 2016 10:56:46 +0200, wrote:
> Add a "testbuild" target to the Makefile to test building a set of
> pre-defined configurations.
> 
> Configurations tested are stored under arch/<arch>/testbuild in form
> of configuration files. All configurations found there are built in
> a local directory.

Please also document just above the CONFIG_* lines in Config.mk that new
CONFIG options should be set in all-* testbuilds.

> Signed-off-by: Juergen Gross <jgross@suse.com>

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

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH 3/3] mini-os: update README to reflect recent changes
  2016-09-02  8:56 ` [PATCH 3/3] mini-os: update README to reflect recent changes Juergen Gross
@ 2016-09-03  0:43   ` Samuel Thibault
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2016-09-03  0:43 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2

Juergen Gross, on Fri 02 Sep 2016 10:56:47 +0200, wrote:
> Add some notes to README regarding configuration of Mini-OS via config
> files.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

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

> +  Please update the current configuration files when adding a new CONFIG_
> +  item and maybe even add a new configuration file if the new item interacts
> +  with other CONFIG_ items.

This is useful for documentation here, but a reminder in Config.mk is
probably a very welcome thing :)

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH 2/3] mini-os: add testbuild target to Makefile
  2016-09-03  0:41   ` Samuel Thibault
@ 2016-09-05  6:12     ` Juergen Gross
  0 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2016-09-05  6:12 UTC (permalink / raw)
  To: Samuel Thibault, minios-devel, xen-devel, wei.liu2

On 03/09/16 02:41, Samuel Thibault wrote:
> Juergen Gross, on Fri 02 Sep 2016 10:56:46 +0200, wrote:
>> Add a "testbuild" target to the Makefile to test building a set of
>> pre-defined configurations.
>>
>> Configurations tested are stored under arch/<arch>/testbuild in form
>> of configuration files. All configurations found there are built in
>> a local directory.
> 
> Please also document just above the CONFIG_* lines in Config.mk that new
> CONFIG options should be set in all-* testbuilds.

Okay, will do.

> 
>> Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks,

Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH 0/3] mini-os: test and document config variations
  2016-09-02  8:56 [PATCH 0/3] mini-os: test and document config variations Juergen Gross
                   ` (2 preceding siblings ...)
  2016-09-02  8:56 ` [PATCH 3/3] mini-os: update README to reflect recent changes Juergen Gross
@ 2016-09-05 11:17 ` Wei Liu
  3 siblings, 0 replies; 9+ messages in thread
From: Wei Liu @ 2016-09-05 11:17 UTC (permalink / raw)
  To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2, samuel.thibault

On Fri, Sep 02, 2016 at 10:56:44AM +0200, Juergen Gross wrote:
> Add a "testbuild" target to Makefile which builds various configurations.
> Repair some minor issues uncovered by those test builds.
> Document the config framework.
> 
> Juergen Gross (3):
>   mini-os: fix builds with uncommon config settings
>   mini-os: add testbuild target to Makefile
>   mini-os: update README to reflect recent changes
> 

Series pushed. Thank you both.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-09-05 11:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02  8:56 [PATCH 0/3] mini-os: test and document config variations Juergen Gross
2016-09-02  8:56 ` [PATCH 1/3] mini-os: fix builds with uncommon config settings Juergen Gross
2016-09-03  0:38   ` Samuel Thibault
2016-09-02  8:56 ` [PATCH 2/3] mini-os: add testbuild target to Makefile Juergen Gross
2016-09-03  0:41   ` Samuel Thibault
2016-09-05  6:12     ` Juergen Gross
2016-09-02  8:56 ` [PATCH 3/3] mini-os: update README to reflect recent changes Juergen Gross
2016-09-03  0:43   ` Samuel Thibault
2016-09-05 11:17 ` [PATCH 0/3] mini-os: test and document config variations Wei Liu

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.