1. 01 2月, 2018 10 次提交
    • J
      qemu: Update qemuDomainFindSCSIControllerModel return · 5b5bff35
      John Ferlan 提交于
      Now that the controller model is updated during post parse callback,
      this code no longer needs to fetch the model based on the capabilities
      and can just return the model directly if the controller is found.
      
      Removal of @qemuCaps cascades through various callers which are now
      updated to not pass the capabilities.
      5b5bff35
    • J
      qemu: Reduce need to call qemuDomainGetSCSIControllerModel · de8fac5f
      John Ferlan 提交于
      Now that post parse processing handles setting the SCSI controller
      model, there's no need to call qemuDomainGetSCSIControllerModel to
      get the "default controller" when building the command line controller
      string or when assigning the spaprvio address since the controller
      model value will already be filled in.
      de8fac5f
    • J
      conf: Allow configuration of implicit controller model · d1b59c62
      John Ferlan 提交于
      When an implicit controller is added, the model is defined as -1
      (IOW: undefined). So, if an implicit SCSI controller was added,
      can set the model to the default value if the underlying hypervisor
      supports it.
      d1b59c62
    • J
      qemu: Introduce qemuDomainSetSCSIControllerModel · 62f8c947
      John Ferlan 提交于
      During post parse processing, let's force setting the controller
      model to default value if not already set for defined controllers
      (e.g. the non implicit ones).
      62f8c947
    • J
      qemu: Fetch/save the default SCSI controller model during hotplug · 13d21661
      John Ferlan 提交于
      If we're going to add a controller to the domain, let's set the
      default SCSI model value if we cannot find another SCSI controller
      already present.
      
      NB: Requires updating the live output test data since the model
      will now be formatted.
      13d21661
    • J
      qemu: Introduce qemuDomainGetSCSIControllerModel · fadfb4f9
      John Ferlan 提交于
      Rename and rework qemuDomainSetSCSIControllerModel since we're
      really not setting the SCSI controller model. Instead the code
      is either returning the existing SCSI controller model value, the
      default value based on the capabilities, or -1 with the error set.
      fadfb4f9
    • J
      qemu: Introduce qemuDomainFindSCSIControllerModel · 6ae6ffd8
      John Ferlan 提交于
      Rather than repeat multiple steps in order to find the SCSI
      controller model, let's combine them into one helper that will
      return either the model from the definition or the default
      model based on the capabilities.
      
      This patch adds an extra check/error that the controller
      that's being found actually exists. This just clarifies that
      the error was because the controller doesn't exist rather
      than the more generic error that we were unable to determine
      the model from qemuDomainSetSCSIControllerModel when a -1
      was passed in and the capabilities were unable to find one.
      6ae6ffd8
    • J
      conf: Rework and rename virDomainDeviceFindControllerModel · 932862b8
      John Ferlan 提交于
      As it turns out virDomainDeviceFindControllerModel was only ever
      called for SCSI controllers using VIR_DOMAIN_CONTROLLER_TYPE_SCSI
      as a parameter.
      
      So rename to virDomainDeviceFindSCSIController and rather than
      return a model, let's return a virDomainControllerDefPtr to let
      the caller reference whatever it wants.
      932862b8
    • J
      qemu: Split qemuDomainSetSCSIControllerModel · e37540f4
      John Ferlan 提交于
      Rather than one function serving two purposes, let's split out the
      else condition which is checking whether the model can be used
      during command line building based on the capabilities.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e37540f4
    • M
      virUSBDeviceNew: Construct vroot path properly · 7b0ea999
      Michal Privoznik 提交于
      When starting an LXC container, the /dev entries are created
      under temp root (/var/run/libvirt/lxc/$name.dev), relabelled and
      then the root is pivoted. However, when it comes to USB devices
      which keep path to the device in the structure we need a way to
      override the default /dev/usb/... path because we want to work
      with the one under temp root. That's what @vroot argument is for
      in virUSBDeviceNew. However, what is being passed there is:
      
        vroot = /var/run/libvirt/lxc/lxc_0.dev/bus/usb
      
      Therefore, constructed path is wrong:
      
        dev->path = //var/run/libvirt/lxc/lxc_0.dev/bus/usb//dev/bus/usb/002/002
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7b0ea999
  2. 31 1月, 2018 24 次提交
  3. 30 1月, 2018 6 次提交