1. 01 4月, 2010 18 次提交
    • D
      Keep build quiet for generated file · f983c326
      Daniel P. Berrange 提交于
      Adds $(AM_V_GEN) to many more manual makefile.am rules that
      were generating files
      f983c326
    • D
      Keep track of guest paused state after disk IO / watchdog events · cd2404a3
      Daniel P. Berrange 提交于
      When a watchdog/IO error occurs, one of the possible actions that
      QEMU might take is to pause the guest. In this scenario libvirt
      needs to update its internal state for the VM, and emit a
      lifecycle event:
      
        VIR_DOMAIN_EVENT_SUSPENDED
      
      with a detail being one of:
      
        VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
        VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG
      
      To future proof against possible QEMU support for multiple monitor
      consoles, this patch also hooks into the 'STOPPED' event in QEMU
      and emits a generic VIR_DOMAIN_EVENT_SUSPENDED_PAUSED event
      
      * include/libvirt/libvirt.h.in: Add VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
      * src/qemu/qemu_driver.c: Update VM state to paused when IO error
        or watchdog events occurrs
      * src/qemu/qemu_monitor_json.c: Fix typo in disk IO event name
      cd2404a3
    • M
      Replace sscanf in PCI device address parsing · d13eb9fc
      Matthias Bolte 提交于
      This also fixes a problem with MinGW's GCC on Windows. GCC complains
      about the L modifier being unknown.
      
      Parsing in pciIterDevices is stricter now and doesn't accept trailing
      characters after the actual <domain>:<bus>:<slot>.<function> sequence
      anymore.
      
      Parsing in pciWaitForDeviceCleanup is also stricter now and expects
      the <start>-<end> : <domain>:<bus>:<slot>.<function> sequence to be
      terminated by \n.
      
      Change domain from unsigned long long to unsigned int in
      pciWaitForDeviceCleanup, because everywhere else domain is handled as
      unsigned int too.
      d13eb9fc
    • M
      xen: Use virStrToLong_i instead of sscanf for XenD port parsing · 57dab748
      Matthias Bolte 提交于
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value anymore.
      57dab748
    • M
      xenapi: Use virStrToLong_i instead of sscanf for CPU map parsing · 82cb2e73
      Matthias Bolte 提交于
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value anymore.
      82cb2e73
    • M
      openvz: Use strtok_r instead of sscanf for VPS UUID parsing · 1778da71
      Matthias Bolte 提交于
      Also free 2k stack space.
      1778da71
    • M
      xen: Use virParseMacAddr instead of sscanf · 00e00510
      Matthias Bolte 提交于
      This also fixes a bug in xenXMDomainConfigParse where uninitialized
      memory would be used as MAC address if sscanf fails.
      00e00510
    • M
      vbox: Replace atoi with virStrToLong_i · 2f047d48
      Matthias Bolte 提交于
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value or non-number strings anymore. atoi just
      returns 0 in case it cannot parse a number from the given string.
      Now an error is reported for such a string.
      2f047d48
    • M
      cgroup: Replace sscanf with virStrToLong_ll · 73b45bfb
      Matthias Bolte 提交于
      The switch from %lli to %lld in virCgroupGetValueI64 is intended,
      as virCgroupGetValueU64 uses base 10 too, and virCgroupSetValueI64
      uses %lld to format the number to string.
      
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value anymore.
      73b45bfb
    • M
      Refactor major.minor.micro version parsing into a function · 56bac4a2
      Matthias Bolte 提交于
      virParseVersionString uses virStrToLong_ui instead of sscanf.
      
      This also fixes a bug in the UML driver, that always returned 0
      as version number.
      
      Introduce STRSKIP to check if a string has a certain prefix and
      to skip this prefix.
      56bac4a2
    • M
      Replace sscanf in nwfilter rule parsing · ea54570e
      Matthias Bolte 提交于
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value anymore.
      ea54570e
    • M
      Replace sscanf in legacy device address parsing · 2072d63c
      Matthias Bolte 提交于
      Parsing is stricter now and doesn't accept trailing characters
      after the actual <domain>:<bus>:<slot> sequence anymore.
      2072d63c
    • S
      While writing a couple of test cases for the nwfilter's XML parser I · e8132007
      Stefan Berger 提交于
      found some cases where the output ended up not looking as expected. So
      the following changes are in the patch below:
      
      - if the protocol ID in the MAC header is an integer, just write it into
      the datastructure without trying to find a corresponding string for it
      and if none is found failing
      - when writing the protocol ID as string, simply write it as integer if
      no corresponding string can be found
      - same changes for arpOpcode parsing and printing
      - same changes for protocol ID in an IP packet
      - DSCP value needs to be written into the data structure
      - IP protocol version number is redundant at this level, so remove it
      - parse the protocol ID found inside an IP packet not only as string but
      also as uint8
      - arrange the display of the src and destination masks to be shown after
      the src and destination ip address respectively in the XML
      - the existing libvirt IP address parser accepts for example '25' as an
      IP address. I want this to be parsed as a CIDR type netmask. So try to
      parse it as an integer first (CIDR netmask) and if that doesn't work as
      a dotted IP address style netmask.
      - instantiation of rules with MAC masks didn't work because they weren't
      printed into a buffer, yet.
      e8132007
    • S
      ESX test case needs '/' in interface name · 6cbc3306
      Stefan Berger 提交于
      To fix an ESX test case, valid interface names need '/' as valid letter.
      Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
      6cbc3306
    • M
      Fix linker errors in proxy · a77821c8
      Matthias Bolte 提交于
      domain_conf.c:494: undefined reference to 'virNWFilterHashTableFree'
      domain_conf.c:5107: undefined reference to 'virNWFilterFormatParamAttributes'
      
      Add missing source to the proxy and disable XML parsing code in
      nwfilter_params.c for a proxy build.
      a77821c8
    • E
      build: more fallout from test -a · a792bf24
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_test_minus_ao): Also check for [.
      * docs/Makefile.am (%.html, html/index.html): Avoid non-portable
      test usage.
      * libvirt.spec.in (%post): Likewise.
      * tools/virt-pki-validate.in (servercert.pem): Likewise.
      * configure.ac (LOGNAME): Use test, not [, in files processed by
      autoconf.
      Detected by Matthias Bolte.
      a792bf24
    • M
      Fix apibuild.py warning about virNWFilterLookupByUUIDString · eff24046
      Matthias Bolte 提交于
      The function name was written with capital I in the Filter part.
      eff24046
    • M
      website: Add archive link for libvirt-users list · 6fc93f1e
      Matthias Bolte 提交于
      6fc93f1e
  2. 31 3月, 2010 14 次提交
  3. 30 3月, 2010 8 次提交
    • S
      A cosmetic change that makes the entries in the int-2-string maps look · 062b0aa3
      Stefan Berger 提交于
      more readable. Add some missing entries: ipv6 and icmpv6.
      062b0aa3
    • S
      Use libvirt's existing ipv6/ipv4 parser/printer rather than self-written ones · 0e0f6021
      Stefan Berger 提交于
      This patch changes the network filtering code to use libvirt's existing
      IPv4 and IPv6 address parsers/printers rather than my self-written ones.
      
      I am introducing a new function in network.c that counts the number of
      bits in a netmask and ensures that the given address is indeed a netmask,
      return -1 on error or values of 0-32 for IPv4 addresses and 0-128 for
      IPv6 addresses. I then based the function checking for valid netmask
      on invoking this function.
      0e0f6021
    • S
      Add ip6tables support for IPv6 filtering · bc210210
      Stefan Berger 提交于
      This patch adds IPv6 filtering support for the following protocols:
      - tcp-ipv6
      - udp-ipv6
      - udplite-ipv6
      - esp-ipv6
      - ah-ipv6
      - sctp-ipv6
      - all-ipv6
      - icmpv6
      
      Many of the IPv4 data structure could be re-used for IPv6 support.
      Since ip6tables also supports pretty much the same command line parameters
      as iptables does, also much of the code could be re-used and now
      command lines are invoked with the ip(6)tables tool parameter passed
      through the functions as a parameter.
      bc210210
    • S
      Remove driver dependency from nwfilter_conf.c · 0af0ded0
      Stefan Berger 提交于
      This patch removes the driver dependency from nwfilter_conf.c and moves
      a callback function calling into the driver into
      nwfilter_gentech_driver.c and passes a pointer to that callback function
      upon initialization of nwfilter_conf.c.
      0af0ded0
    • S
      Add support for so-far missing protocols for iptables filtering · 285d3893
      Stefan Berger 提交于
      This patch adds filtering support for the so-far missing protocols 'ah',
      'esp' and 'udplite'.
      285d3893
    • D
      Fix daemon hook script initialization · 0ec5cd07
      Daniel Veillard 提交于
      * daemon/libvirtd.c: we should error out only if virHookInitialize()
        return value is negative
      0ec5cd07
    • L
      Implement the qemu-kvm backend of clock timer elements · 8bf6799b
      Laine Stump 提交于
      Since the timers are defined to cover all possible config cases for
      several different hypervisors, many of these possibilities generate an
      error on qemu. Here is what is currently supported:
      
      RTC: If the -rtc commandline option is available, allow setting
      "clock=host"
           or "clock=vm" based on the rtc timer clock='host|guest' value. Also
           add "driftfix=slew" if the tickpolicy is 'catchup', or add nothing
      if
           tickpolicy is 'delay'. (Other tickpolicies will raise an error).
      
           If -rtc isn't available, but -rtc-td-hack is, add that option
           if the tickpolicy is 'catchup', add -rtc-td-hack, if it is 'delay'
           add nothing, and if it's anything else, raise an error.
      
      PIT: If -no-kvm-pit-reinjection is available, and tickpolicy is
           'delay', add that option. if tickpolicy is 'catchup', do
           nothing. Anything else --> raise an error.
      
           If -no-kvm-pit-reinjection *isn't* available, but -tdf is, when
           tickpolicy is 'catchup' add -tdf. If it's 'delay', do
           nothing. Anything else --> raise an error.
      
           If neither of those commandline options is available, and
           tickpolicy is anything other than 'delay' (or unspecified), raise
           an error.
      
      HPET: If -no-hpet flag is available and present='no', add -no-hpet.
            If -no-hpet is not available, and present='yes', raise an error.
            If present is unspecified, the default is to do whatever this
            particular qemu does by default, so don't raise an error.
      
      All other timer types are unsupported by QEMU, so they will raise an
      error.
      
      * src/qemu/qemu_conf.c: extend qemuBuildClockArgStr() to generate the
        command line arguments for the new options
      8bf6799b
    • L
      Add flags to indicate presence of timekeeping-related qemu options · 0fdf6496
      Laine Stump 提交于
      * src/qemu/qemu_conf.h: define 4 new flags
      * src/qemu/qemu_conf.c: check the help text of qemu for presence of
                              features indicated by each flag.
      * tests/qemuhelptest.c: add appropriate flags into the masks for each test
      0fdf6496