Skip to content
Snippets Groups Projects
  1. Jan 11, 2016
  2. Jan 10, 2016
    • Michael Tokarev's avatar
      unicore32: convert get_sp_from_cpustate from macro to inline · 6e502164
      Michael Tokarev authored
      
      All other architectures define get_sp_from_cpustate as an inline function,
      only unicore32 uses a #define.  With this, some usages are impossible, for
      example, enabling sigaltstack in linux-user/syscall.c results in
      
      linux-user/syscall.c: In function ‘do_syscall’:
      linux-user/syscall.c:8299:39: error: dereferencing ‘void *’ pointer [-Werror]
        get_sp_from_cpustate(arg1, arg2, get_sp_from_cpustate((CPUArchState *)cpu_env));
                                             ^
      linux-user/syscall.c:8299:39: error: request for member ‘regs’ in something not a structure or union
      
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      6e502164
  3. Jan 08, 2016
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging · 6bb9ead7
      Peter Maydell authored
      
      sdl2/opengl: add opengl context and scanout support
      ui/curses: Fix color attribute of monitor for curses
      
      # gpg: Signature made Fri 08 Jan 2016 12:42:02 GMT using RSA key ID D3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      
      * remotes/kraxel/tags/pull-ui-20160108-1:
        sdl2/opengl: add opengl context and scanout support
        ui/curses: Fix color attribute of monitor for curses
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      6bb9ead7
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160108-1' into staging · 9df25137
      Peter Maydell authored
      
      usb: mtp and ohci fixes.
      
      # gpg: Signature made Fri 08 Jan 2016 10:14:59 GMT using RSA key ID D3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      
      * remotes/kraxel/tags/pull-usb-20160108-1:
        ohci: clear pending SOF on suspend
        ohci: delay first SOF interrupt
        usb-mtp: fix call to trace function
        usb-mtp: use safe variant when cleaning events list
        ohci: fix command HostControllerReset
        ohci: fix Host Controller USBRESET
        ohci: split reset method in 3 parts
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      9df25137
    • Gerd Hoffmann's avatar
      sdl2/opengl: add opengl context and scanout support · cb47dc9a
      Gerd Hoffmann authored
      
      This allows virtio-gpu to render in 3d mode.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      cb47dc9a
    • OGAWA Hirofumi's avatar
      ui/curses: Fix color attribute of monitor for curses · 4083733d
      OGAWA Hirofumi authored
      
      Current text_console_update() writes totally broken color attributes
      to console_write_ch(). The format now is writing,
      
      [WRONG]
      	bold << 21 | fg << 12 | bg << 8 | char
      	fg == 3bits curses color number
      	bg == 3bits curses color number
      
      I can't see this format is where come from. Anyway, this doesn't work
      at all.
      
      What curses expects is actually (and vga.c is using),
      
      [RIGHT]
      	bold << 21 | bg << 11 | fg << 8 | char
      	fg == 3bits vga color number
      	bg == 3bits vga color number
      
      And curses set COLOR_PAIR() up to match this format, and curses's
      chtype. I.e,
      
      	bold | color_pair | char
      	color_pair == (bg << 3 | fg)
      
      To fix, this simply uses VGA color number everywhere except curses.c
      internal. Then, convert it to above [RIGHT] format to write by
      console_write_ch(). And as bonus, this reduces to expose curses define
      to other parts (removes COLOR_* from console.c).
      
      [Tested the first line is displayed as white on blue back for monitor
      in curses console]
      
      Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Message-id: 87r3j95407.fsf@mail.parknet.co.jp
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      4083733d
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-for-peter-2016-01-07' into staging · d9767f1b
      Peter Maydell authored
      
      Block patches from 2015-12-23 until 2016-01-07.
      
      # gpg: Signature made Thu 07 Jan 2016 22:46:08 GMT using RSA key ID E838ACAD
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
      
      * remotes/maxreitz/tags/pull-block-for-peter-2016-01-07: (21 commits)
        iotests: Add test cases for blockdev-mirror
        qmp: Add blockdev-mirror command
        block: Add check on mirror target
        block: Extract blockdev part of qmp_drive_mirror
        block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE
        qemu-iotests: s390x: fix test 051
        iotests: 095: Filter _img_info output
        iotests: 095: Use TEST_IMG override instead of "mv"
        iotests: 050: Use TEST_IMG override instead of "mv"
        iotests: 038: Use TEST_IMG override instead of "mv"
        iotests: 037: Use TEST_IMG override instead of "mv"
        iotests: 034: Use TEST_IMG override instead of "mv"
        iotests: 028: Use TEST_IMG override instead of "mv"
        iotests: 024: Use TEST_IMG override instead of "mv"
        iotests: 020: Use TEST_IMG override instead of "mv"
        iotests: 019: Use TEST_IMG override instead of "mv"
        iotests: 018: Use TEST_IMG override instead of "mv"
        block/qapi: Clear err for further error
        block: use drained section in bdrv_close
        qemu-iotests: make check-block.sh work on out-of-tree builds
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d9767f1b
    • Laurent Vivier's avatar
      ohci: clear pending SOF on suspend · 087462c7
      Laurent Vivier authored
      
      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: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 1452109525-32150-3-git-send-email-lvivier@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      087462c7
    • Laurent Vivier's avatar
      ohci: delay first SOF interrupt · fd0a10cd
      Laurent Vivier authored
      
      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: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 1452109525-32150-2-git-send-email-lvivier@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      fd0a10cd
    • Bandan Das's avatar
      usb-mtp: fix call to trace function · ec93e158
      Bandan Das authored
      
      trace_usb_mtp_inotify_event() was being called after the object was
      being freed.
      
      Signed-off-by: default avatarBandan Das <bsd@redhat.com>
      Message-id: 1450861787-16213-3-git-send-email-bsd@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      ec93e158
    • Bandan Das's avatar
      usb-mtp: use safe variant when cleaning events list · c22d5dcd
      Bandan Das authored
      
      usb_mtp_inotify_cleanup uses QLIST_FOREACH to pick events
      from a list and free them which is incorrect. Use QLIST_FOREACH_SAFE
      instead.
      
      Signed-off-by: default avatarBandan Das <bsd@redhat.com>
      Message-id: 1450861787-16213-2-git-send-email-bsd@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      c22d5dcd
    • Hervé Poussineau's avatar
      ohci: fix command HostControllerReset · 0922c3f6
      Hervé Poussineau authored
      
      Specification says that: "This bit is set by HCD to initiate a software reset of HC."
      
      Signed-off-by: default avatarHervé Poussineau <hpoussin@reactos.org>
      Tested-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-4-git-send-email-hpoussin@reactos.org
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      0922c3f6
    • Hervé Poussineau's avatar
      ohci: fix Host Controller USBRESET · 7d938fd1
      Hervé Poussineau authored
      
      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: default avatarHervé Poussineau <hpoussin@reactos.org>
      Tested-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-3-git-send-email-hpoussin@reactos.org
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      7d938fd1
    • Hervé Poussineau's avatar
      ohci: split reset method in 3 parts · 84d04e21
      Hervé Poussineau authored
      
      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: default avatarHervé Poussineau <hpoussin@reactos.org>
      Tested-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-id: 1450567431-31795-2-git-send-email-hpoussin@reactos.org
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      84d04e21
  4. Jan 07, 2016
Loading