1. 02 5月, 2016 1 次提交
    • J
      qemu: Introduce qemuDomainSecretPrepare and Destroy · 40d8e2ba
      John Ferlan 提交于
      Rather than needing to pass the conn parameter to various command
      line building API's, add qemuDomainSecretPrepare just prior to the
      qemuProcessLaunch which calls qemuBuilCommandLine. The function
      must be called after qemuProcessPrepareHost since it's expected
      to eventually need the domain masterKey generated during the prepare
      host call. Additionally, future patches may require device aliases
      (assigned during the prepare domain call) in order to associate
      the secret objects.
      
      The qemuDomainSecretDestroy is called after the qemuProcessLaunch
      finishes in order to clear and free memory used by the secrets
      that were recently prepared, so they are not kept around in memory
      too long.
      
      Placing the setup here is beneficial for future patches which will
      need the domain masterKey in order to generate an encrypted secret
      along with an initialization vector to be saved and passed (since
      the masterKey shouldn't be passed around).
      
      Finally, since the secret is not added during command line build,
      the hotplug code will need to get the secret into the private disk data.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      40d8e2ba
  2. 22 4月, 2016 1 次提交
  3. 16 4月, 2016 1 次提交
  4. 15 4月, 2016 1 次提交
  5. 13 4月, 2016 1 次提交
    • J
      drop qemuBuildCommandLineCallbacks · 0da965c5
      Ján Tomko 提交于
      Essentially revert commit 3a6204cb which added these to allow the test
      suite to pass without depending on the host system state.
      
      Since commit 4b527c1a we already mock virSCSIDeviceGetSgName, so these
      callbacks are useless.
      0da965c5
  6. 06 4月, 2016 1 次提交
  7. 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
  8. 12 3月, 2016 2 次提交
  9. 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
  10. 10 3月, 2016 1 次提交
  11. 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
  12. 18 2月, 2016 1 次提交
  13. 17 2月, 2016 6 次提交
  14. 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
  15. 01 2月, 2016 1 次提交
  16. 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
  17. 11 12月, 2015 1 次提交
  18. 19 11月, 2015 3 次提交
  19. 18 11月, 2015 1 次提交
  20. 10 11月, 2015 1 次提交
  21. 15 9月, 2015 1 次提交
  22. 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
  23. 08 7月, 2015 1 次提交
  24. 23 6月, 2015 1 次提交