1. 10 2月, 2011 6 次提交
    • D
      Add a little more debugging for async events · 2222bd24
      Daniel P. Berrange 提交于
      To make it easier to investigate problems with async event
      delivery, add two more debugging lines
      
      * daemon/remote.c: Debug when an event is queued for dispatch
      * src/remote/remote_driver.c: Debug when an event is received
        for processing
      2222bd24
    • D
      Move connection driver modules directory · 8ce5d404
      Daniel P. Berrange 提交于
      When built as modules, the connection drivers live
      in $LIBDIR/libvirt/drivers. Now we add lock manager
      drivers, we need to distinguish. So move the existing
      modules to 'connection-driver'
      
      * src/Makefile.am: Move module install dir
      * src/driver.c: Move module search dir
      8ce5d404
    • D
      Reset logging filter function when forking · 88d04d17
      Daniel P. Berrange 提交于
      To ensure child processes will log all error messages, reset
      the logging filter function when forking
      
      * src/util/util.c: Reset log filter in fork
      88d04d17
    • D
      Block SIGPIPE around virExec hook functions · ab07533e
      Daniel P. Berrange 提交于
      Some functionality run in virExec hooks may do I/O which
      can trigger SIGPIPE. Renable SIGPIPE blocking around the
      hook function
      
      * src/util/util.c: Block SIGPIPE around hooks
      ab07533e
    • D
      Support SCSI RAID type & lower log level for unknown types · cd782cc3
      Daniel P. Berrange 提交于
      The Linux kernel headers don't have a value for SCSI type 12,
      but HAL source code shows this to be a 'raid'. Add workaround
      for this type. Lower log level for unknown types since
      this is not a fatal error condition. Include the device sysfs
      path in the log output to allow identification of which device
      has problems.
      
      * src/node_device/node_device_udev.c: Add SCSI RAID type
      cd782cc3
    • D
      Only initialize/cleanup libpciaccess once · 2215050e
      Daniel P. Berrange 提交于
      libpciaccess has many bugs in its pci_system_init/cleanup
      functions that makes calling them multiple times unwise.
      eg it will double close() FDs, and leak other FDs.
      
      * src/node_device/node_device_udev.c: Only initialize
        libpciaccess once
      2215050e
  2. 09 2月, 2011 17 次提交
  3. 08 2月, 2011 5 次提交
  4. 05 2月, 2011 2 次提交
    • E
      spicevmc: support older -device spicevmc of qemu 0.13.0 · 5a3ec56b
      Eric Blake 提交于
      qemu 0.13.0 (at least as built for Fedora 14, and also backported to
      RHEL 6.0 qemu) supported an older syntax for a spicevmc channel; it's
      not as flexible (it has an implicit name and hides the chardev
      aspect), but now that we support spicevmc, we might as well target
      both variants.
      
      * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_DEVICE_SPICEVMC):
      New flag.
      * src/qemu/qemu_capabilities.c (qemuCapsParseDeviceStr): Set it
      correctly.
      * src/qemu/qemu_command.h (qemuBuildVirtioSerialPortDevStr): Drop
      declaration.
      * src/qemu/qemu_command.c (qemuBuildVirtioSerialPortDevStr): Alter
      signature, check flag.
      (qemuBuildCommandLine): Adjust caller and check flag.
      * tests/qemuhelptest.c (mymain): Update test.
      * tests/qemuxml2argvtest.c (mymain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml:
      New file.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.args:
      Likewise.
      5a3ec56b
    • E
      smartcard: add spicevmc support · 79f9267f
      Eric Blake 提交于
      Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the
      new <channel name='smartcard'/> of <graphics type='spice'>.
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New
      enum value.
      (virDomainChrSpicevmcName): New enum.
      (virDomainChrSourceDef): Distinguish spicevmc types.
      * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add
      smartcard.
      (virDomainSmartcardDefParseXML): Parse it.
      (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set
      spicevmc name.
      (virDomainChrSpicevmc): New enum conversion functions.
      * src/libvirt_private.syms: Export new functions.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize
      name.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args:
      New file.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml:
      Likewise.
      79f9267f
  5. 04 2月, 2011 10 次提交
    • D
      spicevmc: support new qemu chardev · be87a123
      Daniel P. Berrange 提交于
      Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757
      
      Add a new character device backend for virtio serial channels that
      activates the QEMU spice agent on the main channel using the vdagent
      spicevmc connection.  The <target> must be type='virtio', and supports
      an optional name that specifies how the guest will see the channel
      (for now, name must be com.redhat.spice.0).
      
      <channel type='spicevmc'>
        <target type='virtio'/>
        <address type='virtio-serial' controller='1' bus='0' port='3'/>
      </channel>
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainChrType): New enum value.
      * src/conf/domain_conf.c (virDomainChr): Add spicevmc.
      (virDomainChrDefParseXML, virDomainChrSourceDefParseXML)
      (virDomainChrDefParseTargetXML): Parse and enforce proper use.
      (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Add qemu support.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New
      file.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args:
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      be87a123
    • E
      smartcard: turn on qemu support · f5fd9baa
      Eric Blake 提交于
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard
      options.
      (qemuAssignDeviceAliases): Assign an alias for smartcards.
      (qemuBuildControllerDevStr): Manage the usb-ccid controller.
      * tests/qemuxml2argvtest.c (mymain): Add new tests.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.args: New
      file.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough.args:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.args:
      Likewise.
      f5fd9baa
    • E
      smartcard: enable SELinux support · 32e52134
      Eric Blake 提交于
      * src/security/security_selinux.c
      (SELinuxRestoreSecuritySmartcardCallback)
      (SELinuxSetSecuritySmartcardCallback): New helper functions.
      (SELinuxRestoreSecurityAllLabel, SELinuxSetSecurityAllLabel): Use
      them.
      32e52134
    • E
      smartcard: check for qemu capability · 7a2f29e4
      Eric Blake 提交于
      Qemu smartcard/spicevmc support exists on branches (such as
      http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b)
      but is not yet upstream.  The added -help output matches a scratch build
      that will be close to the RHEL 6.1 qemu-kvm.
      
      * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_CCID_EMULATED)
      (QEMUD_CMD_FLAG_CCID_PASSTHRU, QEMUD_CMD_FLAG_CHARDEV_SPICEVMC):
      New flags.
      * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags)
      (qemuCapsParseDeviceStr): Check for smartcard capabilities.
      (qemuCapsExtractVersionInfo): Tweak comment.
      * tests/qemuhelptest.c (mymain): New test.
      * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61: New file.
      * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61-device: Likewise.
      7a2f29e4
    • E
      smartcard: add domain conf support · c1be1a2e
      Eric Blake 提交于
      * src/conf/domain_conf.h (virDomainSmartcardType): New enum.
      (virDomainSmartcardDef, virDomainDeviceCcidAddress): New structs.
      (virDomainDef): Include smartcards.
      (virDomainSmartcardDefIterator): New typedef.
      (virDomainSmartcardDefFree, virDomainSmartcardDefForeach): New
      prototypes.
      (virDomainControllerType, virDomainDeviceAddressType): Add ccid
      enum values.
      (virDomainDeviceInfo): Add ccid address type.
      * src/conf/domain_conf.c (virDomainSmartcard): Convert between
      enum and string.
      (virDomainSmartcardDefParseXML, virDomainSmartcardDefFormat)
      (virDomainSmartcardDefFree, virDomainDeviceCcidAddressParseXML)
      (virDomainDefMaybeAddSmartcardController): New functions.
      (virDomainDefParseXML): Parse the new XML.
      (virDomainDefFormat): Convert back to XML.
      (virDomainDefFree): Clean up.
      (virDomainDeviceInfoIterate): Iterate over passthrough aliases.
      (virDomainController, virDomainDeviceAddress)
      (virDomainDeviceInfoParseXML, virDomainDeviceInfoFormat)
      (virDomainDefAddImplicitControllers): Support new values.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): List new function.
      c1be1a2e
    • E
      smartcard: add XML support for <smartcard> device · ffdf478b
      Eric Blake 提交于
      Assuming a hypervisor that supports multiple smartcard devices in the
      guest, this would be a valid XML description:
      
      <devices>
        <smartcard mode='host'/>
        <smartcard mode='host-certificates'>
          <certificate>/path/to/cert1</certificate>
          <certificate>/path/to/cert2</certificate>
          <certificate>/path/to/cert3</certificate>
        </smartcard>
        <smartcard mode='passthrough' type='tcp'>
          <source mode='bind' host='127.0.0.1' service='2001'/>
          <protocol type='raw'/>
        </smartcard>
      </devices>
      
      (As of this commit, the qemu hypervisor will be the first
      implementation, but it only supports one smartcard.)
      
      * docs/formatdomain.html.in (Smartcard devices): New section.
      * docs/schemas/domain.rng (smartcard): New define, used in
      devices.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.xml: New file
      to test schema.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.xml:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-tcp.xml:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.xml:
      Likewise.
      ffdf478b
    • A
      docs/index.html.in: update QEMU url · ad88e17f
      Alon Levy 提交于
      ad88e17f
    • J
      qemu: Support booting from hostdev PCI devices · 963a9460
      Jiri Denemark 提交于
      963a9460
    • J
      Support booting from hostdev devices · 83e335f9
      Jiri Denemark 提交于
      83e335f9
    • J
      qemu: Add shortcut for HMP pass through · 2169472a
      Jiri Denemark 提交于
      Currently users who want to use virDomainQemuMonitorCommand() API or
      it's virsh equivalent has to use the same protocol as libvirt uses for
      communication to qemu. Since the protocol is QMP with current qemu and
      HMP much more usable for humans, one ends up typing something like the
      following:
      
          virsh qemu-monitor-command DOM \
      '{"execute":"human-monitor-command","arguments":{"command-line":"info kvm"}}'
      
      which is not a very convenient way of debugging qemu.
      
      This patch introduces --hmp option to qemu-monitor-command, which says
      that the provided command is in HMP. If libvirt uses QMP to talk with
      qemu, the command will automatically be converted into QMP. So the
      example above is simplified to just
      
          virsh qemu-monitor-command --hmp DOM "info kvm"
      
      Also the result is converted from
      
          {"return":"kvm support: enabled\r\n"}
      
      to just plain HMP:
      
          kvm support: enabled
      
      If libvirt talks to qemu in HMP, --hmp flag is obviously a noop.
      2169472a