title: Basic functionalities of QEMU
body: <p>I have been trying to create a new <strong>"Custom machine"</strong> for <strong>QEMU</strong> and trying to understand the code structure of QEMU. There is a lot of help for QEMU's internal code structure like TCG etc.</p>
  
  <p>But I want to understand the functions or inherited functions and syntax used to write a custom machine. For example <code>SYS_BUS_DEVICE</code>, what is the definition of this? What are the usages, how to use etc.</p>
  
  <p>I am not sure if my question is even right or SYS_BUS_DEVICE is a user definition.  Can someone clarify this? Or point me to any documentation which describes the custom machine development.</p>
  
  <p>Every time I try to look for such code structure I end up with QEMU internal code. Are they both same? Is definitions like SYS_BUS_DEVICE is internal to QEMU?</p>