1. 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
  2. 07 11月, 2019 7 次提交
  3. 25 10月, 2019 9 次提交
  4. 24 10月, 2019 1 次提交
    • M
      Drop needless ret variable · 3b4df5d3
      Michal Privoznik 提交于
      In few places we have the following code pattern:
      
        int ret;
        ... /* @ret is not accessed here */
        ret = f(...);
        return ret;
      
      This pattern can be written less verbose:
      
        ...
        return f(...);
      
      This patch was generated with following coccinelle spatch:
      
        @@
        type T;
        constant C;
        expression f;
        identifier ret;
        @@
        -T ret = C;
         ... when != ret
        -ret = f;
        -return ret;
        +return f;
      
      Afterwards I needed to fix a few places, e.g. comment in
      virDomainNetIPParseXML() was removed too because coccinelle
      thinks it refers to @ret while in fact it doesn't. Also in few
      places it replaced @ret declaration with a few spaces instead of
      removing the line. But nothing terribly wrong.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      3b4df5d3
  5. 23 10月, 2019 3 次提交
  6. 21 10月, 2019 19 次提交