From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Vadim Likholetov <vadim.likholetov@unikie.com>
Subject: [PATCH 1/2] Set intel_iommu=on in kernel command line
Date: Thu, 22 Sep 2022 07:56:28 +0000 [thread overview]
Message-ID: <20220922075629.247058-2-hi@alyssa.is> (raw)
In-Reply-To: <20220922075629.247058-1-hi@alyssa.is>
In Nixpkgs kernels, Intel IOMMUs are disabled by
default (CONFIG_INTEL_IOMMU_DEFAULT_ON=n), so it needs to be
explicitly enabled on the kernel command line. This was already done
in the rootfs run make target, which is what I mostly use for testing,
which is why I hadn't noticed until now.
We could also set CONFIG_INTEL_IOMMU_DEFAULT_ON, but I think it's
better to avoid changing our kernel configuration too much at the
moment. (This might change in future if we want to go all in.)
No changes are required for AMD IOMMUs, which are enabled by default.
Reported-by: Vadim Likholetov <vadim.likholetov@unikie.com>
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
host/initramfs/Makefile | 2 +-
img/live/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index 1bdc407..596b15e 100644
--- a/host/initramfs/Makefile
+++ b/host/initramfs/Makefile
@@ -67,7 +67,7 @@ run: build/initramfs build/rootfs.verity.roothash build/live.img
$(QEMU_KVM) -m 4G \
-kernel $(KERNEL) \
-initrd build/initramfs \
- -append "ro console=ttyS0 ext=vda roothash=$$(< build/rootfs.verity.roothash)" \
+ -append "ro console=ttyS0 ext=vda intel_iommu=on roothash=$$(< build/rootfs.verity.roothash)" \
-cpu host \
-display gtk,gl=on \
-device virtio-vga-gl \
diff --git a/img/live/Makefile b/img/live/Makefile
index 9815c88..f13dd26 100644
--- a/img/live/Makefile
+++ b/img/live/Makefile
@@ -26,7 +26,7 @@ build/spectrum.conf: build/rootfs.verity.roothash
printf "title Spectrum\n" > $@
printf "linux /spectrum/linux\n" >> $@
printf "initrd /spectrum/initrd\n" >> $@
- printf "options ro console=tty console=ttyS0 roothash=" >> $@
+ printf "options ro console=tty console=ttyS0 intel_iommu=on roothash=" >> $@
cat build/rootfs.verity.roothash >> $@
build/boot.fat: $(KERNEL) $(INITRAMFS) $(SYSTEMD_BOOT_EFI) build/spectrum.conf
--
2.37.1
next prev parent reply other threads:[~2022-09-22 7:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 7:56 [PATCH 0/2] IOMMU fixes Alyssa Ross
2022-09-22 7:56 ` Alyssa Ross [this message]
2022-11-14 1:14 ` [PATCH 1/2] Set intel_iommu=on in kernel command line Alyssa Ross
2022-09-22 7:56 ` [PATCH 2/2] Add IOMMU to other host test targets Alyssa Ross
2022-11-14 1:14 ` 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=20220922075629.247058-2-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
--cc=vadim.likholetov@unikie.com \
/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).