1. 07 10月, 2009 4 次提交
    • M
      Don't exit() in config_error() · 0752706d
      Markus Armbruster 提交于
      Propagating errors up the call chain is tedious.  In startup code, we
      can take a shortcut: terminate the program.  This is wrong elsewhere,
      the monitor in particular.
      
      config_error() tries to cater for both customers: it terminates the
      program unless its mon parameter tells it it's working for the
      monitor.
      
      Its users need to return status anyway (unless passing a null mon
      argument, which none do), which their users need to check.  So this
      automatic exit buys us exactly nothing useful.  Only the dangerous
      delusion that we can get away without returning status.  Some of its
      users fell for that.  Their callers continue executing after failure
      when working for the monitor.
      
      This bites monitor command host_net_add in two places:
      
      * net_slirp_init() continues after slirp_hostfwd(), slirp_guestfwd(),
        or slirp_smb() failed, and may end up reporting success.  This
        happens for "host_net_add user guestfwd=foo": it complains about the
        invalid guest forwarding rule, then happily creates the user network
        without guest forwarding.
      
      * net_client_init() can't detect slirp_guestfwd() failure, and gets
        fooled by net_slirp_init() lying about success.  Suppresses its
        "Could not initialize device" message.
      
      Add the missing error reporting, make sure errors are checked, and
      drop the exit() from config_error().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0752706d
    • M
      3cd67992
    • D
      offer right-ctrl as a grab option · 0ca9f8a4
      Dustin Kirkland 提交于
      Add support for -ctrl-grab to use the right-ctrl button to grab/release
      the mouse in SDL.
      
      The multi-button ctrl-alt and ctrl-alt-shift grab buttons present an
      accessibility problem to users who cannot press more than one button
      at a time.
      
      https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/237635Signed-off-by: NDustin Kirkland <kirkland@canonical.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0ca9f8a4
    • G
      Reorganize option rom (+linux kernel) loading. · 45a50b16
      Gerd Hoffmann 提交于
      This patch adds infrastructure to maintain memory regions which must be
      restored on reset.  That includes roms (vga bios and option roms on pc),
      but is also used when loading linux kernels directly.  Features:
      
        - loading files is supported.
        - passing blobs is supported.
        - target address range is supported (for optionrom area).
        - fixed target memory address is supported (linux kernel).
      
      New in v2:
        - writes to ROM are done only at initial boot.
        - also handle aout and uimage loaders.
        - drop unused fread_targphys() function.
      
      The final memory layout is created once all memory regions are
      registered.  The option roms get addresses assigned and the
      registered regions are checked against overlaps.  Finally all data
      is copyed to the guest memory.
      
      Advantages:
      
        (1) Filling memory on initial boot and on reset takes the same
            code path, making reset more robust.
        (2) The need to keep track of the option rom load address is gone.
        (3) Due to (2) option roms can be loaded outside pc_init().  This
            allows to move the pxe rom loading into the nic drivers for
            example.
      
      Additional bonus:  There is a 'info roms' monitor command now.
      
      The patch also switches over pc.c and removes the
      option_rom_setup_reset() and load_option_rom() functions.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      45a50b16
  2. 06 10月, 2009 1 次提交
  3. 05 10月, 2009 8 次提交
  4. 03 10月, 2009 1 次提交
  5. 02 10月, 2009 2 次提交
  6. 28 9月, 2009 1 次提交
  7. 27 9月, 2009 3 次提交
  8. 26 9月, 2009 1 次提交
    • M
      Fix coding style issue · 3df04ac3
      Mark McLoughlin 提交于
      Replace:
      
        if (-1 == foo())
      
      with:
      
        if (foo() == -1)
      
      While this coding style is not in direct contravention of our currently
      ratified CODING_STYLE treaty, it could be argued that the Article 3 of
      the European Convention on Human Rights (prohibiting torture and "inhuman
      or degrading treatment") reads on the matter.
      
      [This commit message was brought to you without humour, as is evidenced
      by the absence of any emoticons]
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3df04ac3
  9. 16 9月, 2009 1 次提交
  10. 15 9月, 2009 2 次提交
  11. 12 9月, 2009 2 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
    • A
      Make get_ticks_per_sec() a static inline · 274dfed8
      Anthony Liguori 提交于
      ticks_per_sec is a constant.  There's no need to store it as a variable as it
      never changes since our time is based on units.
      
      Convert get_ticks_per_sec() to a static inline and move the constant into
      qemu-timer.h.  Remove all references to QEMU_TIMER_BASE so that we consistently
      use this interface.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      274dfed8
  12. 11 9月, 2009 8 次提交
  13. 10 9月, 2009 6 次提交