• Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
    code.  It's ugly and causes us to have to build multiple object files for
    linking against qemu and the tools.
    
    This patch introduces a new file, qemu-tool.c which contains enough for
    qemu-img, qemu-nbd, and QEMU to all share the same objects.
    
    This also required getting qemu-nbd to be a bit more Windows friendly.  I also
    changed the Windows block-raw to use normal IO instead of overlapping IO since
    we don't actually do AIO yet on Windows.  I changed the various #if 0's to
     #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows.
    
    After this patch, there are no longer any #ifdef's related to qemu-img and
    qemu-nbd.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »


  • This patch introduces signalfd() to work around the signal/select race in
    checking for AIO completions.  For platforms that don't support signalfd(), we
    emulate it with threads.
    
    There was a long discussion about this approach.  I don't believe there are any
    fundamental problems with this approach and I believe eliminating the use of
    signals is a good thing.
    
    I've tested Windows and Linux using Windows and Linux guests.  I've also checked
    for disk IO performance regressions.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5187 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »





  • The direction bit in the control register should not be directly
    
    set using PPWCONTROL. The kernel gives the following debug message.
    
        parport0 (ppdev0): use data_reverse for this!
    
    More over setting the data pins to forward mode does not work,
    perhaps a bug in the Linux PP driver. The right way to do this is
    to use PPDATADIR to set the direction. The patch checks if the
    user is toggling the direction bit, and invokes PPDATADIR to
    do the job.
    
    Signed-off-by: Vijay Kumar B <vijaykumar@bravegnu.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5063 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Dir »

  • Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5058 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Add idle field to DisplayState struct, so drivers can figure
    the display is idle and take advantage of that.
    
    The xen framebuffer driver will use this to communicate the
    idle state to the guest, so it knows it can stop doing updates
    to a virtual display which is invisible anyway.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5056 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • This patch makes qemu handle signals better.  It sets the request_shutdown
    flag, making the main_loop exit and qemu taking the usual exit route, with
    atexit handlers being called and so on, instead of qemu just being killed
    by the signal.
    
    To avoid calling vm_start() from the signal handler main_loop() got an
    additional check so qemu_system_shutdown_request() works even when the
    vm is in stopped state.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5055 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • QEMU can now automatically grab host USB devices that match the filter.
    For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handle
    wildcards. So for example if you do something like
       usb_add host:5.*
    QEMU will automatically grab any non-hub device with host address 5.*.
    
    Same with the 'host:PID:*', we grab any device that matches PID.
    
    Filtering itself is very generic so we can probably add more elaborate
    syntax like 'host:BUS.ADDR:VID:PID'. So that we can do 'host:5.*:6000:*'.
    
    Anyway, it's implemented using a periodic timer that scans host devices
    and grabs those that match the filter. Timer is started when the first
    filter is added.
    
    We now keep the list of all host devices that we grabbed to make sure that
    we do not grab the same device twice.
    
    btw It's currently possible to grab the same host device more than once.
    ie You can just do "usb_add host:1.1" more than once, which of course does
    not work. So this patch fixes that issue too.
    
    Along with auto disconnect patch that I send a minute ago the setup is very
    seamless now. You can just allocate some usb ports to the VMs and plug/unplug
    devices at any time.
    
    Signed-off-by: Max Krasnyansky <maxk@kernel.org>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5048 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »
  • I got really annoyed by the fact that you have to manually do
    usb_del in the monitor when host device is unplugged and decided
    to fix it :)
    
    Basically we now automatically remove guest USB device
    when the actual host device is disconnected.
    
    At first I've extended set_fd_handlerX() stuff to support checking
    for exceptions on fds. But unfortunately usbfs code does not wake up
    user-space process when device is removed, which means we need a
    timer to periodically check if device is still there. So I removed
    fd exception stuff and implemented it with the timer.
    
    Signed-off-by: Max Krasnyansky <maxk@kernel.org>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5047 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »
  • git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
    blueswir1 authored
     
    Browse Code »





  • This patch upgrades the emulated UART to 16550A, the code comes from
    xen-unstable. The main improvement was introduced with the following patch and
    subsequent email thread:
    
    http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00129.html
    
    The changes compared to previous version are:
    
    - change clock_gettime to qemu_get_clock
    
    - no token bucket anymore;
    
    - fixed a small bug handling IRQs; this was the problem that prevented
    kgdb to work over the serial (thanks to Jason Wessel for the help
    spotting and reproducing this bug).
    
    - many many style fixes;
    
    - savevm version number increased;
    
    - not including termios.h and sys/ioctl.h anymore, declaring static
    constants in qemu-char.h instead;
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4993 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »