1. 21 11月, 2019 1 次提交
    • J
      qemu: Store default CPU in domain XML · 5e939cea
      Jiri Denemark 提交于
      When starting a domain without a CPU model specified in the domain XML,
      QEMU will choose a default one. Which is fine unless the domain gets
      migrated to another host because libvirt doesn't perform any CPU ABI
      checks and the virtual CPU provided by QEMU on the destination host can
      differ from the one on the source host.
      
      With QEMU 4.2.0 we can probe for the default CPU model used by QEMU for
      a particular machine type and store it in the domain XML. This way the
      chosen CPU model is more visible to users and libvirt will make sure
      the guest will see the exact same CPU after migration.
      
      Architecture specific notes
      - aarch64: We only set the default CPU for TCG domains as KVM requires
        explicit "-cpu host" to work.
      
      - ppc64: The default CPU for KVM is "host" thanks to some hacks in QEMU,
        we will translate the default model to the model corresponding to the
        host CPU ("POWER8" on a Power8 host, "POWER9" on Power9 host, etc.).
        This is not a problem as the corresponding CPU model is in fact an
        alias for "host". This is probably not ideal, but it's not wrong and
        the default virtual CPU configured by libvirt is the same QEMU would
        use. TCG uses various CPU models depending on machine type and its
        version.
      
      - s390x: The default CPU for KVM is "host" while TCG defaults to "qemu".
      
      - x86_64: The default CPU model (qemu64) is not runnable on any host
        with KVM, but QEMU just disables unavailable features and starts
        happily.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1598151
      https://bugzilla.redhat.com/show_bug.cgi?id=1598162Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      5e939cea
  2. 22 8月, 2019 1 次提交
  3. 26 7月, 2019 1 次提交
  4. 06 6月, 2018 2 次提交
  5. 03 5月, 2018 1 次提交
  6. 05 12月, 2017 1 次提交
  7. 11 4月, 2017 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. 09 2月, 2016 1 次提交
    • C
      tests: qemuxml2xml: Always use different output file · d093d623
      Cole Robinson 提交于
      Most qemuxml2xml tests expect that the input XML is unchanged after
      parsing. This is unlike 99% of new qemu configs in the wild, which after
      initial parsing end up with stable PCI device addresses. The xml2xml bit
      doesn't currently hit that code path though, so most XML testing indeed
      does not change.
      
      Future patches will add that PCI address bits, which means most test cases
      will have different output. So let's do away with the hardcoded same vs
      different test split, and always track a separate output file. Tests can
      still have same input and output, it just necessitates 2 separate XML files.
      d093d623
  10. 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
  11. 25 4月, 2013 1 次提交
    • J
      qemu: auto-add pci-root controller for pc machine types · b33eb0dc
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'/>
      is auto-added to pc* machine types.
      Without this controller PCI bus 0 is not available and
      no PCI addresses are assigned by default.
      
      Since older libvirt supported PCI bus 0 even without
      this controller, it is removed from the XML when migrating.
      b33eb0dc
  12. 13 4月, 2013 1 次提交