* Re: [PATCH] drm/amd/amdgpu: Not request init data for MS_HYPERV with vega10
[not found] ` <CADnq5_PSZX+11meHYn9CR3A4LiseGo30TwbkOuPgTQsfbYxmCg@mail.gmail.com>
@ 2022-04-12 8:01 ` Paul Menzel
2022-04-12 14:12 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Paul Menzel @ 2022-04-12 8:01 UTC (permalink / raw)
To: Alex Deucher, Yongqiang Sun
Cc: Jingwen Chen, Luo, Zhigang, amd-gfx, monk.liu, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, LKML
[Cc: +x86 folks]
Dear Alex, dear x86 folks,
x86 folks, can you think of alternatives to access `X86_HYPER_MS_HYPERV`
from `arch/x86/include/asm/hypervisor.h` without any preprocessor ifdef-ery?
Am 11.04.22 um 18:28 schrieb Alex Deucher:
> On Mon, Apr 11, 2022 at 11:28 AM Paul Menzel wrote:
[…]
>> Am 11.04.22 um 15:59 schrieb Yongqiang Sun:
>>> MS_HYPERV with vega10 doesn't have the interface to process
>>> request init data msg.
>>
>> Should some Hyper-V folks be added to the reviewers list too?
>>
>>> Check hypervisor type to not send the request for MS_HYPERV.
>>
>> Please add a blank line between paragraphs.
>>
>>> Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 12 ++++++++++--
>>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
>>> index 933c41f77c92..56b130ec44a9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
>>> @@ -23,6 +23,10 @@
>>>
>>> #include <linux/module.h>
>>>
>>> +#ifdef CONFIG_X86
>>> +#include <asm/hypervisor.h>
>>> +#endif
>>> +
>>> #include <drm/drm_drv.h>
>>>
>>> #include "amdgpu.h"
>>> @@ -721,8 +725,12 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
>>> break;
>>> case CHIP_VEGA10:
>>> soc15_set_virt_ops(adev);
>>> - /* send a dummy GPU_INIT_DATA request to host on vega10 */
>>> - amdgpu_virt_request_init_data(adev);
>>> +#ifdef CONFIG_X86
>>> + /* not send GPU_INIT_DATA with MS_HYPERV*/
>>> + if (hypervisor_is_type(X86_HYPER_MS_HYPERV) == false)
>>> +#endif
>>
>> Why guard everything with CONFIG_X86? (If it’s needed, it should be done
>> in C code.)
>
> X86_HYPER_MS_HYPERV only available on x86.
Sorry, I missed the X86 dependency when quickly looking at the Hyper-V
stub IOMMU driver `drivers/iommu/hyperv-iommu.c`, but missed that
`HYPERV_IOMMU` has `depends on HYPERV && X86`.
Kind regards,
Paul
>>> + /* send a dummy GPU_INIT_DATA request to host on vega10 */
>>> + amdgpu_virt_request_init_data(adev);
>>> break;
>>> case CHIP_VEGA20:
>>> case CHIP_ARCTURUS:
>>
>>
>> Kind regards,
>>
>> Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: Not request init data for MS_HYPERV with vega10
2022-04-12 8:01 ` [PATCH] drm/amd/amdgpu: Not request init data for MS_HYPERV with vega10 Paul Menzel
@ 2022-04-12 14:12 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-04-12 14:12 UTC (permalink / raw)
To: Paul Menzel
Cc: Yongqiang Sun, Jingwen Chen, Luo, Zhigang, amd-gfx list,
monk.liu, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, X86 ML, LKML
On Tue, Apr 12, 2022 at 4:01 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> [Cc: +x86 folks]
>
> Dear Alex, dear x86 folks,
>
>
> x86 folks, can you think of alternatives to access `X86_HYPER_MS_HYPERV`
> from `arch/x86/include/asm/hypervisor.h` without any preprocessor ifdef-ery?
I don't really see what problem that solves. X86_HYPER_MS_HYPERV is
an X86 thing. Why do we need a processor agnostic way to handle it?
Any code related to that is X86 specific.
Alex
>
>
> Am 11.04.22 um 18:28 schrieb Alex Deucher:
> > On Mon, Apr 11, 2022 at 11:28 AM Paul Menzel wrote:
>
> […]
>
> >> Am 11.04.22 um 15:59 schrieb Yongqiang Sun:
> >>> MS_HYPERV with vega10 doesn't have the interface to process
> >>> request init data msg.
> >>
> >> Should some Hyper-V folks be added to the reviewers list too?
> >>
> >>> Check hypervisor type to not send the request for MS_HYPERV.
> >>
> >> Please add a blank line between paragraphs.
> >>
> >>> Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
> >>> ---
> >>> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 12 ++++++++++--
> >>> 1 file changed, 10 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> >>> index 933c41f77c92..56b130ec44a9 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> >>> @@ -23,6 +23,10 @@
> >>>
> >>> #include <linux/module.h>
> >>>
> >>> +#ifdef CONFIG_X86
> >>> +#include <asm/hypervisor.h>
> >>> +#endif
> >>> +
> >>> #include <drm/drm_drv.h>
> >>>
> >>> #include "amdgpu.h"
> >>> @@ -721,8 +725,12 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
> >>> break;
> >>> case CHIP_VEGA10:
> >>> soc15_set_virt_ops(adev);
> >>> - /* send a dummy GPU_INIT_DATA request to host on vega10 */
> >>> - amdgpu_virt_request_init_data(adev);
> >>> +#ifdef CONFIG_X86
> >>> + /* not send GPU_INIT_DATA with MS_HYPERV*/
> >>> + if (hypervisor_is_type(X86_HYPER_MS_HYPERV) == false)
> >>> +#endif
> >>
> >> Why guard everything with CONFIG_X86? (If it’s needed, it should be done
> >> in C code.)
> >
> > X86_HYPER_MS_HYPERV only available on x86.
>
> Sorry, I missed the X86 dependency when quickly looking at the Hyper-V
> stub IOMMU driver `drivers/iommu/hyperv-iommu.c`, but missed that
> `HYPERV_IOMMU` has `depends on HYPERV && X86`.
>
>
> Kind regards,
>
> Paul
>
>
> >>> + /* send a dummy GPU_INIT_DATA request to host on vega10 */
> >>> + amdgpu_virt_request_init_data(adev);
> >>> break;
> >>> case CHIP_VEGA20:
> >>> case CHIP_ARCTURUS:
> >>
> >>
> >> Kind regards,
> >>
> >> Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-12 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220411135939.906700-1-yongqiang.sun@amd.com>
[not found] ` <f06ce5e3-158b-88a8-06f0-53b88c4fad45@molgen.mpg.de>
[not found] ` <CADnq5_PSZX+11meHYn9CR3A4LiseGo30TwbkOuPgTQsfbYxmCg@mail.gmail.com>
2022-04-12 8:01 ` [PATCH] drm/amd/amdgpu: Not request init data for MS_HYPERV with vega10 Paul Menzel
2022-04-12 14:12 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).