1. 19 3月, 2020 1 次提交
    • P
      qemuDomainVcpuValidateConfig: Properly initialize 'firstcpu' variable · 5ed97c22
      Peter Krempa 提交于
      The loop which checks whether the vcpus are in proper configuration for
      the requested hot(un)plug skips the first modified vcpu. This means
      that 'firstvcpu' which is used to print the error message in case the
      configuration is not suitable would never point to the first modified
      vcpu.
      
      In cases such as:
      
        <vcpu placement='auto' current='5'>8</vcpu>
        <vcpus>
          <vcpu id='0' enabled='yes' hotpluggable='no'/>
          <vcpu id='1' enabled='yes' hotpluggable='no'/>
          <vcpu id='2' enabled='yes' hotpluggable='no'/>
          <vcpu id='3' enabled='yes' hotpluggable='no'/>
          <vcpu id='4' enabled='yes' hotpluggable='no'/>
          <vcpu id='5' enabled='no' hotpluggable='yes'/>
          <vcpu id='6' enabled='no' hotpluggable='yes'/>
          <vcpu id='7' enabled='no' hotpluggable='yes'/>
        </vcpus>
      
       # virsh setvcpu --config --disable  upstream 1
       error: invalid argument: vcpu '-1' can't be modified as it is followed by non-hotpluggable online vcpus
      
      After this fix the proper vcpu is reported in the error message:
      
       # virsh setvcpu --config --disable  upstream 1
       error: invalid argument: vcpu '1' can't be modified as it is followed by non-hotpluggable online vcpu
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1611061Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      5ed97c22
  2. 16 3月, 2020 2 次提交
  3. 26 2月, 2020 1 次提交
  4. 21 2月, 2020 3 次提交
  5. 11 2月, 2020 1 次提交
  6. 31 1月, 2020 1 次提交
  7. 30 1月, 2020 1 次提交
  8. 29 1月, 2020 1 次提交
  9. 07 1月, 2020 1 次提交
  10. 17 12月, 2019 2 次提交
    • M
      qemu: Allow forcing VFIO when computing memlock limit · 6edb4321
      Michal Privoznik 提交于
      With NVMe disks, one can start a blockjob with a NVMe disk
      that is not visible in domain XML (at least right away). Usually,
      it's fairly easy to override this limitation of
      qemuDomainGetMemLockLimitBytes() - for instance for hostdevs we
      temporarily add the device to domain def, let the function
      calculate the limit and then remove the device. But it's not so
      easy with virStorageSourcePtr - in some cases they don't
      necessarily are attached to a disk. And even if they are it's
      done later in the process and frankly, I find it too complicated
      to be able to use the simple trick we use with hostdevs.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      6edb4321
    • M
      qemu: Don't leak storage perms on failure in qemuDomainAttachDiskGeneric · da27be1b
      Michal Privoznik 提交于
      At the very beginning of the attach function the
      qemuDomainStorageSourceChainAccessAllow() is called which
      modifies CGroups, locks and seclabels for new disk and its
      backing chain. This must be followed by a counterpart which
      reverts back all the changes if something goes wrong. This boils
      down to calling qemuDomainStorageSourceChainAccessRevoke() which
      is done under 'error' label. But not all failure branches jump
      there. They just jump onto 'cleanup' label where no revoke is
      done. Such mistake is easy to do because 'cleanup' label does
      exist. Therefore, dissolve 'error' block in 'cleanup' and have
      everything jump onto 'cleanup' label.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      da27be1b
  11. 09 12月, 2019 2 次提交
  12. 26 11月, 2019 2 次提交
  13. 19 11月, 2019 1 次提交
  14. 14 11月, 2019 5 次提交
  15. 12 11月, 2019 2 次提交
  16. 08 11月, 2019 1 次提交
    • L
      qemu: avoid double reservation of PCI address for interface type='hostdev' · 47a7b8a9
      Laine Stump 提交于
      Commit 01ca4010 (libvirt v5.1.0) moved address reservation for
      hotplugged interface devices up to an earlier point in
      qemuDomainAttachNetDevice(), because that function calls
      qemuDomainSupportsNicdev() (in the case of
      VIR_DOMAIN_NET_TYPE_VHOSTUSER), and qemuDomainSupportsNicdev() needs
      to know the address type (for ARM machinetypes) and returns incorrect
      results when the address type is "none".
      
      This bugfix unfortunately caused a regression, because it also made PCI
      address reservation happen before we noticed that the device was a
      *hostdev* interface. Those interfaces are hotplugged by just calling
      out to qemuDomainAttachHostdevDevice() - that function would then also
      attempt to reserve the *same PCI address* that had just been reserved
      in qemuDomainAttachNetDevice().
      
      The solution is to move the bit of code that short-circuits out to
      virDomainHostdevAttach() up *even earlier* so that no PCI address has
      been allocated by the time it's called.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1744523Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      47a7b8a9
  17. 21 10月, 2019 4 次提交
  18. 16 10月, 2019 4 次提交
  19. 15 10月, 2019 2 次提交
  20. 24 9月, 2019 1 次提交
  21. 19 9月, 2019 1 次提交
  22. 18 9月, 2019 1 次提交