[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 0/5] plat/kvm: x86: Add support for initramdisks



Hi Simon,

Thanks for the patch, two comments:

* Running this with an empty initrd file (e.g., touch file.txt) results in the 
following crash:

[...]
[    0.000000] Info: [libukboot] boot.c @ 192  : Initialize memory allocator...
[    0.000000] Info: [libukallocbbuddy] bbuddy.c @ 470  : Initialize binary 
buddy allocator 122000
[    0.000000] ERR:  [libukallocbbuddy] bbuddy.c @ 362  : 122000: Failed to add 
memory region 124000-123000: Invalid range after applying page alignments
[    0.000000] Info: [libukboot] boot.c @ 246  : Initialize IRQ subsystem...
[    0.000000] Info: [libukboot] boot.c @ 253  : Initialize platform time...
[    0.000000] Warn: [libukallocbbuddy] bbuddy.c @ 278  : 122000: Cannot handle 
palloc request of order 0: Out of memory
[    0.000000] CRIT: [libkvmplat] time.c @ 78   : Failed to register timer 
interrupt handler
[    0.000000] Info: [libkvmplat] shutdown.c @ 35   : Unikraft halted

* I was wondering whether it wouldn't make sense to provide a cleaner "API" to 
these patches, something like a get_initrd function that would loop through the 
different memory region types and retrieve the initrd, should there be one. 
Otherwise we'll end up writing (and re-writing) this type of code in multiple 
libraries and applications. Perhaps this would be a separate patch?

Thanks,

-- Felipe

============================================================
Dr. Felipe Huici
Chief Researcher, Systems and Machine Learning Group
NEC Laboratories Europe GmbH
Kurfuerstenanlage 36, D-69115 Heidelberg
Tel.  +49
(0)6221 4342-241
Fax:  +49
(0)6221 4342-155
 
e-mail:
felipe.huici@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

On 10.04.19, 18:26, "Simon Kuenzer" <simon.kuenzer@xxxxxxxxx> wrote:

    Introduces support to locate a loaded initramdisk. For this purpose, we
    introduce required platform API definitons. The idea is that an Unikraft
    application finds an initramdisk by querying the memory regions. This is
    similar to the detection of memory regions that can be used for the heap.
    This series inplements initrd support for KVM on x86. 
    Additionally, this series is reorganizing KVMs way to store detected
    platform configuration during boot: Instead of having individual
    platform-global variables (e.g., _libkvmplat_heap_start,
    _libkvmplat_stack_top, _libkvmplat_mem_end), we introduce a single
    platform-global configuration struct. This is done for readability
    reasons.
    
    Simon Kuenzer (5):
      include/essentials: Introduce range test macros
      include/plat: Add flags for initramdisk memory regions
      plat/kvm: Introduce platform configuration struct
      plat/kvm: Add initrd fields to configuration struct
      plat/kvm: x86: Retrieve initrd location from Multiboot
    
     include/uk/essentials.h       |  20 ++++
     include/uk/plat/memory.h      |  14 ++-
     plat/common/arm/pl011.c       |  15 +--
     plat/common/arm/time.c        |  13 ++-
     plat/kvm/arm/setup.c          |  67 +++++++++-----
     plat/kvm/include/kvm/config.h |  66 +++++++++++++
     plat/kvm/memory.c             |  49 +++++++---
     plat/kvm/x86/setup.c          | 169 +++++++++++++++++++++++++++++++---
     8 files changed, 346 insertions(+), 67 deletions(-)
     create mode 100644 plat/kvm/include/kvm/config.h
    
    -- 
    2.21.0
    
    

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.