[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<BL1PR12MB584921467E47ABAA580D95F7E7532@BL1PR12MB5849.namprd12.prod.outlook.com>
Date: Wed, 6 Nov 2024 03:20:37 +0000
From: "Chen, Jiqian" <Jiqian.Chen@....com>
To: Christian König <ckoenig.leichtzumerken@...il.com>
CC: "Pan, Xinhui" <Xinhui.Pan@....com>, "Deucher, Alexander"
<Alexander.Deucher@....com>, "amd-gfx@...ts.freedesktop.org"
<amd-gfx@...ts.freedesktop.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Pelloux-Prayer, Pierre-Eric"
<Pierre-eric.Pelloux-prayer@....com>, "Chen, Jiqian" <Jiqian.Chen@....com>,
"Huang, Ray" <Ray.Huang@....com>, "Koenig, Christian"
<Christian.Koenig@....com>
Subject: Re: [PATCH 2/2] drm/amdgpu: Bypass resizing bars for PVH dom0
On 2024/11/5 21:42, Christian König wrote:
> Am 05.11.24 um 07:05 schrieb Jiqian Chen:
>> VPCI of Xen doesn't support resizable bar. When discrete GPU is used on
>> PVH dom0 which using the VPCI, amdgpu fails to probe, so we need to
>> disable this capability for PVH dom0.
>
> What do you mean VPCI doesn't support resizeable BAR?
VPCI is a virtual pci of Xen hypervisor used for PVH dom0, it is worked to emulate and process pci devices configuration space access, all that access will trap into Xen and handled by VPCI.
But the Resizable Bars capability is not emulated now.
>
> This is mandatory to be supported or otherwise general PCI resource assignment won't work either.
>
> In other words you can't hotplug something if that here doesn't work either.
Yes, once I added dGPU to Xen PVH dom0, it didn't work unless I added this patch to return success for Rebar.
>
> Regards,
> Christian.
>
>>
>> Signed-off-by: Jiqian Chen <Jiqian.Chen@....com>
>> Reviewed-by: Huang Rui <Ray.Huang@....com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index b3fb92bbd9e2..012feb3790dd 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -1619,6 +1619,10 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
>> if (!IS_ENABLED(CONFIG_PHYS_ADDR_T_64BIT))
>> return 0;
>> + /* Bypass for PVH dom0 which doesn't support resizable bar */
>> + if (xen_initial_domain() && xen_pvh_domain())
>> + return 0;
>> +
>> /* Bypass for VF */
>> if (amdgpu_sriov_vf(adev))
>> return 0;
>
--
Best regards,
Jiqian Chen.
Powered by blists - more mailing lists