Skip to content

Commit 7de08bc

Browse files
committed
kata.runtime: 3.26.0 -> 3.27.0
1 parent a180c5a commit 7de08bc

File tree

42 files changed

+296
-671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+296
-671
lines changed

nodeinstaller/internal/kataconfig/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ func KataRuntimeConfig(
5454
return nil, fmt.Errorf("failed to unmarshal kata runtime configuration: %w", err)
5555
}
5656
config.Hypervisor["qemu"]["firmware"] = filepath.Join(baseDir, "tdx", "share", "OVMF.fd")
57+
// With these params set, containers do not boot, even when kernel_verity_params
58+
// is added to the enabled annotations below.
59+
// TODO(charludo): can we implement this? https://github.com/kata-containers/kata-containers/pull/12396
60+
config.Hypervisor["qemu"]["kernel_verity_params"] = ""
5761
case platforms.IsSNP(platform):
5862
if err := toml.Unmarshal([]byte(kataBareMetalQEMUSNPBaseConfig), &config); err != nil {
5963
return nil, fmt.Errorf("failed to unmarshal kata runtime configuration: %w", err)

nodeinstaller/internal/kataconfig/configuration-qemu-snp.toml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
[hypervisor.qemu]
1616
path = "/opt/kata/bin/qemu-system-x86_64"
17-
kernel = "/opt/kata/share/kata-containers/vmlinuz-confidential.container"
17+
kernel = "/opt/kata/share/kata-containers/vmlinuz.container"
1818
initrd = "/opt/kata/share/kata-containers/kata-containers-initrd-confidential.img"
1919
machine_type = "q35"
2020

@@ -33,7 +33,7 @@ rootfs_type = "ext4"
3333
#
3434
# Known limitations:
3535
# * Does not work by design:
36-
# - CPU Hotplug
36+
# - CPU Hotplug
3737
# - Memory Hotplug
3838
# - NVDIMM devices
3939
#
@@ -51,7 +51,7 @@ rootless = false
5151
# List of valid annotation names for the hypervisor
5252
# Each member of the list is a regular expression, which is the base name
5353
# of the annotation, e.g. "path" for io.katacontainers.config.hypervisor.path"
54-
enable_annotations = ["enable_iommu", "virtio_fs_extra_args", "kernel_params", "default_vcpus", "default_memory", "cc_init_data"]
54+
enable_annotations = ["enable_iommu", "virtio_fs_extra_args", "kernel_params", "kernel_verity_params", "default_vcpus", "default_memory", "cc_init_data"]
5555

5656
# List of valid annotations values for the hypervisor
5757
# Each member of the list is a path pattern as described by glob(3).
@@ -74,7 +74,7 @@ snp_id_auth = ""
7474

7575
# SNP Guest Policy, the ‘POLICY’ parameter to the SNP_LAUNCH_START command.
7676
# If unset, the QEMU default policy (0x30000) will be used.
77-
# Notice that the guest policy is enforced at VM launch, and your pod VMs
77+
# Notice that the guest policy is enforced at VM launch, and your pod VMs
7878
# won't start at all if the policy denys it. This will be indicated by a
7979
# 'SNP_LAUNCH_START' error.
8080
snp_guest_policy = 196608
@@ -339,6 +339,21 @@ enable_iommu = false
339339
# Enabling this will result in the VM device having iommu_platform=on set
340340
enable_iommu_platform = false
341341

342+
# Enable NUMA topology, default false
343+
# When enable_numa is enabled, the hypervisor will expose host NUMA topology
344+
# as is: map VM NUMA nodes to host 1:1 and bind vCPUs to related CPUs.
345+
# Note: To take proper advantage of NUMA, static_sandbox_resource_mgmt should
346+
# also be enabled for memory pre-allocation.
347+
enable_numa = false
348+
349+
# NUMA node mapping allows customizing how VM NUMA nodes map to host NUMA nodes.
350+
# Each entry defines a VM NUMA node and the host NUMA node(s) it maps to.
351+
# Format: ["<host_nodes>", "<host_nodes>", ...]
352+
# Example: ["0", "1"] creates 2 VM NUMA nodes, mapping to host nodes 0 and 1
353+
# Example: ["0-1", "2-3"] creates 2 VM NUMA nodes, first maps to host 0-1, second to 2-3
354+
# If empty and enable_numa is true, VM NUMA nodes map 1:1 to host NUMA nodes.
355+
numa_mapping = []
356+
342357
# List of valid annotations values for the vhost user store path
343358
# The default if not set is empty (all annotations rejected.)
344359
# Your distribution recommends: ["/var/run/kata-containers/vhost-user"]
@@ -384,7 +399,7 @@ msize_9p = 8192
384399
# Otherwise virtio-block device is used.
385400
#
386401
# nvdimm is not supported when `confidential_guest = true`.
387-
disable_image_nvdimm = false
402+
disable_image_nvdimm = true
388403

389404
# Before hot plugging a PCIe device, you need to add a pcie_root_port device.
390405
# Use this parameter when using some large PCI bar devices, such as Nvidia GPU
@@ -702,9 +717,9 @@ enable_pprof = false
702717

703718
# Indicates the CreateContainer request timeout needed for the workload(s)
704719
# It using guest_pull this includes the time to pull the image inside the guest
705-
# Defaults to 60 second(s)
706-
# Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config
707-
# (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout.
720+
# Defaults to 60 second(s)
721+
# Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config
722+
# (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout.
708723
# In essence, the timeout used for guest pull=runtime-request-timeout<create_container_timeout?runtime-request-timeout:create_container_timeout.
709724
create_container_timeout = 60
710725

nodeinstaller/internal/kataconfig/configuration-qemu-tdx.toml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# XXX: Type: kata
1313

1414
[hypervisor.qemu]
15-
path = "PLACEHOLDER_FOR_DISTRO_QEMU_WITH_TDX_SUPPORT"
16-
kernel = "/opt/kata/share/kata-containers/vmlinuz-confidential.container"
15+
path = "/opt/kata/bin/qemu-system-x86_64"
16+
kernel = "/opt/kata/share/kata-containers/vmlinuz.container"
1717
image = "/opt/kata/share/kata-containers/kata-containers-confidential.img"
1818
machine_type = "q35"
1919
tdx_quote_generation_service_socket_port = 4050
@@ -33,7 +33,7 @@ rootfs_type = "ext4"
3333
#
3434
# Known limitations:
3535
# * Does not work by design:
36-
# - CPU Hotplug
36+
# - CPU Hotplug
3737
# - Memory Hotplug
3838
# - NVDIMM devices
3939
#
@@ -48,13 +48,13 @@ rootless = false
4848
# List of valid annotation names for the hypervisor
4949
# Each member of the list is a regular expression, which is the base name
5050
# of the annotation, e.g. "path" for io.katacontainers.config.hypervisor.path"
51-
enable_annotations = ["enable_iommu", "virtio_fs_extra_args", "kernel_params", "default_vcpus", "default_memory", "cc_init_data"]
51+
enable_annotations = ["enable_iommu", "virtio_fs_extra_args", "kernel_params", "kernel_verity_params", "default_vcpus", "default_memory", "cc_init_data"]
5252

5353
# List of valid annotations values for the hypervisor
5454
# Each member of the list is a path pattern as described by glob(3).
5555
# The default if not set is empty (all annotations rejected.)
5656
# Your distribution recommends: ["/opt/kata/bin/qemu-system-x86_64"]
57-
valid_hypervisor_paths = ["PLACEHOLDER_FOR_DISTRO_QEMU_WITH_TDX_SUPPORT"]
57+
valid_hypervisor_paths = ["/opt/kata/bin/qemu-system-x86_64"]
5858

5959
# Optional space-separated list of options to pass to the guest kernel.
6060
# For example, use `kernel_params = "vsyscall=emulate"` if you are having
@@ -66,7 +66,12 @@ valid_hypervisor_paths = ["PLACEHOLDER_FOR_DISTRO_QEMU_WITH_TDX_SUPPORT"]
6666
# may stop the virtual machine from booting.
6767
# To see the list of default parameters, enable hypervisor debug, create a
6868
# container and look for 'default-kernel-parameters' log entries.
69-
kernel_params = "cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1 rootfs_verity.scheme=dm-verity rootfs_verity.hash=d6a09623515a4f169f354ffcde82d79e96cf84b9ce5a6fc2eb18bda7fc864685"
69+
kernel_params = "cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1"
70+
71+
# Optional dm-verity parameters (comma-separated key=value list):
72+
# root_hash=...,salt=...,data_blocks=...,data_block_size=...,hash_block_size=...
73+
# These are used by the runtime to assemble dm-verity kernel params.
74+
kernel_verity_params = "root_hash=1a58cb83f8e721a7a5174b9817ae502975e0e55ae81b92ff34e61223786c2300,salt=8c15fdda00c8290e45c21aef74f1143a9c7bdfb1b98fdd3900f7f700cef3f0ee,data_blocks=64000,data_block_size=4096,hash_block_size=4096"
7075

7176
# Path to the firmware.
7277
# If you want that qemu uses the default firmware leave this option empty
@@ -316,6 +321,21 @@ enable_iommu = false
316321
# Enabling this will result in the VM device having iommu_platform=on set
317322
enable_iommu_platform = false
318323

324+
# Enable NUMA topology, default false
325+
# When enable_numa is enabled, the hypervisor will expose host NUMA topology
326+
# as is: map VM NUMA nodes to host 1:1 and bind vCPUs to related CPUs.
327+
# Note: To take proper advantage of NUMA, static_sandbox_resource_mgmt should
328+
# also be enabled for memory pre-allocation.
329+
enable_numa = false
330+
331+
# NUMA node mapping allows customizing how VM NUMA nodes map to host NUMA nodes.
332+
# Each entry defines a VM NUMA node and the host NUMA node(s) it maps to.
333+
# Format: ["<host_nodes>", "<host_nodes>", ...]
334+
# Example: ["0", "1"] creates 2 VM NUMA nodes, mapping to host nodes 0 and 1
335+
# Example: ["0-1", "2-3"] creates 2 VM NUMA nodes, first maps to host 0-1, second to 2-3
336+
# If empty and enable_numa is true, VM NUMA nodes map 1:1 to host NUMA nodes.
337+
numa_mapping = []
338+
319339
# List of valid annotations values for the vhost user store path
320340
# The default if not set is empty (all annotations rejected.)
321341
# Your distribution recommends: ["/var/run/kata-containers/vhost-user"]
@@ -361,7 +381,7 @@ msize_9p = 8192
361381
# Otherwise virtio-block device is used.
362382
#
363383
# nvdimm is not supported when `confidential_guest = true`.
364-
disable_image_nvdimm = false
384+
disable_image_nvdimm = true
365385

366386
# Before hot plugging a PCIe device, you need to add a pcie_root_port device.
367387
# Use this parameter when using some large PCI bar devices, such as Nvidia GPU
@@ -679,9 +699,9 @@ enable_pprof = false
679699

680700
# Indicates the CreateContainer request timeout needed for the workload(s)
681701
# It using guest_pull this includes the time to pull the image inside the guest
682-
# Defaults to 60 second(s)
683-
# Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config
684-
# (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout.
702+
# Defaults to 60 second(s)
703+
# Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config
704+
# (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout.
685705
# In essence, the timeout used for guest pull=runtime-request-timeout<create_container_timeout?runtime-request-timeout:create_container_timeout.
686706
create_container_timeout = 60
687707

nodeinstaller/internal/kataconfig/testdata/expected-configuration-qemu-snp-gpu.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enable_iommu = false
2828
enable_iommu_platform = false
2929
enable_iothreads = false
3030
enable_mem_prealloc = false
31+
enable_numa = false
3132
enable_vhost_user_store = false
3233
enable_virtio_mem = false
3334
entropy_source = '/dev/urandom'
@@ -47,6 +48,7 @@ machine_type = 'q35'
4748
memory_offset = 0
4849
memory_slots = 10
4950
msize_9p = 8192
51+
numa_mapping = []
5052
path = '/bin/qemu-system-x86_64'
5153
pcie_root_port = 0
5254
pflashes = []

nodeinstaller/internal/kataconfig/testdata/expected-configuration-qemu-snp.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enable_iommu = false
2727
enable_iommu_platform = false
2828
enable_iothreads = false
2929
enable_mem_prealloc = false
30+
enable_numa = false
3031
enable_vhost_user_store = false
3132
enable_virtio_mem = false
3233
entropy_source = '/dev/urandom'
@@ -46,6 +47,7 @@ machine_type = 'q35'
4647
memory_offset = 0
4748
memory_slots = 10
4849
msize_9p = 8192
50+
numa_mapping = []
4951
path = '/bin/qemu-system-x86_64'
5052
pcie_root_port = 0
5153
pflashes = []

nodeinstaller/internal/kataconfig/testdata/expected-configuration-qemu-tdx-gpu.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enable_iommu = false
2828
enable_iommu_platform = false
2929
enable_iothreads = false
3030
enable_mem_prealloc = false
31+
enable_numa = false
3132
enable_vhost_user_store = false
3233
enable_virtio_mem = false
3334
entropy_source = '/dev/urandom'
@@ -42,11 +43,13 @@ indep_iothreads = 0
4243
initrd = '/share/kata-initrd.zst'
4344
kernel = '/share/kata-kernel'
4445
kernel_params = ''
46+
kernel_verity_params = ''
4547
machine_accelerators = ''
4648
machine_type = 'q35'
4749
memory_offset = 0
4850
memory_slots = 10
4951
msize_9p = 8192
52+
numa_mapping = []
5053
path = '/bin/qemu-system-x86_64'
5154
pcie_root_port = 0
5255
pflashes = []

nodeinstaller/internal/kataconfig/testdata/expected-configuration-qemu-tdx.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enable_iommu = false
2727
enable_iommu_platform = false
2828
enable_iothreads = false
2929
enable_mem_prealloc = false
30+
enable_numa = false
3031
enable_vhost_user_store = false
3132
enable_virtio_mem = false
3233
entropy_source = '/dev/urandom'
@@ -41,11 +42,13 @@ indep_iothreads = 0
4142
initrd = '/share/kata-initrd.zst'
4243
kernel = '/share/kata-kernel'
4344
kernel_params = ''
45+
kernel_verity_params = ''
4446
machine_accelerators = ''
4547
machine_type = 'q35'
4648
memory_offset = 0
4749
memory_slots = 10
4850
msize_9p = 8192
51+
numa_mapping = []
4952
path = '/bin/qemu-system-x86_64'
5053
pcie_root_port = 0
5154
pflashes = []

packages/by-name/kata/genpolicy/genpolicy_settings_dev.patch

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
diff --git a/genpolicy-settings.json b/genpolicy-settings.json
2-
index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..ac98ea9d3194bbca9cdc8c6fb4bf92a8f8472d97 100644
2+
index e7800bd10ba1eae91bdf61b4c1bab2af46bc4a05..185315d87306416b017cc35644c6b2b967604912 100644
33
--- a/genpolicy-settings.json
44
+++ b/genpolicy-settings.json
5-
@@ -296,7 +296,7 @@
5+
@@ -193,7 +193,9 @@
6+
"gpu_anno_value_regex": "^nvidia\\.com/gpu=[0-9]+$",
7+
"gpu_gk_device_type": "vfio-pci-gk",
8+
"pgpu_resource_keys": [
9+
- "nvidia.com/pgpu"
10+
+ "nvidia.com/pgpu",
11+
+ "nvidia.com/GB100_B200",
12+
+ "nvidia.com/GH100_H100_PCIE"
13+
]
14+
}
15+
}
16+
@@ -301,7 +303,7 @@
617
"enable_configmap_secret_storages": false
718
},
819
"cluster_config": {
@@ -11,7 +22,7 @@ index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..ac98ea9d3194bbca9cdc8c6fb4bf92a8
1122
"guest_pull": true,
1223
"pause_container_id_policy": "v1"
1324
},
14-
@@ -317,7 +317,8 @@
25+
@@ -322,7 +324,8 @@
1526
"^AZURE_TENANT_ID=[A-Fa-f0-9-]*$",
1627
"^AZURE_FEDERATED_TOKEN_FILE=/var/run/secrets/azure/tokens/azure-identity-token$",
1728
"^AZURE_AUTHORITY_HOST=https://login\\.microsoftonline\\.com/$",
@@ -21,7 +32,7 @@ index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..ac98ea9d3194bbca9cdc8c6fb4bf92a8
2132
]
2233
},
2334
"UpdateInterfaceRequest": {
24-
@@ -334,7 +335,9 @@
35+
@@ -339,7 +342,9 @@
2536
],
2637
"ExecProcessRequest": {
2738
"allowed_commands": [],
@@ -32,7 +43,7 @@ index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..ac98ea9d3194bbca9cdc8c6fb4bf92a8
3243
},
3344
"UpdateRoutesRequest": {
3445
"forbidden_device_names": [
35-
@@ -354,8 +357,8 @@
46+
@@ -359,8 +364,8 @@
3647
]
3748
},
3849
"CloseStdinRequest": false,

packages/by-name/kata/genpolicy/genpolicy_settings_prod.patch

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
diff --git a/genpolicy-settings.json b/genpolicy-settings.json
2-
index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..3a4617ee6acad46e156cb664d710f42f1c488a32 100644
2+
index e7800bd10ba1eae91bdf61b4c1bab2af46bc4a05..1469b7238f4483325e63f32ea37b296b50e55e26 100644
33
--- a/genpolicy-settings.json
44
+++ b/genpolicy-settings.json
5-
@@ -296,7 +296,7 @@
5+
@@ -193,7 +193,9 @@
6+
"gpu_anno_value_regex": "^nvidia\\.com/gpu=[0-9]+$",
7+
"gpu_gk_device_type": "vfio-pci-gk",
8+
"pgpu_resource_keys": [
9+
- "nvidia.com/pgpu"
10+
+ "nvidia.com/pgpu",
11+
+ "nvidia.com/GB100_B200",
12+
+ "nvidia.com/GH100_H100_PCIE"
13+
]
14+
}
15+
}
16+
@@ -301,7 +303,7 @@
617
"enable_configmap_secret_storages": false
718
},
819
"cluster_config": {
@@ -11,7 +22,7 @@ index 88171e1c40f271be9468c6c8b9b87c871a55c1f9..3a4617ee6acad46e156cb664d710f42f
1122
"guest_pull": true,
1223
"pause_container_id_policy": "v1"
1324
},
14-
@@ -354,7 +354,7 @@
25+
@@ -359,7 +361,7 @@
1526
]
1627
},
1728
"CloseStdinRequest": false,

packages/by-name/kata/kernel-uvm/package.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ let
3030
};
3131
in
3232
linuxManualConfig rec {
33-
version = "6.18.5";
34-
modDirVersion = "${version}" + lib.optionalString withGPU "-nvidia-gpu-confidential";
33+
version = "6.18.12";
34+
modDirVersion = "${version}" + lib.optionalString withGPU "-nvidia-gpu";
3535

3636
# See https://github.com/kata-containers/kata-containers/blob/5f11c0f144037d8d8f546c89a0392dcd84fa99e2/versions.yaml#L198-L201
3737
src = fetchurl {
3838
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${version}.tar.xz";
39-
hash = "sha256-GJ0fQJzvjQ0jQhDgRZUXLfOS+MspfhS0R+2Vcg4v2UA=";
39+
hash = "sha256-4AMpStTCwqxbt3+7gllRETT1HZh7MhJRaDLcSwyD8eo=";
4040
};
4141

4242
kernelPatches = [

0 commit comments

Comments
 (0)