Commit baa0db4
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 52b6cd5 commit baa0db4
1 file changed
Lines changed: 38 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
657 | | - | |
| 659 | + | |
| 660 | + | |
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
| |||
683 | 686 | | |
684 | 687 | | |
685 | 688 | | |
686 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
687 | 708 | | |
688 | 709 | | |
689 | 710 | | |
690 | 711 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | 712 | | |
695 | 713 | | |
696 | 714 | | |
697 | 715 | | |
698 | 716 | | |
699 | 717 | | |
| 718 | + | |
| 719 | + | |
700 | 720 | | |
701 | 721 | | |
702 | 722 | | |
| |||
901 | 921 | | |
902 | 922 | | |
903 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
904 | 936 | | |
905 | 937 | | |
906 | 938 | | |
| |||
0 commit comments