1. 17 7月, 2012 1 次提交
    • M
      block: Geometry and translation hints are now useless, purge them · 2b584959
      Markus Armbruster 提交于
      There are two producers of these hints: drive_init() on behalf of
      -drive, and hd_geometry_guess().
      
      The only consumer of the hint is hd_geometry_guess().
      
      The callers of hd_geometry_guess() call it only when drive_init()
      didn't set the hints.  Therefore, drive_init()'s hints are never used.
      
      Thus, hd_geometry_guess() only ever sees hints it produced itself in a
      prior call.  Only the first call computes something, subsequent calls
      just repeat the first call's results.  However, hd_geometry_guess() is
      never called more than once: the device models don't, and the block
      device is destroyed on unplug.  Thus, dropping the repeat feature
      doesn't break anything now.
      
      If a block device wasn't destroyed on unplug and could be reused with
      a new device, then repeating old results would be wrong.  Thus,
      dropping the repeat feature prevents future breakage.
      
      This renders the hints unused.  Purge them from the block layer.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2b584959
  2. 13 7月, 2012 1 次提交
  3. 11 7月, 2012 1 次提交
    • P
      qemu_find_file: check name as a straight path even if it has no '/' · 31783203
      Peter Maydell 提交于
      Make qemu_find_file() check for the passed in name as a straight
      pathname even if it doesn't have any path separator character in it.
      This means that "-bios foo", "-dtb foo" etc will find a file 'foo'
      in the current directory.
      This removes an inconsistency with -kernel and -initrd, which both
      accept plain filenames as meaning files in the current directory.
      It's also less confusing for the user than an undocumented restriction
      that "this option accepts a filename, except for the special case
      where the filename you pass happens not to have a '/' in it, in
      which case we'll ignore it."
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      31783203
  4. 20 6月, 2012 1 次提交
  5. 09 6月, 2012 1 次提交
    • M
      do not include <libutil.h> needlessly or if it doesn't exist · 3294ce18
      Michael Tokarev 提交于
      <libutil.h> and <util.h> on *BSD (some have one, some another)
      were #included just for openpty() declaration.  The only file
      where this function is actually used is qemu-char.c.
      
      In vl.c and net/tap-bsd.c, none of functions declared in libutil.h
      (login logout logwtmp timdomain openpty forkpty uu_lock realhostname
      fparseln and a few others depending on version) are used.
      
      Initially the code which is currently in qemu-char.c was in vl.c,
      it has been removed into separate file in commit 0e82f34d
      Fri Oct 31 18:44:40 2008, but the #includes were left in vl.c.
      So with vl.c, we just remove includes - libutil.h, util.h and
      pty.h (which declares only openpty() and forkpty()) from there.
      
      The code in net/tap-bsd.c, which come from net/tap.c, had this
      
      commit 5281d757
      Author: Mark McLoughlin <markmc@redhat.com>
      Date:   Thu Oct 22 17:49:07 2009 +0100
      
          net: split all the tap code out into net/tap.c
      
      Note this commit not only moved stuff out of net.c to net/tap.c,
      but also rewrote large portions of the tap code, and added these
      completely unnecessary #includes -- as usual, I question why such
      a misleading commit messages are allowed.
      
      Again, no functions defined in libutil.h or util.h on *BSD are
      used by neither net/tap.c nor net/tap-bsd.c.  Removing them.
      
      And finally, the only real user for these #includes, qemu-char.c,
      which actually uses openpty().  There, the #ifdef logic is wrong.
      A GLIBC-based system has <pty.h>, even if it is a variant of *BSD.
      So __GLIBC__ should be checked first, and instead of trying to
      include <libutil.h> or <util.h>, we include <pty.h>.  If it is not
      GLIBC-based, we check for variations between <*util.h> as before.
      
      This patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one
      of the two problems): it is a distribution with a FreeBSD kernel,
      so it #defines at least __FreeBSD_kernel__, but since it is based
      on GLIBC, it has <pty.h>, but current version does not have neither
      <util.h> nor <libutil.h>, which the code tries to include 3 times
      but uses only once.
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3294ce18
  6. 05 6月, 2012 1 次提交
    • L
      qemu-option: qemu_opts_create(): use error_set() · 8be7e7e4
      Luiz Capitulino 提交于
      This commit converts qemu_opts_create() from qerror_report() to
      error_set().
      
      Currently, most calls to qemu_opts_create() can't fail, so most
      callers don't need any changes.
      
      The two cases where code checks for qemu_opts_create() erros are:
      
       1. Initialization code in vl.c. All of them print their own
          error messages directly to stderr, no need to pass the Error
          object
      
       2. The functions opts_parse(), qemu_opts_from_qdict() and
          qemu_chr_parse_compat() make use of the error information and
          they can be called from HMP or QMP. In this case, to allow for
          incremental conversion, we propagate the error up using
          qerror_report_err(), which keeps the QError semantics
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-By: NLaszlo Ersek <lersek@redhat.com>
      8be7e7e4
  7. 12 5月, 2012 1 次提交
    • P
      vga: disable default VGA if appropriate -device is used · 7f1b17f2
      Paolo Bonzini 提交于
      This is a partial revert of commits a369da5f (vga: improve VGA logic,
      committed 2012-01-22) and c5bd4f3d (vga: fix -nodefaults -device VGA,
      2012-01-24) which broke command-line option parsing in different ways.
      
      Since commit a369da5f it has become impossible to specify a VGA device
      entirely with QemuOpts-enabled options, i.e. without needing an explicit
      "-vga none".
      
      In addition, until commit c5bd4f3d -nodefaults would not disable the device
      you specified with the legacy "-vga" option, independent of the order.
      Since commit c5bd4f3d QEMU -nodefaults will override a previous -vga
      option.
      
      I did not reintroduce machine->no_vga.  Boards can simply ignore the
      vga_interface_type variable, and most will indeed do so.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      7f1b17f2
  8. 11 5月, 2012 4 次提交
  9. 09 5月, 2012 2 次提交
  10. 30 3月, 2012 2 次提交
    • A
      qtest: add test framework · c7f0f3b1
      Anthony Liguori 提交于
      The idea behind qtest is pretty simple.  Instead of executing a CPU via TCG or
      KVM, rely on an external process to send events to the device model that the CPU
      would normally generate.
      
      qtest presents itself as an accelerator.  In addition, a new option is added to
      establish a qtest server (-qtest) that takes a character device.  This is what
      allows the external process to send CPU events to the device model.
      
      qtest uses a simple line based protocol to send the events.  Documentation of
      that protocol is in qtest.c.
      
      I considered reusing the monitor for this job.  Adding interrupts would be a bit
      difficult.  In addition, logging would also be difficult.
      
      qtest has extensive logging support.  All protocol commands are logged with
      time stamps using a new command line option (-qtest-log).  Logging is important
      since ultimately, this is a feature for debugging.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c7f0f3b1
    • P
      rtc: add -rtc clock=rt · 78808141
      Paolo Bonzini 提交于
      This will let people use backwards-compatible semantics for devices that
      will be affected by the following patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      78808141
  11. 26 3月, 2012 1 次提交
  12. 20 3月, 2012 1 次提交
  13. 19 3月, 2012 1 次提交
    • A
      spice: fix broken initialization · ad1be899
      Alon Levy 提交于
      Commit 1b71f7c1 moved MODULE_INIT_QOM to
      way before MODULE_INIT_MACHINE, thereby breaking assumptions made in
      spice-core.c which registered both a type initializer and a machine
      intializer.
      
      This fix removes the type registration, and replaces it with calling
      qemu_spice_init in vl.c after command line parsing (second pass) is
      done, and after timers are armed, required by spice server.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ad1be899
  14. 14 3月, 2012 1 次提交
  15. 13 3月, 2012 1 次提交
  16. 02 3月, 2012 1 次提交
  17. 27 2月, 2012 1 次提交
  18. 25 2月, 2012 3 次提交
    • P
      vl.c: Avoid segfault when started with no arguments · 967c0da7
      Peter Maydell 提交于
      Fix a bug (introduced in commit a0abe474) where a command line which
      specified no machine arguments (either explicitly or implicitly via
      -kernel &co) would result in a segfault because of a NULL pointer
      returned from qemu_opts_find(qemu_find_opts("machine"), 0).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      967c0da7
    • G
      suspend: add qmp events · 53370b78
      Gerd Hoffmann 提交于
      Send qmp events on suspend and wakeup so libvirt
      has a chance to track the vm state.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      53370b78
    • G
      suspend: add infrastructure · 95b363b5
      Gerd Hoffmann 提交于
      This patch adds some infrastructure to handle suspend and resume to
      qemu.  First there are two functions to switch state and second there
      is a suspend notifier:
      
       * qemu_system_suspend_request is supposed to be called when the
         guest asks for being be suspended, for example via ACPI.
      
       * qemu_system_wakeup_request is supposed to be called on events
         which should wake up the guest.
      
       * qemu_register_suspend_notifier can be used to register a notifier
         which will be called when the guest is suspended.  Machine types
         and device models can hook in there to modify state if needed.
      
       * qemu_register_wakeup_notifier can be used to register a notifier
         which will be called when the guest is woken up.  Machine types
         and device models can hook in there to modify state if needed.
      
       * qemu_system_wakeup_enable can be used to enable/disable wakeup
         events.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      95b363b5
  19. 24 2月, 2012 2 次提交
  20. 23 2月, 2012 1 次提交
  21. 22 2月, 2012 2 次提交
  22. 17 2月, 2012 2 次提交
  23. 15 2月, 2012 1 次提交
  24. 10 2月, 2012 1 次提交
  25. 09 2月, 2012 1 次提交
    • R
      iSCSI: add configuration variables for iSCSI · f9dadc98
      Ronnie Sahlberg 提交于
      This patch adds configuration variables for iSCSI to set
      initiator-name to use when logging in to the target,
      which type of header-digest to negotiate with the target
      and username and password for CHAP authentication.
      
      This allows specifying a initiator-name either from the command line
      -iscsi initiator-name=iqn.2004-01.com.example:test
      or from a configuration file included with -readconfig
          [iscsi]
            initiator-name = iqn.2004-01.com.example:test
            header-digest = CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
            user = CHAP username
            password = CHAP password
      
      If you use several different targets, you can also configure this on a per
      target basis by using a group name:
          [iscsi "iqn.target.name"]
          ...
      
      The configuration file can be read using -readconfig.
      Example :
      qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1
       -readconfig iscsi.conf
      Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f9dadc98
  26. 07 2月, 2012 1 次提交
  27. 02 2月, 2012 3 次提交
  28. 26 1月, 2012 1 次提交