1. 20 3月, 2017 8 次提交
    • P
      arm: Fix APSR writes via M profile MSR · b28b3377
      Peter Maydell 提交于
      Our implementation of writes to the APSR for M-profile via the MSR
      instruction was badly broken.
      
      First and worst, we had the sense wrong on the test of bit 2 of the
      SYSm field -- this is supposed to request an APSR write if bit 2 is 0
      but we were doing it if bit 2 was 1.  This bug was introduced in
      commit 58117c9b, so hasn't been in a QEMU release.
      
      Secondly, the choice of exactly which parts of APSR should be written
      is defined by bits in the 'mask' field.  We were not passing these
      through from instruction decode, making it impossible to check them
      in the helper.
      
      Pass the mask bits through from the instruction decode to the helper
      function and process them appropriately; fix the wrong sense of the
      SYSm bit 2 check.
      
      Invalid mask values and invalid combinations of mask and register
      number are UNPREDICTABLE; we choose to treat them as if the mask
      values were valid.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1487616072-9226-5-git-send-email-peter.maydell@linaro.org
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      b28b3377
    • P
      arm: Enforce should-be-1 bits in MRS decoding · 3d54026f
      Peter Maydell 提交于
      The MRS instruction requires that bits [19..16] are all 1s, and for
      A/R profile also that bits [7..0] are all 0s.  At this point in the
      decode tree we have checked all of the rest of the instruction but
      were allowing these to be any value.  If these bits are not set then
      the result is architecturally UNPREDICTABLE, but choosing to UNDEF is
      more helpful to the user and avoids unexpected odd behaviour if the
      encodings are used for some purpose in future architecture versions.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1487616072-9226-4-git-send-email-peter.maydell@linaro.org
      3d54026f
    • P
      arm: Don't decode MRS(banked) or MSR(banked) for M profile · 43ac6574
      Peter Maydell 提交于
      M profile doesn't have the MSR(banked) and MRS(banked) instructions
      and uses the encodings for different kinds of M-profile MRS/MSR.
      Guard the relevant bits of the decode logic to make sure we don't
      accidentally fall into them by accident on M-profile.
      
      (The bit being checked for this (bit 5) is part of the SYSm field on
      M-profile, but since no currently allocated system registers have
      encodings with bit 5 of SYSm set, this hasn't been a problem in
      practice.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1487616072-9226-3-git-send-email-peter.maydell@linaro.org
      43ac6574
    • P
      arm: HVC and SMC encodings don't exist for M profile · 001b3cab
      Peter Maydell 提交于
      M profile doesn't have the HVC or SMC encodings, so make them always
      UNDEF rather than generating calls to helper functions that assume
      A/R profile.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1487616072-9226-2-git-send-email-peter.maydell@linaro.org
      001b3cab
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170320' into staging · 00e7c07b
      Peter Maydell 提交于
      One bugfix for device plug/unplug and migration in the
      channel subsystem code.
      
      # gpg: Signature made Mon 20 Mar 2017 08:45:59 GMT
      # 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-20170320:
        s390x/css: reassign subchannel if schid is changed after migration
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      00e7c07b
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-fixes-20170320-1' into staging · bedf13ec
      Peter Maydell 提交于
      fixes for 2.9: vnc, cirrus, tcg display updates.
      
      # gpg: Signature made Mon 20 Mar 2017 08:52:34 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-fixes-20170320-1:
        vnc: fix a qio-channel leak
        cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
        ui/console: ensure graphic updates don't race with TCG vCPUs
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      bedf13ec
    • D
      s390x/css: reassign subchannel if schid is changed after migration · 3c788ebc
      Dong Jia Shi 提交于
      The subchannel is a means to access a device. While the device number is
      assigned by the administrator, the subchannel number is assigned by
      the channel subsystem in an ascending order on cold and hot plug.
      When doing unplug and replug operations, the same device may end up on
      a different subchannel; for example
      
      - We start with a device fe.1.2222, which ends up at subchannel
        fe.1.0000.
      - Now we detach the device, attach a device fe.1.3333 (which would get
        the now-free subchannel fe.1.0000), re-attach fe.1.2222 (which ends
        up at subchannel fe.1.0001) and detach fe.1.3333.
      - We now have the same device (fe.1.2222) available to the guest; it
        just shows up on a different subchannel.
      
      In such a case, the subchannel numbers are different from what a
      QEMU would create during cold plug when parsing the command line.
      
      As this would cause a guest visible change on migration, we do restore
      the source system's value of the subchannel number on load.
      
      So we are now fine from the guest perspective. From the host
      perspective this will cause an inconsistent state in our internal data
      structures, though.
      
      For example, the subchannel 0 might not be at array position 0. This will
      lead to problems when we continue doing hot (un/re) plug operations.
      
      Let's fix this by cleaning up our internal data structures.
      Reported-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      3c788ebc
    • M
      vnc: fix a qio-channel leak · 7bc4f084
      Marc-André Lureau 提交于
      Spotted by ASAN.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20170317092802.17973-1-marcandre.lureau@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7bc4f084
  2. 19 3月, 2017 2 次提交
    • M
      nios2: iic: Convert CPU prop to qom link · ebedf0f9
      Marek Vasut 提交于
      Add a const qom link between the CPU and the IIC instead
      of passing the CPU link through a qom property.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 20170317210627.23532-1-marex@denx.de
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Chris Wulff <crwulff@gmail.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jeff Da Silva <jdasilva@altera.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Sandra Loosemore <sandra@codesourcery.com>
      Cc: Yves Vandervennet <yvanderv@altera.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ebedf0f9
    • P
      Merge remote-tracking branch 'remotes/xtensa/tags/20170317-xtensa' into staging · 96dd9c89
      Peter Maydell 提交于
      target/xtensa fixes for 2.9:
      
      - fix build failure when FDT support is not enabled;
      - correctly pass command line arguments to semihosting guests.
      
      # gpg: Signature made Fri 17 Mar 2017 18:14:01 GMT
      # gpg:                using RSA key 0x51F9CC91F83FA044
      # gpg: Good signature from "Max Filippov <filippov@cadence.com>"
      # gpg:                 aka "Max Filippov <max.filippov@cogentembedded.com>"
      # gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>"
      # Primary key fingerprint: 2B67 854B 98E5 327D CDEB  17D8 51F9 CC91 F83F A044
      
      * remotes/xtensa/tags/20170317-xtensa:
        target/xtensa: fix semihosting argc/argv implementation
        target/xtensa: xtfpga: load DTB only when FDT support is enabled
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      96dd9c89
  3. 18 3月, 2017 2 次提交
  4. 17 3月, 2017 13 次提交
  5. 16 3月, 2017 15 次提交
    • P
      Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170316' into staging · c5e737e5
      Peter Maydell 提交于
      migration/next for 20170316
      
      # gpg: Signature made Thu 16 Mar 2017 08:21:51 GMT
      # gpg:                using RSA key 0xF487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>"
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * remotes/juanquintela/tags/migration/20170316:
        postcopy: Check for shared memory
        RAMBlocks: qemu_ram_is_shared
        vmstate: fix failed iotests case 68 and 91
        migration/block: Avoid invoking blk_drain too frequently
        migration: use "" as the default for tls-creds/hostname
        Change the method to calculate dirty-pages-rate
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c5e737e5
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · 094a9a7c
      Peter Maydell 提交于
      Pull request
      
      Tracing makefile fixes for QEMU 2.9.
      
      # gpg: Signature made Thu 16 Mar 2017 06:56:10 GMT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/tracing-pull-request:
        trace: ensure $(tracetool-y) is defined in top level makefile
        makefile: generate trace-events-all upfront
        makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      094a9a7c
    • P
      dtc: Revert unintentional submodule downgrade from commit c2cabb34 · 699f6c6f
      Peter Maydell 提交于
      Commit c2cabb34 inadvertently downgraded the 'dtc' submodule,
      undoing the increments added in earlier commits. Revert this,
      returning the submodule state to where we should be.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      699f6c6f
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-03-16' into staging · 3c2758c2
      Peter Maydell 提交于
      QAPI patches for 2017-03-16
      
      # gpg: Signature made Thu 16 Mar 2017 06:18:38 GMT
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-qapi-2017-03-16: (49 commits)
        qapi: Fix a misleading parser error message
        qapi: Make pylint a bit happier
        qapi: Drop unused .check_clash() parameter schema
        qapi: union_types is a list used like a dict, make it one
        qapi: struct_types is a list used like a dict, make it one
        qapi: enum_types is a list used like a dict, make it one
        qapi: Factor add_name() calls out of the meta conditional
        qapi: Simplify what gets stored in enum_types
        qapi: Drop unused variable events
        qapi: Eliminate check_docs() and drop QAPIDoc.expr
        qapi: Fix detection of bogus member documentation
        tests/qapi-schema: Improve coverage of bogus member docs
        tests/qapi-schema: Rename doc-bad-args to doc-bad-command-arg
        qapi: Move empty doc section checking to doc parser
        qapi: Improve error message on @NAME: in free-form doc
        qapi: Move detection of doc / expression name mismatch
        qapi: Fix detection of doc / expression mismatch
        tests/qapi-schema: Improve doc / expression mismatch coverage
        qapi2texi: Use category "Object" for all object types
        qapi2texi: Generate descriptions for simple union tags
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3c2758c2
    • P
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 3716fba3
      Peter Maydell 提交于
      virtio, pci: fixes
      
      More fixes missed in the previous pull request.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Thu 16 Mar 2017 02:29:49 GMT
      # gpg:                using RSA key 0x281F0DB8D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * remotes/mst/tags/for_upstream:
        virtio-serial-bus: Delete timer from list before free it
        hw/virtio: fix Power Management Control Register for PCI Express virtio devices
        hw/virtio: fix Link Control Register for PCI Express virtio devices
        hw/virtio: fix error enabling flags in Device Control register
        hw/pcie: fix Extended Configuration Space for devices with no Extended Capabilities
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3716fba3
    • P
      Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging · 7c756380
      Peter Maydell 提交于
      # gpg: Signature made Thu 16 Mar 2017 00:52:41 GMT
      # gpg:                using RSA key 0x7DEF8106AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
      # Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
      #      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E
      
      * remotes/jnsnow/tags/ide-pull-request:
        ide: ahci: call cleanup function in ahci unit
        ide: core: add cleanup function
        ide: qdev: register ide bus unrealize function
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7c756380
    • D
      postcopy: Check for shared memory · 8679638b
      Dr. David Alan Gilbert 提交于
      Postcopy doesn't support migration of RAM shared with another process
      yet (we've got a bunch of things to understand).
      Check for the case and don't allow postcopy to be enabled.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      8679638b
    • D
      RAMBlocks: qemu_ram_is_shared · 463a4ac2
      Dr. David Alan Gilbert 提交于
      Provide a helper to say whether a RAMBlock was created as a
      shared mapping.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      463a4ac2
    • Q
      vmstate: fix failed iotests case 68 and 91 · e1e686c1
      QingFeng Hao 提交于
      This problem affects s390x only if we are running without KVM.
      Basically, S390CPU.irqstate is unused if we do not use KVM,
      and thus no buffer is allocated.
      This causes size=0, first_elem=NULL and n_elems=1 in
      vmstate_load_state and vmstate_save_state. And the assert fails.
      With this fix we can go back to the old behavior and support
      VMS_VBUFFER with size 0 and nullptr.
      Signed-off-by: NQingFeng Hao <haoqf@linux.vnet.ibm.com>
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      e1e686c1
    • L
      migration/block: Avoid invoking blk_drain too frequently · 1cf6aa74
      Lidong Chen 提交于
      Increase bmds->cur_dirty after submit io, so reduce the frequency
      involve into blk_drain, and improve the performance obviously
      when block migration.
      
      The performance test result of this patch:
      
      During the block dirty save phase, this patch improve guest os IOPS
      from 4.0K to 9.5K. and improve the migration speed from
      505856 rsec/s to 855756 rsec/s.
      Signed-off-by: NLidong Chen <jemmy858585@gmail.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      1cf6aa74
    • G
      cirrus: stop passing around src pointers in the blitter · ffaf8577
      Gerd Hoffmann 提交于
      Does basically the same as "cirrus: stop passing around dst pointers in
      the blitter", just for the src pointer instead of the dst pointer.
      
      For the src we have to care about cputovideo blits though and fetch the
      data from s->cirrus_bltbuf instead of vga memory.  The cirrus_src*()
      helper functions handle that.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489584487-3489-1-git-send-email-kraxel@redhat.com
      ffaf8577
    • G
      cirrus: stop passing around dst pointers in the blitter · 026aeffc
      Gerd Hoffmann 提交于
      Instead pass around the address (aka offset into vga memory).  Calculate
      the pointer in the rop_* functions, after applying the mask to the
      address, to make sure the address stays within the valid range.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489574872-8679-1-git-send-email-kraxel@redhat.com
      026aeffc
    • G
      cirrus: fix cirrus_invalidate_region · e048dac6
      Gerd Hoffmann 提交于
      off_cur_end is exclusive, so off_cur_end == cirrus_addr_mask is valid.
      Fix calculation to make sure to allow that, otherwise the assert added
      by commit f153b563 can trigger for valid
      blits.
      
      Test case: boot windows nt 4.0
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489579606-26020-1-git-send-email-kraxel@redhat.com
      e048dac6
    • G
      cirrus: add option to disable blitter · 827bd517
      Gerd Hoffmann 提交于
      Ok, we have this beast in the cirrus code which is not used at all by
      modern guests, except when you try to find security holes in qemu.  So,
      add an option to disable blitter altogether.  Guests released within
      the last ten years should not show any rendering issues if you turn off
      blitter support.
      
      There are no known bugs in the cirrus blitter code.  But in the past we
      hoped a few times already that we've finally nailed the last issue.  So
      having some easy way to mitigate in case yet another blitter issue shows
      up certainly makes me sleep a bit better at night.
      
      For completeness:  The by far better way to mitigate is to switch away
      from cirrus and use stdvga instead.  Or something more modern like
      virtio-vga in case your guest has support for it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489494540-15745-1-git-send-email-kraxel@redhat.com
      827bd517
    • G
      cirrus: switch to 4 MB video memory by default · 73c14813
      Gerd Hoffmann 提交于
      Quoting cirrus source code:
         Follow real hardware, cirrus card emulated has 4 MB video memory.
         Also accept 8 MB/16 MB for backward compatibility.
      
      So just use 4MB by default.  We decided to leave that at 8MB by default
      a while ago, for live migration compatibility reasons.  But we have
      compat properties to handle that, so that isn't a compeling reason.
      
      This also removes some sanity check inconsistencies in the cirrus code.
      Some places check against the allocated video memory, some places check
      against the 4MB physical hardware has.  Guest code can trigger asserts
      because of that.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489494514-15606-1-git-send-email-kraxel@redhat.com
      73c14813