1. 13 11月, 2017 7 次提交
  2. 11 11月, 2017 2 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 53fb28d1
      Peter Maydell 提交于
      Pull request
      
      v2:
       * v1 emails 2/3 and 3/3 weren't sent due to an email failure
       * Included Sergio's updated wording in the commit description
      
      # gpg: Signature made Wed 08 Nov 2017 19:12:01 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/block-pull-request:
        util/async: use atomic_mb_set in qemu_bh_cancel
        tests-aio-multithread: fix /aio/multi/schedule race condition
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      53fb28d1
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-11-08-1' into staging · 4ffa88c9
      Peter Maydell 提交于
      Merge qcrypto 2017/11/08 v1
      
      # gpg: Signature made Wed 08 Nov 2017 11:06:38 GMT
      # gpg:                using RSA key 0xBE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/pull-qcrypto-2017-11-08-1:
        crypto: afalg: fix a NULL pointer dereference
        tests: Run the luks tests in test-crypto-block only if encryption is available
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4ffa88c9
  3. 10 11月, 2017 8 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171108' into staging · 6058bfb0
      Peter Maydell 提交于
      ppc patch queue 2017-11-08
      
      Here's the current set of accumulated ppc patches for qemu-2.11.
      Since we're now in hard freeze these are all bugfixes (although some
      fix a bug by way of a cleanup).
      
      # gpg: Signature made Wed 08 Nov 2017 08:10:38 GMT
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-2.11-20171108:
        e500: ppce500_init_mpic() return device instead of IRQ array
        hw/display/sm501: Fix comment in sm501_sysbus_class_init()
        ppc: fix setting of compat mode
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6058bfb0
    • E
      nbd/server: Fix structured read of length 0 · ef8c887e
      Eric Blake 提交于
      The NBD spec was recently clarified to state that a read of length 0
      should not be attempted by a compliant client; but that a server must
      still handle it correctly in an unspecified manner (that is, either
      a successful no-op or an error reply, but not a crash) [1].  However,
      it also implies that NBD_REPLY_TYPE_OFFSET_DATA must have a non-zero
      payload length, but our existing code was replying with a chunk
      that a picky client could reject as invalid because it was missing
      a payload (our own client implementation was recently patched to be
      that picky, after first fixing it to not send 0-length requests).
      
      We are already doing successful no-ops for 0-length writes and for
      non-structured reads; so for consistency, we want structured reply
      reads to also be a no-op.  The easiest way to do this is to return
      a NBD_REPLY_TYPE_NONE chunk; this is best done via a new helper
      function (especially since future patches for other structured
      replies may benefit from using the same helper).
      
      [1] https://github.com/NetworkBlockDevice/nbd/commit/ee926037Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-8-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      ef8c887e
    • E
      nbd-client: Stricter enforcing of structured reply spec · b4176cb3
      Eric Blake 提交于
      Ensure that the server is not sending unexpected chunk lengths
      for either the NONE or the OFFSET_DATA chunk, nor unexpected
      hole length for OFFSET_HOLE.  This will flag any server as
      broken that responds to a zero-length read with an OFFSET_DATA
      (what our server currently does, but that's about to be fixed)
      or with OFFSET_HOLE, even though we previously fixed our client
      to never be able to send such a request over the wire.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-7-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      b4176cb3
    • E
      nbd-client: Short-circuit 0-length operations · 9d8f818c
      Eric Blake 提交于
      The NBD spec was recently clarified to state that clients should
      not send 0-length requests to the server, as the server behavior
      is undefined [1].  We know that qemu-nbd's behavior is a successful
      no-op (once it has filtered for read-only exports), but other NBD
      implementations might return an error.  To avoid any questionable
      server implementations, it is better to just short-circuit such
      requests on the client side (we are relying on the block layer to
      already filter out requests such as invalid offset, write to a
      read-only volume, and so forth); do the short-circuit as late as
      possible to still benefit from protections from assertions that
      the block layer is not violating our assumptions.
      
      [1] https://github.com/NetworkBlockDevice/nbd/commit/ee926037Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-6-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      9d8f818c
    • E
      nbd: Fix struct name for structured reads · efdc0c10
      Eric Blake 提交于
      A closer read of the NBD spec shows that a structured reply chunk
      for a hole is not quite identical to the prefix of a data chunk,
      because the hole has to also send a 32-bit size field.  Although
      we do not yet send holes, we should fix the misleading information
      in our header and make it easier for a future patch to support
      sparse reads.  Messed up in commit bae245d1.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-5-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      efdc0c10
    • E
      nbd/client: Nicer trace of structured reply · 079d3266
      Eric Blake 提交于
      It's useful to know which structured reply chunk is being processed.
      Missed in commit d2febedb.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-4-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      079d3266
    • E
      nbd-client: Refuse read-only client with BDRV_O_RDWR · 1104d83c
      Eric Blake 提交于
      The NBD spec says that clients should not try to write/trim to
      an export advertised as read-only by the server.  But we failed
      to check that, and would allow the block layer to use NBD with
      BDRV_O_RDWR even when the server is read-only, which meant we
      were depending on the server sending a proper EPERM failure for
      various commands, and also exposes a leaky abstraction: using
      qemu-io in read-write mode would succeed on 'w -z 0 0' because
      of local short-circuiting logic, but 'w 0 0' would send a
      request over the wire (where it then depends on the server, and
      fails at least for qemu-nbd but might pass for other NBD
      implementations).
      
      With this patch, a client MUST request read-only mode to access
      a server that is doing a read-only export, or else it will get
      a message like:
      
      can't open device nbd://localhost:10809/foo: request for write access conflicts with read-only export
      
      It is no longer possible to even attempt writes over the wire
      (including the corner case of 0-length writes), because the block
      layer enforces the explicit read-only request; this matches the
      behavior of qcow2 when backed by a read-only POSIX file.
      
      Fix several iotests to comply with the new behavior (since
      qemu-nbd of an internal snapshot, as well as nbd-server-add over QMP,
      default to a read-only export, we must tell blockdev-add/qemu-io to
      set up a read-only client).
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-3-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      1104d83c
    • E
      nbd-client: Fix error message typos · e659fb3b
      Eric Blake 提交于
      Provide missing spaces that are required when using string
      concatenation to break error messages across source lines.
      Introduced in commit f140e300.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-2-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      e659fb3b
  4. 09 11月, 2017 5 次提交
  5. 08 11月, 2017 8 次提交
  6. 07 11月, 2017 10 次提交
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/pull-2017-11-06-2' into staging · 5ca7a3cb
      Peter Maydell 提交于
      Pull IO 2017/11/06 v2
      
      # gpg: Signature made Tue 07 Nov 2017 14:35:25 GMT
      # gpg:                using RSA key 0xBE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/pull-2017-11-06-2:
        sockets: avoid leak of listen file descriptor
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5ca7a3cb
    • D
      sockets: avoid leak of listen file descriptor · 10a7b7e6
      Daniel P. Berrange 提交于
      If we iterate over the full port range without successfully binding+listening
      on the socket, we'll try the next address, whereupon we overwrite the slisten
      file descriptor variable without closing it.
      
      Rather than having two places where we open + close socket FDs on different
      iterations of nested for loops, re-arrange the code to always open+close
      within the same loop iteration.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      10a7b7e6
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171107' into staging · a4f0537d
      Peter Maydell 提交于
      target-arm queue:
       * arm_gicv3_its: Don't abort on table save failure
       * arm_gicv3_its: Fix the VM termination in vm_change_state_handler()
       * translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD
       * hw/arm: Mark the "fsl,imx31/25/6" devices with user_creatable = false
       * arm: implement cache/shareability attribute bits for PAR registers
      
      # gpg: Signature made Tue 07 Nov 2017 13:33:58 GMT
      # gpg:                using RSA key 0x3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20171107:
        hw/intc/arm_gicv3_its: Don't abort on table save failure
        hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler()
        translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD
        hw/arm: Mark the "fsl,imx31" device with user_creatable = false
        hw/arm: Mark the "fsl,imx25" device with user_creatable = false
        hw/arm: Mark the "fsl,imx6" device with user_creatable = false
        arm: implement cache/shareability attribute bits for PAR registers
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a4f0537d
    • E
      hw/intc/arm_gicv3_its: Don't abort on table save failure · 8a7348b5
      Eric Auger 提交于
      The ITS is not fully properly reset at the moment. Caches are
      not emptied.
      
      After a reset, in case we attempt to save the state before
      the bound devices have registered their MSIs and after the
      1st level table has been allocated by the ITS driver
      (device BASER is valid), the first level entries are still
      invalid. If the device cache is not empty (devices registered
      before the reset), vgic_its_save_device_tables fails with -EINVAL.
      This causes a QEMU abort().
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NEric Auger <eric.auger@redhat.com>
      Reported-by: Nwanghaibin <wanghaibin.wang@huawei.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8a7348b5
    • S
      hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler() · 3a575cd2
      Shanker Donthineni 提交于
      The commit cddafd8f ("hw/intc/arm_gicv3_its: Implement state save
      /restore") breaks the backward compatibility with the older kernels
      where vITS save/restore support is not available. The vmstate function
      vm_change_state_handler() should not be registered if the running kernel
      doesn't support ITS save/restore feature. Otherwise VM instance will be
      killed whenever vmstate callback function is invoked.
      
      Observed a virtual machine shutdown with QEMU-2.10+linux-4.11 when testing
      the reboot command "virsh reboot <domain> --mode acpi" instead of reboot.
      
      KVM Error: 'KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x00000000000001'
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Message-id: 1509712671-16299-1-git-send-email-shankerd@codeaurora.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3a575cd2
    • P
      translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD · 3448d47b
      Peter Maydell 提交于
      For AArch32 LDREXD and STREXD, architecturally the 32-bit word at the
      lowest address is always Rt and the one at addr+4 is Rt2, even if the
      CPU is big-endian. Our implementation does these with a single
      64-bit store, so if we're big-endian then we need to put the two
      32-bit halves together in the opposite order to little-endian,
      so that they end up in the right places. We were trying to do
      this with the gen_aa32_frob64() function, but that is not correct
      for the usermode emulator, because there there is a distinction
      between "load a 64 bit value" (which does a BE 64-bit access
      and doesn't need swapping) and "load two 32 bit values as one
      64 bit access" (where we still need to do the swapping, like
      system mode BE32).
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1725267
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1509622400-13351-1-git-send-email-peter.maydell@linaro.org
      3448d47b
    • T
      hw/arm: Mark the "fsl,imx31" device with user_creatable = false · e4e05b7b
      Thomas Huth 提交于
      QEMU currently crashes when the user tries to instantiate the fsl,imx31
      device manually:
      
      $ aarch64-softmmu/qemu-system-aarch64 -M kzm -device fsl,,imx31
      **
      ERROR:/home/thuth/devel/qemu/tcg/tcg.c:538:tcg_register_thread:
       assertion failed: (n < max_cpus)
      Aborted (core dumped)
      
      The kzm board (which is the one that uses this CPU type) only supports
      one CPU, and the realize function of the "fsl,imx31" device also uses
      serial_hds[] directly, so this device clearly can not be instantiated
      twice and thus we should mark it with user_creatable = false.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1509519537-6964-4-git-send-email-thuth@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e4e05b7b
    • T
      hw/arm: Mark the "fsl,imx25" device with user_creatable = false · 5e0c7044
      Thomas Huth 提交于
      QEMU currently crashes when the user tries to instantiate the fsl,imx25
      device manually:
      
      $ aarch64-softmmu/qemu-system-aarch64 -S -M imx25-pdk -device fsl,,imx25
      **
      ERROR:/home/thuth/devel/qemu/tcg/tcg.c:538:tcg_register_thread:
       assertion failed: (n < max_cpus)
      
      The imx25-pdk board (which is the one that uses this CPU type) only
      supports one CPU, and the realize function of the "fsl,imx25" device
      also uses serial_hds[] directly, so this device clearly can not be
      instantiated twice and thus we should mark it with user_creatable = 0.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1509519537-6964-3-git-send-email-thuth@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5e0c7044
    • T
      hw/arm: Mark the "fsl,imx6" device with user_creatable = false · 70fbd3c4
      Thomas Huth 提交于
      This device causes QEMU to abort if the user tries to instantiate it:
      
      $ qemu-system-aarch64 -M sabrelite -smp 1,maxcpus=2 -device fsl,,imx6
      Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
      qemu-system-aarch64: -device fsl,,imx6: Device 'serial0' is in use
      Aborted (core dumped)
      
      The device uses serial_hds[] directly in its realize function, so it
      can not be instantiated again by the user.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1509519537-6964-2-git-send-email-thuth@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      70fbd3c4
    • A
      arm: implement cache/shareability attribute bits for PAR registers · 5b2d261d
      Andrew Baumann 提交于
      On a successful address translation instruction, PAR is supposed to
      contain cacheability and shareability attributes determined by the
      translation. We previously returned 0 for these bits (in line with the
      general strategy of ignoring caches and memory attributes), but some
      guest OSes may depend on them.
      
      This patch collects the attribute bits in the page-table walk, and
      updates PAR with the correct attributes for all LPAE translations.
      Short descriptor formats still return 0 for these bits, as in the
      prior implementation.
      Signed-off-by: NAndrew Baumann <Andrew.Baumann@microsoft.com>
      Message-id: 20171031223830.4608-1-Andrew.Baumann@microsoft.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5b2d261d