1. 15 3月, 2016 6 次提交
    • J
      qemu: Introduce qemuBuildRNGCommandLine · b12acd31
      John Ferlan 提交于
      Add new function to manage adding the RNG device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also modify the qemuBuildRNGDevStr to use const virDomainDef instead
      of virDomainDefPtr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b12acd31
    • J
      qemu: Introduce qemuBuildMemballoonCommandLine · 00e47796
      John Ferlan 提交于
      Add new function to manage adding the memballoon device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also modify the qemuBuildMemballoonDevStr to use const virDomainDef
      instead of virDomainDefPtr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      00e47796
    • J
      qemu: Introduce qemuBuildHostdevCommandLine · d2108df5
      John Ferlan 提交于
      Add new function to manage adding the host device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also modify qemuBuildPCIHostdevDevStr, qemuBuildUSBHostdevDevStr,
      and qemuBuildSCSIHostdevDevStr to use const virDomainDef instead
      of virDomainDefPtr.
      
      Make qemuBuildPCIHostdevPCIDevStr and qemuBuildUSBHostdevUSBDevStr
      static to the qemu_command.c.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d2108df5
    • J
      qemu: Introduce qemuBuildRedirdevCommandLine · 59e7ef3c
      John Ferlan 提交于
      Add new function to manage adding the redirdev device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also move the qemuBuildRedirdevDevStr closer to the new function and
      modify to use the const virDomainDef instead of virDomainDefPtr
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      59e7ef3c
    • J
      qemu: Introduce qemuBuildWatchdogCommandLine · 4666b762
      John Ferlan 提交于
      Add new function to manage adding the watchdog device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also since qemuBuildWatchdogDevStr was only local here, make it static as
      well as modifying the const virDomainDef.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      4666b762
    • J
      qemu: Introduce qemuBuildSoundCommandLine · 1a91ddb4
      John Ferlan 提交于
      Add new function to manage adding the sound device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also since qemuBuildSoundDevStr was only local here, make it static as
      well as modifying the const virDomainDef.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      1a91ddb4
  2. 12 3月, 2016 2 次提交
  3. 11 3月, 2016 4 次提交
    • J
      qemu: Introduce qemuBuildFSDevCommandLine · 3dbc2a14
      John Ferlan 提交于
      Add new function to manage adding the -fsdev options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      Alter the code slightly to perform the !caps and fsdev failure check
      up front.
      
      Since both qemuBuildFSStr and qemuBuildFSDevStr are local, make them
      static and fix their prototypes to use the const virDomainDef as well.
      Make some minor formatting changes for long lines.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      3dbc2a14
    • J
      qemu: Introduce qemuBuildDiskDriveCommandLine · 0ea0f6c4
      John Ferlan 提交于
      Add new function to manage adding the disk -drive options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also since using const virDomainDef in new function, that means other
      functions called needed to change their usage.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0ea0f6c4
    • J
      qemu: Introduce qemuBuildHubCommandLine · f87be33a
      John Ferlan 提交于
      Add new function to manage adding the hub -device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also make qemuBuildHubDevStr static to the module since it's only
      used here.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f87be33a
    • J
      qemu: Introduce qemuBuildControllerDevCommandLine · 4908772e
      John Ferlan 提交于
      Add new function to manage adding the controller -device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also adjust to using const virDomainDef instead of virDomainDefPtr.
      This causes collateral damage in order to modify called APIs to use
      the const virDomainDef instead as well.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      4908772e
  4. 10 3月, 2016 1 次提交
  5. 01 3月, 2016 1 次提交
    • M
      qemu: Shorten per-domain directory names · a89f05ba
      Martin Kletzander 提交于
      Per-domain directories were introduced in order to be able to
      completely separate security labels for each domain (commit
      f1f68ca3).  However when the domain
      name is long (let's say a ridiculous 110 characters), we cannot
      connect to the monitor socket because on length of UNIX socket address
      is limited.  In order to get around this, let's shorten it in similar
      fashion and in order to avoid conflicts, throw in an ID there as well.
      Also save that into the status XML and load the old status XMLs
      properly (to clean up after older domains).  That way we can change it
      in the future.
      
      The shortening can be seen in qemuxml2argv tests, for example in the
      hugepages-pages2 case.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a89f05ba
  6. 18 2月, 2016 1 次提交
  7. 17 2月, 2016 6 次提交
  8. 11 2月, 2016 1 次提交
    • J
      qemu: Split the command parsing routines into own module · d860b2f5
      John Ferlan 提交于
      Extract out the qemuParseCommandLine{String|Pid} into their own
      separate module - taking with it all the various static functions.
      
      Causes a ripple effect with a few other modules to include the
      new qemu_parse_command.h.
      
      Narrowed down the list of #include's in the split out module to
      those that are necessary for build.
      d860b2f5
  9. 01 2月, 2016 1 次提交
  10. 15 12月, 2015 1 次提交
    • L
      qemu: add bootindex option to hostdev network interface commandline · a8e3247e
      Laine Stump 提交于
      when appropriate, of course. If the config for a domain specifies boot
      order with <boot dev='blah'/> elements, e.g.:
      
           <os>
             ...
             <boot dev='hd'/>
             <boot dev='network'/>
           </os>
      
      Then the first disk device in the config will have ",bootindex=1"
      appended to its qemu commandline -device options, and the first (and
      *only* the first) network interface device will get ",bootindex=2".
      
      However, if the first network interface device is a "hostdev" device
      (an SRIOV Virtual Function (VF) being assigned to the domain with
      vfio), then the bootindex option will *not* be appended. This happens
      because the bootindex=n option corresponding to the order of "<boot
      dev='network'/>" is added to the -device for the first network device
      when network device commandline args are constructed, but if it's a
      hostdev network device, its commandline arg is instead constructed in
      the loop for hostdevs.
      
      This patch fixes that omission by noticing (in bootHostdevNet) if the
      first network device was a hostdev, and if so passing on the proper
      bootindex to the commandline generator for hostdev devices - the
      result is that ",bootindex=2" will be properly appended to the first
      "network" device in the config even if it is really a hostdev
      (including if it is assigned from a libvirt network pool). (note that
      this is only the case if there is no <bootmenu enabled='yes'/> element
      in the config ("-boot menu-on" in qemu) , since the two are mutually
      exclusive - when the bootmenu is enabled, the individual per-device
      bootindex options can't be used by qemu, and we revert to using "-boot
      order=xyz" instead).
      
      If a greater level of control over boot order is desired (e.g., more
      than one network device should be tried, or a network device other
      than the first one encountered in the config), then <boot
      dev='network'/> in the <os> element should not be used; instead, the
      individual device elements in the config should be given a "<boot
      order='n'/>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278421
      a8e3247e
  11. 11 12月, 2015 1 次提交
  12. 19 11月, 2015 3 次提交
  13. 18 11月, 2015 1 次提交
  14. 10 11月, 2015 1 次提交
  15. 15 9月, 2015 1 次提交
  16. 04 9月, 2015 1 次提交
    • J
      qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW · a39ab909
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1258361
      
      When attaching a disk, controller, or rng using an address type ccw
      or s390, we need to ensure the support is provided by both the machine.os
      and the emulator capabilities (corollary to unconditional setting when
      address was not provided for the correct machine.os and emulator.
      
      For an inactive guest, an addition followed by a start would cause the
      startup to fail after qemu_command builds the command line and attempts
      to start the guest. For an active guest, libvirtd would crash.
      a39ab909
  17. 08 7月, 2015 1 次提交
  18. 23 6月, 2015 1 次提交
  19. 16 5月, 2015 2 次提交
    • L
      qemu: use controller alias when constructing device/controller args · 0260506c
      Laine Stump 提交于
      This makes sure that that the commandlines generated for devices and
      controller devices are all using the alias that has been set in the
      controller's object as the id of the controller, rather than
      hardcoding a printf (or worse, encoding exceptions to the standard
      ${controller}${index} into the logic)
      
      Since this "fixes" the controller name used for the sata controller,
      the commandline arg for the sata controller in the sata test case had
      to be adjusted to be "sata0" instead of "ahci0". All other tests
      remain unchanged, verifying that the patch causes no other functional
      change.
      
      Because the function that finds a controller alias based on a device
      def requires a pointer to the full domainDef in order to get the list
      of controllers, the arglist of a few functions had to have this added.
      0260506c
    • L
      qemu: fix exceptions in qemuAssignDeviceControllerAlias · 75cd7d9b
      Laine Stump 提交于
      There are a few extra exceptions that weren't being accounted for when
      creating the alias for a controller. This resulted in 1) incorrect
      status XML, and 2) exceptions/printfs of what *should* have been
      directly available in the controller alias when constructing device
      commandline arguments:
      
      1) The primary (and only) IDE controller on a 440FX machinetype is
      hardcoded to be "ide" in qemu.
      
      2) The primary SATA controller on a 440FX machinetype is also
      hardcoded to be "ide" in qemu.
      
      3) On machinetypes that don't support multiple PCI buses, the PCI bus
      is hardcoded in qemu to have the name "pci".
      
      4) The first usb master controller is "usb", all others are the normal
      "usb%d". (note that usb controllers that are not a "master" will have
      the same index, and thus alias, as the master).
      
      We needed to pass in the full domainDef and qemuCaps in order to
      properly make the decisions about these exceptions.
      75cd7d9b
  20. 29 4月, 2015 1 次提交
  21. 28 4月, 2015 2 次提交
    • J
      qemu: Remove need for qemuDomainParseIOThreadAlias · 4c2ca566
      John Ferlan 提交于
      Rather than have a separate routine to parse the alias of an iothread
      returned from qemu in order to get the iothread_id value, parse the alias
      when returning and just return the iothread_id in qemuMonitorIOThreadInfoPtr
      
      This set of patches removes the function, changes the "char *name" to
      "unsigned int" and handles all the fallout.
      4c2ca566
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
  22. 23 3月, 2015 1 次提交