mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
Meta: allow override of QEMU -cpu argument via environment variable
Introduces a SERENITY_QEMU_CPU environment variable that allows overriding of the qemu -cpu command line parameter. If not specified, the argument defaults to "max". The primary motivation behind this is to be able to enable or disable specific features for the vCPU in order to workaround QEMU issues with certain hardware accelerators. For example, QEMU on Windows with WPHX sometimes fails to start unless Virtual Machine eXtensions are disabled. This can now be done with: export SERENITY_QEMU_CPU="max,vmx=off"
This commit is contained in:
parent
d9a1cb440c
commit
a8ad0d120d
Notes:
sideshowbarker
2024-07-19 03:39:09 +09:00
Author: https://github.com/peterdn Commit: https://github.com/SerenityOS/serenity/commit/a8ad0d120d2 Pull-request: https://github.com/SerenityOS/serenity/pull/3135
1 changed files with 4 additions and 2 deletions
|
@ -20,6 +20,8 @@ die() {
|
|||
|
||||
[ -z "$SERENITY_RAM_SIZE" ] && SERENITY_RAM_SIZE=256M
|
||||
|
||||
[ -z "$SERENITY_QEMU_CPU" ] && SERENITY_QEMU_CPU="max"
|
||||
|
||||
[ -z "$SERENITY_DISK_IMAGE" ] && {
|
||||
if [ "$1" = qgrub ]; then
|
||||
SERENITY_DISK_IMAGE="grub_disk_image"
|
||||
|
@ -31,7 +33,7 @@ die() {
|
|||
[ -z "$SERENITY_COMMON_QEMU_ARGS" ] && SERENITY_COMMON_QEMU_ARGS="
|
||||
$SERENITY_EXTRA_QEMU_ARGS
|
||||
-s -m $SERENITY_RAM_SIZE
|
||||
-cpu max
|
||||
-cpu $SERENITY_QEMU_CPU
|
||||
-d guest_errors
|
||||
-smp 2
|
||||
-device VGA,vgamem_mb=64
|
||||
|
@ -45,7 +47,7 @@ $SERENITY_EXTRA_QEMU_ARGS
|
|||
[ -z "$SERENITY_COMMON_QEMU_Q35_ARGS" ] && SERENITY_COMMON_QEMU_Q35_ARGS="
|
||||
$SERENITY_EXTRA_QEMU_ARGS
|
||||
-s -m $SERENITY_RAM_SIZE
|
||||
-cpu max
|
||||
-cpu $SERENITY_QEMU_CPU
|
||||
-machine q35
|
||||
-d guest_errors
|
||||
-smp 2
|
||||
|
|
Loading…
Add table
Reference in a new issue