qemu: use EPYC as model for AMD SVM virtualization

"-cpu phenom" does not support all CPU instructions necessary with
gcc 12 toolchain update issuing more SSSE3, e.g. pshufb.

Additionally, remove good/bad Qemu version check of outdated versions.

Issue genodelabs/genode-world#329
This commit is contained in:
Alexander Boettcher 2023-05-22 12:38:10 +02:00 committed by Christian Helmuth
parent 11f3df6e72
commit 475bcfc2b9
4 changed files with 3 additions and 50 deletions

View File

@ -86,7 +86,7 @@ if {[have_spec linux]} {
build_boot_image [build_artifacts]
append qemu_args " -cpu phenom -smp 2"
append qemu_args " -cpu EPYC -smp 2"
append qemu_args " -nographic "
#run_genode_until {.*vcpu 1 : 7\. vm exit -.*\n} 20

View File

@ -311,7 +311,7 @@ if {[have_include "power_on/qemu"]} {
append qemu_args " -m 1024 "
}
append qemu_args " -cpu phenom "
append qemu_args " -cpu EPYC "
if {[expr $use_usb_qemu]} {
append qemu_args " -usbdevice mouse -usbdevice keyboard"
}

View File

@ -304,6 +304,6 @@ lappend boot_modules pci_audio_drv
build_boot_image $boot_modules
append qemu_args " -m 3500 -cpu phenom "
append qemu_args " -m 3500 -cpu EPYC "
run_genode_until forever

View File

@ -4,36 +4,6 @@
# Reset the target machine or rather run the scenario with Qemu
#
proc check_version {qemu_version qemu_min qemu_max} {
set version_min_list [split $qemu_min ".-"]
set version_min_list_len [llength $version_min_list]
set version_max_list [split $qemu_max ".-"]
set version_max_list_len [llength $version_max_list]
set version_list [split $qemu_version ".-"]
set version_list_len [llength $version_list]
set cmp 0
set cmp_min 0
set cmp_max 0
set i 0
foreach number $version_list {
set min 0
set max 0
if { $i < $version_min_list_len } { set min [lindex $version_min_list $i] }
if { $i < $version_max_list_len } { set max [lindex $version_max_list $i] }
set cmp [expr {$cmp + $number * pow(1000, $version_list_len - $i) }]
set cmp_min [expr {$cmp_min + $min * pow(1000, $version_list_len - $i) }]
set cmp_max [expr {$cmp_max + $max * pow(1000, $version_list_len - $i) }]
incr i
}
return [expr {($cmp_min < $cmp) && ($cmp < $cmp_max)}]
}
##
#
@ -108,23 +78,6 @@ proc run_power_on { } {
append qemu_args " -serial mon:stdio "
}
# SVM virtualization is broken after $qemu_good_old and until before $qemu_good_new
# We use "-cpu phenom" when using VMs in Qemu
if {[regexp -- {-cpu phenom} $qemu_args dummy]} {
catch {exec $qemu --version} qemu_version
set qemu_version [regexp -inline {version[ ][0-9]+\.[0-9]+[\.0-9]*} $qemu_version]
set qemu_version [regexp -inline {[0-9]+\.[0-9]+[\.0-9]*} $qemu_version]
set qemu_good_old "2.4.1"
set qemu_good_new "2.8.1"
if {[check_version $qemu_version $qemu_good_old $qemu_good_new]} {
puts "\nYour Qemu version '$qemu_version' is not working with AMD SVM virtualisation"
puts "Known good Qemu versions are until $qemu_good_old and starting with $qemu_good_new\n"
exit 1
}
}
# on x86, we support booting via pxe or iso/disk image
if {[have_board pc]} {