1. 17 4月, 2019 1 次提交
  2. 12 3月, 2019 1 次提交
  3. 13 3月, 2018 1 次提交
  4. 05 12月, 2017 1 次提交
  5. 11 4月, 2017 1 次提交
  6. 15 4月, 2016 1 次提交
    • L
      conf: allow use of slot 0 in a dmi-to-pci-bridge · 0d668434
      Laine Stump 提交于
      When support for dmi-to-pci-bridge was added, it was assumed that,
      just as with the pci-root bus, slot 0 was reserved. This is not the
      case - it can be used to connect a device just like any other slot, so
      remove the restriction and update the test cases that auto-assign an
      address on a dmi-to-pci-bridge.
      0d668434
  7. 01 3月, 2016 1 次提交
  8. 10 2月, 2016 1 次提交
    • C
      tests: qemuxml2xml: assign device addresses · c1c4d0d5
      Cole Robinson 提交于
      We use the PreFormat callback for this. Many test cases need to be extended
      to pass in proper qemuCaps flags so AssignAddresses doesn't throw errors.
      
      One test case (pcie-root-port-too-many) is dropped, since it was meant
      only for checking an error condition in qemuxml2argv, and one we add in
      AssignAddresses it errors here too.
      
      Long term I think AssignAddresses should be handled in qemu's PostParse
      callback, but that's not entirely straightforward. Handling it here
      means we can get the test suite churn over with.
      c1c4d0d5
  9. 27 1月, 2016 1 次提交
    • P
      device: cleanup input device code · 36785c7e
      Pavel Hrdina 提交于
      The current code was a little bit odd.  At first we've removed all
      possible implicit input devices from domain definition to add them later
      back if there was any graphics device defined while parsing XML
      description.  That's not all, while formating domain definition to XML
      description we at first ignore any input devices with bus different to
      USB and VIRTIO and few lines later we add implicit input devices to XML.
      
      This seems to me as a lot of code for nothing.  This patch may look
      to be more complicated than original approach, but this is a preferred
      way to modify/add driver specific stuff only in those drivers and not
      deal with them in common parsing/formating functions.
      
      The update is to add those implicit input devices into config XML to
      follow the real HW configuration visible by guest OS.
      
      There was also inconsistence between our behavior and QEMU's in the way,
      that in QEMU there is no way how to disable those implicit input devices
      for x86 architecture and they are available always, even without graphics
      device.  This applies also to XEN hypervisor.  VZ driver already does its
      part by putting correct implicit devices into live XML.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      36785c7e
  10. 12 1月, 2016 1 次提交
    • L
      qemu: prefer 00:1D.x and 00:1A.x for USB2 controllers on Q35 · 163338ec
      Laine Stump 提交于
      The real Q35 machine puts the first USB controller set (EHCI+(UHCIx4))
      on bus 0 slot 0x1D, and the 2nd USB controller set on bus 0 slot 0x1A,
      so let's attempt to make the virtual machine match that for
      controllers with auto-assigned addresses when possible.
      
      Three test cases were added to assure that the proper addresses are
      assigned - one with a single set of unaddressed USB controllers, one
      with 3 (to grab both preferred slots plus one more), and one with the
      order of the controller definitions reordered, to assure that the
      auto-assignment isn't mixed up by order.
      163338ec
  11. 10 8月, 2015 2 次提交
    • L
      conf: add new <target> subelement with chassisNr attribute to <controller> · 8dc88aee
      Laine Stump 提交于
      There are some configuration options to some types of pci controllers
      that are currently automatically derived from other parts of the
      controller's configuration. For example, in qemu a pci-bridge
      controller has an option that is called "chassis_nr"; up until now
      libvirt has always set chassis_nr to the index of the pci-bridge. So
      this:
      
        <controller type='pci' model='pci-bridge' index='2'/>
      
      will always result in:
      
        -device pci-bridge,chassis_nr=2,...
      
      on the qemu commandline. In the future we may decide there is a better
      way to derive that option, but even in that case we will need for
      existing domains to retain the same chassis_nr they were using in the
      past - that is something that is visible to the guest so it is part of
      the guest ABI and changing it would lead to problems for migrating
      guests (or just guests with very picky OSes).
      
      The <target> subelement has been added as a place to put the new
      "chassisNr" attribute that will be filled in by libvirt when it
      auto-generates the chassisNr; it will be saved in the config, then
      reused any time the domain is started:
      
        <controller type='pci' model='pci-bridge' index='2'>
          <model type='pci-bridge'/>
          <target chassisNr='2'/>
        </controller>
      
      The one oddity of all this is that if the controller configuration
      is changed (for example to change the index or the pci address
      where the controller is plugged in), the items in <target> will
      *not* be re-generated, which might lead to conflict. I can't
      really see any way around this, but fortunately if there is a
      material conflict qemu will let us know and we will pass that on
      to the user.
      8dc88aee
    • L
      conf: add new <model> subelement with name attribute to <controller> · bf202510
      Laine Stump 提交于
      This new subelement is used in PCI controllers: the toplevel
      *attribute* "model" of a controller denotes what kind of PCI
      controller is being described, e.g. a "dmi-to-pci-bridge",
      "pci-bridge", or "pci-root". But in the future there will be different
      implementations of some of those types of PCI controllers, which
      behave similarly from libvirt's point of view (and so should have the
      same model), but use a different device in qemu (and present
      themselves as a different piece of hardware in the guest). In an ideal
      world we (i.e. "I") would have thought of that back when the pci
      controllers were added, and used some sort of type/class/model
      notation (where class was used in the way we are now using model, and
      model was used for the actual manufacturer's model number of a
      particular family of PCI controller), but that opportunity is long
      past, so as an alternative, this patch allows selecting a particular
      implementation of a pci controller with the "name" attribute of the
      <model> subelement, e.g.:
      
        <controller type='pci' model='dmi-to-pci-bridge' index='1'>
          <model name='i82801b11-bridge'/>
        </controller>
      
      In this case, "dmi-to-pci-bridge" is the kind of controller (one that
      has a single PCIe port upstream, and 32 standard PCI ports downstream,
      which are not hotpluggable), and the qemu device to be used to
      implement this kind of controller is named "i82801b11-bridge".
      
      Implementing the above now will allow us in the future to add a new
      kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
      device, but instead uses something else (which doesn't yet exist, but
      qemu people have been discussing it), all without breaking existing
      configs.
      
      (note that for the existing "pci-bridge" type of PCI controller, both
      the model attribute and <model> name are 'pci-bridge'. This is just a
      coincidence, since it turns out that in this case the device name in
      qemu really is a generic 'pci-bridge' rather than being the name of
      some real-world chip)
      bf202510
  12. 25 11月, 2014 2 次提交
  13. 07 8月, 2013 1 次提交
    • L
      qemu: enable using implicit sata controller in q35 machines · 83718cfe
      Laine Stump 提交于
      q35 machines have an implicit ahci (sata) controller at 00:1F.2 which
      has no "id" associated with it. For this reason, we can't refer to it
      as "ahci0". Instead, we don't give an id on the commandline, which
      qemu interprets as "use the first ahci controller". We then need to
      specify the unit with "unit=%d" rather than adding it onto the bus
      arg.
      83718cfe
  14. 06 8月, 2013 3 次提交
    • L
      qemu: fix handling of default/implicit devices for q35 · c27b0bb1
      Laine Stump 提交于
      This patch adds in special handling for a few devices that need to be
      treated differently for q35 domains:
      
      usb - there is no implicit/default usb controller for the q35
      machinetype. This is done because normally the default usb controller
      is added to a domain by just adding "-usb" to the qemu commandline,
      and it's assumed that this will add a single piix3 usb1 controller at
      slot 1 function 2. That's not what happens when the machinetype is
      q35, though. Instead, adding -usb to the commandline adds 3 usb
      (version 2) controllers to the domain at slot 0x1D.{1,2,7}. Rather
      than having
      
        <controller type='usb' index='0'/>
      
      translate into 3 separate devices on the PCI bus, it's cleaner to not
      automatically add a default usb device; one can always be added
      explicitly if desired. Or we may decide that on q35 machines, 3 usb
      controllers will be automatically added when none is given. But for
      this initial commit, at least we aren't locking ourselves into
      something we later won't want.
      
      video - qemu always initializes the primary video device immediately
      after any integrated devices for the machinetype. Unless instructed
      otherwise (by using "-device vga..." instead of "-vga" which libvirt
      uses in many cases to work around deficiencies and bugs in various
      qemu versions) qemu will always pick the first unused slot. In the
      case of the "pc" machinetype and its derivatives, this is always slot
      2, but on q35 machinetypes, the first free slot is slot 1 (since the
      q35's integrated peripheral devices are placed in other slots,
      e.g. slot 0x1f). In order to make the PCI address of the video device
      predictable, that slot (1 or 2, depending on machinetype) is reserved
      even when no video device has been specified.
      
      sata - a q35 machine always has a sata controller implicitly added at
      slot 0x1F, function 2. There is no way to avoid this controller, so we
      always add it. Note that the xml2xml tests for the pcie-root and q35
      cases were changed to use DO_TEST_DIFFERENT() so that we can check for
      the sata controller being automatically added. This is especially
      important because we can't check for it in the xml2argv output (it has
      no effect on that output since it's an implicit device).
      
      ide - q35 has no ide controllers.
      
      isa and smbus controllers - these two are always present in a q35 (at
      slot 0x1F functions 0 and 3) but we have no way of modelling them in
      our config. We do need to reserve those functions so that the user
      doesn't attempt to put anything else there though. (note that the "pc"
      machine type also has an ISA controller, which we also ignore).
      c27b0bb1
    • L
      qemu: add dmi-to-pci-bridge controller · 62ac6b43
      Laine Stump 提交于
      This PCI controller, named "dmi-to-pci-bridge" in the libvirt config,
      and implemented with qemu's "i82801b11-bridge" device, connects to a
      PCI Express slot (e.g. one of the slots provided by the pcie-root
      controller, aka "pcie.0" on the qemu commandline), and provides 31
      *non-hot-pluggable* PCI (*not* PCIe) slots, numbered 1-31.
      
      Any time a machine is defined which has a pcie-root controller
      (i.e. any q35-based machinetype), libvirt will automatically add a
      dmi-to-pci-bridge controller if one doesn't exist, and also add a
      pci-bridge controller. The reasoning here is that any useful domain
      will have either an immediate (startup time) or eventual (subsequent
      hot-plug) need for a standard PCI slot; since the pcie-root controller
      only provides PCIe slots, we need to connect a dmi-to-pci-bridge
      controller to it in order to get a non-hot-plug PCI slot that we can
      then use to connect a pci-bridge - the slots provided by the
      pci-bridge will be both standard PCI and hot-pluggable.
      
      Since pci-bridge devices themselves can not be hot-plugged into a
      running system (although you can hot-plug other devices into a
      pci-bridge's slots), any new pci-bridge controller that is added can
      (and will) be plugged into the dmi-to-pci-bridge as long as it has
      empty slots available.
      
      This patch is also changing the qemuxml2xml-pcie test from a "DO_TEST"
      to a "DO_DIFFERENT_TEST". This is so that the "before" xml can omit
      the automatically added dmi-to-pci-bridge and pci-bridge devices, and
      the "after" xml can include it - this way we are testing if libvirt is
      properly adding these devices.
      62ac6b43
    • L
      qemu: add pcie-root controller · 48a3f48a
      Laine Stump 提交于
      This controller is implicit on q35 machinetypes. It provides 31 PCIe
      (*not* PCI) slots as controller 0.
      
      Currently there are no devices that can connect to pcie-root, and no
      implicit pci controller on a q35 machine, so q35 is still
      unusable. For a usable q35 system, we need to add a
      "dmi-to-pci-bridge" pci controller, which can connect to pcie-root,
      and provides standard pci slots that can be used to connect other
      devices.
      48a3f48a