lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93847593-3fe2-4292-b579-f65ebc3772ac@linux.intel.com>
Date:   Sat, 9 Dec 2023 15:57:11 +0800
From:   Baolu Lu <baolu.lu@...ux.intel.com>
To:     "Tian, Kevin" <kevin.tian@...el.com>,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        Jason Gunthorpe <jgg@...pe.ca>
Cc:     baolu.lu@...ux.intel.com,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/6] iommu/vt-d: Remove scalable mode context entry
 setup from attach_dev

On 12/8/23 4:56 PM, Tian, Kevin wrote:
>> From: Lu Baolu <baolu.lu@...ux.intel.com>
>> Sent: Tuesday, December 5, 2023 9:22 AM
>>
>>   static int domain_context_mapping_one(struct dmar_domain *domain,
>>   				      struct intel_iommu *iommu,
>> -				      struct pasid_table *table,
>>   				      u8 bus, u8 devfn)
> 
> since this is called in legacy now it's clearer to add a legacy_ prefix
> to this and other related functions.

Okay, that would make the code more readable.

>>
>> -	/* PASID table is mandatory for a PCI device in scalable mode. */
>> -	if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) {
>> -		/* Setup the PASID entry for requests without PASID: */
>> -		if (hw_pass_through && domain_type_is_si(domain))
>> -			ret = intel_pasid_setup_pass_through(iommu,
>> -					dev, IOMMU_NO_PASID);
>> -		else if (domain->use_first_level)
>> -			ret = domain_setup_first_level(iommu, domain, dev,
>> -					IOMMU_NO_PASID);
>> -		else
>> -			ret = intel_pasid_setup_second_level(iommu,
>> domain,
>> -					dev, IOMMU_NO_PASID);
>> -		if (ret) {
>> -			dev_err(dev, "Setup RID2PASID failed\n");
>> -			device_block_translation(dev);
>> -			return ret;
>> -		}
>> -	}
>> +	if (dev_is_real_dma_subdevice(dev))
>> +		return 0;
> 
> is it a functional change? old code doesn't early exit for such device.

This type of device is aliased to a RID on another bus. Therefore,
there's no need to set up the context and PASID table for them. I should
make the change mentioned above in a separate patch to make the
background clear.

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ