[PATCH] minios: Revert recent change and revert to working minios

Ian Jackson posted 1 patch 3 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200904160034.11456-1-iwj@xenproject.org
Maintainers: Ian Jackson <ian.jackson@eu.citrix.com>, Jan Beulich <jbeulich@suse.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Andrew Cooper <andrew.cooper3@citrix.com>, Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>, Stefano Stabellini <sstabellini@kernel.org>, George Dunlap <george.dunlap@citrix.com>
Config.mk              | 2 +-
stubdom/grub/mini-os.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
[PATCH] minios: Revert recent change and revert to working minios
Posted by Ian Jackson 3 years, 7 months ago
Currently, xen.git#staging does not build in many environments because
of issues with minios master.  This regression was introduced in an
uncontrolled manner by an update to mini-os.git#master.

This is because in e013e8514389 "config: use mini-os master for
unstable" we switched to tracking minios master in an uncontrolled
manner.  At the time we thought it was unlikely that minios changes
would break the Xen build.  This turns out to have been overly
optimistic.

Xen currently uses unstable internal interfaces of minios.  Until this
can be sorted out, internal changes to minios can require lockstep
changes in Xen.

All this means that "config: use mini-os master for unstable" was
wrong.  We should undo it.  Instead, we go back to the previous
situation: xen.git names a specific minios commit.

This scheme is the model used for qemu-xen-traditional.

That nailed commit must be updated manually, to have xen.git pick up
changes from minios.  If the minios changes require changes in xen.git
too, to avoid breaking the Xen build, they can be made freely in
minios without adverse consequences.  When the minios commitid is
updated in xen.git, the corresponding changes to the actual source
files in xen.git should be bundled together.

For example, when minios is fixed, 8d990807ec2c "stubdom/grub: update
init_netfront() call for mini-os" will need to be reapplied, folded
into the same commit as updates MINIOS_UPSTREAM_REVISION.  For now
that commit must be reverted as we are going back to a previous
version of minios.

This reverts commit 8d990807ec2cde3061222a5ed2df62aba78bace9.
This reverts commit e013e8514389b739153016349e49f5a78e34ddf0.

CC: Jan Beulich <jbeulich@suse.com>
CC: Costin Lupu <costin.lupu@cs.pub.ro>
CC: Wei Liu <wl@xen.org>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 Config.mk              | 2 +-
 stubdom/grub/mini-os.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index 8269503f73..db434ee2c6 100644
--- a/Config.mk
+++ b/Config.mk
@@ -246,7 +246,7 @@ MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
 OVMF_UPSTREAM_REVISION ?= a3741780fe3535e19e02efa869a7cac481891129
 QEMU_UPSTREAM_REVISION ?= master
-MINIOS_UPSTREAM_REVISION ?= master
+MINIOS_UPSTREAM_REVISION ?= 0b4b7897e08b967a09bed2028a79fabff82342dd
 
 SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 
diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index b33dbf02fb..4fc052a255 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -291,6 +291,8 @@ struct netfront_dev *net_dev;
 int
 minios_probe (struct nic *nic)
 {
+    char *ip;
+
     if (net_dev)
         return 1;
 
@@ -298,7 +300,7 @@ minios_probe (struct nic *nic)
     grub_memset ((char *) arptable, 0,
                  MAX_ARP * sizeof (struct arptable_t));
 
-    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, NULL, NULL, NULL);
+    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, &ip);
     if (!net_dev)
         return 0;
 
-- 
2.20.1


Re: [PATCH] minios: Revert recent change and revert to working minios
Posted by Jason Long 3 years, 7 months ago
Hello,Can anyone tell me about the goal and features of Mini-OS?

Sent from Yahoo Mail on Android 
 
  On Fri, Sep 4, 2020 at 8:31 PM, Ian Jackson<iwj@xenproject.org> wrote:   Currently, xen.git#staging does not build in many environments because
of issues with minios master.  This regression was introduced in an
uncontrolled manner by an update to mini-os.git#master.

This is because in e013e8514389 "config: use mini-os master for
unstable" we switched to tracking minios master in an uncontrolled
manner.  At the time we thought it was unlikely that minios changes
would break the Xen build.  This turns out to have been overly
optimistic.

Xen currently uses unstable internal interfaces of minios.  Until this
can be sorted out, internal changes to minios can require lockstep
changes in Xen.

All this means that "config: use mini-os master for unstable" was
wrong.  We should undo it.  Instead, we go back to the previous
situation: xen.git names a specific minios commit.

This scheme is the model used for qemu-xen-traditional.

That nailed commit must be updated manually, to have xen.git pick up
changes from minios.  If the minios changes require changes in xen.git
too, to avoid breaking the Xen build, they can be made freely in
minios without adverse consequences.  When the minios commitid is
updated in xen.git, the corresponding changes to the actual source
files in xen.git should be bundled together.

For example, when minios is fixed, 8d990807ec2c "stubdom/grub: update
init_netfront() call for mini-os" will need to be reapplied, folded
into the same commit as updates MINIOS_UPSTREAM_REVISION.  For now
that commit must be reverted as we are going back to a previous
version of minios.

This reverts commit 8d990807ec2cde3061222a5ed2df62aba78bace9.
This reverts commit e013e8514389b739153016349e49f5a78e34ddf0.

CC: Jan Beulich <jbeulich@suse.com>
CC: Costin Lupu <costin.lupu@cs.pub.ro>
CC: Wei Liu <wl@xen.org>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 Config.mk              | 2 +-
 stubdom/grub/mini-os.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Config.mk b/Config.mk
index 8269503f73..db434ee2c6 100644
--- a/Config.mk
+++ b/Config.mk
@@ -246,7 +246,7 @@ MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
 OVMF_UPSTREAM_REVISION ?= a3741780fe3535e19e02efa869a7cac481891129
 QEMU_UPSTREAM_REVISION ?= master
-MINIOS_UPSTREAM_REVISION ?= master
+MINIOS_UPSTREAM_REVISION ?= 0b4b7897e08b967a09bed2028a79fabff82342dd
 
 SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 
diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index b33dbf02fb..4fc052a255 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -291,6 +291,8 @@ struct netfront_dev *net_dev;
 int
 minios_probe (struct nic *nic)
 {
+    char *ip;
+
    if (net_dev)
        return 1;
 
@@ -298,7 +300,7 @@ minios_probe (struct nic *nic)
    grub_memset ((char *) arptable, 0,
                  MAX_ARP * sizeof (struct arptable_t));
 
-    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, NULL, NULL, NULL);
+    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, &ip);
    if (!net_dev)
        return 0;
 
-- 
2.20.1


  
Re: [PATCH] minios: Revert recent change and revert to working minios
Posted by Samuel Thibault 3 years, 7 months ago
Hello,

Jason Long, le ven. 04 sept. 2020 22:01:42 +0000, a ecrit:
> Can anyone tell me about the goal and features of Mini-OS?

https://wiki.xen.org/wiki/Mini-OS

Samuel

Re: [PATCH] minios: Revert recent change and revert to working minios
Posted by Jason Long 3 years, 7 months ago
What is the difference with Unikraft?

Sent from Yahoo Mail on Android 
 
  On Sat, Sep 5, 2020 at 10:43 PM, Samuel Thibault<samuel.thibault@ens-lyon.org> wrote:   Hello,

Jason Long, le ven. 04 sept. 2020 22:01:42 +0000, a ecrit:
> Can anyone tell me about the goal and features of Mini-OS?

https://wiki.xen.org/wiki/Mini-OS

Samuel

  
Re: [PATCH] minios: Revert recent change and revert to working minios
Posted by Samuel Thibault 3 years, 7 months ago
Jason Long, le sam. 05 sept. 2020 21:02:16 +0000, a ecrit:
> What is the difference with Unikraft?

Unikraft is originally based on MiniOS, and AIUI is actively being
worked on while MiniOS is mostly only maintained.

Samuel