VFIO Profile Fixes

This commit is contained in:
kat witch 2021-08-05 16:58:30 +01:00
parent 2c36feec6f
commit 6e204214d4
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
2 changed files with 8 additions and 6 deletions

View file

@ -1,4 +1,6 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
with lib;
{
deploy.profile.hardware.amdgpu = true;

View file

@ -15,17 +15,17 @@ with lib;
users.users.kat.extraGroups = [ "vfio" "input" "uinput" ];
users.groups = { uinput = { }; vfio = { }; };
boot = {
initrd.kernelModules = ["vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd"];
boot = lib.mkMerge [ {
initrd.kernelModules = mkBefore ["vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd"];
kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub
} // mkIf (config.deploy.profile.hardware.amdgpu) {
} (mkIf (config.deploy.profile.hardware.amdgpu) {
kernelParams = [
"video=efifb:off"
];
extraModulePackages = [
(pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset
];
} // mkIf (config.deploy.profile.hardware.acs-override) {
}) ( mkIf (config.deploy.profile.hardware.acs-override) {
kernelPatches = [
{
name = "acs-patch.patch";
@ -40,7 +40,7 @@ with lib;
"pci=noats"
"pcie_acs_override=downstream,multifunction"
];
};
}) ];
environment.etc."qemu/bridge.conf".text = "allow br";