1
0
mirror of https://github.com/dockur/windows.git synced 2026-07-27 21:42:36 +07:00

fix: Limit XP EPYC workaround to x86 (#1980)

This commit is contained in:
Kroese
2026-07-26 03:28:22 +02:00
committed by GitHub
parent 36d127d8cf
commit 3d3bab023d
+12 -5
View File
@@ -716,6 +716,7 @@ setMachine() {
fi fi
case "${id,,}" in case "${id,,}" in
"win9"* ) "win9"* )
USB="no" USB="no"
VGA="cirrus" VGA="cirrus"
@@ -723,6 +724,7 @@ setMachine() {
MACHINE="pc-i440fx-2.4" MACHINE="pc-i440fx-2.4"
BOOT_MODE="windows_legacy" BOOT_MODE="windows_legacy"
[ -z "${ADAPTER:-}" ] && ADAPTER="pcnet" ;; [ -z "${ADAPTER:-}" ] && ADAPTER="pcnet" ;;
"win2k"* ) "win2k"* )
VGA="cirrus" VGA="cirrus"
MACHINE="pc" MACHINE="pc"
@@ -730,6 +732,7 @@ setMachine() {
DISK_TYPE="auto" DISK_TYPE="auto"
BOOT_MODE="windows_legacy" BOOT_MODE="windows_legacy"
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;; [ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;;
"winxp"* ) "winxp"* )
DISK_TYPE="blk" DISK_TYPE="blk"
BOOT_MODE="windows_legacy" BOOT_MODE="windows_legacy"
@@ -737,26 +740,30 @@ setMachine() {
if [ -z "${CPU_MODEL:-}" ] || [[ "${CPU_MODEL:-}" == "host" ]]; then if [ -z "${CPU_MODEL:-}" ] || [[ "${CPU_MODEL:-}" == "host" ]]; then
# Workaround for boot loop on AMD EPYC processors # Workaround for boot loop on AMD EPYC processors
if [[ "${CPU,,}" == *"amd epyc"* ]]; then if [[ "${id,,}" == "winxpx86"* && "${CPU,,}" == *"amd epyc"* ]]; then
CPU_MODEL="qemu32" CPU_MODEL="qemu32"
fi fi
fi fi ;;
;;
"win2003"* ) "win2003"* )
DISK_TYPE="blk" DISK_TYPE="blk"
BOOT_MODE="windows_legacy" BOOT_MODE="windows_legacy"
[ -z "${SOUND:-}" ] && SOUND="usb-audio" [ -z "${SOUND:-}" ] && SOUND="usb-audio" ;;
;;
"winvista"* | "win7"* | "win2008"* ) "winvista"* | "win7"* | "win2008"* )
BOOT_MODE="windows_legacy" ;; BOOT_MODE="windows_legacy" ;;
esac esac
case "${id,,}" in case "${id,,}" in
"winxp"* | "win2003"* | "winvistax86"* | "win7x86"* | "win2008r2x86"* ) "winxp"* | "win2003"* | "winvistax86"* | "win7x86"* | "win2008r2x86"* )
if isQ35 "${MACHINE:-q35}"; then if isQ35 "${MACHINE:-q35}"; then
# Prevent bluescreen if 64 bit PCI hole size is >2G. # Prevent bluescreen if 64 bit PCI hole size is >2G.
ARGS="-global q35-pcihost.x-pci-hole64-fix=false" ARGS="-global q35-pcihost.x-pci-hole64-fix=false"
fi ;; fi ;;
esac esac
return 0 return 0