1. 08 2月, 2017 2 次提交
    • M
      vnc: do not disconnect on EAGAIN · 537848ee
      Michael Tokarev 提交于
      When qemu vnc server is trying to send large update to clients,
      there might be a situation when system responds with something
      like EAGAIN, indicating that there's no system memory to send
      that much data (depending on the network speed, client and server
      and what is happening).  In this case, something like this happens
      on qemu side (from strace):
      
      sendmsg(16, {msg_name(0)=NULL,
              msg_iov(1)=[{"\244\"..., 729186}],
              msg_controllen=0, msg_flags=0}, 0) = 103950
      sendmsg(16, {msg_name(0)=NULL,
              msg_iov(1)=[{"lz\346"..., 1559618}],
              msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN
      sendmsg(-1, {msg_name(0)=NULL,
              msg_iov(1)=[{"lz\346"..., 1559618}],
              msg_controllen=0, msg_flags=0}, 0) = -1 EBADF
      
      qemu closes the socket before the retry, and obviously it gets EBADF
      when trying to send to -1.
      
      This is because there WAS a special handling for EAGAIN, but now it doesn't
      work anymore, after commit 04d2529d, because
      now in all error-like cases we initiate vnc disconnect.
      
      This change were introduced in qemu 2.6, and caused numerous grief for many
      people, resulting in their vnc clients reporting sporadic random disconnects
      from vnc server.
      
      Fix that by doing the disconnect only when necessary, i.e. omitting this
      very case of EAGAIN.
      
      Hopefully the existing condition (comparing with QIO_CHANNEL_ERR_BLOCK)
      is sufficient, as the original code (before the above commit) were
      checking for other errno values too.
      
      Apparently there's another (semi?)bug exist somewhere here, since the
      code tries to write to fd# -1, it probably should check if the connection
      is open before. But this isn't important.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1486115549-9398-1-git-send-email-mjt@msgid.tls.msk.ru
      Fixes: 04d2529d
      Cc: Daniel P. Berrange <berrange@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      537848ee
    • P
      ui/vnc: Drop unused vnc_has_job() and vnc_jobs_clear() · c3ff04b6
      Peter Maydell 提交于
      The functions vnc_has_job() and vnc_jobs_clear() are
      never used; remove them.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NGonglei <arei.gonglei@huawei.com>
      Message-id: 1486146260-8092-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c3ff04b6
  2. 07 2月, 2017 8 次提交
  3. 06 2月, 2017 20 次提交
    • D
      postcopy: Recover block devices on early failure · ef8d6488
      Dr. David Alan Gilbert 提交于
      An early postcopy failure can be recovered from as long as we know
      we haven't sent the command to run the destination.
      We have to undo the bdrv_inactivate_all by calling
      bdrv_invalidate_cache_all
      
      Note that I'm not using ms->block_inactive because once we've
      sent the postcopy package we dont want anything else to try
      and recover the block storage on the source; the destination
      might have started writing to it.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20170202155909.31784-3-dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      ef8d6488
    • D
      Postcopy: Reset state to avoid cleanup assert · 328d4d85
      Dr. David Alan Gilbert 提交于
      On a destination host with no userfault support an incoming
      postcopy would cause the state to enter ADVISE before
      it realised there was no support, and because it was in ADVISE
      state it would perform a cleanup at the end.  Since there
      was no support the cleanup function should be unreachable,
      but ends up being called and asserting.
      
      Reset the state when we realise we have no support, thus the
      cleanup doesn't happen.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20170202155909.31784-2-dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      328d4d85
    • D
      vmstate registration: check return values · 67980031
      Dr. David Alan Gilbert 提交于
      Check qdev's call to vmstate_register_with_alias_id; that gets
      most of the common uses; there's hundreds of calls via vmstate_register
      which could get fixed over time.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-Id: <20170202125956.21942-4-dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      67980031
    • D
      migration: Check for ID length · 581f08ba
      Dr. David Alan Gilbert 提交于
      The qdev id of a device can be huge if it's on the end of a chain
      of bridges; in reality such chains shouldn't occur but they can
      be made to by chaining PCIe bridges together.
      
      The migration format has a number of 256 character long format
      limits; check we don't hit them (we already use pstrcat/cpy but
      that just protects us from buffer overruns, we fairly quickly
      hit an assert).
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-Id: <20170202125956.21942-3-dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      581f08ba
    • D
      vmstate_register_with_alias_id: Take an Error ** · bc5c4f21
      Dr. David Alan Gilbert 提交于
      I'll be adding an error to it in a subsequent patch.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-Id: <20170202125956.21942-2-dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      bc5c4f21
    • J
      migration: create Migration Incoming State at init time · b4b076da
      Juan Quintela 提交于
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <1485207141-1941-3-git-send-email-quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      b4b076da
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20170206-1' into staging · 7d2c6c95
      Peter Maydell 提交于
      usb: various bugfixes, mostly xhci.
      
      # gpg: Signature made Mon 06 Feb 2017 11:26:35 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-usb-20170206-1:
        xhci: fix event queue IRQ handling
        usb: ccid: check ccid apdu length
        xhci: guard xhci_kick_epctx against recursive calls
        xhci: don't kick in xhci_submit and xhci_fire_ctl_transfer
        xhci: rename xhci_complete_packet to xhci_try_complete_packet
        xhci: only free completed transfers
        usb: accept usb3 control requests
        usb/uas: more verbose error message
        hw/usb/dev-hid: Improve guest compatibility of usb-tablet
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7d2c6c95
    • G
      xhci: fix event queue IRQ handling · 7da76e12
      Gerd Hoffmann 提交于
      The qemu xhci emulation doesn't handle the ERDP_EHB flag correctly.
      
      When the host adapter queues a new event the ERDP_EHB flag is set.  The
      flag is cleared (via w1c) by the guest when it updates the ERDP (event
      ring dequeue pointer) register to notify the host adapter which events
      it has fetched.
      
      An IRQ must be raised in case the ERDP_EHB flag flips from clear to set.
      If the flag is set already (which implies there are events queued up
      which are not yet processed by the guest) xhci must *not* raise a IRQ.
      
      Qemu got that wrong and raised an IRQ on every event, thereby generating
      spurious interrupts in case we've queued events faster than the guest
      processed them.  This patch fixes that.
      
      With that change in place we also have to check ERDP updates, to see
      whenever the guest has fetched all queued events.  In case there are
      still pending events set ERDP_EHB and raise an IRQ again, to make sure
      the events don't linger unseen forever.
      
      The linux kernel driver and the microsoft windows driver (shipped with
      win8+) can deal with the spurious interrupts without problems.  The
      renesas windows driver (v2.1.39) which can be used on older windows
      versions is quite upset though.  It does spurious ERDP updates now and
      then (not every time, seems we must hit a race window for this to
      happen), which in turn makes the qemu xhci emulation think the event
      ring is full.  Things go south from here ...
      
      tl;dr: This is the "fix xhci on win7" patch.
      
      Cc: M.Cerveny@computer.org
      Cc: 1373228@bugs.launchpad.net
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486104705-13761-1-git-send-email-kraxel@redhat.com
      7da76e12
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/isa-cleanup-20170206' into staging · c1923252
      Peter Maydell 提交于
      Allow ISA to be disabled on some platforms (v3)
      
      This makes some cleanups that are a start on allowing ISA to be
      compiled out for platforms which don't use it.
      
      I posted this series last November, and it collected a number of R-bs
      and no apparent objections.  So, I've now rebased it (trivially) and
      am sending a pull request in the hopes of merge.  A lot of the pieces
      here don't have a clear maintainer, so I'm sending it directly to
      Peter.
      
      Notes:
        * Patch 3/3 triggers a style warning, but that's just because I'm
          moving a C++ // comment verbatim from one file to another
      
      Changes since v2:
        * Trivial rebase
      
      Changes since v1:
        * Fixed some silly compile errors in 3/3 exposed by some
          changes in other headers
      
      # gpg: Signature made Mon 06 Feb 2017 01:37:50 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/isa-cleanup-20170206:
        Split ISA and sysbus versions of m48t59 device
        Allow ISA bus to be configured out
        Split serial-isa into its own config option
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c1923252
    • P
      usb: ccid: check ccid apdu length · c7dfbf32
      Prasad J Pandit 提交于
      CCID device emulator uses Application Protocol Data Units(APDU)
      to exchange command and responses to and from the host.
      The length in these units couldn't be greater than 65536. Add
      check to ensure the same. It'd also avoid potential integer
      overflow in emulated_apdu_from_guest.
      Reported-by: NLi Qiang <liqiang6-s@360.cn>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 20170202192228.10847-1-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c7dfbf32
    • G
      xhci: guard xhci_kick_epctx against recursive calls · 96d87bdd
      Gerd Hoffmann 提交于
      Track xhci_kick_epctx processing being active in a variable.  Check the
      variable before calling xhci_kick_epctx from xhci_kick_ep.  Add an
      assert to make sure we don't call recursively into xhci_kick_epctx.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486035372-3621-1-git-send-email-kraxel@redhat.com
      Message-id: 1485790607-31399-5-git-send-email-kraxel@redhat.com
      96d87bdd
    • G
      xhci: don't kick in xhci_submit and xhci_fire_ctl_transfer · ddb603ab
      Gerd Hoffmann 提交于
      xhci_submit and xhci_fire_ctl_transfer are is called from
      xhci_kick_epctx processing loop only, so there is no need to call
      xhci_kick_epctx make sure processing continues.  Also eecursive calls
      into xhci_kick_epctx can cause trouble.
      
      Drop the xhci_kick_epctx calls.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-4-git-send-email-kraxel@redhat.com
      ddb603ab
    • G
      xhci: rename xhci_complete_packet to xhci_try_complete_packet · 13e8ff7a
      Gerd Hoffmann 提交于
      Make clear that this isn't guaranteed to actually complete the transfer,
      the usb packet can still be in flight after calling that function.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-3-git-send-email-kraxel@redhat.com
      13e8ff7a
    • G
      xhci: only free completed transfers · f94d18d6
      Gerd Hoffmann 提交于
      Most callsites check already, one was missed.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-2-git-send-email-kraxel@redhat.com
      f94d18d6
    • G
      usb: accept usb3 control requests · 811ad5d8
      Gerd Hoffmann 提交于
      Windows 10 reportedly sends these, so accept them in case
      the device in question is a superspeed (usb3) device.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485870727-21956-2-git-send-email-kraxel@redhat.com
      811ad5d8
    • G
      usb/uas: more verbose error message · e306b2fd
      Gerd Hoffmann 提交于
      Print some more details in case we get a unknown
      control request, to ease trouble-shooting.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485870727-21956-1-git-send-email-kraxel@redhat.com
      e306b2fd
    • P
      hw/usb/dev-hid: Improve guest compatibility of usb-tablet · 0cd089e9
      Phil Dennis-Jordan 提交于
       1. Set bInterfaceProtocol to 0x00 for usb-tablet. This should be
          non-zero for boot protocol devices only, which the usb-tablet is not.
       2. Set the usb-tablet's usage to "mouse" in the report descriptor.
      
      The boot protocol of 0x02 specifically confused OS X/macOS' HID driver
      stack, causing it to generate additional bogus HID events with relative
      motion in addition to the tablet's absolute coordinate events.
      
      Absolute pointing devices with HID Report Descriptor usage of 0x01
      (pointing) are treated by the macOS HID driver as analog sticks, and
      absolute coordinates are not directly translated to absolute mouse
      cursor positions. Changing it to 0x02 (mouse) fixes the problem, and
      does not have any adverse effect in other operating systems and
      windowing systems. (VMWare does the same thing.)
      Signed-off-by: NPhil Dennis-Jordan <phil@philjordan.eu>
      Message-id: 1485365075-32702-1-git-send-email-phil@philjordan.eu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      0cd089e9
    • D
      Split ISA and sysbus versions of m48t59 device · c124c4d1
      David Gibson 提交于
      The m48t59 device supports both ISA and direct sysbus attached versions of
      the device in the one .c file.  This can be awkward for some embedded
      machine types which need the sysbus M48T59, but don't want to pull in the
      ISA bus code and its other dependencies.
      
      Therefore, this patch splits out the code for the ISA attached M48T59 into
      its own C file.  It will be built when both CONFIG_M48T59 and
      CONFIG_ISA_BUS are enabled.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      c124c4d1
    • D
      Allow ISA bus to be configured out · 1fc125f5
      David Gibson 提交于
      Currently, the code to handle the legacy ISA bus is always included in
      qemu.  However there are lots of platforms that don't include ISA legacy
      devies, and quite a few that have never used ISA legacy devices at all.
      
      This patch allows the ISA bus code to be disabled in the configuration for
      platforms where it doesn't make sense.
      
      For now, the default configs are adjusted to include ISA on all platforms
      including PCI: anything with PCI can at least in principle add an i82378
      PCI->ISA bridge.  Also, CONFIG_IDE_CORE which is already in pci.mak
      requires ISA support.
      
      We also explicitly enable ISA on some other non-PCI platforms which include
      ISA devices: moxie, sparc and unicore32.  We may want to pare this down in
      future.
      
      The platforms that will lose ISA by default are: cris, lm32, microblazeel,
      microblaze, openrisc, s390x, tricore, xtensaeb, xtensa.  As far as I can
      tell none of these ever used ISA.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      1fc125f5
    • D
      Split serial-isa into its own config option · 1401c322
      David Gibson 提交于
      At present, the core device model code for 8250-like serial ports
      (serial.c) and the code for serial ports attached to ISA-style legacy IO
      (serial-isa.c) are both controlled by the CONFIG_SERIAL variable.
      
      There are lots and lots of embedded platforms that have 8250-like serial
      ports but have never had anything resembling ISA legacy IO.  Therefore,
      split serial-isa into its own CONFIG_SERIAL_ISA option so it can be
      disabled for platforms where it's not appropriate.
      
      For now, I enabled CONFIG_SERIAL_ISA in every default-config where
      CONFIG_SERIAL is enabled, excepting microblaze, or32, and xtensa.  As best
      as I can tell, those platforms never used legacy ISA, and also don't
      include PCI support (which would allow connection of a PCI->ISA bridge
      and/or a southbridge including legacy ISA serial ports).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      1401c322
  4. 03 2月, 2017 8 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · a951316b
      Peter Maydell 提交于
      # gpg: Signature made Fri 03 Feb 2017 14:37:45 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:
        iothread: enable AioContext polling by default
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a951316b
    • S
      iothread: enable AioContext polling by default · cdd7abfd
      Stefan Hajnoczi 提交于
      IOThread AioContexts are likely to consist only of event sources like
      virtqueue ioeventfds and LinuxAIO completion eventfds that are pollable
      from userspace (without system calls).
      
      We recently merged the AioContext polling feature but didn't enable it
      by default yet.  I have gone back over the performance data on the
      mailing list and picked a default polling value that gave good results.
      
      Let's enable AioContext polling by default so users don't have another
      switch they need to set manually.  If performance regressions are found
      we can still disable this for the QEMU 2.9 release.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Karl Rister <krister@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20170126170119.27876-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      cdd7abfd
    • P
      Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170202' into staging · 4100a344
      Peter Maydell 提交于
      Xen 2017/02/02
      
      # gpg: Signature made Thu 02 Feb 2017 18:26:58 GMT
      # gpg:                using RSA key 0x894F8F4870E1AE90
      # gpg: Good signature from "Stefano Stabellini <sstabellini@kernel.org>"
      # gpg:                 aka "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
      # Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90
      
      * remotes/sstabellini/tags/xen-20170202:
        xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()
        MAINTAINERS: Update xen-devel mailing list address
        xen-platform: add missing disk unplug option
        xen-platform: add support for unplugging NVMe disks...
        xen-platform: re-structure unplug_disks
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4100a344
    • S
      tci: Remove invalid assertions · 77e217d1
      Stefan Weil 提交于
      tb_jmp_insn_offset and tb_jmp_reset_offset are pointers
      and cannot be used with ARRAY_SIZE.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20170202195601.11286-1-sw@weilnetz.de
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      77e217d1
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20170202-2' into staging · 5b66d7ae
      Peter Maydell 提交于
      cirrus: multiple bugfixes, including CVE-2017-2615 fix.
      
      # gpg: Signature made Thu 02 Feb 2017 15:03:35 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-vga-20170202-2:
        cirrus: fix oob access issue (CVE-2017-2615)
        cirrus: fix blit address mask handling
        cirrus: allow zero source pitch in pattern fill rops
        cirrus: handle negative pitch in cirrus_invalidate_region()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5b66d7ae
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170202' into staging · 5459ef3b
      Peter Maydell 提交于
      ppc patch queue 2017-02-02
      
      This obsoletes ppc-for-2.9-20170112, which had a MacOS build bug.
      
      This is a long overdue ppc pull request for qemu-2.9.  It's been a
      long time coming due to some holidays and inconveniently timed
      problems with testing.  So, there's a lot in here:
      
          * More POWER9 instruction implementations for TCG
          * The simpler parts of my CPU compatibility mode cleanup
              * This changes behaviour to prefer compatibility modes over
                "raW" mode for new machine type versions
          * New "40p" machine type which is essentially a modernized and
            cleaned up "prep".  The intention is that it will replace "prep"
            once it has some more testing and polish.
          * Add pseries-2.9 machine type
          * Implement H_SIGNAL_SYS_RESET hypercall
          * Consolidate the two alternate CPU init paths in pseries by
            making it always go through CPU core objects to initialize CPU
          * A number of bugfixes and cleanups
          * Stop the guest timebase when the guest is stopped under KVM.
            This makes the guest system clock also stop when paused, which
            matches the x86 behaviour.
          * Some preliminary cleanups leading towards implementation of the
            POWER9 MMU.
      
      There are also some changes not strictly related to ppc code, but for
      its benefit:
      
          * Limit the pxi-expander-bridge (PXB) device to x86 guests only
            (it's essentially a hack to work around historical x86
            limitations)
          * Some additions to the 128-bit math in host_utils, necessary for
            some of the new instructions.
          * Revise a number of qtests and enable them for ppc
      
      # gpg: Signature made Thu 02 Feb 2017 01:40:16 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.9-20170202: (107 commits)
        hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found
        ppc/kvm: Handle the "family" CPU via alias instead of registering new types
        target/ppc/mmu_hash64: Fix incorrect shift value in amr calculation
        target/ppc/mmu_hash64: Fix printing unsigned as signed int
        tcg/POWER9: NOOP the cp_abort instruction
        target/ppc/debug: Print LPCR register value if register exists
        target-ppc: Add xststdc[sp, dp, qp] instructions
        target-ppc: Add xvtstdc[sp,dp] instructions
        target-ppc: Add MMU model check for booke machines
        ppc: switch to constants within BUILD_BUG_ON
        target/ppc/cpu-models: Fix/remove bad CPU aliases
        target/ppc: Remove unused POWERPC_FAMILY(POWER)
        spapr: clock should count only if vm is running
        ppc: Remove unused function cpu_ppc601_rtc_init()
        target/ppc: Add pcr_supported to POWER9 cpu class definition
        powerpc/cpu-models: rename ISAv3.00 logical PVR definition
        target-ppc: Add xvcv[hpsp, sphp] instructions
        target-ppc: Add xsmulqp instruction
        target-ppc: Add xsdivqp instruction
        target-ppc: Add xscvsdqp and xscvudqp instructions
        ...
      
      # Conflicts:
      #	hw/pci-bridge/Makefile.objs
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5459ef3b
    • J
      xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev() · e9dcbc86
      Juergen Gross 提交于
      The error exits of xen_pv_find_xendev() free the new xen-device via
      g_free() which is wrong.
      
      As the xen-device has been initialized as qdev it must be removed
      via qdev_unplug().
      
      This bug has been introduced with commit 3a6c9172
      ("xen: create qdev for each backend device").
      Reported-by: NRoger Pau Monné <roger.pau@citrix.com>
      Tested-by: NRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      e9dcbc86
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · 4e9f5244
      Peter Maydell 提交于
      # gpg: Signature made Wed 01 Feb 2017 13:44:32 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: clean up trace-events files
        qapi: add missing trace_visit_type_enum() call
        trace: improve error reporting when parsing simpletrace header
        trace: update docs to reflect new code generation approach
        trace: switch to modular code generation for sub-directories
        trace: move setting of group name into Makefiles
        trace: move hw/i386/xen events to correct subdir
        trace: move hw/xen events to correct subdir
        trace: move hw/block/dataplane events to correct subdir
        make: move top level dir to end of include search path
      
      # Conflicts:
      #	Makefile
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4e9f5244
  5. 02 2月, 2017 2 次提交
    • P
      Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170201' into staging · 0b17d809
      Peter Maydell 提交于
      s390x fixes
      
      - build error with old gcc versions
      - race between cmma reset and rom/loader resets
      - linux-user vs. cpu model
      
      # gpg: Signature made Wed 01 Feb 2017 08:24:47 GMT
      # gpg:                using RSA key 0x117BBC80B5A61C7C
      # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>"
      # Primary key fingerprint: F922 9381 A334 08F9 DBAB  FBCA 117B BC80 B5A6 1C7C
      
      * remotes/borntraeger/tags/s390x-20170201:
        target/s390x: use "qemu" cpu model in user mode
        s390x/kvm: fix small race reboot vs. cmma
        s390-pci: fix compilation on older GCC versions
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0b17d809
    • L
      cirrus: fix oob access issue (CVE-2017-2615) · 62d4c6bd
      Li Qiang 提交于
      When doing bitblt copy in backward mode, we should minus the
      blt width first just like the adding in the forward mode. This
      can avoid the oob access of the front of vga's vram.
      Signed-off-by: NLi Qiang <liqiang6-s@360.cn>
      
      { kraxel: with backward blits (negative pitch) addr is the topmost
                address, so check it as-is against vram size ]
      
      Cc: qemu-stable@nongnu.org
      Cc: P J P <ppandit@redhat.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
      Fixes: d3532a0d (CVE-2014-8106)
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485938101-26602-1-git-send-email-kraxel@redhat.com
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      62d4c6bd