Commit e0d833e
committed
accel/amdxdna: Add KVM/QEMU support for expandable device heap
Add support for device heap expansion when running under KVM/QEMU
where heap chunks are imported via dma-buf rather than allocated
as shmem objects.
- amdxdna_gem_dev_obj_vmap: Handle imported heap chunks that have
sgt (scatter-gather table) but no pages array. Use
for_each_sgtable_page() to gather pages from the chunk's sgt when
chunk->base.pages is NULL. Add error logging for chunks with neither
pages nor sgt, and for page count mismatches.
- amdxdna_gem_vmap: Include BO type in error messages for easier
debugging.
- amdxdna_drm_expand_dev_heap: Pre-set expansion chunk UVA based on
the heap base address plus current total heap size, so GET_BO_INFO
returns the expected contiguous address for the shim/vxdna to
MAP_FIXED mmap at.
Signed-off-by: Wendy Liang <wendy.liang@amd.com>1 parent ba87455 commit e0d833e
1 file changed
+38
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
676 | | - | |
| 678 | + | |
| 679 | + | |
677 | 680 | | |
678 | 681 | | |
679 | 682 | | |
| |||
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
705 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
706 | 727 | | |
707 | 728 | | |
708 | 729 | | |
709 | 730 | | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | 731 | | |
714 | 732 | | |
715 | 733 | | |
716 | 734 | | |
717 | 735 | | |
718 | 736 | | |
| 737 | + | |
| 738 | + | |
719 | 739 | | |
720 | 740 | | |
721 | 741 | | |
| |||
921 | 941 | | |
922 | 942 | | |
923 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
924 | 956 | | |
925 | 957 | | |
926 | 958 | | |
| |||
0 commit comments