runtime-spec icon indicating copy to clipboard operation
runtime-spec copied to clipboard

config: Add Hardware description object to the VM configuration

Open oleksiimoisieiev opened this issue 2 years ago • 12 comments

This adds section to describe HW that should be passed through to the VM. This enables Hardware-level isolation provided by XEN for e.g. functional safety use cases.

Adds hwConfig object to the VM section which is apt to describe the initial configuration for the VM, sush as number of vcpus and memory, provided to the VM. Hardware description includes path to the device-tree, that should be passed to the VM and the hardware configuration parameters which provides all needed data for VM to use the devices, such as:

  • dtdevs: host device tree nodes to passthrough to the VM;
  • iomems: allow auto-translated domains to access specific hardware I/O memory pages;
  • irqs: allows VM to access specific physical IRQs.

oleksiimoisieiev avatar Jun 05 '23 11:06 oleksiimoisieiev

@slp could this be useful for krun?

giuseppe avatar Jun 05 '23 14:06 giuseppe

@giuseppe I don't see an immediate use for it, but it's good to know it's there.

slp avatar Jun 05 '23 15:06 slp

Looks good, but we are freezing the main branch until releasing v1.1.0.

  • https://github.com/opencontainers/runtime-spec/issues/1052

Hope we can release v1.1.0 and merge post-v1.1 PRs in the next couple of weeks.

AkihiroSuda avatar Jun 06 '23 13:06 AkihiroSuda

@giuseppe I don't see an immediate use for it, but it's good to know it's there.

We plan to extend with RT scheduling / mem bw control for domains, do you have some interest or ideas in that?

klogg avatar Jun 06 '23 15:06 klogg

Hi @AkihiroSuda. Do you have any plans merging this changes?

oleksiimoisieiev avatar Jan 19 '24 11:01 oleksiimoisieiev

Yes, but after releasing this:

  • https://github.com/opencontainers/runtime-spec/pull/1242

We also want to see a POC of this PR to confirm implementability.

AkihiroSuda avatar Jan 19 '24 11:01 AkihiroSuda

Yes, but after releasing this:

* [Release v1.1.1 #1242](https://github.com/opencontainers/runtime-spec/pull/1242)

We also want to see a POC of this PR to confirm implementability.

Thank you for the quick response. What do you expect as POC? Some real yamls based on this bindings?

oleksiimoisieiev avatar Jan 19 '24 13:01 oleksiimoisieiev

A POC of an actual runtime implementation would be more preferable

AkihiroSuda avatar Jan 20 '24 02:01 AkihiroSuda

ping @opencontainers/runtime-spec-maintainers

AkihiroSuda avatar Feb 13 '24 14:02 AkihiroSuda

A POC of an actual runtime implementation would be more preferable

Hi @AkihiroSuda, Attaching sample JSON spec (see attached domain.json) and Xen config (see attached domain.txt) that can be generated from the provided spec. Using this config Xen domain can be started.

domain.json domain.txt

oleksiimoisieiev avatar Mar 01 '24 14:03 oleksiimoisieiev