This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
{ | |
# IOMMU configuration | |
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ]; | |
boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ]; | |
boot.extraModprobeConfig = '' | |
options vfio-pci ids=10de:13c2,10de:0fbb | |
options kvm ignore_msrs=1 | |
''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void RewriteAssembly(string assemblyPath) | |
{ | |
ModuleDef assembly = ModuleDefMD.Load(assemblyPath); | |
foreach (TypeDef type in assembly.Types.SelectMany(t => t.NestedTypes.Concat(t))) | |
{ | |
type.Attributes &= ~TypeAttributes.VisibilityMask; | |
if (type.IsNested) | |
{ |