Skip to content
Snippets Groups Projects
  1. Feb 21, 2017
    • Markus Armbruster's avatar
      hw: Default -drive to if=ide explicitly where it works · 2059839b
      Markus Armbruster authored
      
      Block backends defined with -drive if=ide are meant to be picked up by
      machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=ide drives not picked up that way can still be used with -device as
      if they had if=none, but that's unclean and best avoided.  Unused ones
      produce an "Orphaned drive without device" warning.
      
      -drive parameter "if" is optional, and the default depends on the
      machine type.  If a machine type doesn't specify a default, the
      default is "ide".
      
      Many machine types default to if=ide, even though they don't actually
      have an IDE controller.  A future patch will change these defaults to
      something more sensible.  To prepare for it, this patch makes default
      "ide" explicit for the machines that actually pick up if=ide drives:
      
      * alpha: clipper
      * arm/aarch64: spitz borzoi terrier tosa
      * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-*
        pc-i440fx-* pc-* isapc xenfv)
      * mips64el: fulong2e
      * mips/mipsel/mips64el: malta mips
      * ppc/ppc64: mac99 g3beige prep
      * sh4/sh4eb: r2d
      * sparc64: sun4u sun4v
      
      Note that ppc64 machine powernv already sets an "ide" default
      explicitly.  Its IDE controller isn't implemented, yet.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
      2059839b
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20170221-1' into staging · b8562561
      Peter Maydell authored
      
      xhci: add qemu-xhci device, some followup cleanups.
      ccid: better sanity checking.
      ehci: fix memory leak
      ohci: bugfixes.
      
      # gpg: Signature made Tue 21 Feb 2017 07:14:35 GMT
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # 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>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/pull-usb-20170221-1:
        usb-ccid: add check message size checks
        usb-ccid: move header size check
        usb-ccid: better bulk_out error handling
        xhci: drop via vendor command handling
        xhci: fix nec vendor quirk handling
        xhci: add qemu xhci controller
        xhci: drop ER_FULL_HACK workaround
        xhci: apply limits to loops
        usb: ohci: limit the number of link eds
        usb: ohci: fix error return code in servicing iso td
        usb: ehci: fix memory leak in ehci
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      b8562561
    • Gerd Hoffmann's avatar
      usb-ccid: add check message size checks · 31fb4444
      Gerd Hoffmann authored
      
      Check message size too when figuring whenever we should expect more data.
      Fix debug message to show useful data, p->iov.size is fixed anyway if we
      land there, print how much we got meanwhile instead.
      
      Also check announced message size against actual message size.  That
      is a more general fix for CVE-2017-5898 than commit "c7dfbf32 usb: ccid:
      check ccid apdu length".
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 1487250819-23764-4-git-send-email-kraxel@redhat.com
      31fb4444
    • Gerd Hoffmann's avatar
      usb-ccid: move header size check · 7569c546
      Gerd Hoffmann authored
      
      Move up header size check, so we can use header fields in sanity checks
      (in followup patches).  Also reword the debug message.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 1487250819-23764-3-git-send-email-kraxel@redhat.com
      7569c546
    • Gerd Hoffmann's avatar
      usb-ccid: better bulk_out error handling · 0aeebc73
      Gerd Hoffmann authored
      
      Add err goto label where we can jump to from all error conditions.
      STALL request on all errors.  Reset position on all errors.
      
      Normal request processing is not in a else branch any more, so this code
      is reintended, there are no code changes in that part of the code
      though.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 1487250819-23764-2-git-send-email-kraxel@redhat.com
      0aeebc73
    • Gerd Hoffmann's avatar
      xhci: drop via vendor command handling · 558ff1b6
      Gerd Hoffmann authored
      
      Seems pretty pointless, we don't emulate an via xhci controller.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486382139-30630-5-git-send-email-kraxel@redhat.com
      558ff1b6
    • Gerd Hoffmann's avatar
      xhci: fix nec vendor quirk handling · 2992d6b4
      Gerd Hoffmann authored
      
      Only the TYPE_NEC_XHCI controller will have the nec vendor quirks.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486382139-30630-4-git-send-email-kraxel@redhat.com
      2992d6b4
    • Gerd Hoffmann's avatar
      xhci: add qemu xhci controller · 72a810f4
      Gerd Hoffmann authored
      
      Turn existing TYPE_XHCI into an abstract base class.
      Create two child classes, TYPE_NEC_XHCI (same name as old xhci
      controller) and TYPE_QEMU_XHCI (using an ID from our namespace).
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarcel Apfelbaum <marcel@redhat.com>
      Message-id: 1486382139-30630-3-git-send-email-kraxel@redhat.com
      72a810f4
    • Gerd Hoffmann's avatar
      xhci: drop ER_FULL_HACK workaround · 898248a3
      Gerd Hoffmann authored
      
      The nec/renesas driver problems have finally been debugged and root
      caused, see commit "7da76e12 xhci: fix event queue IRQ handling".
      
      It's pretty clear now that
       (a) The whole "driver can't handle ring full" story is most likely
           wrong.
       (b) The ER_FULL_HACK workaround based on the false assumtion doesn't
           much.  It avoids the driver crashing (without commit 7da76e12), but
           it doesn't make usb work.
       (c) With 7da76e12 applied it doesn't trigger any more.
      
      So, lets kill it.  Or, to be exact, lets almost kill it.  Some data
      fields are kept unused in the state struct, for live migration backward
      compatibility.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486382139-30630-2-git-send-email-kraxel@redhat.com
      898248a3
    • Gerd Hoffmann's avatar
      xhci: apply limits to loops · f89b60f6
      Gerd Hoffmann authored
      
      Limits should be big enough that normal guest should not hit it.
      Add a tracepoint to log them, just in case.  Also, while being
      at it, log the existing link trb limit too.
      
      Reported-by: default avatar李强 <liqiang6-s@360.cn>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486383669-6421-1-git-send-email-kraxel@redhat.com
      f89b60f6
    • Li Qiang's avatar
      usb: ohci: limit the number of link eds · 95ed5693
      Li Qiang authored
      
      The guest may builds an infinite loop with link eds. This patch
      limit the number of linked ed to avoid this.
      
      Signed-off-by: default avatarLi Qiang <liqiang6-s@360.cn>
      Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      95ed5693
    • Li Qiang's avatar
      usb: ohci: fix error return code in servicing iso td · 26f670a2
      Li Qiang authored
      
      It should return 1 if an error occurs when reading iso td.
      This will avoid an infinite loop issue in ohci_service_ed_list.
      
      Signed-off-by: default avatarLi Qiang <liqiang6-s@360.cn>
      Message-id: 5899ac3e.1033240a.944d5.9a2d@mx.google.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      26f670a2
    • Li Qiang's avatar
      usb: ehci: fix memory leak in ehci · d710e1e7
      Li Qiang authored
      
      In usb_ehci_init function, it initializes 's->ipacket', but there
      is no corresponding function to free this. As the ehci can be hotplug
      and unplug, this will leak host memory leak. In order to make the
      hierarchy clean, we should add a ehci pci finalize function, then call
      the clean function in ehci device.
      
      Signed-off-by: default avatarLi Qiang <liqiang6-s@360.cn>
      Message-id: 589a85b8.3c2b9d0a.b8e6.1434@mx.google.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      d710e1e7
  2. Feb 20, 2017
  3. Feb 18, 2017
  4. Feb 17, 2017
Loading