From: "Christian König" <christian.koenig@amd.com>
To: "Chen, Jiqian" <Jiqian.Chen@amd.com>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Pelloux-Prayer,
Pierre-Eric" <Pierre-eric.Pelloux-prayer@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>
Subject: Re: [PATCH 2/2] drm/amdgpu: Bypass resizing bars for PVH dom0
Date: Wed, 6 Nov 2024 16:50:19 +0100 [thread overview]
Message-ID: <228fa4cd-1e2d-40f6-8c63-15a9d6f90a04@amd.com> (raw)
In-Reply-To: <BL1PR12MB584921467E47ABAA580D95F7E7532@BL1PR12MB5849.namprd12.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]
Am 06.11.24 um 04:20 schrieb Chen, Jiqian:
> 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.
That must be changed or otherwise you will run into more problems on
hotplug for example.
>> 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.
That's only the tip of the iceberg. You are trying to mitigate symptoms
instead of fixing the underlying problem.
So clear NAK from my side for this approach.
Regards,
Christian.
>
>> Regards,
>> Christian.
>>
>>> Signed-off-by: Jiqian Chen<Jiqian.Chen@amd.com>
>>> Reviewed-by: Huang Rui<Ray.Huang@amd.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;
[-- Attachment #2: Type: text/html, Size: 4003 bytes --]
next prev parent reply other threads:[~2024-11-06 15:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 6:05 [PATCH 0/2] Fix some issues when using amdgpu on XEN PVH dom0 Jiqian Chen
2024-11-05 6:05 ` [PATCH 1/2] drm/amdgpu: set passthrough mode for xen pvh/hvm Jiqian Chen
2024-11-13 8:13 ` Chen, Jiqian
2024-11-05 6:05 ` [PATCH 2/2] drm/amdgpu: Bypass resizing bars for PVH dom0 Jiqian Chen
2024-11-05 11:58 ` kernel test robot
2024-11-05 13:42 ` Christian König
2024-11-06 3:20 ` Chen, Jiqian
2024-11-06 15:50 ` Christian König [this message]
2024-11-07 2:17 ` Chen, Jiqian
2024-11-05 16:49 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=228fa4cd-1e2d-40f6-8c63-15a9d6f90a04@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Jiqian.Chen@amd.com \
--cc=Pierre-eric.Pelloux-prayer@amd.com \
--cc=Ray.Huang@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox