Use 6.16.0 Linux kernel for benchmark tests & Add Linux TDX benchmark tests
This commit is contained in:
parent
8686d2b799
commit
7fad653992
|
|
@ -133,16 +133,13 @@ run_benchmark() {
|
|||
asterinas_cmd_arr+=(INTEL_TDX=1)
|
||||
fi
|
||||
|
||||
# TODO:
|
||||
# 1. Current linux kernel is not TDX compatible. Replace with TDX compatible version later.
|
||||
# 2. `guest_uso4=off,guest_uso6=off,host_uso=off` is not supported by the QEMU of TDX development image.
|
||||
# TODO: `guest_uso4=off,guest_uso6=off,host_uso=off` is not supported by the QEMU of TDX development image.
|
||||
local linux_cmd_arr=(
|
||||
qemu-system-x86_64
|
||||
--no-reboot
|
||||
-smp "${smp_val}"
|
||||
-m "${mem_val}"
|
||||
-machine q35,kernel-irqchip=split
|
||||
-cpu Icelake-Server,-pcid,+x2apic
|
||||
--enable-kvm
|
||||
-kernel "${LINUX_KERNEL}"
|
||||
-initrd "${BENCHMARK_ROOT}/../../build/initramfs.cpio.gz"
|
||||
|
|
@ -154,10 +151,14 @@ run_benchmark() {
|
|||
)
|
||||
if [[ "$platform" != "tdx" ]]; then
|
||||
linux_cmd_arr+=(
|
||||
-cpu Icelake-Server,-pcid,+x2apic
|
||||
-device "virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off,csum=off,guest_csum=off,ctrl_guest_offloads=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,mrg_rxbuf=off,ctrl_vq=off,ctrl_rx=off,ctrl_vlan=off,ctrl_rx_extra=off,guest_announce=off,ctrl_mac_addr=off,host_ufo=off,guest_uso4=off,guest_uso6=off,host_uso=off"
|
||||
)
|
||||
else
|
||||
linux_cmd_arr+=(
|
||||
-machine confidential-guest-support=tdx0 \
|
||||
-cpu host,-kvm-steal-time,pmu=off \
|
||||
-object '{ "qom-type": "tdx-guest", "id": "tdx0", "sept-ve-disable": true, "quote-generation-socket": { "type": "vsock", "cid": "2", "port": "4050" } }' \
|
||||
-device "virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off,csum=off,guest_csum=off,ctrl_guest_offloads=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,mrg_rxbuf=off,ctrl_vq=off,ctrl_rx=off,ctrl_vlan=off,ctrl_rx_extra=off,guest_announce=off,ctrl_mac_addr=off,host_ufo=off"
|
||||
)
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -13,18 +13,17 @@ ASTER_OUTPUT="${BENCHMARK_ROOT}/aster_output.txt"
|
|||
# Dependencies for Linux
|
||||
LINUX_DEPENDENCIES_DIR="/opt/linux_binary_cache"
|
||||
LINUX_KERNEL="${LINUX_DEPENDENCIES_DIR}/vmlinuz"
|
||||
LINUX_KERNEL_VERSION="5.15.0-105"
|
||||
LINUX_KERNEL_VERSION="6.16.0"
|
||||
LINUX_MODULES_DIR="${BENCHMARK_ROOT}/../build/initramfs/lib/modules/${LINUX_KERNEL_VERSION}/kernel"
|
||||
WGET_SCRIPT="${BENCHMARK_ROOT}/../../../tools/atomic_wget.sh"
|
||||
|
||||
# Prepare Linux kernel and modules
|
||||
prepare_libs() {
|
||||
# Download the Linux kernel and modules
|
||||
mkdir -p "${LINUX_DEPENDENCIES_DIR}"
|
||||
|
||||
# Array of files to download and their URLs
|
||||
declare -A files=(
|
||||
["${LINUX_KERNEL}"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/14598b6/vmlinuz-${LINUX_KERNEL_VERSION}"
|
||||
["${LINUX_KERNEL}"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/24db4ff/vmlinuz-${LINUX_KERNEL_VERSION}"
|
||||
)
|
||||
|
||||
# Download files if they don't exist
|
||||
|
|
|
|||
Loading…
Reference in New Issue