1. 02 9月, 2016 4 次提交
  2. 31 8月, 2016 1 次提交
    • M
      tools: Don't list virsh-* under EXTRA_DIST · 8540301b
      Michal Privoznik 提交于
      When we wanted to break huge and unmaintainable virsh into
      smaller files first thing we did was to just move funcs into
      virsh-.c files and then #include them from virsh. Having it done
      this way we also needed to have them listed under EXTRA_DIST.
      However, things got changed since then and now all the virsh-*.c
      files are proper source files. Therefore they are listed under
      virsh_SOURCES too. But for some reason we forgot to remove them
      from EXTRA_DIST.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8540301b
  3. 30 8月, 2016 1 次提交
    • J
      libxl: advertise support for migration V3 · 36f57ad7
      Jim Fehlig 提交于
      The libxl driver has long supported migration V3 but has never
      indicated so in the connectSupportsFeature API. As a result, apps
      such as virt-manager that use the more generic virDomainMigrate API
      fail with
      
      libvirtError: this function is not supported by the connection driver:
      virDomainMigrate
      
      Add VIR_DRV_FEATURE_MIGRATION_V3 to the list of features marked as
      supported in the connectSupportsFeature API.
      36f57ad7
  4. 29 8月, 2016 2 次提交
    • R
      tests: fix segfault in objecteventtest · 61148074
      Roman Bogorodskiy 提交于
      Test 12 from objecteventtest (createXML add event) segaults on FreeBSD
      with bus error.
      
      At some point it calls testNodeDeviceDestroy() from the test driver. And
      it fails when it tries to unlock the device in the "out:" label of this
      function.
      
      Unlocking fails because the previous step was a call to
      virNodeDeviceObjRemove from conf/node_device_conf.c. This function
      removes the given device from the device list and cleans up the object,
      including destroying of its mutex. However, it does not nullify the pointer
      that was given to it.
      
      As a result, we end up in testNodeDeviceDestroy() here:
      
       out:
          if (obj)
              virNodeDeviceObjUnlock(obj);
      
      And instead of skipping this, we try to do Unlock and fail because of
      malformed mutex.
      
      Change virNodeDeviceObjRemove to use double pointer and set pointer to
      NULL.
      61148074
    • R
      bhyve: fix disks address allocation · 25ee22bd
      Roman Bogorodskiy 提交于
      As bhyve currently doesn't use controller addressing and simply
      uses 1 implicit controller for 1 disk device, the scheme looks the
      following:
      
       pci addrees -> (implicit controller) -> disk device
      
      So in fact we identify disk devices by pci address of implicit
      controller and just pass it this way to bhyve in a form:
      
       -s pci_addr,ahci-(cd|hd),/path/to/disk
      
      Therefore, we cannot use virDeviceInfoPCIAddressWanted() because it
      does not expect that disk devices might need PCI address assignment.
      
      As a result, if a disk was specified without address, it will not be
      generated and domain will to start.
      
      Until proper controller addressing is implemented in the bhyve
      driver, force each disk to have PCI address generated if it was not
      specified by user.
      25ee22bd
  5. 27 8月, 2016 2 次提交
  6. 26 8月, 2016 14 次提交
  7. 25 8月, 2016 16 次提交
    • P
      qemu: hotplug: Add support for VCPU unplug · e3229f6e
      Peter Krempa 提交于
      This patch removes the old vcpu unplug code completely and replaces it
      with the new code using device_del. The old hotplug code basically never
      worked with any recent qemu and thus is useless.
      
      As the new code is using device_del all the implications of using it
      are present. Contrary to the device deletion code, the vcpu deletion
      code fails if the unplug request is not executed in time.
      e3229f6e
    • P
      qemu: hotplug: Allow marking unplugged devices by alias · 00990d9f
      Peter Krempa 提交于
      Add a overlay function that takes the alias directly rather than
      extracting it from a device info.
      00990d9f
    • P
      qemu: Use modern vcpu hotplug approach if possible · 6d4ee77d
      Peter Krempa 提交于
      To allow unplugging the vcpus, hotplugging of vcpus on platforms which
      require to plug multiple logical vcpus at once or plugging them in an
      arbitrary order it's necessary to use the new device_add interface for
      vcpu hotplug.
      
      This patch adds support for the device_add interface using the old
      setvcpus API by implementing an algorithm to select the appropriate
      entities to plug in.
      6d4ee77d
    • P
      qemu: command: Add support for sparse vcpu topologies · 9eb9106e
      Peter Krempa 提交于
      Add support for using the new approach to hotplug vcpus using device_add
      during startup of qemu to allow sparse vcpu topologies.
      
      There are a few limitations imposed by qemu on the supported
      configuration:
      - vcpu0 needs to be always present and not hotpluggable
      - non-hotpluggable cpus need to be ordered at the beginning
      - order of the vcpus needs to be unique for every single hotpluggable
        entity
      
      Qemu also doesn't really allow to query the information necessary to
      start a VM with the vcpus directly on the commandline. Fortunately they
      can be hotplugged during startup.
      
      The new hotplug code uses the following approach:
      - non-hotpluggable vcpus are counted and put to the -smp option
      - qemu is started
      - qemu is queried for the necessary information
      - the configuration is checked
      - the hotpluggable vcpus are hotplugged
      - vcpus are started
      
      This patch adds a lot of checking code and enables the support to
      specify the individual vcpu element with qemu.
      9eb9106e
    • P
      qemu: process: Copy final vcpu order information into the vcpu definition · 20ef1232
      Peter Krempa 提交于
      The vcpu order information is extracted only for hotpluggable entities,
      while vcpu definitions belonging to the same hotpluggable entity need
      to all share the order information.
      
      We also can't overwrite it right away in the vcpu info detection code as
      the order is necessary to add the hotpluggable vcpus enabled on boot in
      the correct order.
      
      The helper will store the order information in places where we are
      certain that it's necessary.
      20ef1232
    • P
      qemu: command: Add helper to convert vcpu definition to JSON props · 8807f28b
      Peter Krempa 提交于
      For use on the monitor we need to format certain parts of the vcpu
      private definition into a JSON object. Add a helper.
      8807f28b
    • P
      qemu: migration: Prepare for non-contiguous vcpu configurations · 48e3d428
      Peter Krempa 提交于
      Introduce a new migration cookie flag that will be used for any
      configurations that are not compatible with libvirt that would not
      support the specific vcpu hotplug approach. This will make sure that old
      libvirt does not fail to reproduce the configuration correctly.
      48e3d428
    • P
      conf: Add XML for individual vCPU hotplug · 5847bc5c
      Peter Krempa 提交于
      Individual vCPU hotplug requires us to track the state of any vCPU. To
      allow this add the following XML:
      
      <domain>
        ...
        <vcpu current='2'>3</vcpu>
        <vcpus>
          <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
          <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
          <vcpu id='1' enabled='no' hotpluggable='yes'/>
        </vcpus>
        ...
      
      The 'enabled' attribute allows to control the state of the vcpu.
      'hotpluggable' controls whether given vcpu can be hotplugged and 'order'
      allows to specify the order to add the vcpus.
      5847bc5c
    • P
    • P
      qemu: domain: Prepare for VCPUs vanishing while libvirt is not running · 133be0a9
      Peter Krempa 提交于
      Similarly to devices the guest may allow unplug of the VCPU if libvirt
      is down. To avoid problems, refresh the vcpu state on reconnect. Don't
      mess with the vcpu state otherwise.
      133be0a9
    • P
      qemu: domain: Extract cpu-hotplug related data · 6b4a23ff
      Peter Krempa 提交于
      Now that the monitor code gathers all the data we can extract it to
      relevant places either in the definition or the private data of a vcpu.
      
      As only thread id is broken for TCG guests we may extract the rest of
      the data and just skip assigning of the thread id. In case where qemu
      would allow cpu hotplug in TCG mode this will make it work eventually.
      6b4a23ff
    • P
      tests: cpu-hotplug: Add data for ppc64 without threads enabled · 04fce1d4
      Peter Krempa 提交于
      The reported data is unusual so add it to the test suite.
      04fce1d4
    • P
      tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug · 1c455c47
      Peter Krempa 提交于
      Test the algorithm that extracts the order in which the vcpu entries
      were plugged in on a sample of data created by plugging in vcpus
      arbitrarily.
      1c455c47
    • P
      tests: cpu-hotplug: Add data for ppc64 platform including hotplug · d1145aad
      Peter Krempa 提交于
      Power 8 platform's basic hotpluggable unit is a core rather than a
      thread for x86_64 family. This introduces most of the complexity of the
      matching code and thus needs to be tested.
      
      The test data contain data captured from in-order cpu hotplug and
      unplug operations.
      d1145aad
    • P
      tests: cpu-hotplug: Add data for x86 hotplug with 11+ vcpus · 22e3bb33
      Peter Krempa 提交于
      During review it was reported that adding at least 11 vcpus creates a
      collision of prefixes in the monitor matching algorithm. Add a test case
      to verify that the problem won't happen.
      22e3bb33
    • P
      tests: Add test infrastructure for qemuMonitorGetCPUInfo · f8638471
      Peter Krempa 提交于
      As the combination algorithm is rather complex and ugly it's necessary
      to make sure it works properly. Add test suite infrastructure for
      testing it along with a basic test based on x86_64 platform.
      f8638471