1. 11 7月, 2016 1 次提交
    • M
      qemuBuildCpuCommandLine: Don't leak @buf · 87df9452
      Michal Privoznik 提交于
      Just like every other qemuBuild*CommandLine() function, this uses
      a buffer to hold partial cmd line strings too. However, if
      there's an error, the control jumps to 'cleanup' label leaving
      the buffer behind and thus leaking it.
      
      ==2013== 1,006 bytes in 1 blocks are definitely lost in loss record 701 of 711
      ==2013==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==2013==    by 0x4C2C32F: realloc (vg_replace_malloc.c:692)
      ==2013==    by 0xAD925A8: virReallocN (viralloc.c:245)
      ==2013==    by 0xAD95EA8: virBufferGrow (virbuffer.c:130)
      ==2013==    by 0xAD95F78: virBufferAdd (virbuffer.c:165)
      ==2013==    by 0x5097F5: qemuBuildCpuModelArgStr (qemu_command.c:6339)
      ==2013==    by 0x509CC3: qemuBuildCpuCommandLine (qemu_command.c:6437)
      ==2013==    by 0x51142C: qemuBuildCommandLine (qemu_command.c:9174)
      ==2013==    by 0x47CA3A: qemuProcessCreatePretendCmd (qemu_process.c:5546)
      ==2013==    by 0x433698: testCompareXMLToArgvFiles (qemuxml2argvtest.c:332)
      ==2013==    by 0x4339AC: testCompareXMLToArgvHelper (qemuxml2argvtest.c:413)
      ==2013==    by 0x446E7A: virTestRun (testutils.c:179)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      87df9452
  2. 07 7月, 2016 2 次提交
    • P
      qemu: caps: Always assume QEMU_CAPS_SMP_TOPOLOGY · e114b091
      Peter Krempa 提交于
      Support for SMP topology was added by qemu commit dc6b1c09849484fbbc50
      prior to 0.12.0, our minimum supported qemu version.
      
      $ git describe --tags dc6b1c09849484fbbc50803307e4c7a3d81eab62
      v0.11.0-rc0-449-gdc6b1c0
      $ git describe --tags --contains dc6b1c09849484fbbc50803307e4c7a3d81eab
      v0.12.0-rc0~1477
      e114b091
    • P
      qemu: generate -display none · 7a97676b
      Paolo Bonzini 提交于
      This is preferrable to -nographic which (in addition to disabling
      graphics output) redirects the serial port to stdio and on OpenBIOS
      enables the firmware's serial console.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7a97676b
  3. 01 7月, 2016 2 次提交
  4. 25 6月, 2016 2 次提交
  5. 24 6月, 2016 4 次提交
  6. 23 6月, 2016 2 次提交
  7. 20 6月, 2016 1 次提交
    • A
      qemu: Don't use legacy USB for aarch64 mach-virt guests · dc5821d7
      Andrea Bolognani 提交于
      The '-usb' option doesn't have any effect for aarch64 mach-virt
      guests, so the fact that it's currently enabled by default is not
      really causing any issue.
      
      However, that might change in the future (although unlikely), and
      having it as part of the QEMU command line can cause confusion to
      someone looking through the process list.
      
      Avoid it completely, like it's already happening for q35.
      dc5821d7
  8. 16 6月, 2016 2 次提交
  9. 15 6月, 2016 1 次提交
  10. 14 6月, 2016 1 次提交
  11. 09 6月, 2016 8 次提交
  12. 07 6月, 2016 2 次提交
  13. 25 5月, 2016 1 次提交
  14. 23 5月, 2016 3 次提交
  15. 20 5月, 2016 8 次提交
    • J
      qemu: Utilize qemu secret objects for RBD auth/secret · a1344f70
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1182074
      
      If they're available and we need to pass secrets to qemu, then use the
      qemu domain secret object in order to pass the secrets for RBD volumes
      instead of passing the base64 encoded secret on the command line.
      
      The goal is to make AES secrets the default and have no user interaction
      required in order to allow using the AES mechanism. If the mechanism
      is not available, then fall back to the current plain mechanism using
      a base64 encoded secret.
      
      New APIs:
      
      qemu_domain.c:
        qemuDomainGetSecretAESAlias:
          Generate/return the secret object alias for an AES Secret Info type.
          This will be called from qemuDomainSecretAESSetup.
      
        qemuDomainSecretAESSetup: (private)
          This API handles the details of the generation of the AES secret
          and saves the pieces that need to be passed to qemu in order for
          the secret to be decrypted. The encrypted secret based upon the
          domain master key, an initialization vector (16 byte random value),
          and the stored secret. Finally, the requirement from qemu is the IV
          and encrypted secret are to be base64 encoded.
      
      qemu_command.c:
        qemuBuildSecretInfoProps: (private)
          Generate/return a JSON properties object for the AES secret to
          be used by both the command building and eventually the hotplug
          code in order to add the secret object. Code was designed so that
          in the future perhaps hotplug could use it if it made sense.
      
        qemuBuildObjectSecretCommandLine (private)
          Generate and add to the command line the -object secret for the
          secret. This will be required for the subsequent RBD reference
          to the object.
      
        qemuBuildDiskSecinfoCommandLine (private)
          Handle adding the AES secret object.
      
      Adjustments:
      
      qemu_domain.c:
        The qemuDomainSecretSetup was altered to call either the AES or Plain
        Setup functions based upon whether AES secrets are possible (we have
        the encryption API) or not, we have secrets, and of course if the
        protocol source is RBD.
      
      qemu_command.c:
        Adjust the qemuBuildRBDSecinfoURI API's in order to generate the
        specific command options for an AES secret, such as:
      
          -object secret,id=$alias,keyid=$masterKey,data=$base64encodedencrypted,
                  format=base64
          -drive file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
                 mon_host=mon1.example.org\:6321,password-secret=$alias,...
      
        where the 'id=' value is the secret object alias generated by
        concatenating the disk alias and "-aesKey0". The 'keyid= $masterKey'
        is the master key shared with qemu, and the -drive syntax will
        reference that alias as the 'password-secret'. For the -drive
        syntax, the 'id=myname' is kept to define the username, while the
        'key=$base64 encoded secret' is removed.
      
        While according to the syntax described for qemu commit '60390a21'
        or as seen in the email archive:
      
          https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg04083.html
      
        it is possible to pass a plaintext password via a file, the qemu
        commit 'ac1d8878' describes the more feature rich 'keyid=' option
        based upon the shared masterKey.
      
      Add tests for checking/comparing output.
      
      NB: For hotplug, since the hotplug code doesn't add command line
          arguments, passing the encoded secret directly to the monitor
          will suffice.
      a1344f70
    • P
      qemu_command: refactor spice channel code · 2c8e7555
      Pavel Hrdina 提交于
      This prepares the code for other listen types.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      2c8e7555
    • P
      graphics: resolve address for listen type network in qemu_process · 78a09aa0
      Pavel Hrdina 提交于
      Both VNC and SPICE requires the same code to resolve address for listen
      type network.  Remove code duplication and create a new function that
      will be used in qemuProcessSetupGraphics().
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      78a09aa0
    • P
      qemu_command: move sasl parameter after port and addr definition · 858d7b6c
      Pavel Hrdina 提交于
      This is required for following patches where new listen types will be
      introduced.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      858d7b6c
    • P
      graphics: rename gListen to glisten · 6bd0cd3b
      Pavel Hrdina 提交于
      We have both in the code.  Let's use only one format.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      6bd0cd3b
    • J
      Do not mask QEMU_CAPS_DEVICE in qemuBuildDriveStr · a84fce35
      Ján Tomko 提交于
      For some disk types (SD), we want to emit the syntax
      we used for disks before -device was available even
      if QEMU supports -device.
      
      Use the qemuDiskBusNeedsDeviceArg helper to figure out
      whether to use the old or new syntax.
      a84fce35
    • J
      Introduce qemuDiskBusNeedsDeviceArg · 2e33ef48
      Ján Tomko 提交于
      Replace the two uses of the withDeviceArg bool in
      qemuBuildDiskDriveCommandLine and allow this function to be reused in
      qemuBuildDriveStr.
      2e33ef48
    • J
      Assume QEMU_CAPS_DEVICE in qemuBuildDiskDriveCommandLine · cd3b06b7
      Ján Tomko 提交于
      We no longer need to handle -usbdevice and the withDeviceArg
      logic becomes clearer.
      cd3b06b7