1. 06 8月, 2013 1 次提交
    • 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
  2. 04 8月, 2013 1 次提交
    • L
      conf: add default USB controller in qemu post-parse callback · c66da9d2
      Laine Stump 提交于
      The parser shouldn't be doing arch-specific things like adding in
      implicit controllers to the config. This should instead be done in the
      hypervisor's post-parse callback.
      
      This patch removes the auto-add of a usb controller from the domain
      parser, and puts it into the qemu driver's post-parse callback (just
      as is already done with the auto-add of the pci-root controller). In
      the future, any machine/arch that shouldn't have a default usb
      controller added should just set addDefaultUSB = false in this
      function.
      
      We've recently seen that q35 and ARMV7L domains shouldn't get a default USB
      controller, so I've set addDefaultUSB to false for both of those.
      c66da9d2
  3. 01 8月, 2013 3 次提交
  4. 20 7月, 2013 1 次提交
  5. 18 7月, 2013 1 次提交
  6. 11 7月, 2013 2 次提交
  7. 10 7月, 2013 2 次提交
  8. 08 7月, 2013 2 次提交
  9. 13 6月, 2013 1 次提交
  10. 23 5月, 2013 1 次提交
  11. 21 5月, 2013 1 次提交
  12. 14 5月, 2013 1 次提交
    • E
      qemu: use bool in monitor struct · 764bb5e5
      Eric Blake 提交于
      Follows on the heels of other bool cleanups, such as commit 93002b98.
      
      * src/qemu/qemu_monitor.h (qemuMonitorOpen, qemuMonitorOpenFD):
      Update json parameter type.
      * src/qemu/qemu_monitor.c (qemuMonitorOpen, qemuMonitorOpenFD):
      Likewise.
      (_qemuMonitor): Adjust field type.
      * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLParse): Adjust
      client.
      * src/qemu/qemu_process.c (qemuProcessStart): Likewise.
      * tests/qemumonitortestutils.c (qemuMonitorTestNew): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      764bb5e5
  13. 07 5月, 2013 1 次提交
  14. 03 5月, 2013 1 次提交
    • E
      build: avoid non-portable cast of pthread_t · 22d12905
      Eric Blake 提交于
      POSIX says pthread_t is opaque.  We can't guarantee if it is scaler
      or a pointer, nor what size it is; and BSD differs from Linux.
      We've also had reports of gcc complaining on attempts to cast it,
      if we use a cast to the wrong type (for example, pointers have to be
      cast to void* or intptr_t before being narrowed; while casting a
      function return of scalar pthread_t to void* triggers a different
      warning).
      
      Give up on casts, and use unions to get at decent bits instead.  And
      rather than futz around with figuring which 32 bits of a potentially
      64-bit pointer are most likely to be unique, convert the rest of
      the code base to use 64-bit values when using a debug id.
      
      Based on a report by Guido Günther against kFreeBSD, but with a
      fix that doesn't regress commit 4d970fd2 for FreeBSD.
      
      * src/util/virthreadpthread.c (virThreadSelfID, virThreadID): Use
      union to get at a decent bit representation of thread_t bits.
      * src/util/virthread.h (virThreadSelfID, virThreadID): Alter
      signature.
      * src/util/virthreadwin32.c (virThreadSelfID, virThreadID):
      Likewise.
      * src/qemu/qemu_domain.h (qemuDomainJobObj): Alter type of owner.
      * src/qemu/qemu_domain.c (qemuDomainObjTransferJob)
      (qemuDomainObjSetJobPhase, qemuDomainObjReleaseAsyncJob)
      (qemuDomainObjBeginNestedJob, qemuDomainObjBeginJobInternal): Fix
      clients.
      * src/util/virlog.c (virLogFormatString): Likewise.
      * src/util/vireventpoll.c (virEventPollInterruptLocked):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      22d12905
  15. 02 5月, 2013 2 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
    • M
      qemu: Generate agent socket path if missing · 297c99a5
      Michal Privoznik 提交于
      It's not desired to force users imagine path for a socket they
      are not even supposed to connect to. On the other hand, we
      already have a release where the qemu agent socket path is
      exposed to XML, so we cannot silently drop it from there.
      The new path is generated in form:
      
      $LOCALSTATEDIR/lib/libvirt/qemu/channel/target/$domain.$name
      
      for qemu system mode, and
      
      $XDG_CONFIG_HOME/qemu/lib/channel/target/$domain.$name
      
      for qemu session mode.
      297c99a5
  16. 01 5月, 2013 1 次提交
    • V
      S390: Do not generate a default USB controller · 3a82f628
      Viktor Mihajlovski 提交于
      For s390 we don't want to have a default USB device generated even
      if QEMU is silently tolerating -usb on the command line. This may change
      in the future.
      Another reason to avoid the USB controller is that it implies a PCI
      bus which might cause a regression at some later point in time.
      The following change will set the USB controller model to 'none'
      unless a model or address has been specified, which can be the case
      if a legacy definition is loaded or the XML writer knows what
      she/he's doing.
      Requiring the user to explicitly disable USB on systems not supporting
      it seems cumbersome.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      3a82f628
  17. 26 4月, 2013 1 次提交
    • E
      qemu: fix build error with older platforms · b121584f
      Eric Blake 提交于
      Jim Fehlig reported on IRC that older gcc/glibc triggers this warning:
      
      cc1: warnings being treated as errors
      qemu/qemu_domain.c: In function 'qemuDomainDefFormatBuf':
      qemu/qemu_domain.c:1297: error: declaration of 'remove' shadows a global declaration [-Wshadow]
      /usr/include/stdio.h:157: error: shadowed declaration is here [-Wshadow]
      make[3]: *** [libvirt_driver_qemu_impl_la-qemu_domain.lo] Error 1
      
      Fix it like we have done in the past (such as commit 2e6322a7).
      
      * src/qemu/qemu_domain.c (qemuDomainDefFormatBuf): Avoid shadowing
      a function name.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b121584f
  18. 25 4月, 2013 2 次提交
  19. 16 4月, 2013 1 次提交
  20. 09 4月, 2013 1 次提交
  21. 08 4月, 2013 1 次提交
    • O
      qemu: Translate the pool disk source when building drive string · db94a1d3
      Osier Yang 提交于
      This adds a new helper qemuTranslateDiskSourcePool which uses the
      storage pool/vol APIs to translate the disk source before building
      the drive string. Network volume is not supported yet. Disk chain
      for volume type disk may be supported later, but before I'm confident
      it doesn't break anything, it's just disabled now.
      db94a1d3
  22. 05 4月, 2013 6 次提交
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      virCaps: get rid of defaultDiskDriverType · b2990849
      Peter Krempa 提交于
      Use the qemu specific callback to fill this data in the qemu driver as
      it's the only place where it was used and fix tests as the qemu test
      capability object didn't configure the defaults for the tests.
      b2990849
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001
    • P
      virCaps: get rid of defaultDiskDriverName · 9ea249e7
      Peter Krempa 提交于
      This patch removes the defaultDiskDriverName from the virCaps
      structure. This particular default value is used only in the qemu driver
      so this patch uses the recently added callback to fill the driver name
      if it's needed instead of propagating it through virCaps.
      9ea249e7
    • P
      qemu: Record the default NIC model in the domain XML · a68d6726
      Peter Krempa 提交于
      This patch implements the devices post parse callback and uses it to fill
      the default qemu network card model into the XML if none is specified.
      
      Libvirt assumes that the network card model for qemu is the "rtl8139".
      Record this in the XML using the new callback to avoid user
      confusion.
      a68d6726
    • P
      maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption · e84b1931
      Peter Krempa 提交于
      This patch is the result of running:
      
      for i in $(git ls-files | grep -v html | grep -v \.po$ ); do
        sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i
      done
      
      and a few manual tweaks.
      e84b1931
  23. 14 3月, 2013 1 次提交
    • V
      S390: QEMU driver support for CCW addresses · 608512b2
      Viktor Mihajlovski 提交于
      This commit adds the QEMU driver support for CCW addresses. The
      current QEMU only allows virtio devices to be attached to the
      CCW bus. We named the new capability indicating that support
      QEMU_CAPS_VIRTIO_CCW accordingly.
      
      The fact that CCW devices can only be assigned to domains with a
      machine type of s390-ccw-virtio requires a few extra checks for
      machine type in qemu_command.c on top of querying
      QEMU_CAPS_VIRTIO_{CCW|S390}.
      
      The majority of the new functions deals with CCW address generation
      and management.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      608512b2
  24. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  25. 01 3月, 2013 1 次提交
    • J
      qemu: Make sure qemuProcessStart is run within a job · e4e28220
      Jiri Denemark 提交于
      qemuProcessStart expects to be run with a job already set and every
      caller except for qemuMigrationPrepareAny use it correctly. This bug can
      be observed in libvirtd logs during incoming migration as
      
          warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems
          to be the async job owner; entering monitor without asking for a
          nested job is dangerous
      e4e28220
  26. 23 2月, 2013 1 次提交
  27. 13 2月, 2013 1 次提交
    • D
      Remove qemuDriverLock from almost everywhere · a9e97e0c
      Daniel P. Berrange 提交于
      With the majority of fields in the virQEMUDriverPtr struct
      now immutable or self-locking, there is no need for practically
      any methods to be using the QEMU driver lock. Only a handful
      of helper APIs in qemu_conf.c now need it
      a9e97e0c
  28. 08 2月, 2013 1 次提交