sim: Use pybind11 consistently in sim/init.(hh|cc).

Use pybind11 to avoid having to use the python C API directly, which is
simpler, easier to read, and less error prone. Also, use its
PYBIND11_EMBEDDED_MODULE macro to set up the _m5 module instead of a
callback which has to be proactively called from main().

Change-Id: I9c8bcebea934844d16a1fdd88f66a5e66ef0486f
Maintainer: Bobby Bruce <>
Reviewed-by: Gabe Black <>
Reviewed-by: Jason Lowe-Power <>
Tested-by: kokoro <>
3 files changed