RE: [RFC 00/18] vfio: Adopt iommufd

2022-06-28 Thread Shameerali Kolothum Thodi via
l.com; > chao.p.p...@intel.com; yi.y@intel.com; pet...@redhat.com > Subject: Re: [RFC 00/18] vfio: Adopt iommufd > > On 2022/5/18 15:22, zhangfei@foxmail.com wrote: > > > > > > On 2022/5/17 下午4:55, Yi Liu wrote: > >> Hi Zhangfei, >

Re: [RFC 00/18] vfio: Adopt iommufd

2022-06-28 Thread Eric Auger
om; jasow...@redhat.com; k...@vger.kernel.org; >> nicol...@nvidia.com; eric.auger@gmail.com; kevin.t...@intel.com; >> chao.p.p...@intel.com; yi.y@intel.com; pet...@redhat.com >> Subject: Re: [RFC 00/18] vfio: Adopt iommufd >> >> On 2022/5/18 15:22, zhangfei@fox

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-18 Thread Yi Liu
On 2022/5/18 15:22, zhangfei@foxmail.com wrote: On 2022/5/17 下午4:55, Yi Liu wrote: Hi Zhangfei, On 2022/5/12 17:01, zhangfei@foxmail.com wrote: Hi, Yi On 2022/5/11 下午10:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-18 Thread zhangfei....@foxmail.com
On 2022/5/17 下午4:55, Yi Liu wrote: Hi Zhangfei, On 2022/5/12 17:01, zhangfei@foxmail.com wrote: Hi, Yi On 2022/5/11 下午10:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800,

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-17 Thread Yi Liu
Hi Zhangfei, On 2022/5/12 17:01, zhangfei@foxmail.com wrote: Hi, Yi On 2022/5/11 下午10:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: Thanks Yi and Eric,

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-17 Thread Yi Liu
Hi Zhangfei, On 2022/5/11 22:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: Thanks Yi and Eric, Then will wait for the updated iommufd kernel for the PCI MMIO

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-12 Thread zhangfei....@foxmail.com
Hi, Yi On 2022/5/11 下午10:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: Thanks Yi and Eric, Then will wait for the updated iommufd kernel for the PCI MMIO

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-11 Thread zhangfei....@foxmail.com
On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: Thanks Yi and Eric, Then will wait for the updated iommufd kernel for the PCI MMIO region. Another question, How to get the iommu_domain in the

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-10 Thread Yi Liu
On 2022/5/10 20:45, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: Thanks Yi and Eric, Then will wait for the updated iommufd kernel for the PCI MMIO region. Another question, How to get the iommu_domain in the ioctl. The ID of the iommu_domain (called

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-10 Thread Jason Gunthorpe
On Tue, May 10, 2022 at 08:35:00PM +0800, Zhangfei Gao wrote: > Thanks Yi and Eric, > Then will wait for the updated iommufd kernel for the PCI MMIO region. > > Another question, > How to get the iommu_domain in the ioctl. The ID of the iommu_domain (called the hwpt) it should be returned by the

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-10 Thread Zhangfei Gao
...@linux.ibm.com; pa...@linux.ibm.com; jjhe...@linux.ibm.com; jasow...@redhat.com; k...@vger.kernel.org; j...@nvidia.com; nicol...@nvidia.com; eric.auger@gmail.com; kevin.t...@intel.com; chao.p.p...@intel.com; yi.y@intel.com; pet...@redhat.com; Zhangfei Gao Subject: Re: [RFC 00/18] vfio: Adopt

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-10 Thread Eric Auger
;>>>> jjhe...@linux.ibm.com; jasow...@redhat.com; k...@vger.kernel.org; >>>>> j...@nvidia.com; nicol...@nvidia.com; eric.auger@gmail.com; >>>>> kevin.t...@intel.com; chao.p.p...@intel.com; yi.y@intel.com; >>>>> pet...@redhat.com; Zhangfei G

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-09 Thread Yi Liu
...@vger.kernel.org; j...@nvidia.com; nicol...@nvidia.com; eric.auger@gmail.com; kevin.t...@intel.com; chao.p.p...@intel.com; yi.y@intel.com; pet...@redhat.com; Zhangfei Gao Subject: Re: [RFC 00/18] vfio: Adopt iommufd [...] https://lore.kernel.org/kvm/0-v1-e79cd8d168e8+6-iommufd_...@nvidia.com / [2

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-09 Thread Zhangfei Gao
@gmail.com; kevin.t...@intel.com; chao.p.p...@intel.com; yi.y@intel.com; pet...@redhat.com; Zhangfei Gao Subject: Re: [RFC 00/18] vfio: Adopt iommufd [...] https://lore.kernel.org/kvm/0-v1-e79cd8d168e8+6-iommufd_...@nvidia.com / [2] https://github.com/luxis1999/iommufd/tree/iommufd

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-28 Thread Tian, Kevin
> From: Daniel P. Berrangé > Sent: Friday, April 29, 2022 12:20 AM > > On Thu, Apr 28, 2022 at 08:24:48AM -0600, Alex Williamson wrote: > > On Thu, 28 Apr 2022 03:21:45 + > > "Tian, Kevin" wrote: > > > > > > From: Alex Williamson > > > > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > >

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-28 Thread Daniel P . Berrangé
On Thu, Apr 28, 2022 at 08:24:48AM -0600, Alex Williamson wrote: > On Thu, 28 Apr 2022 03:21:45 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson > > > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > > > > > > My expectation would be that libvirt uses: > > > > > > > > > > -object

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-28 Thread Alex Williamson
On Thu, 28 Apr 2022 03:21:45 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > > > > My expectation would be that libvirt uses: > > > > > > > > -object iommufd,id=iommufd0,fd=NNN > > > > -device vfio-pci,fd=MMM,iommufd=iommufd0 > > >

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-27 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > > My expectation would be that libvirt uses: > > > > > > -object iommufd,id=iommufd0,fd=NNN > > > -device vfio-pci,fd=MMM,iommufd=iommufd0 > > > > > > Whereas simple QEMU command line would be: > > > > > > -object

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Alex Williamson
On Tue, 26 Apr 2022 13:42:17 -0300 Jason Gunthorpe wrote: > On Tue, Apr 26, 2022 at 10:21:59AM -0600, Alex Williamson wrote: > > We also need to be able to advise libvirt as to how each iommufd object > > or user of that object factors into the VM locked memory requirement. > > When used by

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Jason Gunthorpe
On Tue, Apr 26, 2022 at 01:24:35PM -0600, Alex Williamson wrote: > On Tue, 26 Apr 2022 13:42:17 -0300 > Jason Gunthorpe wrote: > > > On Tue, Apr 26, 2022 at 10:21:59AM -0600, Alex Williamson wrote: > > > We also need to be able to advise libvirt as to how each iommufd object > > > or user of

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Alex Williamson
..@nvidia.com; nicol...@nvidia.com; eric.auger@gmail.com; > > kevin.t...@intel.com; chao.p.p...@intel.com; yi.y....@intel.com; > > pet...@redhat.com; Zhangfei Gao > > Subject: Re: [RFC 00/18] vfio: Adopt iommufd > > [...] > > > >> > > https:

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Jason Gunthorpe
On Tue, Apr 26, 2022 at 10:21:59AM -0600, Alex Williamson wrote: > We also need to be able to advise libvirt as to how each iommufd object > or user of that object factors into the VM locked memory requirement. > When used by vfio-pci, we're only mapping VM RAM, so we'd ask libvirt > to set the

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Alex Williamson
On Tue, 26 Apr 2022 08:37:41 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Monday, April 25, 2022 10:38 PM > > > > On Mon, 25 Apr 2022 11:10:14 +0100 > > Daniel P. Berrangé wrote: > > > > > On Fri, Apr 22, 2022 at 04:09:43PM -0600, Alex Williamson wrote: > > > > [Cc

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Shameerali Kolothum Thodi via
..@intel.com; > pet...@redhat.com; Zhangfei Gao > Subject: Re: [RFC 00/18] vfio: Adopt iommufd [...] > >> > https://lore.kernel.org/kvm/0-v1-e79cd8d168e8+6-iommufd_...@nvidia.com > >> / > >> [2] https://github.com/luxis1999/iommufd/tree/iommufd-v5.17-rc6 > >>

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Jason Gunthorpe
On Tue, Apr 26, 2022 at 08:37:41AM +, Tian, Kevin wrote: > Based on current plan there is probably a transition window between the > point where the first vfio device type (vfio-pci) gaining iommufd support > and the point where all vfio types supporting iommufd. I am still hoping to do all

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Eric Auger
Hi Shameer, On 4/26/22 11:47 AM, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Yi Liu [mailto:yi.l@intel.com] >> Sent: 14 April 2022 11:47 >> To: alex.william...@redhat.com; coh...@redhat.com; >> qemu-devel@nongnu.org >> Cc: da...@gibson.dropbear.id.au;

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Yi Liu [mailto:yi.l@intel.com] > Sent: 14 April 2022 11:47 > To: alex.william...@redhat.com; coh...@redhat.com; > qemu-devel@nongnu.org > Cc: da...@gibson.dropbear.id.au; th...@redhat.com; far...@linux.ibm.com; > mjros...@linux.ibm.com;

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Tian, Kevin
> From: Eric Auger > Sent: Tuesday, April 26, 2022 3:55 AM > > Hi Kevin, > > On 4/18/22 10:49 AM, Tian, Kevin wrote: > >> From: Liu, Yi L > >> Sent: Thursday, April 14, 2022 6:47 PM > >> > >> This series qomifies the VFIOContainer object which acts as a base class > > what does 'qomify' mean?

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-26 Thread Tian, Kevin
> From: Alex Williamson > Sent: Monday, April 25, 2022 10:38 PM > > On Mon, 25 Apr 2022 11:10:14 +0100 > Daniel P. Berrangé wrote: > > > On Fri, Apr 22, 2022 at 04:09:43PM -0600, Alex Williamson wrote: > > > [Cc +libvirt folks] > > > > > > On Thu, 14 Apr 2022 03:46:52 -0700 > > > Yi Liu

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Alex Williamson
On Mon, 25 Apr 2022 22:23:05 +0200 Eric Auger wrote: > Hi Alex, > > On 4/23/22 12:09 AM, Alex Williamson wrote: > > [Cc +libvirt folks] > > > > On Thu, 14 Apr 2022 03:46:52 -0700 > > Yi Liu wrote: > > > >> With the introduction of iommufd[1], the linux kernel provides a generic > >>

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Alex, On 4/23/22 12:09 AM, Alex Williamson wrote: > [Cc +libvirt folks] > > On Thu, 14 Apr 2022 03:46:52 -0700 > Yi Liu wrote: > >> With the introduction of iommufd[1], the linux kernel provides a generic >> interface for userspace drivers to propagate their DMA mappings to kernel >> for

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Kevin, On 4/18/22 10:49 AM, Tian, Kevin wrote: >> From: Liu, Yi L >> Sent: Thursday, April 14, 2022 6:47 PM >> >> With the introduction of iommufd[1], the linux kernel provides a generic >> interface for userspace drivers to propagate their DMA mappings to kernel >> for assigned devices. This

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi, On 4/18/22 2:09 PM, Yi Liu wrote: > Hi Kevin, > > On 2022/4/18 16:49, Tian, Kevin wrote: >>> From: Liu, Yi L >>> Sent: Thursday, April 14, 2022 6:47 PM >>> >>> With the introduction of iommufd[1], the linux kernel provides a >>> generic >>> interface for userspace drivers to propagate their

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Nicolin, On 4/19/22 5:26 AM, Nicolin Chen wrote: > On Sun, Apr 17, 2022 at 12:30:40PM +0200, Eric Auger wrote: > - More tests >>> I did a quick test on my ARM64 platform, using "iommu=smmuv3" >>> string. The behaviors are different between using default and >>> using legacy "iommufd=off".

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Alex Williamson
On Mon, 25 Apr 2022 11:10:14 +0100 Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 04:09:43PM -0600, Alex Williamson wrote: > > [Cc +libvirt folks] > > > > On Thu, 14 Apr 2022 03:46:52 -0700 > > Yi Liu wrote: > > > > > With the introduction of iommufd[1], the linux kernel provides a

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Jason Gunthorpe
On Mon, Apr 25, 2022 at 11:10:14AM +0100, Daniel P. Berrangé wrote: > > However, with iommufd there's no reason that QEMU ever needs more than > > a single instance of /dev/iommufd and we're using per device vfio file > > descriptors, so it seems like a good time to revisit this. > > I assume

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Daniel P . Berrangé
On Fri, Apr 22, 2022 at 04:09:43PM -0600, Alex Williamson wrote: > [Cc +libvirt folks] > > On Thu, 14 Apr 2022 03:46:52 -0700 > Yi Liu wrote: > > > With the introduction of iommufd[1], the linux kernel provides a generic > > interface for userspace drivers to propagate their DMA mappings to

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-22 Thread Alex Williamson
[Cc +libvirt folks] On Thu, 14 Apr 2022 03:46:52 -0700 Yi Liu wrote: > With the introduction of iommufd[1], the linux kernel provides a generic > interface for userspace drivers to propagate their DMA mappings to kernel > for assigned devices. This series does the porting of the VFIO devices >

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-18 Thread Nicolin Chen
On Sun, Apr 17, 2022 at 12:30:40PM +0200, Eric Auger wrote: > >> - More tests > > I did a quick test on my ARM64 platform, using "iommu=smmuv3" > > string. The behaviors are different between using default and > > using legacy "iommufd=off". > > > > The legacy pathway exits the VM with: > >

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-18 Thread Yi Liu
Hi Kevin, On 2022/4/18 16:49, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, April 14, 2022 6:47 PM With the introduction of iommufd[1], the linux kernel provides a generic interface for userspace drivers to propagate their DMA mappings to kernel for assigned devices. This series does the

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-18 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, April 14, 2022 6:47 PM > > With the introduction of iommufd[1], the linux kernel provides a generic > interface for userspace drivers to propagate their DMA mappings to kernel > for assigned devices. This series does the porting of the VFIO devices > onto the

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-17 Thread Eric Auger
Hi Nicolin, On 4/15/22 10:37 AM, Nicolin Chen wrote: > Hi, > > Thanks for the work! > > On Thu, Apr 14, 2022 at 03:46:52AM -0700, Yi Liu wrote: > >> - More tests > I did a quick test on my ARM64 platform, using "iommu=smmuv3" > string. The behaviors are different between using default and >

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-15 Thread Nicolin Chen
Hi, Thanks for the work! On Thu, Apr 14, 2022 at 03:46:52AM -0700, Yi Liu wrote: > - More tests I did a quick test on my ARM64 platform, using "iommu=smmuv3" string. The behaviors are different between using default and using legacy "iommufd=off". The legacy pathway exits the VM with: