1. 29 6月, 2020 2 次提交
  2. 27 6月, 2020 4 次提交
  3. 26 6月, 2020 10 次提交
  4. 25 6月, 2020 4 次提交
    • M
      qemuDomainDeviceNetDefPostParse: Switch order of conditions · fe3840ea
      Michal Privoznik 提交于
      A few commits back (in v6.4.0-131-gbdb8f2e4) the post parse
      function for domain interface was changed so that it doesn't fill
      in model for hostdev types of interfaces (including network type
      interfaces which would end up hostdevs).
      
      While the idea is sound, the execution can be a bit better:
      virDomainNetResolveActualType() which is used to determine
      runtime type of given interface is heavy gun - it connects to
      network driver, fetches network XML, parses it. This all is
      followed by check whether the interface doesn't already have
      model set (from domain XML).
      
      If we switch the order of these two checks then the short circuit
      evaluation will ensure the expensive check is done only if really
      needed.
      
      This commit in fact fixes qemuxml2xmltest which due to lacking
      fake network driver tries to connect to network:///session and
      start the virtnetworkd. Fortunately, because of
      v6.3.0-25-gf28fbb05 it fails to do so and
      virDomainNetResolveActualType() returns -1. The only reason we
      don't see the test failing is because our input XMLs have model
      and thus we are saved by the latter (now former) check.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NLaine Stump <laine@redhat.com>
      fe3840ea
    • L
      qemu: auto-assign hostdev devices to PCIe · 8c6dba05
      Laine Stump 提交于
      Until recently, an <interface type='network'> would automatically be
      assigned model "rtl8139", which in turn would lead to the device being
      assigned a PCI address on a conventional PCI controller (i.e. a
      pcie-to-pci-bridge). If the network was a typical Linux host
      bridge-based network that used an emulated device, this would be
      appropriate, since the guest actually would get an emulated rtl8139
      NIC, and that device is a conventional PCI device.
      
      However, if the network being used was a pool of hostdev devices, the
      guest would get an actual PCIe network device assigned from the host
      via VFIO; while the interface model in that case is irrelevant for the
      QEMU commandline to assign the device, the PCI address would have
      already been assigned prior to runtime, so the address assignment
      would be done based on the model='rtl8139' - a conventional PCI
      device. VFIO assignment of a PCIe device to a conventional PCI slot
      works, but we would rather have these devices in a PCIe slot.
      
      Since commit bdb8f2e4, if <interface type='network'> points to a
      etwork that is a pool of hostdev devices, the interface model will be
      _unset_ by default. This patch uses that information when deciding
      what type of slot to assign to the device: since all hostdev network
      interfaces are SR-IOV VFs, and *all* SR-IOV network cards are PCIe, it
      is safe to assume that the VFs are PCIe and we should assign then to a
      PCIe slot in the guest.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      8c6dba05
    • P
      qemu_domainjob: moved domain job APIs to a separate file · d66f2be2
      Prathamesh Chavan 提交于
      All the domain job related APIs were present in `qemu_domain.c`
      along with the other domain APIs. In this patch, we move all the
      qemu domain job APIs into a separate file.
      
      Also, in this process, `qemuDomainTrackJob()`,
      `qemuDomainFreeJob()`, `qemuDomainInitJob()` and
      `qemuDomainObjSaveStatus()` were converted to a non-static
      funciton and exposed using `qemu_domain.h`.
      Signed-off-by: NPrathamesh Chavan <pc44800@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      d66f2be2
    • P
      qemu_domain: Avoid using qemuDomainObjPrivatePtr as parameter · 6d0b1d2d
      Prathamesh Chavan 提交于
      In functions `qemuDomainObjInitJob`, `qemuDomainObjResetJob`,
      `qemuDomainObjResetAgentJob`, `qemuDomainObjResetAsyncJob`,
      `qemuDomainObjFreeJob`, `qemuDomainJobAllowed`,
      `qemuDomainNestedJobAllowed` we avoid sending the complete
      qemuDomainObjPrivatePtr as parameter and instead just send
      qemuDomainJobObjPtr.
      
      This is done in a effort to separating the qemu-job APIs into
      a spearate file.
      Signed-off-by: NPrathamesh Chavan <pc44800@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      6d0b1d2d
  5. 24 6月, 2020 7 次提交
  6. 23 6月, 2020 13 次提交