[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230312120157.452859-4-ray.huang@amd.com>
Date: Sun, 12 Mar 2023 20:01:55 +0800
From: Huang Rui <ray.huang@....com>
To: Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Roger Pau Monné <roger.pau@...rix.com>,
<xen-devel@...ts.xenproject.org>, <linux-kernel@...r.kernel.org>,
<dri-devel@...ts.freedesktop.org>, <amd-gfx@...ts.freedesktop.org>
CC: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Stewart Hildebrand" <Stewart.Hildebrand@....com>,
Xenia Ragiadakou <burzalodowa@...il.com>,
Honglei Huang <honglei1.huang@....com>,
Julia Zhang <julia.zhang@....com>,
Chen Jiqian <Jiqian.Chen@....com>,
Huang Rui <ray.huang@....com>
Subject: [RFC PATCH 3/5] drm/amdgpu: set passthrough mode for xen pvh/hvm
There is an second stage translation between the guest machine address
and host machine address in Xen PVH/HVM. The PCI bar address in the xen
guest kernel are not translated at the second stage on Xen PVH/HVM, so
it's not the real physical address that hardware would like to know, so
we need to set passthrough mode for Xen PVH/HVM as well.
Signed-off-by: Huang Rui <ray.huang@....com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index f2e2cbaa7fde..7b4369eba19d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -743,7 +743,8 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
if (!reg) {
/* passthrough mode exclus sriov mod */
- if (is_virtual_machine() && !xen_initial_domain())
+ if (is_virtual_machine() &&
+ !(xen_initial_domain() && xen_pv_domain()))
adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
}
--
2.25.1
Powered by blists - more mailing lists