mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-19 15:58:25 +00:00
Merge pull request #9244 from Apokleos/dgb-gpu
runtime-rs/dragonball: add support building kernel with upcall and GPU hotplug
This commit is contained in:
@@ -154,6 +154,29 @@ $ ./build-kernel.sh -v 5.15.23 -g nvidia build
|
|||||||
$ sudo -E ./build-kernel.sh -v 5.15.23 -g nvidia install
|
$ sudo -E ./build-kernel.sh -v 5.15.23 -g nvidia install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
However, there are special cases like `Dragonball VMM`. It directly supports device `hot-plug/hot-unplug`
|
||||||
|
via upcall to avoid `ACPI` virtualization and minimize `VM` overhead. Since upcall isn't upstream kernel
|
||||||
|
code, using `Dragonball VMM` for NVIDIA GPU `hot-plug/hot-unplug` requires applying the Upcall patchset in
|
||||||
|
addition to the above kernel configuration items. Follow these steps to build for NVIDIA GPU `hot-[un]plug`
|
||||||
|
for `Dragonball`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Prepare .config to support both upcall and nvidia gpu
|
||||||
|
$ ./build-kernel.sh -v 5.10.25 -e -t dragonball -g nvidia -f setup
|
||||||
|
|
||||||
|
# Build guest kernel to support both upcall and nvidia gpu
|
||||||
|
$ ./build-kernel.sh -v 5.10.25 -e -t dragonball -g nvidia build
|
||||||
|
|
||||||
|
# Install guest kernel to support both upcall and nvidia gpu
|
||||||
|
$ sudo -E ./build-kernel.sh -v 5.10.25 -e -t dragonball -g nvidia install
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note**:
|
||||||
|
> - `-v 5.10.25` is for the guest kernel version.
|
||||||
|
> - `-e` here means experimental, mainly because `upcall` patches are not in upstream Linux kernel.
|
||||||
|
> - `-t dragonball` is for specifying hypervisor type.
|
||||||
|
> - `-f` is for generating `.config` file.
|
||||||
|
|
||||||
To build NVIDIA Driver in Kata container, `linux-headers` are required.
|
To build NVIDIA Driver in Kata container, `linux-headers` are required.
|
||||||
This is a way to generate deb packages for `linux-headers`:
|
This is a way to generate deb packages for `linux-headers`:
|
||||||
|
|
||||||
|
@@ -379,7 +379,7 @@ mod tests {
|
|||||||
// tenth one (i.e the one with index msr_index::MSR_IA32_MISC_ENABLE has the data we
|
// tenth one (i.e the one with index msr_index::MSR_IA32_MISC_ENABLE has the data we
|
||||||
// expect.
|
// expect.
|
||||||
let entry_vec = create_msr_entries();
|
let entry_vec = create_msr_entries();
|
||||||
assert_eq!(entry_vec[9], kvm_msrs.as_slice()[0]);
|
assert_eq!(entry_vec[10], kvm_msrs.as_slice()[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@@ -26,3 +26,4 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE
|
|||||||
CONFIG_SPECULATION_MITIGATIONS
|
CONFIG_SPECULATION_MITIGATIONS
|
||||||
CONFIG_X86_SGX
|
CONFIG_X86_SGX
|
||||||
CONFIG_VIRTIO_IOMMU
|
CONFIG_VIRTIO_IOMMU
|
||||||
|
CONFIG_CRYPTO_ECDSA
|
||||||
|
@@ -1 +1 @@
|
|||||||
126
|
127
|
||||||
|
Reference in New Issue
Block a user