1. 18 2月, 2014 1 次提交
  2. 26 11月, 2013 1 次提交
  3. 10 9月, 2013 1 次提交
  4. 02 4月, 2013 2 次提交
  5. 12 3月, 2013 3 次提交
  6. 19 12月, 2012 1 次提交
  7. 05 10月, 2012 1 次提交
  8. 22 6月, 2012 1 次提交
    • P
      qemu-ga: add guest-fstrim command · eab5fd59
      Paolo Bonzini 提交于
      FITRIM is a mounted filesystem feature to discard (or "trim") blocks which
      are not in use by the filesystem. This is useful for solid-state drives
      (SSDs) and thinly-provisioned storage.  Provide access to the feature
      from the host so that filesystems can be trimmed periodically or before
      migration.
      
      Here is an example using scsi_debug:
      
          # modprobe scsi_debug lbpu=1 lbpws=1
          # sg_vpd -p0xb2 /dev/sdb
          Logical block provisioning VPD page (SBC):
            Unmap command supported (LBPU): 1
            Write same (16) with unmap bit supported (LBWS): 1
            Write same (10) with unmap bit supported (LBWS10): 0
          # mke2fs /dev/sdb
          # cat /sys/bus/pseudo/drivers/scsi_debug/map
          1-616,16257-16383
          # mount /dev/sdb /run/media/pbonzini/test
          # dd if=/dev/zero of=/run/media/pbonzini/test/file
          # cat map
          1-616,645-1588,1599-4026,4029-16383
          # rm /run/media/pbonzini/test/file
          # ./qemu-ga /dev/fd/0
          {"execute":"guest-fstrim"}
          {"return": {}}
          # cat map
          1-612
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      eab5fd59
  9. 13 3月, 2012 6 次提交
    • 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
    • M
      qemu-ga: add win32 guest-suspend-ram command · f54603b6
      Michael Roth 提交于
      S3 sleep implementation for windows.
      f54603b6
    • G
      qemu-ga: add win32 guest-suspend-disk command. · aa59637e
      Gal Hammer 提交于
      Implement guest-suspend-disk RPC for Windows. Functionally this should be
      equivalent to the posix implementation.
      Signed-off-by: NGal Hammer <ghammer@redhat.com>
      aa59637e
    • 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
  10. 24 2月, 2012 2 次提交
    • M
      qemu-ga: add win32 guest-shutdown command · 546b60d0
      Michael Roth 提交于
      Implement guest-shutdown RPC for Windows. Functionally this should be
      equivalent to the posix implementation.
      
      Original patch by Gal Hammer <ghammer@redhat.com>
      546b60d0
    • M
      qemu-ga: fixes for win32 build of qemu-ga · d8ca685a
      Michael Roth 提交于
      Various stubs and #ifdefs to compile for Windows using mingw
      cross-build. Still has 1 linker error due to a dependency on the
      forthcoming win32 versions of the GAChannel/transport class.
      d8ca685a