1. 29 9月, 2009 24 次提交
    • D
      Add API for issuing 'host_net_remove' monitor command · b06c97e5
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new
        qemuMonitorRemoveHostNetwork() command for removing host
        networks
      * src/qemu/qemu_driver.c: Convert NIC hotplug methods over
        to use qemuMonitorRemoveHostNetwork()
      b06c97e5
    • D
      Add API for issuing 'host_net_add' monitor command · 4c10127b
      Daniel P. Berrange 提交于
      * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Remove prefix arg
        from qemuBuildHostNetStr which is no longer required
      * src/qemu/qemu_driver.c: Refactor to use qemuMonitorAddHostNetwork()
        API for adding host network
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddHostNetwork() method for adding host networks
      4c10127b
    • D
      Add API for issuing 'pci_add nic' monitor command · f8d54e7c
      Daniel P. Berrange 提交于
      * src/qemu/qemu_conf.c: Remove separator from qemuBuildNicStr()
        args, and remove hardcoded 'nic' prefix. Leave it upto callers
        instead
      * src/qemu/qemu_driver.c: Switch over to using the new
        qemuMonitorAddPCINetwork() method for NIC hotplug
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddPCINetwork API for PCI network device hotplug
      f8d54e7c
    • D
      Add API for issuing 'getfd' and 'closefd' monitor commands · aadab515
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle
        APIs for processing file handles
      * src/qemu/qemu_driver.c: Convert NIC hotplug method over to
        use   qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle
      aadab515
    • D
      Add API for issuing 'pci_add storage' monitor command · 85df9339
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        API qemuMonitorAddPCIDisk()
      * src/qemu/qemu_driver.c: Convert over to using the new
        qemuMonitorAddPCIDisk() method, and remove now obsolete
        qemudEscape() method
      85df9339
    • D
      Add API for issuing 'pci_del' monitor command · 3e11f9ff
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API
        qemuMonitorRemovePCIDevice() for removing PCI device
      * src/qemu/qemu_driver.c: Convert all places removing PCI devices
        over to new qemuMonitorRemovePCIDevice() API
      3e11f9ff
    • D
      Add API for issuing 'pci_add host' monitor command · e7f38d96
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        API qemuMonitorAddPCIHostDevice()
      * src/qemu/qemu_driver.c: Switch to using qemuMonitorAddPCIHostDevice()
        for PCI host device hotplug
      e7f38d96
    • D
      Add APIs for sending 'usb_add' command for host devices · 61ea9c89
      Daniel P. Berrange 提交于
      One API adds an exact device based on bus+dev, the other adds
      any device matching vendor+product
      
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddUSBDeviceExact() and qemuMonitorAddUSBDeviceMatch()
        commands.
      * src/qemu/qemu_driver.c: Switch over to using the new
          qemuMonitorAddUSBDeviceExact() and qemuMonitorAddUSBDeviceMatch()
      61ea9c89
    • D
      Add API for using 'usb_add' for disk devices · f566c592
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddUSBDisk() API
      * src/qemu/qemu_driver.c: Switch USB disk hotplug to the new
        src/qemu/qemu_driver.c API.
      f566c592
    • D
      Add API for issuing 'migrate' command with exec protocol · ed2a10a1
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorMigrateToCommand() API
      * src/qemu/qemu_driver.c: Switch over to using the
        qemuMonitorMigrateToCommand() API for core dumps and save
        to file APIs
      ed2a10a1
    • D
      Add API for issuing a 'migrate' monitor command for TCP · 81f3edea
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API
        qemuMonitorMigrateToHost() for doing TCP migration
      * src/qemu/qemu_driver.c: Convert to use qemuMonitorMigrateToHost().
        Also handle proper URIs (tcp:// as well as tcp:)
      81f3edea
    • D
      Add API for running 'info migration' monitor command · d7a3c835
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorGetMigrationStatus() command.
      * src/qemu/qemu_driver.c: Use new qemuMonitorGetMigrationStatus()
        command to check completion status.
      d7a3c835
    • D
      Add API for issuing the 'migrate_set_speed' monitor command · bdc8861a
      Daniel P. Berrange 提交于
      * src/qemu/qemu_driver.c: Use new qemuMonitorSetMigrationSpeed()
        API during migration
      * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new
        qemuMonitorSetMigrationSpeed() API
      bdc8861a
    • D
      Add API for issuing 'info blockstats' command · f225e560
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new
        qemuMonitorGetBlockStatsInfo() command
      * src/qemu/qemu_driver.c: Remove directly use of blockstats in
        favour of calling qemuMonitorGetBlockStatsInfo()
      f225e560
    • D
      Add APIs for issuing 'memsave' and 'pmemsave' monitor commands · 316e9f90
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new APIs
        qemuMonitorSaveVirtualMemory() and qemuMonitorSavePhysicalMemory()
      * src/qemu/qemu_driver.c: Use the new qemuMonitorSaveVirtualMemory()
        and qemuMonitorSavePhysicalMemory() APIs
      316e9f90
    • D
      Add APIs for issuing 'eject' and 'change dev' monitor commands · 6d9c4758
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new APis
        qemuMonitorChangeMedia and qemuMonitorEjectMedia. Pull in code
        for qemudEscape
      * src/qemu/qemu_driver.c: Remove code that directly issues 'eject'
        and 'change' commands in favour of API calls.
      6d9c4758
    • D
      Add API for issuing 'balloon' monitor command · eff29c8b
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorSetBalloon() based on existing code in
        qemudDomainSetMemoryBalloon
      * src/qemu/qemu_driver.c: Remove use of qemudDomainSetMemoryBalloon()
        in favour of qemuMonitorSetBalloon(). Fix error code when balloon
        is not supported
      eff29c8b
    • D
      Add API for running 'info balloon' monitor command · 6f19c16c
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Pull old
        qemudDomainGetMemoryBalloon() code into a new method called
        qemuMonitorGetBalloonInfo()
      * src/qemu/qemu_driver.c: Update to call qemuMonitorGetBalloonInfo()
        and remove qemudDomainGetMemoryBalloon().
      6f19c16c
    • D
      Add API for the 'system_powerdown' monitor command · 19d70c7d
      Daniel P. Berrange 提交于
      * src/qemu/qemu_driver.c: Remove use of 'system_powerdown'
      * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new
        qemuMonitorSystemPowerdown() api call
      19d70c7d
    • D
      Add API for 'stop' monitor command · 1e64d8c7
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new
        qemuMonitorStopCPUs() API
      * src/qemu/qemu_driver.c: Replace direct monitor commands for 'stop'
        with qemuMonitorStopCPUs()
      1e64d8c7
    • D
      Rename qemudMonitorSendCont to qemuMonitorStartCPUs · 4734a422
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Rename
        Rename qemudMonitorSendCont to qemuMonitorStartCPUs
      * src/qemu/qemu_driver.c: Update callers for new name
      4734a422
    • D
      Add API for 'change vnc password' monitor command · 3aee2615
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a
        new qemuMonitorSetVNCPassword() API
      * src/qemu/qemu_driver.c: Refactor qemudInitPasswords to
        call qemuMonitorSetVNCPassword()
      3aee2615
    • D
      Add API for 'info cpus' monitor command · f38b654e
      Daniel P. Berrange 提交于
      * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new
        qemuMonitorGetCPUInfo() command
      * src/qemu/qemu_driver.c: Refactor qemudDetectVcpuPIDs to
        use qemuMonitorGetCPUInfo()
      f38b654e
    • D
      Pull QEMU monitor interaction out to separate file · a541c762
      Daniel P. Berrange 提交于
      Pull out all the QEMU monitor interaction code to a separate
      file. This will make life easier when we need to drop in a
      new implementation for the forthcoming QMP machine friendly
      monitor support.
      
      Next step is to add formal APIs for each monitor command,
      and remove direct commands for sending/receiving generic
      data.
      
      * src/Makefile.am: Add qemu_monitor.c to build
      * src/qemu/qemu_driver.c: Remove code for monitor interaction
      * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: New
        file for monitor interaction
      * po/POTFILES.in: Add src/qemu/qemu_monitor_text.c
      a541c762
  2. 24 9月, 2009 1 次提交
  3. 23 9月, 2009 1 次提交
    • C
      Introduce virStrncpy. · 03d777f3
      Chris Lalancette 提交于
      Add the virStrncpy function, which takes a dst string, source string,
      the number of bytes to copy and the number of bytes available in the
      dest string.  If the source string is too large to fit into the
      destination string, including the \0 byte, then no data is copied and
      the function returns NULL.  Otherwise, this function copies n bytes
      from source into dst, including the \0, and returns a pointer to the
      dst string.  This function is intended to replace all unsafe uses
      of strncpy in the code base, since strncpy does *not* guarantee that
      the buffer terminates with a \0.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      03d777f3
  4. 22 9月, 2009 1 次提交
  5. 21 9月, 2009 4 次提交
    • D
      Move security drivers to src/security/ · e56c6a83
      Daniel P. Berrange 提交于
      * src/Makefile.am, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c,
        tests/seclabeltest.c: Adapt for changed paths
      * src/security.c: Rename to src/security/security_driver.c
      * src/security.h: Rename to src/security/security_driver.h
      * src/security_selinux.c, src/security_selinux.h: Move to src/security/
      e56c6a83
    • D
      Move QEMU driver to src/qemu/ · 58355a5b
      Daniel P. Berrange 提交于
      * src/qemu_conf.c, src/qemu_conf.h, src/qemu_driver.c,
        src/qemu_driver.h: Move to src/qemu/
      * daemon/qemud.c, src/Makefile.am, tests/qemuargv2xmltest.c,
        tests/qemuhelptest.c, tests/qemuxml2argvtest.c,
        tests/qemuxml2xmltest.c: Adapt for changed paths
      58355a5b
    • D
      Move xen driver code into src/xen/ directory · f7a107f7
      Daniel P. Berrange 提交于
      * src/Makefile.am, src/proxy_internal.c, src/proxy_internal.h
        src/sexpr.c, src/sexpr.h, src/xen_unified.c, src/xen_unified.h,
        src/xen_internal.c, src/xen_internal.h, src/xen_inotify.c,
        src/xen_inotify.h, src/xend_internal.c, src/xend_internal.h,
        src/xm_internal.c, src/xm_internal.h, src/xs_internal.c,
        src/xs_internal.h: Move to src/xen/ directory
      * proxy/Makefile.am, proxy/libvirt_proxy.c, src/Makefile.am,
        src/libvirt.c, tests/sexpr2xmltest.c, tests/statstest.c,
        tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c:
        Adapt to changed xen location
      * src/stats_linux.h, src/stats_linux.c: Remove xen specific block
        stats APIs
      * src/qemu_driver.c, src/uml_driver.c: Add missing sys/un.h include
        uncovered after change to stats_linux.h
      * src/xen/block_stats.h, src/xen/block_stats.c: Add xen specific
        block stats APIs
      f7a107f7
    • M
      Fix leak in PCI hostdev hot-unplug · a70da51f
      Mark McLoughlin 提交于
      * src/qemu_driver.c: sync the hostdev hot-unplug code with the disk/net
        code.
      a70da51f
  6. 17 9月, 2009 1 次提交
  7. 15 9月, 2009 1 次提交
    • D
      Fix UUID handling in secrets/storage encryption APIs · 47e7a258
      Daniel P. Berrange 提交于
      Convert all the secret/storage encryption APIs / wire format to
      handle UUIDs in raw format instead of non-canonical printable
      format. Guarentees data format correctness.
      
      * docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
        and validate fully
      * docs/schemas/secret.rng: Fully validate UUID
      * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
        virSecretLookupByUUID and virSecretGetUUID. Make
        virSecretGetUUIDString follow normal API design pattern
      * python/generator.py: Skip generation of virSecretGetUUID,
        virSecretGetUUIDString and virSecretLookupByUUID
      * python/libvir.c, python/libvirt-python-api.xml: Manual impl
        of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
      * qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
        Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
      * qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
        remote_uuid instead of remote_nonnull_string for UUID field.
        Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
        REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
        remote_uuid  value
      * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
        qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
        qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
      * src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
        of printable. Change virGetSecret to use raw format UUID
      * src/driver.h: Rename virDrvSecretLookupByUUIDString to
        virDrvSecretLookupByUUID and use raw format UUID
      * src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
        and re-implement virSecretLookupByUUIDString and
        virSecretGetUUIDString in terms of those
      * src/libvirt_public.syms: Add virSecretLookupByUUID and
        virSecretGetUUID
      * src/remote_internal.c: Rename remoteSecretLookupByUUIDString
        to remoteSecretLookupByUUID. Fix typo in args for
        remoteSecretDefineXML impl. Use raw UUID format for
        get_nonnull_secret and make_nonnull_secret
      * src/storage_encryption_conf.c, src/storage_encryption_conf.h:
        Storage UUID in raw format, and require it to be present in
        XML. Use UUID parser to validate.
      * secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
        Storage UUID in raw format.
      * src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
        in a filed with printable UUID, instead of base64 UUID.
      * src/virsh.c: Adjust for changed public API contract of
        virSecretGetUUIDString.
      * src/storage_Backend.c: DOn't undefine secret we just generated
        upon successful volume creation. Fix to handle raw UUIDs. Generate
        a non-clashing UUID
      * src/qemu_driver.c: Change to use lookupByUUID instead of
        lookupByUUIDString
      47e7a258
  8. 14 9月, 2009 1 次提交
    • D
      Save vcpuinfo in status file · f2ad7824
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Don't trust monitor for vcpu PID info on
        restart
      * src/domain_conf.c: Save and load vCPU PID info from domain
        status file
      f2ad7824
  9. 11 9月, 2009 1 次提交
    • M
      Add support for qcow encrypted volumes to qemu. · 07ce4d2a
      Miloslav Trmač 提交于
      Integrate with QEMU monitor to provide encryption passphrase when
      starting a guest using encrypted qcow volumes
      
      * src/qemu_driver.c (findDomainDiskEncryption,
        findVolumeQcowPassphrase,
        qemudMonitorSendVolumePassphrase, qemudMonitorSendCont): Send a volume
        passphrase if qemu asks for it.
      07ce4d2a
  10. 10 9月, 2009 5 次提交
    • M
      Consolidate "cont" into qemudMonitorSendCont() · 7ec20935
      Miloslav Trmač 提交于
      The interface allows qemudMonitorSendCont() to report errors that are
      not overridden by its callers.
      
      Also fix a potential infinite loop in qemuDomainCoreDump() if sending
      cont repeatedly fails.
      
      * src/qemu_driver.c (qemudMonitorSendCont): New function.
        (qemudAutostartConfigs): Reset error before each call to
        qemudStartVMDaemon().
        (qemudInitCpus, qemudDomainResume, qemudDomainCoreDump,
        qemudDomainRestore, qemudDomainMigratePerform,
        qemudDomainMigrateFinish2): Use qemudMonitorSendCont().
      7ec20935
    • D
      Cleanup sec driver error reporting to use virReportSystemError · 7887e003
      Daniel P. Berrange 提交于
      * src/security_selinux.c: Use virReportSystemError whereever an
        errno is involved
      * src/qemu_driver.c: Don't overwrite error message from the
        security driver
      7887e003
    • D
      Support relabelling of USB and PCI devices · 0e9ae444
      Daniel P. Berrange 提交于
      * src/security.h: Driver API for relabelling host devices
      * src/security_selinux.c: Implement relabelling of PCI and USB
        devices
      * src/qemu_driver.c: Relabel USB/PCI devices before hotplug
      0e9ae444
    • D
      Port QEMU driver to use USB/PCI device helpers · c42c1b8a
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Remove usbfs/sysfs iterator code and call
        into generic helper APIs instead when setting device permissions
      c42c1b8a
    • D
      Fix misc thread locking bugs / bogus warnings · 5c8d3d3b
      Daniel P. Berrange 提交于
      Fix all thread locking bugs reported by object-locking test
      case.
      
      NB, some of the driver locking is getting too coarse. Driver
      mutexes really need to be turned into RW locks instead to
      significantly increase concurrency.
      
      * src/lxc_driver.c: Fix useof driver when unlocked in the methods
        lxcDomainGetInfo, lxcSetSchedulerParameters, and
        lxcGetSchedulerParameters
      * src/opennebula/one_driver.c: Fix missing unlock in oneDomainUndefine.
        Fix use of driver when unlocked in oneDomainGetInfo,
        oneGetOSType, oneDomainShutdown
      * src/qemu_driver.c: Fix use of driver when unlocked in
        qemudDomainSavem, qemuGetSchedulerType, qemuSetSchedulerParameters
        and qemuGetSchedulerParameters
      * src/storage_driver.c: Re-work storagePoolCreate to avoid bogus
        lock checking warning. Re-work storageVolumeCreateXMLFrom to
        remove a potential NULL de-reference & avoid bogus lock check
        warnings
      * src/test.c: Remove testDomainAssignDef since it break lock chekc
        warnings.
      * tests/object-locking.ml: Add oneDriverLock, oneDriverUnlock
        and one_driver_t methods/types to allow lock checking on the
         OpenNebula drivers
      5c8d3d3b