mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 13:44:33 +00:00
gpu: Update kernel building to the latest changes
Use now the sev.conf rather then the snp.conf. Devices can be prestend in two different way in the container (1) as vfio devices /dev/vfio/<num> (2) the device is managed by whataever driver in the VM kernel claims it. Fixes: #6844 Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
parent
95bec479ca
commit
5f103003d6
@ -293,7 +293,7 @@ install_kernel_nvidia_gpu_snp() {
|
||||
install_kernel_helper \
|
||||
"assets.kernel.snp.version" \
|
||||
"kernel-nvidia-gpu-snp" \
|
||||
"-x snp -g nvidia -u ${kernel_url} -H deb"
|
||||
"-x sev -g nvidia -u ${kernel_url} -H deb"
|
||||
}
|
||||
|
||||
#Install GPU and TDX experimental enabled kernel asset
|
||||
|
@ -241,7 +241,7 @@ get_kernel_frag_path() {
|
||||
local redefined_string="redefined"
|
||||
local redundant_string="redundant"
|
||||
|
||||
# Later, if we need to add kernel version specific subdirs in order to
|
||||
# Later, if we need to add kernel version specifqic subdirs in order to
|
||||
# handle specific cases, then add the path definition and search/list/cat
|
||||
# here.
|
||||
local all_configs="${common_configs} ${arch_configs}"
|
||||
@ -251,26 +251,22 @@ get_kernel_frag_path() {
|
||||
|
||||
if [[ "${gpu_vendor}" != "" ]];then
|
||||
info "Add kernel config for GPU due to '-g ${gpu_vendor}'"
|
||||
local gpu_configs="$(ls ${gpu_path}/${gpu_vendor}.conf)"
|
||||
all_configs="${all_configs} ${gpu_configs}"
|
||||
# If conf_guest is set we need to update the CONFIG_LOCALVERSION
|
||||
# to match the suffix created in install_kata
|
||||
# -nvidia-gpu-{snp|tdx}, the linux headers will be named the very
|
||||
# same if build with make deb-pkg for TDX or SNP.
|
||||
local gpu_configs=$(mktemp).conf
|
||||
local gpu_subst_configs="$(ls ${gpu_path}/${gpu_vendor}.${arch_target}.conf.in)"
|
||||
if [[ "${conf_guest}" != "" ]];then
|
||||
local gpu_cc_configs=$(mktemp).conf
|
||||
local gpu_subst_configs="$(ls ${gpu_path}/${gpu_vendor}.conf.in)"
|
||||
|
||||
export CONF_GUEST_SUFFIX="-${conf_guest}"
|
||||
envsubst <${gpu_subst_configs} >${gpu_cc_configs}
|
||||
else
|
||||
export CONF_GUEST_SUFFIX=""
|
||||
fi
|
||||
envsubst <${gpu_subst_configs} >${gpu_configs}
|
||||
unset CONF_GUEST_SUFFIX
|
||||
|
||||
all_configs="${all_configs} ${gpu_cc_configs}"
|
||||
else
|
||||
local gpu_configs="$(ls ${gpu_path}/${gpu_vendor}.conf)"
|
||||
all_configs="${all_configs} ${gpu_configs}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${MEASURED_ROOTFS}" == "yes" ]; then
|
||||
info "Enabling config for confidential guest trust storage protection"
|
||||
|
@ -1,14 +0,0 @@
|
||||
# Support mmconfig PCI config space access.
|
||||
# It's used to enable the MMIO access method for PCIe devices.
|
||||
CONFIG_PCI_MMCONFIG=y
|
||||
|
||||
# Support for loading modules.
|
||||
# It is used to support loading GPU drivers.
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
|
||||
# CRYPTO_FIPS requires this config when loading modules is enabled.
|
||||
CONFIG_MODULE_SIG=y
|
||||
|
||||
# Linux kernel version suffix
|
||||
CONFIG_LOCALVERSION="-nvidia-gpu"
|
Loading…
Reference in New Issue
Block a user