[PATCH] drm/amd/amdgpu: Not request init data for MS_HYPERV with vega10

Alex Deucher alexdeucher at gmail.com
Mon Apr 11 16:28:28 UTC 2022


On Mon, Apr 11, 2022 at 11:28 AM Paul Menzel <pmenzel at molgen.mpg.de> wrote:
>
> Dear Yongqiang,
>
>
> Thank you for your patch.
>
> 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 at 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.

Alex

>
> > +                             /* 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


More information about the amd-gfx mailing list