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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Aug 2020 06:51:03 +0000
From:   FelixCui-oc <FelixCui-oc@...oxin.com>
To:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "David Woodhouse" <dwmw2@...radead.org>
CC:     RaymondPang-oc <RaymondPang-oc@...oxin.com>,
        CobeChen-oc <CobeChen-oc@...oxin.com>
Subject: 答复: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d:Add support for ACPI device in RMRR

Hi  baolu,
		>Sure. Before that, let me sync my understanding with you. You have an acpi namespace device in ANDD table, it also shows up in the device scope of a RMRR. 
		>Current code doesn't enumerate that device for the RMRR, hence iommu_create_device_direct_mappings() doesn't work for this device.

		>At the same time, probe_acpi_namespace_devices() doesn't work for this device, hence you want to add a home-made
		>acpi_device_create_direct_mappings() helper.

		Your understanding is right. 
		But there is a problem that even if the namespace device in rmrr is enumerated in the code, probe_acpi_namespace_devices() also doesn't work for this device.
		This is because the dev parameter of the iommu_create_device_direct_mappings() is not the namespace device in RMRR.
		The actual parameter passed in is the namespace device's physical node device.
		In iommu_create_device_direct_mappings(), the physical node device passed in cannot match the namespace device in rmrr->device[],right?
		We need acpi_device_create_direct_mappings() helper ? 

		In addition, adev->physical_node_list is related to the __HID of namespace device reported by the bios.
		For example, if the __HID reported by the bios belongs to acpi_pnp_device_ids[], adev->physical_node_list has no devices.
		So in acpi_device_create_direct_mappings(), I added the case that adev->physical_node_list is empty.


Best regards
Felix cui


 

-----邮件原件-----
发件人: Lu Baolu <baolu.lu@...ux.intel.com> 
发送时间: 2020年8月6日 10:36
收件人: FelixCui-oc <FelixCui-oc@...oxin.com>; Joerg Roedel <joro@...tes.org>; iommu@...ts.linux-foundation.org; linux-kernel@...r.kernel.org; David Woodhouse <dwmw2@...radead.org>
抄送: baolu.lu@...ux.intel.com; RaymondPang-oc <RaymondPang-oc@...oxin.com>; CobeChen-oc <CobeChen-oc@...oxin.com>
主题: Re: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d:Add support for ACPI device in RMRR

Hi Felix,

On 8/5/20 3:37 PM, FelixCui-oc wrote:
> Hi baolu,
> 		Let me talk about why acpi_device_create_direct_mappings() is needed and please tell me if there is an error.

Sure. Before that, let me sync my understanding with you. You have an acpi namespace device in ANDD table, it also shows up in the device scope of a RMRR. Current code doesn't enumerate that device for the RMRR, hence iommu_create_device_direct_mappings() doesn't work for this device.

At the same time, probe_acpi_namespace_devices() doesn't work for this device, hence you want to add a home-made
acpi_device_create_direct_mappings() helper.

Did I get it right?

> 		In the probe_acpi_namespace_devices() function, only the device in the addev->physical_node_list is probed,
> 		but we need to establish identity mapping for the namespace device in RMRR. These are two different devices.

The namespace device has been probed and put in one drhd's device list.
Hence, it should be processed by probe_acpi_namespace_devices(). So the question is why there are no devices in addev->physical_node_list?

> 		Therefore, the namespace device in RMRR is not mapped in probe_acpi_namespace_devices().
> 		acpi_device_create_direct_mappings() is to create direct mappings for namespace devices in RMRR.

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ