patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Demi Marie Obenour <demiobenour@gmail.com>
Subject: [PATCH] Use -cpu max instead of -cpu host
Date: Thu, 14 Aug 2025 14:50:27 +0200	[thread overview]
Message-ID: <20250814125026.193853-2-hi@alyssa.is> (raw)
In-Reply-To: <20250807-no-require-kvm-v1-1-5dec3fbaef7b@gmail.com>

-cpu host doesn't work if KVM isn't available.  This should do the
right thing in both cases.

Fixes: 0f2d3c7 ("Makefile: add run target to test with QEMU")
Fixes: 3ebad5c ("run-vm.nix: add for running installer test VMs")
Fixes: eaafee7 ("Makefile: add run target")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
Demi, could you please check whether this solves the problem for you on 
Qubes OS?  I'd prefer to do it this way if it works, because it lets 
QEMU take care of the problem rather than our script.

 img/app/Makefile             | 2 +-
 release/installer/run-vm.nix | 2 +-
 vm/sys/net/Makefile          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/img/app/Makefile b/img/app/Makefile
index 5380ffb..9665a6b 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -148,7 +148,7 @@ start-virtiofsd: scripts/start-virtiofsd.elb
 .PHONY: start-virtiofsd
 
 run-qemu: $(imgdir)/appvm/blk/root.img start-vhost-user-net start-virtiofsd
-	@../../scripts/run-qemu.sh -m 256 -cpu host -kernel $(KERNEL) -vga none \
+	@../../scripts/run-qemu.sh -m 256 -cpu max -kernel $(KERNEL) -vga none \
 	    -drive file=$(imgdir)/appvm/blk/root.img,if=virtio,format=raw,readonly=on \
 	    -append "root=PARTLABEL=root nokaslr" \
 	    -gdb unix:build/gdb.sock,server,nowait \
diff --git a/release/installer/run-vm.nix b/release/installer/run-vm.nix
index dda9127..37b470c 100644
--- a/release/installer/run-vm.nix
+++ b/release/installer/run-vm.nix
@@ -28,7 +28,7 @@ writeShellScript "run-spectrum-installer-vm.sh" ''
   truncate -s 20G "$img"
   exec 3<>"$img"
   rm -f "$img"
-  exec ${../../scripts/run-qemu.sh} -cpu host -m 4G \
+  exec ${../../scripts/run-qemu.sh} -cpu max -m 4G \
     -device virtio-keyboard \
     -device virtio-mouse \
     -device virtio-gpu \
diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index 785bd46..e681940 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -99,7 +99,7 @@ start-vhost-user-net:
 	../../../scripts/start-passt.elb
 
 run-qemu: $(vmdir)/netvm/blk/root.img
-	@../../../scripts/run-qemu.sh -m 256 -cpu host -kernel $(KERNEL) -vga none \
+	@../../../scripts/run-qemu.sh -m 256 -cpu max -kernel $(KERNEL) -vga none \
 	    -drive file=$(vmdir)/netvm/blk/root.img,if=virtio,format=raw,readonly=on \
 	    -append "root=PARTLABEL=root nokaslr" \
 	    -gdb unix:build/gdb.sock,server,nowait \

base-commit: 586577f3015397afacd83bc185454f4cc3c8028f
-- 
2.50.0


  reply	other threads:[~2025-08-14 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 18:21 [PATCH] vm: do not require KVM to run QEMU Demi Marie Obenour
2025-08-14 12:50 ` Alyssa Ross [this message]
2025-08-14 21:20   ` [PATCH] Use -cpu max instead of -cpu host Demi Marie Obenour
2025-08-15  7:13     ` Alyssa Ross
2025-08-15  7:12   ` Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250814125026.193853-2-hi@alyssa.is \
    --to=hi@alyssa.is \
    --cc=demiobenour@gmail.com \
    --cc=devel@spectrum-os.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).