1. 28 1月, 2017 18 次提交
    • P
      x86-KVM: Supply TSC and APIC clock rates to guest like VMWare · 9954a158
      Phil Dennis-Jordan 提交于
      This fixes timekeeping of x86-64 Darwin/OS X/macOS guests when using KVM.
      
      Darwin/OS X/macOS for x86-64 uses the TSC for timekeeping; it normally calibrates this by querying various clock frequency scaling MSRs. Details depend on the exact CPU model detected. The local APIC timer frequency is extracted from (EFI) firmware.
      
      This is problematic in the presence of virtualisation, as the MSRs in question are typically not handled by the hypervisor. VMWare (Fusion) advertises TSC and APIC frequency via a custom 0x40000010 CPUID leaf, in the eax and ebx registers respectively. This is documented at https://lwn.net/Articles/301888/ among other places.
      
      Darwin/OS X/macOS looks for the generic 0x40000000 hypervisor leaf, and if this indicates via eax that leaf 0x40000010 might be available, that is in turn queried for the two frequencies.
      
      This adds a CPU option "vmware-cpuid-freq" to enable the same behaviour when running Qemu with KVM acceleration, if the KVM TSC frequency can be determined, and it is stable. (invtsc or user-specified) The virtualised APIC bus cycle is hardcoded to 1GHz in KVM, so ebx of the CPUID leaf is also hardcoded to this value.
      Signed-off-by: NPhil Dennis-Jordan <phil@philjordan.eu>
      Message-Id: <1484921496-11257-2-git-send-email-phil@philjordan.eu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9954a158
    • E
      block: get max_transfer limit for char (scsi-generic) devices · c4c41a0a
      Eric Farman 提交于
      We can get the maximum number of bytes for a single I/O transfer
      from the BLKSECTGET ioctl, but we only perform this for block
      devices.  scsi-generic devices are represented as character devices,
      and so do not issue this today.  Update this, so that virtio-scsi
      devices using the scsi-generic interface can return the same data.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Message-Id: <20170120162527.66075-4-farman@linux.vnet.ibm.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c4c41a0a
    • E
      block: Fix target variable of BLKSECTGET ioctl · 48265250
      Eric Farman 提交于
      Commit 6f607174 ("raw-posix: Fetch max sectors for host block device")
      introduced a routine to call the kernel BLKSECTGET ioctl, which stores the
      result back to user space.  However, the size of the data returned depends
      on the routine handling the ioctl.  The (compat_)blkdev_ioctl returns a
      short, while sg_ioctl returns an int.  Thus, on big-endian systems, we can
      find ourselves accidentally shifting the result to a much larger value.
      (On s390x, a short is 16 bits while an int is 32 bits.)
      
      Also, the two ioctl handlers return values in different scales (block
      returns sectors, while sg returns bytes), so some tweaking of the outputs
      is required such that hdev_get_max_transfer_length returns a value in a
      consistent set of units.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Message-Id: <20170120162527.66075-3-farman@linux.vnet.ibm.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      48265250
    • E
      hw/scsi: Fix debug message of cdb structure in scsi-generic · 2e144aa7
      Eric Farman 提交于
      When running with debug enabled, the scsi-generic cdb that is
      dumped skips byte 0 of the command, which is the opcode.  This
      makes identifying which command is being issued/completed a
      little difficult.  Example:
      
        0x00 0x00 0x01 0x00 0x00
        scsi-generic: scsi_read_data 0x0
        scsi-generic: Data ready tag=0x0 len=164
        scsi-generic: scsi_read_data 0x0
        scsi-generic: Command complete 0x0x10a42c60 tag=0x0 status=0
      
      Improve this by adding a message prior to the loop, similar to
      what exists for scsi-disk.  Clean up a few other messages to be
      more explicit of what is being represented.  Example:
      
        scsi-generic: Command: data=0x12 0x00 0x00 0x01 0x00 0x00
        scsi-generic: scsi_read_data tag=0x0
        scsi-generic: Data ready tag=0x0 len=164
        scsi-generic: scsi_read_data tag=0x0
        scsi-generic: Command complete 0x0x10a452d0 tag=0x0 status=0
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Message-Id: <20170120162527.66075-2-farman@linux.vnet.ibm.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2e144aa7
    • T
      Introduce DEVICE_CATEGORY_CPU for CPU devices · ba31cc72
      Thomas Huth 提交于
      Now that CPUs show up in the help text of "-device ?",
      we should group them into an appropriate category.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1484917276-7107-1-git-send-email-thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ba31cc72
    • P
      block/iscsi: avoid data corruption with cache=writeback · 1da45e0c
      Peter Lieven 提交于
      nb_cls_shrunk in iscsi_allocmap_update can become -1 if the
      request starts and ends within the same cluster. This results
      in passing -1 to bitmap_set and bitmap_clear and they don't
      handle negative values properly. In the end this leads to data
      corruption.
      
      Fixes: e1123a3b
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Message-Id: <1484579832-18589-1-git-send-email-pl@kamp.de>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1da45e0c
    • L
      hw/isa/lpc_ich9: negotiate SMI broadcast on pc-q35-2.9+ machine types · b8bab8eb
      Laszlo Ersek 提交于
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-4-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b8bab8eb
    • L
      hw/isa/lpc_ich9: add broadcast SMI feature · 5ce45c7a
      Laszlo Ersek 提交于
      The generic edk2 SMM infrastructure prefers
      EFI_SMM_CONTROL2_PROTOCOL.Trigger() to inject an SMI on each processor. If
      Trigger() only brings the current processor into SMM, then edk2 handles it
      in the following ways:
      
      (1) If Trigger() is executed by the BSP (which is guaranteed before
          ExitBootServices(), but is not necessarily true at runtime), then:
      
          (a) If edk2 has been configured for "traditional" SMM synchronization,
              then the BSP sends directed SMIs to the APs with APIC delivery,
              bringing them into SMM individually. Then the BSP runs the SMI
              handler / dispatcher.
      
          (b) If edk2 has been configured for "relaxed" SMM synchronization,
              then the APs that are not already in SMM are not brought in, and
              the BSP runs the SMI handler / dispatcher.
      
      (2) If Trigger() is executed by an AP (which is possible after
          ExitBootServices(), and can be forced e.g. by "taskset -c 1
          efibootmgr"), then the AP in question brings in the BSP with a
          directed SMI, and the BSP runs the SMI handler / dispatcher.
      
      The smaller problem with (1a) and (2) is that the BSP and AP
      synchronization is slow. For example, the "taskset -c 1 efibootmgr"
      command from (2) can take more than 3 seconds to complete, because
      efibootmgr accesses non-volatile UEFI variables intensively.
      
      The larger problem is that QEMU's current behavior diverges from the
      behavior usually seen on physical hardware, and that keeps exposing
      obscure corner cases, race conditions and other instabilities in edk2,
      which generally expects / prefers a software SMI to affect all CPUs at
      once.
      
      Therefore introduce the "broadcast SMI" feature that causes QEMU to inject
      the SMI on all VCPUs.
      
      While the original posting of this patch
      <http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05658.html>
      only intended to speed up (2), based on our recent "stress testing" of SMM
      this patch actually provides functional improvements.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-3-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5ce45c7a
    • L
      hw/isa/lpc_ich9: add SMI feature negotiation via fw_cfg · 50de920b
      Laszlo Ersek 提交于
      Introduce the following fw_cfg files:
      
      - "etc/smi/supported-features": a little endian uint64_t feature bitmap,
        presenting the features known by the host to the guest. Read-only for
        the guest.
      
        The content of this file will be determined via bit-granularity ICH9-LPC
        device properties, to be introduced later. For now, the bitmask is left
        zeroed. The bits will be set from machine type compat properties and on
        the QEMU command line, hence this file is not migrated.
      
      - "etc/smi/requested-features": a little endian uint64_t feature bitmap,
        representing the features the guest would like to request. Read-write
        for the guest.
      
        The guest can freely (re)write this file, it has no direct consequence.
        Initial value is zero. A nonzero value causes the SMI-related fw_cfg
        files and fields that are under guest influence to be migrated.
      
      - "etc/smi/features-ok": contains a uint8_t value, and it is read-only for
        the guest. When the guest selects the associated fw_cfg key, the guest
        features are validated against the host features. In case of error, the
        negotiation doesn't proceed, and the "features-ok" file remains zero. In
        case of success, the "features-ok" file becomes (uint8_t)1, and the
        negotiated features are locked down internally (to which no further
        changes are possible until reset).
      
        The initial value is zero.  A nonzero value causes the SMI-related
        fw_cfg files and fields that are under guest influence to be migrated.
      
      The C-language fields backing the "supported-features" and
      "requested-features" files are uint8_t arrays. This is because they carry
      guest-side representation (our choice is little endian), while
      VMSTATE_UINT64() assumes / implies host-side endianness for any uint64_t
      fields. If we migrate a guest between hosts with different endiannesses
      (which is possible with TCG), then the host-side value is preserved, and
      the host-side representation is translated. This would be visible to the
      guest through fw_cfg, unless we used plain byte arrays. So we do.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20170126014416.11211-2-lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      50de920b
    • P
      memory: hmp: add "-f" for "info mtree" · 57bb40c9
      Peter Xu 提交于
      Adding one more option "-f" for "info mtree" to dump the flat views of
      all the address spaces.
      
      This will be useful to debug the memory rendering logic, also it'll be
      much easier with it to know what memory region is handling what address
      range.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1484556005-29701-3-git-send-email-peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      57bb40c9
    • P
      memory: tune mtree_print_mr() to dump mr type · 4e831901
      Peter Xu 提交于
      We were dumping RW bits for each memory region, that might be confusing.
      It'll make more sense to dump the memory region type directly rather
      than the RW bits since that's how the bits are derived.
      
      Meanwhile, with some slight cleanup in the function.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1484556005-29701-2-git-send-email-peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4e831901
    • P
      apic: save apic_delivered flag · 07bfa354
      Pavel Dovgalyuk 提交于
      This patch implements saving/restoring of static apic_delivered variable.
      
      v8: saving static variable only for one of the APICs
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170126123429.5412.94368.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      07bfa354
    • P
      replay: exception replay fix · 8499c8fc
      Pavel Dovgalyuk 提交于
      This patch fixes replaying the exception when TB cache is full.
      It breaks cpu loop execution through setting exception_index
      to process such queued work as TB flush.
      
      v8: moved setting of exeption_index to tb_gen_code
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170126123418.5412.33815.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8499c8fc
    • P
      replay: save/load initial state · 9c2037d0
      Pavel Dovgalyuk 提交于
      This patch implements initial vmstate creation or loading at the start
      of record/replay. It is needed for rewinding the execution in the replay mode.
      
      v4 changes:
       - snapshots are not created by default anymore
      
      v3 changes:
       - added rrsnapshot option
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170124071746.4572.61449.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9c2037d0
    • P
      savevm: add public save_vmstate function · ac8c19ba
      Pavel Dovgalyuk 提交于
      This patch introduces save_vmstate function to allow saving and loading
      vmstates from the replay module.
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170124071741.4572.13714.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ac8c19ba
    • P
      replay: don't use rtc clock on loadvm phase · 1dfb1b2d
      Pavel Dovgalyuk 提交于
      This patch disables the update of the periodic timer of mc146818rtc
      in record/replay mode. State of this timer is saved and therefore does
      not need to be updated in record/replay mode.
      Read of RTC breaks the replay because all rtc reads have to be the same
      as in record mode.
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170124071730.4572.41874.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1dfb1b2d
    • P
      replay: improve interrupt handling · d718b14b
      Pavel Dovgalyuk 提交于
      This patch improves interrupt handling in record/replay mode.
      Now "interrupt" event is saved only when cc->cpu_exec_interrupt returns true.
      This patch also adds missing return to cpu_exec_interrupt function.
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170124071708.4572.64023.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d718b14b
    • P
      icount: update instruction counter on apic patching · 8094532b
      Pavel Dovgalyuk 提交于
      kvmvapic patches the code when some instructions are executed.
      E.g. mov 0xff, 0xfffe0080 is interpreted as push 0xff/call ...
      This patching is also followed by some side effects (changing apic
      and guest memory state). Therefore deterministic execution should take
      this operation into account. This patch decreases icount when original
      mov instruction is trying to execute. Therefore patching becomes
      deterministic and can be replayed correctly.
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170124071702.4572.17294.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8094532b
  2. 27 1月, 2017 8 次提交
  3. 26 1月, 2017 7 次提交
    • D
      io: fix possible double free of task error object · 80fb34ed
      Daniel P. Berrange 提交于
      If a QIOTask has an error set and the calling code uses
      qio_task_propagate_error() to steal the reference to
      that Error object, the task would not clear its own
      reference. This would lead to a double-free when
      qio_task_free runs, if the caller had (correctly) freed
      the Error object they now owned.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      80fb34ed
    • S
      aio-posix: honor is_external in AioContext polling · 59c9f437
      Stefan Hajnoczi 提交于
      AioHandlers marked ->is_external must be skipped when aio_node_check()
      fails.  bdrv_drained_begin() needs this to prevent dataplane from
      submitting new I/O requests while another thread accesses the device and
      relies on it being quiesced.
      
      This patch fixes the following segfault:
      
        Program terminated with signal SIGSEGV, Segmentation fault.
        #0  0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
        2650            bdrv_io_plug(child->bs);
        [Current thread is 1 (Thread 0x7ff5c4bd1c80 (LWP 10917))]
        (gdb) bt
        #0  0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
        #1  0x00005577f6114363 in blk_io_plug (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:1561
        #2  0x00005577f5d4091d in virtio_blk_handle_vq (s=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/virtio-blk.c:589
        #3  0x00005577f5d4240d in virtio_blk_data_plane_handle_output (vdev=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/dataplane/virtio-blk.c:158
        #4  0x00005577f5d88acd in virtio_queue_notify_aio_vq (vq=0x5577f9b3d2a0) at qemu/hw/virtio/virtio.c:1304
        #5  0x00005577f5d8aaaf in virtio_queue_host_notifier_aio_poll (opaque=0x5577f9b3d308) at qemu/hw/virtio/virtio.c:2134
        #6  0x00005577f60ca077 in run_poll_handlers_once (ctx=0x5577f79ddbb0) at qemu/aio-posix.c:493
        #7  0x00005577f60ca268 in try_poll_mode (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:569
        #8  0x00005577f60ca331 in aio_poll (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:601
        #9  0x00005577f612722a in bdrv_flush (bs=0x5577f7c20970) at qemu/block/io.c:2403
        #10 0x00005577f60c1b2d in bdrv_close (bs=0x5577f7c20970) at qemu/block.c:2322
        #11 0x00005577f60c20e7 in bdrv_delete (bs=0x5577f7c20970) at qemu/block.c:2465
        #12 0x00005577f60c3ecf in bdrv_unref (bs=0x5577f7c20970) at qemu/block.c:3425
        #13 0x00005577f60bf951 in bdrv_root_unref_child (child=0x5577f7a2de70) at qemu/block.c:1361
        #14 0x00005577f6112162 in blk_remove_bs (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:491
        #15 0x00005577f6111b1b in blk_remove_all_bs () at qemu/block/block-backend.c:245
        #16 0x00005577f60c1db6 in bdrv_close_all () at qemu/block.c:2382
        #17 0x00005577f5e60cca in main (argc=20, argv=0x7ffea6eb8398, envp=0x7ffea6eb8440) at qemu/vl.c:4684
      
      The key thing is that bdrv_close() uses bdrv_drained_begin() and
      virtio_queue_host_notifier_aio_poll() must not be called.
      
      Thanks to Fam Zheng <famz@redhat.com> for identifying the root cause of
      this crash.
      Reported-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Tested-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 20170124095350.16679-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      59c9f437
    • C
      s390x/flic: fix compilation of kvm flic · a87adb66
      Cornelia Huck 提交于
      2c21ee76 ("migration: extend VMStateInfo") missed a void -> int
      return conversion for kvm_flic_save().
      
      Fixes: 2c21ee76 ("migration: extend VMStateInfo")
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      a87adb66
    • M
      test-hbitmap: Add hbitmap_is_serializable() calls · 7cdc49b9
      Max Reitz 提交于
      Add calls to hbitmap_is_serializable() (asserting that it returns true)
      where necessary (i.e. before every series of (de-)serialization function
      invocations).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <20161115225746.3590-3-mreitz@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      7cdc49b9
    • M
      hbitmap: Add hbitmap_is_serializable() · 20a579de
      Max Reitz 提交于
      Bitmaps with a granularity of 58 or above can be neither serialized nor
      deserialized (see the comment in the function added in this series for
      an explanation). This patch adds a function so that we can check whether
      a bitmap actually can be (de-)serialized at all, thus avoiding failing
      the necessary assertion in hbitmap_serialization_granularity().
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <20161115225746.3590-2-mreitz@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      20a579de
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · c7f1cf01
      Peter Maydell 提交于
      This pull request fixes a 2.9 regression and a long standing bug that can
      cause 9p clients to hang. Other patches are minor enhancements.
      
      # gpg: Signature made Wed 25 Jan 2017 10:12:27 GMT
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@fr.ibm.com>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
      # gpg:                 aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.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: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9pfs: fix offset error in v9fs_xattr_read()
        9pfs: local: trivial cosmetic fix in pwritev op
        9pfs: fix off-by-one error in PDU free list
        tests: virtio-9p: improve error reporting
        9pfs: add missing coroutine_fn annotations
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c7f1cf01
    • P
      Merge remote-tracking branch 'remotes/xtensa/tags/20170124-xtensa' into staging · e32c41e4
      Peter Maydell 提交于
      target/xtensa updates:
      
      - refactor CCOUNT/CCOMPARE (use QEMU timers instead of instruction counting);
      - support icount; run target/xtensa TCG tests with icount;
      - implement SMP prerequisites: static vector selection, RUNSTALL and RER/WER.
      
      # gpg: Signature made Wed 25 Jan 2017 00:27:51 GMT
      # gpg:                using RSA key 0x51F9CC91F83FA044
      # gpg: Good signature from "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/20170124-xtensa:
        target-xtensa: implement RER/WER instructions
        target/xtensa: tests: clean up interrupt tests
        target/xtensa: tests: add memctl test
        target/xtensa: implement MEMCTL SR
        target/xtensa: fix ICACHE/DCACHE options detection
        target/xtensa: tests: add ccount write tests
        target/xtensa: tests: replace hardcoded interrupt masks
        target/xtensa: tests: fix timer tests
        target/xtensa: tests: run tests with icount
        target/xtensa: don't continue translation after exception
        target/xtensa: support icount
        target/xtensa: refactor CCOUNT/CCOMPARE
        target/xtensa: implement RUNSTALL
        target/xtensa: add static vectors selection
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e32c41e4
  4. 25 1月, 2017 7 次提交
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-nios-20170124' into staging · ae5045ae
      Peter Maydell 提交于
      nios2 target support
      
      # gpg: Signature made Tue 24 Jan 2017 21:11:47 GMT
      # gpg:                using RSA key 0xAD1270CC4DD0279B
      # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
      # gpg:                 aka "Richard Henderson <rth@redhat.com>"
      # gpg:                 aka "Richard Henderson <rth@twiddle.net>"
      # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B
      
      * remotes/rth/tags/pull-nios-20170124:
        nios2: Add support for Nios-II R1
        nios2: Add Altera 10M50 GHRD emulation
        nios2: Add periodic timer emulation
        nios2: Add IIC interrupt controller emulation
        nios2: Add usermode binaries emulation
        nios2: Add disas entries
        nios2: Add architecture emulation support
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ae5045ae
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging · ffb5a69c
      Peter Maydell 提交于
      trivial patches for 2017-01-24
      
      # gpg: Signature made Tue 24 Jan 2017 20:27:08 GMT
      # gpg:                using RSA key 0x701B4F6B1A693E59
      # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@debian.org>"
      # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
      #      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59
      
      * remotes/mjt/tags/trivial-patches-fetch: (31 commits)
        hw/isa/isa-bus: Set category of the "isabus-bridge" device
        usb: Set category and description of the MTP device
        gdbstub.c: update old error report statements
        gdbstub.c: fix GDB connection segfault caused by empty machines
        scsi-disk: add 'fall through' comment to switch VERIFY cases
        Drop duplicate display option documentation
        hw/display/framebuffer.c: Avoid overflow for framebuffers > 4GB
        win32: use glib gpoll if glib >= 2.50
        util/mmap-alloc: refactor a little bit for readability
        util/mmap-alloc: check parameter before using
        vfio: remove a duplicated word in comments
        docs: sync pci-ids.txt
        disas/cris.c: Fix Coverity warning about unchecked NULL
        lm32: milkymist-tmu2: fix another integer overflow
        hw/i386/kvmvapic: Remove dead code in patch_hypercalls()
        doc/usb2: fix typo
        qga: fix erroneous argument to strerror
        block: remove dead check
        pci-assign: avoid pointless stat
        qemu-img: remove dead check
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ffb5a69c
    • G
      9pfs: fix offset error in v9fs_xattr_read() · fa0eb5c5
      Greg Kurz 提交于
      The current code tries to copy `read_count' bytes starting at offset
      `offset' from a `read_count`-sized iovec. This causes v9fs_pack() to
      fail with ENOBUFS.
      
      Since the PDU iovec is already partially filled with `offset' bytes,
      let's skip them when creating `qiov_full' and have v9fs_pack() to
      copy the whole of it. Moreover, this is consistent with the other
      places where v9fs_init_qiov_from_pdu() is called.
      
      This fixes commit "bcb8998f 9pfs: call v9fs_init_qiov_from_pdu
      before v9fs_pack".
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      fa0eb5c5
    • G
      9pfs: local: trivial cosmetic fix in pwritev op · 6fe76acc
      Greg Kurz 提交于
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      6fe76acc
    • G
      9pfs: fix off-by-one error in PDU free list · 0d78289c
      Greg Kurz 提交于
      The server can handle MAX_REQ - 1 PDUs at a time and the virtio-9p
      device has a MAX_REQ sized virtqueue. If the client manages to fill
      up the virtqueue, pdu_alloc() will fail and the request won't be
      processed without any notice to the client (it actually causes the
      linux 9p client to hang).
      
      This has been there since the beginning (commit 9f107513 "virtio-9p:
      Add a virtio 9p device to qemu"), but it needs an agressive workload to
      run in the guest to show up.
      
      We actually allocate MAX_REQ PDUs and I see no reason not to link them
      all into the free list, so let's fix the init loop.
      Reported-by: NTuomas Tynkkynen <tuomas@tuxera.com>
      Suggested-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      0d78289c
    • G
      tests: virtio-9p: improve error reporting · 6e37f458
      Greg Kurz 提交于
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      6e37f458
    • G
      9pfs: add missing coroutine_fn annotations · a1bf8b74
      Greg Kurz 提交于
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      a1bf8b74