1. 05 10月, 2012 1 次提交
  2. 22 6月, 2012 2 次提交
  3. 30 5月, 2012 2 次提交
  4. 25 5月, 2012 1 次提交
  5. 15 5月, 2012 4 次提交
  6. 14 5月, 2012 1 次提交
    • J
      fix some common typos · a31f0531
      Jim Meyering 提交于
      These were identified using: http://github.com/lyda/misspell-check
      and run like this to create a bourne shell script using GNU sed's
      -i option:
      
      git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \
      -pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
      
      Manually eliding the FP, "rela->real" and resolving "addres" to
      address (not "adders") we get this:
      
        sed -i '450s!thru!through!' Changelog
        sed -i '260s!neccessary!necessary!' coroutine-sigaltstack.c
        sed -i '54s!miniscule!minuscule!' disas.c
        sed -i '1094s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '1095s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '21s!unecessary!unnecessary!' qapi-schema-guest.json
        sed -i '307s!explictly!explicitly!' qemu-ga.c
        sed -i '490s!preceeding!preceding!' qga/commands-posix.c
        sed -i '792s!addres!address!' qga/commands-posix.c
        sed -i '6s!beeing!being!' tests/tcg/test-mmap.c
      
      Also, manually fix "arithmentic", spotted by Peter Maydell:
      
        sed -i 's!arithmentic!arithmetic!' coroutine-sigaltstack.c
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      a31f0531
  7. 30 4月, 2012 2 次提交
    • M
      qemu-ga: add a whitelist for fsfreeze-safe commands · f22d85e9
      Michael Roth 提交于
      Currently we rely on fsfreeze/thaw commands disabling/enabling logging
      then having other commands check whether logging is disabled to avoid
      executing if they aren't safe for running while a filesystem is frozen.
      
      Instead, have an explicit whitelist of fsfreeze-safe commands, and
      consolidate logging and command enablement/disablement into a pair
      of helper functions: ga_set_frozen()/ga_unset_frozen()
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      f22d85e9
    • M
      qemu-ga: improve recovery options for fsfreeze · 9e8aded4
      Michael Roth 提交于
      guest-fsfreeze-thaw relies on state information obtained from
      guest-fsfreeze-freeze to determine what filesystems to unfreeze.
      This is unreliable due to the fact that that state does not account
      for FIFREEZE being issued by other processes, or previous instances
      of qemu-ga. This means in certain situations we cannot thaw
      filesystems even with a responsive qemu-ga instance at our disposal.
      
      This patch allows guest-fsfreeze-thaw to be issued unconditionally.
      It also adds some additional logic to allow us to thaw filesystems
      regardless of how many times the filesystem's "frozen" refcount has
      been incremented by any guest processes.
      
      Also, guest-fsfreeze-freeze now operates atomically: on success all
      freezable filesystems are frozen, and on error all filesystems are
      thawed. The ambiguous "GUEST_FSFREEZE_STATUS_ERROR" state is no
      longer entered.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      9e8aded4
  8. 19 4月, 2012 1 次提交
  9. 26 3月, 2012 1 次提交
  10. 13 3月, 2012 5 次提交
    • M
      qemu-ga: add guest-sync-delimited · 3cf0bed8
      Michael Roth 提交于
      guest-sync leaves it as an exercise to the user as to how to reliably
      obtain the response to guest-sync if the client had previously read in a
      partial response (due qemu-ga previously being restarted mid-"sentence"
      due to reboot, forced restart, etc).
      
      qemu-ga handles this situation on its end by having a client precede
      their guest-sync request with a 0xFF byte (invalid UTF-8), which
      qemu-ga/QEMU JSON parsers will treat as a flush event. Thus we can
      reliably flush the qemu-ga parser state in preparation for receiving
      the guest-sync request.
      
      guest-sync-delimited provides the same functionality for a client: when
      a guest-sync-delimited is issued, qemu-ga will precede it's response
      with a 0xFF byte that the client can use as an indicator to flush its
      buffer/parser state in preparation for reliably receiving the
      guest-sync-delimited response.
      
      It is also useful as an optimization for clients, since, after issuing a
      guest-sync-delimited, clients can safely discard all stale data read
      from the channel until the 0xFF is found.
      
      More information available on the wiki:
      
      http://wiki.qemu.org/Features/QAPI/GuestAgent#QEMU_Guest_Agent_ProtocolSigned-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      3cf0bed8
    • M
      qemu-ga: add guest-network-get-interfaces command · 3424fc9f
      Michal Privoznik 提交于
      This command returns an array of:
      
       [ifname, hwaddr, [ipaddr, ipaddr_family, prefix] ]
      
      for each interface in the system.
      Currently, only IPv4 and IPv6 are supported.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3424fc9f
    • L
      qemu-ga: add guest-suspend-hybrid · 95f4f404
      Luiz Capitulino 提交于
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      95f4f404
    • L
      qemu-ga: add guest-suspend-ram · fbf42210
      Luiz Capitulino 提交于
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      fbf42210
    • L
      qemu-ga: add guest-suspend-disk · 11d0f125
      Luiz Capitulino 提交于
      As the command name implies, this command suspends the guest to disk.
      
      The suspend operation is implemented by two functions: bios_supports_mode()
      and guest_suspend(). Both functions are generic enough to be used by
      other suspend modes (introduced by next commits).
      
      Both functions will try to use the scripts provided by the pm-utils
      package if it's available. If it's not available, a manual method,
      which consists of directly writing to '/sys/power/state', will be used.
      
      To reap terminated children, a new signal handler is installed in the
      parent to catch SIGCHLD signals and a non-blocking call to waitpid()
      is done to collect their exit statuses. The statuses, however, are
      discarded.
      
      The approach used to query the guest for suspend support deserves some
      explanation. It's implemented by bios_supports_mode() and shown below:
      
        qemu-ga
           |
       create pipe
           |
         fork()
           -----------------
           |               |
           |               |
           |             fork()
           |               --------------------------
           |               |                        |
           |               |                        |
           |               |               exec('pm-is-supported')
           |               |
           |              wait()
           |       write exit status to pipe
           |              exit
           |
        read pipe
      
      This might look complex, but the resulting code is quite simple.
      The purpose of that approach is to allow qemu-ga to reap its children
      (semi-)automatically from its SIGCHLD handler.
      
      Implementing this the obvious way, that's, doing the exec() call from
      the first child process, would force us to introduce a more complex way
      to reap qemu-ga's children. Like registering PIDs to be reaped and
      having a way to wait for them when returning their exit status to
      qemu-ga is necessary. The approach explained above avoids that complexity.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      11d0f125
  11. 24 2月, 2012 2 次提交
  12. 13 12月, 2011 1 次提交
  13. 21 8月, 2011 1 次提交
  14. 24 7月, 2011 1 次提交
  15. 23 7月, 2011 2 次提交
  16. 22 7月, 2011 1 次提交
    • M
      guest agent: add guest agent RPCs/commands · e3d4d252
      Michael Roth 提交于
      This adds the initial set of QMP/QAPI commands provided by the guest
      agent:
      
      guest-sync
      guest-ping
      guest-info
      guest-shutdown
      guest-file-open
      guest-file-read
      guest-file-write
      guest-file-seek
      guest-file-flush
      guest-file-close
      guest-fsfreeze-freeze
      guest-fsfreeze-thaw
      guest-fsfreeze-status
      
      The input/output specification for these commands are documented in the
      schema.
      
      Example usage:
      
        host:
          qemu -device virtio-serial \
               -chardev socket,path=/tmp/vs0.sock,server,nowait,id=qga0 \
               -device virtserialport,chardev=qga0,name=org.qemu.quest_agent.0
               ...
      
          echo "{'execute':'guest-info'}" | socat stdio unix-connect:/tmp/qga0.sock
      
        guest:
          qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \
                  -p /var/run/qemu-guest-agent.pid -d
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@gmail.com>
      e3d4d252