• As host network devices can also be instantiated via the monitor, errors
    should then be reported to the related monitor instead of stderr. This
    requires larger refactoring, so this patch starts small with introducing
    a helper to catch both cases and convert net_client_init as well as
    net_slirp_redir.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse Code »
  • OK, last try: 8e4416af broke -net socket, ffad4116 tried to fix it
    but broke error reporting of invalid parameters. So this patch widely
    reverts ffad4116 again and intead fixes those callers of check_params
    that originally suffered from overwritten buffers by using separate
    ones.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse Code »
  • This reverts commit 8cf07dcb.
    
    This is a sorry saga.
    
    This commit:
    
      8e4416af net: Add parameter checks for VLAN clients
    
    broken '-net socket' and this commit:
    
      ffad4116 net: Fix -net socket parameter checks
    
    fixed the problem but introduced another problem which
    this commit:
    
      8cf07dcb Fix output of uninitialized strings
    
    fixed that final problem, but causing us to lose some
    error reporting information in the process.
    
    Meanwhile Jan posted a patch to mostly re-do ffad4116
    in a way that fixes the original issue, but without
    losing the error reporting information. So, let's revert
    8cf07dcb and apply Jan's patch.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Mark McLoughlin authored
     
    Browse File »
  • Slirp uses fork_exec for spawning service processes, and QEMU uses this
    for running smbd. As SIGCHLD is not handled, these processes become
    zombies on termination. Fix this by installing a proper signal handler,
    but also make sure we disable the signal while waiting on forked network
    setup/shutdown scripts.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse File »



  • Using the new host_net_redir command you can easily create redirections
    on the fly while your VM is running.
    
    While that's great, it's missing the removal of redirections, in case you
    want to have a port closed again at a later point in time.
    
    This patch adds support for removal of redirections.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • Now that we have a separate aio pool structure we can remove those
    aio pool details from BlockDriver.
    
    Every driver supporting AIO now needs to declare a static AIOPool
    with the aiocb size and the cancellation method.  This cleans up the
    current code considerably and will make it cleaner and more obvious
    to support two different aio implementations behind a single
    BlockDriver.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Christoph Hellwig authored
     
    Browse Code »
  • Commit ffad4116 removed the "scratch buffer"
    from check_params, but didn't care for the error messages which actually
    included this string to tell the user which option was wrong. Now this string
    is uninitialized, so this patch removes it from the message.
    
    This means that the user is only told the whole parameter string and has to
    pick the wrong option by himself as the callers of check_params can't know this
    value any more. An alternative approach would be to revert that commit and do
    whatever is needed to fix the original problem without changing check_params.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »

  • Use standard callback with highest order to synchronize VCPU on reset
    after all device callbacks were execute. This allows to remove the
    special kvm hook in qemu_system_reset.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Add the parameter 'order' to qemu_register_reset and sort callbacks on
    registration. On system reset, callbacks with lower order will be
    invoked before those with higher order. Update all existing users to the
    standard order 0.
    
    Note: At least for x86, the existing users seem to assume that handlers
    are called in their registration order. Therefore, the patch preserves
    this property. If someone feels bored, (s)he could try to identify this
    dependency and express it properly on callback registration.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • This patch adds the missing hooks to allow live migration in KVM mode.
    It adds proper synchronization before/after saving/restoring the VCPU
    states (note: PPC is untested), hooks into
    cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging
    at KVM level, and synchronizes that drity log into QEMU's view before
    running ram_live_save().
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • This patch creates a new header file and the corresponding implementation file
    for parsing of parameter strings for options (like used in -drive). Part of
    this is code moved from vl.c (so qemu-img can use it later).
    
    The idea is to have a data structure describing all accepted parameters. When
    parsing a parameter string, the structure is copied and filled with the
    parameter values.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »
  • This patch augments info migrate output with status about:
    * ram bytes remaining
    * ram bytes transferred
    * ram bytes total
    
    This should be enough for management tools to realize
    whether or not there is progress in migration. We can
    add more information later on, if the need arrives
    
    [v2: fixes bytes_transferred type]
    
    Signed-off-by: Glauber Costa <glommer@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Glauber Costa authored
     
    Browse Code »

  • f80f9ec9 changed the order that machines are registered which had the effect of
    changing the default machine.  This changeset introduces a new is_default field
    so that machine types can declare that they are the default for an architecture.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • My previous commit, f92f8afe,  broke -vnc (spotted by Glauber Costa).  This
    is because it's necessary to tell when the no special display parameters have
    been passed and default to SDL or VNC appropriately.
    
    This refactors the display selection logic to be less complicated which has
    the effect of fixing the regression mentioned above.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  •  --disable-gfx-check predates VNC server support.  It made sense back then
    because the only thing you could do without SDL was use -nographic mode or
    similar tricks.  Since this is a very advanced mode of operation, gfx-check
    provided a good safety net for casual users.
    
    A casual user is very likely to use VNC to interact with a guest.  In fact, it's
    often frustrating to install QEMU on a server and have to specify
    disable-gfx-check when you only want to use VNC.
    
    This patch eliminates disable-gfx-check and makes SDL behave like every other
    optional dependency.  If SDL is not available, instead of failing ungracefully
    if no special options are specified, we default to -vnc localhost:0,to=99.
    When we do default to VNC, we also print a message to tell the user that we've
    done this include which port we're currently listening on.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »

  • When qemu is run under valgrind, valgrind shows the following output
    on exit:
    
    ==3648== 1 errors in context 2 of 2:
    ==3648== Syscall param timer_create(evp) points to uninitialised byte(s)
    ==3648==    at 0x54E936A: timer_create (in /lib/librt-2.9.so)
    ==3648==    by 0x405DCF: dynticks_start_timer (vl.c:1549)
    ==3648==    by 0x40A966: main (vl.c:1726)
    ==3648==  Address 0x7fefffb34 is on thread 1's stack
    ==3648==  Uninitialised value was created by a stack allocation
    ==3648==    at 0x405D60: dynticks_start_timer (vl.c:1534)
    
    This patch is a simple fix to remove this potential problem.
    
    Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
    Jean-Christophe Dubois authored
     
    Browse Code »
  • This fixes a SIGSEGV error on qemu exit.
    
    Here is the valgrind output related to this error
    
    ==3648== Process terminating with default action of signal 11 (SIGSEGV)
    ==3648==  Access not within mapped region at address 0x8
    ==3648==    at 0x40636B: host_alarm_handler (vl.c:1345)
    ==3648==    by 0x52D807F: (within /lib/libpthread-2.9.so)
    ==3648==    by 0x5C0A12E: tcsetattr (in /lib/libc-2.9.so)
    ==3648==    by 0x4DD601: term_exit (qemu-char.c:700)
    ==3648==    by 0x5B636EC: exit (in /lib/libc-2.9.so)
    ==3648==    by 0x5B4B5AC: (below main) (in /lib/libc-2.9.so)
    
    This simple fix check for a valid pointer as host_alarm_handler is
    also called after alarm_timer is released in the exit path.
    
    Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
    Jean-Christophe Dubois authored
     
    Browse Code »




  • This is no user-flippable switch, and no arch makes use of disabling
    gdbstub support. So it's pointless to keep the related #ifdefs and
    configure hunks around - and risking breakages like 711c410fdd again.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Jan Kiszka authored
     
    Browse Code »