1. 31 10月, 2018 24 次提交
  2. 30 10月, 2018 16 次提交
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request' into staging · a2e002ff
      Peter Maydell 提交于
      QEMU trivial patches collected between June and October 2018
      (Thank you to Thomas Huth)
      
      v2: fix 32bit build with updated patch (v3) from Philippe Mathieu-Daudé
          built in a 32bit debian sid chroot
      
      # gpg: Signature made Tue 30 Oct 2018 11:23:01 GMT
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request:
        milkymist-minimac2: Use qemu_log_mask(GUEST_ERROR) instead of error_report
        ppc: move at24c to its own CONFIG_ symbol
        hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
        hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
        tests/bios-tables-test: Remove an useless cast
        xen: Use the PCI_DEVICE macro
        qobject: Catch another straggler for use of qdict_put_str()
        configure: Support pkg-config for zlib
        tests: Fix typos in comments and help message (found by codespell)
        cpu.h: fix a typo in comment
        linux-user: fix comment s/atomic_write/atomic_set/
        qemu-iotests: make 218 executable
        scripts/qemu.py: remove trailing quotes on docstring
        scripts/decodetree.py: remove unused imports
        docs/devel/testing.rst: add missing newlines after code block
        qemu-iotests: fix filename containing checks
        tests/tcg/README: fix location for lm32 tests
        memory.h: fix typos in comments
        vga_int: remove unused function protype
        configs/alpha: Remove unused CONFIG_PARALLEL_ISA switch
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a2e002ff
    • P
      Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging · 3f328549
      Peter Maydell 提交于
      Pull request
      
      # gpg: Signature made Mon 29 Oct 2018 21:24:08 GMT
      # gpg:                using RSA key 7DEF8106AAFC390E
      # 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/bitmaps-pull-request:
        iotests: 169: add cases for source vm resuming
        iotests: improve 169
        dirty-bitmaps: clean-up bitmaps loading and migration logic
        bitmap: Update count after a merge
        nbd: forbid use of frozen bitmaps
        block/backup: prohibit backup from using in use bitmaps
        block/dirty-bitmaps: prohibit enable/disable on locked/frozen bitmaps
        block/dirty-bitmaps: allow clear on disabled bitmaps
        block/dirty-bitmaps: fix merge permissions
        block/dirty-bitmaps: add user_locked status checker
        bloc/qcow2: drop dirty_bitmaps_loaded state variable
        block/qcow2: improve error message in qcow2_inactivate
        iotests: 169: drop deprecated 'autoload' parameter
        qapi: add transaction support for x-block-dirty-bitmap-merge
        blockdev: rename block-dirty-bitmap-clear transaction handlers
        dirty-bitmap: make it possible to restore bitmap after merge
        dirty-bitmap: rename bdrv_undo_clear_dirty_bitmap
        dirty-bitmap: switch assert-fails to errors in bdrv_merge_dirty_bitmap
        blockdev-backup: add bitmap argument
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3f328549
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/usb-20181029-pull-request' into staging · e8b38d73
      Peter Maydell 提交于
      usb: fixes for ohci and smart card emulation.
      
      # gpg: Signature made Mon 29 Oct 2018 20:02:34 GMT
      # gpg:                using RSA key 4CB6D8EED3E87138
      # 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/usb-20181029-pull-request:
        hw: ccid-card-emulated: cleanup resource when realize in error path
        hw: ccid-card-emulated: introduce clean_event_notifier
        usb: ohci: make num_ports to an unsinged integer
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e8b38d73
    • P
      Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-october-2018-part-4' into staging · 0bbba166
      Peter Maydell 提交于
      MIPS queue for October 2018, part 4
      
      # gpg: Signature made Mon 29 Oct 2018 15:11:32 GMT
      # gpg:                using RSA key D4972A8967F75A65
      # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.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: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65
      
      * remotes/amarkovic/tags/mips-queue-october-2018-part-4: (27 commits)
        linux-user: Add prctl() PR_SET_FP_MODE and PR_GET_FP_MODE implementations
        linux-user: Determine the desired FPU mode from MIPS.abiflags
        linux-user: Read and set FP ABI value from MIPS abiflags
        linux-user: Extract MIPS abiflags from ELF file
        linux-user: Extend image_info struct with MIPS fp_abi and interp_fp_abi fields
        elf: Define MIPS_ABI_FP_UNKNOWN macro
        target/mips: Amend MXU ASE overview note
        target/mips: Move MXU_EN check one level higher
        target/mips: Add emulation of MXU instructions S32LDD and S32LDDR
        target/mips: Add emulation of MXU instructions Q8MUL and Q8MULSU
        target/mips: Add emulation of MXU instruction D16MAC
        target/mips: Add emulation of MXU instruction D16MUL
        target/mips: Add emulation of MXU instruction S8LDD
        target/mips: Move MUL, S32M2I, S32I2M handling out of main MXU switch
        target/mips: Add emulation of MXU instructions S32I2M and S32M2I
        target/mips: Add emulation of non-MXU MULL within MXU decoding engine
        target/mips: Add bit encoding for MXU operand getting pattern 'optn3'
        target/mips: Add bit encoding for MXU operand getting pattern 'optn2'
        target/mips: Add bit encoding for MXU execute add/sub pattern 'eptn2'
        target/mips: Add bit encoding for MXU accumulate add/sub 2-bit pattern 'aptn2'
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0bbba166
    • P
      milkymist-minimac2: Use qemu_log_mask(GUEST_ERROR) instead of error_report · 7b2b797c
      Philippe Mathieu-Daudé 提交于
      qemu_log_mask(GUEST_ERROR) is more appropriate:
      
        $ qemu -d help
        Log items (comma separated):
        guest_errors    log when the guest OS does something invalid (eg accessing a non-existent register)
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Acked-by: NMichael Walle <michael@walle.cc>
      Message-Id: <20181029130034.26750-1-f4bug@amsat.org>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      7b2b797c
    • P
      ppc: move at24c to its own CONFIG_ symbol · b3b76272
      Paolo Bonzini 提交于
      AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is
      being included in all emulators that use I2C, even if they do not
      really need it.  Separate it and, since it was added for the e500
      machines, add it to qemu-system-ppc and qemu-system-ppc64.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <20180522191743.12872-1-pbonzini@redhat.com>
      [lv: rebase]
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      b3b76272
    • V
      iotests: 169: add cases for source vm resuming · 3e6d88f2
      Vladimir Sementsov-Ogievskiy 提交于
      Test that we can resume source vm after [failed] migration, and bitmaps
      are ok.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      3e6d88f2
    • V
      iotests: improve 169 · b9247fc1
      Vladimir Sementsov-Ogievskiy 提交于
      Before previous patch, iotest 169 was actually broken for the case
      test_persistent__not_migbitmap__offline_shared, while formally
      passing.
      
      After migration log of vm_b had message:
      
          qemu-system-x86_64: Could not reopen qcow2 layer: Bitmap already
          exists: bitmap0
      
      which means that invalidation failed and bs->drv = NULL.
      
      It was because we've loaded bitmap twice: on open and on invalidation.
      
      Add code to 169, to catch such fails.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      b9247fc1
    • V
      dirty-bitmaps: clean-up bitmaps loading and migration logic · 9c98f145
      Vladimir Sementsov-Ogievskiy 提交于
      This patch aims to bring the following behavior:
      
      1. We don't load bitmaps, when started in inactive mode. It's the case
      of incoming migration. In this case we wait for bitmaps migration
      through migration channel (if 'dirty-bitmaps' capability is enabled) or
      for invalidation (to load bitmaps from the image).
      
      2. We don't remove persistent bitmaps on inactivation. Instead, we only
      remove bitmaps after storing. This is the only way to restore bitmaps,
      if we decided to resume source after [failed] migration with
      'dirty-bitmaps' capability enabled (which means, that bitmaps were not
      stored).
      
      3. We load bitmaps on open and any invalidation, it's ok for all cases:
        - normal open
        - migration target invalidation with dirty-bitmaps capability
          (bitmaps are migrating through migration channel, the are not
           stored, so they should have IN_USE flag set and will be skipped
           when loading. However, it would fail if bitmaps are read-only[1])
        - migration target invalidation without dirty-bitmaps capability
          (normal load of the bitmaps, if migrated with shared storage)
        - source invalidation with dirty-bitmaps capability
          (skip because IN_USE)
        - source invalidation without dirty-bitmaps capability
          (bitmaps were dropped, reload them)
      
      [1]: to accurately handle this, migration of read-only bitmaps is
           explicitly forbidden in this patch.
      
      New mechanism for not storing bitmaps when migrate with dirty-bitmaps
      capability is introduced: migration filed in BdrvDirtyBitmap.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      9c98f145
    • E
      bitmap: Update count after a merge · d1dde714
      Eric Blake 提交于
      We need an accurate count of the number of bits set in a bitmap
      after a merge. In particular, since the merge operation short-circuits
      a merge from an empty source, if you have bitmaps A, B, and C where
      B started empty, then merge C into B, and B into A, an inaccurate
      count meant that A did not get the contents of C.
      
      In the worst case, we may falsely regard the bitmap as empty when
      it has had new writes merged into it.
      
      Fixes: be58721d
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002233314.30159-1-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      d1dde714
    • J
      nbd: forbid use of frozen bitmaps · d9782022
      John Snow 提交于
      Whether it's "locked" or "frozen", it's in use and should
      not be allowed for the purposes of this operation.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002230218.13949-7-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      d9782022
    • J
      block/backup: prohibit backup from using in use bitmaps · b27a6b8b
      John Snow 提交于
      If the bitmap is frozen, we shouldn't touch it.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002230218.13949-6-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      b27a6b8b
    • J
      block/dirty-bitmaps: prohibit enable/disable on locked/frozen bitmaps · b053bb55
      John Snow 提交于
      We're not being consistent about this. If it's in use by an operation,
      the user should not be able to change the behavior of that bitmap.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002230218.13949-5-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      b053bb55
    • J
      block/dirty-bitmaps: allow clear on disabled bitmaps · 0be37c9e
      John Snow 提交于
      Similarly to merge, it's OK to allow clear operations on disabled
      bitmaps, as this condition only means that they are not recording
      new writes. We are free to clear it if the user requests it.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002230218.13949-4-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      0be37c9e
    • J
      block/dirty-bitmaps: fix merge permissions · 283d7a04
      John Snow 提交于
      In prior commits that made merge transactionable, we removed the
      assertion that merge cannot operate on disabled bitmaps. In addition,
      we want to make sure that we are prohibiting merges to "locked" bitmaps.
      
      Use the new user_locked function to check.
      Reported-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20181002230218.13949-3-jsnow@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      283d7a04
    • J
      block/dirty-bitmaps: add user_locked status checker · 993edc0c
      John Snow 提交于
      Instead of both frozen and qmp_locked checks, wrap it into one check.
      frozen implies the bitmap is split in two (for backup), and shouldn't
      be modified. qmp_locked implies it's being used by another operation,
      like being exported over NBD. In both cases it means we shouldn't allow
      the user to modify it in any meaningful way.
      
      Replace any usages where we check both frozen and qmp_locked with the
      new check.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 20181002230218.13949-2-jsnow@redhat.com
      [w/edits Suggested-By: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>]
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      993edc0c