1. 21 2月, 2017 1 次提交
  2. 12 10月, 2016 1 次提交
  3. 07 6月, 2016 2 次提交
  4. 23 5月, 2016 1 次提交
  5. 23 3月, 2016 2 次提交
    • R
      Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND · 73bcb24d
      Rutuja Shah 提交于
      This patch replaces get_ticks_per_sec() calls with the macro
      NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec()
      is then removed.  This replacement improves the readability and
      understandability of code.
      
      For example,
      
          timer_mod(fdctrl->result_timer,
      	      qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50));
      
      NANOSECONDS_PER_SECOND makes it obvious that qemu_clock_get_ns
      matches the unit of the expression on the right side of the plus.
      Signed-off-by: NRutuja Shah <rutu.shah.26@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      73bcb24d
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  6. 23 2月, 2016 1 次提交
  7. 29 1月, 2016 1 次提交
    • P
      usb: Clean up includes · e532b2e0
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-20-git-send-email-peter.maydell@linaro.org
      e532b2e0
  8. 08 1月, 2016 5 次提交
    • L
      ohci: clear pending SOF on suspend · 087462c7
      Laurent Vivier 提交于
      On overcommitted CPU, kernel can be so slow that an interrupt can
      be triggered by the device whereas the driver is not ready to receive
      it. This drives us into an infinite loop.
      
      On suspend, if a SOF interrupt is raised between the stop of the
      device processing and the change of the device internal state to
      OHCI_USB_SUSPEND (QEMU stops SOF timer on this state change), this
      interrupt is never acknowledged.
      
      This patch clears pending SOF interrupt on OHCI_USB_SUSPEND setting.
      
      Some details:
      
      - ohci_irq(): the OHCI interrupt handler, acknowledges the SOF IRQ
        only if the state of the driver (rh_state) is OHCI_STATE_RUNNING.
        So if this interrupt happens and the driver is not in this state,
        the function is called again and again, moving the system to a
        CPU starvation.
      
      - ohci_rh_suspend(): the function stop the operation and acknowledge
        pending interrupts (but doesn't disable it). Later in the function,
        the device is moved to OHCI_SUSPEND_STATE, and the driver to
        OHCI_RH_SUSPENDED. If between the moment when the interrupt is
        acknowledged and the moment when the device is suspended a new
        interrupt is raised, it will be never acknowledged because the
        driver is now not in OHCI_RH_RUNNING state.
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1452109525-32150-3-git-send-email-lvivier@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      087462c7
    • L
      ohci: delay first SOF interrupt · fd0a10cd
      Laurent Vivier 提交于
      On overcommitted CPU, kernel can be so slow that an interrupt can
      be triggered by the device whereas the driver is not ready to receive
      it. This drives us into an infinite loop.
      
      This does not happen on real hardware because real hardware never send
      interrupt immediately after the controller has been moved to OPERATION state.
      
      This patch tries to delay the first SOF interrupt to let driver exits from
      the critical section (which is not protected against interrupts...)
      
      Some details:
      
      - ohci_irq(): the OHCI interrupt handler, acknowledges the SOF IRQ
        only if the state of the driver (rh_state) is OHCI_STATE_RUNNING.
        So if this interrupt happens and the driver is not in this state,
        the function is called again and again, moving the system to a
        CPU starvation.
      
      - ohci_rh_resume(): the driver re-enables operation with OHCI_USB_OPER.
        In QEMU this start the SOF timer and QEMU starts to send IRQs. As
        the driver is not in OHCI_STATE_RUNNING and not protected against IRQ,
        the ohci_irq() can be called and the driver never moved to
        OHCI_STATE_RUNNING.
      Suggested-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1452109525-32150-2-git-send-email-lvivier@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fd0a10cd
    • H
      ohci: fix command HostControllerReset · 0922c3f6
      Hervé Poussineau 提交于
      Specification says that: "This bit is set by HCD to initiate a software reset of HC."
      Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
      Tested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-4-git-send-email-hpoussin@reactos.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      0922c3f6
    • H
      ohci: fix Host Controller USBRESET · 7d938fd1
      Hervé Poussineau 提交于
      Specification says that, when entering this state, "the contents of the registers
      (except Root Hub registers) are preserved by the HC. [...] The Root Hub is being reset,
      which causes the Root Hub's downstream ports to be reset and possibly powered off."
      Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
      Tested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-3-git-send-email-hpoussin@reactos.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7d938fd1
    • H
      ohci: split reset method in 3 parts · 84d04e21
      Hervé Poussineau 提交于
      The three parts are:
      - root hub reset (ohci_roothub_reset)
      - host controller soft reset (ohci_soft_reset)
      - host controller hard reset (ohci_hard_reset)
      Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
      Tested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-2-git-send-email-hpoussin@reactos.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      84d04e21
  9. 12 6月, 2015 1 次提交
    • J
      migration: Use normal VMStateDescriptions for Subsections · 5cd8cada
      Juan Quintela 提交于
      We create optional sections with this patch.  But we already have
      optional subsections.  Instead of having two mechanism that do the
      same, we can just generalize it.
      
      For subsections we just change:
      
      - Add a needed function to VMStateDescription
      - Remove VMStateSubsection (after removal of the needed function
        it is just a VMStateDescription)
      - Adjust the whole tree, moving the needed function to the corresponding
        VMStateDescription
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      5cd8cada
  10. 20 3月, 2015 1 次提交
    • G
      ohci: fix resource cleanup leak · 88dd1b8d
      Gonglei 提交于
      When hot-unplugging the usb controllers (ehci/uhci),
      we have to clean all resouce of these devices,
      involved registered reset handler. Otherwise, it
      may cause NULL pointer access and/or segmentation fault
      if we reboot the guest os after hot-unplugging.
      
      Let's hook up reset via DeviceClass->reset() and drop
      the qemu_register_reset() call. Then Qemu will register
      and unregister the reset handler automatically.
      
      Ohci does't support hotplugging/hotunplugging yet, but
      existing resource cleanup leak logic likes ehci/uhci.
      
      Cc: qemu-stable <qemu-stable@nongnu.org>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      88dd1b8d
  11. 17 3月, 2015 2 次提交
  12. 26 1月, 2015 1 次提交
  13. 26 9月, 2014 2 次提交
  14. 23 9月, 2014 1 次提交
  15. 29 8月, 2014 3 次提交
  16. 18 7月, 2014 1 次提交
  17. 24 6月, 2014 1 次提交
  18. 05 5月, 2014 1 次提交
  19. 27 3月, 2014 1 次提交
  20. 10 2月, 2014 1 次提交
  21. 14 10月, 2013 1 次提交
  22. 03 10月, 2013 1 次提交
  23. 31 8月, 2013 1 次提交
  24. 23 8月, 2013 1 次提交
  25. 30 7月, 2013 1 次提交
    • A
      hcd-ohci: add dma error handling · cf66ee8e
      Alexey Kardashevskiy 提交于
      Current hcd-ohci does not handle DMA errors. However they may happen
      so here we introduce simple error handling.
      
      On such errors, a typical OHCI will stop operating, signal the guest
      about the error by sending "UnrecoverableError Event", set itself into
      error state and set "Detected Parity Error" in its PCI config space
      to signal that it got an error and so does the patch.
      
      This also adds ohci_die() call to ohci_bus_start() to handle possible
      failure of qemu_new_timer_ns().
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      cf66ee8e
  26. 29 7月, 2013 1 次提交
  27. 23 7月, 2013 2 次提交
  28. 04 7月, 2013 2 次提交