1. 11 7月, 2017 5 次提交
  2. 10 7月, 2017 1 次提交
    • P
      qemu: domain: Use vcpu 'node-id' property and pass it back to qemu · ccac4465
      Peter Krempa 提交于
      vcpu properties gathered from query-hotpluggable cpus need to be passed
      back to qemu. As qemu did not use the node-id property until now and
      libvirt forgot to pass it back properly (it was parsed but not passed
      around) we did not honor this.
      
      This patch adds node-id to the structures where it was missing and
      passes it around as necessary.
      
      The test data was generated with a VM with following config:
          <numa>
            <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/>
            <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/>
          </numa>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
      ccac4465
  3. 08 7月, 2017 5 次提交
    • S
      hyperv: Add support for virDomainSetMemory · 48c537f3
      Sri Ramanujam 提交于
      Introduces support for virDomainSetMemory. This also serves an an
      example for how to use the new method invocation API with a more
      complicated method, this time including an EPR and embedded param.
      48c537f3
    • S
      hyperv: support virDomainSendKey · 8efd5b64
      Sri Ramanujam 提交于
      This commit adds support for virDomainSendKey. It also serves as an
      example of how to use the new method invocation APIs with a single
      "simple" type parameter.
      8efd5b64
    • S
      hyperv: add hypervInvokeMethod · 8c28c76a
      Sri Ramanujam 提交于
      This commit adds support for invoking methods on remote objects
      via hypervInvokeMethod.
      8c28c76a
    • S
      hyperv: Generate object property type information · e4a2f5a2
      Sri Ramanujam 提交于
      Update the generator to generate basic property type information for
      each CIM object representation. Right now, it generates arrays of
      hypervCimType structs:
      
      struct _hypervCimType {
          const char *name;
          const char *type;
          bool isArray;
      };
      e4a2f5a2
    • S
      hyperv: Functions to work with invocation parameters · 638a5efd
      Sri Ramanujam 提交于
      This commit introduces functionality for creating and working with
      invoke parameters. This commit does not include any code for serializing
      and actually performing the method invocations; it merely defines the
      functions and API for using invocation parameters in driver code.
      
      HYPERV_DEFAULT_PARAM_COUNT was chosen because almost no method
      invocations have more than 4 parameters.
      
      Functions added:
      * hypervInitInvokeParamsList
      * hypervFreeInvokeParams
      * hypervAddSimpleParam
      * hypervAddEprParam
      * hypervCreateEmbeddedParam
      * hypervSetEmbeddedProperty
      * hypervAddEmbeddedParam
      * hypervFreeEmbeddedParam
      638a5efd
  4. 07 7月, 2017 1 次提交
  5. 05 7月, 2017 2 次提交
  6. 04 7月, 2017 1 次提交
  7. 29 6月, 2017 2 次提交
  8. 28 6月, 2017 6 次提交
  9. 27 6月, 2017 3 次提交
  10. 26 6月, 2017 2 次提交
  11. 25 6月, 2017 3 次提交
    • M
      qemuMonitorTextAddDrive: Fail on unrecognized disk format · 8ad01d5c
      Michal Privoznik 提交于
      Since qemu commit 3ef6c40ad0b it can fail if trying to hotplug a
      disk that is not qcow2 despite us saying it is. We need to error
      out in that case.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      8ad01d5c
    • J
      events: Avoid double free possibility on remote call failure · 2065499b
      John Ferlan 提交于
      If a remote call fails during event registration (more than likely from
      a network failure or remote libvirtd restart timed just right), then when
      calling the virObjectEventStateDeregisterID we don't want to call the
      registered @freecb function because that breaks our contract that we
      would only call it after succesfully returning.  If the @freecb routine
      were called, it could result in a double free from properly coded
      applications that free their opaque data on failure to register, as seen
      in the following details:
      
          Program terminated with signal 6, Aborted.
          #0  0x00007fc45cba15d7 in raise
          #1  0x00007fc45cba2cc8 in abort
          #2  0x00007fc45cbe12f7 in __libc_message
          #3  0x00007fc45cbe86d3 in _int_free
          #4  0x00007fc45d8d292c in PyDict_Fini
          #5  0x00007fc45d94f46a in Py_Finalize
          #6  0x00007fc45d960735 in Py_Main
          #7  0x00007fc45cb8daf5 in __libc_start_main
          #8  0x0000000000400721 in _start
      
      The double dereference of 'pyobj_cbData' is triggered in the following way:
      
          (1) libvirt_virConnectDomainEventRegisterAny is invoked.
          (2) the event is successfully added to the event callback list
              (virDomainEventStateRegisterClient in
              remoteConnectDomainEventRegisterAny returns 1 which means ok).
          (3) when function remoteConnectDomainEventRegisterAny is hit,
              network connection disconnected coincidently (or libvirtd is
              restarted) in the context of function 'call' then the connection
              is lost and the function 'call' failed, the branch
              virObjectEventStateDeregisterID is therefore taken.
          (4) 'pyobj_conn' is dereferenced the 1st time in
              libvirt_virConnectDomainEventFreeFunc.
          (5) 'pyobj_cbData' (refered to pyobj_conn) is dereferenced the
               2nd time in libvirt_virConnectDomainEventRegisterAny.
          (6) the double free error is triggered.
      
      Resolve this by adding a @doFreeCb boolean in order to avoid calling the
      freeCb in virObjectEventStateDeregisterID for any remote call failure in
      a remoteConnect*EventRegister* API. For remoteConnect*EventDeregister* calls,
      the passed value would be true indicating they should run the freecb if it
      exists; whereas, it's false for the remote call failure path.
      
      Patch based on the investigation and initial patch posted by
      fangying <fangying1@huawei.com>.
      2065499b
    • C
      qemu: Support chardevs with ARM virt machines · 70c9b442
      Christoffer Dall 提交于
      The function to check if -chardev is supported by QEMU was written a
      long time ago, where adding chardevs did not make sense on the fixed ARM
      platforms.  Since then, we now have a general purpose virt platform,
      which should support plugging in any device over PCIe which is supported
      in a similar fashion on x86.
      Signed-off-by: NChristoffer Dall <cdall@linaro.org>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      70c9b442
  12. 24 6月, 2017 1 次提交
    • J
      util: Force reading of meta data to get encryption capacity value · 5431055d
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1371892
      
      As it turns out the volume create, build, and refresh path was not peeking
      at the meta data, so immediately after a create operation the value displayed
      for capacity was still incorrect. However, if a pool refresh was done the
      correct value was fetched as a result of a meta data peek.
      
      The reason is it seems historically if the file type is RAW then peeking
      at the file just took the physical value for the capacity. However, since
      we know if it's an encrypted file, then peeking at the meta data will be
      required in order to get a true capacity value.
      
      So check for encryption in the source and if present, use the meta data
      in order to fill in the capacity value and set the payload_offset.
      5431055d
  13. 23 6月, 2017 2 次提交
  14. 22 6月, 2017 6 次提交