Xen ARM GPU passthrough without IOMMU
Quoted 1 line
Hi,
Hello,
Quoted 2 lines
I’m using the NXP i.mx8qxp men board and want to create an Android domu on Xen,
but this board doesn’t have IOMMU. Does anyone knows that can I passthrough GPU without IOMMU on it?
Device DMA-capable passthrough without IOMMU is not recommended as you would undermine the guest isolation from the rest of the platform.
I am not aware of any plan to support this in Xen for now. If you want to add
the support by yourself, you would then need to make sure the guest memory is
direct mapped (i.e the guest physical address = host physical address).
Another alternative is to use PV drivers for providing graphic access to your
Android guest.
I hope that helps.Thank you for your answer!Do you have some guide for PV drivers to run android domu? I can only run to the console in android but can't start the graphic successfully.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 20 lines · jinchen
Quoted 2 lines
Hi,
Hello,
> I’m using the NXP i.mx8qxp men board and want to create an
Android domu on Xen,
> but this board doesn’t have IOMMU. Does anyone knows that can I
passthrough GPU without IOMMU on it?
Device DMA-capable passthrough without IOMMU is not recommended as you would
undermine the guest isolation from the rest of the platform. I am not aware of any plan to support this in Xen for now. If you want to add
the support by yourself, you would then need to make sure the guest memory is
direct mapped (i.e the guest physical address = host physical address). Another alternative is to use PV drivers for providing graphic access to your
Android guest.
I hope that helps.
Quoted 3 lines
Thank you for your answer!
Do you have some guide for PV drivers to run android domu?
I can only run to the console in android but can't start the graphic successfully.
I am not familiar with Android running in guest. CCing some people that may know.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Hello,
Quoted 1 line · Julien Grall
I am not familiar with Android running in guest. CCing some people that may know.
Running Android in DomU is a pretty long story. And the initial thread topic is GPU passthrough without IOMMU.
So, Jinchen, could you please describe in details the setup you already have? What you have already run in Android in DomU?
Signature · 7 lines
Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · 在 2019年3月5日,下午9:26,Andrii Anisov <[email protected]> 写道:
Hello,
Quoted 1 line · Julien Grall
I am not familiar with Android running in guest. CCing some people that may know.
Running Android in DomU is a pretty long story. And the initial thread topic is GPU passthrough without IOMMU.
So, Jinchen, could you please describe in details the setup you already have? What you have already run in Android in DomU?
Signature · 2 lines
Sincerely, Andrii Anisov.
Thank you for your reply,
Now I can set the disk and some basic devices to run Android domu to console, The main issue is the display GUI of Android.
I can use the drm PV drivers at https://github.com/xen-troops/displ_be to set the drm driver, Or the next step is to research how to set drm device passthrough.
But the imxqxp board I use doesn’t have IOMMU, the GPU passthrough may have some problems. Do you have some tutorials about how to set display and GUI when running Android as domu?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hello Jinch,
Quoted 3 lines · Jinch
Thank you for your reply,
Now I can set the disk and some basic devices to run Android domu to console, The main issue is the display GUI of Android.
Here you should distinguish clearly display subsystem and 3D rendering engine. Yet you need them both for your Android showing you something. We have a quite generic PV DRM implementation, both FE and BE, which is called to serve as a display subsystem.
But 3D rendering is really vendor specific, and no generic approach implementation is known to me. Except software rendering for sure:)
You might look at the hwcomposer we are using in our setup [1], but it is still IMG specific in terms of 3D.
Quoted 2 lines
I can use the drm PV drivers at https://github.com/xen-troops/displ_be to set the drm driver, Or the next step is to research how to set drm device passthrough.
Sorry I didn't get that clearly. Do you say that you managed to bringup PV DRM for Android? Or it is your next step? And why do you say about DRM passthrough?
Quoted 1 line
But the imxqxp board I use doesn’t have IOMMU, the GPU passthrough may have some problems.
I guess you should ask your GPU vendor about their virtualization solution first. That might give you a clue how can you provide your GPU access to other VM address space. On our side we requested hypervisor to translate IPA to PA [2], and then fed those addresses to GPU from its driver. We do that for buggy silicon revision where GPU's IOMMU does not work. Yet it makes more boards available for development, rather than for production.
Quoted 1 line
Do you have some tutorials about how to set display and GUI when running Android as domu?
You might grab more information about PV DRM here [3].
XEN vdispl configuration you will find here [4].
Setting up Android display and GUI - you will not find any tutorials. You need your hwcomposer and gralloc which are 3D vendor specific, so contact your vendor.
[1] https://github.com/xen-troops/android_external_drm_hwcomposer/commits/android-9.0.0_r3-xt0.2
[2] https://github.com/xen-troops/xen/blob/master/xen/arch/arm/mm.c#L1332
[3] https://lwn.net/Articles/750258/
[4] https://xenbits.xen.org/docs/unstable-staging/man/xl.cfg.5.html#Devices
Signature · 7 lines
Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel