1. 22 12月, 2009 6 次提交
    • J
      Only probe for CPU models if required · 8153c72b
      Jiri Denemark 提交于
      * src/qemu/qemu_conf.c: CPU models should be probed only if the
        a guest's XML contains CPU model, not each time a qemu command line
        is generated.
      8153c72b
    • D
      Add some people missing from the AUTHORS list · 5dbb208a
      Daniel Veillard 提交于
      5dbb208a
    • J
      Add cpu_map.xml to libvirt.spec · ab007c3d
      Jiri Denemark 提交于
      * libvirt.spec.in: embbed it in the main libvirt binary rpm
      ab007c3d
    • J
      Install cpu_map.xml · bfeeb9a6
      Jiri Denemark 提交于
      * src/Makefile.am: install it in $(pkgdatadir) i.e. /usr/share/libvirt/
        usually
      bfeeb9a6
    • C
      Make Xen VT-d PCI attach/detach work · e9f468d3
      Chris Lalancette 提交于
      The Xen code for making HVM VT-d PCI passthrough attach and detach
      wasn't working properly:
      
      1)  In xenDaemonAttachDevice(), we were always trying to reconfigure
      a PCI passthrough device, even the first time we added it.  This was
      because the code in virDomainXMLDevID() was not checking xenstore for
      the existence of the device, and always returning 0 (meaning that
      the device already existed).
      
      2)  In xenDaemonDetachDevice(), we were trying to use "device_destroy"
      to detach a PCI device.  While you would think that is the right
      method to call, it's actually wrong for PCI devices.  In particular,
      in upstream Xen (and soon in RHEL-5 Xen), device_configure is actually
      used to destroy a PCI device.
      
      To fix the attach
      problem I add a lookup into xenstore to see if the device we are
      trying to attach already exists.  To fix the detach problem I change
      it so that for PCI detach (only), we use device_configure with the
      appropriate sxpr to do the detachment.
      
      * src/xen/xend_internal.c: don't use device_destroy for PCI devices
        and fix the other issues.
      * src/xen/xs_internal.c src/xen/xs_internal.h: add
        xenStoreDomainGetPCIID()
      e9f468d3
    • D
      Fix detection of JSON when restarting libvirtd · c90e545f
      Daniel P. Berrange 提交于
      The XML XPath for detecting JSON in the running VM statefile was
      wrong causing all VMs to get JSON mode enabled at libvirtd restart.
      
      In addition if a VM was running a JSON enabled QEMU once, and then
      altered to point to a non-JSON enabled QEMU later the 'monJSON'
      flag would not get reset to 0.
      
      * src/qemu/qemu_driver.c: Fix setting/detection of JSON mode
      c90e545f
  2. 21 12月, 2009 4 次提交
    • A
      Document the dommemstat command in the virsh man page · cc3618d7
      Adam Litke 提交于
      * tools/virsh.pod: Provide a basic mention of the dommemstat command in
        the virsh man page.
      cc3618d7
    • D
      Change virsh dommemstats command to dommemstat · a858474f
      Daniel Veillard 提交于
      As Paul Jenner pointed out all other statistics commands use the
      singular form
      
      * tools/virsh.c: rename dommemstats to dommemstat as well as function
        name and associated structures
      a858474f
    • D
      Fix reporting of TLS connection errors · 469b6b3a
      Daniel P. Berrange 提交于
      The code for connecting to a server tries each socket in turn
      until it finds one that connects. Unfortunately for TLS sockets
      if it connected, but failed TLS handshake it would treat that
      as a failure to connect, and try the next socket. This is bad,
      it should have reported the TLS failure immediately.
      
      $ virsh -c qemu://somehost.com/system
      error: unable to connect to libvirtd at 'somehost.com': Invalid argument
      error: failed to connect to the hypervisor
      
      $ ./tools/virsh -c qemu://somehost.com/system
      error: server certificate failed validation: The certificate hasn't got a known issuer.
      error: failed to connect to the hypervisor
      
       * src/remote/remote_driver.c: Stop trying to connect if the
         TLS handshake fails
      469b6b3a
    • D
      Fix typo in qemudDomainAttachHostPciDevice() · 9b2c299a
      Daniel Veillard 提交于
      * src/qemu/qemu_driver.c: The 'if' statement is supposed to check return
        value of pci = pciGetDevice(conn, ...); , but check uses if (!dev),
        fix it
      9b2c299a
  3. 20 12月, 2009 6 次提交
    • A
      python: Add python bindings for virDomainMemoryStats · 2c345831
      Adam Litke 提交于
      Enable virDomainMemoryStats in the python API.  dom.memoryStats() will return a
      dictionary containing the supported statistics.  A dictionary is required
      because the meaining of each quantity cannot be inferred from its index in a
      list.
      
      * python/generator.py: reenable bindings for this entry point
      * python/libvirt-override-api.xml python/libvirt-override.c: the
        generator can't handle this new function, add the new binding,
        and the XML description
      2c345831
    • A
      Add a new command dommemstats for virDomainMemoryStats · b6798b68
      Adam Litke 提交于
      Define a new command 'dommemstats' to report domain memory statistics.  The
      output format is inspired by 'domblkstat' and 'domifstat' and consists of
      tag/value pairs, one per line.  The command can complete successfully and
      print no output if virDomainMemoryStats is supported by the driver, but not
      the guest operating system.
      
      Sample output:
      swap_in 0
      swap_out 0
      major_fault 54
      minor_fault 58259
      unused 487680
      available 502472
      
      All stats referring to a quantity of memory (eg. all above except major and
      minor faults) represent the quantity in KBytes.
      
      * tools/virsh.c: implements the new command
      b6798b68
    • A
      Add domainMemoryStats support to remote driver · 841d5035
      Adam Litke 提交于
      Use a dynamically sized xdr_array to pass memory stats on the wire.  This
      supports the addition of future memory stats and reduces the message size
      since only supported statistics are returned.
      
      * src/remote/remote_protocol.x: provide defines for the new entry point
      * src/remote/remote_driver.c daemon/remote.c: implement the client and
        server side
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: generated
        stubs
      841d5035
    • A
      Implements domainMemStats in the qemu driver · c7523b41
      Adam Litke 提交于
      Support for memory statistics reporting is accepted for qemu inclusion.
      Statistics are reported via the monitor command 'info balloon' as a comma
      seprated list:
      
      (qemu) info balloon
      balloon: actual=1024,mem_swapped_in=0,mem_swapped_out=0,major_page_faults=88,minor_page_faults=105535,free_mem=1017065472,total_mem=1045229568
      
      Libvirt, qemu, and the guest operating system may support a subset of the
      statistics defined by the virtio spec.  Thus, only statistics recognized by
      components will be reported.
      
      * src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.[ch]: implement the
        new entry point by using info balloon monitor command
      c7523b41
    • A
      domMemoryStats: Add public symbol to libvirt API · 4fe975fe
      Adam Litke 提交于
      * src/libvirt.c: implement the main entry point
      * src/libvirt_public.syms: add it to the exported symbols
      4fe975fe
    • A
      Add new API virDomainMemoryStats to header and drivers · 3a701313
      Adam Litke 提交于
      Set up the types for the domainMemoryStats function and insert it into the
      virDriver structure definition.  Because of static initializers, update
      every driver and set the new field to NULL.
      
      * include/libvirt/libvirt.h.in: new API
      * src/driver.h src/*/*_driver.c src/vbox/vbox_tmpl.c: add the new
        entry to the driver structure
      * python/generator.py: fix compiler errors, the actual python binding is
        implemented later
      3a701313
  4. 19 12月, 2009 16 次提交
  5. 18 12月, 2009 8 次提交
    • J
      Implement virsh command 'cpu-compare' · 3b734b78
      Jiri Denemark 提交于
      * tools/virsh.c: provide a way to us teh new API with virsh
      3b734b78
    • J
      Implement CPU selection in QEMU driver · ffb13b11
      Jiri Denemark 提交于
      * src/qemu/qemu_conf.c src/qemu/qemu_conf.h src/qemu/qemu_driver.c:
        add the new entry point, extend capabilities and code to interract
        with qemu
      ffb13b11
    • J
      Adds CPU map for models and features · d5ef0a69
      Jiri Denemark 提交于
      * src/cpu/cpu_map.xml: newdescription file
      * src/Makefile.am: include it in dist
      d5ef0a69
    • J
      Adds CPU selection infrastructure · 7286882c
      Jiri Denemark 提交于
      Each driver supporting CPU selection must fill in host CPU capabilities.
      When filling them, drivers for hypervisors running on the same node as
      libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
      such as VMware, need to implement their own way of getting such data.
      Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
      
      When implementing virConnectCompareCPU(), a hypervisor driver can just
      call cpuCompareXML() function with host CPU capabilities.
      
      For each guest for which a driver supports selecting CPU models, it must
      set the appropriate feature in guest's capabilities:
      
          virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
      
      Actions needed when a domain is being created depend on whether the
      hypervisor understands raw CPU data (currently CPUID for i686, x86_64
      architectures) or symbolic names has to be used.
      
      Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
      
      - convert guest CPU configuration from domain's XML into a set of raw
        data structures each representing one of the feature policies:
      
          cpuEncode(conn, architecture, guest_cpu_config,
                    &forced_data, &required_data, &optional_data,
                    &disabled_data, &forbidden_data)
      
      - create a mask or whatever the hypervisor expects to see and pass it
        to the hypervisor
      
      Typical use by hypervisors with symbolic model names (such as QEMU):
      
      - get raw CPU data for a computed guest CPU:
      
          cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
      
      - decode raw data into virCPUDefPtr with a possible restriction on
        allowed model names:
      
          cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
      
      - pass guest->model and guest->features to the hypervisor
      
      * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
        src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
        src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
      * configure.in: check for CPUID instruction
      * src/Makefile.am: glue the new files in
      * src/libvirt_private.syms: add new private symbols
      * po/POTFILES.in: add new cpu files containing translatable strings
      7286882c
    • J
      Remote driver CPU flags support · e1042693
      Jiri Denemark 提交于
      * src/remote/remote_driver.c: add the new entry point
      e1042693
    • J
      CPU flags wire protocol format and server side · 3a2881fa
      Jiri Denemark 提交于
      * src/remote/remote_protocol.x: update with new entry point
      * daemon/remote.c: add the new server dispatcher
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: regenerated
      3a2881fa
    • J
      Public API implementation · 0b7d2ae6
      Jiri Denemark 提交于
      * src/libvirt.c: adds the public entry point virConnectCompareCPU()
      0b7d2ae6
    • J
      Adds the internal driver API · 16e4084a
      Jiri Denemark 提交于
      * src/driver.h: add an extra entry point in the structure
      * src/esx/esx_driver.c src/lxc/lxc_driver.c src/opennebula/one_driver.c
        src/openvz/openvz_driver.c src/phyp/phyp_driver.c src/qemu/qemu_driver.c
        src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c
        src/vbox/vbox_tmpl.c src/xen/xen_driver.c: add NULL entry points for
        all drivers
      16e4084a