| 
    quic/qbox
    
   | 
 
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance initialization. More...
#include <qemu-instance.h>


Public Types | |
| enum | TcgMode { TCG_UNSPECIFIED , TCG_SINGLE , TCG_COROUTINE , TCG_MULTI } | 
| using | Target = qemu::Target | 
| using | LibLoader = qemu::LibraryLoaderIface | 
Public Member Functions | |
| void | add_dev (QemuDeviceBaseIF *d) | 
| void | del_dev (QemuDeviceBaseIF *d) | 
| bool | can_run () | 
| TcgMode | StringToTcgMode (std::string s) | 
| QemuInstance (const sc_core::sc_module_name &n, sc_core::sc_object *o, std::string arch) | |
| QemuInstance (const sc_core::sc_module_name &n, sc_core::sc_object *o, Target t) | |
| QemuInstance (const sc_core::sc_module_name &n, LibLoader &loader, Target t) | |
| QemuInstance (const QemuInstance &)=delete | |
| QemuInstance (QemuInstance &&)=delete | |
| bool | operator== (const QemuInstance &b) const | 
| bool | operator!= (const QemuInstance &b) const | 
| void | add_arg (const char *arg) | 
| Add a command line argument to the qemu instance.   | |
| void | set_display_arg (const char *arg) | 
| Add a the display command line argument to the qemu instance.   | |
| void | set_vnc_args (std::vector< std::string > &vnc_options) | 
| Add the VNC command line argument to the qemu instance.   | |
| TcgMode | get_tcg_mode () | 
| Get the TCG mode for this instance.   | |
| bool | is_kvm_enabled () const | 
| bool | is_hvf_enabled () const | 
| bool | is_tcg_enabled () const | 
| std::shared_ptr< gs::tlm_quantumkeeper_extended > | create_quantum_keeper () | 
| Get the TCG mode for this instance.   | |
| void | init () | 
| Initialize the QEMU instance.   | |
| bool | is_inited () const | 
| Returns true if the instance is initialized.  | |
| qemu::LibQemu & | get () | 
| Returns the underlying qemu::LibQemu instance.   | |
| QemuInstanceDmiManager & | get_dmi_manager () | 
| Returns the locked QemuInstanceDmiManager instance.   | |
| int | number_devices () | 
Public Attributes | |
| TargetSignalSocket< bool > | reset | 
| std::mutex | g_signaled_lock | 
| std::condition_variable | g_signaled_cond | 
| bool | g_signaled = false | 
| std::recursive_mutex | g_rec_qemu_io_lock | 
Protected Member Functions | |
| void | push_default_args () | 
| void | push_icount_mode_args () | 
| void | push_tcg_mode_args () | 
| void | push_accelerator_args () | 
| LibLoader & | get_loader (sc_core::sc_object *o) | 
| Target | strtotarget (std::string s) | 
Protected Attributes | |
| qemu::LibQemu | m_inst | 
| QemuInstanceDmiManager | m_dmi_mgr | 
| cci::cci_param< std::string > | p_tcg_mode | 
| cci::cci_param< std::string > | p_sync_policy | 
| TcgMode | m_tcg_mode | 
| cci::cci_param< bool > | p_icount | 
| cci::cci_param< int > | p_icount_mips | 
| cci::cci_param< std::string > | p_args | 
| bool | p_display_argument_set | 
| cci::cci_param< std::string > | p_accel | 
This class encapsulates a libqemu-cxx qemu::LibQemu instance. It handles QEMU parameters and instance initialization.
Add a command line argument to the qemu instance.
This method may only be called before the instance is initialized.
      
  | 
  inline | 
Get the TCG mode for this instance.
This method is called by CPU instances determin if to use coroutines or not.
      
  | 
  inline | 
Returns the underlying qemu::LibQemu instance.
Returns the underlying qemu::LibQemu instance. If the instance hasn't been initialized, init is called just before returning the instance.
      
  | 
  inline | 
Returns the locked QemuInstanceDmiManager instance.
Note: we rely on RVO here so no copy happen on return (this is enforced by the fact that the LockedQemuInstanceDmiManager copy constructor is deleted).
      
  | 
  inline | 
Get the TCG mode for this instance.
This method is called by CPU instances determin if to use coroutines or not.
      
  | 
  inline | 
Initialize the QEMU instance.
Initialize the QEMU instance with the set TCG and icount mode. If the TCG mode hasn't been set, it defaults to TCG_SINGLE. If icount mode hasn't been set, it defaults to ICOUNT_OFF.
The instance should not already be initialized when calling this method.
Add a the display command line argument to the qemu instance.
This method may only be called before the instance is initialized.
      
  | 
  inline | 
Add the VNC command line argument to the qemu instance.
This method may only be called before the instance is initialized.