mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: gv100: add IPA to PA translation
Add IPA to PA translation for GV100 nvlink / pass-through mode - define platform->phys_addr(g, ipa) method - call nvgpu_init_soc_vars from nvgpu_tegra_pci_probe - in nvgpu_init_soc_vars, define set platform->phys_addr to nvgpu_tegra_hv_ipa_pa, if hypervisor is present. - in __nvgpu_sgl_phys, use sg_phys, then apply platform->phys_addr if defined. - implement IPA to PA translation in nvgpu_tegra_hv_ipa_pa Bug 200392719 Change-Id: I622049ddc62c2a57a665dd259c1bb4ed3843a537 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1673582 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Richard Zhao <rizhao@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6c33a010d8
commit
c6e8257c44
@@ -121,6 +121,9 @@ struct gk20a_platform {
|
||||
*/
|
||||
u32 default_pri_timeout;
|
||||
|
||||
/* guest/vm id, needed for IPA to PA transation */
|
||||
int vmid;
|
||||
|
||||
/* Initialize the platform interface of the gk20a driver.
|
||||
*
|
||||
* The platform implementation of this function must
|
||||
@@ -204,6 +207,12 @@ struct gk20a_platform {
|
||||
*/
|
||||
void (*dump_platform_dependencies)(struct device *dev);
|
||||
|
||||
/* Defined when SMMU stage-2 is enabled, and we need to use physical
|
||||
* addresses (not IPA). This is the case for GV100 nvlink in HV+L
|
||||
* configuration, when dGPU is in pass-through mode.
|
||||
*/
|
||||
u64 (*phys_addr)(struct gk20a *g, u64 ipa);
|
||||
|
||||
/* Callbacks to assert/deassert GPU reset */
|
||||
int (*reset_assert)(struct device *dev);
|
||||
int (*reset_deassert)(struct device *dev);
|
||||
|
||||
Reference in New Issue
Block a user