1. 10 3月, 2015 10 次提交
  2. 09 3月, 2015 8 次提交
  3. 08 3月, 2015 6 次提交
    • P
      Merge remote-tracking branch 'remotes/xtensa/tags/20150307-xtensa' into staging · 6608c7e9
      Peter Maydell 提交于
      Xtensa updates:
      
      - implement do_unassigned_access callback;
      - fix ML605 xtfpga FLASH size.
      
      # gpg: Signature made Sat Mar  7 12:35:05 2015 GMT using RSA key ID F83FA044
      # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>"
      # gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>"
      
      * remotes/xtensa/tags/20150307-xtensa:
        target-xtensa: xtfpga: fix ml605 flash size
        target-xtensa: implement do_unassigned_access callback
        hw/xtensa: allow reads/writes in the system I/O region
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6608c7e9
    • P
      Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging · 9c31a821
      Peter Maydell 提交于
      * remotes/qmp-unstable/queue/qmp:
        docs: add memory-hotplug.txt
        qemu-options.hx: improve -m description
        virtio-balloon: Add some trace events
        virtio-balloon: Fix balloon not working correctly when hotplug memory
        pc-dimm: add a function to calculate VM's current RAM size
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9c31a821
    • P
      Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150304-1' into staging · 033c7ddf
      Peter Maydell 提交于
      misc spice/qxl fixes.
      
      # gpg: Signature made Wed Mar  4 13:57:42 2015 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/spice/tags/pull-spice-20150304-1:
        hmp: info spice: take out webdav
        hmp: info spice: Show string channel name
        qxl: drop update_displaychangelistener call for secondary qxl devices
        vga: refactor vram_size clamping and rounding
        qxl: refactor rounding up to a nearest power of 2
        spice: fix invalid memory access to vga.vram
        qxl: document minimal video memory for new modes
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      033c7ddf
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150303-1' into staging · b6d527fb
      Peter Maydell 提交于
      xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set
      
      # gpg: Signature made Tue Mar  3 07:38:43 2015 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-20150303-1:
        xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b6d527fb
    • P
      Merge remote-tracking branch 'remotes/gonglei/tags/bootdevice-next-20150303' into staging · fff795ab
      Peter Maydell 提交于
      bootdevice: bug fixes
      
      # gpg: Signature made Tue Mar  3 05:18:39 2015 GMT using RSA key ID DDE30FBB
      # gpg: Good signature from "Gonglei <arei.gonglei@huawei.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 5178 9C82 617F 2F58 8693  63B1 BA7A 65B0 DDE3 0FBB
      
      * remotes/gonglei/tags/bootdevice-next-20150303:
        bootdevice: add check in restore_boot_order()
        bootdevice: check boot order argument validation before vm running
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fff795ab
    • P
      Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20150303' into staging · cff6abd6
      Peter Maydell 提交于
      TriCore RRR1, RRR2 instructions and bugfixes
      
      # gpg: Signature made Tue Mar  3 01:12:02 2015 GMT using RSA key ID 6B69CA14
      # gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>"
      
      * remotes/bkoppelmann/tags/pull-tricore-20150303:
        target-tricore: Add instructions of RRR1 opcode format, which have 0xc3 as first opcode
        target-tricore: Add instructions of RRR1 opcode format, which have 0x43 as first opcode
        target-tricore: Add instructions of RRR1 opcode format, which have 0x83 as first opcode
        target-tricore: Add instructions of RRR2 opcode format
        target-tricore: fix msub32_suov return wrong results
        target-tricore: Fix RLC_ADDI, RLC_ADDIH using wrong microcode helper
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      cff6abd6
  4. 07 3月, 2015 3 次提交
  5. 05 3月, 2015 5 次提交
  6. 04 3月, 2015 3 次提交
  7. 03 3月, 2015 5 次提交
    • P
      vl: take iothread lock very early · 576a94d8
      Paolo Bonzini 提交于
      If the iothread lock isn't taken by the main thread, the RCU callbacks
      might run concurrently with the main thread.  QEMU's not ready for that.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Tested-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Tested-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      576a94d8
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 3180aadb
      Peter Maydell 提交于
      - more config options
      - bootdevice, iscsi, virtio-scsi fixes
      - build system patches for MinGW and config-devices.mak
      - qemu_mutex_lock_iothread deadlock fixes
      - another tiny patch from the record/replay series
      
      # gpg: Signature made Mon Mar  2 09:59:14 2015 GMT using RSA key ID 78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        cpus: be more paranoid in avoiding deadlocks
        cpus: fix deadlock and segfault in qemu_mutex_lock_iothread
        virtio-scsi: Allocate op blocker reason before blocking
        Makefile.target: binary depends on config-devices
        Makefile: don't silence mak file test with V=1
        Makefile: fix up parallel building under MSYS+MinGW
        iscsi: Handle write protected case in reopen
        Give ivshmem its own config option
        Create specific config option for "platform-bus"
        Add specific config options for PCI-E bridges
        bootdevice: fix segment fault when booting guest with '-kernel' and '-initrd'
        timer: replace time() with QEMU_CLOCK_HOST
        virtio-scsi-dataplane: Call blk_set_aio_context within BQL
        block: Forbid bdrv_set_aio_context outside BQL
        scsi: give device a parent before setting properties
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3180aadb
    • L
      xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set · aa685789
      Laszlo Ersek 提交于
      At the moment, when the XHCI driver in edk2
      (MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf) runs on QEMU, with the options
      
        -device nec-usb-xhci -device usb-kbd
      
      it crashes with:
      
        ASSERT MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c(1759):
        TrsRing != ((void*) 0)
      
      The crash hits in the following edk2 call sequence (all files under
      MdeModulePkg/Bus/):
      
      UsbEnumerateNewDev()                         [Usb/UsbBusDxe/UsbEnumer.c]
        UsbBuildDescTable()                        [Usb/UsbBusDxe/UsbDesc.c]
          UsbGetDevDesc()                          [Usb/UsbBusDxe/UsbDesc.c]
            UsbCtrlGetDesc(USB_REQ_GET_DESCRIPTOR) [Usb/UsbBusDxe/UsbDesc.c]
              UsbCtrlRequest()                     [Usb/UsbBusDxe/UsbDesc.c]
                UsbHcControlTransfer()             [Usb/UsbBusDxe/UsbUtility.c]
                  XhcControlTransfer()             [Pci/XhciDxe/Xhci.c]
                    XhcCreateUrb()                 [Pci/XhciDxe/XhciSched.c]
                      XhcCreateTransferTrb()       [Pci/XhciDxe/XhciSched.c]
                    XhcExecTransfer()              [Pci/XhciDxe/XhciSched.c]
                      XhcCheckUrbResult()          [Pci/XhciDxe/XhciSched.c]
                        //
                        // look for TRB_TYPE_DATA_STAGE event [1]
                        //
                    //
                    // Store a copy of the device descriptor, as the hub device
                    // needs this info to configure endpoint. [2]
                    //
        UsbSetConfig()                             [Usb/UsbBusDxe/UsbDesc.c]
          UsbCtrlRequest(USB_REQ_SET_CONFIG)       [Usb/UsbBusDxe/UsbDesc.c]
            UsbHcControlTransfer()                 [Usb/UsbBusDxe/UsbUtility.c]
              XhcControlTransfer()                 [Pci/XhciDxe/Xhci.c]
                XhcSetConfigCmd()                  [Pci/XhciDxe/XhciSched.c]
                  XhcInitializeEndpointContext()   [Pci/XhciDxe/XhciSched.c]
                    //
                    // allocate transfer ring for the endpoint [3]
                    //
      
      USBKeyboardDriverBindingStart()              [Usb/UsbKbDxe/EfiKey.c]
        UsbIoAsyncInterruptTransfer()              [Usb/UsbBusDxe/UsbBus.c]
          UsbHcAsyncInterruptTransfer()            [Usb/UsbBusDxe/UsbUtility.c]
            XhcAsyncInterruptTransfer()            [Pci/XhciDxe/Xhci.c]
              XhcCreateUrb()                       [Pci/XhciDxe/Xhci.c]
                XhcCreateTransferTrb()             [Pci/XhciDxe/XhciSched.c]
                  XhcSyncTrsRing()                 [Pci/XhciDxe/XhciSched.c]
                    ASSERT (TrsRing != NULL) [4]
      
      UsbEnumerateNewDev() in the USB bus driver issues a GET_DESCRIPTOR
      request, in order to determine the number of configurations that the
      endpoint supports. The requests consists of three stages (three TRBs),
      setup, data, and status. The length of the response is determined in [1],
      namely from the transfer event that the host controller generates in
      response to the request's middle stage (ie. the data stage).
      
      If the length of the answer is correct (a full GET_DESCRIPTOR request
      takes 18 bytes), then the XHCI driver that underlies the USB bus driver
      "snoops" (caches) the descriptor data for later [2].
      
      Later, the USB bus driver sends a SET_CONFIG request. The underlying XHCI
      driver allocates a transfer ring for the endpoint, relying on the data
      snooped and cached in step [2].
      
      Finally, the USB keyboard driver submits an asynchronous interrupt
      transfer to manage the keyboard. As part of this it asserts [4] that the
      ring has been allocated in step [3].
      
      And this ASSERT() fires. The root cause can be found in the way QEMU
      handles the initial GET_DESCRIPTOR request.
      
      Again, that request consists of three stages (TRBs, Transfer Request
      Blocks), "setup", "data", and "status". The XhcCreateTransferTrb()
      function sets the IOC ("Interrupt on Completion") flag in each of these
      TRBs.
      
      According to the XHCI specification, the host controller shall generate a
      Transfer Event in response to *each* individual TRB of the request that
      had the IOC flag set. This means that QEMU should queue three events:
      setup, data, and status, for edk2's XHCI driver.
      
      However, QEMU only generates two events:
      - one for the setup (ie. 1st) stage,
      - another for the status (ie. 3rd) stage.
      
      No event is generated for the middle (ie. data) stage. The loop in QEMU's
      xhci_xfer_report() function runs three times, but due to the "reported"
      variable, only the first and the last TRBs elicit events, the middle (data
      stage) results in no event queued.
      
      As a consequence:
      - When handling the GET_DESCRIPTOR request, XhcCheckUrbResult() in [1]
        does not update the response length from zero.
      
      - XhcControlTransfer() thinks that the response is invalid (it has zero
        length payload instead of 18 bytes), hence [2] is not reached; the
        device descriptor is not stashed for later, and the number of possible
        configurations is left at zero.
      
      - When handling the SET_CONFIG request, (NumConfigurations == 0) from
        above prevents the allocation of the endpoint's transfer ring.
      
      - When the keyboard driver tries to use the endpoint, the ASSERT() blows
        up.
      
      The solution is to correct the emulation in QEMU, and to generate a
      transfer event whenever IOC is set in a TRB.
      
      The patch replaces
      
        !reported && (IOC || foo)    == !reported && IOC ||
                                        !reported && foo
      
      with
      
        IOC || (!reported && foo)    == IOC ||
                                        !reported && foo
      
      which only changes how
      
        reported && IOC
      
      is handled. (Namely, it now generates an event.)
      
      Tested with edk2 built for "qemu-system-aarch64 -M virt" (ie.
      "ArmVirtualizationQemu.dsc", aka "AAVMF"), and guest Linux.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      aa685789
    • C
    • G
      qxl: drop update_displaychangelistener call for secondary qxl devices · 20ca3763
      Gerd Hoffmann 提交于
      Commit 3dcadce5 added three
      update_displaychangelistener call sites:
      
      Two for primary qxl cards, when entering/leaving vga mode, which are
      correct.
      
      One for secondary qxl cards, which is wrong because we don't register
      a displaychangelistener in the first place for secondary cards.
      
      Remove it.
      Reported-by: NBrad Campbell <lists2009@fnarfbargle.com>
      Tested-by: NBrad Campbell <lists2009@fnarfbargle.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      20ca3763