RE: [PATCH v5 3/9] iommu: Add attachment handle to struct iopf_group

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

 



> From: Baolu Lu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Sunday, May 19, 2024 10:04 PM
> 
> On 2024/5/15 15:31, Tian, Kevin wrote:
> >> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> >> Sent: Tuesday, April 30, 2024 10:57 PM
> >>
> >> +	handle = iommu_attach_handle_get(dev->iommu_group, pasid, 0);
> >> +	if (IS_ERR(handle))
> >> +		return PTR_ERR(handle);
> >>
> >> -	if (!domain || !domain->iopf_handler) {
> >> -		dev_warn_ratelimited(dev,
> >> -			"iopf (pasid %d) without domain attached or handler
> >> installed\n",
> >> -			 fault->prm.pasid);
> >> +	group->attach_handle = handle;
> >> +	group->domain = handle->domain;
> >
> > this change also removes the warning message. Is it desired?
> 
> Not desired.
> 
> Perhaps we can add a message when the iopf handling is aborted.
> Something like below:
> 
> err_abort:
> +        dev_warn_ratelimited(dev, "iopf with pasid %d aborted\n",
> +                             fault->prm.pasid);
>          iopf_group_response(group, IOMMU_PAGE_RESP_FAILURE);
> 
> Though I am not sure which is better dev_warn() or dev_info().
> 

yes this works. dev_warn() is fine as long as we don't expect it to
happen in sane cases.




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux