From: Nicolin Chen <nicolinc@nvidia.com>
To: Ben <figure1802@126.com>
Cc: <eric.auger@redhat.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: how test the Translation Support for SMMUv3?
Date: Wed, 27 Dec 2023 13:30:56 -0800 [thread overview]
Message-ID: <ZYyXkMWc7xvE3KkM@Asurada-Nvidia> (raw)
In-Reply-To: <61332e87.404e.18caa3d6e15.Coremail.figure1802@126.com>
On Wed, Dec 27, 2023 at 03:46:41PM +0800, Ben wrote:
> Hi Nicolin,
> I saw your pachset on Add Nested Translation Support for SMMUv3
> [LWN.net]<https://lwn.net/Articles/931502/>, i have built the
> kernel and qemu you provided in cover letter.
> I run a QEMU system as Host, and launch a VM by kvmtool. But i
> cannot find a IOMMU on VM, how do you test your patchset?
Make sure you build the kernel with CONFIG_IOMMUFD, and QEMU
likely.
> would you like provide your steps?
# A set of sample commands
echo 0002:01:00.0 | tee /sys/bus/pci/devices/0002\:01\:00.0/driver/unbind; dmesg | tail
echo 8086 0111 | tee /sys/bus/pci/drivers/vfio-pci/new_id
qemu-1214 -object iommufd,id=iommufd0 \
-machine virt,accel=kvm,gic-version=3,iommu=nested-smmuv3,iommufd=iommufd0 \
-cpu host -m 256m -nographic -kernel /root/Image -bios /root/AAVMF_CODE.fd \
-initrd /root/buildroot-20200422-aarch64-qemu-test-rootfs.cpio \
-object memory-backend-ram,size=256m,id=m0 -numa node,cpus=0,nodeid=0,memdev=m0 \
-device vfio-pci,host=0002:01:00.0,rombar=0,iommufd=iommufd0,id="test0"
> BTW, i add a printk on arm_smmu_device_hw_probe() to print out the smmu->features , it looks your QEMU still only support ARM_SMMU_FEAT_TRANS_S1.
QEMU is used by the guest that should only support S1. The host
kernel on the hand should support both S1 and S2 for nesting.
> Does it provide a vIOMMU of SMMUv3 for your kernel and qemu patchset?
Once you boot with "iommu=nested-smmuv3", there should be one.
Nicolin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next parent reply other threads:[~2023-12-27 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <61332e87.404e.18caa3d6e15.Coremail.figure1802@126.com>
2023-12-27 21:30 ` Nicolin Chen [this message]
2023-12-31 14:18 ` Re:Re: how test the Translation Support for SMMUv3? Ben
2024-01-02 19:51 ` Nicolin Chen
2024-01-03 14:09 ` Ben
2024-01-03 17:38 ` Nicolin Chen
2024-01-04 13:13 ` Ben
2024-01-04 22:35 ` Nicolin Chen
2024-01-05 1:50 ` Ben
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=ZYyXkMWc7xvE3KkM@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=eric.auger@redhat.com \
--cc=figure1802@126.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.