1. 23 2月, 2016 12 次提交
    • P
      scripts/clean-includes: Enhance to handle header files · fd3e39a4
      Peter Maydell 提交于
      Enhance clean-includes to handle header files as well as .c source
      files. For headers we merely remove all the redundant #include
      lines, including any includes of qemu/osdep.h itself.
      
      There is a simple mollyguard on the include file processing to
      skip a few key headers like osdep.h itself, to avoid producing
      bad patches if the script is run on every file in include/.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      fd3e39a4
    • P
      disas/arm-a64.cc: Include osdep.h first · e78490c4
      Peter Maydell 提交于
      Rearrange include directives so that we include osdep.h first.
      This has to be done manually because clean-includes doesn't
      handle C++.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      e78490c4
    • P
      osdep.h: Define macros for the benefit of C++ before C++11 · 79f56d82
      Peter Maydell 提交于
      For C++ before C++11, <stdint.h> requires definition of the macros
      __STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS and __STDC_FORMAT_MACROS
      in order to enable definition of various macros by the header file.
      Define these in osdep.h, so that we get the right header file
      definitions whether osdep.h is being used by plain C, C++11 or
      older C++.
      
      In particular libvixl's header files depend on this and won't
      compile if osdep.h is included before them otherwise.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      79f56d82
    • P
      cpu: Clean up includes · 1ef26b1f
      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>
      1ef26b1f
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160223-1' into staging · ea6e4981
      Peter Maydell 提交于
      usb: misc bugfixes.
      
      # gpg: Signature made Tue 23 Feb 2016 10:53:01 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-20160223-1:
        ohci: allocate timer only once.
        usb: add pid check at the first of uhci_handle_td()
        usb: check RNDIS buffer offsets & length
        usb: check RNDIS message length
        tusb6010: move from hw/timer to hw/usb
        usb: check USB configuration descriptor object
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ea6e4981
    • G
      ohci: allocate timer only once. · fa1298c2
      Gerd Hoffmann 提交于
      Allocate timer once, at init time, instead of allocating/freeing
      it all the time when starting/stopping the bus.  Simplifies the
      code, also fixes bugs (memory leak) due to missing checks whenever
      the time is already allocated or not.
      
      Cc: Prasad J Pandit <pjp@fedoraproject.org>
      Reported-by: NZuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fa1298c2
    • G
      usb: add pid check at the first of uhci_handle_td() · 5f77e06b
      Gonglei 提交于
      pid can be gotten from uhci device memory in uhci_handle_td(),
      so the guest can trigger assert qemu if we get an invalid pid.
      And the uhci spec 2.1.2 tells us The Host Controller sets Host
      Controller Process Error bit to 1 when it detects a fatal error
      and indicates that the Host Controller suffered a consistency
      check failure while processing a Transfer Descriptor. An example
      of a consistency check failure would be finding an illegal PID
      field while processing the packet header portion of the TD.
      When this error occurs, the Host Controller clears the Run/Stop
      bit in the Command register to prevent further schedule execution.
      
      We'd better to set UHCI_STS_HCPERR and kick an interrupt, check
      the pid value at the first of uhci_handle_td function.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1070027Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Message-id: 1455867238-4720-1-git-send-email-arei.gonglei@huawei.com
      
      [ applied minor codestyle fix ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      5f77e06b
    • P
      usb: check RNDIS buffer offsets & length · fe3c546c
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets,
      the USB Net device emulator uses a fixed length(4096) data buffer.
      The incoming informationBufferOffset & Length combination could
      overflow and cross that range. Check control message buffer
      offsets and length to avoid it.
      Reported-by: NQinghao Tang <luodalongde@gmail.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455648821-17340-3-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      fe3c546c
    • P
      usb: check RNDIS message length · 64c9bc18
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets, the USB Net
      device emulator uses a fixed length(4096) data buffer. The incoming
      packet length could exceed this limit. Add a check to avoid it.
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455648821-17340-2-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      64c9bc18
    • P
      tusb6010: move from hw/timer to hw/usb · 14ec7b2c
      Peter Maydell 提交于
      The TUSB6010 is a USB controller (as the name suggests). Move it from
      hw/timer (where it was accidentally filed in 2013 when we moved
      everything out of hw/) to hw/usb.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455883404-10976-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      14ec7b2c
    • P
      usb: check USB configuration descriptor object · 80eecda8
      Prasad J Pandit 提交于
      When processing remote NDIS control message packets, the USB Net
      device emulator checks to see if the USB configuration descriptor
      object is of RNDIS type(2). But it does not check if it is null,
      which leads to a null dereference error. Add check to avoid it.
      Reported-by: NQinghao Tang <luodalongde@gmail.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 1455188480-14688-1-git-send-email-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      80eecda8
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 8eb779e4
      Peter Maydell 提交于
      Block layer patches
      
      # gpg: Signature made Mon 22 Feb 2016 15:59:25 GMT using RSA key ID C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-upstream: (34 commits)
        qemu-iotests: 140: make description slightly more verbose
        qemu-iotests: 140: don't use IDE device
        qemu-iotests: 067: ignore QMP events
        blockdev: unset inappropriate flags when changing medium
        MAINTAINERS: Add myself as maintainer of the throttling code
        docs: Document the throttling infrastructure
        qapi: Correct the name of the iops_rd parameter
        qemu-iotests: Extend iotest 093 to test bursts
        throttle: Test throttle_compute_wait() during bursts
        throttle: Check that burst_level leaks correctly
        qapi: Add burst length fields to BlockDeviceInfo
        qapi: Add burst length parameters to block_set_io_throttle
        throttle: Add command-line settings to define the burst periods
        throttle: Add support for burst periods
        throttle: Use throttle_config_init() to initialize ThrottleConfig
        throttle: Merge all functions that check the configuration into one
        throttle: Set always an average value when setting a maximum value
        throttle: Make throttle_is_valid() set errp
        throttle: Make throttle_max_is_missing_limit() set errp
        throttle: Make throttle_conflicting() set errp
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8eb779e4
  2. 22 2月, 2016 28 次提交