[PATCH 1/2] drm/amdgpu: set passthrough mode for xen pvh/hvm
Chen, Jiqian
Jiqian.Chen at amd.com
Wed Nov 13 08:13:42 UTC 2024
Hi,
On 2024/11/5 14:05, Jiqian Chen wrote:
> From: Huang Rui <ray.huang at amd.com>
>
> 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 at amd.com>
> Signed-off-by: Jiqian Chen <Jiqian.Chen at amd.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 b6397d3229e1..0836fb77b263 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -764,7 +764,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;
> }
>
Do you have any comments on this patch?
--
Best regards,
Jiqian Chen.
More information about the amd-gfx
mailing list