Skip to contentSkip to conversation

gvt-next

GIT PULL Wang, Zhi A 6 participants 11 messages Apr 26, 2022 – Apr 28, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

----------------------------------------------------------------
gvt-next-2022-04-26

- Add two missing exports of symbols when i915 debug is enabled.

----------------------------------------------------------------
Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)
maintainer
#1 lore raw
Quoted 6 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Pulled, thanks.

BR,
Jani.

Quoted 27 lines

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

----------------------------------------------------------------
gvt-next-2022-04-26

- Add two missing exports of symbols when i915 debug is enabled.

----------------------------------------------------------------
Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#2 lore raw
Quoted 6 lines · Jani Nikula
Quoted 5 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Quoted 8 lines
Quoted 1 line

Thanks so much for the efforts.

Pulled, thanks.

BR,
Jani.

Quoted 1 line

I just updated the branch. Can you check a little bit if you got the newest one?

Quoted 27 lines
Quoted 26 lines

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

----------------------------------------------------------------
gvt-next-2022-04-26

- Add two missing exports of symbols when i915 debug is enabled.

----------------------------------------------------------------
Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)
#3 lore raw
In reply to Jani Nikula
Quoted 6 lines · Jani Nikula
Quoted 5 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Quoted 7 lines
Quoted 1 line

Thanks so much for the efforts.

Pulled, thanks.

BR,
Jani.

Thanks, looks good now. :)

thanks,
Zhi.

Quoted 28 lines
Quoted 27 lines

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

----------------------------------------------------------------
gvt-next-2022-04-26

- Add two missing exports of symbols when i915 debug is enabled.

----------------------------------------------------------------
Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)
Reviewed-by Jani Nikula
#4 lore raw
Quoted 7 lines · Zhi A
Quoted 6 lines · Jani Nikula
Quoted 5 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

Thanks so much for the efforts.

Pulled, thanks.

BR,
Jani.

Thanks, looks good now. :)

Great! Thanks everyone!

Alex, can you pull this to VFIO now too? The top commit should be:

commit 5e9ae5c47052e28a31fb4f55a6e735c28d4c3948

Author: Zhi Wang <[email protected]>
Date:   Mon Apr 25 18:03:31 2022 -0400

drm/i915/gvt: Add missing symbol export.

When CONFIG_DRM_I915_DEBUG_RUNTIME and CONFIG_DRM_I915_DEBUG_PM are enabled, two more extra symols in i915 are required to be exported.

Which was picked up here:

https://cgit.freedesktop.org/drm-intel/commit/?h=drm-intel-next&id=f08699ec5bd924be4c9572e21fd0a806d3fb34c2

It will have these commits:

5e9ae5c47052e2 drm/i915/gvt: Add missing symbol export.
2917f53113be3b vfio/mdev: Remove mdev drvdata
2aa72ec97ce9eb vfio/mdev: Use the driver core to create the 'remove' file 6b42f491e17ce1 vfio/mdev: Remove mdev_parent_ops
e6486939d8ea22 vfio/mdev: Remove mdev_parent_ops dev_attr_groups 6c7f98b334a32d vfio/mdev: Remove vfio_mdev.c
cba619cb0d4d66 drm/i915/gvt: merge gvt.c into kvmgvt.c
978cf586ac35f3 drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev 0e09f4066ad11b drm/i915/gvt: remove kvmgt_guest_{init,exit}
7f11e6893ff01b drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpers 4456641232e2c1 drm/i915/gvt: streamline intel_vgpu_create
37e4bdbd5bad71 drm/i915/gvt: remove the extra vfio_device refcounting for dmabufs 5f8f3fe67cd908 drm/i915/gvt: remove struct intel_gvt_mpt
91879bbaf8890f drm/i915/gvt: devirtualize dma_pin_guest_page
8398eee85fd009 drm/i915/gvt: devirtualize ->dma_{,un}map_guest_page 4c2baaaf764bfb drm/i915/gvt: devirtualize ->{enable,disable}_page_track 4050dab5981cd4 drm/i915/gvt: devirtualize ->gfn_to_mfn
bd73b4b193d450 drm/i915/gvt: devirtualize ->is_valid_gfn
b3bece34956f86 drm/i915/gvt: devirtualize ->inject_msi
4c705ad0d784fd drm/i915/gvt: devirtualize ->detach_vgpu
f9399b0e4a9555 drm/i915/gvt: devirtualize ->set_edid and ->set_opregion fe902f0ce686e8 drm/i915/gvt: devirtualize ->{get,put}_vfio_device e3d7640eeeb306 drm/i915/gvt: devirtualize ->{read,write}_gpa
3c340d05868d98 drm/i915/gvt: remove vgpu->handle
10ddb96295f3bd drm/i915/gvt: merge struct kvmgt_guest_info into strut intel_vgpu 62980cacc37f58 drm/i915/gvt: merge struct kvmgt_vdev into struct intel_vgpu 3cbac24c2cdbfe drm/i915/gvt: remove the unused from_virt_to_mfn op c977092a997708 drm/i915/gvt: remove the map_gfn_to_mfn and set_trap_area ops 675e5c4a33e20c drm/i915/gvt: remove intel_gvt_ops
8b750bf744181c drm/i915/gvt: move the gvt code into kvmgt.ko
f49fc35799fa63 drm/i915/gvt: rename intel_vgpu_ops to intel_vgpu_mdev_ops 367748066eeb37 drm/i915/gvt: remove enum hypervisor_type
a85749e12d66c2 drm/i915/gvt: remove module refcounting in intel_gvt_{,un}register_hypervisor 7f0cf30187cdb1 drm/i915/gvt: better align the Makefile with i915 Makefile de5d437ae8696a drm/i915/gvt: fix trace TRACE_INCLUDE_PATH
1672991412dfef i915/gvt: Use the initial HW state snapshot saved in i915 66e7a8063381cb i915/gvt: Save the initial HW state snapshot in i915 e0f74ed4634d6d i915/gvt: Separate the MMIO tracking table from GVT-g

Thanks,
Jason

#5 lore raw
Quoted 12 lines · On Tue, 26 Apr 2022 08:52:58 -0300 Jason Gunthorpe <[email protected]> wrote:
Quoted 11 lines · Zhi A
Quoted 10 lines · Jani Nikula
Quoted 6 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Pulled, thanks.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

BR,
Jani.

Thanks, looks good now. :)

Great! Thanks everyone!

Alex, can you pull this to VFIO now too? The top commit should be:

I see a gvt-next-2022-04-29 tag adding the following fixes:

419f8299ddad i915/gvt: Fix NULL pointer dereference in init_mmio_block_handlers 5b95b9d58fb0 drm/i915/gvt: Fix the compiling error when CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n fa630c304b93 drm/i915/gvt: Make intel_gvt_match_device() static

I'm expecting that's my new merge target once a pull request is completed for that. Please keep me cc'd. Thanks,

Alex

Quoted 63 lines

commit 5e9ae5c47052e28a31fb4f55a6e735c28d4c3948

Author: Zhi Wang <[email protected]>
Date:   Mon Apr 25 18:03:31 2022 -0400

drm/i915/gvt: Add missing symbol export.

When CONFIG_DRM_I915_DEBUG_RUNTIME and CONFIG_DRM_I915_DEBUG_PM are enabled, two more extra symols in i915 are required to be exported.

Which was picked up here:

https://cgit.freedesktop.org/drm-intel/commit/?h=drm-intel-next&id=f08699ec5bd924be4c9572e21fd0a806d3fb34c2

It will have these commits:

5e9ae5c47052e2 drm/i915/gvt: Add missing symbol export.
2917f53113be3b vfio/mdev: Remove mdev drvdata
2aa72ec97ce9eb vfio/mdev: Use the driver core to create the 'remove' file 6b42f491e17ce1 vfio/mdev: Remove mdev_parent_ops
e6486939d8ea22 vfio/mdev: Remove mdev_parent_ops dev_attr_groups 6c7f98b334a32d vfio/mdev: Remove vfio_mdev.c
cba619cb0d4d66 drm/i915/gvt: merge gvt.c into kvmgvt.c
978cf586ac35f3 drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev 0e09f4066ad11b drm/i915/gvt: remove kvmgt_guest_{init,exit}
7f11e6893ff01b drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpers 4456641232e2c1 drm/i915/gvt: streamline intel_vgpu_create
37e4bdbd5bad71 drm/i915/gvt: remove the extra vfio_device refcounting for dmabufs 5f8f3fe67cd908 drm/i915/gvt: remove struct intel_gvt_mpt
91879bbaf8890f drm/i915/gvt: devirtualize dma_pin_guest_page
8398eee85fd009 drm/i915/gvt: devirtualize ->dma_{,un}map_guest_page 4c2baaaf764bfb drm/i915/gvt: devirtualize ->{enable,disable}_page_track 4050dab5981cd4 drm/i915/gvt: devirtualize ->gfn_to_mfn
bd73b4b193d450 drm/i915/gvt: devirtualize ->is_valid_gfn
b3bece34956f86 drm/i915/gvt: devirtualize ->inject_msi
4c705ad0d784fd drm/i915/gvt: devirtualize ->detach_vgpu
f9399b0e4a9555 drm/i915/gvt: devirtualize ->set_edid and ->set_opregion fe902f0ce686e8 drm/i915/gvt: devirtualize ->{get,put}_vfio_device e3d7640eeeb306 drm/i915/gvt: devirtualize ->{read,write}_gpa
3c340d05868d98 drm/i915/gvt: remove vgpu->handle
10ddb96295f3bd drm/i915/gvt: merge struct kvmgt_guest_info into strut intel_vgpu 62980cacc37f58 drm/i915/gvt: merge struct kvmgt_vdev into struct intel_vgpu 3cbac24c2cdbfe drm/i915/gvt: remove the unused from_virt_to_mfn op c977092a997708 drm/i915/gvt: remove the map_gfn_to_mfn and set_trap_area ops 675e5c4a33e20c drm/i915/gvt: remove intel_gvt_ops
8b750bf744181c drm/i915/gvt: move the gvt code into kvmgt.ko
f49fc35799fa63 drm/i915/gvt: rename intel_vgpu_ops to intel_vgpu_mdev_ops 367748066eeb37 drm/i915/gvt: remove enum hypervisor_type
a85749e12d66c2 drm/i915/gvt: remove module refcounting in intel_gvt_{,un}register_hypervisor 7f0cf30187cdb1 drm/i915/gvt: better align the Makefile with i915 Makefile de5d437ae8696a drm/i915/gvt: fix trace TRACE_INCLUDE_PATH
1672991412dfef i915/gvt: Use the initial HW state snapshot saved in i915 66e7a8063381cb i915/gvt: Save the initial HW state snapshot in i915 e0f74ed4634d6d i915/gvt: Separate the MMIO tracking table from GVT-g

Thanks,
Jason

#6 lore raw
Quoted 24 lines · On Thu, 28 Apr 2022 15:35:58 -0600 Alex Williamson…
Quoted 12 lines · On Tue, 26 Apr 2022 08:52:58 -0300 Jason Gunthorpe <[email protected]> wrote:
Quoted 11 lines · Zhi A
Quoted 10 lines · Jani Nikula
Quoted 6 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Pulled, thanks.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

BR,
Jani.

Thanks, looks good now. :)

Great! Thanks everyone!

Alex, can you pull this to VFIO now too? The top commit should be:

Quoted 8 lines

I see a gvt-next-2022-04-29 tag adding the following fixes:

419f8299ddad i915/gvt: Fix NULL pointer dereference in init_mmio_block_handlers 5b95b9d58fb0 drm/i915/gvt: Fix the compiling error when CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n fa630c304b93 drm/i915/gvt: Make intel_gvt_match_device() static

I'm expecting that's my new merge target once a pull request is completed for that. Please keep me cc'd. Thanks,

Oops, I see the new pull request for this tag came in while I was writing this. I'll keep an eye for it to be merged. Thanks,

Alex

Quoted 64 lines
Quoted 63 lines

commit 5e9ae5c47052e28a31fb4f55a6e735c28d4c3948

Author: Zhi Wang <[email protected]>
Date:   Mon Apr 25 18:03:31 2022 -0400

drm/i915/gvt: Add missing symbol export.

When CONFIG_DRM_I915_DEBUG_RUNTIME and CONFIG_DRM_I915_DEBUG_PM are enabled, two more extra symols in i915 are required to be exported.

Which was picked up here:

https://cgit.freedesktop.org/drm-intel/commit/?h=drm-intel-next&id=f08699ec5bd924be4c9572e21fd0a806d3fb34c2

It will have these commits:

5e9ae5c47052e2 drm/i915/gvt: Add missing symbol export.
2917f53113be3b vfio/mdev: Remove mdev drvdata
2aa72ec97ce9eb vfio/mdev: Use the driver core to create the 'remove' file 6b42f491e17ce1 vfio/mdev: Remove mdev_parent_ops
e6486939d8ea22 vfio/mdev: Remove mdev_parent_ops dev_attr_groups 6c7f98b334a32d vfio/mdev: Remove vfio_mdev.c
cba619cb0d4d66 drm/i915/gvt: merge gvt.c into kvmgvt.c
978cf586ac35f3 drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev 0e09f4066ad11b drm/i915/gvt: remove kvmgt_guest_{init,exit}
7f11e6893ff01b drm/i915/gvt: pass a struct intel_vgpu to the vfio read/write helpers 4456641232e2c1 drm/i915/gvt: streamline intel_vgpu_create
37e4bdbd5bad71 drm/i915/gvt: remove the extra vfio_device refcounting for dmabufs 5f8f3fe67cd908 drm/i915/gvt: remove struct intel_gvt_mpt
91879bbaf8890f drm/i915/gvt: devirtualize dma_pin_guest_page
8398eee85fd009 drm/i915/gvt: devirtualize ->dma_{,un}map_guest_page 4c2baaaf764bfb drm/i915/gvt: devirtualize ->{enable,disable}_page_track 4050dab5981cd4 drm/i915/gvt: devirtualize ->gfn_to_mfn
bd73b4b193d450 drm/i915/gvt: devirtualize ->is_valid_gfn
b3bece34956f86 drm/i915/gvt: devirtualize ->inject_msi
4c705ad0d784fd drm/i915/gvt: devirtualize ->detach_vgpu
f9399b0e4a9555 drm/i915/gvt: devirtualize ->set_edid and ->set_opregion fe902f0ce686e8 drm/i915/gvt: devirtualize ->{get,put}_vfio_device e3d7640eeeb306 drm/i915/gvt: devirtualize ->{read,write}_gpa
3c340d05868d98 drm/i915/gvt: remove vgpu->handle
10ddb96295f3bd drm/i915/gvt: merge struct kvmgt_guest_info into strut intel_vgpu 62980cacc37f58 drm/i915/gvt: merge struct kvmgt_vdev into struct intel_vgpu 3cbac24c2cdbfe drm/i915/gvt: remove the unused from_virt_to_mfn op c977092a997708 drm/i915/gvt: remove the map_gfn_to_mfn and set_trap_area ops 675e5c4a33e20c drm/i915/gvt: remove intel_gvt_ops
8b750bf744181c drm/i915/gvt: move the gvt code into kvmgt.ko
f49fc35799fa63 drm/i915/gvt: rename intel_vgpu_ops to intel_vgpu_mdev_ops 367748066eeb37 drm/i915/gvt: remove enum hypervisor_type
a85749e12d66c2 drm/i915/gvt: remove module refcounting in intel_gvt_{,un}register_hypervisor 7f0cf30187cdb1 drm/i915/gvt: better align the Makefile with i915 Makefile de5d437ae8696a drm/i915/gvt: fix trace TRACE_INCLUDE_PATH
1672991412dfef i915/gvt: Use the initial HW state snapshot saved in i915 66e7a8063381cb i915/gvt: Save the initial HW state snapshot in i915 e0f74ed4634d6d i915/gvt: Separate the MMIO tracking table from GVT-g

Thanks,
Jason

#7 lore raw
In reply to Wang, Zhi A
Quoted 24 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

gvt-next-2022-04-26

Quoted 7 lines

- Add two missing exports of symbols when i915 debug is enabled.

Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)

This still has another compile problem:

ERROR: modpost: "intel_runtime_pm_put" [vmlinux] is a static EXPORT_SYMBOL_GPL

Because:

#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref); #else
static inline void
intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref)

{
        intel_runtime_pm_put_unchecked(rpm);
}

#endif

Looks like it happens if CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n

I think you probably want to #ifdef the export in the same way:

drivers/gpu/drm/i915/intel_gvt.c +2 -0
@@ -309,7 +309,9 @@ EXPORT_SYMBOL_NS_GPL(__intel_context_do_pin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(__intel_context_do_unpin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_ring_begin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_get, I915_GVT);
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put, I915_GVT);
+#endif
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put_unchecked, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_for_reg, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_get, I915_GVT);

Jason

#8 lore raw
Quoted 56 lines · Jason Gunthorpe
Quoted 24 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

gvt-next-2022-04-26

Quoted 7 lines

- Add two missing exports of symbols when i915 debug is enabled.

Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

 drivers/gpu/drm/i915/intel_gvt.c | 2 ++
 1 file changed, 2 insertions(+)

This still has another compile problem:

ERROR: modpost: "intel_runtime_pm_put" [vmlinux] is a static EXPORT_SYMBOL_GPL

Because:

#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref); #else
static inline void
intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref)

{
        intel_runtime_pm_put_unchecked(rpm);
}

#endif

Looks like it happens if CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n

I think you probably want to #ifdef the export in the same way:

drivers/gpu/drm/i915/intel_gvt.c EXPORT_SYMBOL_NS_GPL(__intel_context_do_pin, I915_GVT); · line 314

Quoted 6 lines
drivers/gpu/drm/i915/intel_gvt.c +2 -0
@@ -309,7 +309,9 @@ EXPORT_SYMBOL_NS_GPL(__intel_context_do_pin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(__intel_context_do_unpin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_ring_begin, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_get, I915_GVT);
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put, I915_GVT);
+#endif

Sigh. That's tricky. Let me prepare another one.

Quoted 6 lines
drivers/gpu/drm/i915/intel_gvt.c +0 -0
 EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put_unchecked, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_for_reg, I915_GVT);
 EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_get, I915_GVT);

Jason

#9 lore raw
Quoted 54 lines · Zhi A
Quoted 53 lines · Jason Gunthorpe
Quoted 24 lines · Zhi A

Hi folks:

Here is the pull of gvt-next which fixs the compilation error when i915 debug is open after the GVT-g refactor patches.

Thanks so much for the efforts.

Thanks,
Zhi.

The following changes since commit 2917f53113be3b7a0f374e02cebe6d6b749366b5:

   vfio/mdev: Remove mdev drvdata (2022-04-21 07:36:56 -0400)

are available in the Git repository at:

   https://github.com/intel/gvt-linux tags/gvt-next-2022-04-26

for you to fetch changes up to 2da299cee780ea797b3f72558687868072cf5eb5:

   drm/i915/gvt: Add missing export of symbols. (2022-04-25 18:03:04 -0400)

gvt-next-2022-04-26

Quoted 7 lines

- Add two missing exports of symbols when i915 debug is enabled.

Zhi Wang (1):
drm/i915/gvt: Add missing export of symbols.

  drivers/gpu/drm/i915/intel_gvt.c | 2 ++
  1 file changed, 2 insertions(+)

This still has another compile problem:

ERROR: modpost: "intel_runtime_pm_put" [vmlinux] is a static EXPORT_SYMBOL_GPL

Because:

#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref); #else
static inline void
intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref)

{
         intel_runtime_pm_put_unchecked(rpm);
}

#endif

Looks like it happens if CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n

I think you probably want to #ifdef the export in the same way:

Quoted 10 lines

drivers/gpu/drm/i915/intel_gvt.c EXPORT_SYMBOL_NS_GPL(__intel_context_do_pin, I915_GVT); · line 314

Quoted 9 lines
drivers/gpu/drm/i915/intel_gvt.c +2 -0
@@ -309,7 +309,9 @@ EXPORT_SYMBOL_NS_GPL(__intel_context_do_pin, I915_GVT);
  EXPORT_SYMBOL_NS_GPL(__intel_context_do_unpin, I915_GVT);
  EXPORT_SYMBOL_NS_GPL(intel_ring_begin, I915_GVT);
  EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_get, I915_GVT);
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
  EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put, I915_GVT);
+#endif

Sigh. That's tricky. Let me prepare another one.

Also the following compile error:

drivers/gpu/drm/i915/gvt/handlers.c:75:6: error: no previous prototype for ‘intel_gvt_match_device’ [-Werror=missing-prototypes]

75 | bool intel_gvt_match_device(struct intel_gvt *gvt,

      |      ^~~~~~~~~~~~~~~~~~~~~~

it was removed from a header. The implementation should now be made static

Quoted 7 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_gvt.c +0 -0
  EXPORT_SYMBOL_NS_GPL(intel_runtime_pm_put_unchecked, I915_GVT);
  EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_for_reg, I915_GVT);
  EXPORT_SYMBOL_NS_GPL(intel_uncore_forcewake_get, I915_GVT);

Jason

#10 lore raw

[Intel-gfx] ✗ Fi.CI.BUILD: failure for gvt-next (rev2)

In reply to Wang, Zhi A
== Series Details ==

== Series Details ==

Series: gvt-next (rev2)
URL : https://patchwork.freedesktop.org/series/102952/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/102952/revisions/2/mbox/ not applied
Applying: gvt-next
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/intel_gvt.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 gvt-next
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".