qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated dev


From: Tian, Kevin
Subject: Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices
Date: Fri, 14 Oct 2016 12:29:30 +0000

> From: Kirti Wankhede [mailto:address@hidden
> Sent: Friday, October 14, 2016 7:36 PM
> 
> 
> On 10/12/2016 4:01 PM, Tian, Kevin wrote:
> >> From: Kirti Wankhede [mailto:address@hidden
> >> Sent: Tuesday, October 11, 2016 4:29 AM
> >>
> > [...]
> >> diff --git a/drivers/vfio/vfio_iommu_type1.c 
> >> b/drivers/vfio/vfio_iommu_type1.c
> >> index 2ba19424e4a1..ce6d6dcbd9a8 100644
> >> --- a/drivers/vfio/vfio_iommu_type1.c
> >> +++ b/drivers/vfio/vfio_iommu_type1.c
> >> @@ -55,18 +55,26 @@ MODULE_PARM_DESC(disable_hugepages,
> >>
> >>  struct vfio_iommu {
> >>    struct list_head        domain_list;
> >> +  struct vfio_domain      *local_domain;
> >
> > Hi, Kirti, can you help explain the meaning of 'local" here? I have a hard 
> > time
> > to understand its intention... In your later change of vaddr_get_pfn, it's
> > even more confusing where get_user_pages_remote is used on a 'local_mm':
> >
> 
> 'local' in local_domain is to describe that the domain for local page
> tracking. 'local_mm' in vaddr_get_pfn() is local variable in
> vaddr_get_pfn() function.
>     struct mm_struct *local_mm = (mm ? mm : current->mm);
> 

'local page tracking' means track logic local to VFIO? Then when we say
'remote page tracking', who is remote? I would appreciate some code
comment to describe this definition, otherwise it's easily confusing when
'local' sometimes means who does page tracking, while other times 
it just means a local variable. At least when I read this patch, the 
immediate impression is that local_mm belongs to local_domain. :-)

Thanks
Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]