diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-08-26 12:59:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 12:59:57 -0500 |
commit | ca3fa9c32a45f028f480ab8ec26cc4bd8ce800ad (patch) | |
tree | e41509e6c854897d709e8b6233f2209717f5fb75 /nixos | |
parent | 1a94103f12166004259317c0bcd3de29ca3e532d (diff) | |
parent | 47b56e7c19c2e3af685ee408f02f232efb3d12b1 (diff) |
Merge pull request #95956 from matthewbauer/qemu-cpu-max
runInLinuxVM, test-driver: use -cpu max instead of -cpu host
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/lib/qemu-flags.nix | 4 | ||||
-rw-r--r-- | nixos/tests/installer.nix | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index 0cf6977af4bbb..0f06624589354 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -22,9 +22,9 @@ rec { else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { - x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu host"; + x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu max"; armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; - x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu host"; + x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index a1ee7646430c1..f64e4101d45b8 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -74,7 +74,7 @@ let throw "Non-EFI boot methods are only supported on i686 / x86_64" else '' def assemble_qemu_flags(): - flags = "-cpu host" + flags = "-cpu max" ${if system == "x86_64-linux" then ''flags += " -m 768"'' else ''flags += " -m 512 -enable-kvm -machine virt,gic-version=host"'' |