About J3455 motherboard IOMMU Issue and PVE-kernel Re-build (compile) Error

yfdoor

New Member
Jul 12, 2019
12
0
1
44
I have an Asrock J3455-ITX motherboard, where I already enabled Intel virtualization in the BIOS and the iommu is enabled as well. And also tried pcie_acs_override=downstream,multifunction but IOMMU groups are still the same. All steps are followed PVE Document introduction.

posted: https://forum.proxmox.com/threads/p...-can-not-split-iommu-groups.51792/post-292326

In some other forums, I find another method for this issue solve which need re-build pve-kernel and modify "0003-pci-Enable-overrides-for-missing-ACS-capabilities-4.patch" file in \pve-kernel\patches\kernel

Change From:
Code:
+        if (!pci_is_pcie(dev) ||
+                pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS))
To:
Code:
+        if (!pci_is_pcie(dev))

And then rebuild it to get new pve-kernel.deb package which is used to substitute for old kernel.

But when I run "make", it wil show below error code, so if any one can help? thanks..

Code:
yfdoor@ZXD:/mnt/d/my_project/program/pve/pve-kernel$ make V=s
test -f "submodules/ubuntu-eoan/README" || git submodule update --init submodules/ubuntu-eoan
test -f "submodules/zfsonlinux/Makefile" || git submodule update --init --recursive submodules/zfsonlinux
rm -rf build/modules/pkg-zfs build/modules/tmp pkg-zfs.prepared
mkdir -p build/modules/tmp
cp -a submodules/zfsonlinux/* build/modules/tmp
cd build/modules/tmp; make kernel
make[1]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp'
test -f "upstream/README.md" || git submodule update --init
rm -rf zfs-linux_0.8.3 zfs-linux_0.8.3.tmp
cp -a upstream zfs-linux_0.8.3.tmp
cp -a debian zfs-linux_0.8.3.tmp/debian
mv zfs-linux_0.8.3.tmp zfs-linux_0.8.3
tar czf zfs-linux_0.8.3.orig.tar.gz zfs-linux_0.8.3
cd zfs-linux_0.8.3; dpkg-buildpackage -S -uc -us -d
dpkg-buildpackage: info: source package zfs-linux
dpkg-buildpackage: info: source version 0.8.3-pve1
dpkg-buildpackage: info: source distribution pve pmg
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
 dpkg-source --before-build zfs-linux_0.8.3
 fakeroot debian/rules clean
make[2]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
dh clean --with autoreconf,python3,systemd,sphinxdoc --parallel
   debian/rules override_dh_auto_clean
make[3]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
find . -name .gitignore -delete
rm -rf zfs-0.8.3
dh_auto_clean
make[3]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
   dh_clean
make[2]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
 dpkg-source -b zfs-linux_0.8.3
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building zfs-linux using existing ./zfs-linux_0.8.3.orig.tar.gz
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|From: Debian ZFS on Linux maintainers
| <pkg-zfsonlinux-devel@alioth-lists.debian.net>
|Date: Wed, 30 Jan 2019 15:12:04 +0100
|Subject: [PATCH] Check-for-META-and-DCH-consistency-in-autoconf
|
|Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|---
| config/zfs-meta.m4 | 34 +++++++++++++++++++++++++++++-----
| 1 file changed, 29 insertions(+), 5 deletions(-)
|
|diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4
|index b3c1befaa..660d8ccb9 100644
|--- a/config/zfs-meta.m4
|+++ b/config/zfs-meta.m4
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch '0001-Check-for-META-and-DCH-consistency-in-autoconf.patch' is correctly applied by quilt, use 'quilt refresh' to update it
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch/ --reject-file=- < zfs-linux_0.8.3.orig.VD0VsS/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch subprocess returned exit status 1
dpkg-buildpackage: error: dpkg-source -b zfs-linux_0.8.3 subprocess returned exit status 2
Makefile:52: recipe for target 'zfs-linux_0.8.3-pve1.dsc' failed
make[1]: *** [zfs-linux_0.8.3-pve1.dsc] Error 2
make[1]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp'
Makefile:96: recipe for target 'pkg-zfs.prepared' failed
make: *** [pkg-zfs.prepared] Error 2
 
Seems like the git source code repository isn't fully checked out..

can you do:
Code:
make update_modules
git submodule update --init --recursive

git status

Thanks for your replay firstly.

Due to internet speed limited, so I clone below three program into one China website https://gitee.com/ firstly, and then git those item to my host.
"https://git.proxmox.com/git/zfsonlinux.git"
"https://git.proxmox.com/git/mirror_ubuntu-eoan-kernel.git"
"https://git.proxmox.com/git/pve-kernel.git"

make update_modules :

Code:
yfdoor@ZXD:/mnt/d/my_project/program/pve/pve-kernel$ make update_modules
test -f "submodules/ubuntu-eoan/README" || git submodule update --init submodules/ubuntu-eoan
test -f "submodules/zfsonlinux/Makefile" || git submodule update --init --recursive submodules/zfsonlinux
git submodule foreach 'git pull --ff-only origin master'
Entering 'submodules/ubuntu-eoan'
From gitee.com:yfdoor/pve-mirror_ubuntu-eoan-kernel
 * branch                      master     -> FETCH_HEAD
Already up to date.
Entering 'submodules/zfsonlinux'
From gitee.com:yfdoor/pve-zfsonlinux
 * branch            master     -> FETCH_HEAD
Already up to date.
cd submodules/zfsonlinux; git pull --ff-only origin master
From gitee.com:yfdoor/pve-zfsonlinux
 * branch            master     -> FETCH_HEAD
Already up to date.

git submodule update --init --recursive:
Code:
yfdoor@ZXD:/mnt/d/my_project/program/pve/pve-kernel$ git submodule update --init --recursive
Cloning into '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream'...
Access deined: Repository Not Found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitee.com:yfdoor/mirror_zfs' into submodule path '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream' failed
Failed to clone 'upstream'. Retry scheduled
Cloning into '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream'...
Access deined: Repository Not Found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitee.com:yfdoor/mirror_zfs' into submodule path '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream' failed
Failed to clone 'upstream' a second time, aborting
Failed to recurse into submodule path 'submodules/zfsonlinux'

git status:
Code:
yfdoor@ZXD:/mnt/d/my_project/program/pve/pve-kernel$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        deleted:    patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch
        modified:   submodules/ubuntu-eoan (modified content)
        modified:   submodules/zfsonlinux (modified content)

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        build/
        config-5.3.18.org
        patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4.patch

no changes added to commit (use "git add" and/or "git commit -a")
 
fatal: clone of 'git@gitee.com:yfdoor/mirror_zfs' into submodule path '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream' failed Failed to clone 'upstream'. Retry scheduled Cloning into '/mnt/d/my_project/program/pve/pve-kernel/submodules/zfsonlinux/upstream'...
you need to mirror also the mirror_zfs repository from git.proxmox.com
 
you need to mirror also the mirror_zfs repository from git.proxmox.com

I update all submodule "mirror_zfs" "zfs-images" and then make again, I will show new Err.... :(

Thanks for all of your suggestion.

Code:
yfdoor@ZXD:/mnt/d/my_project/program/pve/pve-kernel$ make V=s
test -f "submodules/ubuntu-eoan/README" || git submodule update --init submodules/ubuntu-eoan
test -f "submodules/zfsonlinux/Makefile" || git submodule update --init --recursive submodules/zfsonlinux
rm -rf build/ubuntu-eoan ubuntu-eoan.prepared
mkdir -p build
cp -a submodules/ubuntu-eoan build/ubuntu-eoan
cat build/ubuntu-eoan/debian.master/config/config.common.ubuntu build/ubuntu-eoan/debian.master/config/amd64/config.common.amd64 build/ubuntu-eoan/debian.master/config/amd64/config.flavour.generic > config-5.3.18.org
cp config-5.3.18.org build/ubuntu-eoan/.config
sed -i build/ubuntu-eoan/Makefile -e 's/^EXTRAVERSION.*$/EXTRAVERSION=-1-pve/'
rm -rf build/ubuntu-eoan/debian build/ubuntu-eoan/debian.master
set -e; cd build/ubuntu-eoan; for patch in ../../patches/kernel/*.patch; do echo "applying patch '$patch'" && patch -p1 < ${patch}; done
applying patch '../../patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch'
patching file scripts/mkcompile_h
applying patch '../../patches/kernel/0002-bridge-keep-MAC-of-first-assigned-port.patch'
patching file net/bridge/br_stp_if.c
applying patch '../../patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch'
patching file Documentation/admin-guide/kernel-parameters.txt
patching file drivers/pci/quirks.c
applying patch '../../patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch'
patching file virt/kvm/kvm_main.c
applying patch '../../patches/kernel/0005-Revert-KVM-VMX-enable-nested-virtualization-by-defau.patch'
patching file arch/x86/kvm/vmx/vmx.c
applying patch '../../patches/kernel/0006-drm-i915-Avoid-HPD-poll-detect-triggering-a-new-dete.patch'
patching file drivers/gpu/drm/i915/display/intel_crt.c
patching file drivers/gpu/drm/i915/display/intel_dp.c
patching file drivers/gpu/drm/i915/display/intel_hdmi.c
applying patch '../../patches/kernel/0007-x86-kvm-Be-careful-not-to-clear-KVM_VCPU_FLUSH_TLB-b.patch'
patching file arch/x86/kvm/x86.c
applying patch '../../patches/kernel/0008-x86-kvm-Introduce-kvm_-un-map_gfn.patch'
patching file include/linux/kvm_host.h
patching file virt/kvm/kvm_main.c
applying patch '../../patches/kernel/0009-x86-kvm-Cache-gfn-to-pfn-translation.patch'
patching file arch/x86/include/asm/kvm_host.h
patching file arch/x86/kvm/x86.c
patching file include/linux/kvm_host.h
patching file include/linux/kvm_types.h
patching file virt/kvm/kvm_main.c
applying patch '../../patches/kernel/0010-x86-KVM-Make-sure-KVM_VCPU_FLUSH_TLB-flag-is-not-mis.patch'
patching file arch/x86/kvm/x86.c
applying patch '../../patches/kernel/0011-x86-KVM-Clean-up-host-s-steal-time-structure.patch'
patching file arch/x86/include/asm/kvm_host.h
patching file arch/x86/kvm/x86.c
touch ubuntu-eoan.prepared
rm -rf build/modules/pkg-zfs build/modules/tmp pkg-zfs.prepared
mkdir -p build/modules/tmp
cp -a submodules/zfsonlinux/* build/modules/tmp
cd build/modules/tmp; make kernel
make[1]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp'
test -f "upstream/README.md" || git submodule update --init
rm -rf zfs-linux_0.8.3 zfs-linux_0.8.3.tmp
cp -a upstream zfs-linux_0.8.3.tmp
cp -a debian zfs-linux_0.8.3.tmp/debian
mv zfs-linux_0.8.3.tmp zfs-linux_0.8.3
tar czf zfs-linux_0.8.3.orig.tar.gz zfs-linux_0.8.3
cd zfs-linux_0.8.3; dpkg-buildpackage -S -uc -us -d
dpkg-buildpackage: info: source package zfs-linux
dpkg-buildpackage: info: source version 0.8.3-pve1
dpkg-buildpackage: info: source distribution pve pmg
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
 dpkg-source --before-build zfs-linux_0.8.3
dpkg-source: info: applying 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
dpkg-source: info: applying 0002-always-load-ZFS-module-on-boot.patch
dpkg-source: info: applying 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
dpkg-source: info: applying 0004-import-with-d-dev-disk-by-id-in-scan-service.patch
dpkg-source: info: applying 0005-Enable-zed-emails.patch
 fakeroot debian/rules clean
make[2]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
dh clean --with autoreconf,python3,systemd,sphinxdoc --parallel
   debian/rules override_dh_auto_clean
make[3]: Entering directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
find . -name .gitignore -delete
rm -rf zfs-0.8.3
dh_auto_clean
make[3]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
   dh_clean
make[2]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp/zfs-linux_0.8.3'
 dpkg-source -b zfs-linux_0.8.3
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building zfs-linux using existing ./zfs-linux_0.8.3.orig.tar.gz
dpkg-source: info: building zfs-linux in zfs-linux_0.8.3-pve1.debian.tar.xz
dpkg-source: info: building zfs-linux in zfs-linux_0.8.3-pve1.dsc
 dpkg-genbuildinfo --build=source
 dpkg-genchanges --build=source >../zfs-linux_0.8.3-pve1_source.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build zfs-linux_0.8.3
dpkg-source: info: unapplying 0005-Enable-zed-emails.patch
dpkg-source: info: unapplying 0004-import-with-d-dev-disk-by-id-in-scan-service.patch
dpkg-source: info: unapplying 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
dpkg-source: info: unapplying 0002-always-load-ZFS-module-on-boot.patch
dpkg-source: info: unapplying 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
dpkg-buildpackage: info: full upload (original source is included)
lintian zfs-linux_0.8.3-pve1.dsc
W: zfs-linux source: debian-rules-uses-unnecessary-dh-argument dh ... --parallel (line 100)
W: zfs-linux source: package-file-is-executable debian/changelog
W: zfs-linux source: package-file-is-executable debian/control
W: zfs-linux source: package-file-is-executable debian/copyright
E: zfs-linux source: executable-debhelper-file-without-being-executable debian/libnvpair1linux.docs
E: zfs-linux source: executable-debhelper-file-without-being-executable debian/libnvpair1linux.install
E: zfs-linux source: executable-debhelper-file-without-being-executable debian/libuutil1linux.docs
E: zfs-linux source: executable-debhelper-file-without-being-executable ... use --no-tag-display-limit to see all (or pipe to a file/program)
Makefile:52: recipe for target 'zfs-linux_0.8.3-pve1.dsc' failed
make[1]: *** [zfs-linux_0.8.3-pve1.dsc] Error 1
make[1]: Leaving directory '/mnt/d/my_project/program/pve/pve-kernel/build/modules/tmp'
Makefile:96: recipe for target 'pkg-zfs.prepared' failed
make: *** [pkg-zfs.prepared] Error 2
 
@Stoiko Ivanov, @t.lamprecht

Hi, bro, after re-update some submodules, now it can successful re-build package. thanks for your help and sugestions.
BTW, if this is a feasible method for iommu issue fix, or if we will get a official-fix for this iommu group issue in the future release? thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!