Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@WeiZhang555
Copy link
Contributor

Export and Support starting VM with bios+cbfs from runv command line,
also use CBFS as first choice when kernel also exists.

Signed-off-by: Zhang Wei zhangwei555@huawei.com

@WeiZhang555
Copy link
Contributor Author

Sadly, I found that cbfs.rom made from latest cbfs file exceed 8MB which makes it impossible to start container, I've modified our own qemu to remove this restriction, and it works well since then.

qemu patches:

diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 579461f..1effda7 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -81,7 +81,11 @@ static void pc_isa_bios_init(MemoryRegion *rom_memory,
  * only 18MB-4KB below 4G. For now, restrict the cumulative mapping to 8MB in
  * size.
  */  
+#ifdef TARGET_X86_64UVM
+#define FLASH_MAP_BASE_MIN ((hwaddr)(0x100000000ULL - 16*1024*1024))
+#else
 #define FLASH_MAP_BASE_MIN ((hwaddr)(0x100000000ULL - 8*1024*1024))
+#endif
 
 /* This function maps flash drives from 4G downward, in order of their unit
  * numbers. The mapping starts at unit#0, with unit number increments of 1, and 

@WeiZhang555 WeiZhang555 force-pushed the add-cbfs-support branch 3 times, most recently from e3e3832 to 629c607 Compare March 20, 2017 02:42
@dvoytik
Copy link

dvoytik commented Mar 22, 2017

@WeiZhang555 see hyperhq/hyperstart#280 how to solve this problem without patching QEMU.

@WeiZhang555
Copy link
Contributor Author

@dvoytik So the solution is, exclude kernel modules to make cbfs file smaller than 8MB? Are we sure we dont need these kernel modules for making runv work correctly?

@gnawux
Copy link
Member

gnawux commented Mar 22, 2017

I think most of the modules are for netfilter or cgroup support. @WeiZhang555

@dvoytik
Copy link

dvoytik commented Mar 22, 2017 via email

@WeiZhang555
Copy link
Contributor Author

WeiZhang555 commented Mar 22, 2017

If so, I think hyperhq/hyperstart#280 should make sense, by the way, @dvoytik is my colleague from our Germany Team working on this too :) @gnawux

@WeiZhang555
Copy link
Contributor Author

Refactored, ping @laijs

@WeiZhang555
Copy link
Contributor Author

ping @laijs Rebased.

@laijs
Copy link
Contributor

laijs commented Jun 14, 2017

#514 was implemented for you...

@WeiZhang555
Copy link
Contributor Author

So are you suggesting me adding new flag "--cbfs" and "--kernel" directly for runv containerd? And as I can see, this new cbfs factory isn't needed any more.

@laijs
Copy link
Contributor

laijs commented Jun 14, 2017

Sure

@WeiZhang555
Copy link
Contributor Author

OK. I'll do a refactor~

Export and Support starting VM with bios+cbfs from runv command,
also use CBFS as first choice when kernel also exists.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
@WeiZhang555
Copy link
Contributor Author

@laijs Updated again~

@laijs laijs merged commit dac6bdc into hyperhq:master Jun 14, 2017
jimoosciuc pushed a commit to jimoosciuc/runv that referenced this pull request May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants