• git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6280 c046a42c-6fe2-441c-8c8c-71466251a162
    blueswir1 authored
     
    Browse Code »
  • It was observed that Windows 2003 x64 hangs when shutting down if an
    RTL8139 NIC and a USB device tablet are both present.  What seems to be
    happening is:
    
    - the guest shuts down the transmitter and receiver
    - time passes
    - the guest requests a tally counter dump
    
    As it happens, the tally counter command register overlaps the transmit
    status register in C mode.  Qemu determines whether the chip is in C or C+
    mode by looking at the C+ transmit enable bit; as this is now unset, the
    dump tally counter command is interpreted as a C mode transmit command.  The
    guest doesn't think so, however, and continues to poll for completion of the
    tally counter dump command.  This never occurs, so the guest hangs.
    
    Fix by redefining C+ mode as "a write to the C+ command register has occurred
    since the last reset".  The data sheet is silent on the matter.
    
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6279 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • When we cancel an AIO request that is already being processed by
    aio_thread, qemu_paio_cancel should return QEMU_PAIO_NOTCANCELED as long
    as aio_thread isn't done with this request. But as the latter currently
    updates aiocb->ret after every block of the request, we may report
    QEMU_PAIO_ALLDONE too early.
    
    Futhermore, in case some zero-length request should have been queued,
    aiocb->ret is never set to != -EINPROGRESS and callers like
    raw_aio_cancel could get stuck in an endless loop.
    
    Fix those issues by updating aiocb->ret _after_ the request has been
    fully processed. This also simplifies the locking.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6278 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »