1. 15 4月, 2016 2 次提交
    • L
      qemu: support new pci controller model "pcie-expander-bus" · 8b62c65d
      Laine Stump 提交于
      This is backed by the qemu device pxb-pcie, which will be available in
      qemu 2.6.0.
      
      As with pci-expander-bus (which uses qemu's pxb device), the busNr
      attribute and <node> subelement of <target> are used to set the bus_nr
      and numa_node options.
      
      During post-parse we validate that the domain's machinetype is
      q35-based (since the device shows up for 440fx-based machinetypes, but
      is unusable), as well as checking that <node> specifies a node that is
      actually configured on the guest.
      8b62c65d
    • L
      qemu: support new pci controller model "pci-expander-bus" · 400b2976
      Laine Stump 提交于
      This is backed by the qemu device "pxb".
      
      The pxb device always includes a pci-bridge that is at the bus number
      of the pxb + 1.
      
      busNr and <node> from the <target> subelement are used to set the
      bus_nr and numa_node options for pxb.
      
      During post-parse we validate that the domain's machinetype is
      440fx-based (since the pxb device only works on 440fx-based machines),
      and <node> also gets a sanity check to assure that the NUMA node
      specified for the pxb (if any - it's optional) actually exists on the
      guest.
      400b2976
  2. 13 4月, 2016 1 次提交
  3. 10 4月, 2016 1 次提交
    • R
      qemu: fix build without gnutls installed · acb63aaf
      Roman Bogorodskiy 提交于
      Move including of gnutls/gnutls.h in qemu/qemu_domain.c under the
      "ifdef WITH_GNUTLS" check because otherwise it fails like this:
      
        CC       qemu/libvirt_driver_qemu_impl_la-qemu_domain.lo
      qemu/qemu_domain.c:50:10: fatal error: 'gnutls/gnutls.h' file not found
      
      in case if gnutls is not installed on the system.
      acb63aaf
  4. 08 4月, 2016 1 次提交
  5. 07 4月, 2016 2 次提交
    • A
      qemu: Explicitly check for gnutls_rnd() · 2d23d145
      Andrea Bolognani 提交于
      Our use of gnutls_rnd(), introduced with commit ad7520e8, is
      conditional to the availability of the <gnutls/crypto.h> header
      file.
      
      Such check, however, turns out not to be strict enough, as there
      are some versions of GnuTLS (eg. 2.8.5 from CentOS 6) that provide
      the header file, but not the function itself, which was introduced
      only in GnuTLS 2.12.0.
      
      Introduce an explicit check for the function.
      2d23d145
    • J
      qemu: Create domain master key · ad7520e8
      John Ferlan 提交于
      Add a masterKey and masterKeyLen to _qemuDomainObjPrivate to store a
      random domain master key and its length in order to support the ability
      to encrypt/decrypt sensitive data shared between libvirt and qemu. The
      key will be base64 encoded and written to a file to be used by the
      command line building code to share with qemu.
      
      New API's from this patch:
      
        qemuDomainGetMasterKeyFilePath:
          Return a path to where the key is located
      
        qemuDomainWriteMasterKeyFile: (private)
          Open (create/trunc) the masterKey path and write the masterKey
      
        qemuDomainMasterKeyReadFile:
          Using the master key path, open/read the file, and store the
          masterKey and masterKeyLen. Expected use only from qemuProcessReconnect
      
        qemuDomainGenerateRandomKey: (private)
          Generate a random key using available algorithms
      
          The key is generated either from the gnutls_rnd function if it
          exists or a less cryptographically strong mechanism using
          virGenerateRandomBytes
      
         qemuDomainMasterKeyRemove:
          Remove traces of the master key, remove the *KeyFilePath
      
        qemuDomainMasterKeyCreate:
          Generate the domain master key and save the key in the location
          returned by qemuDomainGetMasterKeyFilePath.
      
          This API will first ensure the QEMU_CAPS_OBJECT_SECRET is set
          in the capabilities. If not, then there's no need to generate
          the secret or file.
      
      The creation of the key will be attempted from qemuProcessPrepareHost
      once the libDir directory structure exists.
      
      The removal of the key will handled from qemuProcessStop just prior
      to deleting the libDir tree.
      
      Since the key will not be written out to the domain object XML file,
      the qemuProcessReconnect will read the saved file and restore the
      masterKey and masterKeyLen.
      ad7520e8
  6. 04 4月, 2016 2 次提交
  7. 29 3月, 2016 2 次提交
  8. 22 3月, 2016 1 次提交
  9. 21 3月, 2016 1 次提交
  10. 10 3月, 2016 1 次提交
  11. 09 3月, 2016 2 次提交
    • P
      qemu: add support for offline vcpupin · 02ae21de
      Peter Krempa 提交于
      Allow pinning for inactive vcpus. The pinning mask will be automatically
      applied as we would apply the default mask in case of a cpu hotplug.
      
      Setting the scheduler settings for a vcpu has the same semantics.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1306556
      02ae21de
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
  12. 08 3月, 2016 2 次提交
  13. 01 3月, 2016 1 次提交
    • M
      qemu: Shorten per-domain directory names · a89f05ba
      Martin Kletzander 提交于
      Per-domain directories were introduced in order to be able to
      completely separate security labels for each domain (commit
      f1f68ca3).  However when the domain
      name is long (let's say a ridiculous 110 characters), we cannot
      connect to the monitor socket because on length of UNIX socket address
      is limited.  In order to get around this, let's shorten it in similar
      fashion and in order to avoid conflicts, throw in an ID there as well.
      Also save that into the status XML and load the old status XMLs
      properly (to clean up after older domains).  That way we can change it
      in the future.
      
      The shortening can be seen in qemuxml2argv tests, for example in the
      hugepages-pages2 case.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a89f05ba
  14. 26 2月, 2016 1 次提交
  15. 20 2月, 2016 1 次提交
    • A
      gic: Introduce VIR_GIC_VERSION_DEFAULT alias · d8fc7e05
      Andrea Bolognani 提交于
      GIC v2 is the default, but checking against that specific version when
      we want to know whether the default has been selected is potentially
      error prone; using an alias instead makes it safer.
      d8fc7e05
  16. 19 2月, 2016 2 次提交
  17. 17 2月, 2016 3 次提交
  18. 16 2月, 2016 2 次提交
  19. 11 2月, 2016 1 次提交
    • J
      qemu: Split the command parsing routines into own module · d860b2f5
      John Ferlan 提交于
      Extract out the qemuParseCommandLine{String|Pid} into their own
      separate module - taking with it all the various static functions.
      
      Causes a ripple effect with a few other modules to include the
      new qemu_parse_command.h.
      
      Narrowed down the list of #include's in the split out module to
      those that are necessary for build.
      d860b2f5
  20. 08 2月, 2016 1 次提交
  21. 05 2月, 2016 2 次提交
  22. 04 2月, 2016 1 次提交
  23. 03 2月, 2016 2 次提交
  24. 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
  25. 12 1月, 2016 2 次提交
  26. 11 1月, 2016 2 次提交