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

agent: support memory hotplug via probe interface on aarch64 #443

Merged
merged 3 commits into from
Feb 1, 2019

Commits on Jan 29, 2019

  1. agent: add memory hotplug probe interface check in GetGuestDetails

    There are 2 phases in Memory Hotplug. 1) Physical Memory Hotplug phase.
    2) Logical Memory Hotplug phase.
    The First phase is to communicate hardware/firmware and make/erase
    environment for hotplugged memory.
    If firmware supports notification of connection of new memory to OS,
    this phase is triggered automatically. ACPI can notify this event.
    This also what kata supports on amd64, memory hotplug via acpi-driven.
    But if not, there is another option, probe operation by hand.
    And since memory hotplug via acpi is missing on qemu-system-aarch64,
    we hope to support the other probe solution.
    This whole implementation of memory hotplug via probe interface is
    divided into two phases, the first is to check if guest kernel
    is capable of memory hot-add via probe interface, which is located at
    /sys/devices/system/memory/probe.
    
    Fixes: kata-containers#442
    
    Signed-off-by: Penny Zheng <[email protected]>
    Pennyzct committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    6007523 View commit details
    Browse the repository at this point in the history
  2. agent: add interface memHotplugByProbe for memory hotplug

    There are 2 phases in Memory Hotplug. 1) Physical Memory Hotplug phase.
    2) Logical Memory Hotplug phase.
    The First phase is to communicate hardware/firmware and
    make/erase environment for hotplugged memory.
    If firmware supports notification of connection of new memory to OS,
    this phase is triggered automatically. ACPI can notify this event.
    This also what kata supports on amd64, memory hotplug via acpi-driven.
    But if not, there is another option, probe operation by hand.
    And since memory hotplug via acpi is missing on qemu-system-aarch64,
    we hope to support the other probe solution.
    This whole implementation of memory hotplug via probe interface is
    divided into two phases, the first is covered by former commit.
    The second is to notify guest kernel about hot-added momery event
    by echoing related addresses into /sys/devices/system/memory/probe.
    
    Fixes: kata-containers#442
    
    Signed-off-by: Penny Zheng <[email protected]>
    Pennyzct committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    96d7acb View commit details
    Browse the repository at this point in the history
  3. agent: refine unit test for func GetGuestDetails

    since we add extra functionality in func GetGuestDetails for memory
    hotplug via probe interface, we need to refine its related unit test.
    
    Fixes: kata-containers#442
    
    Signed-off-by: Penny Zheng <[email protected]>
    Pennyzct committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    0cb5f22 View commit details
    Browse the repository at this point in the history