mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-08 04:49:52 +00:00
tests/vfio: Gather debug info and disable tdp_mmu
tdp_mmu had some issues up until around Linux v6.3 that make it work
particularly bad when running nested on Hyper-V. Reload the module at the start
of the test and disable the tdp_mmu param.
Gather debug info at the end of the test to make it easier to figure out what
went wrong. This uses github actions group syntax so that each section can be
collapsed.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
(cherry picked from commit 5f6475a28a
)
This commit is contained in:
parent
44f37f689a
commit
01265fb217
@ -43,6 +43,14 @@ cleanup() {
|
||||
sudo chown -R ${USER} ${artifacts_dir}
|
||||
scp_vm ${artifacts_dir}/* ${artifacts_dir} || true
|
||||
kill_vms
|
||||
|
||||
echo "::group::L2 journal"
|
||||
cat "${artifacts_dir}/journal.log"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::L1 dmesg"
|
||||
sudo dmesg
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
create_ssh_key() {
|
||||
@ -238,6 +246,14 @@ pull_fedora_cloud_image() {
|
||||
qemu-img resize -f raw "${fedora_img}" +20G
|
||||
}
|
||||
|
||||
reload_kvm() {
|
||||
# TDP_MMU is buggy on Hyper-V until v6.3/v6.4
|
||||
sudo rmmod kvm-intel kvm-amd kvm || true
|
||||
sudo modprobe kvm tdp_mmu=0
|
||||
sudo modprobe kvm-intel || true
|
||||
sudo modprobe kvm-amd || true
|
||||
}
|
||||
|
||||
run_vm() {
|
||||
image="$1"
|
||||
config_iso="$2"
|
||||
@ -247,6 +263,8 @@ run_vm() {
|
||||
cpus=2
|
||||
machine_type="q35"
|
||||
|
||||
reload_kvm
|
||||
|
||||
sudo /usr/bin/qemu-system-${arch} -m "${memory}" -smp cpus="${cpus}" \
|
||||
-cpu host,host-phys-bits \
|
||||
-machine ${machine_type},accel=kvm,kernel_irqchip=split \
|
||||
|
Loading…
Reference in New Issue
Block a user