-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPIO passthrough #935
Open
KimGSandstrom
wants to merge
38
commits into
tiiuae:main
Choose a base branch
from
KimGSandstrom:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GPIO passthrough #935
Conversation
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
… pin test in gpio-vm
- changes concern activation and deactivation of virtualised elements in passthough of uarta, bpmp, gpio. - code deactivates uarta and bpmp because bpmp kernel patches conflict with gpio patches. This could be fixed by remaking the bpmp patches.
The vda device is removed from the gpio-vm because it will not work while we do not have the proper Device Tree in the VM.
startup of VM fails because the DT does not provide the vda device
gpio-vm's device tree tegra234-p3701-0000-gpio-passthrough.dtb declares the vda device needed for passthrough. gpio-vm goes into emergency mode because it cannot open AMA0 as a console. Uarta passthrough is disabled because of conflicts with GPIO passthrough. We need to disable the QEMU console. Somewhere in the code console=ttyAMA0 is set for QEMU. It is not obvious where.
At the moment device tree overlays are not working when applied according to template from other VM's. Posible cause is big changes introduced in upstream. Will merge with tiiuae after this commit.
VM kernel params are -amend rootwait console=ttyS3 No qemu.extraArgs are set
Recent merge is partially retrenched. Newer files breaks this GPIO version because the host dtb overlay is broken by netvm-wlan-pci-passthrough. The changes in tiiuae git are realated to pci passthrough, optee kernel, "machine" option for microvm/qemu and a patch provided for netvm-wlan-pci-passthrough
GPIO guest driver in VM throws error at initialisation of shared qemu memory. ioremap fails: mem_iova = ioremap(gpio_vpa, MEM_SIZE);
Guest proxy driver can passtrough low level readl and writel to host proxy. This might (meaning: still being tested) be necessary to allow guest to set up GPIO pins declared in guest's Device Tree.
…99608/72089e71a1f3d9f2d854711c6e16b703f1a426da
- New baseline for adding more passthrough functions - ./simple-chardev-test.sh works in /dev/gpio-host and /dev/gpio.guest - readl/writel execution blocked in host - Guest kernel is not aware of pins in host (gpioinfo gives false data) - use qemu: 8c5b0acccd3b4f47ba84d23b628ef294533e662a - kernel: e3a4e96cd08ab8d1a31498a10f8f7320ef53bd9d/2d96cc2e8e1c4ee4a3e973023b6c398a98dc0d93 - precompiled as nix generation 233
- return value written to char buffer in write() - return values from host seem reliable - return value is 64 bit written at offset 2 words, 2*8 bytes - full chain to guest does not work (qemu problem?) - platform to fix qemu problem - Guest kernel is not aware of pins in host (gpioinfo gives false data) - kernel: 5b7326f7ce046a8ae6c943e238a645356f237f7b/e625198f19ab6874ea89e0a7b1c5c4dfacb38710 - precompiled as nix generation 274
- gpio-virt commit 71192f60bd8b8f6be4d529c49b7c33529e21a1e2 - kernel 5.10 commit fb9220ac23c9892ec6433f0e839b8f919511a927 - qemu in ghaf is not yet updated - use qemu 8.1.2 patch in commit 95d5cdb19713369a9dceab53659628292d9ff884 - precompiled into generation 299 (on dev system)
- added source patches: - kernel adfe63ef006a696e7384b9cee340f05bf7f4f1b3 from [email protected]:KimGSandstrom/tegra_kernel-5.10.git - gpio-virt patch d90bd5625957fd164e4eb50803bd724fda89ba68 from [email protected]:KimGSandstrom/gpio-virt.git - qemu 9.0.2 GPIO passthrough patch b077b3cb519958d091cd753f7015ffafd3bfcaee from [email protected]:KimGSandstrom/qemu-passthrough - GPIO passthrough works with provided qemu - [email protected] does not start up correctly
microvm@gpio-vm does still not start up correctly: ghaf-host microvm@gpio-vm[10394]: socat[10394] E UNIX-CLIENT: gpio-vm.sock: Connection refused
- old bug in [email protected] startup remains socat[12123] E UNIX-CLIENT: gpio-vm.sock: Connection refused - kernel and qemu still work fine for GPIO passthrough. - GPIO passthrough is for output mode of GPIO only. - Manual start of qemu required
- new qemu nix build structure, - new qemu patch, - kernel compiled for gpio debug
- documentation corrected and added
GPIO passthrough patches for Qemu and kernel updated
- 'gpio_passthrough_src' documentation directory added where: - Documentation in nvidia_agx_pt_gpio.md - note that source tarballs contain only files changed since fork from stock source - kernel sources in - gpio-kernel.tar.gz.x00 - gpio-kernel.tar.gz.x01 - concatenate files with 'cat *.x?? > gpio-kernel.tar.gz' - qemu sources in - gpio-virt.tar.gz - altenatively, patchfiles for souce against - l4t linux 5.10 kernel jetson_35.4.1 - qemu 9.0.2 - note kernel patch files for passthrough drivers are in a separate in dir - 0003-gpio-virt-kernel.patch - 0004-gpio-virt-drivers.patch - 0005-gpio_overlay.patch - qemu-gpio-guestvm.dts is device tree for qemu guest
KimGSandstrom
temporarily deployed
to
internal-build-workflow
December 18, 2024 10:31 — with
GitHub Actions
Inactive
KimGSandstrom
had a problem deploying
to
external-build-workflow
December 18, 2024 10:32 — with
GitHub Actions
Failure
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GPIO Passthrough
Checklist for things done
x86_64
aarch64
riscv64
make-checks
and it passesnixos-rebuild ... switch
Instructions for Testing