• Move portability clutter out into its own function.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Mark McLoughlin authored
     
    Browse Code »
  • This patch reorders the initialization of slirp itself as well as its
    associated features smb and redirection. So far the first reference to
    slirp triggered the initialization, independent of the actual -net user
    option which may carry additional parameters. Now we save any request to
    add a smb export or some redirections until the actual initialization of
    the stack. This also allows to move a few parameters that were passed
    via global variable into the argument list of net_slirp_init.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse Code »
  • 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 »
  • A small bit of confusion between buffers is causing errors like:
    
      qemu: invalid parameter '10' in 'script=/etc/qemu-ifup,fd=10'
    
    instead of:
    
      qemu: invalid parameter 'script' in 'script=/etc/qemu-ifup,fd=10'
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Mark McLoughlin 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 Code »
  • 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 Code »
  • Fix a race in qemu_send_packet when delivering deferred packets and
    add proper deferring also to qemu_sendv_packet.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse Code »
  • Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Jan Kiszka authored
     
    Browse Code »





  • The ARMv7-M NVIC device pokes itself into the CPU state.  Now we have a
    proper device model we can have the CPU/SoC code do this.
    
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Paul Brook authored
     
    Browse Code »
  • New configure option for debug builds.
    
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Paul Brook authored
     
    Browse Code »
  • is redundant with DeviceState->type->name
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • When debugging multi-threaded programs, QEMU's gdb stub would report the
    correct number of threads (the qfThreadInfo and qsThreadInfo packets).
    However, the stub was unable to actually switch between threads (the T
    packet), since it would report every thread except the first as being
    dead.  Furthermore, the stub relied upon cpu_index as a reliable means
    of assigning IDs to the threads.  This was a bad idea; if you have this
    sequence of events:
    
    initial thread created
    new thread #1
    new thread #2
    thread #1 exits
    new thread #3
    
    thread #3 will have the same cpu_index as thread #1, which would confuse
    GDB.  (This problem is partly due to the remote protocol not having a
    good way to send thread creation/destruction events.)
    
    We fix this by using the host thread ID for the identifier passed to GDB
    when debugging a multi-threaded userspace program.  The thread ID might
    wrap, but the same sort of problems with wrapping thread IDs would come
    up with debugging programs natively, so this doesn't represent a
    problem.
    
    Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
    Nathan Froyd authored
     
    Browse Code »