Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime-rs: ch: Implement full resize memory API #8801

Open
jodh-intel opened this issue Jan 11, 2024 · 0 comments · May be fixed by #9564
Open

runtime-rs: ch: Implement full resize memory API #8801

jodh-intel opened this issue Jan 11, 2024 · 0 comments · May be fixed by #9564
Assignees
Labels
area/cloud-hypervisor Issues specific to the cloud hypervisor feature New functionality runtime-rs

Comments

@jodh-intel
Copy link
Contributor

jodh-intel commented Jan 11, 2024

#8784 implemented a minimal set of APIs to unbreak the CH runtime-rs driver. This issue is to provide the full version of async fn resize_memory(&self, new_mem_mb: u32) -> Result<(u32, MemoryConfig)> which will be similar to the golang cloudHypervisor.ResizeMemory() implementation:

https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/clh.go#L986..L1061

We will also need to add in full unit tests for this API.

Notes:

  • We will probably need to leverage / refactor MemoryConfig::try_from() in src/runtime-rs/crates/hypervisor/ch-config/src/convert.rs.
  • ACPI-based memory hotplug does not allow shrinking memory, while virtio-mem based supports it.
  • virtio-balloon is another way of allowing memory shrink at runtime.
  • TDX may require a different codepath.
@jodh-intel jodh-intel added feature New functionality needs-review Needs to be assessed by the team. area/cloud-hypervisor Issues specific to the cloud hypervisor runtime-rs labels Jan 11, 2024
jodh-intel added a commit to jodh-intel/kata-containers that referenced this issue Jan 11, 2024
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues kata-containers#8800, kata-containers#8801, and kata-containers#8802.

Fixes: kata-containers#8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/kata-containers that referenced this issue Jan 11, 2024
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues kata-containers#8800, kata-containers#8801, and kata-containers#8802.

Fixes: kata-containers#8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/kata-containers that referenced this issue Jan 11, 2024
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues kata-containers#8800, kata-containers#8801, and kata-containers#8802.

Fixes: kata-containers#8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
LindaYu17 pushed a commit to LindaYu17/kata-containers that referenced this issue Jan 17, 2024
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues kata-containers#8800, kata-containers#8801, and kata-containers#8802.

Fixes: kata-containers#8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
c3d pushed a commit to c3d/kata-containers that referenced this issue Feb 23, 2024
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues kata-containers#8800, kata-containers#8801, and kata-containers#8802.

Fixes: kata-containers#8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel removed the needs-review Needs to be assessed by the team. label Mar 20, 2024
cmaf added a commit to cmaf/kata-containers that referenced this issue Apr 26, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
@cmaf cmaf linked a pull request Apr 26, 2024 that will close this issue
@katacontainersbot katacontainersbot moved this from To do to In progress in Issue backlog Apr 26, 2024
cmaf added a commit to cmaf/kata-containers that referenced this issue Apr 26, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
cmaf added a commit to cmaf/kata-containers that referenced this issue Apr 26, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
cmaf added a commit to cmaf/kata-containers that referenced this issue Apr 29, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
cmaf added a commit to cmaf/kata-containers that referenced this issue May 14, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
cmaf added a commit to cmaf/kata-containers that referenced this issue May 14, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
cmaf added a commit to cmaf/kata-containers that referenced this issue May 14, 2024
Add resize_memory for Cloud Hypervisor and cloud_hypervisor_vm_resize
for the call to the VM. Write unit tests checking failure cases.

Fixes kata-containers#8801

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cloud-hypervisor Issues specific to the cloud hypervisor feature New functionality runtime-rs
Projects
Issue backlog
  
In progress
Development

Successfully merging a pull request may close this issue.

2 participants