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

ppc64le: Restrict maxmem to avoid HTAB allocation failure #363

@nitkon

Description

@nitkon

Description of problem

PowerPC guests need a data structure called HTAB (hash table) that stores the virtual to physical page mappings for the guest. HTAB for guest is allocated by the host in host contiguous memory area (CMA) which is a limited resource (by default 5% of host RAM is CMA region). All guests running in the host get their HTAB allocated from this CMA region. HTAB size depends on the maxmem size and specifying huge values of maxmem for guest could result in failures like below:

qemu-system-ppc64 … -m 4G,slots=32,maxmem=1T
qemu-system-ppc64: Failed to allocate HTAB of requested size, try with smaller maxmem
Aborted

In such cases lowering the maxmem is recommended.

Expected result

docker run -it --runtime kata-runtime busybox /bin/sh
/ # 

Actual result

docker run -it --runtime kata-runtime busybox /bin/sh
docker: Error response from daemon: OCI runtime create failed: Unexpected error in spapr_alloc_htab() at /build/qemu-ozKJoj/qemu-2.5+dfsg/hw/ppc/spapr.c:1030:
qemu-system-ppc64: Failed to allocate HTAB of requested size, try with smaller maxmem: unknown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions