1. 12 7月, 2016 10 次提交
    • G
      input-linux: better capability checks, merge input_linux_event_{mouse, keyboard} · 2e6a64cb
      Gerd Hoffmann 提交于
      Improve capability checks (count keys and buttons), store results.
      
      Merge the input_linux_event_mouse and input_linux_event_keyboard
      functions into one, dispatch into input_linux_handle_mouse and
      input_linux_handle_keyboard depending on device capabilities.
      
      Allow calling both handle functions, so we can handle mice which
      also send key events, by routing those key events to the keyboard.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1466067800-25434-4-git-send-email-kraxel@redhat.com
      2e6a64cb
    • G
      input-linux: factor out input_linux_handle_keyboard · 2330e9e7
      Gerd Hoffmann 提交于
      No functional change.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1466067800-25434-3-git-send-email-kraxel@redhat.com
      2330e9e7
    • G
      input-linux: factor out input_linux_handle_mouse · d4df42c4
      Gerd Hoffmann 提交于
      No functional change.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1466067800-25434-2-git-send-email-kraxel@redhat.com
      d4df42c4
    • G
      input: add trace events for full queues · c80276b4
      Gerd Hoffmann 提交于
      It isn't unusual to happen, for example during reboot when the guest
      doesn't reveice events for a while.  So better don't flood stderr
      with alarming messages.  Turn them into tracepoints instead so they
      can be enabled in case they are needed for trouble-shooting.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1466675495-28797-1-git-send-email-kraxel@redhat.com
      c80276b4
    • G
      msmouse: send short messages if possible. · d7b7f526
      Gerd Hoffmann 提交于
      Keep track of button changes.  Send the extended 4-byte messages for
      three button mice only in case we have something to report for the
      middle button.  Use the short 3-byte messages (original protocol for
      two-button microsoft mouse) otherwise.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1467625375-31774-5-git-send-email-kraxel@redhat.com
      d7b7f526
    • G
      msmouse: switch to new input interface · 96d7c072
      Gerd Hoffmann 提交于
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1467625375-31774-4-git-send-email-kraxel@redhat.com
      96d7c072
    • G
      msmouse: fix buffer handling · 57a4e3b9
      Gerd Hoffmann 提交于
      The msmouse chardev backend writes data without checking whenever there
      is enough space.
      
      That happens to work with linux guests, probably by pure luck because
      the linux driver enables the fifo and the serial port emulation accepts
      more data than announced via qemu_chr_be_can_write() in that case.
      
      Handle this properly by adding a buffer to MouseState.  Hook up a
      CharDriverState->accept_input() handler which feeds the buffer to the
      serial port.  msmouse_event() only fills the buffer now, and calls the
      accept_input handler too to kick off the transmission.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1467625375-31774-3-git-send-email-kraxel@redhat.com
      57a4e3b9
    • G
      msmouse: add MouseState, unregister handler on close · cde8dcbc
      Gerd Hoffmann 提交于
      Add struct to track serial mouse state.  Store mouse event handler
      there.  Unregister properly on chardev close.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1467625375-31774-2-git-send-email-kraxel@redhat.com
      cde8dcbc
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20160711' into staging · f1ef5578
      Peter Maydell 提交于
      Last round of s390x patches for 2.7:
      - A large update of the s390x PCI code, bringing it in line with
        the architecture
      - Fixes and improvements in the ipl (boot) code
      - Refactoring in the css code
      
      # gpg: Signature made Mon 11 Jul 2016 09:04:51 BST
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20160711: (25 commits)
        s390x/pci: make hot-unplug handler smoother
        s390x/pci: replace fid with idx in msg data of msix
        s390x/pci: fix stpcifc_service_call
        s390x/pci: refactor list_pci
        s390x/pci: refactor s390_pci_find_dev_by_idx
        s390x/pci: add checkings in CLP_SET_PCI_FN
        s390x/pci: enable zpci hot-plug/hot-unplug
        s390x/pci: enable uid-checking
        s390x/pci: introduce S390PCIBusDevice qdev
        s390x/pci: introduce S390PCIIOMMU
        s390x/pci: introduce S390PCIBus
        s390x/pci: enforce zPCI state checking
        s390x/pci: refactor s390_pci_find_dev_by_fh
        s390x/pci: unify FH_ macros
        s390x/pci: write fid in CLP_QUERY_PCI_FN
        s390x/pci: acceleration for getting S390pciState
        s390x/pci: fix failures of dma map/unmap
        s390x/css: Unplug handler of virtual css bridge
        s390x/css: Factor out virtual css bridge and bus
        s390x/css: use define for "virtual-css-bridge" literal
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f1ef5578
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160708' into staging · 7de2cc8f
      Peter Maydell 提交于
      two self-modifying code fixes
      
      # gpg: Signature made Fri 08 Jul 2016 21:28:50 BST
      # gpg:                using RSA key 0xAD1270CC4DD0279B
      # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
      # gpg:                 aka "Richard Henderson <rth@redhat.com>"
      # gpg:                 aka "Richard Henderson <rth@twiddle.net>"
      # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B
      
      * remotes/rth/tags/pull-tcg-20160708:
        translate-all: Fix user-mode self-modifying code in 2 page long TB
        cputlb: Fix for self-modifying writes across page boundaries
        cputlb: Add address parameter to VICTIM_TLB_HIT
        cputlb: Move VICTIM_TLB_HIT out of line
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7de2cc8f
  2. 11 7月, 2016 29 次提交
  3. 09 7月, 2016 1 次提交
    • S
      translate-all: Fix user-mode self-modifying code in 2 page long TB · 7399a337
      Stanislav Shmarov 提交于
      In user-mode emulation Translation Block can consist of 2 guest pages.
      In that case QEMU also mprotects 2 host pages that are dedicated for
      guest memory, containing instructions. QEMU detects self-modifying code
      with SEGFAULT signal processing.
      
      In case if instruction in 1st page is modifying memory of 2nd
      page (or vice versa) QEMU will mark 2nd page with PAGE_WRITE,
      invalidate TB, generate new TB contatining 1 guest instruction and
      exit to CPU loop. QEMU won't call mprotect, and new TB will cause
      same SEGFAULT. Page will have both PAGE_WRITE_ORG and PAGE_WRITE
      flags, so QEMU will handle the signal as guest binary problem,
      and exit with guest SEGFAULT.
      
      Solution is to do following: In case if current TB was invalidated
      continue to invalidate TBs from remaining guest pages and mark pages
      as PAGE_WRITE. After that disable host page protection with mprotect.
      If current tb was invalidated longjmp to main loop. That is more
      efficient, since we won't get SEGFAULT when executing new TB.
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Signed-off-by: NStanislav Shmarov <snarpix@gmail.com>
      Message-Id: <1467880392-1043630-1-git-send-email-snarpix@gmail.com>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      7399a337