How to create out-of-tree QEMU devices?

前端 未结 3 922
离开以前
离开以前 2020-12-11 19:15

Two possible mechanisms come to mind:

  • IPC like the existing QMP and QAPI
  • QEMU loads a shared library plugin that contains the model

Req

3条回答
  •  再見小時候
    2020-12-11 19:40

    On Nov 11 2019 Peter Maydell, a major QEMU contributor, commented on another Stack Overflow question that:

    Device plugins are specifically off the menu, because upstream does not want to provide a nice easy mechanism for people to use to have out-of-tree non-GPL/closed-source devices.

    So it seems that QEMU devs oppose this idea at that point in time. It is worth learning about the QEMU plugin system though which might come handy for related applications in any case: How to count the number of guest instructions QEMU executed from the beginning to the end of a run?

    This is a shame. Imagine if the Linux kernel didn't have a kernel module interface! I suggest QEMU expose this interface, but just don't make it stable, so that it won't impose a developer burden, and which gives the upside that those who merge won't have as painful rebases.

提交回复
热议问题